1 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
3 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
5 2009-05-16 Bean <bean123ch@gmail.com>
7 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
8 (lua_mod_SOURCES): New variable.
9 (lua_mod_CFLAGS): Likewise.
10 (lua_mod_LDFLAGS): Likewise.
12 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
13 (setjmp_mod_SOURCES): New variable.
14 (setjmp_mod_CFLAGS): Likewise.
15 (setjmp_LDFLAGS): Likewise.
17 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
18 (setjmp_mod_SOURCES): New variable.
19 (setjmp_mod_CFLAGS): Likewise.
20 (setjmp_LDFLAGS): Likewise.
22 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
23 (setjmp_mod_SOURCES): New variable.
24 (setjmp_mod_CFLAGS): Likewise.
25 (setjmp_LDFLAGS): Likewise.
27 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
28 (setjmp_mod_SOURCES): New variable.
29 (setjmp_mod_CFLAGS): Likewise.
30 (setjmp_LDFLAGS): Likewise.
32 * normal/i386/setjmp.S: Moved from here ...
33 * lib/i386/setjmp.S: ... Moved here
34 * normal/x86_64/setjmp.S: Moved from here ...
35 * lib/x86_64/setjmp.S: ... Moved here
36 * normal/powerpc/setjmp.S: Moved from here ...
37 * lib/powerpc/setjmp.S: ... Moved here
38 * normal/sparc64/setjmp.S: Moved from here ...
39 * lib/sparc64/setjmp.S: ... Moved here
41 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
42 returns_twice in mingw.
44 * script/lua/grub_lib.c: New file.
45 * script/lua/grub_lib.h: Likewise.
46 * script/lua/grub_lua.h: Likewise.
47 * script/lua/grub_main.c: Likewise.
48 * script/lua/lapi.c: Likewise.
49 * script/lua/lapi.h: Likewise.
50 * script/lua/lauxlib.c: Likewise.
51 * script/lua/lauxlib.h: Likewise.
52 * script/lua/lbaselib.c: Likewise.
53 * script/lua/lcode.c: Likewise.
54 * script/lua/lcode.h: Likewise.
55 * script/lua/ldblib.c: Likewise.
56 * script/lua/ldebug.c: Likewise.
57 * script/lua/ldebug.h: Likewise.
58 * script/lua/ldo.c: Likewise.
59 * script/lua/ldo.h: Likewise.
60 * script/lua/ldump.c: Likewise.
61 * script/lua/lfunc.c: Likewise.
62 * script/lua/lfunc.h: Likewise.
63 * script/lua/lgc.c: Likewise.
64 * script/lua/lgc.h: Likewise.
65 * script/lua/linit.c: Likewise.
66 * script/lua/liolib.c: Likewise.
67 * script/lua/llex.c: Likewise.
68 * script/lua/llex.h: Likewise.
69 * script/lua/llimits.h: Likewise.
70 * script/lua/lmathlib.c: Likewise.
71 * script/lua/lmem.c: Likewise.
72 * script/lua/lmem.h: Likewise.
73 * script/lua/loadlib.c: Likewise.
74 * script/lua/lobject.c: Likewise.
75 * script/lua/lobject.h: Likewise.
76 * script/lua/lopcodes.c: Likewise.
77 * script/lua/lopcodes.h: Likewise.
78 * script/lua/loslib.c: Likewise.
79 * script/lua/lparser.c: Likewise.
80 * script/lua/lparser.h: Likewise.
81 * script/lua/lstate.c: Likewise.
82 * script/lua/lstate.h: Likewise.
83 * script/lua/lstring.c: Likewise.
84 * script/lua/lstring.h: Likewise.
85 * script/lua/lstrlib.c: Likewise.
86 * script/lua/ltable.c: Likewise.
87 * script/lua/ltable.h: Likewise.
88 * script/lua/ltablib.c: Likewise.
89 * script/lua/ltm.c: Likewise.
90 * script/lua/ltm.h: Likewise.
91 * script/lua/lua.h: Likewise.
92 * script/lua/luaconf.h: Likewise.
93 * script/lua/lualib.h: Likewise.
94 * script/lua/lundump.c: Likewise.
95 * script/lua/lundump.h: Likewise.
96 * script/lua/lvm.c: Likewise.
97 * script/lua/lvm.h: Likewise.
98 * script/lua/lzio.c: Likewise.
99 * script/lua/lzio.h: Likewise.
101 2009-05-16 Bean <bean123ch@gmail.com>
103 * include/grub/kernel.h (grub_module_header_types): Add type
106 * kern/main.c (grub_load_config): New function.
107 (grub_main): Call grub_load_config to read boot config.
109 * grub-mkimage (generate_image): New parameter config_path.
110 (options): New option --config.
111 (main): Parse --config option, and pass it to generate_image.
113 2009-05-14 Christian Franke <franke@computer.org>
115 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
116 This fixes build on Cygwin.
118 2009-05-14 Pavel Roskin <proski@gnu.org>
120 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
121 jump. This saves two bytes, so the typical case of 2 swapped
122 drives would fit 32 bytes.
124 2009-05-13 Pavel Roskin <proski@gnu.org>
126 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
127 grub_uint32_t to avoid a warning.
129 * loader/i386/linux.c (allocate_pages): When assigning
130 real_mode_mem, cast through grub_size_t to fix a warning. The
131 code already makes sure that the value would fit a pointer.
132 (grub_linux_setup_video): Cast render_target->data to
133 grub_size_t to fix a warning.
135 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
137 * commands/i386/pc/drivemap.c: New file - implement drivemap
139 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
140 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
142 2009-05-13 Pavel Roskin <proski@gnu.org>
144 * util/i386/pc/grub-setup.c (setup): Remove unused variable
145 embedding_area_exists.
147 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
149 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
150 it easier to understand / work with.
151 Improve warning messages for cases where there's no embedding area,
152 or when it is too small (or core.img too large).
154 2009-05-13 Pavel Roskin <proski@gnu.org>
156 * loader/i386/pc/multiboot2.c: Add necessary includes for
157 grub_multiboot2_real_boot().
159 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
160 PX record is always little-endian. We only need the lower 2
163 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
164 facilitate code reuse.
165 (grub_cpio_mount): Use "struct head", not a char buffer. This
166 fixes a warning reported by gcc 4.4.
168 * kernel/disk.c (grub_disk_read): Use void pointer for the
170 (grub_disk_write): Use const void pointer for the buffer.
171 Adjust all callers. Remove unnecessary casts.
173 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
175 * util/i386/pc/grub-install.in: Update copyright year.
177 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
181 * commands/gptsync.c: new file
182 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
183 (gptsync_mod_SOURCES): new variable
184 (gptsync_mod_CFLAGS): likewise
185 (gptsync_mod_LDFLAGS): likewise
186 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
188 (GRUB_PC_PARTITION_TYPE_HFS): likewise
189 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
190 * conf/i386-ieee1275.rmk: likewise
191 * conf/i386-pc.rmk: likewise
192 * conf/powerpc-ieee1275.rmk: likewise
194 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
198 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
199 (grub_dl_ref): likewise
201 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
203 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
204 split in two functions (one for msdos and one for gpt).
206 2009-05-08 Pavel Roskin <proski@gnu.org>
208 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
211 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
212 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
213 Initialize them with -1. Add sanity check for bad1. Eliminate
216 2009-05-08 David S. Miller <davem@davemloft.net>
218 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
220 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
222 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
225 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
227 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
228 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
230 2009-05-05 David S. Miller <davem@davemloft.net>
232 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
234 2009-05-05 Pavel Roskin <proski@gnu.org>
236 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
237 of grub_dl_ref() and grub_dl_unref().
238 * commands/parttool.c: Remove preprocessor conditionals around
239 grub_dl_ref() and grub_dl_unref().
240 * fs/affs.c: Likewise.
241 * fs/afs.c: Likewise.
242 * fs/cpio.c: Likewise.
243 * fs/ext2.c: Likewise.
244 * fs/fat.c: Likewise.
245 * fs/hfs.c: Likewise.
246 * fs/hfsplus.c: Likewise.
247 * fs/iso9660.c: Likewise.
248 * fs/jfs.c: Likewise.
249 * fs/minix.c: Likewise.
250 * fs/ntfs.c: Likewise.
251 * fs/reiserfs.c: Likewise.
252 * fs/sfs.c: Likewise.
253 * fs/udf.c: Likewise.
254 * fs/ufs.c: Likewise.
255 * fs/xfs.c: Likewise.
256 * include/grub/dl.h: Likewise.
257 * loader/xnu.c: Likewise.
259 2009-05-04 Pavel Roskin <proski@gnu.org>
261 * commands/acpi.c: Remove unused variable my_mod.
262 * partmap/amiga.c: Likewise.
263 * partmap/apple.c: Likewise.
264 * partmap/gpt.c: Likewise.
265 * partmap/pc.c: Likewise.
266 * partmap/sun.c: Likewise.
267 * term/gfxterm.c: Likewise.
268 * term/i386/pc/vesafb.c: Likewise.
269 * term/i386/pc/vga.c: Likewise.
271 2009-05-04 David S. Miller <davem@davemloft.net>
273 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
274 pointer args to grub_ieee1275_get_property().
276 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
278 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
279 devices, and do not traverse down under controller nodes.
281 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
282 (grub_ofdisk_open): Use it to un-escape "," characters.
283 * kern/disk.c (find_part_sep): New.
284 (grub_disk_open): Use it to find the first non-escaped ','
285 character in the disk name.
286 * util/ieee1275/devicemap.c (escape_of_path): New.
287 (grub_util_emit_devicemap_entry): Use it.
288 * util/sparc64/ieee1275/grub-install.in: Update script to
289 strip partition specifiers properly by not triggering on
290 '\' escaped ',' characters.
292 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
294 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
296 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
298 (linux_vesafb_modes): Add a lot of additional modes to the list (based
299 on documentation from Wikipedia).
301 2009-05-04 Pavel Roskin <proski@gnu.org>
303 * disk/ata.c: Spelling fixes.
304 * disk/raid.c: Likewise.
305 * disk/usbms.c: Likewise.
306 * disk/dmraid_nvidia.c: Likewise.
307 * kern/ieee1275/openfw.c: Likewise.
308 * kern/ieee1275/init.c: Likewise.
309 * kern/ieee1275/cmain.c: Likewise.
310 * boot/i386/pc/cdboot.S: Likewise.
311 * video/readers/png.c: Likewise.
312 * video/i386/pc/vbe.c: Likewise.
313 * fs/udf.c: Likewise.
314 * fs/hfs.c: Likewise.
315 * fs/reiserfs.c: Likewise.
316 * efiemu/runtime/efiemu.c: Likewise.
317 * efiemu/main.c: Likewise.
318 * efiemu/mm.c: Likewise.
319 * include/grub/elf.h: Likewise.
320 * include/grub/xnu.h: Likewise.
321 * include/grub/usbdesc.h: Likewise.
322 * include/grub/usb.h: Likewise.
323 * include/grub/script_sh.h: Likewise.
324 * include/grub/lib/LzmaEnc.h: Likewise.
325 * include/grub/efiemu/efiemu.h: Likewise.
326 * include/grub/command.h: Likewise.
327 * normal/menu.c: Likewise.
328 * normal/main.c: Likewise.
329 * normal/datetime.c: Likewise.
330 * bus/usb/uhci.c: Likewise.
331 * mmap/i386/uppermem.c: Likewise.
332 * mmap/mmap.c: Likewise.
333 * commands/acpi.c: Likewise.
334 * commands/test.c: Likewise.
335 * partmap/apple.c: Likewise.
336 * font/font.c: Likewise.
337 * loader/sparc64/ieee1275/linux.c: Likewise.
338 * loader/macho.c: Likewise.
339 * loader/i386/bsd_trampoline.S: Likewise.
340 * loader/i386/bsd.c: Likewise.
341 * loader/xnu.c: Likewise.
342 * term/i386/pc/vesafb.c: Likewise.
343 * term/usb_keyboard.c: Likewise.
344 * util/resolve.c: Likewise.
345 * util/getroot.c: Likewise.
347 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
349 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
351 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
353 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
356 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
358 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
359 parameter only available on BIOS.
361 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
363 Removed wrong semicolon in declaration
365 * grub/misc.h (grub_dprintf): remove semicolon
367 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
369 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
370 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
371 is done by grub_cmd_linux() now).
372 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
373 restore video to text mode.
374 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
375 indicates lack of "vga=" parameter. "vga=0" is mapped to
376 `GRUB_LINUX_VID_MODE_NORMAL'.
378 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
380 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
381 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
382 and `normal/script.c'. Add `kern/rescue_reader.c',
383 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
384 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
387 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
388 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
389 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
390 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
391 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
393 * Makefile.in: Remove duplicated 2008 in Copyright line.
395 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
397 * util/misc.c (grub_util_warn): New function. Emmits a warning
399 * include/grub/util/misc.h (grub_util_warn): New declaration.
401 * util/i386/pc/grub-install.in: Understand --force and pass it down
404 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
406 (setup): Improve error messages and add warnings when requested to
407 install in odd layouts. Refuse to install using blocklists unless
410 2009-05-04 martin f. krafft <madduck@madduck.net>
412 * disk/raid.c (grub_raid_scan_device): Improve debug message.
414 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
416 Updated copyright year
418 * fs/hfsplus.c: updated copyright year
420 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
424 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
425 in the space previously used by unused3
426 (grub_hfsplus_uuid): new function
427 (grub_hfsplus_fs): added uuid field
429 2009-05-03 Pavel Roskin <proski@gnu.org>
431 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
432 suppress warnings. It's no longer needed.
433 * disk/host.c: Likewise.
434 * disk/ata_pthru.c: Likewise.
435 * disk/loopback.c: Likewise.
436 * hook/datehook.c: Likewise.
437 * parttool/pcpart.c: Likewise.
438 * fs/i386/pc/pxe.c: Likewise.
439 * fs/ntfscomp.c: Likewise.
440 * efiemu/main.c: Likewise.
441 * mmap/mmap.c: Likewise.
442 * commands/crc.c: Likewise.
443 * commands/hexdump.c: Likewise.
444 * commands/hdparm.c: Likewise.
445 * commands/acpi.c: Likewise.
446 * commands/echo.c: Likewise.
447 * commands/minicmd.c: Likewise.
448 * commands/blocklist.c: Likewise.
449 * commands/memrw.c: Likewise.
450 * commands/loadenv.c: Likewise.
451 * commands/usbtest.c: Likewise.
452 * commands/lsmmap.c: Likewise.
453 * commands/boot.c: Likewise.
454 * commands/parttool.c: Likewise.
455 * commands/configfile.c: Likewise.
456 * commands/search.c: Likewise.
457 * commands/ieee1275/suspend.c: Likewise.
458 * commands/cat.c: Likewise.
459 * commands/i386/pc/pxecmd.c: Likewise.
460 * commands/i386/pc/play.c: Likewise.
461 * commands/i386/pc/halt.c: Likewise.
462 * commands/i386/pc/vbeinfo.c: Likewise.
463 * commands/i386/pc/vbetest.c: Likewise.
464 * commands/lspci.c: Likewise.
465 * commands/date.c: Likewise.
466 * commands/handler.c: Likewise.
467 * commands/ls.c: Likewise.
468 * commands/test.c: Likewise.
469 * commands/cmp.c: Likewise.
470 * commands/efi/loadbios.c: Likewise.
471 * commands/efi/fixvideo.c: Likewise.
472 * commands/halt.c: Likewise.
473 * commands/help.c: Likewise.
474 * commands/reboot.c: Likewise.
475 * hello/hello.c: Likewise.
476 * script/sh/main.c: Likewise.
477 * loader/xnu.c: Likewise.
478 * term/terminfo.c: Likewise.
479 * term/i386/pc/serial.c: Likewise.
480 * term/usb_keyboard.c: Likewise.
482 2009-05-03 David S. Miller <davem@davemloft.net>
484 * normal/menu.c: Include grub/parser.h
486 2009-05-03 Pavel Roskin <proski@gnu.org>
488 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
490 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
491 Suggested by Javier MartÃn <lordhabbit@gmail.com>
493 * util/i386/pc/grub-mkrescue.in: Allow for the case when
494 efiemu??.o doesn't exist.
495 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
498 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
500 FreeBSD 64-bit support
502 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
503 and loader/i386/bsd_trampoline.S
504 (bsd_mod_ASFLAGS): new variable
505 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
506 (FREEBSD_MODTYPE_KERNEL64): likewise
507 (grub_bsd64_trampoline_start): likewise
508 (grub_bsd64_trampoline_end): likewise
509 (grub_bsd64_trampoline_selfjump): likewise
510 (grub_bsd64_trampoline_gdt): likewise
511 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
512 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
513 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
514 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
515 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
517 * loader/i386/bsd_pagetable.c: new file
518 * loader/i386/bsd_trampoline.S: likewise
519 * loader/i386/bsd.c (ALIGN_QWORD): new macro
520 (ALIGN_VAR): likewise
521 (entry_hi): new variable
522 (kern_end_mdofs): likewise
524 (grub_freebsd_add_meta): use ALIGN_VAR
525 (grub_e820_mmap): new declaration
526 (grub_freebsd_add_mmap): new function
527 (grub_freebsd_add_meta_module): support 64 bit kernels
528 (grub_freebsd_list_modules): use ALIGN_VAR
529 (gdt_descriptor): new declaration
530 (grub_freebsd_boot): support 64 bit kernels
531 (grub_bsd_elf64_hook): new function
532 (grub_bsd_load_elf): support elf64
534 2009-05-03 Bean <bean123ch@gmail.com>
536 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
537 after we get the result of if statement.
539 2009-05-03 Bean <bean123ch@gmail.com>
541 * Makefile.in (enable_efiemu): New variable.
543 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
545 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
547 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
548 path, add -mno-red-zone option.
549 (efiemu64_s.o): Likewise.
550 (efiemu64.o): Use macro $^ for source file.
552 * configure.ac (--enable-efiemu): New option.
554 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
558 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
559 (pkglib_MODULES): add xnu.mod
560 (xnu_mod_SOURCES): new variable
561 (xnu_mod_CFLAGS): likewise
562 (xnu_mod_LDFLAGS): likewise
563 (xnu_mod_ASFLAGS): likewise
564 * conf/i386-pc.rmk: likewise
565 * conf/x86_64-efi.rmk: likewise
566 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
568 * include/grub/i386/macho.h: new file
569 * include/grub/i386/xnu.h: likewise
570 * include/grub/macho.h: likewise
571 * include/grub/machoload.h: likewise
572 * include/grub/x86_64/macho.h: likewise
573 * include/grub/x86_64/xnu.h: likewise
574 * include/grub/xnu.h: likewise
575 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
576 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
577 * loader/i386/efi/xnu.c: new file
578 * loader/i386/pc/xnu.c: likewise
579 * loader/i386/xnu.c: likewise
580 * loader/i386/xnu_helper.S: likewise
581 * loader/macho.c: likewise
582 * loader/xnu.c: likewise
583 * loader/xnu_resume.c: likewise
584 * util/grub-dumpdevtree: likewise
585 * include/grub/i386/pit.h: include grub/err.h
586 (grub_pit_wait): export
587 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
589 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
593 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
594 _linux_efi, linux_efi.
595 new files in grub-emu
596 new targets efiemu32.o and efiemu64.o
597 * loader/linux_normal_efiemu.c: likewise
598 * loader/i386/efi/linux.c: added preliminary efiemu support
599 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
601 * include/grub/autoefi.h: new file
602 * include/grub/i386/efiemu.h: likewise
603 * include/grub/i386/pc/efiemu.h: likewise
604 * include/grub/efi/api.h: add LL suffix when necessary
605 new definitions relating to tables
606 * include/grub/efiemu/efiemu.h: new file
607 * include/grub/efiemu/runtime.h: likewise
608 * efiemu/prepare.c: likewise
609 * efiemu/loadcore_common.c: likewise
610 * efiemu/loadcore64.c: likewise
611 * efiemu/runtime/efiemu.sh: likewise
612 * efiemu/runtime/efiemu.S: likewise
613 * efiemu/runtime/efiemu.c: likewise
614 * efiemu/runtime/config.h: likewise
615 * efiemu/prepare32.c: likewise
616 * efiemu/main.c: likewise
617 * efiemu/modules/pnvram.c: likewise
618 * efiemu/modules/i386: likewise
619 * efiemu/modules/i386/pc: likewise
620 * efiemu/modules/acpi.c: likewise
621 * efiemu/i386/pc/cfgtables.c: likewise
622 * efiemu/i386/loadcore64.c: likewise
623 * efiemu/i386/loadcore32.c: likewise
624 * efiemu/prepare64.c: likewise
625 * efiemu/loadcore.c: likewise
626 * efiemu/symbols.c: likewise
627 * efiemu/mm.c: likewise
628 * efiemu/loadcore32.c: likewise
630 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
634 * commands/acpi.c: new file
635 * commands/i386/pc/acpi.c: likewise
636 * commands/efi/acpi.c: likewise
637 * include/grub/acpi.h: likewise
638 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
639 (acpi_mod_SOURCES): new variable
640 (acpi_mod_CFLAGS): likewise
641 (acpi_mod_LDFLAGS): likewise
642 * conf/i386-efi.rmk: likewise
643 * conf/x86_64-efi.rmk: likewise
645 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
647 Missing part from mmap patch
649 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
650 (grub_mmap_unregister)
651 (grub_mmap_free_and_unregister): use grub_mmap_register
653 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
657 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
658 * loader/i386/linux.c (find_mmap_size): likewise
659 (allocate_pages): likewise
660 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
661 (grub_fill_multiboot_mmap): likewise
662 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
663 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
664 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
665 (OPENBSD_MMAP_RESERVED): likewise
666 * include/grub/i386/pc/memory.h: include grub/memory.h
667 (grub_lower_mem): removed
668 (grub_upper_mem): likewise
669 (GRUB_MACHINE_MEMORY_ACPI): new definition
670 (GRUB_MACHINE_MEMORY_NVS): likewise
671 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
672 (GRUB_MACHINE_MEMORY_HOLE): likewise
673 (grub_machine_mmap_register): likewise
674 (grub_machine_mmap_unregister): likewise
675 (grub_machine_get_upper): likewise
676 (grub_machine_get_lower): likewise
677 (grub_machine_get_post64): likewise
678 * include/grub/i386/efi/memory.h: new file
679 * include/grub/x86_64/efi/memory.h: likewise
680 * include/grub/efi/memory.h: likewise
681 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
682 (mmap_mod_SOURCES): new variable
683 (mmap_mod_LDFLAGS): likewise
684 (mmap_mod_ASFLAGS): likewise
685 * conf/i386-coreboot.rmk: likewise
686 * conf/i386-ieee1275.rmk: likewise
687 * conf/i386-efi.rmk: likewise
688 * conf/x86_64-efi.rmk: likewise
689 * include/grub/types.h (UINT_TO_PTR): new macro
690 (PTR_TO_UINT32): likewise
691 (PTR_TO_UINT64): likewise
692 * include/grub/memory.h: new file
693 * mmap/i386/pc/mmap.c: likewise
694 * mmap/i386/pc/mmap_helper.S: likewise
695 * mmap/i386/uppermem.c: likewise
696 * mmap/mmap.c: likewise
697 * mmap/efi/mmap.c: likewise
698 * kern/i386/coreboot/init.c (grub_machine_init): don't use
700 * kern/i386/pc/init.c (grub_lower_mem): removed variable
701 (grub_upper_mem): likewise
702 (grub_machine_init): don't use grub_upper_mem,
703 make grub_lower_mem local
704 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
705 grub_mmap_iterate and grub_mmap_get_upper
706 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
708 2009-05-02 Bean <bean123ch@gmail.com>
710 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
712 (pkglib_MODULES): Add normal.mod and sh.mod.
713 (normal_SOURCES): New variable.
714 (normal_mod_CFLAGS): Likewise.
715 (normal_mod_LDFLAGS): Likewise.
716 (sh_mod_SOURCES): Likewise.
717 (sh_mod_CFLAGS): Likewise.
718 (sh_mod_LDFLAGS): Likewise.
720 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
721 script/sh/lexer.c_DEPENDENCIES.
722 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
723 kern/rescue_reader.c and kern/rescue_parser.c.
724 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
725 (grub_emu_SOURCES): Change source files.
726 (pkglib_MODULES): Remove normal.mod.
727 (normal_SOURCES): Removed.
728 (normal_mod_CFLAGS): Likewise.
729 (normal_mod_LDFLAGS): Likewise.
730 * conf/i386-coreboot.rmk: Likewise.
731 * conf/i386-efi.rmk: Likewise.
732 * conf/i386-ieee1276.rmk: Likewise.
733 * conf/powerpc-ieee1275.rmk: Likewise.
734 * conf/sparc64-ieee1275.rmk: Likewise.
735 * conf/x86_64-efi.rmk: Likewise.
737 * include/grub/command.h (grub_command_execute): New inline function.
739 * include/grub/menu.h (grub_menu_entry): Removed commands field.
741 * include/grub/normal.h: Remove <grub/setjmp.h>.
742 (grub_fs_module_list): Moved to normal/autofs.c.
743 (grub_exit_env): Removed.
744 (grub_command_execute): Likewise.
745 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
747 (read_command_list): New function declaration.
748 (read_fs_list): Likewise.
750 * include/parser.h: Include <grub/reader.h>.
751 (grub_parser_split_cmdline): Change type of getline parameter.
752 (grub_parser): New structure.
753 (grub_parser_class): New variable.
754 (grub_parser_execute): New function declaration.
755 (grub_register_rescue_parser): Likewise.
756 (grub_parser_register): New inline function.
757 (grub_parser_unregister): Likewise.
758 (grub_parser_get_current): Likewise.
759 (grub_parser_set_current): Likewise.
761 * include/grub/reader.h: New file.
762 * kern/reader.c: Likewise.
763 * kern/rescue_parser.c: Likewise.
764 * kern/rescue_reader.c: Likewise.
765 * normal/autofs.c: Likewise.
766 * normal/dyncmd.c: Likewise.
768 * include/grub/rescue.h: Removed.
769 * normal/command.h: Likewise.
771 * include/grub/script.h: Moved to ...
772 * include/grub/script_sh.h: ... Moved here.
773 * normal/execute.c: Moved to ...
774 * script/sh/execute.c: ... Moved here.
775 * normal/function.c: Moved to ...
776 * script/sh/function.c: ... Moved here.
777 * normal/lexer.c: Moved to ...
778 * script/sh/lexer.c: ... Moved here.
779 * normal/parser.y: Moved to ...
780 * script/sh/parser.y: ... Moved here.
781 * normal/script.c: Moved to ...
782 * script/sh/script.c: ... Moved here.
784 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
786 (grub_exit_env): Removed.
787 (fs_module_list): Moved to normal/autofs.c.
788 (grub_file_getline): Don't handle comment here.
789 (free_menu): Skip removed field entry->commands.
790 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
792 (read_config_file): Removed nested parameter, change getline function.
793 (grub_enter_normal_mode): Removed.
794 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
795 (read_command_list): Likewise.
796 (autoload_fs_module): Moved to normal/autofs.c.
797 (read_fs_list): Likewise.
798 (reader_nested): New variable.
799 (grub_normal_execute): Run parser.sh to switch to sh parser.
800 (grub_cmd_rescue): Removed.
801 (cmd_normal): Removed.
802 (grub_cmd_normal): Unregister itself at the beginning. Don't register
804 (grub_cmdline_run): New function.
805 (grub_normal_reader_init): Likewise.
806 (grub_normal_read_line): Likewise.
807 (grub_env_write_pager): Likewise.
808 (cmdline): New variable.
809 (grub_normal_reader): Likewise.
810 (GRUB_MOD_INIT): Register normal reader and set as current, register
811 pager hook, register normal command with grub_register_command_prio,
812 so that it won't show up in command.lst.
813 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
814 grub_fs_autoload_hook.
816 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
817 (grub_menu_execute_entry): Replace grub_script_execute with
818 grub_parser_execute, change parameter to grub_command_execute.
820 * normal/menu_text.c: Remove <grub/script.h>.
822 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
824 (run): Change editor_getline to use new parser interface. Change
825 parameter to grub_command_execute.
827 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
828 <grub/reader.h> and <grub/parser.h>.
829 (grub_load_normal_mode): Execute normal command.
830 (grub_main): Call grub_register_core_commands,
831 grub_register_rescue_parser and grub_register_rescue_reader, use
832 grub_reader_loop to enter input loop.
834 * kern/parser.c (grub_parser_split_cmdline): Change type of
836 (grub_parser_class): New variable.
837 (grub_parser_execute): New function.
839 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
840 * loader/multiboot2.c: Likewise.
841 * loader/sparc64/ieee1275/linux.c: Likewise.
843 * util/grub-emu.c (read_command_list): New dummy function.
845 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
847 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
848 count to 16 for CCISS and IDA.
850 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
852 * normal/menu_text.c (grub_wait_after_message): Print a newline
853 after waiting for user input.
855 * loader/i386/linux.c: Include `<grub/normal.h>'.
856 (grub_cmd_linux): Improve the error message about `ask' mode, by
857 waiting for user input so it's not missed (we can do this, since
858 user requested interaction).
860 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
862 Added missing lst to grub-mkrescue
864 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
865 and ${input_dir}/parttool.lst
867 2009-04-30 David S. Miller <davem@davemloft.net>
869 * util/hostdisk.c (device_is_wholedisk): New function.
870 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
871 zero only if device_is_wholedisk() returns true.
873 * util/hostdisk.c (convert_system_partition_to_system_disk):
874 Handle virtual disk devices named /dev/vdiskX as found on sparc
877 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
878 lettered partition specifier is found, convert to numbered.
880 2009-04-29 David S. Miller <davem@davemloft.net>
882 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
883 * include/grub/sparc64/ieee1275/memory.h: Likewise.
885 * normal/command.c: Add missing newline at end of file.
887 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
889 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
890 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
891 grub_ofdisk_read): Likewise, and deal similarly with the fact that
892 ihandles have a 32-bit type but need to be stored in a "void *".
894 2009-04-28 Pavel Roskin <proski@gnu.org>
896 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
897 not disk. Adjust all dependencies.
898 (grub_fs_uuid_close): Use grub_device_close(), not
901 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
902 parent's partition, don't copy it by reference, as it gets freed
905 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
907 Preboot hooks support
909 * commands/boot.c (struct grub_preboot_t): new declaration
910 (preboots_head): new variable
911 (preboots_tail): likewise
912 (grub_loader_register_preboot_hook): new function
913 (grub_loader_unregister_preboot_hook): likewise
914 (grub_loader_set): launch preboot hooks
915 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
916 (grub_loader_register_preboot_hook): new declaration
917 (grub_loader_unregister_preboot_hook): likewise
919 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
923 * disk/scsi.c (grub_scsi_open): added missing cast when
926 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
928 Bug and warning fixes
930 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
932 * commands/test.c (test_parse): fixed bug with file tests and corrected
933 declaration of find_file
935 2009-04-26 Pavel Roskin <proski@gnu.org>
937 * Makefile.in: Don't install empty manual pages if help2man is
938 missing. Use help2man option for output, not shell redirection.
940 2009-04-26 David S. Miller <davem@davemloft.net>
942 * util/grub-mkdevicemap.c (make_device_map): Add missing
943 NESTED_FUNC_ATTR to process_device().
945 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
949 * commands/test.c: rewritten to use bash-like test
951 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
953 Parttool autoloading and improvements
955 * Makefile.in (pkglib_DATA): add parttool.lst
956 (parttool.lst): new target
957 * genmk.rb: generate parttool-*
958 (CLEANFILES): add #{parttool}
959 (PARTTOOLFILES): new variable
960 * genparttoollist.sh: new file
961 * parttool/pcpart.c (grub_pcpart_boot): more feedback
962 (grub_pcpart_type): likewise
963 * commands/parttool.c (helpmsg): new variable
964 (grub_cmd_parttool): output help if not enough arguments are supplied
966 (GRUB_MOD_INIT(parttool)): use helpmsg
968 2009-04-24 David S. Miller <davem@davemloft.net>
970 Avoiding opening same device multiple times in device iterator.
972 * kern/device.c: (grub_device_iterate): Define struct part_ent,
973 and use it to build a list of partitions in iterate_disk() and
976 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
979 * disk/ieee1275/nand.c (grub_nand_iterate): Return
980 grub_devalias_iterate() result instead of unconditional 0.
981 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
982 Also, capture hook return value, either directly or via
983 grub_children_iterate(), and propagate to caller.
984 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
985 grub_children_iterate): Return value is now 'int' instead of
987 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
988 like a proper iterator, stopping when hooks return non-zero.
989 (grub_devalias_iterate): Likewise.
991 2009-04-23 David S. Miller <davem@davemloft.net>
993 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
995 2009-04-22 David S. Miller <davem@davemloft.net>
997 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
998 is larger than address_cells, use that value for address_cells too.
1000 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1001 IEEE1275_MAX_PATH_LEN): Define.
1002 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1003 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1004 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1005 'devtype'. Explicitly NULL terminate devalias expansion.
1007 * util/sparc64/ieee1275/misc.c: New file.
1008 * util/sparc64/ieee1275/grub-setup.c: New file.
1009 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1010 * util/sparc64/ieee1275/grub-mkimage.c: New file.
1011 * util/sparc64/ieee1275/grub-install.in: New file.
1012 * util/ieee1275/ofpath.c: New file.
1013 * util/ieee1275/devicemap.c: New file.
1014 * util/devicemap.c: New file.
1015 * util/deviceiter.c: New file.
1016 * kern/sparc64/ieee1275/init.c: New file.
1017 * include/grub/util/ofpath.h: New file.
1018 * include/grub/util/deviceiter.h: New file.
1019 * util/grub-mkdevicemap.c: Include deviceiter.h.
1020 Implement using grub_util_emit_devicemap_entry and
1021 grub_util_iterate_devices.
1022 * conf/i386-corebook.rmk: Build util/deviceiter.c and
1023 util/devicemap.c into grub-mkdevicemap
1024 * conf/i386-efi.rmk: Likewise.
1025 * conf/i386-ieee1275.rmk: Likewise.
1026 * conf/i386-pc.rmk: Likewise.
1027 * conf/powerpc-ieee1275.rmk: Likewise.
1028 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1029 images and installation utilities. Build kernel as image
1030 instead of as elf binary. Use common rules as much as possible.
1032 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
1034 Correct GPT definition
1036 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1039 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
1041 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1043 2009-04-19 David S. Miller <davem@davemloft.net>
1045 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1046 (grub_rescue_cmd_linux): Rename to...
1047 (grub_cmd_linux): and fix prototype.
1048 (grub_rescue_cmd_initrd): Rename to...
1049 (grub_cmd_initrd): and fix prototype.
1050 (cmd_linux, cmd_initrd): New.
1051 (GRUB_MOD_INIT(linux)): Use grub_register_command().
1052 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1054 2009-04-17 Pavel Roskin <proski@gnu.org>
1056 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1058 (grub_ohci_transfer): Likewise.
1060 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1062 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1063 return without a value. Fix inconsistent indentation.
1065 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1066 match struct grub_fs.
1068 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1069 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1070 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1071 * commands/lspci.c (grub_lspci_iter): Likewise.
1073 2009-04-16 Bean <bean123ch@gmail.com>
1075 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1078 2009-04-15 Pavel Roskin <proski@gnu.org>
1080 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1081 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
1082 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1085 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1087 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1088 that no multiple data or metadata areas are supported and `Unknown
1091 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1093 Move loader out of the kernel
1095 * kern/loader.c: moved to ...
1096 * commands/boot.c: ... moved here
1097 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1098 * commands/boot.c (grub_cmd_boot): moved here. All users updated
1099 * include/grub/kernel.h (grub_machine_fini): export
1100 * include/grub/loader.h (grub_loader_is_loaded): update declaration
1101 (grub_loader_set): likewise
1102 (grub_loader_unset): likewise
1103 (grub_loader_boot): likewise
1104 * conf/common.rmk: new module boot.mod
1105 (pkglib_MODULES): add boot.mod
1106 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1107 (grub_emu_SOURCES): likewise
1108 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1109 (grub_emu_SOURCES): likewise
1110 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1111 (grub_emu_SOURCES): likewise
1112 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1113 (grub_emu_SOURCES): likewise
1114 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1115 (grub_emu_SOURCES): likewise
1116 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1117 (grub_emu_SOURCES): likewise
1118 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1119 (grub_emu_SOURCES): likewise
1121 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1123 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1125 * kern/misc.c (grub_itoa): Removed function
1126 (grub_ltoa): likewise
1127 (grub_vsprintf): use grub_lltoa
1129 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
1133 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1134 * conf/i386-coreboot.rmk: likewise
1135 * conf/i386-ieee1275.rmk: likewise
1136 * conf/powerpc-ieee1275.rmk: likewise
1138 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
1140 * INSTALL: Add that `./autogen.sh' needs to be run before
1143 2009-04-14 Bean <bean123ch@gmail.com>
1145 * Makefile.in (pkglib_DATA): Add handler.lst.
1146 (handler.lst): New rule.
1148 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1149 * conf/i386-coreboot.rmk: Likewise.
1150 * conf/i386-ieee1275.rmk: Likewise.
1151 * conf/i386-efi.rmk: Likewise.
1152 * conf/x86_64-efi.rmk: Likewise.
1153 * conf/powerpc-ieee1275.rmk: Likewise.
1154 * conf/sparc64-ieee1275.rmk: Likewise.
1156 * genhandlerlist.sh: New file.
1158 * genmk.rb: Add rules to generate handler.lst.
1160 * include/grub/normal.h (grub_file_getline): New function definition.
1161 (read_handler_list): Likewise.
1162 (free_handler_list): Likewise.
1164 * include/grub/term.h (grub_term_register_input): Add name parameter
1165 for auto generation of handler.lst.
1166 (grub_term_register_output): Likewise.
1168 * normal/handler.c: New file.
1170 * normal/main.c (get_line): Renamed to grub_file_getline.
1171 (read_config_file): Use the newly renamed grub_file_getline.
1172 (read_command_list): Likewise.
1173 (read_fs_list): Likewise.
1174 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1175 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1177 * term/efi/console.c (grub_console_init): Add name parameter for auto
1178 generation of handler.lst.
1179 * term/gfxterm.c: Likewise.
1180 * term/i386/pc/at_keyboard.c: Likewise.
1181 * term/i386/pc/console.c: Likewise.
1182 * term/i386/pc/serial.c: Likewise.
1183 * term/i386/pc/vesafb.c: Likewise.
1184 * term/i386/pc/vga.c: Likewise.
1185 * term/i386/pc/vga_text.c: Likewise.
1186 * term/ieee1275/ofconsole.c: Likewise.
1187 * term/usb_keyboard.c: Likewise.
1189 2009-04-14 Bean <bean123ch@gmail.com>
1191 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1192 properly with null character.
1194 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1196 * configure: Remove.
1197 * config.h.in: Likewise.
1198 * stamp-h.in: Likewise.
1199 * DISTLIST: Likewise.
1200 * conf/common.mk: Likewise.
1201 * conf/i386-coreboot.mk: Likewise.
1202 * conf/i386-efi.mk: Likewise.
1203 * conf/i386-ieee1275.mk: Likewise.
1204 * conf/i386.mk: Likewise.
1205 * conf/i386-pc.mk: Likewise.
1206 * conf/powerpc-ieee1275.mk: Likewise.
1207 * conf/sparc64-ieee1275.mk: Likewise.
1208 * conf/x86_64-efi.mk: Likewise.
1210 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1213 2009-04-14 John Stanley <jpsinthemix@verizon.net>
1214 David S. Miller <davem@davemloft.net>
1216 * util/hostdisk.c (make_device_name): Fix buffer length
1219 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1221 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1222 <sys/param.h> and <sys/sysctl.h>.
1223 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1224 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1225 opening the device and reset them afterwards.
1227 2009-04-13 Pavel Roskin <proski@gnu.org>
1229 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1230 Reported by John Stanley <jpsinthemix@verizon.net>
1232 2009-04-13 Robert Millan <rmh@aybabtu.com>
1234 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1235 that name for menuentries when appropriate.
1237 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1239 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1241 2009-04-13 Robert Millan <rmh@aybabtu.com>
1243 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1244 to Linux, simply abort telling the user it's no longer supported.
1246 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1248 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1249 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
1250 `freebsd_loadenv' only when devices.hints exist.
1252 2009-04-13 Pavel Roskin <proski@gnu.org>
1254 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1256 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1258 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1260 (grub_drive): Likewise.
1262 2009-04-13 David S. Miller <davem@davemloft.net>
1264 * kern/sparc64/ieee1275/ieee1275.c: New file.
1265 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1266 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1267 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1268 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1269 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1270 grub_ieee1275_alloc_physmem): Declare new exported functions.
1272 * include/grub/sparc64/ieee1275/loader.h: New file.
1273 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1274 * include/grub/sparc64/kernel.h: Likewise.
1275 * loader/sparc64/ieee1275/linux.c: Likewise.
1277 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1278 (grub_fstest_SOURCES): Likewise.
1280 * util/hostdisk.c (make_device_name): Do not make any assumptions
1281 about the length of drive names.
1283 * kern/dl.c (grub_dl_load_file): Close file immediately when
1284 we are done using it.
1286 2009-04-12 David S. Miller <davem@davemloft.net>
1288 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1289 values. Noticed by Pavel Roskin.
1291 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1294 * genmk.rb: Add more flexible image type specification, also
1295 pass --strip-unneeded to objcopy.
1296 * conf/i386-pc.rmk: Use *_FORMAT.
1297 * conf/i386-pc.mk: Rebuilt.
1299 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1300 (OFDISK_HASH_SZ): Define.
1301 (ofdisk_hash): New hash table.
1302 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1303 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1304 instead of device phandle which is not unique.
1306 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1307 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1308 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1309 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1310 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1311 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1312 GRUB_KERNEL_MACHINE_DATA_END): Define.
1313 (grub_kernel_image_size, grub_total_module_size): Declare.
1315 2009-04-12 Pavel Roskin <proski@gnu.org>
1317 * configure.ac: Change the logic when we check for target tools.
1318 Do it when the target is specified and it's different from the
1319 specified value of the host.
1321 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1323 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1324 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1325 GNU/kFreeBSD. Check if a device is a character device. Use
1326 DIOCGMEDIASIZE to get the size.
1327 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1328 support for GNU/kFreeBSD.
1329 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1330 is a character device instead of a block device. Add support for
1331 FreeBSD device names.
1333 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1334 is a character device instead of a block device.
1336 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1337 is a character device instead of a block device.
1339 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1341 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1342 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1343 FreeBSD. Check if a device is a character device. Use
1344 DIOCGMEDIASIZE to get the size.
1345 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1346 support for FreeBSD.
1347 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1348 is a character device instead of a block device. Add support for
1349 FreeBSD device names.
1351 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1352 a character device instead of a block device.
1353 (grub_util_check_char_device): New function.
1355 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1356 a character device instead of a block device.
1358 * include/grub/util/getroot.h (grub_util_check_char_device): New
1361 2009-04-11 David S. Miller <davem@davemloft.net>
1363 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1365 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1366 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1367 function, if present.
1368 (__bswapdi2): Likewise.
1370 * include/grub/sparc64/ieee1275/boot.h: New file.
1371 * boot/sparc64/ieee1275/boot.S: Likewise.
1372 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1374 * kern/misc.c (grub_ltoa): New function.
1375 (grub_vsprintf): Use it to format 'long' integers.
1377 2009-04-10 David S. Miller <davem@davemloft.net>
1379 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1380 slots are of type grub_ieee1275_cell_t.
1381 (grub_nand_read): Likewise.
1382 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1383 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1384 macros are used to compare values in arg/ret block of the call.
1385 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1386 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1387 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1388 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1389 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1390 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1391 grub_ieee1275_close, grub_ieee1275_set_property,
1392 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1393 grub_ieee1275_cell_t.
1394 * kern/ieee1275/openfw.c (grub_map): Likewise.
1395 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1396 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1398 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1399 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1400 (grub_devalias_iterate): Likewise.
1402 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
1406 * fs/ufs.c (INODE_NBLOCKS): new definition
1407 (struct grub_ufs_dirent): added fields for non-BSD dirents
1408 (grub_ufs_get_file_block): fixed double indirect handling
1409 (grub_ufs_lookup_symlink): use more robust way to determine whether
1411 (grub_ufs_find_file): support for non-BSD dirents
1412 (grub_ufs_dir): support for non-BSD dirents
1414 2009-04-10 Bean <bean123ch@gnail.com>
1416 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1417 attribute, otherwise the size would be wrong for i386 platform.
1419 * include/grub/pci.h (grub_pci_read_word): New inline function.
1420 (grub_pci_read_byte): Likewise.
1421 (grub_pci_write): Likewise.
1422 (grub_pci_write_word): Likewise.
1423 (grub_pci_write_byte): Likewise.
1425 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1427 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1428 (find_framebuf): Scan pci to locate the frame buffer address.
1430 * commands/efi/fixvideo.c: New file.
1432 * commands/efi/loadbios.c: Likewise.
1434 * commands/memrw.c: Likewise.
1436 * util/grub-dumpbios.in: Likewise.
1438 * conf/common.rmk (grub-dumpbios): New utility.
1439 (pkglib_MODULES): New module memrw.mod.
1440 (memrw_mod_SOURCE): New macro.
1441 (memrw_mod_CFLAGS): Likewise.
1442 (memrw_mod_LDFLAGS): Likewise.
1444 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1446 (loadbios_mod_SOURCE): New macro.
1447 (loadbios_mod_CFLAGS): Likewise.
1448 (loadbios_mod_LDFLAGS): Likewise.
1449 (fixvideo_mod_SOURCE): Likewise.
1450 (fixvideo_mod_CFLAGS): Likewise.
1451 (fixvideo_mod_LDFLAGS): Likewise.
1453 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1455 (loadbios_mod_SOURCE): New macro.
1456 (loadbios_mod_CFLAGS): Likewise.
1457 (loadbios_mod_LDFLAGS): Likewise.
1458 (fixvideo_mod_SOURCE): Likewise.
1459 (fixvideo_mod_CFLAGS): Likewise.
1460 (fixvideo_mod_LDFLAGS): Likewise.
1462 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
1464 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1466 2009-04-07 David S. Miller <davem@davemloft.net>
1468 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1469 support for R_SPARC_OLO10 relocations. Fix compile warning for
1470 R_SPARC_WDISP30 case.
1471 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1473 2009-04-06 Pavel Roskin <proski@gnu.org>
1475 * include/grub/misc.h (ARRAY_SIZE): New macro.
1476 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1478 * loader/i386/linux.c (allocate_pages): Use free_pages().
1479 (grub_linux_unload): Don't use free_pages().
1480 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1481 wrong index. Treat all other modes as text modes.
1482 (grub_cmd_linux): Initialize vid_mode unconditionally to
1483 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1485 * commands/help.c (print_command_help): Use cmd->prio, not
1486 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1488 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
1492 * parttool/pcpart.c: new file
1493 * commands/parttool.c: likewise
1494 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1495 (parttool_mod_SOURCES): new variable
1496 (parttool_mod_CFLAGS): likewise
1497 (parttool_mod_LDFLAGS): likewise
1498 (pcpart_mod_SOURCES): likewise
1499 (pcpart_mod_CFLAGS): likewise
1500 (pcpart_mod_LDFLAGS): likewise
1501 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1502 and parttool/pcpart.c
1503 * conf/i386-efi.rmk: likewise
1504 * conf/i386-ieee1275.rmk: likewise
1505 * conf/i386-pc.rmk: likewise
1506 * conf/powerpc-ieee1275.rmk: likewise
1507 * conf/sparc64-ieee1275.rmk: likewise
1508 * conf/x86_64-ieee1275.rmk: likewise
1510 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1512 Support for mtime and further expandability of dir command
1514 * include/grub/lib/datetime.h: moved to ...
1515 * include/grub/datetime.h: ... moved here and added
1516 declaration of grub_unixtime2datetime. All users updated
1517 * include/grub/fs.h: new syntax for dir and mtime functions in
1519 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1520 and GRUB_FSHELP_FLAGS_MASK
1521 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1522 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1523 (grub_ext2_mtime): new function
1524 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1525 (grub_hfsplus_mtime): new function
1526 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1527 (GRUB_UFS_ATTR_FILE): likewise
1528 (GRUB_UFS_ATTR_LNK): likewise
1529 (struct grub_ufs_sblock): new fields mtime
1530 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1532 (grub_ufs_dir): mtime support
1533 (grub_ufs_mtime): new function
1534 * fs/affs.c (grub_affs_dir): use new dir syntax
1535 * fs/afs.c (grub_afs_dir): likewise
1536 * fs/cpio.c (grub_cpio_dir): likewise
1537 * fs/fat.c (grub_fat_find_dir): likewise
1538 * fs/hfs.c (grub_hfs_dir): likewise
1539 * fs/iso9660.c (grub_iso9660_dir): likewise
1540 * fs/jfs.c (grub_jfs_dir): likewise
1541 * fs/minix.c (grub_minix_dir): likewise
1542 * fs/ntfs.c (grub_ntfs_dir): likewise
1543 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1544 * fs/sfs.c (grub_sfs_dir): likewise
1545 * fs/xfs.c (grub_xfs_dir): likewise
1546 * util/hostfs.c (grub_hostfs_dir): likewise
1547 * lib/datetime.c: moved to ...
1548 * normal/datetime.c: ... moved here
1549 (grub_unixtime2datetime): new function
1550 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1551 * normal/completion.c (iterate_dir): use new dir syntax
1552 * normal/misc.c (grub_normal_print_device_info): tell the
1553 last modification time of a volume
1554 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1555 * conf/common.rmk: added lib/datetime.c to ls.mod
1556 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1557 (normal_mod_SOURCES): likewise
1558 (datetime_mod_SOURCES): Removed lib/datetime.c
1559 * conf/i386-efi.rmk: likewise
1560 * conf/i386-ieee1275.rmk: likewise
1561 * conf/i386-pc.rmk: likewise
1562 * conf/powerpc-ieee1275.rmk: likewise
1563 * conf/sparc64-ieee1275.rmk: likewise
1564 * conf/x86_64-efi.rmk: likewise
1566 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1568 Trim trailing spaces in FAT label and support mtools-like labels
1570 * fs/fat.c (grub_fat_iterate_dir): New function based
1571 on grub_fat_find_dir
1572 (grub_fat_find_dir): use grub_fat_iterate_dir
1573 (grub_fat_label): likewise
1575 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1577 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1579 remove extraneous kernel_elf_HEADERS
1581 2009-04-04 Bean <bean123ch@gnail.com>
1583 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1585 * util/misc.c: Likewise.
1587 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1589 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1590 instead of grub_printf.
1592 2009-04-03 Robert Millan <rmh@aybabtu.com>
1594 * loader/i386/linux.c (grub_linux_setup_video): Fill
1595 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1596 values from `mode info' structure instead of hardcoded
1599 2009-04-01 Pavel Roskin <proski@gnu.org>
1601 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1603 * genmk.rb: Likewise.
1604 * configure.ac: Likewise.
1606 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1608 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1609 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1611 2009-04-01 David S. Miller <davem@davemloft.net>
1613 * normal/sparc64/setjmp.S: Fix setjmp implementation.
1614 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1615 (grub_setjmp): Mark with 'returns_twice' attribute.
1616 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1617 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1618 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1620 2009-04-01 Robert Millan <rmh@aybabtu.com>
1622 Reapply fix from 2008-07-28 which was accidentally reverted; also
1623 perform the same fix to a similar check in same function.
1625 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1626 with the same number are found, just use issue a warning with
1627 grub_dprintf(), as this error has been reported to be non-fatal.
1629 2009-03-31 Pavel Roskin <proski@gnu.org>
1631 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1632 for cross-compilation.
1634 2009-03-30 Robert Millan <rmh@aybabtu.com>
1636 Fix i386-ieee1275 build.
1638 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1641 2009-03-30 Pavel Roskin <proski@gnu.org>
1643 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1644 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1645 zero-terminated, rely only on the strlen value. Fix comparison
1646 of strings differing in length.
1648 2009-03-30 Robert Millan <rmh@aybabtu.com>
1650 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1651 checking for abi version. Improve error messages on BIOS to notify
1652 user about `linux16' command.
1654 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1658 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1659 in case of collision
1660 * disk/scsi.c (grub_scsi_open): free scsi in case of error
1662 2009-03-29 Robert Millan <rmh@aybabtu.com>
1664 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1665 set `vid_mode' accordingly.
1666 (grub_linux_boot): Process `vid_mode' and set video mode.
1668 2009-03-29 Robert Millan <rmh@aybabtu.com>
1670 * util/grub.d/10_linux.in (linux_entry): New function.
1671 Factorize generation of Linux boot entries.
1673 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1675 Make the format of Environment Block plain text. The boot loader
1676 part is not tested well yet.
1678 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1681 (usage): Remove "info" and "clear". Add "unset". Update the
1682 description of "set", as this does not delete variables any
1684 (create_envblk_file): Complete rewrite.
1685 (open_envblk_file): Likewise.
1686 (cmd_info): Removed.
1687 (cmd_list): Likewise.
1688 (cmd_set): Likewise.
1689 (cmd_clear): Likewise.
1690 (list_variables): New function.
1691 (write_envblk): Likewise.
1692 (set_variables): Likewise.
1693 (unset_variables): Likewise.
1694 (main): Complete rewrite.
1696 * commands/loadenv.c (buffer): Removed.
1698 (open_envblk_file): New function.
1699 (read_envblk_file): Complete rewrite.
1700 (grub_cmd_load_env): Likewise.
1701 (grub_cmd_list_env): Likewise.
1702 (struct blocklist): New struct.
1703 (free_blocklists): New function.
1704 (check_blocklists): Likewise.
1705 (write_blocklists): Likewise.
1706 (grub_cmd_save_env): Complete rewrite.
1708 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1709 a plain text signature.
1710 (GRUB_ENVBLK_MAXLEN): Removed.
1711 (struct grub_envblk): Complete rewrite.
1712 (grub_envblk_find): Removed.
1713 (grub_envblk_insert): Likewise.
1714 (grub_envblk_open): New prototype.
1715 (grub_envblk_set): Likewise.
1716 (grub_envblk_delete): Put const to VALUE.
1717 (grub_envblk_iterate): Put const to NAME and VALUE.
1718 (grub_envblk_close): New prototype.
1719 (grub_envblk_buffer): New inline function.
1720 (grub_envblk_size): Likewise.
1722 * lib/envblk.c: Include grub/mm.h.
1723 (grub_env_find): Removed.
1724 (grub_envblk_open): New function.
1725 (grub_envblk_close): Likewise.
1726 (escaped_value_len): Likewise.
1727 (find_next_line): Likewise.
1728 (grub_envblk_insert): Removed.
1729 (grub_envblk_set): New function.
1730 (grub_envblk_delete): Complete rewrite.
1731 (grub_envblk_iterate): Likewise.
1733 2009-03-28 Robert Millan <rmh@aybabtu.com>
1735 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1736 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1737 variables. Use 16-bit loader.
1738 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1740 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1741 (grub_linux16_boot): ... this. Update all users.
1742 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1743 (grub_linux_boot): ... this. Update all users.
1745 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1746 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1747 commands to `linux16' and `initrd16'.
1748 (GRUB_MOD_FINI(linux)): Rename to ...
1749 (GRUB_MOD_FINI(linux16)): ... this.
1751 2009-03-24 Pavel Roskin <proski@gnu.org>
1753 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1754 not just for compilation.
1756 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1758 Move multiboot helper out of kernel
1760 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1761 `loader/i386/multiboot_helper.S'.
1762 * conf/i386-coreboot.rmk: Likewise
1763 * conf/i386-ieee1275.rmk: Likewise
1765 * kern/i386/loader.S: Move multiboot helpers from here...
1766 * loader/i386/multiboot_helper.S: ...moved here
1767 * include/grub/i386/loader.h: Move declarations of multiboot
1768 helpers from here...
1769 * include/grub/i386/multiboot.h: ...moved here
1770 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1772 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1774 * kern/env.c (grub_env_context_open): Added an argument to specify
1775 whether a new context inherits exported variables from current
1776 one. This is useful when making a sandbox to interpret a config
1778 All callers updated.
1780 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1782 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1784 * kern/env.c (grub_env_context_close): Fix memory leaks.
1786 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1788 * normal/main.c (grub_normal_execute): Added an argument
1789 BATCH to specify if an interactive interface should be provided
1790 after reading a config file.
1791 All callers updated.
1792 (read_command_list): Prevent being executed twice.
1793 (read_fs_list): Likewise.
1795 * include/grub/normal.h (grub_normal_execute): Updated the
1798 2009-03-22 Pavel Roskin <proski@gno.org>
1800 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1802 * kern/i386/pc/startup.S: Likewise.
1803 * kern/i386/efi/startup.S: Likewise.
1804 * kern/i386/ieee1275/startup.S: Likewise.
1805 * kern/i386/coreboot/startup.S: Likewise.
1806 * kern/x86_64/efi/startup.S: Likewise.
1808 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1809 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1810 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1812 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1814 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1816 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1818 Use vaddr of correct segment for entry_point.
1820 2009-03-21 Bean <bean123ch@gmail.com>
1822 * commands/blocklist.c: Add include file <grub/command.h>, remove
1823 <grub/normal.h> and <grub/arg.h>.
1824 (grub_cmd_blocklist): Use the new command interface.
1825 (GRUB_MOD_INIT): Likewise.
1826 (GRUB_MOD_FINI): Likewise.
1827 * commands/boot.c: Likewise.
1828 * commands/cat.c: Likewise.
1829 * commands/cmp.c: Likewise.
1830 * commands/configfile.c: Likewise.
1831 * commands/crc.c: Likewise.
1832 * commands/echo.c: Likewise.
1833 * commands/halt.c: Likewise.
1834 * commands/handler.c: Likewise.
1835 * commands/hdparm.c: Likewise.
1836 * commands/help.c: Likewise.
1837 * commands/hexdump.c: Likewise.
1838 * commands/loadenv.c: Likewise.
1839 * commands/ls.c: Likewise.
1840 * commands/lsmmap.c: Likewise.
1841 * commands/lspci.c: Likewise.
1842 * commands/loadenv.c: Likewise.
1843 * commands/read.c: Likewise.
1844 * commands/reboot.c: Likewise.
1845 * commands/search.c: Likewise.
1846 * commands/sleep.c: Likewise.
1847 * commands/test.c: Likewise.
1848 * commands/usbtest.c: Likewise.
1849 * commands/videotest.c: Likewise.
1850 * commands/i386/cpuid.c: Likewise.
1851 * commands/i386/pc/halt.c: Likewise.
1852 * commands/i386/pc/play.c: Likewise.
1853 * commands/i386/pc/pxecmd.c: Likewise.
1854 * commands/i386/pc/vbeinfo.c: Likewise.
1855 * commands/i386/pc/vbetest.c: Likewise.
1856 * commands/ieee1275/suspend.c: Likewise.
1857 * disk/loopback.c: Likewise.
1858 * font/font_cmd.c: Likewise.
1859 * hello/hello.c: Likewise.
1860 * loader/efi/appleloader.c: Likewise.
1861 * loader/efi/chainloader.c: Likewise.
1862 * loader/i386/bsd.c: Likewise.
1863 * loader/i386/efi/linux.c: Likewise.
1864 * loader/i386/ieee1275/linux.c: Likewise.
1865 * loader/i386/linux.c: Likewise.
1866 * loader/i386/pc/chainloader.c: Likewise.
1867 * loader/i386/pc/linux.c: Likewise.
1868 * loader/powerpc/ieee1275/linux.c: Likewise.
1869 * loader/multiboot_loader.c: Likewise.
1870 * term/gfxterm.c: Likewise.
1871 * term/i386/pc/serial.c: Likewise.
1872 * term/terminfo.c: Likewise.
1874 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1875 * term/i386/pc/vga.c: Likewise.
1876 * video/readers/jpeg.c: Likewise.
1877 * video/readers/png.c: Likewise.
1878 * video/readers/tga.c: Likewise.
1880 * util/grub-fstest (cmd_loopback): Removed.
1881 (cmd_blocklist): Likewise.
1883 (grub_register_command): Likewise.
1884 (grub_unregister_command): Likewise.
1885 (execute_command): Use grub_command_find to locate command and execute
1888 * include/grub/efi/chainloader.h: Removed.
1889 * loader/efi/chainloader_normal.c: Likewise.
1890 * loader/i386/bsd_normal.c: Likewise.
1891 * loader/i386/pc/chainloader_normal.c: Likewise.
1892 * loader/i386/pc/multiboot_normal.c: Likewise.
1893 * loader/linux_normal.c: Likewise.
1894 * loader/multiboot_loader_normal.c: Likewise.
1895 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1897 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1898 and grub_register_command_p1.
1900 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1901 kern/command.c, lib/arg.c and commands/extcmd.c.
1902 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1903 (minicmd_mod_SOURCES): New variable.
1904 (minicmd_mod_CFLAGS): Likewise.
1905 (minicmd_mod_LDFLAGS): Likewise.
1906 (extcmd_mod_SOURCES): Likewise.
1907 (extcmd_mod_CFLAGS): Likewise.
1908 (extcmd_mod_LDFLAGS): Likewise.
1909 (boot_mod_SOURCES): Removed.
1910 (boot_mod_CFLAGS): Likewise.
1911 (boot_mod_LDFLAGS): Likewise.
1913 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1915 (kernel_img_HEADERS): Add command.h.
1916 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1917 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1919 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1920 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1921 remove the corresponding normal mode command.
1922 (normal_mod_SOURCES): Remove normal/arg.c.
1923 * conf/i386-coreboot.rmk: Likewise.
1924 * conf/i386-efi.rmk: Likewise.
1925 * conf/i386-ieee1275.rmk: Likewise.
1926 * conf/powerpc-ieee1275.rmk: Likewise.
1927 * conf/x86_64-efi.rmk: Likewise.
1929 * include/grub/arg.h: Move from here ...
1930 * include/grub/lib/arg.h: ... to here.
1932 * normal/arg.c: Move from here ...
1933 * lib/arg.c: ... to here.
1935 * commands/extcmd.c: New file.
1936 * commands/minicmd.c: Likewise.
1937 * include/grub/command.h: Likewise.
1938 * include/grub/extcmd.h: Likewise.
1939 * kern/command.c: Likewise.
1940 * kern/corecmd.c: Likewise.
1942 * kern/list.c (grub_list_iterate): Return int instead of void.
1943 (grub_list_insert): New function.
1944 (grub_prio_list_insert): Likewise.
1946 * kern/rescue.c (grub_rescue_command): Removed.
1947 (grub_rescue_command_list): Likewise.
1948 (grub_rescue_register_command): Likewise.
1949 (grub_rescue_unregister_command): Likewise.
1950 (grub_rescue_cmd_boot): Move to minicmd.c
1951 (grub_rescue_cmd_help): Likewise.
1952 (grub_rescue_cmd_info): Likewise.
1953 (grub_rescue_cmd_boot): Likewise.
1954 (grub_rescue_cmd_testload): Likewise.
1955 (grub_rescue_cmd_dump): Likewise.
1956 (grub_rescue_cmd_rmmod): Likewise.
1957 (grub_rescue_cmd_lsmod): Likewise.
1958 (grub_rescue_cmd_exit): Likewise.
1959 (grub_rescue_print_devices): Moved to corecmd.c.
1960 (grub_rescue_print_files): Likewise.
1961 (grub_rescue_cmd_ls): Likewise.
1962 (grub_rescue_cmd_insmod): Likewise.
1963 (grub_rescue_cmd_set): Likewise.
1964 (grub_rescue_cmd_unset): Likewise.
1965 (attempt_normal_mode): Use grub_command_find to get normal module.
1966 (grub_enter_rescue_mode): Use grub_register_core_commands to register
1967 commands, remove grub_rescue_register_command calls.
1969 * normal/command.c (grub_register_command): Removed.
1970 (grub_unregister_command): Likewise.
1971 (grub_command_find): Likewise.
1972 (grub_iterate_commands): Likewise.
1973 (rescue_command): Likewise.
1974 (export_command): Moved to corecmd.c.
1975 (set_command): Removed.
1976 (unset_command): Likewise.
1977 (insmod_command): Likewise.
1978 (rmmod_command): Likewise.
1979 (lsmod_command): Likewise.
1980 (grub_command_init): Likewise.
1982 * normal/completion.c (iterate_command): Use cmd->prio to check for
1984 (complete_arguments): Use grub_extcmd_t structure to find options.
1985 (grub_normal_do_completion): Change function grub_iterate_commands to
1986 grub_command_iterate.
1988 * normal/execute.c (grub_script_execute_cmd): No need to parse
1991 * normal/main.c (grub_dyncmd_dispatcher): New function.
1992 (read_command_list): Register unload commands as dyncmd.
1993 (grub_cmd_normal): Use new command interface, register rescue,
1994 unregister normal at entry, register normal, unregister rescue at exit.
1996 * include/grub/list.h (grub_list_test_t): New type.
1997 (grub_list_iterate): Return int instead of void.
1998 (grub_list_insert): New function.
1999 (GRUB_AS_NAMED_LIST_P): New macro.
2000 (GRUB_AS_PRIO_LIST): Likewise.
2001 (GRUB_AS_PRIO_LIST_P): Likewise.
2002 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2003 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2004 (grub_prio_list): New structure.
2005 (grub_prio_list_insert): New function.
2006 (grub_prio_list_remove): New inline function.
2008 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2009 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2010 (GRUB_COMMAND_FLAG_MENU): Likewise.
2011 (GRUB_COMMAND_FLAG_BOTH): Likewise.
2012 (GRUB_COMMAND_FLAG_TITLE): Likewise.
2013 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2014 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2015 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2016 (grub_command): Likewise.
2017 (grub_register_command): Likewise.
2018 (grub_command_find): Likewise.
2019 (grub_iterate_commands): Likewise.
2020 (grub_command_init): Likewise.
2021 (grub_arg_parse): Likewise.
2022 (grub_arg_show_help): Likewise.
2024 * include/grub/rescue.h (grub_rescue_register_command): Removed.
2025 (grub_rescue_unregister_command): Likewise.
2027 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2028 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2029 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2031 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2032 grub_rescue_cmd_initrd.
2033 * include/grub/i386/loader.h: Likewise.
2034 * include/grub/x86_64/loader.h: Likewise.
2036 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2038 2009-03-21 Bean <bean123ch@gmail.com>
2040 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2041 instead of stat in mingw environment.
2043 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2045 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2047 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2050 2009-03-21 Bean <bean123ch@gmail.com>
2052 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2055 2009-03-18 Michel Dänzer <michel@daenzer.net>
2057 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2058 checking inode flags for EXT4_EXTENTS_FLAG.
2060 2009-03-18 Robert Millan <rmh@aybabtu.com>
2062 * loader/i386/linux.c: Include `<grub/video.h>' and
2063 `<grub/i386/pc/vbe.h>'..
2064 (grub_linux_setup_video): New function. Loosely based on the EFI one.
2065 (grub_linux32_boot): Attempt to configure video settings with
2066 grub_linux_setup_video().
2067 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2068 to avoid grub_console_fini() which would step out of graphical mode
2071 2009-03-14 Robert Millan <rmh@aybabtu.com>
2073 Fix build on powerpc.
2074 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2076 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2078 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2079 background image command.
2081 2009-03-12 Colin D Bennett <colin@gibibit.com>
2083 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2084 (grub_gfxterm_putchar): Extract pairs of identical calls to
2085 draw_cursor out of conditional blocks.
2087 2009-03-11 Pavel Roskin <proski@gnu.org>
2089 * fs/hfs.c (grub_hfs_strncasecmp): New function.
2090 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2092 2009-03-11 Robert Millan <rmh@aybabtu.com>
2094 * loader/i386/multiboot_elfxx.c
2095 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2097 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
2099 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2102 2009-03-11 Robert Millan <rmh@aybabtu.com>
2104 * loader/i386/multiboot.c (code_size): New variable.
2105 (grub_multiboot): Define offsets by adding to `code_size' rather
2106 than subtracting from `grub_multiboot_payload_size'. Provide
2107 4-byte alignment to MBI and others by increasing
2108 `boot_loader_name_length' appropriately.
2110 * loader/i386/multiboot_elfxx.c
2111 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2113 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
2115 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2118 2009-03-08 Robert Millan <rmh@aybabtu.com>
2120 Make loader/i386/linux.c usable on i386-pc again.
2122 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2124 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2127 2009-03-07 Bean <bean123ch@gmail.com>
2129 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2132 2009-03-06 Robert Millan <rmh@aybabtu.com>
2134 Fix display issue on terminals with screen size other than 80x25
2135 (e.g. gfxterm with resolution higher than 640x480).
2137 * normal/main.c (grub_normal_init_page): Display title text in a
2138 position relative to the center of the terminal instead of relying
2139 on a hardcoded offset.
2141 2009-03-04 Robert Millan <rmh@aybabtu.com>
2143 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2146 * Makefile.in (host_kernel): New variable.
2147 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2148 scripts instead of just the windows one.
2149 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2151 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2153 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2155 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2156 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2157 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2158 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2159 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2160 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2162 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2164 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2165 or if there's no space for the disk label and print the partition number on a
2168 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2170 * util/misc.c: Include <time.h>.
2171 (grub_millisleep): New function.
2173 2009-03-04 Bean <bean123ch@gmail.com>
2175 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2176 another option -mno-red-zone.
2178 * commands/handler.c: Change module description.
2180 * kern/handler.c: Add missing space at the end of description line.
2182 * kern/list.c: Likewise.
2184 2009-03-03 Robert Millan <rmh@aybabtu.com>
2186 Move more components to the relocation area, and fix mbi pointer
2187 handling to use the destination rather than the origin (thanks to
2188 Vladimir Serbinenko for spotting).
2190 * loader/i386/multiboot.c (mbi_dest): New variable.
2191 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2192 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2195 2009-03-01 Bean <bean123ch@gmail.com>
2197 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2198 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2199 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2200 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2202 * loader/i386/efi/linux.c (acpi_guid): New variable.
2203 (acpi_guid): Likewise.
2204 (EBDA_SEG_ADDR): New constant.
2205 (LOW_MEM_ADDR): Likewise.
2206 (FAKE_EBDA_SEG): Likewise.
2207 (fake_bios_data): New function.
2208 (grub_linux_boot): Call fake_bios_data.
2210 2009-03-01 Bean <bean123ch@gmail.com>
2212 * commands/terminal.c: Removed.
2214 * commands/handler.c: New file.
2216 * include/grub/list.h: Likewise.
2218 * include/grub/handler.h: Likewise.
2220 * kern/list.c: Likewise.
2222 * kern/handler.c: Likewise.
2224 * kern/term.h: Include header file <grub/handler.h>.
2225 (grub_term_input): Move next field to the beginning.
2226 (grub_term_output): Likewise.
2227 (grub_term_input_class): New variable.
2228 (grub_term_output_class): Likewise.
2229 (grub_term_register_input): Changed to inline function.
2230 (grub_term_register_output): Likewise.
2231 (grub_term_unregister_input): Likewise.
2232 (grub_term_unregister_output): Likewise.
2233 (grub_term_set_current_input): Likewise.
2234 (grub_term_set_current_output): Likewise.
2235 (grub_term_get_current_input): Likewise.
2236 (grub_term_get_current_output): Likewise.
2237 (grub_term_iterate_input): Removed.
2238 (grub_term_iterate_output): Likewise.
2240 * kern/term.c (grub_term_list_input): Removed.
2241 (grub_term_list_output): Likewise.
2242 (grub_term_input_class): New variable.
2243 (grub_term_output_class): Likewise.
2244 (grub_cur_term_input): Change variable as macro.
2245 (grub_cur_term_output): Likewise.
2246 (grub_term_register_input): Removed.
2247 (grub_term_register_output): Likewise.
2248 (grub_term_unregister_input): Likewise.
2249 (grub_term_unregister_output): Likewise.
2250 (grub_term_set_current_input): Likewise.
2251 (grub_term_set_current_output): Likewise.
2252 (grub_term_iterate_input): Likewise.
2253 (grub_term_iterate_output): Likewise.
2254 (grub_term_get_current_input): Likewise.
2255 (grub_term_get_current_output): Likewise.
2257 * util/grub-editenv.c: Include header file <grub/handler.h>.
2258 (grub_term_get_current_input): Removed.
2259 (grub_term_get_current_output): Likewise.
2260 (grub_term_input_class): New variable.
2261 (grub_term_output_class): Likewise.
2263 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2264 (grub_term_get_current_output): Likewise.
2265 (grub_term_input_class): New variable.
2266 (grub_term_output_class): Likewise.
2268 * util/grub-probe.c (grub_term_get_current_input): Removed.
2269 (grub_term_get_current_output): Likewise.
2270 (grub_term_input_class): New variable.
2271 (grub_term_output_class): Likewise.
2273 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2274 (grub_term_get_current_output): Likewise.
2275 (grub_term_input_class): New variable.
2276 (grub_term_output_class): Likewise.
2278 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2279 (terminal_mod_SOURCES): Likewise.
2280 (terminal_mod_CFLAGS): Likewise.
2281 (terminal_mod_LDFLAGS): Likewise.
2283 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2285 (kernel_img_SOURCES): Add list.c and handler.c.
2286 (kernel_img_HEADERS): Add list.h and handler.h.
2288 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2290 (kernel_mod_SOURCES): Add list.c and handler.c.
2291 (kernel_mod_HEADERS): Add list.h and handler.h.
2293 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2295 (kernel_elf_SOURCES): Add list.c and handler.c.
2296 (kernel_elf_HEADERS): Add list.h and handler.h.
2298 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2300 (kernel_elf_SOURCES): Add list.c and handler.c.
2301 (kernel_elf_HEADERS): Add list.h and handler.h.
2303 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2305 (kernel_mod_SOURCES): Add list.c and handler.c.
2306 (kernel_mod_HEADERS): Add list.h and handler.h.
2308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2310 (kernel_elf_SOURCES): Add list.c and handler.c.
2311 (kernel_elf_HEADERS): Add list.h and handler.h.
2313 2009-02-27 Robert Millan <rmh@aybabtu.com>
2315 Factorize elf32 / elf64 code in Multiboot loader. This will
2316 prevent it from getting out of sync again.
2318 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2319 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2320 grub_multiboot_load_elf64): Move from here ...
2321 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2322 grub_multiboot_load_elf): ... to here (new file).
2324 2009-02-27 Robert Millan <rmh@aybabtu.com>
2326 * util/grub.d/10_linux.in: Rename "single-user mode" to
2329 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2331 Don't leak in SCSI code.
2332 * disk/scsi.c (grub_scsi_close): free `scsi'.
2334 2009-02-27 Robert Millan <rmh@aybabtu.com>
2336 * loader/i386/pc/multiboot.c: Move from here ...
2337 * loader/i386/multiboot.c: ... to here. Update all users.
2339 2009-02-27 Robert Millan <rmh@aybabtu.com>
2341 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2342 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2344 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2346 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2349 2009-02-27 Robert Millan <rmh@aybabtu.com>
2351 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2352 `0x' qualifier as 0 when base is specified as parameter).
2354 2009-02-24 Bean <bean123ch@gmail.com>
2356 * configure.ac: Check for -mcmodel=large in x86_64 target.
2358 * include/grub/efi/api.h (efi_call_10): New macro.
2359 (efi_wrap_10): New function.
2361 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2362 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2363 (GRUB_PE32_REL_BASED_LOW): Likewise.
2364 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2365 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2366 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2367 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2368 (GRUB_PE32_REL_BASED_REL): Likewise.
2369 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2370 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2371 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2373 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2376 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2377 (efi_wrap_10): New function.
2379 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2381 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2382 MB/MBP model (NV chipset).
2383 (devdata_devs): Add devpath_5 to the list.
2385 * load/i386/efi/linux.c (video_base): Remove variable.
2386 (RGB_MASK): New macro.
2387 (RGB_MAGIC): Likewise.
2388 (LINE_MIN): Likewise.
2389 (LINE_MAX): Likewise.
2390 (FBTEST_STEP): Likewise.
2391 (FBTEST_COUNT): Likewise.
2392 (fb_list): New variable.
2393 (grub_find_video_card): Remove function.
2394 (find_framebuf): New function.
2395 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2398 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2401 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2403 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2405 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2408 2009-02-22 Robert Millan <rmh@aybabtu.com>
2410 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2411 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2412 in our relocation, instead of using it directly from heap. Also
2413 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2415 2009-02-21 Robert Millan <rmh@aybabtu.com>
2417 Implement USB keyboard support (based on patch by Marco Gerards)
2419 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2420 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2421 (usb_keyboard_mod_LDFLAGS): New variables.
2423 * term/usb_keyboard.c: New file.
2425 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2427 Corrected wrong declaration
2429 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2431 2009-02-14 Christian Franke <franke@computer.org>
2433 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2434 (grub_lspci_iter): Print class code and programming interface byte.
2436 2009-02-14 Christian Franke <franke@computer.org>
2438 * gendistlist.sh: Ignore `.svn' directories.
2440 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
2442 * fs/fat.c: Add 2009 to Copyright line.
2444 2009-02-14 Christian Franke <franke@computer.org>
2446 * commands/hdparm.c: New file. Provides `hdparm' command
2447 which sends ATA commands via grub_disk_ata_pass_through ().
2449 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2451 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2452 and <grub/cpu/io.h> to include/grub/ata.h.
2453 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2454 (GRUB_CDROM_SECTOR_SIZE): Remove.
2455 (GRUB_ATA_*): Move to include/grub/ata.h.
2456 (GRUB_ATAPI_*): Likewise.
2457 (enum grub_ata_commands): Likewise.
2458 (enum grub_ata_timeout_milliseconds): Likewise.
2459 (struct grub_ata_device): Likewise.
2460 (grub_ata_regset): Likewise.
2461 (grub_ata_regget): Likewise.
2462 (grub_ata_regset2): Likewise.
2463 (grub_ata_regget2): Likewise.
2464 (grub_ata_check_ready): Likewise.
2465 (grub_ata_wait_not_busy): Remove static, exported in
2467 (grub_ata_wait_drq): Likewise.
2468 (grub_ata_pio_read): Likewise.
2470 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2471 function for hdparm.mod.
2473 * include/grub/ata.h: New file, contains declarations from
2475 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2477 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2478 (grub_disk_ata_pass_through): New exported variable.
2480 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2482 2009-02-13 Colin D Bennett <colin@gibibit.com>
2484 Support multiple fallback entries, and provide an API to support
2485 executing default+fallback menu entries. Renamed the `terminal' menu
2488 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2489 variable declaration.
2490 (grub_menu_execute_callback): New structure declaration.
2491 (grub_menu_execute_callback_t): New typedef.
2492 (grub_menu_execute_with_fallback): New function declaration.
2493 (grub_menu_get_entry): Likewise.
2494 (grub_menu_get_timeout): Likewise.
2495 (grub_menu_set_timeout): Likewise.
2497 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2499 * normal/menu.c (grub_wait_after_message): Moved to
2500 `normal/menu_text.c'.
2501 (draw_border): Likewise.
2502 (print_message): Likewise.
2503 (print_entry): Likewise.
2504 (print_entries): Likewise.
2505 (grub_menu_init_page): Likewise.
2506 (get_entry_number): Likewise.
2507 (print_timeout): Likewise.
2508 (run_menu): Likewise.
2509 (grub_menu_execute_entry): Likewise.
2510 (show_text_menu): Likewise.
2511 (get_and_remove_first_entry_number): New function.
2512 (grub_menu_execute_with_fallback): Likewise.
2513 (get_entry): Renamed to ...
2514 (grub_menu_get_entry): .. this and made it global.
2515 (get_timeout): Renamed to ...
2516 (grub_menu_get_timeout): ... this and made it global.
2517 (set_timeout): Renamed to ...
2518 (grub_menu_set_timeout): ... this and made it global.
2519 (grub_normal_terminal_menu_viewer): Renamed to ...
2520 (grub_normal_text_menu_viewer): ... this.
2522 * normal/menu_text.c: New file. Extracted text-menu-specific code
2525 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2526 (normal_mod_SOURCES): Likewise.
2528 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2529 (normal_mod_SOURCES): Likewise.
2531 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2532 (normal_mod_SOURCES): Likewise.
2534 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2535 (normal_mod_SOURCES): Likewise.
2537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2538 (normal_mod_SOURCES): Likewise.
2540 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2541 (normal_mod_SOURCES): Likewise.
2543 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2544 (normal_mod_SOURCES): Likewise.
2546 2009-02-11 Robert Millan <rmh@aybabtu.com>
2548 * util/grub.d/00_header.in: Update old reference to `font' command.
2550 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
2552 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2554 Based on patch from Javier MartÃn.
2556 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2558 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2559 to avoid false positives with FAT.
2560 (grub_fstest_SOURCES): Likewise.
2561 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2562 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2563 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2564 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2565 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2566 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2568 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2570 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2571 bpb.version_specific.fat12_or_fat16.fstype and
2572 bpb.version_specific.fat32.fstype.
2574 2009-02-08 Robert Millan <rmh@aybabtu.com>
2576 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2578 2009-02-08 Robert Millan <rmh@aybabtu.com>
2580 * Makefile.in (host_os, host_cpu): New variables.
2581 (target_os): Remove. Update all users.
2583 2009-02-08 Marco Gerards <marco@gnu.org>
2585 * Makefile.in (enable_grub_emu_usb): New variable.
2586 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2587 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2588 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2589 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2590 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2591 `usbtest.mod' and `usbms.mod'.
2592 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2593 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2594 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2595 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2596 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2599 * disk/usbms.c: New file.
2601 * include/grub/usb.h: Likewise.
2603 * include/grub/usbtrans.h: Likewise.
2605 * include/grub/usbdesc.h: Likewise.
2607 * bus/usb/usbtrans.c: Likewise.
2609 * bus/usb/ohci.c: Likewise.
2611 * bus/usb/uhci.c: Likewise.
2613 * bus/usb/usbhub.c: Likewise.
2615 * bus/usb/usb.c: Likewise.
2617 * commands/usbtest.c: Likewise.
2619 * util/usb.c: Likewise.
2621 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2623 * configure.ac: Test for libusb presence.
2625 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2627 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2629 * kern/mm.c: Add more comments.
2631 2009-02-08 Robert Millan <rmh@aybabtu.com>
2633 Patch from Javier MartÃn.
2634 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2635 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2637 2009-02-08 Robert Millan <rmh@aybabtu.com>
2639 * fs/cpio.c: Split tar functionality to ...
2640 * fs/tar.c: ... here (new file). Update all users.
2642 2009-02-07 Robert Millan <rmh@aybabtu.com>
2644 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2645 backward-incompatible features.
2647 Based on patch from Javier MartÃn, with some adjustments.
2649 2009-02-07 Michael Scherer <misc@mandriva.org>
2651 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2653 2009-02-07 Robert Millan <rmh@aybabtu.com>
2655 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2656 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2657 after the RAID stuff.
2659 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2661 Fixes problem when running vbetest command as reported by
2662 Vladimir Serbinenko <phcoder@gmail.com>.
2664 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2666 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
2668 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2669 /dev/md/NpN style mdraid devices.
2671 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2673 * util/unifont2pff.rb: Remove.
2675 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2677 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2680 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2682 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2683 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2684 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2685 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2686 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2687 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2688 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2690 2009-02-02 Christian Franke <franke@computer.org>
2692 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2694 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
2696 * INSTALL: Note that we now require at least autoconf 2.59 and
2697 that LZO is optional.
2699 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2701 Base on patch on bug #24154 created by Tomas Tintera
2704 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2706 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2708 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2709 <bero@arklinux.org>.
2711 * normal/parser.y (script_init): Add missing semicolon.
2713 2009-01-31 Colin D Bennett <colin@gibibit.com>
2715 * normal/main.c: Add include to grub/menu_viewer.h.
2716 (free_menu_entry_classes): Added.
2717 (grub_normal_menu_addentry): Added class property handling.
2718 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2719 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2721 * normal/menu_viewer.c: New file.
2723 * normal/menu.c (run_menu_entry): Renamed to ...
2724 (grub_menu_execute_entry): ... this and made it as global.
2725 (grub_menu_run): Renamed to ...
2726 (show_text_menu): ... this and made it local.
2727 (show_text_menu): Adapt to new function names.
2728 (grub_normal_terminal_menu_viewer): New global variable.
2730 * include/grub/menu.h: New file.
2732 * include/grub/menu_viewer.h: New file.
2734 * include/grub/normal.h: Added include to grub/menu.h.
2735 (grub_menu_entry): Moved to include/grub/menu.h.
2736 (grub_menu_entry_t): Likewise.
2737 (grub_menu): Likewise.
2738 (grub_menu_t): Likewise.
2739 (grub_normal_terminal_menu_viewer): Added.
2740 (grub_menu_execute_entry): Likewise.
2741 (grub_menu_run): Removed.
2743 * DISTLIST: Added include/grub/menu.h.
2744 Added include/grub/menu_viewer.h.
2745 Added normal/menu_viewer.c.
2747 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2749 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2750 arglist for menutitle arguments.
2752 * normal/main.c (grub_normal_menu_addentry): Likewise.
2754 * normal/parser.y (menuentry): Likewise.
2756 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2758 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2759 (grub_script_create_cmdmenu): Likewise.
2761 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2763 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2766 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2768 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2770 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2772 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2774 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2776 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2778 2009-01-30 Christian Franke <franke@computer.org>
2780 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2781 in option help text.
2783 2009-01-27 Pavel Roskin <proski@gnu.org>
2785 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2787 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2789 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2791 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2793 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2794 unregister function.
2796 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2798 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2800 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2802 * util/grub-mkfont.c (usage): Fix typo.
2804 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2806 2009-01-26 Daniel Mierswa <impulze@impulze.org>
2808 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2810 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2812 * kern/misc.c (grub_strcasecmp): New function.
2813 (grub_strcasecmp): Use grub_size_t instead of int for length.
2815 * include/grub/misc.h: Update function prototypes.
2817 2009-01-26 Robert Millan <rmh@aybabtu.com>
2819 * configure.ac: Fix cross-compilation check.
2821 2009-01-22 Christian Franke <franke@computer.org>
2823 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2824 (precision) digit string. Allow `.format2' without `format1' (width).
2825 Limit input chars for `%s' output to `format2' if specified. This is
2826 compatible with standard printf ().
2828 2009-01-22 Christian Franke <franke@computer.org>
2830 * disk/ata.c (grub_ata_wait_status): Replace by ...
2831 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2832 other status bits may be invalid while BSY is asserted.
2833 (grub_ata_check_ready): New function.
2834 (grub_ata_cmd): Removed.
2835 (grub_ata_wait_drq): New function.
2836 (grub_ata_strncpy): Remove inline.
2837 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2838 and error check now done by grub_ata_wait_drq ().
2839 (grub_ata_pio_write): Likewise.
2840 (grub_atapi_identify): Set DEV before check for !BSY. Use
2841 grub_ata_wait_drq () to wait for data.
2842 (grub_ata_device_initialize): Add status register check to
2843 detect missing SATA slave devices. Add debug messages.
2844 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2845 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2846 transfer loop by grub_ata_pio_write ().
2847 (grub_ata_identify): Set DEV before check for !BSY. Use
2848 grub_ata_wait_drq () to wait for data.
2849 (grub_ata_setaddress): Set DEV before check for !BSY.
2850 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2851 read/write in one loop. Fix invalid command on write. Fix incomplete
2852 command on (size % batch) == 0. Add missing error check after write of
2853 last block. Add debug messages.
2854 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2856 2009-01-19 Christian Franke <franke@computer.org>
2858 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2859 (GRUB_ATAPI_IREASON_*): Likewise.
2860 (grub_ata_pio_write): Fix timeout error return.
2861 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2862 (grub_atapi_wait_drq): New function.
2863 (grub_atapi_packet): New parameter `size'.
2864 Use grub_atapi_wait_drq () and direct write instead of
2865 grub_ata_pio_write ().
2866 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2867 reads the number of bytes requested by the device for each DRQ
2869 (grub_atapi_write): Remove old implementation, return not
2870 implemented instead.
2872 2009-01-19 Christian Franke <franke@computer.org>
2874 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2875 of 512 to calculate data size.
2876 (grub_scsi_read12): Likewise.
2877 (grub_scsi_write10): Likewise.
2878 (grub_scsi_write12): Likewise.
2879 (grub_scsi_read): Adjust size according to blocksize.
2880 Add checks for invalid blocksize and unaligned transfer.
2882 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2884 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2886 * term/gfxterm.c (write_char): Fix background rendering for wide
2889 2009-01-19 Robert Millan <rmh@aybabtu.com>
2891 * config.guess: Update to latest version from config git.
2892 * config.sub: Likewise.
2894 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
2896 * Makefile.in: Change font compilation to use new grub-mkfont instead
2899 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2900 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2901 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2902 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2903 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2904 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2905 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2906 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2907 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2909 2009-01-16 Christian Franke <franke@computer.org>
2911 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2912 (enum grub_ata_timeout_milliseconds): New enum.
2913 (grub_ata_wait_status): Add parameter milliseconds.
2914 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2915 recovery from timed-out commands.
2916 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2917 return grub_errno instead of REG_ERROR.
2918 (grub_ata_pio_write): Add parameter milliseconds.
2919 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2920 Pass milliseconds to grub_ata_wait_status () and
2921 grub_ata_pio_read ().
2922 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2923 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2924 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2925 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2926 It is not suitable for device detection, because DEV bit is ignored,
2927 the command may run too long, and not all devices set the signature
2929 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2930 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2931 Fix device selection, DEV bit must be set first to address the registers
2932 of the correct device.
2933 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2934 grub_ata_pio_read/write ().
2935 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2936 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2938 2009-01-13 Carles Pina i Estany <carles@pina.cat>
2940 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2942 2009-01-13 Bean <bean123ch@gmail.com>
2944 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2946 2009-01-13 Bean <bean123ch@gmail.com>
2948 * Makefile.in: (enable_grub_mkfont): New variable.
2949 (freetype_cflags): Likewise.
2950 (freetype_libs): Likewise.
2952 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2953 (grub_mkfont_SOURCES): New variable.
2954 (grub_mkfont_CFLAGS): Likewise.
2955 (grub_mkfont_LDFLAGS): Likewise.
2957 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2958 library if `--enable-grub-mkfont' is requested.
2959 (enable_grub_mkfont): New variable.
2960 (freetype_cflags): Likewise.
2961 (freetype_libs): Likewise.
2963 * util/grub-mkfont.c: New file.
2965 2009-01-12 Christian Franke <franke@computer.org>
2967 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2968 mode check. Fix setting of compat_use[].
2970 2009-01-10 Robert Millan <rmh@aybabtu.com>
2972 Update a few copyright years which we forgot to do in 2008 (only for
2973 files whose changes made in 2008 were copyright-significant)
2975 * Makefile.in: Add 2008 to Copyright line.
2976 * disk/ieee1275/ofdisk.c: Likewise.
2977 * disk/efi/efidisk.c: Likewise.
2978 * kern/dl.c: Likewise.
2979 * kern/sparc64/ieee1275/init.c: Likewise.
2980 * kern/mm.c: Likewise.
2981 * kern/efi/mm.c: Likewise.
2982 * boot/i386/pc/boot.S: Likewise.
2983 * genfslist.sh: Likewise.
2984 * fs/iso9660.c: Likewise.
2985 * fs/hfs.c: Likewise.
2986 * fs/jfs.c: Likewise.
2987 * fs/minix.c: Likewise.
2988 * fs/ufs.c: Likewise.
2989 * gensymlist.sh.in: Likewise.
2990 * genkernsyms.sh.in: Likewise.
2991 * include/grub/misc.h: Likewise.
2992 * include/grub/types.h: Likewise.
2993 * include/grub/symbol.h: Likewise.
2994 * include/grub/elf.h: Likewise.
2995 * include/grub/kernel.h: Likewise.
2996 * include/grub/disk.h: Likewise.
2997 * include/grub/dl.h: Likewise.
2998 * include/grub/i386/linux.h: Likewise.
2999 * include/grub/i386/pc/biosdisk.h: Likewise.
3000 * include/grub/efi/api.h: Likewise.
3001 * include/grub/efi/pe32.h: Likewise.
3002 * include/grub/util/misc.h: Likewise.
3003 * normal/execute.c: Likewise.
3004 * normal/arg.c: Likewise.
3005 * normal/completion.c: Likewise.
3006 * normal/lexer.c: Likewise.
3007 * normal/parser.y: Likewise.
3008 * normal/misc.c: Likewise.
3009 * commands/i386/pc/vbeinfo.c: Likewise.
3010 * commands/hexdump.c: Likewise.
3011 * commands/terminal.c: Likewise.
3012 * commands/ls.c: Likewise.
3013 * commands/help.c: Likewise.
3014 * partmap/pc.c: Likewise.
3015 * loader/efi/chainloader.c: Likewise.
3016 * loader/multiboot_loader.c: Likewise.
3017 * loader/i386/pc/multiboot2.c: Likewise.
3018 * term/efi/console.c: Likewise.
3019 * term/i386/pc/serial.c: Likewise.
3020 * util/lvm.c: Likewise.
3021 * util/console.c: Likewise.
3022 * util/i386/efi/grub-mkimage.c: Likewise.
3023 * util/raid.c: Likewise.
3025 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
3027 * commands/videotest.c: Removed include to grub/machine/memory.h.
3029 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3030 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3031 (video_mod_SOURCES): Removed.
3032 (video_mod_CFLAGS): Likewise.
3033 (video_mod_LDFLAGS): Likewise.
3034 (gfxterm_mod_SOURCES): Likewise.
3035 (gfxterm_mod_CFLAGS): Likewise.
3036 (gfxterm_mod_LDFLAGS): Likewise.
3037 (videotest_mod_SOURCES): Likewise.
3038 (videotest_mod_CFLAGS): Likewise.
3039 (videotest_mod_LDFLAGS): Likewise.
3040 (bitmap_mod_SOURCES): Likewise.
3041 (bitmap_mod_CFLAGS): Likewise.
3042 (bitmap_mod_LDFLAGS): Likewise.
3043 (tga_mod_SOURCES): Likewise.
3044 (tga_mod_CFLAGS): Likewise.
3045 (tga_mod_LDFLAGS): Likewise.
3046 (jpeg_mod_SOURCES): Likewise.
3047 (jpeg_mod_CFLAGS): Likewise.
3048 (jpeg_mod_LDFLAGS): Likewise.
3049 (png_mod_SOURCES): Likewise.
3050 (png_mod_CFLAGS): Likewise.
3051 (png_mod_LDFLAGS): Likewise.
3053 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3054 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3055 (video_mod_SOURCES): Added.
3056 (video_mod_CFLAGS): Likewise.
3057 (video_mod_LDFLAGS): Likewise.
3058 (videotest_mod_SOURCES): Likewise.
3059 (videotest_mod_CFLAGS): Likewise.
3060 (videotest_mod_LDFLAGS): Likewise.
3061 (bitmap_mod_SOURCES): Likewise.
3062 (bitmap_mod_CFLAGS): Likewise.
3063 (bitmap_mod_LDFLAGS): Likewise.
3064 (tga_mod_SOURCES): Likewise.
3065 (tga_mod_CFLAGS): Likewise.
3066 (tga_mod_LDFLAGS): Likewise.
3067 (jpeg_mod_SOURCES): Likewise.
3068 (jpeg_mod_CFLAGS): Likewise.
3069 (jpeg_mod_LDFLAGS): Likewise.
3070 (png_mod_SOURCES): Likewise.
3071 (png_mod_CFLAGS): Likewise.
3072 (png_mod_LDFLAGS): Likewise.
3073 (gfxterm_mod_SOURCES): Likewise.
3074 (gfxterm_mod_CFLAGS): Likewise.
3075 (gfxterm_mod_LDFLAGS): Likewise.
3077 * term/gfxterm.c: Removed include to grub/machine/memory.h,
3078 grub/machine/console.h.
3080 2009-01-04 Jerone Young <jerone@gmail.com>
3082 Make on screen instructions clearer
3084 Based on patch created by Jidanni <jidanni@jidanni.org>
3086 * normal/menu.c: print clearer instructions on the screen
3088 2009-01-02 Colin D Bennett <colin@gibibit.com>
3092 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3093 build system and fixed gfxterm.c to work with different sized fonts.
3095 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3097 * configure: Re-generated.
3099 * DISTLIST: Removed font/manager.c.
3101 Added font/font_cmd.c.
3103 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
3106 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
3108 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3110 * kern/term.c: Changed users of grub_utf8_to_ucs4.
3112 * normal/menu.c: Likewise.
3114 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3115 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3117 * include/grub/font.h: Replaced with new file.
3119 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3120 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3121 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3122 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3123 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3124 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3125 fg_red, fg_green, fg_blue, fg_alpha.
3126 (grub_video_adapter): Removed blit_glyph.
3127 (grub_video_blit_glyph): Removed.
3129 * font/manager.c: Removed file.
3131 * font/font.c: New file.
3133 * font/font_cmd.c: Likewise.
3135 * video/video.c (grub_video_blit_glyph): Removed.
3137 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3138 (grub_video_vbe_map_rgba): Likewise.
3139 (grub_video_vbe_unmap_color_int): Likewise.
3140 (grub_video_vbe_blit_glyph): Removed.
3141 (grub_video_vbe_adapter): Removed blit_glyph.
3143 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3144 (get_pixel): Likewise.
3145 (set_pixel): Likewise.
3147 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3149 * term/gfxterm.c: Adapted to new font engine.
3151 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
3153 * term/i386/pc/vga.c: Likewise.
3155 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3157 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3159 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3161 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3163 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3165 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3167 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3169 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3171 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3173 * util/grub.d/00_header.in: Changed to use new loadfont command.
3175 * util/grub-mkconfig_lib.in: Changed font extension.
3177 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
3179 * util/getroot.c (grub_util_get_grub_dev): Add support for
3180 /dev/md/dNNpNN style partitionable mdraid devices.
3182 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
3184 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3185 at a time limit of the PXE TFTP API correctly.
3186 (grub_pxefs_close): Likewise.
3188 2008-11-29 Robert Millan <rmh@aybabtu.com>
3190 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3191 grub_ata_device_initialize() calls.
3193 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
3195 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3197 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3199 2008-11-28 Robert Millan <rmh@aybabtu.com>
3201 Fix build on powerpc-ieee1275. Based on patch created by
3202 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3203 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3204 `kern/ieee1275/mmap.c'.
3205 * include/grub/powerpc/ieee1275/memory.h: New file.
3207 Provide grub-install on coreboot.
3208 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3209 (grub_install_SOURCES): New variable.
3210 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3213 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
3215 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3216 to `grub_term_input_t'.
3217 (grub_term_get_current_output): Change return type to
3218 `grub_term_output_t'.
3220 2008-11-22 Robert Millan <rmh@aybabtu.com>
3222 Fix breakage on coreboot due to declaration mismatch.
3223 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3224 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3225 grub_vga_text_cls().
3227 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3228 comments. Avoid copying one more byte than necessary (just in case).
3230 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3231 to 0x200000 (avoids trouble with some OFW implementations, and matches
3232 with the one in Yaboot).
3233 Reported by Manoel Abranches
3235 2008-11-20 Robert Millan <rmh@aybabtu.com>
3237 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3238 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3240 * util/grub-mkconfig_lib.in (grub_warn): New function.
3241 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3242 warnings, to obtain consistent formatting.
3243 * util/grub.d/00_header.in: Likewise.
3244 * util/update-grub_lib.in: Likewise.
3246 * loader/i386/linux.c (allocate_pages): Fix a warning.
3247 Move comment text to `#error' stanza.
3249 Harmonize ieee1275's grub_available_iterate() with the generic
3250 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3251 build problem on i386-ieee1275):
3252 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3253 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3254 parameter `type'. Update all users of this function.
3255 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3256 `kern/ieee1275/mmap.c'.
3257 * kern/ieee1275/init.c
3258 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3260 (grub_machine_mmap_iterate): ... this.
3261 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3262 return type to `grub_err_t'. Update all implementations of this
3264 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3267 Add `lsmmap' command (lists firmware-provided memory map):
3268 * commands/lsmmap.c: New file.
3269 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3270 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3272 * conf/powerpc-ieee1275.rmk: Likewise.
3273 * conf/i386-coreboot.rmk: Likewise.
3274 * conf/i386-ieee1275.rmk: Likewise.
3276 2008-11-19 Robert Millan <rmh@aybabtu.com>
3278 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3279 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3280 constraints to initrd allocation (based on code from
3281 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3282 for Linux to find it.
3284 2008-11-14 Robert Millan <rmh@aybabtu.com>
3286 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3287 order to cope with duplicate slashes.
3289 2008-11-14 Robert Millan <rmh@aybabtu.com>
3291 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3292 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3293 don't want to mess with lower memory, because it is used in the Linux
3296 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3297 an appropriate place in lower memory, between 0x10000 and 0x90000,
3298 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3299 is in our heap (probably as a result of it being corrupted during
3300 decompression). Add #error instance with comment to explain why this
3301 loader isn't currently usable on PC/BIOS.
3303 2008-11-14 Robert Millan <rmh@aybabtu.com>
3305 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3306 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3308 2008-11-12 Robert Millan <rmh@aybabtu.com>
3310 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3312 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3313 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3315 * include/grub/i386/pc/memory.h: ... to here.
3317 2008-11-12 Robert Millan <rmh@aybabtu.com>
3319 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3322 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3323 (grub_console_cur_color, grub_console_real_putchar)
3324 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3325 (grub_console_setcolorstate, grub_console_setcolor)
3326 (grub_console_getcolor): Move from here ...
3327 * include/grub/i386/vga_common.h: ... to here (new file).
3329 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3330 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3332 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3333 `<grub/i386/vga_common.h>'.
3335 2008-11-12 Robert Millan <rmh@aybabtu.com>
3337 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3338 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3339 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3341 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3342 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3344 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3345 grub_console_init() with call to grub_vga_text_init().
3346 (grub_machine_fini): Replace call to
3347 grub_console_fini() with call to grub_vga_text_fini() and
3348 grub_at_keyboard_fini().
3350 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3351 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3352 (grub_console_setcolorstate, grub_console_setcolor)
3353 (grub_console_getcolor): New function prototypes.
3355 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3356 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3357 (grub_vga_text_setcursor): Static-ize.
3358 (grub_vga_text_term): New structure.
3359 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3361 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3362 (grub_console_cur_color, grub_console_standard_color)
3363 (grub_console_normal_color, grub_console_highlight_color)
3364 (map_char, grub_console_putchar, grub_console_getcharwidth)
3365 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3366 (grub_console_getcolor): Move from here ...
3367 * term/i386/vga_common.c: ... to here (same function names).
3369 2008-11-12 Robert Millan <rmh@aybabtu.com>
3371 Use newly-added Multiboot support in coreboot.
3373 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3374 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3376 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3377 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3378 (codestart): Store the MBI in `startup_multiboot_info' when we're
3379 being loaded using Multiboot.
3381 * kern/i386/coreboot/init.c (grub_machine_init): Move
3382 grub_at_keyboard_init() call to beginning of function (useful for
3383 debugging). Call grub_machine_mmap_init() before attempting to use
3384 grub_machine_mmap_iterate().
3385 (grub_lower_mem, grub_upper_mem): Move from here ...
3386 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3389 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3392 2008-11-12 Robert Millan <rmh@aybabtu.com>
3394 Fix a regression introduced by the at_keyboard.mod split. Because
3395 some terminals are default on some platforms and non-default on
3396 others, the first terminal being registered determines which is
3397 going to be default.
3399 * kern/term.c (grub_term_register_input): If this is the first
3400 terminal being registered, set it as the current one.
3401 (grub_term_register_output): Likewise.
3403 * term/efi/console.c (grub_console_init): Do not call
3404 grub_term_set_current_output() or grub_term_set_current_input().
3405 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3406 * term/i386/pc/console.c (grub_console_init): Likewise.
3407 (grub_console_fini): Do not call grub_term_set_current_input()
3408 (but leave grub_term_set_current_output() to restore text mode).
3410 2008-11-10 Robert Millan <rmh@aybabtu.com>
3412 * util/grub.d/00_header.in: Add backward compatibility check for
3413 versions of terminal.mod that don't understand `terminal_input' or
3416 2008-11-09 Robert Millan <rmh@aybabtu.com>
3418 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3419 `terminal_input' / `terminal_output', not `terminal'.
3421 2008-11-08 Robert Millan <rmh@aybabtu.com>
3423 * Makefile.in (include_DATA): Fix srcdir=. assumption.
3424 (DISTCLEANFILES): Add `build_env.mk'.
3426 2008-11-08 Robert Millan <rmh@aybabtu.com>
3428 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3429 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3430 members. Update all users.
3431 * util/console.c (grub_ncurses_term): Split in ...
3432 (grub_ncurses_term_input): ... this, and ...
3433 (grub_ncurses_term_output): ... this. Update all users.
3434 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3436 2008-11-08 Robert Millan <rmh@aybabtu.com>
3438 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3439 (PKGDATA): Add $(pkgdata_SRCDIR).
3440 (pkglib_BUILDDIR): New variable.
3441 (pkgdata_SRCDIR): New variable.
3442 (build_env.mk): New target.
3443 (include_DATA): New variable.
3444 (install-local): Install $(include_DATA) files in $(includedir).
3446 2008-11-07 Pavel Roskin <proski@gnu.org>
3448 * gendistlist.sh: Use C locale for sorting to ensure consistent
3449 output on all systems.
3451 * util/grub.d/00_header.in: Remove incorrect space before
3454 2008-11-07 Robert Millan <rmh@aybabtu.com>
3456 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3458 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3459 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3460 (based on find_multi_boot1_header).
3461 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3462 using find_multi_boot2_header(), and abort if neither Multiboot or
3463 Multiboot headers were found.
3465 2008-11-07 Robert Millan <rmh@aybabtu.com>
3467 Modularize at_keyboard.mod:
3469 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3470 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3471 (at_keyboard_mod_LDFLAGS): New variables.
3473 Actual terminal split:
3475 * include/grub/term.h (struct grub_term): Split in ...
3476 (struct grub_term_input): ... this, and ...
3477 (struct grub_term_output): ... this. Update all users.
3478 (grub_term_set_current): Split in ...
3479 (grub_term_set_current_input): ... this, and ...
3480 (grub_term_set_current_output): ... this.
3481 (grub_term_get_current): Split in ...
3482 (grub_term_get_current_input): ... this, and ...
3483 (grub_term_get_current_output): ... this.
3484 (grub_term_register): Split in ...
3485 (grub_term_register_input): ... this, and ...
3486 (grub_term_register_output): ... this.
3487 (grub_term_unregister): Split in ...
3488 (grub_term_unregister_input): ... this, and ...
3489 (grub_term_unregister_output): ... this.
3490 (grub_term_iterate): Split in ...
3491 (grub_term_iterate_input): ... this, and ...
3492 (grub_term_iterate_output): ... this.
3494 * kern/term.c (grub_term_list): Split in ...
3495 (grub_term_list_input): ... this, and ...
3496 (grub_term_list_output): ... this. Update all users.
3497 (grub_cur_term): Split in ...
3498 (grub_cur_term_input): ... this, and ...
3499 (grub_cur_term_output): ... this. Update all users.
3500 (grub_term_set_current): Split in ...
3501 (grub_term_set_current_input): ... this, and ...
3502 (grub_term_set_current_output): ... this.
3503 (grub_term_get_current): Split in ...
3504 (grub_term_get_current_input): ... this, and ...
3505 (grub_term_get_current_output): ... this.
3506 (grub_term_register): Split in ...
3507 (grub_term_register_input): ... this, and ...
3508 (grub_term_register_output): ... this.
3509 (grub_term_unregister): Split in ...
3510 (grub_term_unregister_input): ... this, and ...
3511 (grub_term_unregister_output): ... this.
3512 (grub_term_iterate): Split in ...
3513 (grub_term_iterate_input): ... this, and ...
3514 (grub_term_iterate_output): ... this.
3516 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3517 a check for input and one for output (and only attempt to get keys
3518 from user when input works).
3520 * util/grub-probe.c (grub_term_get_current): Split in ...
3521 (grub_term_get_current_input): ... this, and ...
3522 (grub_term_get_current_output): ... this.
3523 * util/grub-fstest.c: Likewise.
3524 * util/i386/pc/grub-setup.c: Likewise.
3525 * util/grub-editenv.c: Likewise.
3527 Portability adjustments:
3529 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3530 `term/i386/pc/at_keyboard.c'.
3531 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3532 grub_keyboard_controller_init() (now handled by terminal .init).
3533 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3534 grub_at_keyboard_init().
3535 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3536 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3537 at_keyboard.mod via input terminal interface).
3538 * include/grub/i386/coreboot/console.h: Convert into a stub for
3539 `<grub/i386/pc/console.h>'.
3541 Migrate full terminals to new API:
3543 * term/efi/console.c (grub_console_term): Split into ...
3544 (grub_console_term_input): ... this, and ...
3545 (grub_console_term_output): ... this. Update all users.
3546 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3547 (grub_ofconsole_init): Split into ...
3548 (grub_ofconsole_init_input): ... this, and ...
3549 (grub_ofconsole_init_output): ... this.
3550 (grub_ofconsole_term): Split into ...
3551 (grub_ofconsole_term_input): ... this, and ...
3552 (grub_ofconsole_term_output): ... this. Update all users.
3553 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3554 (grub_serial_term_input): ... this, and ...
3555 (grub_serial_term_output): ... this. Update all users.
3556 * term/i386/pc/console.c (grub_console_term): Split into ...
3557 (grub_console_term_input): ... this, and ...
3558 (grub_console_term_output): ... this. Update all users.
3559 (grub_console_term_input): Only enable it on PC/BIOS platform.
3560 (grub_console_init): Remove grub_keyboard_controller_init() call.
3562 Migrate input terminals to new API:
3564 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3565 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3566 i386-specific anyway).
3567 (grub_console_checkkey): Rename to ...
3568 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3570 (grub_keyboard_controller_orig): New variable.
3571 (grub_console_getkey): Rename to ...
3572 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3574 (grub_keyboard_controller_init): Static-ize. Save original
3575 controller value so that it can be restored ...
3576 (grub_keyboard_controller_fini): ... here (new function).
3577 (grub_at_keyboard_term): New structure.
3578 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3581 Migrate output terminals to new API:
3583 * term/i386/pc/vga.c (grub_vga_term): Change type to
3584 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3585 members. Update all users.
3586 * term/gfxterm.c (grub_video_term): Change type to
3587 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3588 members. Update all users.
3589 * include/grub/i386/pc/console.h (grub_console_checkkey)
3590 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3593 Migrate `terminal' command and userland tools to new API:
3595 * commands/terminal.c (grub_cmd_terminal): Split into ...
3596 (grub_cmd_terminal_input): ... this, and ...
3597 (grub_cmd_terminal_output): ... this.
3598 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3599 `terminal_input' and `terminal_output'.
3600 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3601 `terminal_input' / `terminal_output' API.
3602 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3603 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3604 provided ${GRUB_TERMINAL}, convert it).
3606 2008-11-04 Robert Millan <rmh@aybabtu.com>
3608 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3610 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3612 2008-11-03 Bean <bean123ch@gmail.com>
3614 * kern/elf.c (grub_elf32_load): Revert to previous code.
3615 (grub_elf64_load): Likewise.
3617 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3619 2008-11-01 Robert Millan <rmh@aybabtu.com>
3621 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3622 (TARGET_CPPFLAGS): Likewise.
3623 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3625 2008-11-01 Carles Pina i Estany <carles@pina.cat>
3627 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3629 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3631 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3632 addition of objects until the code is not going to be able to fail.
3634 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3636 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3637 (add a missing NULL check, and correct them by moving the pointer
3638 operations after the actual check).
3640 2008-10-29 Robert Millan <rmh@aybabtu.com>
3642 * util/i386/pc/grub-install.in: Handle empty string as output from
3643 make_system_path_relative_to_its_root().
3645 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3647 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3648 circular metadata worst case scenario. If the metadata is circular
3649 then copy the wrap in place.
3650 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3651 project lib/format_text/layout.h
3652 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3654 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3656 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3658 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3660 * util/update-grub_lib.in: Mention filename in warning message.
3662 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3664 * NEWS: Update for rename of update-grub to grub-mkconfig.
3666 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3668 * util/update-grub_lib.in: Copy to ...
3669 * util/grub-mkconfig_lib.in: ... this. Update all users.
3670 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3671 * util/update-grub.in: Rename to ...
3672 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3673 option. Add `--output' option to allow users to specify the generated
3674 configuration file. Default to stdout.
3675 (update_grub_dir): Rename to ...
3676 (grub_mkconfig_dir): ... this.
3677 (grub_cfg): Default to an empty string.
3678 * conf/common.rmk (update-grub): Rename to ...
3679 (grub-mkconfig): ... this.
3680 (update-grub_lib): Copy to ...
3681 (grub-mkconfig_lib): ... this.
3682 (update-grub_SCRIPTS): Copy to ...
3683 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3684 (update-grub_DATA): Rename to ...
3685 (grub-mkconfig_DATA): ... this.
3687 2008-09-28 Robert Millan <rmh@aybabtu.com>
3689 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3690 to `modified'. Add the real `created' field.
3691 (grub_iso9660_uuid): Use `modified' rather than `created' for
3692 constructing the UUID.
3694 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
3696 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3697 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3699 2008-09-28 Bean <bean123ch@gmail.com>
3701 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3702 Thanks to Christian Franke for finding this bug.
3704 2008-09-25 Robert Millan <rmh@aybabtu.com>
3706 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3707 instances of grub_util_get_disk_name() (see previous commit).
3709 2008-09-25 Robert Millan <rmh@aybabtu.com>
3711 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3712 `util/i386/get_disk_name.c'.
3713 * conf/i386-efi.rmk: Likewise.
3714 * conf/x86_64-efi.rmk: Likewise.
3715 * conf/i386-coreboot.rmk: Likewise.
3716 * conf/i386-ieee1275.rmk: Likewise.
3717 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3718 `util/ieee1275/get_disk_name.c'.
3719 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3720 * util/ieee1275/get_disk_name.c: Remove file.
3721 * util/i386/get_disk_name.c: Remove file.
3722 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3723 "hd%d" for device.map entries, rather than using
3724 grub_util_get_disk_name().
3726 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3728 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3730 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3732 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3734 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3736 (GRUB_TERM_PPAGE): Changed to 0x4900.
3738 2008-09-24 Robert Millan <rmh@aybabtu.com>
3740 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3741 macros (they were i386-pc specific).
3742 * include/grub/sparc64/ieee1275/console.h: Likewise.
3743 * include/grub/efi/console.h: Likewise.
3745 2008-09-22 Bean <bean123ch@gmail.com>
3747 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3748 resident and in attribute list.
3750 * include/grub/ntfs.h (BMP_LEN): Removed.
3752 2008-09-22 Bean <bean123ch@gmail.com>
3754 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3755 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3757 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3758 error occurs, as grub_disk_open will call grub_disk_close, which will
3759 call p->close (scsi).
3761 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3763 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3764 (AC_PREREQ): Bumped to 2.59.
3765 (AC_TRY_COMPILE): Replace obsolete macro with ...
3766 (AC_COMPILE_IFELSE): ... this.
3767 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3768 (AC_LINK_IFELSE): ... this.
3770 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3772 * autogen.sh: Add a call to `gendistlist.sh'.
3774 2008-09-19 Christian Franke <franke@computer.org>
3776 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3777 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3778 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3779 Export __enable_execute_stack() to modules.
3780 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3783 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3785 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3788 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3790 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3791 #include <grub/util/hostdisk.h>.
3793 2008-09-08 Robert Millan <rmh@aybabtu.com>
3795 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3796 segments when their filesz is zero (grub_file_read() interprets
3797 zero-size as "read until EOF", which results in memory corruption).
3798 Use `lowest_segment' rather than 0 for calculating the current
3799 segment load address.
3801 2008-09-08 Robert Millan <rmh@aybabtu.com>
3803 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3804 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3805 clobbered useful information.
3807 2008-09-08 Robert Millan <rmh@aybabtu.com>
3809 * include/grub/util/biosdisk.h: Move to ...
3810 * include/grub/util/hostdisk.h: ... here. Update all users.
3811 * util/biosdisk.c: Move to ...
3812 * util/hostdisk.c: ... here. Update all users.
3814 2008-09-07 Robert Millan <rmh@aybabtu.com>
3816 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3818 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3819 and length can be stored directly in the `mbi->mmap_addr' and
3820 `mbi->mmap_length' struct fields.
3822 2008-09-07 Robert Millan <rmh@aybabtu.com>
3824 * conf/i386.rmk: New file. Provides declaration for building
3826 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3827 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3829 Include `conf/i386.mk'.
3830 * conf/i386-efi.rmk: Likewise.
3831 * conf/x86_64-efi.rmk: Likewise.
3832 * conf/i386-coreboot.rmk: Likewise.
3833 * conf/i386-ieee1275.rmk: Likewise.
3835 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3837 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3838 Adds optimization support for BGR based modes.
3840 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3841 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3842 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3843 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3844 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3845 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3846 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3847 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3848 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3849 (grub_video_i386_vbeblit_index_index): Likewise.
3850 (grub_video_i386_vbeblit_replace_directN): Added.
3851 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3852 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3853 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3854 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3855 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3856 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3857 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3858 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3859 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3860 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3861 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3862 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3863 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3865 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3866 (grub_video_i386_vbefill_R8G8B8): Likewise.
3867 (grub_video_i386_vbefill_index): Likewise.
3868 (grub_video_i386_vbefill_direct32): Added.
3869 (grub_video_i386_vbefill_direct24): Likewise.
3870 (grub_video_i386_vbefill_direct16): Likewise.
3871 (grub_video_i386_vbefill_direct8): Likewise.
3873 * include/grub/video.h (grub_video_blit_format): Removed
3874 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3875 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3876 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3877 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3878 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3880 * video/video.c (grub_video_get_blit_format): Updated to use new
3881 blit formats. Added handling for 16 bit color modes.
3883 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3885 (common_blitter): Updated to use new blitters.
3887 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3889 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3890 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3891 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3892 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3893 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3894 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3895 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3896 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3897 (grub_video_i386_vbeblit_index_index): Likewise.
3898 (grub_video_i386_vbeblit_replace_directN): Added.
3899 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3900 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3901 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3902 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3903 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3904 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3905 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3906 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3907 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3908 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3909 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3910 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3911 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3913 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3914 (grub_video_i386_vbefill_R8G8B8): Likewise.
3915 (grub_video_i386_vbefill_index): Likewise.
3916 (grub_video_i386_vbefill_direct32): Added.
3917 (grub_video_i386_vbefill_direct24): Likewise.
3918 (grub_video_i386_vbefill_direct16): Likewise.
3919 (grub_video_i386_vbefill_direct8): Likewise.
3921 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3924 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3927 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3930 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3933 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3935 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3938 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3940 * fs/iso9660.c (grub_iso9660_date): New structure.
3941 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3942 (grub_iso9660_uuid): New function.
3944 2008-09-05 Bean <bean123ch@gmail.com>
3946 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3948 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3949 insensitive bit for names in Win32 and Win32 & DOS namespace.
3951 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3953 * include/grub/types.h (LONG_MAX): Likewise.
3955 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3957 * util/getroot.c: Include <config.h>.
3958 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3959 add support for /dev/md/N devices and handle LVM double dash escaping.
3961 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3963 * config.guess: Update to latest version from config git.
3964 * config.sub: Likewise.
3966 2008-09-03 Robert Millan <rmh@aybabtu.com>
3968 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3969 `disk->total_sectors'.
3971 2008-09-01 Colin D Bennett <colin@gibibit.com>
3973 * include/grub/normal.h: Fixed incorrect comment for
3974 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3976 2008-09-01 Colin D Bennett <colin@gibibit.com>
3978 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3979 values with defines.
3981 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3982 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3983 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3984 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3985 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3986 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3987 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3988 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3989 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3990 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3991 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3992 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3993 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3994 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3995 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3996 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3997 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3998 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3999 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4001 2008-08-31 Robert Millan <rmh@aybabtu.com>
4003 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4005 (grub_multiboot): Fix a few warnings.
4007 2008-08-31 Robert Millan <rmh@aybabtu.com>
4009 * loader/i386/pc/multiboot.c: Update comment not to say that
4010 boot_device support is unimplemented.
4012 2008-08-31 Robert Millan <rmh@aybabtu.com>
4014 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4015 or memory map support are unimplemented.
4017 2008-08-31 Colin D Bennett <colin@gibibit.com>
4019 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4021 2008-08-31 Colin D Bennett <colin@gibibit.com>
4023 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4024 total video memory in 'vbeinfo' output; show color format details for
4027 2008-08-30 Pavel Roskin <proski@gnu.org>
4029 * util/genmoddep.c: Remove for real this time.
4030 * DISTLIST: Remove util/genmoddep.c.
4032 2008-08-30 Robert Millan <rmh@aybabtu.com>
4034 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4035 as required by Multiboot spec (it was already 4-byte aligned, but
4038 2008-08-29 Pavel Roskin <proski@gnu.org>
4040 * kern/powerpc/ieee1275/crt0.S: Rename to ...
4041 * kern/powerpc/ieee1275/startup.S: ... this.
4042 * conf/powerpc-ieee1275.rmk: Adjust for the above.
4043 * DISTLIST: Likewise.
4045 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4046 grub/cpu/kernel.h. Add start label for consistency with other
4047 platforms. Add grub_prefix immediately after start. Add jump
4048 to the code after grub_prefix.
4049 * include/grub/powerpc/kernel.h: Provide valid values for
4050 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4052 2008-08-29 Bean <bean123ch@gmail.com>
4054 * configure.ac: Change host_os to cygwin for mingw.
4055 (asprintf): New check for function.
4057 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4058 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4060 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4061 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4062 sync, sleep and grub_util_get_disk_size for mingw.
4064 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4065 to get size in mingw.
4066 (open_device): Use flag O_BINARY if it's defined.
4067 (find_root_device): Add dummy code for mingw.
4069 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4070 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4071 (get_scsi_disk_name): Return 0 for mingw.
4073 * util/hostfs.c: #include <grub/util/misc.h>.
4074 (grub_hostfs_open): Use "rb" flag to open file, use
4075 grub_util_get_disk_size to get disk size for mingw.
4077 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4078 (asprintf): New function if HAVE_ASPRINTF is not set.
4079 (sync): New function for mingw.
4081 (grub_util_get_disk_size): Likewise.
4083 2008-08-28 Pavel Roskin <proski@gnu.org>
4085 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4088 2008-08-28 Robert Millan <rmh@aybabtu.com>
4090 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4092 2008-08-28 Robert Millan <rmh@aybabtu.com>
4094 Change find_grub_drive() syntax so it doesn't prevent it from
4095 detecting NULL names as errors.
4097 * util/biosdisk.c (find_grub_drive): Move free slot search code
4099 (find_free_slot): ... to here.
4100 (read_device_map): Use find_free_slot() to search for free slots.
4102 2008-08-27 Marco Gerards <marco@gnu.org>
4104 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4105 (scsi_mod_SOURCES): New variable.
4106 (scsi_mod_CFLAGS): Likewise
4107 (scsi_mod_LDFLAGS): Likewise.
4109 * disk/scsi.c: New file.
4111 * include/grub/scsi.h: Likewise.
4113 * include/grub/scsicmd.h: Likewise.
4115 * disk/ata.c: Include <grub/scsi.h>.
4116 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4118 (grub_ata_iterate): Skip ATAPI devices.
4119 (grub_ata_open): Only handle ATAPI devices.
4120 (struct grub_atapi_read): Removed.
4121 (grub_atapi_readsector): Likewise.
4122 (grub_ata_read): No longer handle ATAPI devices.
4123 (grub_ata_write): Likewise.
4124 (grub_atapi_iterate): New function.
4125 (grub_atapi_read): Likewise.
4126 (grub_atapi_write): Likewise.
4127 (grub_atapi_open): Likewise.
4128 (grub_atapi_close): Likewise.
4129 (grub_atapi_dev): New variable.
4130 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4131 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4133 * include/grub/disk.h (enum grub_disk_dev_id): Add
4134 `GRUB_DISK_DEVICE_SCSI_ID'.
4136 2008-08-26 Robert Millan <rmh@aybabtu.com>
4138 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4139 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4142 2008-08-23 Bean <bean123ch@gmail.com>
4144 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4145 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4146 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4147 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4149 (raid5rec_mod_SOURCES): New macro.
4150 (raid5rec_mod_CFLAGS): Likewise.
4151 (raid5rec_mod_LDFLAGS): Likewise.
4152 (raid6rec_mod_SOURCES): Likewise.
4153 (raid6rec_mod_CFLAGS): Likewise.
4154 (raid6rec_mod_LDFLAGS): Likewise.
4155 (mdraid_mod_SOURCES): Likewise.
4156 (mdraid_mod_CFLAGS): Likewise.
4157 (mdraid_mod_LDFLAGS): Likewise.
4158 (dm_nv_mod_SOURCES): Likewise.
4159 (dm_nv_mod_CFLAGS): Likewise.
4160 (dm_nv_mod_LDFLAGS): Likewise.
4162 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4163 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4164 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4166 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4167 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4169 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4171 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4173 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4177 * disk/raid5_recover.c: New file.
4179 * disk/raid6_recover.c: Likewise.
4181 * disk/mdraid_linux.c: Likewise.
4183 * disk/dmraid_nvidia.c: Likewise.
4185 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4188 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4189 calculate the size of raid device.
4190 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4191 different layout of raid5.
4192 (grub_raid_scan_device): Remove code specific to mdraid.
4193 (grub_raid_list): New variable.
4194 (free_array): New function.
4195 (grub_raid_register): Likewise.
4196 (grub_raid_unregister): Likewise.
4197 (grub_raid_rescan): Likewise.
4198 (GRUB_MOD_INIT): Don't iterate device here.
4199 (GRUB_MOD_FINI): Use free_array to release resource.
4201 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4202 (grub_raid5_recover_func_t): New function variable type.
4203 (grub_raid6_recover_func_t): Likewise.
4204 (grub_raid5_recover_func): New variable.
4205 (grub_raid6_recover_func): Likewise.
4206 (grub_raid_register): New function.
4207 (grub_raid_unregister): Likewise.
4208 (grub_raid_rescan): Likewise.
4209 (grub_raid_block_xor): Likewise.
4211 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4212 (CMD_CRC): New macro.
4214 (read_file): Handle device as well as file.
4215 (cmd_crc): New function.
4216 (fstest): Handle multiple disks.
4217 (options): Remove part, raw and long, add root and diskcount.
4218 (usage): Add crc, remove -p, -r, -l, add -r and -c.
4219 (main): Find the first non option entry and ignore subsequent options,
4220 add handling for the new options, support multiple disks.
4222 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4224 2008-08-23 Bean <bean123ch@gmail.com>
4226 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4228 * genfslist.sh: Ignore kernel.mod.
4230 * genpartmaplist.sh: Likewise.
4232 2008-08-23 Robert Millan <rmh@aybabtu.com>
4234 * util/getroot.c (find_root_device): Skip anything that starts with
4235 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4237 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
4239 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4240 * util/grub.d/00_header.in: Allow the administrator to change default
4241 gfxmode via ${GRUB_GFXMODE}.
4243 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
4245 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4247 2008-08-21 Robert Millan <rmh@aybabtu.com>
4249 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4251 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4252 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4254 2008-08-20 Carles Pina i Estany <carles@pina.cat>
4256 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4257 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4259 2008-08-19 Robert Millan <rmh@aybabtu.com>
4261 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4262 (struct grub_virtual_screen): Remove `cursor_color'.
4263 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4265 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4267 2008-08-18 Robert Millan <rmh@aybabtu.com>
4269 Unify (identical) linux_normal.c files.
4270 * loader/i386/efi/linux_normal.c: Move from here ...
4271 * loader/linux_normal.c: ... to here. Update all users.
4272 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4273 * loader/i386/ieee1275/linux_normal.c: Likewise.
4275 2008-08-18 Robert Millan <rmh@aybabtu.com>
4277 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4278 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4279 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4280 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4281 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4283 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4284 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4285 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4286 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4287 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4288 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4289 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4290 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4291 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4292 portably using grub_getxy().
4293 Replace `-EFI' with `-bzImage' in boot message.
4295 2008-08-17 Robert Millan <rmh@aybabtu.com>
4297 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4299 2008-08-17 Robert Millan <rmh@aybabtu.com>
4301 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4303 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4304 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4305 (grub_machine_mmap_iterate): New function declaration.
4306 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4308 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4311 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4312 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4313 Move e820 parsing from here ...
4314 * kern/i386/pc/mmap.c: New file.
4315 (grub_machine_mmap_iterate): ... to here.
4317 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4318 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4319 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4320 (grub_available_iterate): Redeclare to return `void', and redeclare
4321 its hook to use grub_uint64_t as addr and size parameters, and rename
4323 (grub_machine_mmap_iterate): ... this. Update all users.
4325 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4326 to make it more readable. Rename to ...
4327 (grub_machine_mmap_iterate): ... this.
4329 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4330 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4331 (grub_multiboot): Allocate an extra region after the payload, and fill
4332 it with a Multiboot memory map. Adjust a.out loader to calculate size
4333 with the extra space.
4334 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4335 with the extra space.
4337 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4339 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4341 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4343 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4344 mdate-sh to the list `find' searches for.
4345 * DISTLIST: Regenerated.
4347 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4349 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4350 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4351 genmoddep.awk, gensymlist.sh.in.
4352 (DISTDIRS): Add bus, docs, hook, lib.
4353 * DISTLIST: Regenerated.
4354 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4356 2008-08-16 Robert Millan <rmh@aybabtu.com>
4358 * disk/raid.c (grub_raid_init): Handle/report errors set by
4359 grub_device_iterate().
4360 * disk/lvm.c (grub_lvm_init): Likewise.
4362 2008-08-15 Bean <bean123ch@gmail.com>
4364 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4366 (datetime_mod_SOURCES): New macro.
4367 (datetime_mod_CFLAGS): Likewise.
4368 (datetime_mod_LDFLAGS): Likewise.
4369 (date_mod_SOURCES): Likewise.
4370 (date_mod_CFLAGS): Likewise.
4371 (date_mod_LDFLAGS): Likewise.
4372 (datehook_mod_SOURCES): Likewise.
4373 (datehook_mod_CFLAGS): Likewise.
4374 (datehook_mod_LDFLAGS): Likewise.
4376 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4378 (datetime_mod_SOURCES): New macro.
4379 (datetime_mod_CFLAGS): Likewise.
4380 (datetime_mod_LDFLAGS): Likewise.
4381 (date_mod_SOURCES): Likewise.
4382 (date_mod_CFLAGS): Likewise.
4383 (date_mod_LDFLAGS): Likewise.
4384 (datehook_mod_SOURCES): Likewise.
4385 (datehook_mod_CFLAGS): Likewise.
4386 (datehook_mod_LDFLAGS): Likewise.
4388 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4390 (datetime_mod_SOURCES): New macro.
4391 (datetime_mod_CFLAGS): Likewise.
4392 (datetime_mod_LDFLAGS): Likewise.
4393 (date_mod_SOURCES): Likewise.
4394 (date_mod_CFLAGS): Likewise.
4395 (date_mod_LDFLAGS): Likewise.
4396 (datehook_mod_SOURCES): Likewise.
4397 (datehook_mod_CFLAGS): Likewise.
4398 (datehook_mod_LDFLAGS): Likewise.
4400 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4402 (datetime_mod_SOURCES): New macro.
4403 (datetime_mod_CFLAGS): Likewise.
4404 (datetime_mod_LDFLAGS): Likewise.
4405 (date_mod_SOURCES): Likewise.
4406 (date_mod_CFLAGS): Likewise.
4407 (date_mod_LDFLAGS): Likewise.
4408 (datehook_mod_SOURCES): Likewise.
4409 (datehook_mod_CFLAGS): Likewise.
4410 (datehook_mod_LDFLAGS): Likewise.
4412 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4414 (datetime_mod_SOURCES): New macro.
4415 (datetime_mod_CFLAGS): Likewise.
4416 (datetime_mod_LDFLAGS): Likewise.
4417 (date_mod_SOURCES): Likewise.
4418 (date_mod_CFLAGS): Likewise.
4419 (date_mod_LDFLAGS): Likewise.
4420 (datehook_mod_SOURCES): Likewise.
4421 (datehook_mod_CFLAGS): Likewise.
4422 (datehook_mod_LDFLAGS): Likewise.
4424 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4426 * commands/date.c: New file.
4428 * hook/datehook.c: Likewise.
4430 * include/grub/lib/datetime.h: Likewise.
4432 * include/grub/i386/cmos.h: Likewise.
4434 * lib/datetime.c: Likewise.
4436 * lib/i386/datetime.c: Likewise.
4438 * lib/efi/datetime.c: Likewise.
4440 2008-08-14 Robert Millan <rmh@aybabtu.com>
4442 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4443 (grub_mkelfimage_SOURCES): New variable.
4444 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4446 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4447 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4448 * conf/powerpc-ieee1275.rmk: Likewise.
4449 * conf/i386-ieee1275.rmk: Likewise.
4451 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4452 * kern/i386/coreboot/init.c: Likewise.
4454 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4455 with `<grub/cpu/kernel.h>'.
4456 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4458 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4459 * kern/i386/coreboot/startup.S: Likewise.
4461 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4462 (GRUB_MOD_GAP): Remove.
4463 * include/grub/powerpc/kernel.h: New file.
4464 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4465 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4466 * include/grub/i386/kernel.h: New file.
4467 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4468 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4469 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4471 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4473 Use --directory when invoking grub_mkimage.
4475 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4476 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4477 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4478 and GRUB_KERNEL_CPU_PREFIX.
4480 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
4482 * include/grub/err.h (grub_err_printf): New function prototype.
4483 * util/misc.c (grub_err_printf): New function.
4484 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4486 * kern/err.c (grub_print_error): Use grub_err_printf.
4488 2008-08-13 Robert Millan <rmh@aybabtu.com>
4490 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4492 2008-08-13 Robert Millan <rmh@aybabtu.com>
4494 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4497 2008-08-12 Robert Millan <rmh@aybabtu.com>
4499 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4500 of the relocation code from here ...
4501 (grub_multiboot): ... to here.
4502 (forward_relocator, backward_relocator): Move from here ...
4503 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4504 (grub_multiboot_backward_relocator): ... to here.
4505 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4506 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4507 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4508 (grub_multiboot_forward_relocator_end)
4509 (grub_multiboot_backward_relocator)
4510 (grub_multiboot_backward_relocator_end): New variables.
4512 2008-08-12 Bean <bean123ch@gmail.com>
4514 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4516 2008-08-11 Robert Millan <rmh@aybabtu.com>
4518 * kern/i386/linuxbios/startup.S: Move from here ...
4519 * kern/i386/coreboot/startup.S: ... to here.
4521 * kern/i386/linuxbios/init.c: Move from here ...
4522 * kern/i386/coreboot/init.c: ... to here.
4524 * kern/i386/linuxbios/table.c: Move from here ...
4525 * kern/i386/coreboot/mmap.c: ... to here.
4527 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4529 2008-08-11 Robert Millan <rmh@aybabtu.com>
4531 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4532 errors. Leave it to the upper layer to handle them.
4534 2008-08-09 Christian Franke <franke@computer.org>
4536 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4537 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4538 Install `grub.d/10_windows' only on Cygwin.
4539 * configure.ac: Add subst of `target_os'.
4540 Check `target_os' also before setting TARGET_OBJ2ELF.
4541 Add `--enable-grub-pe2elf'.
4543 2008-08-08 Robert Millan <rmh@aybabtu.com>
4545 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4546 (grub_last_time): Change type to grub_uint64_t.
4547 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4548 (grub_disk_close): Likewise.
4550 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4551 (run_menu): Migrate code from to using grub_get_time_ms().
4553 * util/misc.c (grub_get_time_ms): New function.
4555 2008-08-08 Marco Gerards <marco@gnu.org>
4557 * disk/ata.c (grub_ata_regget): Change return type to
4559 (grub_ata_regget2): Likewise.
4560 (grub_ata_wait_status): New function.
4561 (grub_ata_wait_busy): Removed function, updated all users to use
4562 `grub_ata_wait_status'.
4563 (grub_ata_wait_drq): Likewise.
4564 (grub_ata_cmd): New function.
4565 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4567 (grub_ata_pio_write): Add error handling.
4568 (grub_atapi_identify): Likewise.
4569 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4571 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4572 handling. Actually use the detected registers. Reorder the
4573 detection logic such that it is easier to read.
4574 (grub_ata_pciinit): Do not assign the same ID to each controller.
4575 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4577 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4579 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4581 2008-08-08 Marco Gerards <marco@gnu.org>
4585 2008-08-07 Bean <bean123ch@gmail.com>
4587 * include/grub/x86_64/pci.h: New file.
4589 2008-08-07 Christian Franke <franke@computer.org>
4591 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4592 (TIMER2_GATE): Likewise.
4593 (grub_pit_wait): Add enable/disable of the timer2 gate
4594 bit of port 0x61. This fixes a possible infinite loop.
4596 2008-08-07 Bean <bean123ch@gmail.com>
4598 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4599 kern/i386/tsc.c and kern/i386/pit.c.
4601 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4604 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4607 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4609 2008-08-07 Bean <bean123ch@gmail.com>
4611 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4613 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4615 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4616 multiple inclusion. Add #include <grub/types.h>.
4618 2008-08-06 Christian Franke <franke@computer.org>
4620 * conf/common.rmk: Build and install `10_windows'.
4621 * util/grub.d/10_windows.in: New script.
4623 2008-08-06 Pavel Roskin <proski@gnu.org>
4625 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4627 2008-08-06 Robert Millan <rmh@aybabtu.com>
4629 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4630 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4632 2008-08-06 Bean <bean123ch@gmail.com>
4634 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4635 (grub_pxefs_fs_int): Remove dummy definition.
4636 (grub_pxefs_open): Use data->block_size to store the current block
4638 (grub_pxefs_read): Use block size stored in data->block_size. As the
4639 value of grub_pxe_blksize can be changed after the file is opened.
4641 2008-08-06 Bean <bean123ch@gmail.com>
4643 * fs/i386/pc/pxe.c (curr_file): new variable.
4644 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4645 require the dummy internal file system anymore.
4646 (grub_pxefs_read): Removed.
4647 (grub_pxefs_close): Likewise.
4648 (grub_pxefs_fs_int): Likewise.
4649 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4650 connection when we switch file.
4651 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4653 2008-08-06 Robert Millan <rmh@aybabtu.com>
4655 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4657 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4658 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4660 * kern/i386/halt.c: New file.
4661 * kern/i386/reboot.c: Likewise.
4662 * include/grub/i386/reboot.h: Likewise.
4663 * include/grub/i386/halt.h: Likewise.
4665 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4666 Include `<grub/cpu/halt.h>'.
4667 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4668 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4670 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4671 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4672 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4673 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4674 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4675 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4677 * include/grub/i386/at_keyboard.h: ... to here.
4679 2008-08-05 Robert Millan <rmh@aybabtu.com>
4681 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4682 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4683 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4684 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4685 `kern/generic/millisleep.c'.
4687 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4688 instead of grub_get_rtc().
4689 (grub_tsc_init): Initialize `tsc_boot_time'.
4691 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4692 (grub_machine_init): Use grub_tsc_init() rather than
4693 installing an RTC-based handler via grub_install_get_time_ms().
4695 * kern/i386/pit.c: New file.
4696 * include/grub/i386/pit.h: Likewise.
4698 2008-08-05 Bean <bean123ch@gmail.com>
4700 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4702 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4703 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4704 (pxe_mod_SOURCES): New macro.
4705 (pxe_mod_CFLAGS): Likewise.
4706 (pxe_mod_LDFLAGS): Likewise.
4707 (pxecmd_mod_SOURCES): Likewise.
4708 (pxecmd_mod_CFLAGS): Likewise.
4709 (pxecmd_mod_LDFLAGS): Likewise.
4711 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4712 (grub_pxe_call): Likewise.
4714 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4716 * commands/i386/pc/pxecmd.c: New file.
4718 * fs/i386/pc/pxe.c: Likewise.
4720 * include/grub/i386/pc/pxe.h: Likewise.
4722 2008-08-05 Bean <bean123ch@gmail.com>
4724 * util/console.c (grub_console_cur_color): New variable.
4725 (grub_console_standard_color): Likewise.
4726 (grub_console_normal_color): Likewise.
4727 (grub_console_highlight_color): Likewise.
4728 (color_map): Likewise.
4729 (use_color): Likewise.
4730 (NUM_COLORS): New macro.
4731 (grub_ncurses_setcolorstate): Handle color properly.
4732 (grub_ncurses_setcolor): Don't change color here, just remember the
4733 settings, color will be set in grub_ncurses_setcolorstate.
4734 (grub_ncurses_getcolor): New function.
4735 (grub_ncurses_init): Initialize color pairs.
4736 (grub_ncurses_term): New member grub_ncurses_getcolor.
4738 2008-08-05 Colin D Bennett <colin@gibibit.com>
4740 High resolution timer support. Implemented for x86 CPUs using TSC.
4741 Extracted generic grub_millisleep() so it's linked in only as needed.
4742 This requires a Pentium compatible CPU; if the RDTSC instruction is
4743 not supported, then it falls back on the generic grub_get_time_ms()
4744 implementation that uses the machine's RTC.
4746 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4747 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4748 `kern/generic/millisleep.c'.
4750 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4751 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4753 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4754 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4756 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4758 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4759 `kern/generic/millisleep.c'.
4761 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4763 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4765 * kern/generic/rtc_get_time_ms.c: New file.
4767 * kern/generic/millisleep.c: New file.
4769 * kern/misc.c: Don't include
4770 <kern/time.h> anymore.
4771 (grub_millisleep_generic): Removed.
4773 * commands/sleep.c (grub_interruptible_millisleep): Uses
4774 grub_get_time_ms() instead of grub_get_rtc().
4776 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4778 (grub_cpu_is_cpuid_supported): New inline function.
4779 (grub_cpu_is_tsc_supported): New inline function.
4780 (grub_tsc_init): New function prototype.
4781 (grub_tsc_get_time_ms): New function prototype.
4783 * kern/i386/tsc.c (grub_get_time_ms): New file.
4785 * include/grub/time.h: Include <grub/types.h.
4786 (grub_millisleep_generic): Removed.
4787 (grub_get_time_ms): New prototype.
4788 (grub_install_get_time_ms): New prototype.
4789 (grub_rtc_get_time_ms): New prototype.
4791 * kern/time.c (grub_get_time_ms): New function.
4792 (grub_install_get_time_ms): New function.
4794 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4795 <grub/time.h> anymore.
4796 (grub_millisleep): Removed.
4797 (grub_machine_init): Call grub_tsc_init.
4799 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4800 get_time_ms() implementation.
4802 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4803 (ieee1275_get_time_ms): New function.
4804 (grub_machine_init): Install get_time_ms() implementation.
4806 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4807 (grub_machine_init): Call grub_tsc_init().
4808 (grub_millisleep): Removed.
4810 * kern/ieee1275/init.c (grub_millisleep): Removed.
4811 (grub_machine_init): Install ieee1275_get_time_ms()
4813 (ieee1275_get_time_ms): New function.
4814 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4817 2008-08-05 Marco Gerards <marco@gnu.org>
4819 * disk/ata.c: Include <grub/pci.h>.
4820 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4821 (grub_ata_initialize): Rewritten.
4822 (grub_ata_device_initialize): New function.
4824 2008-08-04 Pavel Roskin <proski@gnu.org>
4826 * kern/main.c: Include grub/mm.h.
4828 2008-08-04 Robert Millan <rmh@aybabtu.com>
4830 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4831 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4832 corruption problem).
4834 2008-08-04 Robert Millan <rmh@aybabtu.com>
4836 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4837 warnings introduced in my last commit.
4839 2008-08-03 Robert Millan <rmh@aybabtu.com>
4841 Make PCI available on all i386 architectures.
4843 * include/grub/i386/pc/pci.h: Move from here ...
4844 * include/grub/i386/pci.h: ... to here.
4846 * include/grub/i386/pc/pci.h: Remove.
4847 * include/grub/i386/efi/pci.h: Remove.
4848 * include/grub/x86_64/efi/pci.h: Remove.
4850 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4853 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4854 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4855 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4857 * conf/i386-ieee1275.rmk: Likewise.
4859 2008-08-03 Robert Millan <rmh@aybabtu.com>
4861 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4862 (grub_console_setcursor): Make it possible to set cursor off.
4864 2008-08-03 Robert Millan <rmh@aybabtu.com>
4866 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4867 of modules instead of assuming which platform provides what.
4868 * util/update-grub.in: Likewise.
4870 2008-08-03 Robert Millan <rmh@aybabtu.com>
4872 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4873 instead of `grub_install_dos_part' to determine whether a drive needs
4874 to be prepended to prefix (`grub_install_dos_part' is not reliable,
4875 because it can be overridden when loading GRUB via Multiboot).
4877 2008-08-02 Robert Millan <rmh@aybabtu.com>
4879 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4881 2008-08-02 Robert Millan <rmh@aybabtu.com>
4883 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4884 of informational grub_dprintf() calls.
4886 2008-08-02 Robert Millan <rmh@aybabtu.com>
4888 * disk/memdisk.c (memdisk_size): Don't initialize.
4889 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4891 * include/grub/i386/pc/kernel.h
4892 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4893 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4894 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4895 (grub_arch_memdisk_size): Remove.
4897 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4898 field (was only used to transfer a constant). Add `type' field to
4899 support multiple module types.
4900 (grub_module_iterate): New function.
4902 * kern/device.c (grub_device_open): Do not hide error messages
4903 when grub_disk_open() fails. Use grub_print_error() instead.
4905 * kern/i386/pc/init.c (grub_arch_modules_addr)
4906 (grub_arch_memdisk_size): Remove functions.
4907 (grub_arch_modules_addr): Return the module address in high memory
4908 (now that it isn't copied anymore).
4910 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4911 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4912 decompression routine (grub_total_module_size already includes that
4913 now). Don't copy modules back to low memory.
4915 * kern/main.c: Include `<grub/mm.h>'.
4916 (grub_load_modules): Split out (and use) ...
4917 (grub_module_iterate): ... this function, which iterates through
4918 module objects and runs a hook.
4919 Comment out grub_mm_init_region() call, as it would cause non-ELF
4920 modules to be overwritten.
4922 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4923 the memdisk image in its own region, make it part of the module list.
4924 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4925 (main): Parse --memdisk|-m option, and pass user-provided path as
4926 parameter to generate_image().
4927 (add_segments): Pass `memdisk_path' down to load_modules().
4928 (load_modules): Embed memdisk image in module section when requested.
4929 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4930 `header.type' instead of `header.offset'.
4932 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4933 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4934 (memdisk_mod_LDFLAGS): New variables.
4935 * conf/i386-coreboot.rmk: Likewise.
4936 * conf/i386-ieee1275.rmk: Likewise.
4938 2008-08-02 Robert Millan <rmh@aybabtu.com>
4940 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4941 (backward_relocator): New variables. Used to allocate and relocate
4942 the payload, respectively.
4943 (grub_multiboot_load_elf32): Load into heap instead of requested
4944 address, install the appropriate relocator code in each bound of
4945 the payload, and set the entry point such that
4946 grub_multiboot_real_boot() will jump to one of them.
4948 * kern/i386/loader.S (grub_multiboot_payload_size)
4949 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4950 (grub_multiboot_payload_entry_offset): New variables.
4951 (grub_multiboot_real_boot): Set cpu context to what the relocator
4952 expects, and jump to the relocator instead of the payload.
4954 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4955 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4956 (grub_multiboot_payload_entry_offset): Export.
4958 2008-08-01 Bean <bean123ch@gmail.com>
4960 * normal/menu_entry.c (editor_getline): Don't return the original
4961 string as result, as it will be released by lexer once it has done
4964 2008-08-01 Robert Millan <rmh@aybabtu.com>
4966 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4967 within menuentries, not before them.
4968 util/grub.d/10_hurd.in: Likewise.
4970 2008-08-01 Bean <bean123ch@gmail.com>
4972 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4973 (bufio_mod_SOURCES): New macro.
4974 (bufio_mod_CFLAGS): Likewise.
4975 (bufio_mod_LDFLAGS): Likewise.
4977 * include/grub/bufio.h: New file.
4979 * io/bufio.c: Likewise.
4981 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4982 (grub_video_reader_png): Use grub_buffile_open to open file.
4984 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4985 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4987 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4988 (grub_video_reader_tga): Use grub_buffile_open to open file.
4990 * font/manager.c: Include <grub/bufio.h>.
4991 (add_font): Use grub_buffile_open to open file.
4993 2008-07-31 Robert Millan <rmh@aybabtu.com>
4995 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4996 ELF segments, use a macro for arbitrarily accessing any of them instead
4997 of preparing a pointer that allows access to one at a time.
4998 (grub_multiboot_load_elf64): Likewise.
5000 2008-07-31 Bean <bean123ch@gmail.com>
5002 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5003 GRUB_KERNEL_MACHINE_DATA_END.
5005 2008-07-30 Robert Millan <rmh@aybabtu.com>
5007 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5008 Increase from 0x50 to 0x60.
5009 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5010 use UUIDs to identify the root drive for them. If that's not
5012 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5013 check, for cross-disk installs.
5015 2008-07-30 Robert Millan <rmh@aybabtu.com>
5017 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5018 is non-empty, use it to set the `prefix' environment variable instead
5019 of the usual approach.
5020 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5021 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5022 environment variable instead of dummy make_install_device().
5024 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5025 (start): Insert a data section, with `grub_prefix' variable.
5026 * kern/i386/linuxbios/startup.S: Likewise.
5028 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5029 New variable reference.
5030 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5031 New macro. Defines offset of `grub_prefix' within startup.S (relative
5033 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
5034 section within startup.S (relative to `start').
5035 * include/grub/i386/coreboot/kernel.h: Likewise.
5037 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5038 Overwrite grub_prefix with its contents, at the beginning of the
5040 (main): Understand -p|--prefix.
5042 2008-07-30 Robert Millan <rmh@aybabtu.com>
5044 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5046 2008-07-30 Robert Millan <rmh@aybabtu.com>
5048 * term/i386/pc/vga_text.c (grub_console_cls): Use
5049 grub_console_gotoxy() to go back to beginning of the screen.
5050 Found by Patrick Georgi <patrick.georgi@coresystems.de>
5052 2008-07-29 Christian Franke <franke@computer.org>
5054 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5055 Add conversion of emulated mount points on Cygwin.
5057 2008-07-29 Christian Franke <franke@computer.org>
5059 * util/update-grub.in: Add a check for admin
5061 Remove old `grub.cfg.new' before creation.
5062 Add `-f' to `mv' to handle the different filesystem
5063 semantics of Windows.
5065 2008-07-29 Bean <bean123ch@gmail.com>
5067 * normal/main.c (get_line): Fix buffer overflow bug.
5069 2008-07-28 Robert Millan <rmh@aybabtu.com>
5071 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5072 (struct grub_apple_header): New struct. Describes the layout of
5074 (apple_partition_map_iterate): Check the header magic as well as the
5075 partition magic (which was already being checked).
5077 2008-07-28 Pavel Roskin <proski@gnu.org>
5079 * genmk.rb: Add a warning to the beginning of the output that
5080 it's a generated file and should not be edited.
5082 2008-07-28 Robert Millan <rmh@aybabtu.com>
5084 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5085 with the same number are found, just use issue a warning with
5086 grub_dprintf(), as this error has been reported to be non-fatal.
5088 2008-07-27 Robert Millan <rmh@aybabtu.com>
5090 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5093 2008-07-27 Bean <bean123ch@gmail.com>
5095 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5096 (grub_fat_find_dir): Ignore case when comparing filename.
5098 2008-07-27 Bean <bean123ch@gmail.com>
5100 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5101 smallino, as it's more descriptive, and i8count can be confused with
5102 the other field count.
5103 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5106 2008-07-27 Bean <bean123ch@gmail.com>
5108 * commands/crc.c: New file.
5110 * lib/crc.c: Likewise.
5112 * include/grub/lib/crc.h: Likewise.
5114 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5116 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5117 (hexdump): Move this function to ...
5119 * lib/hexdump.c: ... here.
5121 * include/grub/hexdump.h: Renamed to ...
5123 * include/grub/lib/hexdump.h: ... this.
5125 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5127 * util/grub-editenv.c: Likewise.
5129 * include/envblk.h: Renamed to ...
5131 * include/lib/envblk.h: ... this.
5133 * util/envblk.c: Renamed to ...
5135 * lib/envblk.c: ... this.
5137 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5139 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5140 (pkglib_MODULES): Add crc.mod.
5141 (hexdump_mod_SOURCES): Add lib/hexdump.c.
5142 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5143 (crc_mod_SOURCES): New macro.
5144 (crc_mod_CFLAGS): Likewise.
5145 (crc_mod_LDFLAGS): Likewise.
5147 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5149 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5151 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5155 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5157 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
5159 * commands/help.c: Include <grub/term.h>.
5160 (TERM_WIDTH): Removed. Updated all users.
5162 2008-07-27 Pavel Roskin <proski@gnu.org>
5164 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5165 spurious warnings about a comment within a comment.
5167 2008-07-25 Robert Millan <rmh@aybabtu.com>
5169 * util/getroot.c (find_root_device): Skip devices that match
5170 /dev/dm-[0-9]. This lets the real device be found for any type of
5171 abstraction (LVM, EVMS, RAID..).
5172 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5173 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5174 device is found first, find_root_device() will now skip it.
5176 2008-07-24 Pavel Roskin <proski@gnu.org>
5178 * include/grub/types.h: Use __builtin_bswap32() and
5179 __builtin_bswap64() with gcc 4.3 and newer.
5181 2008-07-24 Christian Franke <franke@computer.org>
5183 * util/i386/pc/grub-install.in: If `--debug' is specified,
5184 pass `--verbose' to grub-setup.
5185 Abort script if make_system_path_relative_to_its_root() fails.
5187 2008-07-24 Bean <bean123ch@gmail.com>
5189 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5190 variable `target_platform' should be `platform'.
5192 2008-07-24 Bean <bean123ch@gmail.com>
5194 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5195 (grub_png_init_fixed_block): New function.
5196 (grub_png_decode_image_data): Handle fixed huffman code compression.
5198 2008-07-24 Bean <bean123ch@gmail.com>
5200 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5201 (grub_pe2elf_SOURCES): New macro.
5202 (CLEANFILES): Add grub-pe2elf.
5204 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5205 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5206 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5207 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5208 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5209 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5210 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5211 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5212 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5213 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5214 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5215 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5216 (GRUB_PE32_DT_FUNCTION): Likewise.
5217 (GRUB_PE32_REL_I386_DIR32): Likewise.
5218 (GRUB_PE32_REL_I386_REL32): Likewise.
5219 (grub_pe32_symbol): New structure.
5220 (grub_pe32_reloc): Likewise.
5222 * util/grub-pe2elf.c: New file.
5224 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5225 start symbol in non pc platform.
5227 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5229 The following patches are from Christian Franke.
5231 * include/grub/dl.h: Remove .previous, gas supports this only
5234 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5235 Remove .type, gas supports this only for ELF format.
5237 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5238 nullbytes in symbol table. This fixes an infinite loop if table is
5241 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5242 TARGET_IMG_LDFLAGS and EXEEXT.
5244 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5245 TARGET_IMG_LDFLAGS_AC.
5246 (grub_CHECK_STACK_ARG_PROBE): New function.
5248 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5250 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5252 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5253 to set TARGET_IMG_LD* accordingly.
5254 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5255 Add call to grub_CHECK_STACK_ARG_PROBE.
5256 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5258 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5260 * genmk.rb: Add EXEEXT to CLEANFILES.
5262 2008-07-23 Robert Millan <rmh@aybabtu.com>
5264 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5265 define the codes for arrows and lines used for the menu).
5266 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5269 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5270 fonts, because the latter are too slow.
5272 2008-07-21 Bean <bean123ch@gmail.com>
5274 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5275 a20. Run keyboard test last, as it will cause macbook to halt.
5277 2008-07-18 Pavel Roskin <proski@gnu.org>
5279 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5280 load foreign architecture modules correctly anyway. Keep
5281 support for loading host architecture modules, whether we
5282 compile them or not.
5284 2008-07-17 Pavel Roskin <proski@gnu.org>
5286 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5287 change target_cpu. The compiler default can mismatch target_cpu
5290 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5291 * kern/efi/efi.c: Likewise.
5293 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5294 target compiler is functional.
5295 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5298 * configure.ac: Default to efi platform for x86_64-apple. Allow
5299 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5300 adjustments from the rest, only do them if target is not
5301 explicitly given. Merge other adjustments with the final sanity
5302 check. Remove an extraneous check for supported CPU. Be
5303 specific which CPU and which platform is not supported.
5305 * configure.ac: Default to pc platform for x86_64.
5307 2008-07-17 Robert Millan <rmh@aybabtu.com>
5309 Partial LinuxBIOS -> Coreboot rename.
5311 * conf/i386-linuxbios.rmk: Renamed to ...
5312 * conf/i386-coreboot.rmk: ... this.
5313 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5314 * configure.ac: Accept "coreboot" as input platform (but maintain
5315 compatibility with "linuxbios").
5316 * include/grub/i386/linuxbios: Renamed to ...
5317 * include/grub/i386/coreboot: ... this.
5319 2008-07-17 Bean <bean123ch@gmail.com>
5321 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5322 (appleldr_mod_SOURCE): New variable.
5323 (appleldr_mod_CFLAGS): Likewise.
5324 (appleldr_mod_LDFLAGS): Likewise.
5325 (pci_mod_SOURCES): Likewise.
5326 (pci_mod_CFLAGS): Likewise.
5327 (pci_mod_LDFLAGS): Likewise.
5328 (lspci_mod_SOURCES): Likewise.
5329 (lspci_mod_CFLAGS): Likewise.
5330 (lspci_mod_LDFLAGS): Likewise.
5332 * conf/x86_64-efi.rmk: New file.
5334 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5336 (grub_efidisk_write): Likewise.
5338 * include/efi/api.h (efi_call_0): New macro.
5339 (efi_call_1): Likewise.
5340 (efi_call_2): Likewise.
5341 (efi_call_3): Likewise.
5342 (efi_call_4): Likewise.
5343 (efi_call_5): Likewise.
5344 (efi_call_6): Likewise.
5346 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5347 grub_rescue_cmd_chainloader.
5349 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5350 (grub_pe32_optional_header): Change some fields based on i386 or
5352 (GRUB_PE32_PE32_MAGIC): Likewise.
5354 * include/grub/efi/uga_draw.h: New file.
5356 * include/grub/elf.h (STN_ABS): New constant.
5357 (R_X86_64_NONE): Relocation constant for x86_64.
5358 (R_X86_64_64): Likewise.
5359 (R_X86_64_PC32): Likewise.
5360 (R_X86_64_GOT32): Likewise.
5361 (R_X86_64_PLT32): Likewise.
5362 (R_X86_64_COPY): Likewise.
5363 (R_X86_64_GLOB_DAT): Likewise.
5364 (R_X86_64_JUMP_SLOT): Likewise.
5365 (R_X86_64_RELATIVE): Likewise.
5366 (R_X86_64_GOTPCREL): Likewise.
5367 (R_X86_64_32): Likewise.
5368 (R_X86_64_32S): Likewise.
5369 (R_X86_64_16): Likewise.
5370 (R_X86_64_PC16): Likewise.
5371 (R_X86_64_8): Likewise.
5372 (R_X86_64_PC8): Likewise.
5374 * include/grub/i386/efi/pci.h: New file.
5376 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5377 Change it value based on platform.
5378 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5379 (GRUB_E820_RAM): Likewise.
5380 (GRUB_E820_RESERVED): Likewise.
5381 (GRUB_E820_ACPI): Likewise.
5382 (GRUB_E820_NVS): Likewise.
5383 (GRUB_E820_EXEC_CODE): Likewise.
5384 (GRUB_E820_MAX_ENTRY): Likewise.
5385 (grub_e820_mmap): New structure.
5386 (linux_kernel_header): Change the efi field according to different
5387 kernel version, also field from linux_kernel_header.
5389 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5391 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5392 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5393 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5394 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5395 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5396 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5397 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5398 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5399 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5400 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5402 * include/grub/x86_64/efi/kernel.h: New file.
5404 * include/grub/x86_64/efi/loader.h: Likewise.
5406 * include/grub/x86_64/efi/machine.h: Likewise.
5408 * include/grub/x86_64/efi/pci.h: Likewise.
5410 * include/grub/x86_64/efi/time.h: Likewise.
5412 * include/grub/x86_64/linux.h: Likewise.
5414 * include/grub/x86_64/setjmp.h: Likewise.
5416 * include/grub/x86_64/time.h: Likewise.
5418 * include/grub/x86_64/types.h: Likewise.
5420 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5421 GRUB_TARGET_SIZEOF_VOID_P.
5423 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5424 (grub_efi_locate_handle): Likewise.
5425 (grub_efi_open_protocol): Likewise.
5426 (grub_efi_set_text_mode): Likewise.
5427 (grub_efi_stall): Likewise.
5428 (grub_exit): Likewise.
5429 (grub_reboot): Likewise.
5430 (grub_halt): Likewise.
5431 (grub_efi_exit_boot_services): Likewise.
5432 (grub_get_rtc): Likewise.
5434 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5435 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5436 (grub_efi_allocate_pages): Wrap efi calls.
5437 (grub_efi_free_pages): Wrap efi calls.
5438 (grub_efi_get_memory_map): Wrap efi calls.
5440 * kern/x86_64/dl.c: New file.
5442 * kern/x86_64/efi/callwrap.S: Likewise.
5444 * kern/x86_64/efi/startup.S: Likewise.
5446 * loader/efi/appleloader.c: Likewise.
5448 * loader/efi/chainloader.c (cmdline): New variable.
5449 (grub_chainloader_unload): Wrap efi calls.
5450 (grub_chainloader_boot): Likewise.
5451 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5454 * loader/efi/chainloader_normal.c (chainloader_command):
5455 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5458 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5460 (grub_e820_add_region): New function.
5461 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5463 (grub_find_video_card): New function.
5464 (grub_linux_setup_video): New function.
5465 (grub_rescue_cmd_linux): Probe for video information.
5467 * normal/x86_64/setjmp.S: New file.
5469 * term/efi/console.c (map_char): New function.
5470 (grub_console_putchar): Map unicode char.
5471 (grub_console_checkkey): Wrap efi calls.
5472 (grub_console_getkey): Likewise.
5473 (grub_console_getwh): Likewise.
5474 (grub_console_gotoxy): Likewise.
5475 (grub_console_cls): Likewise.
5476 (grub_console_setcolorstate): Likewise.
5477 (grub_console_setcursor): Likewise.
5479 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5481 2008-07-16 Pavel Roskin <proski@gnu.org>
5483 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5486 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5487 pointer, not an integer. This fixes a warning and prevents
5488 precision loss on 64-bit systems.
5489 (relocate_addresses): Remove unneeded cast.
5491 2008-07-15 Pavel Roskin <proski@gnu.org>
5493 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5495 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5497 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5498 Fix comparison between signed and unsigned.
5500 * include/grub/i386/ieee1275/console.h: Declare
5501 grub_console_init() and grub_console_fini().
5503 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5504 It's empty and unused.
5506 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5507 beginning to avoid warnings with some compilers.
5509 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5510 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5512 2008-07-14 Pavel Roskin <proski@gnu.org>
5514 * kern/env.c (grub_register_variable_hook): Don't copy empty
5515 string, it leaks memory. Pass "" to grub_env_set(), it should
5516 handle constant strings.
5518 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5519 * commands/cmp.c (grub_cmd_cmp): Likewise.
5520 * kern/dl.c (grub_dl_flush_cache): Likewise.
5521 (grub_dl_load_core): Likewise.
5522 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5523 (grub_elf64_load_phdrs): Likewise.
5525 2008-07-13 Pavel Roskin <proski@gnu.org>
5527 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5528 between signed and unsigned.
5529 (LzmaEnc_Finish): Fix warning about an unused parameter.
5531 2008-07-13 Bean <bean123ch@gmail.com>
5533 * Makefile.in (enable_lzo): New rule.
5535 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5537 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5539 * boot/i386/pc/lnxboot.S: #include <config.h>.
5541 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5542 its value according to the compression algorithm used, lzo or lzma.
5544 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5545 compression algorithm according to configure macro.
5547 * kern/i386/pc/startup.S (codestart): Likewise.
5549 * kern/i386/pc/lzma_decode.S: New file.
5551 * include/grub/lib/LzFind.h: Likewise.
5553 * include/grub/lib/LzHash.h: Likewise.
5555 * include/grub/lib/LzmaDec.h: Likewise.
5557 * include/grub/lib/LzmaEnc.h: Likewise.
5559 * include/grub/lib/LzmaTypes.h: Likewise.
5561 * lib/LzFind.c: Likewise.
5563 * lib/LzmaDec.c: Likewise.
5565 * lib/LzmaEnc.c: Likewise.
5567 2008-07-13 Bean <bean123ch@gmail.com>
5569 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5570 (grub_ext4_extent_header): New structure.
5571 (grub_ext4_extent): Likewise.
5572 (grub_ext4_extent_idx): Likewise.
5573 (grub_ext4_find_leaf): New function.
5574 (grub_ext2_read_block): Handle extents.
5576 2008-07-12 Robert Millan <rmh@aybabtu.com>
5578 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5580 2008-07-11 Robert Millan <rmh@aybabtu.com>
5582 * util/grub.d/40_custom.in: New file. Example on how to add custom
5583 entries to /etc/grub.d.
5584 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5585 40_custom (implicitly, by merging all the grub.d rules).
5587 2008-07-11 Pavel Roskin <proski@gnu.org>
5589 * commands/read.c (grub_getline): Fix invalid memory access.
5590 Don't add newline to the variable value.
5592 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5593 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5594 (serial_hw_get_port): Check validity of the port number.
5595 (grub_cmd_serial): Check return value of serial_hw_get_port().
5597 2008-07-07 Pavel Roskin <proski@gnu.org>
5599 * boot/i386/pc/diskboot.S (notification_string): Replace
5600 "Loading kernel" with just "loading". This is shorter, less
5601 confusing and saves a few bytes for possible future changes.
5603 2008-07-05 Pavel Roskin <proski@gnu.org>
5605 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5606 size for ATAPI devices, they are undefined. Output sector
5607 number in decimal form.
5609 * disk/ata.c: Use named constants for status bits.
5611 2008-07-04 Pavel Roskin <proski@gnu.org>
5613 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5614 grub_addr_t before casting it to the void pointer to fix a
5615 warning. Non-addressable regions are discarded earlier.
5616 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5617 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5618 (check_signature): Don't shadow table_header.
5619 (grub_linuxbios_table_iterate): Cast numeric constants to
5620 grub_linuxbios_table_header_t.
5621 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5624 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5627 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5628 pointer, which can cause warnings. Support 64-bit addresses.
5630 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5631 of sizeof(long). This fixes PowerPC image generation on x86_64.
5633 2008-07-04 Robert Millan <rmh@aybabtu.com>
5635 This fixes a performance issue when pc & gpt partmap iterators
5636 didn't abort iteration even after our hook found what it was
5637 looking for (often causing expensive probes of non-existent drives).
5639 Some callers relied on previous buggy behaviour, since they would
5640 raise an error when their own hooks caused early abortion of its
5643 * kern/device.c (grub_device_open): Improve error message.
5644 * disk/lvm.c (grub_lvm_open): Likewise.
5645 * disk/raid.c (grub_raid_open): Likewise.
5647 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5648 when hook requests it, independently of grub_errno.
5649 (pc_partition_map_probe): Do not fail when find_func() caused
5650 early abortion of pc_partition_map_iterate().
5652 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5653 when hook requests it, independently of grub_errno.
5654 (gpt_partition_map_probe): Do not fail when find_func() caused
5655 early abortion of gpt_partition_map_iterate().
5657 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5658 when hook requests it, independently of grub_errno. Do not fail when
5659 part_map_iterate_hook() caused early abortion of p->iterate().
5661 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5662 when grub_partition_iterate() returned with non-zero.
5664 2008-07-03 Pavel Roskin <proski@gnu.org>
5666 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5667 like we do in grub_ata_pio_read().
5668 (grub_ata_readwrite): Always write individual sectors. Fix the
5669 sector count for the remainder.
5670 (grub_ata_write): Enable writing to ATA devices. Correctly
5671 report error for ATAPI devices.
5673 2008-07-02 Pavel Roskin <proski@gnu.org>
5675 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5678 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5679 for every read sector, we already increment it for the whole
5680 batch. This fixes reading more than 256 sectors at once.
5682 * util/grub-editenv.c (cmd_info): Cast argument to long
5683 explicitly. ptrdiff_t reduces to int on i386.
5685 * util/grub-editenv.c (main): Be specific which parameter is
5688 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5689 (memdisk): Make memdisk_orig_addr a pointer.
5691 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5692 for file offsets, use grub_off_t instead. Fix printf format
5695 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5696 there. Real unexpected warnings should not drown in the noise
5697 about known problems.
5699 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5700 grub_disk_addr_t for memory addresses.
5702 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5703 explicitly to fix a warning.
5705 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5707 * Makefile.in (MODULE_LDFLAGS): New variable.
5708 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5709 the linker accepts --build-id=none.
5710 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5712 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5714 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5715 those in Linux XFS code. Provide a way to access 64-bit parent
5717 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5718 the end of struct grub_xfs_dir_header.
5720 2008-07-02 Bean <bean123ch@gmail.com>
5722 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5723 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5724 and GRUB_IEEE1275_FLAG_NO_ANSI.
5726 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5727 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5728 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5730 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5731 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5733 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5734 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5736 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5737 esc sequence on non ANSI terminal.
5738 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5740 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5743 2008-07-02 Bean <bean123ch@gmail.com>
5745 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5746 (grub_editenv_SOURCES): New variable.
5747 (pkglib_MODULES): Add loadenv.mod.
5748 (loadenv_mod_SOURCES): New variable.
5749 (loadenv_mod_CFLAGS): Likewise.
5750 (loadenv_mod_LDFLAGS): Likewise.
5752 * include/grub/envblk.h: New file.
5754 * util/envblk.c: New file.
5756 * util/grub-editenv.c: New file.
5758 * commands/loadenv.c: New file.
5760 2008-07-01 Pavel Roskin <proski@gnu.org>
5762 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5763 not unsigned char. This fixes warnings and is consistent with
5766 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5768 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5770 * term/tparm.c (analyze): Always set *popcount.
5772 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5773 cast to fix a warning.
5775 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5776 cast to suppress a warning.
5778 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5779 grub_fshelp_read_file() expects.
5781 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5782 write uuid as a 32-bit value in CPU byte order, so declare and
5785 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5786 long if the format specifier expects it.
5787 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5788 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5789 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5790 long to fix a warning.
5791 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5792 grub_dprintf() arguments to fix warnings.
5794 2008-06-30 Pavel Roskin <proski@gnu.org>
5796 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5797 install_bsd_part immediately before core.img is embedded or
5798 modified on disk. This fixes core.img verification if core.img
5801 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5802 core_path to calculate the blocklist.
5803 Patch from Javier MartÃn <lordhabbit@gmail.com>
5805 2008-06-29 Robert Millan <rmh@aybabtu.com>
5807 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5808 block to disk block.
5809 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5810 Patch from Niels Böhm <bitbucket@arcor.de>
5812 2008-06-29 Robert Millan <rmh@aybabtu.com>
5814 * util/update-grub_lib.in (font_path): Search for fonts in
5815 /boot/grub first, which is more likely to be readable (we aren't
5816 deciding where fonts live, just looking for them).
5818 2008-06-26 Pavel Roskin <proski@gnu.org>
5820 * util/biosdisk.c (read_device_map): Don't leave dead map
5821 entries for devices failing stat() check.
5823 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5824 core_path_dev for the core.img path on the target device.
5826 2008-06-26 Robert Millan <rmh@aybabtu.com>
5828 * disk/fs_uuid.c: New file.
5829 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5830 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5831 (fs_uuid_mod_LDFLAGS): New variables.
5832 * include/grub/disk.h (grub_disk_dev_id): Add
5833 `GRUB_DISK_DEVICE_UUID_ID'.
5834 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5835 implement iterate().
5837 2008-06-26 Robert Millan <rmh@aybabtu.com>
5839 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5840 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5841 Linux image includes no initrd.
5843 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
5845 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5846 call to resolve the core image location that effectively appended the
5849 2008-06-21 Robert Millan <rmh@aybabtu.com>
5851 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5854 * util/grub.d/10_hurd.in: ... to here ...
5855 * util/grub.d/10_linux.in: ... and here.
5857 2008-06-19 Robert Millan <rmh@aybabtu.com>
5859 * kern/main.c (grub_main): Export `prefix' variable immediately
5860 after it has been set by grub_machine_set_prefix().
5862 2008-06-19 Robert Millan <rmh@aybabtu.com>
5864 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5865 search result when not saving to variable, not the other way around.
5866 When saving to variable, abort iteration as soon as a match is found.
5868 2008-06-19 Robert Millan <rmh@aybabtu.com>
5870 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5871 check for partition that provides /boot/grub. Its logic is flawed,
5872 as it prevents prepare_grub_to_access_device() from being called
5875 2008-06-19 Robert Millan <rmh@aybabtu.com>
5877 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5878 "insmod" command directly when abstraction modules are needed,
5879 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5880 since it had already been processed).
5882 2008-06-19 Pavel Roskin <proski@gnu.org>
5884 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5885 changed. This is needed in case GRUB_LIBDIR changes.
5886 * conf/i386-ieee1275.rmk: Likewise.
5887 * conf/i386-linuxbios.rmk: Likewise.
5888 * conf/i386-pc.rmk: Likewise.
5889 * conf/powerpc-ieee1275.rmk: Likewise.
5891 2008-06-18 Pavel Roskin <proski@gnu.org>
5893 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5894 kernel_elf_symlist.c to symlist.c for consistency with other
5895 architectures. Update all users.
5896 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5898 2008-06-18 Robert Millan <rmh@aybabtu.com>
5900 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5903 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5904 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5905 a RAID device, run setup() for all members independently on whether
5906 LVM abstraction is being used.
5907 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5908 If grub-mkimage has set `*install_dos_part == -2', don't override this
5910 Perform *install_dos_part adjustments independently on whether
5911 we're embedding or not.
5912 Clarify error message when image is too big for embedding.
5913 Remove duplicate *install_dos_part stanza.
5915 2008-06-17 Robert Millan <rmh@aybabtu.com>
5917 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5918 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5920 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5921 values in grub_ofconsole_normal_color and
5922 grub_ofconsole_highlight_color (they're not directly related to
5923 background and foreground).
5924 (grub_ofconsole_setcolorstate): Extract background and foreground
5925 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5927 2008-06-17 Robert Millan <rmh@aybabtu.com>
5929 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5930 /boot/grub for the check in last commit, not /boot (they could be
5931 different partitions).
5933 2008-06-16 Robert Millan <rmh@aybabtu.com>
5935 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5936 asked to setup access for the same partition that provides /boot,
5937 don't bother using UUIDs since our root already has the value we
5940 2008-06-16 Robert Millan <rmh@aybabtu.com>
5942 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5944 Patch from Sven Mueller <sven@debian.org>.
5946 2008-06-16 Robert Millan <rmh@aybabtu.com>
5948 * util/update-grub.in: Check for $EUID instead of $UID.
5949 Reported by Vincent Zweije.
5951 2008-06-16 Bean <bean123ch@gmail.com>
5953 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5954 (grub_ext2_read_block): Likewise.
5955 (grub_ext2_read_inode): Likewise.
5956 (grub_ext2_mount): Likewise.
5957 (grub_ext2_close): Likewise.
5958 (grub_ext3_get_journal): Removed.
5960 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5961 (grub_reiserfs_read_symlink): Likewise.
5962 (grub_reiserfs_mount): Likewise.
5963 (grub_reiserfs_open): Likewise.
5964 (grub_reiserfs_read): Likewise.
5965 (grub_reiserfs_close): Likewise.
5966 (grub_reiserfs_get_journal): Removed.
5968 * fs/fshelp.c (grub_fshelp_read): Removed.
5969 (grub_fshelp_map_block): Likewise.
5971 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5972 (grub_fshelp_journal): Likewise.
5973 (grub_fshelp_read): Likewise.
5974 (grub_fshelp_map_block): Likewise.
5976 2008-06-16 Pavel Roskin <proski@gnu.org>
5978 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5979 floating point anymore.
5980 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5982 2008-06-15 Pavel Roskin <proski@gnu.org>
5984 * commands/ls.c (grub_ls_list_files): Use integer calculations
5985 for human readable format, avoid floating point use.
5986 * kern/misc.c (grub_ftoa): Remove.
5987 (grub_vsprintf): Remove floating point support.
5989 2008-06-15 Robert Millan <rmh@aybabtu.com>
5991 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5993 Reported by Max Vozeler.
5995 2008-06-15 Robert Millan <rmh@aybabtu.com>
5997 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5998 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6000 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6001 the beginning of the prefix.
6003 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6004 It is assumed that if we have a memdisk, grub-mkimage has set
6005 grub_prefix to include the "(memdisk)" drive in it.
6007 2008-06-15 Robert Millan <rmh@aybabtu.com>
6009 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6010 Initialize keyboard controller after registering the terminal, so that
6011 grub_printf() can be called from grub_keyboard_controller_init().
6013 2008-06-15 Robert Millan <rmh@aybabtu.com>
6015 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6016 extent-btree which is written as big endian on disk.
6017 Reported by Alain Greppin <al@chilibi.org>.
6019 2008-06-14 Robert Millan <rmh@aybabtu.com>
6021 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6022 * util/i386/pc/grub-install.in (modules): Likewise.
6024 2008-06-13 Pavel Roskin <proski@gnu.org>
6026 * commands/ls.c (grub_ls_list_files): Fix format warnings.
6028 2008-06-13 Bean <bean123ch@gmail.com>
6030 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6032 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6034 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6035 to indicate sparse block.
6037 2008-06-12 Pavel Roskin <proski@gnu.org>
6039 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6040 number, grub_fshelp_read() does it for us.
6042 * fs/fshelp.c (grub_fshelp_read): New function. Implement
6043 linear disk read with journal translation.
6044 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6045 * include/grub/fshelp.h: Declare grub_fshelp_read().
6047 2008-06-09 Pavel Roskin <proski@gnu.org>
6049 * fs/minix.c (grub_minix_mount): Handle error reading
6052 2008-06-08 Robert Millan <rmh@aybabtu.com>
6054 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6055 don't append the RAID prefix afterwards.
6056 Reported by Clint Adams.
6058 2008-06-08 Robert Millan <rmh@aybabtu.com>
6060 Based on description from Pavel:
6061 * kern/disk.c (grub_disk_check_range): Rename to ...
6062 (grub_disk_adjust_range): ... this. Add a comment explaining the
6063 tasks performed by this function.
6065 2008-06-08 Robert Millan <rmh@aybabtu.com>
6067 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6068 `num_serial' (for consistency with other variables).
6069 (struct grub_ntfs_data): Add `uuid' member.
6070 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6071 (grub_ntfs_uuid): New function.
6072 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6074 2008-06-07 Pavel Roskin <proski@gnu.org>
6076 * util/biosdisk.c (open_device): Revert last change to the
6077 function, it broke installation. The sector needs to be
6078 different dependent on which device is opened.
6080 2008-06-06 Robert Millan <rmh@aybabtu.com>
6082 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6083 rest of GRUB, and breakage doesn't happen if its value were modified.
6085 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6086 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6087 a constant (same value).
6088 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6089 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6091 2008-06-06 Robert Millan <rmh@aybabtu.com>
6093 * util/biosdisk.c (open_device): Do not modify sector offset when
6094 accessing a partition. kern/disk.c already handles this for us.
6096 2008-06-06 Robert Millan <rmh@aybabtu.com>
6098 * util/grub-emu.c (grub_machine_init): Move code in this function from
6100 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6101 segfault in case grub_printf() is called).
6103 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6104 grub_probe. Update all users not to explicitly add it again.
6105 (grub_device): New variable; contains corresponding device for grubdir.
6106 (fs_module, partmap_module, devabstraction_module): Pass
6107 `--device ${grub_device}' to grub_probe to avoid traversing /dev
6110 2008-06-05 Robert Millan <rmh@aybabtu.com>
6112 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6113 is found, print it (same layout as with labels).
6115 2008-06-04 Robert Millan <rmh@aybabtu.com>
6117 * util/biosdisk.c (get_drive): Rename to ...
6118 (find_grub_drive): ... this. Update all users.
6120 (get_os_disk): Rename to ...
6121 (convert_system_partition_to_system_disk): ... this. Update all users.
6123 (find_drive): Rename to ...
6124 (find_system_device): ... this. Update all users.
6126 2008-06-04 Robert Millan <rmh@aybabtu.com>
6128 * util/biosdisk.c (get_os_disk): Handle IDA devices.
6129 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6130 (make_device_map): Likewise.
6132 2008-06-01 Robert Millan <rmh@aybabtu.com>
6134 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6135 before dereferencing it.
6137 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6138 union with fat12/fat16-specific ones. Add some new fields, including
6139 `num_serial' for both versions.
6140 (struct grub_fat_data): Add `uuid' member.
6141 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6142 names. Initialize `data->uuid' using `num_serial'.
6143 (grub_fat_uuid): New function.
6144 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6146 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6147 (grub_reiserfs_uuid): New function.
6148 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6151 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6152 (grub_xfs_uuid): New function.
6153 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6155 2008-06-01 Robert Millan <rmh@aybabtu.com>
6157 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6158 code that is backward compatible with pre-uuid search command.
6160 2008-05-31 Robert Millan <rmh@aybabtu.com>
6162 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6163 floppies after everything else, to ensure floppy drive isn't accessed
6164 unnecessarily (patch from Bean).
6166 2008-05-31 Robert Millan <rmh@aybabtu.com>
6168 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6169 not print device names when we were asked to set a variable.
6171 2008-05-31 Robert Millan <rmh@aybabtu.com>
6173 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6174 using "cursor-on" and "cursor-off" commands (understood at least by
6175 the Open Firmware flavour on OLPC).
6177 2008-05-31 Michael Gorven <michael@gorven.za.net>
6179 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6180 on and off sequences.
6182 2008-05-31 Robert Millan <rmh@aybabtu.com>
6184 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6185 * util/update-grub.in: Likewise.
6187 2008-05-30 Pavel Roskin <proski@gnu.org>
6189 * util/biosdisk.c (linux_find_partition): Simplify logic and
6190 make the code more universal. Keep special processing for
6191 devfs, but use a simple rule for all other devices. If the
6192 device ends with a number, append 'p' and the partition number.
6193 Otherwise, append only the partition number.
6195 2008-05-30 Robert Millan <rmh@aybabtu.com>
6197 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6198 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6199 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6200 the `root' parameter to Linux.
6202 2008-05-30 Robert Millan <rmh@aybabtu.com>
6204 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6205 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6206 --fs_uuid with --fs-uuid.
6207 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6208 all filesystems support them).
6210 2008-05-30 Robert Millan <rmh@aybabtu.com>
6212 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6213 grub_printf() flags, since we're printing in units of 2 bytes.
6215 2008-05-30 Robert Millan <rmh@aybabtu.com>
6217 * util/grub.d/00_header.in: Remove obsolete comment referencing
6218 convert_system_path_to_grub_path().
6219 * util/update-grub.in: Likewise.
6220 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6221 (convert_system_path_to_grub_path): Add a warning message explaining
6222 that this function is deprecated. Rely on is_path_readable_by_grub()
6223 for the readability checks.
6224 (font_path): Use is_path_readable_by_grub() for the readability
6225 check rather than convert_system_path_to_grub_path().
6227 2008-05-30 Robert Millan <rmh@aybabtu.com>
6229 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6230 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6231 converting it first.
6232 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6233 grub.cfg for access to font file, and afterwards call it again to set
6236 2008-05-30 Robert Millan <rmh@aybabtu.com>
6238 * commands/search.c (options): Add --fs_uuid option.
6239 (search_fs_uuid): New function.
6240 (grub_cmd_search): Fix --set argument passing.
6241 Use search_fs_uuid() when requested via --fs_uuid.
6242 (grub_search_init): Update help message.
6243 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6244 and redeclare it as an array of 16-bit words.
6245 (grub_ext2_uuid): New function.
6246 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6247 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6248 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6249 (GRUB_DEVICE_BOOT_UUID): New variables.
6250 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6251 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6253 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6254 just assume `root' variable has the right value.
6255 * util/grub.d/10_linux.in: Likewise.
6256 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6258 (main): Recognise `-t fs_uuid' argument.
6260 2008-05-30 Robert Millan <rmh@aybabtu.com>
6262 * util/biosdisk.c (map): Redefine structure to hold information
6263 about GRUB drive name.
6264 (get_drive): Reimplement without assuming (and verifying) BIOS-like
6266 (call_hook): Remove.
6267 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6268 member. Assume drive has partitions.
6269 (grub_util_biosdisk_open): Access device names via `.device' struct
6271 (open_device): Likewise.
6272 (find_drive): Likewise.
6273 (read_device_map): Adjust map[] usage to match the new struct
6274 definition. Don't check for duplicates (still possible, but not cheap
6276 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6277 (make_device_name): Remove assumption of BIOS-like drive names.
6279 2008-05-30 Pavel Roskin <proski@gnu.org>
6281 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6282 compiling execute.c doesn't need grub_script.tab.h anymore.
6283 (normal/command.c_DEPENDENCIES): Likewise.
6284 (normal/function.c_DEPENDENCIES): Likewise.
6285 * conf/i386-ieee1275.rmk: Likewise.
6286 * conf/i386-linuxbios.rmk: Likewise.
6287 * conf/i386-pc.rmk: Likewise.
6288 * conf/powerpc-ieee1275.rmk: Likewise.
6289 * conf/sparc64-ieee1275.rmk: Likewise.
6291 2008-05-29 Pavel Roskin <proski@gnu.org>
6293 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6294 when scanning metadata for volume group name.
6296 * include/grub/script.h: Don't include grub_script.tab.h. It's
6297 a generated file, which may only be included from the files with
6298 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6299 use union YYSTYPE, as the later allows forward declaration.
6300 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6302 2008-05-29 Robert Millan <rmh@aybabtu.com>
6304 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6305 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6306 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6307 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6310 2008-05-29 Robert Millan <rmh@aybabtu.com>
6312 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6313 control key combinations.
6315 2008-05-29 Robert Millan <rmh@aybabtu.com>
6317 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6318 * util/ieee1275/grub-install.in: ... to here.
6319 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6320 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6321 (grub_install_SOURCES): Likewise.
6323 2008-05-29 Robert Millan <rmh@aybabtu.com>
6325 * fs/affs.c: Update copyright year.
6326 * fs/ext2.c: Likewise.
6327 * fs/fshelp.c: Likewise.
6328 * fs/hfsplus.c: Likewise.
6329 * fs/ntfs.c: Likewise.
6330 * fs/xfs.c: Likewise.
6331 * include/grub/fshelp.h: Likewise.
6332 * util/grub-mkdevicemap.c: Likewise.
6334 2008-05-28 Robert Millan <rmh@aybabtu.com>
6336 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6337 might need to be fatfs to support some firmware implementations
6340 2008-05-28 Robert Millan <rmh@aybabtu.com>
6342 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6344 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6345 (make_device_map): Likewise.
6347 2008-05-20 Bean <bean123ch@gmail.com>
6349 * fs/fshelp.c (grub_fshelp_map_block): New function.
6350 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6351 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6353 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6354 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6355 (grub_fshelp_journal): New structure.
6356 (grub_fshelp_map_block): New function prototype.
6357 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6358 (grub_fshelp_map_block): Likewise.
6360 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6361 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6362 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6363 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6364 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6365 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6366 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6367 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6368 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6369 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6370 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6371 (grub_ext2_sblock): New members for journal support.
6372 (grub_ext3_journal_header): New structure.
6373 (grub_ext3_journal_revoke_header): Likewise.
6374 (grub_ext3_journal_block_tag): Likewise.
6375 (grub_ext3_journal_sblock): Likewise.
6376 (grub_fshelp_node): New members logfile and journal.
6377 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6378 grub_fshelp_map_block to get real block number.
6379 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6381 (grub_ext2_read_inode): Likewise.
6382 (grub_ext3_get_journal): New function.
6383 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6384 (grub_ext2_close): Release memory used by journal.
6386 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6387 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6388 (grub_reiserfs_transaction_header): Renamed to
6389 grub_reiserfs_description_block, replace field data with real_blocks.
6390 (grub_reiserfs_commit_block): New structure.
6391 (grub_reiserfs_data): New member journal.
6392 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6394 (grub_reiserfs_read_symlink): Likewise.
6395 (grub_reiserfs_iterate_dir): Likewise.
6396 (grub_reiserfs_open): Likewise.
6397 (grub_reiserfs_read): Likewise.
6398 (grub_reiserfs_get_journal): New function.
6399 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6400 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6401 using grub_reiserfs_get_journal.
6402 (grub_reiserfs_close): Release memory used by journal.
6404 * fs/affs.c (grub_affs_read_block): Change block type to
6405 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6407 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6409 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6411 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6413 * fs/udf.c (grub_udf_read_block): Change block type to
6414 grub_disk_addr_t. Use type cast to avoid warning.
6416 * fs/xfs.c (grub_xfs_read_block): Likewise.
6418 2008-05-16 Christian Franke <franke@computer.org>
6420 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6421 to ensure that break with ESC will always work.
6422 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6423 Remove ESC from keyboard queue.
6425 2008-05-16 Christian Franke <franke@computer.org>
6427 * util/biosdisk.c: [__CYGWIN__] Add includes.
6428 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6429 (get_os_disk): Move variable declarations to OS specific
6430 parts to avoid warning.
6431 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6432 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6433 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6435 * util/getroot.c: [__CYGWIN__] Add includes.
6436 (strip_extra_slashes): Fix "/" case.
6437 [__CYGWIN__] (get_win32_path): New function.
6438 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6439 [__CYGWIN__] (find_root_device): Disable.
6440 [__CYGWIN__] (get_bootsec_serial): New function.
6441 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6442 [__linux__] (grub_guess_root_device): Add early returns to simplify
6444 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6445 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6446 check for Linux only.
6448 2008-05-15 Bean <bean123ch@gmail.com>
6450 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6451 keyboard hang problem in apple's intel mac.
6453 2008-05-09 Robert Millan <rmh@aybabtu.com>
6455 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6457 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6458 (make_device_map): Likewise.
6459 Reported by Aurelien Jarno <aurel32@debian.org>
6461 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
6463 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6464 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6465 (make_device_map): Output entries for xvd type disks.
6467 2008-05-07 Robert Millan <rmh@aybabtu.com>
6469 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6471 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6472 (make_device_map): Likewise.
6473 Reported by Roland Dreier <rdreier@cisco.com>
6475 2008-05-07 Robert Millan <rmh@aybabtu.com>
6477 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6478 grub_strstr() call. Correct a few mistakes in failure path handling.
6480 2008-05-06 Robert Millan <rmh@aybabtu.com>
6482 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6483 Do not print a trailing slash (therefore, the root directory is an
6485 (convert_system_path_to_grub_path): Do not remove trailing slash
6486 from make_system_path_relative_to_its_root() output.
6488 * util/i386/pc/grub-install.in: Add trailing slash to output from
6489 make_system_path_relative_to_its_root().
6491 2008-05-06 Robert Millan <rmh@aybabtu.com>
6493 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6494 ensures that output lines aren't intermangled with those sent to
6495 stderr (via grub_util_info()).
6496 * util/grub-probe.c (grub_refresh): Likewise.
6497 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6499 2008-05-05 Christian Franke <franke@computer.org>
6501 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6502 Add Cygwin device names.
6503 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6504 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6505 (check_device): Return error instead of success on empty name.
6506 (make_device_map): Move label inside linux specific code to
6507 prevent compiler warning.
6509 2008-04-30 Robert Millan <rmh@aybabtu.com>
6511 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6512 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6514 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6516 2008-04-29 Robert Millan <rmh@aybabtu.com>
6518 * docs/grub.cfg: New file (example GRUB configuration).
6520 2008-04-26 Robert Millan <rmh@aybabtu.com>
6522 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6523 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6524 and `disk/ieee1275/nand.c'.
6526 2008-04-25 Bean <bean123ch@gmail.com>
6528 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6531 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6532 change the buffer size to 4096 for cdrom device.
6534 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6536 (_linux_mod_SOURCES): New variable.
6537 (_linux_mod_CFLAGS): Likewise.
6538 (_linux_mod_LDFLAGS): Likewise.
6539 (linux_mod_SOURCES): Likewise.
6540 (linux_mod_CFLAGS): Likewise.
6541 (linux_mod_LDFLAGS): Likewise.
6542 (nand_mod_SOURCES): Likewise.
6543 (nand_mod_CFLAGS): Likewise.
6544 (nand_mod_LDFLAGS): Likewise.
6546 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6547 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6548 type property. (nand device in olpc don't have this property)
6550 * include/grub/disk.h (grub_disk_dev_id): New macro
6551 GRUB_DISK_DEVICE_NAND_ID.
6553 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6555 (grub_rescue_cmd_initrd): Likewise.
6557 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6558 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6559 ofw_cif_handler and ofw_idt, adjust padding number.
6561 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6562 GRUB_MACHINE_IEEE1275 is defined.
6564 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6565 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6567 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6568 on nested function heap_init.
6569 (grub_upper_mem): New variable for i386-ieee1275.
6570 (grub_get_extended_memory): New function for i386-ieee1275.
6571 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6573 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6574 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6577 * loader/i386/ieee1275/linux.c: New file.
6579 * loader/i386/ieee1275/linux_normal.c: New file.
6581 * disk/ieee1275/nand.c: New file.
6583 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6585 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6587 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6589 2008-04-18 Robert Millan <rmh@aybabtu.com>
6591 Restructures early code path on ieee1275 to unify grub_main() as
6592 the first C function that is executed in every platform.
6594 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6595 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6597 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6598 * kern/ieee1275/cmain.c (cmain): Rename to ...
6599 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6600 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6603 2008-04-18 Robert Millan <rmh@aybabtu.com>
6605 * util/update-grub.in: Fix syntax error when setting
6606 `GRUB_PRELOAD_MODULES'.
6607 Reported by Stephane Chazelas <stephane@artesyncp.com>
6609 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6611 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6612 section into account, newer toolchains generate unique build ids
6613 * configure.ac: remove the test for --build-id=none acceptance,
6614 we want build ids to be preserved
6615 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6616 far from other sections don't cause the raw binary images grow
6619 2008-04-15 Robert Millan <rmh@aybabtu.com>
6621 * disk/lvm.c: Update copyright year.
6622 * kern/misc.c: Likewise.
6624 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6626 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6627 there is no memory left for physical volume name.
6629 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6631 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6632 volume name mapping to support bigger than 9 character names properly.
6634 2008-04-13 Robert Millan <rmh@aybabtu.com>
6636 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6637 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6639 2008-04-13 Christian Franke <franke@computer.org>
6641 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6642 to create a floppy emulation boot CD when non emulation mode
6644 Enable Joliet CD filesystem extension.
6646 2008-04-13 Robert Millan <rmh@aybabtu.com>
6648 * kern/misc.c (grub_strncat): Fix off-by-one error.
6649 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6651 * kern/env.c (grub_env_context_close): Clear current context, not
6653 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6655 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6657 2008-04-13 Robert Millan <rmh@aybabtu.com>
6659 Improve robustness when handling LVM.
6661 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6662 (and leave `*p' unmodified).
6663 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6665 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6666 iterating through it.
6667 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6669 (grub_lvm_scan_device): Check the return value (and fail gracefully
6670 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6671 Don't assume `vg->pvs != NULL' when iterating through it.
6673 2008-04-13 Robert Millan <rmh@aybabtu.com>
6675 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6676 * genmk.rb (partmap): New variable.
6677 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6678 (#{partmap}): New target rule.
6679 * genpartmaplist.sh: New file.
6680 * Makefile.in (pkglib_DATA): Add partmap.lst.
6681 (partmap.lst): New target rule.
6682 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6683 modules (including all partition maps), instead of preloading them.
6685 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6687 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6688 `linux-boot-prober' (if installed) to detect other operating
6689 systems which are installed on the computer and add them to
6691 * conf/common.rmk: Build and install 30_os-prober.
6693 2008-04-12 Robert Millan <rmh@aybabtu.com>
6695 * kern/powerpc/ieee1275/init.c: Move from here ...
6696 * kern/ieee1275/init.c: ... to here. Update all users.
6698 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6699 * kern/ieee1275/cmain.c: ... to here. Update all users.
6701 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6702 * kern/ieee1275/openfw.c: ... to here. Update all users.
6704 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6705 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6707 2008-04-10 Pavel Roskin <proski@gnu.org>
6709 * configure.ac: Always use "_cv_" in cache variables for
6710 compatibility with Autoconf 2.62.
6712 2008-04-07 Robert Millan <rmh@aybabtu.com>
6714 Revert grub/machine/init.h addition by Pavel (since it breaks on
6715 i386-ieee1275 and others):
6716 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6717 * util/powerpc/ieee1275/misc.c: Likewise.
6719 2008-04-07 Robert Millan <rmh@aybabtu.com>
6721 * util/grub-probe.c (probe): Improve error message.
6723 2008-04-07 Robert Millan <rmh@aybabtu.com>
6725 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6726 (this prevents the presence of a bogus entry from ruining the whole
6729 2008-04-06 Pavel Roskin <proski@gnu.org>
6731 * util/biosdisk.c: Include grub/util/biosdisk.h.
6732 * util/grub-fstest.c (execute_command): Make static.
6733 * util/grub-mkdevicemap.c (check_device): Likewise.
6734 * util/i386/pc/misc.c: Include grub/machine/init.h.
6735 * util/powerpc/ieee1275/misc.c: Likewise.
6736 * util/lvm.c: Include grub/util/lvm.h.
6737 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6739 * util/raid.c: Include grub/util/raid.h.
6740 (grub_util_getdiskname): Make static.
6742 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6743 grub_hostfs_fini(), as they are called from grub_init_all() and
6744 grub_fini_all() respectively. This fixes an infinite loop in
6745 grub-fstest due to double registration of hostfs.
6746 Reported by Christian Franke <Christian.Franke@t-online.de>
6748 2008-04-05 Pavel Roskin <proski@gnu.org>
6750 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6751 all 8 functions. Otherwise, probe function 0 only.
6753 2008-04-04 Pavel Roskin <proski@gnu.org>
6755 * commands/lspci.c (grub_lspci_iter): Print the bus number
6758 * commands/lspci.c (grub_pci_classes): Fix typos.
6759 (grub_lspci_iter): Don't print func twice. Print vendor ID
6760 before device ID, as it's normally done.
6762 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6763 Fix signedness warnings.
6764 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6766 * util/ieee1275/get_disk_name.c: Include config.h so that
6767 _GNU_SOURCE is defined and getline() is declared. Mark an
6768 unused argument as such. Fix a signedness warning.
6770 2008-04-02 Pavel Roskin <proski@gnu.org>
6772 * genkernsyms.sh.in: Use more robust assignments for CC and
6773 srcdir. Quote srcdir.
6774 * gensymlist.sh.in: Likewise. Assert at the compile time that
6775 the symbol table is not empty.
6777 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6778 * fs/cpio.c (grub_cpio_read): Likewise.
6780 2008-04-01 Pavel Roskin <proski@gnu.org>
6782 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6783 * disk/host.c (grub_host_open): Likewise.
6784 * disk/loopback.c (grub_loopback_open): Likewise.
6785 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6786 disk->id as in disk/host.c, not a multi-character constant.
6788 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6789 later is obsolete, potentially dangerous and sets a bad example.
6790 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6791 * util/misc.c (grub_util_get_image_size): Likewise.
6793 * disk/loopback.c (options): Improve help for "--partitions".
6795 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6796 options to align them with the short options, e.g. "echo -e".
6798 2008-03-31 Bean <bean123ch@gmail.com>
6800 * video/reader/png.c (grub_png_data): New member is_16bit and
6802 (grub_png_decode_image_header): Detect 16 bit png image.
6803 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6804 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6805 (grub_video_reader_png): Release memory occupied by image_data.
6807 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6809 (grub_nfs_mount): Skip the test for sector per cluster.
6811 * include/grub/ntfs.h (MAX_SPC): Removed.
6813 2008-03-31 Bean <bean123ch@gmail.com>
6815 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6816 (grub_probe_SOURCES): Add fs/afs.c.
6817 (grub_fstest_SOURCES): Likewise.
6818 (afs_mod_SOURCES): New variable.
6819 (afs_mod_CFLAGS): Likewise.
6820 (afs_mod_LDFLAGS): Likewise.
6822 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6823 (grub_emu_SOURCES): Likewise.
6825 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6827 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6829 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6831 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6833 * fs/afs.c: New file.
6835 2008-03-30 Pavel Roskin <proski@gnu.org>
6837 * disk/host.c: Include grub/misc.h to fix a warning.
6838 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6839 warnings about implicit declarations.
6841 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6843 * include/grub/i386/loader.h: Change declaration of
6844 grub_linux_boot() to match what grub_loader_set() expects.
6845 * util/getroot.c (grub_guess_root_device): Return const char* to
6847 * util/grub-probe.c (probe): Fix a warning about uninitialized
6848 abstraction_name variable.
6849 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6850 second argument as unused to fix a warning.
6852 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6853 missing grub_error() call.
6855 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6856 2.60 and newer uses it to define datadir.
6858 * commands/sleep.c: Fix warning about implicit declaration.
6859 * disk/memdisk.c: Likewise.
6860 * loader/aout.c: Likewise.
6861 * loader/i386/bsd_normal.c: Likewise.
6862 * util/grub-probe.c: Likewise.
6864 * commands/i386/cpuid.c (has_longmode): Make static.
6865 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6866 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6868 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6869 GDT. This is more robust, as %ds can change.
6870 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6871 calling real_to_prot().
6872 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6874 2008-03-28 Pavel Roskin <proski@gnu.org>
6876 * kern/i386/pc/startup.S: Assert that uncompressed functions
6877 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6878 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6879 code, as they push parts of the code (error handlers) beyond
6880 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6881 code as correctness and size.
6883 2008-03-28 Pavel Roskin <proski@gnu.org>
6885 * kern/i386/pc/startup.S
6886 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6887 data block address to the real mode, keep offset minimal. This
6888 works around a bug in AWARD BIOS on old Athlon systems, which
6889 makes CD detection hang.
6891 2008-03-26 Pavel Roskin <proski@gnu.org>
6893 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6895 * include/grub/normal.h: Add grub_parse_color_name_pair()
6898 2008-03-24 Bean <bean123ch@gmail.com>
6900 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6901 (cd_count): Removed.
6902 (cd_drive): New variable.
6903 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6904 (grub_biosdisk_call_hook): Likewise.
6905 (grub_biosdisk_iterate): Change cdrom detection method.
6906 (grub_biosdisk_open): Replace cd_start with cd_drive.
6907 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6908 detect cdrom device.
6910 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6912 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6913 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6914 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6915 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6916 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6917 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6918 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6919 (grub_biosdisk_cdrp): New structure.
6920 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6922 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6924 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6927 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6930 2008-03-20 Robert Millan <rmh@aybabtu.com>
6932 Remove 2 TiB limit in ata.mod.
6933 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6934 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6935 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6936 grub_uint64_t instead of grub_uint32_t.
6938 2008-03-05 Bean <bean123ch@gmail.com>
6940 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6941 (grub_multiboot): Set boot device.
6943 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6945 2008-03-02 Bean <bean123ch@gmail.com>
6947 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6950 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6952 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6955 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6958 * docs/fdl.texi: New file.
6960 * docs/mdate-sh: New file. Copied from gnulib.
6961 * docs/texinfo.tex: Likewise.
6963 * config.guess: Updated from gnulib.
6964 * install-sh: Likewise.
6966 2008-02-28 Robert Millan <rmh@aybabtu.com>
6968 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6969 (aout_mod_SOURCES): New variable.
6970 (aout_mod_CFLAGS): Likewise.
6971 (aout_mod_LDFLAGS): Likewise.
6973 * conf/i386-ieee1275.rmk: Likewise.
6975 2008-02-28 Robert Millan <rmh@aybabtu.com>
6977 * util/update-grub.in: Reorganise terminal validity check. Accept
6978 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6979 Based on suggestion by Franklin PIAT.
6981 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6983 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6985 * util/getroot.c (grub_util_check_block_device): New function that
6986 returns the given argument if it is a block device and returns NULL else.
6987 * util/grub-probe.c (argument_is_device): New variable.
6988 (probe): Promote device_name from a variable to an argument. Receive
6989 device_name from grub_util_check_block_device() if path is NULL and from
6990 grub_guess_root_device() else. Do not free() device_name anymore.
6991 (options): Introduce new parameter '-d, --device'.
6992 (main): Add description of the new parameter to the help screen.
6993 Rename path variable to argument. Set argument_is_device if the '-d'
6994 option is given. Pass argument to probe() depending on
6997 2008-02-24 Bean <bean123ch@gmail.com>
6999 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7000 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7001 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7002 (GRUB_ISO9660_VOLDESC_PART): Likewise.
7003 (GRUB_ISO9660_VOLDESC_END): Likewise.
7004 (grub_iso9660_primary_voldesc): New member escape.
7005 (grub_iso9660_data): New member joliet.
7006 (grub_iso9660_convert_string): New function.
7007 (grub_iso9660_mount): Detect joliet extension.
7008 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7009 (grub_iso9660_iso9660_label): Likewise.
7011 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7012 (grub_setup_SOURCES): Add fs/udf.c.
7013 (grub_fstest_SOURCES): Likewise.
7014 (udf_mod_SOURCES): New variable.
7015 (udf_mod_CFLAGS): Likewise.
7016 (udf_mod_LDFLAGS): Likewise.
7018 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7019 (grub_emu_SOURCES): Likewise.
7021 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7023 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7025 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7027 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7029 * fs/udf.c: New file.
7031 2008-02-24 Robert Millan <rmh@aybabtu.com>
7033 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7034 (normal/lexer.c_DEPENDENCIES): New variables.
7035 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7036 (normal/lexer.c_DEPENDENCIES): Likewise.
7037 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7038 (normal/lexer.c_DEPENDENCIES): Likewise.
7039 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7040 (normal/lexer.c_DEPENDENCIES): Likewise.
7041 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7042 (normal/lexer.c_DEPENDENCIES): Likewise.
7043 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7044 (normal/lexer.c_DEPENDENCIES): Likewise.
7046 2008-02-23 Robert Millan <rmh@aybabtu.com>
7048 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7049 since they were intended to be in hex. This didn't break previously
7050 because of a bug in gpt_partition_map_iterate() (see below).
7052 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7053 when checking the validity of GPT header.
7054 Remove `partno', since it always provides the same information as `i'.
7056 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
7058 * include/grub/efi/time.h: Fix a wrong comment.
7060 2008-02-19 Pavel Roskin <proski@gnu.org>
7062 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7065 2008-02-19 Bean <bean123ch@gmail.com>
7067 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7068 (aout_mod_SOURCES): New variable.
7069 (aout_mod_CFLAGS): Likewise.
7070 (aout_mod_LDFLAGS): Likewise.
7071 (_bsd_mod_SOURCES): New variable.
7072 (_bsd_mod_CFLAGS): Likewise.
7073 (_bsd_mod_LDFLAGS): Likewise.
7074 (bsd_mod_SOURCES): New variable.
7075 (bsd_mod_CFLAGS): Likewise.
7076 (bsd_mod_LDFLAGS): Likewise.
7078 * include/grub/aout.h: New file.
7080 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7082 * include/grub/i386/bsd.h: New file.
7084 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7087 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7088 function is called, so that it's possible to change it inside the hook.
7089 (grub_elf64_load): Likewise.
7090 (grub_elf_file): Don't close the file if elf header is not found.
7091 (grub_elf_close): Close the file if grub_elf_file fails (The new
7092 grub_elf_file won't close it).
7093 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7094 (grub_elf64_size): Likewise.
7096 * kern/i386/loader.S (grub_unix_real_boot): New function.
7098 * loader/aout.c: New file.
7100 * loader/i386/bsd.c: New file.
7102 * loader/i386/bsd_normal.c: New file.
7104 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7106 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7107 can test other formats.
7109 2008-02-19 Robert Millan <rmh@aybabtu.com>
7111 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7112 (grub_gpt_partition_type_empty): Redefine with macro from
7113 `<grub/gpt_partition.h>'.
7114 (gpt_partition_map_iterate): Adjust partition type comparison.
7116 Export `entry' as partmap-specific `part.data' struct.
7117 (grub_gpt_header, grub_gpt_partentry): Move from here ...
7119 * include/grub/gpt_partition.h (grub_gpt_header)
7120 (grub_gpt_partentry): ... to here (new file).
7122 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7124 (grub_gpt_partition_type_bios_boot): New const variable, defined
7125 with macro from `<grub/gpt_partition.h>'.
7127 (setup): Replace `first_start' with `embed_region', which keeps
7128 track of the embed region (and is partmap-agnostic).
7130 Replace find_first_partition_start() with find_usable_region(),
7131 which finds a usable region for embedding using partmap-specific
7132 knowledge (supports PC/MSDOS and GPT).
7134 Fix all assumptions that the embed region start at sector 1, using
7135 `embed_region.start' from now on. Similarly, use `embed_region.end'
7136 rather than `first_start' to calculate available size.
7138 In grub_util_info() message, replace "into after the MBR" with an
7139 indication of the specific sector our embed region starts at.
7141 2008-02-19 Robert Millan <rmh@aybabtu.com>
7143 * DISTLIST: Replace `commands/ieee1275/halt.c' and
7144 `commands/ieee1275/reboot.c' with `commands/halt.c' and
7145 `commands/reboot.c'.
7146 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7147 (halt_mod_SOURCES): Likewise.
7148 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7149 (halt_mod_SOURCES): Likewise.
7151 2008-02-17 Christian Franke <franke@computer.org>
7153 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7155 2008-02-17 Robert Millan <rmh@aybabtu.com>
7157 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7158 set `first_start' to 0 for non-PC/MSDOS partition maps.
7160 2008-02-16 Robert Millan <rmh@aybabtu.com>
7162 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7163 do not assume partition map is PC/MSDOS before performing checks that
7164 are specific to that layout.
7166 2008-02-13 Robert Millan <rmh@aybabtu.com>
7168 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7169 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7170 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7172 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7174 * configure.ac: Only a cosmetic change on the handling of
7175 -fno-stack-protector.
7177 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
7179 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7180 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7182 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7183 (halt_mod_SOURCES): New variable.
7184 (halt_mod_CFLAGS): Likewise.
7185 (halt_mod_LDFLAGS): Likewise.
7186 (reboot_mod_SOURCES): Likewise.
7187 (reboot_mod_CFLAGS): Likewise.
7188 (reboot_mod_LDFLAGS): Likewise.
7190 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7191 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7193 (halt_mod_SOURCES): Likewise.
7194 (reboot_mod_SOURCES): Likewise.
7196 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7197 commands/i386/pc/reboot.c by commands/reboot.c.
7198 (reboot_mod_SOURCES): Likewise.
7200 * commands/i386/pc/reboot.c: merge this file ...
7202 * commands/ieee1275/reboot.c: ... and this file ...
7204 * commands/reboot.c: ... to this file.
7205 Add some precompiler directive to include the correct header for
7208 * commands/ieee1275/halt.c: move this file ...
7210 * commands/halt.c: ... to here.
7211 Add some precompiler directive to include the correct header for
7214 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7215 (grub_halt): Likewise.
7217 * kern/efi/efi.c (grub_reboot): New function.
7218 (grub_halt): Likewise.
7220 2008-02-12 Robert Millan <rmh@aybabtu.com>
7222 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7223 /dev (like it is done for /dev/mapper). This doesn't provide support
7224 for EVMS, but at least it is now easy to identify the problem when it
7227 2008-02-11 Robert Millan <rmh@aybabtu.com>
7229 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7230 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7231 comparing it with -1, not 0.
7233 2008-02-10 Robert Millan <rmh@aybabtu.com>
7235 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7237 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7238 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7240 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7241 `disk/lvm.c' to the end of the list.
7242 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7243 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7245 2008-02-10 Robert Millan <rmh@aybabtu.com>
7247 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7248 grub_print_error() instead. This will let user know why we're entering
7250 Based on suggestions from Sam Morris.
7252 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
7254 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7255 on remaining N args, instead of "--" arg N times.
7257 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7259 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7260 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7261 pattern for unknown glyphs.
7263 2008-02-09 Robert Millan <rmh@aybabtu.com>
7265 * configure.ac: Probe for `help2man'.
7266 * Makefile.in (builddir): New variable.
7267 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7268 or otherwise add a few flags/options to it.
7269 (install-local): For every executable utility or script that is
7270 installed, invoke $(HELP2MAN) to install a manpage based on --help
7273 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7274 that it doesn't prevent --help from working in build tree.
7276 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7277 with `bug-grub@gnu.org'.
7278 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7279 * util/update-grub.in (usage): New function.
7280 Implement proper argument check, with support for --help and --version
7281 (as well as existing -y).
7283 2008-02-09 Christian Franke <franke@computer.org>
7285 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7286 avoid overwriting previous output.
7287 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7289 2008-02-09 Robert Millan <rmh@aybabtu.com>
7291 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7294 2008-02-09 Robert Millan <rmh@aybabtu.com>
7296 * commands/sleep.c: New file.
7297 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7298 (sleep_mod_SOURCES): New variable.
7299 (sleep_mod_CFLAGS): Likewise.
7300 (sleep_mod_LDFLAGS): Likewise.
7302 2008-02-09 Robert Millan <rmh@aybabtu.com>
7304 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7305 situations in which we can deduce the RAID size and the superblock
7308 2008-02-09 Robert Millan <rmh@aybabtu.com>
7310 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7311 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7312 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7314 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7315 and return a grub_diskmemberlist_t composed of physical array members.
7316 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7318 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7320 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7321 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7322 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7324 * util/grub-probe.c (probe): Move partmap probing code from here ...
7325 (probe_partmap): ... to here.
7326 (probe): Use probe_partmap() once for the disk we're probing, and
7327 additionally, when such disk contains a memberlist() struct member,
7328 once for each disk that is contained in the structure returned by
7331 2008-02-09 Robert Millan <rmh@aybabtu.com>
7333 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7334 environment variable to 'all' in order to obtain debug output from
7336 * util/i386/pc/grub-setup.c (main): Likewise.
7338 2008-02-08 Robert Millan <rmh@aybabtu.com>
7340 * disk/raid.c (grub_raid_scan_device): Check for
7341 `array->device[sb.this_disk.number]' rather than for
7342 `array->device[sb.this_disk.number]->name', since the latter is not
7343 guaranteed to be accessible.
7345 2008-02-08 Robert Millan <rmh@aybabtu.com>
7347 * disk/raid.c: Update copyright.
7348 * fs/cpio.c: Likewise.
7349 * include/grub/raid.h: Likewise.
7350 * loader/i386/pc/multiboot.c: Likewise.
7351 * util/hostfs.c: Likewise.
7353 2008-02-08 Robert Millan <rmh@aybabtu.com>
7355 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7356 to a grub_disk_t array.
7357 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7359 (grub_raid_scan_device): Replace `device[x].name' accesses with
7360 `device[x]->name'. Simplify initialization of `array->device[x]'.
7362 2008-02-08 Robert Millan <rmh@aybabtu.com>
7364 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7365 grub_dprintf() calls.
7366 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7369 2008-02-07 Christian Franke <franke@computer.org>
7371 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7372 instead of fseek and ftell to support large files.
7373 (grub_hostfs_read): Likewise.
7375 2008-02-07 Robert Millan <rmh@aybabtu.com>
7377 Patch from Jeroen Dekkers.
7378 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7379 failure, since successfully reading all array members might not be
7382 2008-02-06 Robert Millan <rmh@aybabtu.com>
7384 * util/grub-probe.c (probe): Simplify partmap probing (with the
7385 assumption that the first word up to the underscore equals to
7388 2008-02-06 Christian Franke <franke@computer.org>
7390 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7391 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7392 last block of a cpio or tar stream.
7393 Check for "TRAILER!!!" instead of any empty data
7394 block to detect last block of a cpio stream.
7395 (grub_cpio_dir): Fix constness of variable np.
7396 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7397 cpio or tar trailer is detected. This fixes a crash
7398 on open of a non existing file.
7400 2008-02-05 Bean <bean123ch@gmail.com>
7402 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7404 (grub_multiboot_load_elf64): Likewise.
7405 (grub_multiboot): Initialize mbi structure.
7407 * util/grub-fstest.c: Don't include unused header file script.h.
7409 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7411 (grub_fstest_SOURCES): Likewise.
7413 2008-02-05 Robert Millan <rmh@aybabtu.com>
7415 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7416 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7417 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7418 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7420 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7421 (translation_table): Replace hardcoded values with macros
7422 provided by `<grub/term.h>'.
7424 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7425 (keyboard_map): Correct/add a few values, with macros provided
7427 (keyboard_map_shift): Zero values that don't differ from their
7428 `keyboard_map' equivalents.
7429 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7430 Discard the second scan code that is always sent by Caps lock.
7431 Only use `keyboard_map_shift' when it provides a non-zero value,
7432 otherwise fallback to `keyboard_map'.
7434 2008-02-04 Bean <bean123ch@gmail.com>
7436 * Makefile.in (enable_grub_fstest): New variable.
7438 * conf/common.rmk (grub_fstest_init.lst): New rule.
7439 (grub_fstest_init.h): Likewise.
7440 (grub_fstest_init.c): Likewise.
7441 (util/grub-fstest.c_DEPENDENCIES): New variable.
7442 (grub_fstest_SOURCES): Likewise.
7444 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7446 * util/grub-fstest.c: New file.
7448 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7450 Make grub-setup handle a separate root device.
7452 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7453 so that the root device can be compared with the destination
7455 When embedding the core image, if the root and destination devices
7456 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7458 When not embedding, set ROOT_DRIVE to 0xFF.
7460 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7462 Add support for having a grub directory in a different drive. This
7463 is still only the data handling part.
7465 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7466 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7467 (grub_root_drive): New variable.
7469 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7470 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7471 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7474 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7476 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7478 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7480 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7481 is bogus, because PXE booting does not specify any drive
7484 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7485 am not sure if this is really correct.
7487 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7488 is always identical to the boot drive when booting from a CD.
7490 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7492 (root_drive): New variable.
7493 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7494 (setup_sectors): Push %dx right after popping it, because %dh will
7496 (copy_buffer): Restore %dx.
7498 2008-02-03 Robert Millan <rmh@aybabtu.com>
7500 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7501 use `cdboot.img' for cdrom images.
7503 2008-02-03 Robert Millan <rmh@aybabtu.com>
7505 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7506 only setup gfxterm when `font' command has succeeded.
7508 2008-02-03 Robert Millan <rmh@aybabtu.com>
7510 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7511 (grub_rescue_cmd_multiboot_loader)
7512 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7514 2008-02-03 Pavel Roskin <proski@gnu.org>
7516 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7517 %edx and %esi from stack only after grub_gate_a20() is called.
7518 grub_gate_a20() clobbers %edx.
7520 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7522 * configure.ac (AC_INIT): Bumped to 1.96.
7524 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7525 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7526 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7527 video/readers/png.c.
7529 2008-02-03 Bean <bean123ch@gmail.com>
7531 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7532 (cdboot_img_SOURCES): New variable.
7533 (cdboot_img_ASFLAGS): New variable.
7534 (cdboot_img_LDFLAGS): New variable.
7536 * boot/i386/pc/cdboot.S: New file.
7538 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7539 (cd_count): Likewise.
7540 (grub_biosdisk_get_drive): Add support for cd device.
7541 (grub_biosdisk_call_hook): Likewise.
7542 (grub_biosdisk_iterate): Likewise.
7543 (grub_biosdisk_open): Likewise.
7544 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7545 (grub_biosdisk_rw): Support reading from cd device.
7546 (GRUB_MOD_INIT): Iterate cd devices.
7548 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7549 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7550 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7552 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7554 2008-02-02 Robert Millan <rmh@aybabtu.com>
7556 * commands/read.c: New file.
7557 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7558 (read_mod_SOURCES): New variable.
7559 (read_mod_CFLAGS): Likewise.
7560 (read_mod_LDFLAGS): Likewise.
7562 2008-02-02 Robert Millan <rmh@aybabtu.com>
7564 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7565 determining whether menu has to be displayed.
7567 2008-02-02 Marco Gerards <marco@gnu.org>
7569 * bus/pci.c: New file.
7571 * include/grub/pci.h: Likewise.
7573 * include/grub/i386/pc/pci.h: Likewise.
7575 * commands/lspci.c: Likewise.
7577 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7579 (pci_mod_SOURCES): New variable.
7580 (pci_mod_CFLAGS): Likewise.
7581 (pci_mod_LDFLAGS): Likewise.
7582 (lspci_mod_SOURCES): Likewise.
7583 (lspci_mod_CFLAGS): Likewise.
7584 (lspci_mod_LDFLAGS): Likewise.
7586 2008-02-02 Bean <bean123ch@gmail.com>
7588 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7589 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7591 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7592 (grub_xfs_btree_node): New structure.
7593 (grub_xfs_btree_root): New structure.
7594 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7595 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7596 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7597 (GRUB_XFS_EXTENT_SIZE): Likewise.
7598 (grub_xfs_read_block): Support btree format type.
7599 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7600 Use directory block as basic unit.
7602 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7604 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7605 __attribute__ ((__regparm__ (1))).
7607 2008-02-01 Robert Millan <rmh@aybabtu.com>
7609 Correct a mistake in previous commit.
7611 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7613 (normal/command.c_DEPENDENCIES): New variable.
7615 2008-02-01 Robert Millan <rmh@aybabtu.com>
7617 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7619 (normal/command.c_DEPENDENCIES): New variable.
7620 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7621 * conf/i386-ieee1275.rmk: Likewise.
7622 * conf/i386-linuxbios.rmk: Likewise.
7623 * conf/i386-pc.rmk: Likewise.
7624 * conf/sparc64-ieee1275.rmk: Likewise.
7625 * conf/powerpc-ieee1275.rmk: Likewise.
7626 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7628 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7630 2008-02-01 Robert Millan <rmh@aybabtu.com>
7632 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7633 call at beginning of function.
7635 2008-01-31 Pavel Roskin <proski@gnu.org>
7637 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7638 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7639 (grub_mkrescue_SOURCES): Likewise.
7640 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7642 2008-01-30 Robert Millan <rmh@aybabtu.com>
7644 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7645 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7646 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7647 (grub_probe_SOURCES): ... to here.
7649 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7650 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7651 * conf/i386-ieee1275.rmk: Likewise.
7652 * conf/i386-linuxbios.rmk: Likewise.
7653 * conf/powerpc-ieee1275.rmk: Likewise.
7655 2008-01-30 Tristan Gingold <gingold@free.fr>
7657 * kern/rescue.c: Silently accept empty lines.
7659 2008-01-29 Bean <bean123ch@gmail.com>
7661 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7662 (real_code_2): Code cleanup and change comment style.
7663 (move_memory): Avoid using 32-bit address mode.
7665 2008-01-29 Bean <bean123ch@gmail.com>
7667 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7668 (png_mod_SOURCES): New variable.
7669 (png_mod_CFLAGS): Likewise.
7670 (png_mod_LDFLAGS): Likewise.
7672 * video/readers/png.c: New file.
7674 2008-01-28 Robert Millan <rmh@aybabtu.com>
7676 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7677 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7678 `ifndef GRUB_MOD_GAP' hack.
7679 * util/elf/grub-mkimage.c (add_segments): Likewise.
7681 2008-01-27 Robert Millan <rmh@aybabtu.com>
7683 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7684 `GRUB_MOD_GAP' for platforms in which it's not defined.
7685 * util/elf/grub-mkimage.c (add_segments): Likewise.
7687 2008-01-27 Robert Millan <rmh@aybabtu.com>
7689 Get grub-emu to build again (including parallel builds).
7691 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7693 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7694 (normal/execute.c_DEPENDENCIES): ... this, ...
7695 (grub-emu_DEPENDENCIES): ... and this.
7697 * conf/i386-efi.rmk: Likewise.
7698 * conf/i386-linuxbios.rmk: Likewise.
7699 * conf/i386-ieee1275.rmk: Likewise.
7700 * conf/powerpc-ieee1275.rmk: Likewise.
7701 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7703 2008-01-27 Robert Millan <rmh@aybabtu.com>
7705 * NEWS: Add a few items.
7707 2008-01-27 Robert Millan <rmh@aybabtu.com>
7709 Fix parallel builds with grub-emu. Based on earlier commit for
7710 grub-probe and grub-setup.
7712 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7713 (util/grub-emu.c_DEPENDENCIES): ... this.
7714 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7715 (util/grub-emu.c_DEPENDENCIES): ... this.
7716 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7717 (util/grub-emu.c_DEPENDENCIES): ... this.
7718 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7719 (util/grub-emu.c_DEPENDENCIES): ... this.
7720 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7721 (util/grub-emu.c_DEPENDENCIES): ... this.
7723 2008-01-27 Pavel Roskin <proski@gnu.org>
7725 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7726 to create a gap between _end and the modules added to the image
7727 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7728 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7729 * util/elf/grub-mkimage.c (add_segments): Likewise.
7731 2008-01-26 Pavel Roskin <proski@gnu.org>
7733 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7734 just return an error.
7736 2008-01-26 Bean <bean123ch@gmail.com>
7738 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7739 (grub_reiserfs_get_item): Save offset of the next item.
7740 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7742 2008-01-25 Robert Millan <rmh@aybabtu.com>
7744 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7745 make all filesystem sources appear together (possibly fixing omissions
7747 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7748 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7749 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7750 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7752 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7754 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7755 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7756 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7757 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7759 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7760 (probe): Add a sanity check to make sure of our ability to read
7761 requested files when probing for filesystem type.
7763 * genmk.rb: Update copyright year (2007).
7765 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7766 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7767 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7768 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7769 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7770 : Remove function prototypes.
7772 2008-01-25 Robert Millan <rmh@aybabtu.com>
7774 Revert my previous commits (based on wrong assumption of how grub_errno
7777 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7778 * kern/file.c (grub_file_open): Likewise.
7780 2008-01-24 Pavel Roskin <proski@gnu.org>
7782 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7783 that hang if GRUB tries to setup colors.
7784 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7785 colors for firmwares that don't support it.
7786 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7787 Recognize Open Hack'Ware, set flags to work around its
7790 2008-01-24 Robert Millan <rmh@aybabtu.com>
7792 * kern/file.c (grub_file_open): Do not account previous failures of
7793 unrelated functions when grub_errno is checked for.
7794 Reported by Oleg Strikov.
7796 2008-01-24 Bean <bean123ch@gmail.com>
7798 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7799 (grub_ufs_sblock): New member volume name.
7800 (grub_ufs_find_file): Fix string copy bug.
7801 (grub_ufs_label): Implement this function properly.
7803 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7804 (grub_hfs_iterate_records): Use the correct file number for extents
7805 and catalog file. Fix problem in next index calculation.
7806 (grub_hfs_find_node): Replace recursive function call with loop.
7807 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7809 2008-01-23 Robert Millan <rmh@aybabtu.com>
7811 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7812 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7813 (grub_multiboot2_real_boot): New function prototype.
7815 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7816 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7818 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7819 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7821 2008-01-23 Robert Millan <rmh@aybabtu.com>
7823 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7824 #ifdef'ed out grub_printf().
7826 2008-01-23 Robert Millan <rmh@aybabtu.com>
7828 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7829 grub_dprintf calls, since they make "debug=all" mode unusable.
7830 (grub_console_checkkey): Likewise.
7832 2008-01-23 Robert Millan <rmh@aybabtu.com>
7834 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7835 `term/i386/pc/at_keyboard.c'.
7836 (pkglib_MODULES): Add `serial.mod'.
7837 (serial_mod_SOURCES): New variable.
7838 (serial_mod_CFLAGS): Likewise.
7839 (serial_mod_LDFLAGS): Likewise.
7841 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7842 `<grub/powerpc/ieee1275/console.h>'.
7843 (grub_keyboard_controller_init): New function prototype.
7844 (grub_console_checkkey): Likewise.
7845 (grub_console_getkey): Likewise.
7847 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7850 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7851 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7853 2008-01-23 Robert Millan <rmh@aybabtu.com>
7855 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7856 present, "(memdisk)/boot/grub" becomes the default prefix.
7858 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7859 a memdisk tarball with all the modules. Add --overlay=DIR option that
7860 allows users to overlay additional files into the image.
7862 2008-01-23 Robert Millan <rmh@aybabtu.com>
7864 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7865 and `machine/memory.h'.
7866 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7867 (_multiboot_mod_SOURCES): New variable.
7868 (_multiboot_mod_CFLAGS): Likewise.
7869 (_multiboot_mod_LDFLAGS): Likewise.
7870 (multiboot_mod_SOURCES): Likewise.
7871 (multiboot_mod_CFLAGS): Likewise.
7872 (multiboot_mod_LDFLAGS): Likewise.
7874 * include/grub/i386/ieee1275/loader.h: New file.
7876 * include/grub/i386/ieee1275/machine.h: Likewise.
7878 * include/grub/i386/ieee1275/memory.h: Likewise.
7880 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7881 variable declaration.
7882 (grub_os_area_size): Likewise.
7884 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7885 (grub_lower_mem, grub_upper_mem): New variables.
7886 (grub_stop_floppy): New function (just to make
7887 grub_multiboot2_real_boot() happy).
7889 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7890 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7891 (grub_stop): New function.
7892 Include `"../realmode.S"' and `"../loader.S"'.
7894 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7895 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7897 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7898 rely on grub_multiboot2_real_boot() for final boot.
7900 2008-01-22 Robert Millan <rmh@aybabtu.com>
7902 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7903 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7904 device that doesn't look like an SD card.
7905 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7906 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7907 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7908 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7911 2008-01-22 Robert Millan <rmh@aybabtu.com>
7913 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7914 avoid claiming over our own code.
7916 2008-01-22 Bean <bean123ch@gmail.com>
7918 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7919 (jpeg_mod_SOURCES): New variable.
7920 (jpeg_mod_CFLAGS): Likewise.
7921 (jpeg_mod_LDFLAGS): Likewise.
7923 * video/readers/jpeg.c : New file.
7925 2008-01-22 Bean <bean123ch@gmail.com>
7927 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7928 there are no more items.
7930 2008-01-21 Robert Millan <rmh@aybabtu.com>
7932 * kern/mm.c (grub_mm_init_region): Improve debug message.
7934 2008-01-21 Robert Millan <rmh@aybabtu.com>
7936 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7937 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7939 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7941 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7942 Indicates start of upper memory.
7943 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7944 (generate_image): Abort when image size is big enough to corrupt
7947 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7948 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7949 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7950 instead of hardcoding 0xA0000.
7951 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7952 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7953 instead of hardcoding 0xA0000.
7955 2008-01-21 Robert Millan <rmh@aybabtu.com>
7957 * disk/memdisk.c (memdisk_size): New variable.
7958 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7960 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7961 image to dynamic memory.
7962 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7963 `memdisk_size'. Free memdisk block.
7965 2008-01-21 Robert Millan <rmh@aybabtu.com>
7967 Fix detection of very small filesystems (like tar).
7969 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7970 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7971 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7972 a problem with this disk).
7974 2008-01-21 Robert Millan <rmh@aybabtu.com>
7976 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7977 on grub_biosdisk_rw_standard() error.
7979 2008-01-21 Robert Millan <rmh@aybabtu.com>
7981 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7983 * kern/elf.c: Likewise.
7984 * kern/ieee1275/ieee1275.c: Likewise.
7985 * kern/powerpc/ieee1275/openfw.c: Likewise.
7986 * term/ieee1275/ofconsole.c: Likewise.
7988 2008-01-21 Robert Millan <rmh@aybabtu.com>
7990 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7992 * include/grub/kernel.h (grub_arch_memdisk_addr)
7993 (grub_arch_memdisk_size): Moved from here ...
7995 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7996 (grub_arch_memdisk_size): ... to here.
7998 2008-01-21 Robert Millan <rmh@aybabtu.com>
8000 Mostly based on bugfix from Bean.
8002 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8003 attribute with hook() parameter.
8004 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8006 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8007 attribute with hook() parameter.
8008 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8011 2008-01-21 Robert Millan <rmh@aybabtu.com>
8013 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8014 (pkglib_MODULES): Add `memdisk.mod'.
8015 (memdisk_mod_SOURCES): New variable.
8016 (memdisk_mod_CFLAGS): Likewise.
8017 (memdisk_mod_LDFLAGS): Likewise.
8019 * disk/memdisk.c: New file.
8021 * include/grub/disk.h (grub_disk_dev_id): Add
8022 `GRUB_DISK_DEVICE_MEMDISK_ID'.
8024 * include/grub/i386/pc/kernel.h
8025 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8026 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8027 (grub_kernel_image_size): New variable declaration.
8028 (grub_total_module_size): Likewise.
8029 (grub_memdisk_image_size): Likewise.
8031 * include/grub/i386/pc/memory.h
8032 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8034 * include/grub/kernel.h: Include `<grub/symbol.h>'.
8035 (grub_arch_memdisk_addr): New variable declaration.
8036 (grub_arch_memdisk_size): Likewise.
8038 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8039 (grub_arch_memdisk_size): Likewise.
8041 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8042 (codestart): Replace hardcoded `0x100000' with
8043 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8045 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8046 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
8047 not NULL, append the contents of the file it refers to, at the end of
8048 the compressed kernel image. Initialize `grub_memdisk_image_size'
8049 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8050 (options): Add "memdisk"|'m' option.
8051 (main): Parse --memdisk|-m option, and pass user-provided path as
8052 parameter to generate_image().
8054 2008-01-20 Robert Millan <rmh@aybabtu.com>
8056 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8057 grub_dprintf() calls from here ...
8058 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8060 2008-01-20 Robert Millan <rmh@aybabtu.com>
8062 Fix detection of "real mode" when /options/real-mode? doesn't exist.
8064 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8066 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8067 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8068 `GRUB_IEEE1275_FLAG_REAL_MODE'.
8069 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8071 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8072 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8074 2008-01-19 Robert Millan <rmh@aybabtu.com>
8076 Get rid of confusing function (superseded by
8077 `grub_ieee1275_get_integer_property')
8078 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8080 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8082 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8083 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8084 in native endianness from grub_ieee1275_get_integer_property().
8086 2008-01-19 Robert Millan <rmh@aybabtu.com>
8088 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8089 command after "shut-down", since implementations differ on which
8090 the command for halt is.
8092 2008-01-19 Robert Millan <rmh@aybabtu.com>
8094 * include/grub/i386/linuxbios/console.h: Add header protection.
8095 (grub_keyboard_controller_init): New function prototype.
8096 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8097 (KEYBOARD_COMMAND_READ): Likewise.
8098 (KEYBOARD_COMMAND_WRITE): Likewise.
8099 (KEYBOARD_SCANCODE_SET1): Likewise.
8100 (grub_keyboard_controller_write): New function.
8101 (grub_keyboard_controller_read): Likewise.
8102 (grub_keyboard_controller_init): Likewise.
8104 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8105 (grub_console_init): On coreboot/LinuxBIOS, call
8106 grub_keyboard_controller_init().
8108 2008-01-19 Robert Millan <rmh@aybabtu.com>
8110 PowerPC changes provided by Pavel Roskin.
8112 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8113 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8114 don't rely on cmain() doing it.
8115 * kern/i386/ieee1275/startup.S (_start): Store %eax in
8116 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8118 2008-01-16 Robert Millan <rmh@aybabtu.com>
8120 * include/grub/i386/linuxbios/memory.h
8121 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8122 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8123 receive `table_header' as argument. Instead, probe for it in the
8124 known memory ranges where it can be present.
8125 (grub_available_iterate): Do not pass a fixed `table_header' address
8126 to grub_linuxbios_table_iterate().
8128 2008-01-15 Robert Millan <rmh@aybabtu.com>
8130 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8131 * conf/i386-ieee1275.rmk: New file.
8132 * include/grub/i386/ieee1275/console.h: Likewise.
8133 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8134 * include/grub/i386/ieee1275/kernel.h: Likewise.
8135 * include/grub/i386/ieee1275/time.h: Likewise.
8136 * kern/i386/ieee1275/init.c: Likewise.
8137 * kern/i386/ieee1275/startup.S: Likewise.
8139 2008-01-15 Robert Millan <rmh@aybabtu.com>
8141 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8142 when pointers are 32-bit (but still do set it to one when they are
8145 2008-01-15 Robert Millan <rmh@aybabtu.com>
8147 * include/grub/ieee1275/ieee1275.h
8148 (grub_ieee1275_get_integer_property): New function prototype.
8150 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8151 (grub_ieee1275_get_integer_property): New function. Wraps around
8152 grub_ieee1275_get_property() to handle endianness.
8154 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8155 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8157 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8158 (grub_map): Likewise.
8159 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8161 2008-01-15 Bean <bean123ch@gmail.com>
8163 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8164 (grub_script_execute_cmdline): Reset grub_errno.
8166 * normal/main.c (read_config_file): Reset grub_errno.
8168 * normal/parse.y (script_init): New.
8169 (script): Move function and menuentry here.
8171 (command): Add delimiter at the end of command.
8172 (commands): Adjust to match the new command.
8173 (commandblock): Remove grub_script_lexer_record_start.
8174 (menuentry): Add grub_script_lexer_record_start, use the new commands.
8175 (if): Use the new commands.
8177 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8179 2008-01-15 Robert Millan <rmh@aybabtu.com>
8181 * normal/menu.c (run_menu): Move timeout message from here ...
8182 (print_timeout): ... to here.
8183 (run_menu): Use print_timeout() once during initial draw to print
8184 the whole message, and again in every clock tick to update only
8185 the number of seconds.
8187 2008-01-15 Robert Millan <rmh@aybabtu.com>
8189 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8190 actual size of `available' from grub_ieee1275_get_property(), and
8191 restrict parsing to that bound.
8193 2008-01-15 Christian Franke <franke@computer.org>
8195 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8196 (argp_program_version): Remove variable.
8197 (argp_program_bug_address): Likewise.
8198 (options): Convert from struct argp_option to struct option.
8199 (struct arguments): Remove.
8200 (parse_opt): Remove.
8201 (usage): New function.
8202 (main): Replace struct args members by simple variables.
8203 Replace argp_parse() by getopt_long().
8204 Add switch to evaluate options.
8205 Add missing "(...)" around root_dev in prefix string.
8207 2008-01-14 Robert Millan <rmh@aybabtu.com>
8209 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8210 for grub_ieee1275_exit(), in order to improve portability.
8212 2008-01-14 Robert Millan <rmh@aybabtu.com>
8214 * util/grub.d/10_linux.in (prefix): Define.
8215 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8217 2008-01-13 Pavel Roskin <proski@gnu.org>
8219 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8220 grub_errno if no errors have been detected.
8222 2008-01-12 Robert Millan <rmh@aybabtu.com>
8224 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8225 (grub_util_get_dev_abstraction): New function prototype.
8227 * util/getroot.c: Include `<grub/util/getroot.h>'
8228 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8229 (grub_util_get_dev_abstraction): ... here (new function).
8231 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8232 `PRINT_ABSTRACTION'.
8233 (probe): Probe for abstraction type when requested.
8234 (main): Understand `--target=abstraction'.
8236 * util/i386/efi/grub-install.in: Add abstraction module to core
8237 image when it is found to be necessary.
8238 * util/i386/pc/grub-install.in: Likewise.
8239 * util/powerpc/ieee1275/grub-install.in: Likewise.
8241 * util/update-grub_lib.in (font_path): Return system path without
8242 converting to GRUB path.
8243 * util/update-grub.in: Convert system path returned by font_path()
8244 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8245 abstraction module is needed for loading fonts (if any). Export
8246 that as `GRUB_PRELOAD_MODULES'.
8247 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8250 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8252 Remove some unused code from reiserfs.
8254 * fs/reiserfs.c (struct grub_reiserfs_key)
8255 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8256 (struct grub_reiserfs_node_body): Removed.
8257 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8259 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8261 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8263 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8265 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8267 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8269 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8270 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8271 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8273 2008-01-10 Robert Millan <rmh@aybabtu.com>
8275 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8276 Determines if a file is garbage left by packaging systems, etc.
8277 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8278 for processing /etc/grub.d scripts.
8279 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8280 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8281 as a condition for processing Linux images.
8283 2008-01-10 Pavel Roskin <proski@gnu.org>
8285 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8286 to compile reiserfs.c on PowerPC.
8288 2008-01-10 Robert Millan <rmh@aybabtu.com>
8290 * kern/device.c (grub_device_iterate): Do not abort device iteration
8291 when one of the devices cannot be opened.
8292 * kern/disk.c (grub_disk_open): Do not account previous failures of
8293 unrelated functions when grub_errno is checked for.
8295 2008-01-08 Robert Millan <rmh@aybabtu.com>
8297 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8298 `! grub_linux_is_bzimage', change order of address comparison to make
8299 it more intuitive, and improve "too big zImage" error message.
8301 2008-01-08 Robert Millan <rmh@aybabtu.com>
8303 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8304 `$(update-grub_DATA)'.
8305 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8308 2008-01-07 Robert Millan <rmh@aybabtu.com>
8310 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8311 which instruction is modified by grub-setup during installation
8312 (since it wasn't obvious by only looking at this file).
8314 2008-01-07 Robert Millan <rmh@aybabtu.com>
8316 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8317 listing actual TODO items.
8319 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8321 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8323 (grub_reiserfs_get_key_offset): Likewise.
8324 (grub_reiserfs_set_key_offset): Likewise.
8325 (grub_reiserfs_set_key_type): Likewise.
8326 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8328 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8329 better to remove the bitfield version completely.
8331 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8333 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8334 allocated from the heap, due to the fshelp implementation.
8335 (grub_reiserfs_dir): Free NODE, due to the same reason.
8337 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8339 Mostly from Vincent Pelletier:
8341 * fs/reiserfs.c: New file.
8343 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8344 (reiserfs_mod_SOURCES): New variable.
8345 (reiserfs_mod_CFLAGS): Likewise.
8346 (reiserfs_mod_LDFLAGS): Likewise.
8348 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8349 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8350 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8353 2008-01-06 Robert Millan <rmh@aybabtu.com>
8355 * normal/color.c: Remove `<grub/env.h>'.
8357 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8359 * include/grub/normal.h: Include <grub/env.h>.
8361 2008-01-05 Robert Millan <rmh@aybabtu.com>
8363 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8364 usage example with `(hd0,1)'.
8365 Reported by Samuel Thibault.
8367 2008-01-05 Robert Millan <rmh@aybabtu.com>
8369 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8370 (grub_linux_boot_zimage): Rename to ...
8371 (grub_linux_boot): ... this.
8372 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8373 (grub_linux_boot_zimage): Conditionalize zImage copy.
8375 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8376 (grub_linux_boot_bzimage): Remove prototype.
8377 (grub_linux_boot_zimage): Rename to ...
8378 (grub_linux_boot): ... this.
8380 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8381 (grub_linux_boot): Remove function.
8383 2008-01-05 Robert Millan <rmh@aybabtu.com>
8385 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8386 (grub_env_write_color_highlight): Likewise.
8387 (grub_wait_after_message): Likewise.
8389 * normal/color.c: New file.
8391 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8392 (normal_mod_DEPENDENCIES): Likewise.
8394 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8395 (normal_mod_DEPENDENCIES): Likewise.
8397 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8398 (normal_mod_DEPENDENCIES): Likewise.
8400 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8401 (normal_mod_DEPENDENCIES): Likewise.
8403 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8404 for waiting after a message is printed.
8405 * normal/main.c (read_config_file): Likewise.
8406 (grub_normal_init): Register grub_env_write_color_normal() and
8407 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8408 `color_highlight' variables as global.
8410 * normal/menu.c (grub_wait_after_message): New function.
8411 (grub_color_menu_normal): New variable. Replaces ...
8412 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8413 (grub_color_menu_highlight): New variable. Replaces ...
8414 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8415 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8416 `GRUB_TERM_COLOR_STANDARD'.
8417 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8418 `normal_code' and `highlight_code' to `old_color_normal' and
8419 `old_color_highlight', respectively.
8420 (grub_menu_init_page): Update colors when drawing the menu, based on
8421 `menu_color_normal' and `menu_color_highlight' variables.
8422 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8423 a message is printed.
8425 2008-01-05 Robert Millan <rmh@aybabtu.com>
8427 * kern/env.c (grub_env_context_open): Propagate hooks for global
8428 variables to new context.
8430 * kern/main.c (grub_set_root_dev): Export `root' variable.
8432 2008-01-05 Robert Millan <rmh@aybabtu.com>
8434 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8435 discs unconditionally, since udev and others have options to provide
8438 2008-01-05 Robert Millan <rmh@aybabtu.com>
8440 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8442 2008-01-04 Christian Franke <franke@computer.org>
8444 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8447 2008-01-03 Pavel Roskin <proski@gnu.org>
8449 * kern/i386/linuxbios/init.c: Put "void" to all function
8450 declarations with no arguments.
8451 * kern/powerpc/ieee1275/init.c: Likewise.
8452 * term/i386/pc/at_keyboard.c: Likewise.
8453 * term/i386/pc/vga_text.c: Likewise.
8454 * util/grub-mkdevicemap.c: Likewise.
8456 2008-01-02 Robert Millan <rmh@aybabtu.com>
8458 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8459 message when loaded image is out of bounds.
8460 (grub_multiboot_load_elf64): Likewise.
8462 2008-01-02 Pavel Roskin <proski@gnu.org>
8464 * util/grub.d/10_linux.in: Try version without ".old" when
8465 looking for initrd. It's better to use initrd from the newer
8466 kernel of the same version than no initrd at all.
8468 2008-01-01 Robert Millan <rmh@aybabtu.com>
8470 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8472 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8474 * include/grub/video.h: Added grub_video_unmap_color and
8475 grub_video_get_active_render_target.
8476 (grub_video_adapter): Added unmap_color and get_active_render_target.
8478 * video/video.c: Added grub_video_unmap_color and
8479 grub_video_get_active_render_target.
8480 (grub_video_get_info): Changed method to accept NULL pointer as an
8481 argument to allow detection of active video adapter.
8483 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8484 grub_video_vbe_unmap_color_int.
8485 Added grub_video_vbe_unmap_color and
8486 grub_video_vbe_get_active_render_target.
8487 (grub_video_vbe_adapter): Added unmap_color and
8488 get_active_render_target.
8490 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8491 with grub_video_vbe_unmap_color_int.
8493 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8494 (DEFAULT_NORMAL_COLOR): Likewise.
8495 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8496 (DEFAULT_FG_COLOR): Removed.
8497 (DEFAULT_BG_COLOR): Likewise.
8498 (DEFAULT_CURSOR_COLOR): Changed value.
8499 (grub_virtual_screen): Added standard_color_setting,
8500 normal_color_setting, highlight_color_setting and term_color.
8501 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8502 (bitmap_width): Added.
8503 (bitmap_height): Likewise.
8505 (set_term_color): Likewise.
8506 (grub_virtual_screen_setup): Changed to use new terminal coloring
8508 (grub_gfxterm_init): Added init for bitmap.
8509 (grub_gfxterm_fini): Added destroy for bitmap.
8510 (redraw_screen_rect): Updated to use background bitmap and new
8512 (scroll_up): Added optimization for case when there is no bitmap.
8513 (grub_gfxterm_cls): Fixed to use correct background color.
8514 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8516 (grub_virtual_screen_setcolor): Likewise.
8517 (grub_virtual_screen_getcolor): Added.
8518 (grub_gfxterm_background_image_cmd): Likewise.
8519 (grub_video_term): Added setcolor and getcolor.
8520 (MOD_INIT): Added registration of background_image command.
8521 (MOD_TERM): Added unregistration for background_image command.
8523 2007-12-30 Pavel Roskin <proski@gnu.org>
8525 * loader/multiboot_loader.c: Fix multiboot command
8526 unregistration. Fix all typos in the word "multiboot".
8528 2007-12-29 Pavel Roskin <proski@gnu.org>
8530 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8531 support for initrd names used in Fedora.
8533 2007-12-26 Bean <bean123ch@gmail.com>
8535 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8536 (cpio_mod_SOURCES): New variable.
8537 (cpio_mod_CFLAGS): Likewise.
8538 (cpio_mod_LDFLAGS): Likewise.
8540 * fs/cpio.c: New file.
8542 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8544 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8546 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8550 2007-12-25 Robert Millan <rmh@aybabtu.com>
8552 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8553 (grub_getcolor): New function.
8555 * kern/term.c (grub_getcolor): New function.
8556 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8557 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8558 (print_entry): Set normal and highlight colors to
8559 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8560 respectively, before printing and restore them to old
8562 (grub_menu_init_page): Likewise. Fill an additional colored space
8563 that would otherwise be left blank.
8565 * term/efi/console.c (grub_console_getcolor): New function.
8566 (struct grub_console_term.getcolor): New variable.
8567 * term/i386/pc/console.c (grub_console_getcolor): New function.
8568 (struct grub_console_term.getcolor): New variable.
8569 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8570 (struct grub_console_term.getcolor): New variable.
8572 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8573 (struct grub_console_term.setcolor): Remove variable.
8574 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8575 (struct grub_console_term.setcolor): Remove variable.
8576 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8577 (struct grub_console_term.setcolor): Remove variable.
8578 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8579 (struct grub_console_term.setcolor): Remove variable.
8581 2007-12-25 Robert Millan <rmh@aybabtu.com>
8583 * configure.ac: Search for possible unifont.hex locations, and
8584 define UNIFONT_HEX if found.
8586 * Makefile.in (UNIFONT_HEX): Define variable.
8587 (DATA): Rename to ...
8588 (PKGLIB): ... this. Update all users.
8589 (PKGDATA): New variable.
8590 (pkgdata_IMAGES): Rename to ...
8591 (pkglib_IMAGES): ... this. Update all users.
8592 (pkgdata_MODULES): Rename to ...
8593 (pkglib_MODULES): ... this. Update all users.
8594 (pkgdata_PROGRAMS): Rename to ...
8595 (pkglib_PROGRAMS): ... this. Update all users.
8596 (pkgdata_DATA): Rename to ...
8597 (pkglib_DATA): ... this. Update all users.
8598 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8599 (unicode.pff, ascii.pff): New rules.
8600 (all-local): Add `$(PKGDATA)' dependency.
8601 (install-local): Process `$(PKGDATA)'.
8603 * util/update-grub_lib.in (font_path): Search for *.pff files in
8604 a few more locations, including `${pkgdata}'.
8606 2007-12-23 Robert Millan <rmh@aybabtu.com>
8608 Patch from Bean <bean123ch@gmail.com>:
8609 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8612 2007-12-21 Bean <bean123ch@gmail.com>
8614 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8615 (ntfscomp_mod_SOURCES): New variable.
8616 (ntfscomp_mod_CFLAGS): Likewise.
8617 (ntfscomp_mod_LDFLAGS): Likewise.
8619 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8620 (grub_probe_SOURCES): Likewise.
8621 (grub_emu_SOURCES): Likewise.
8623 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8624 (grub_emu_SOURCES): Likewise.
8626 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8627 (grub_emu_SOURCES): Likewise.
8629 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8630 (grub_emu_SOURCES): Likewise.
8632 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8633 (read_run_list): Renamed to grub_ntfs_read_run_list.
8634 (decomp_nextvcn): Moved to ntfscomp.c.
8635 (decomp_getch): Likewise.
8636 (decomp_get16): Likewise.
8637 (decomp_block): Likewise.
8638 (read_block): Likewise.
8639 (read_data): Partially moved to ntfscomp.c.
8640 (fixup): Change unsigned to grub_uint16_t.
8641 (read_mft): Change unsigned long to grub_uint32_t.
8642 (read_attr): Likewise.
8643 (read_data): Likewise.
8644 (read_run_data): Likewise.
8645 (read_run_list): Likewise.
8646 (read_mft): Likewise.
8648 * fs/ntfscomp.c: New file.
8650 * include/grub/ntfs.h: New file.
8652 2007-12-16 Robert Millan <rmh@aybabtu.com>
8654 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8655 IDE disk check, since Linux is known to support 20 IDE disks.
8656 Reported by Colin Watson.
8658 2007-12-15 Bean <bean123ch@gmail.com>
8660 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8661 (lnxboot_img_SOURCES): New variable.
8662 (lnxboot_img_ASFLAGS): Likewise.
8663 (lnxboot_img_LDFLAGS): Likewise.
8665 * boot/i386/pc/lnxboot.S: New file.
8667 2007-11-24 Pavel Roskin <proski@gnu.org>
8669 * configure.ac: Test if '--build-id=none' is supported by the
8670 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8671 objcopy to generate incorrect binary files (binutils
8672 2.17.50.0.18-1 as shipped by Fedora 8).
8673 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8674 linking, so that build ID doesn't break the test.
8676 2007-11-24 Pavel Roskin <proski@gnu.org>
8678 * include/grub/i386/time.h: use "void" in the argument list
8680 * include/grub/powerpc/time.h: Likewise.
8681 * include/grub/sparc64/time.h: Likewise.
8683 2007-11-18 Christian Franke <franke@computer.org>
8685 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8686 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8687 This fixes the problem that function keys did not work in grub-emu.
8689 2007-11-18 Christian Franke <franke@computer.org>
8691 * disk/host.c (grub_host_open): Remove attribute unused from
8692 name parameter. Add check for "host". This fixes the problem
8693 that grub-emu does not find partitions.
8695 2007-11-18 Christian Franke <franke@computer.org>
8697 * util/hostfs.c (is_dir): New function.
8698 (grub_hostfs_dir): Handle missing dirent.d_type case.
8699 (grub_hostfs_read): Add missing fseek().
8700 (grub_hostfs_label): Clear label pointer. This fixes a crash
8701 of grub-emu on "ls (host)".
8703 2007-11-18 Christian Franke <franke@computer.org>
8705 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8706 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8707 to 64 bit boundary by default.
8709 2007-11-18 Bean <bean123ch@gmail.com>
8711 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8712 (hexdump_mod_SOURCES): New variable.
8713 (hexdump_mod_CFLAGS): Likewise.
8714 (hexdump_mod_LDFLAGS): Likewise.
8716 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8718 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8720 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8722 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8724 * include/grub/hexdump.h: New file.
8726 * commands/hexdump.c: New file.
8728 2007-11-10 Robert Millan <rmh@aybabtu.com>
8730 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8731 in grub_outb() calls.
8732 (beep_on): Likewise.
8734 2007-11-10 Christian Franke <franke@computer.org>
8736 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8737 (grub_menu_run): Likewise.
8739 2007-11-10 Robert Millan <rmh@aybabtu.com>
8741 * include/grub/i386/efi/machine.h: New file.
8742 * include/grub/i386/linuxbios/machine.h: Likewise.
8743 * include/grub/i386/pc/machine.h: Likewise.
8744 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8745 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8747 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8748 (serial_hw_io_addr): New variable.
8749 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8750 instead of `(unsigned short *) 0x400'.
8752 2007-11-10 Bean <bean123ch@gmail.com>
8754 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8756 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8758 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8759 (vga_mod_SOURCES): Added.
8760 (vga_mod_CFLAGS): Likewise.
8761 (vga_mod_LDFLAGS): Likewise.
8763 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8765 (set_map_mask): Likewise.
8766 (set_read_map): Likewise.
8767 (set_read_address): Likewise.
8768 (vga_font): Removed variable.
8769 (get_vga_glyph): Removed function.
8770 (invalidate_char): Likewise.
8771 (write_char): Changed to use grub_font_get_glyph() for font
8773 (grub_vga_putchar): Likewise.
8774 (grub_vga_getcharwidth): Likewise.
8776 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8778 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8780 (pxeboot_img_LDFLAGS): Likewise.
8781 (diskboot_img_LDFLAGS): Likewise.
8782 (kernel_img_LDFLAGS): Likewise.
8784 2007-11-06 Robert Millan <rmh@aybabtu.com>
8786 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8787 in grub_outb() calls.
8788 (serial_hw_init): Likewise.
8790 2007-11-05 Robert Millan <rmh@aybabtu.com>
8792 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8793 spaces. Skip non-regular files.
8795 2007-11-05 Robert Millan <rmh@aybabtu.com>
8797 * kern/disk.c (grub_disk_firmware_fini)
8798 (grub_disk_firmware_is_tainted): New variables.
8800 * include/grub/disk.h (grub_disk_firmware_fini)
8801 (grub_disk_firmware_is_tainted): Likewise.
8803 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8804 (grub_disk_biosdisk_fini): ... to here.
8805 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8806 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8807 is set. Register grub_disk_biosdisk_fini() in
8808 `grub_disk_firmware_fini'.
8810 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8811 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8812 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8813 to finish existing firmware disk interface.
8815 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8816 (ata_mod_SOURCES): New variable.
8817 (ata_mod_CFLAGS): Likewise.
8818 (ata_mod_LDFLAGS): Likewise.
8820 2007-11-05 Robert Millan <rmh@aybabtu.com>
8822 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8823 (grub_ata_wait): Reimplement using grub_millisleep().
8825 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8826 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8828 2007-11-03 Marco Gerards <marco@gnu.org>
8830 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8831 (CRTC_ADDR_PORT): New macro.
8832 (CRTC_DATA_PORT): Likewise.
8833 (CRTC_CURSOR): Likewise.
8834 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8835 (CRTC_CURSOR_ADDR_LOW): Likewise.
8836 (update_cursor): New function.
8837 (grub_console_real_putchar): Call `update_cursor'.
8838 (grub_console_gotoxy): Likewise.
8839 (grub_console_cls): Set the default color when clearing the
8841 (grub_console_setcursor): Implemented.
8843 2007-11-03 Marco Gerards <marco@gnu.org>
8845 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8847 (grub_ata_pio_write): Likewise.
8849 (grub_atapi_identify): Wait after issuing an ATA command.
8850 (grub_atapi_packet): Likewise.
8851 (grub_ata_identify): Likewise.
8852 (grub_ata_readwrite): Likewise.
8854 2007-11-03 Marco Gerards <marco@gnu.org>
8856 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8857 (grub_ata_pio_write): Likewise.
8858 (grub_ata_readwrite): Use `grub_error', instead of
8859 returning `grub_errno'.
8861 2007-11-03 Marco Gerards <marco@gnu.org>
8863 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8864 grub_ata_pio_write once for every single sector, instead of for
8867 2007-10-31 Robert Millan <rmh@aybabtu.com>
8869 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8871 * conf/i386-linuxbios.rmk: New file.
8873 * kern/i386/pc/hardware.c: Likewise.
8874 * term/i386/pc/at_keyboard.c: Likewise.
8875 * term/i386/pc/vga_text.c: Likewise.
8877 * include/grub/i386/linuxbios/boot.h: Likewise.
8878 * include/grub/i386/linuxbios/console.h: Likewise.
8879 * include/grub/i386/linuxbios/init.h: Likewise.
8880 * include/grub/i386/linuxbios/kernel.h: Likewise.
8881 * include/grub/i386/linuxbios/loader.h: Likewise.
8882 * include/grub/i386/linuxbios/memory.h: Likewise.
8883 * include/grub/i386/linuxbios/serial.h: Likewise.
8884 * include/grub/i386/linuxbios/time.h: Likewise.
8886 * kern/i386/linuxbios/init.c: Likewise.
8887 * kern/i386/linuxbios/startup.S: Likewise.
8888 * kern/i386/linuxbios/table.c: Likewise.
8890 2007-10-31 Marco Gerards <marco@gnu.org>
8892 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8893 (ata_mod_SOURCES): New variable.
8894 (ata_mod_CFLAGS): Likewise.
8895 (ata_mod_LDFLAGS): Likewise.
8897 * disk/ata.c: New file.
8899 * include/grub/disk.h (grub_disk_dev_id): Add
8900 `GRUB_DISK_DEV_ATA_ID'.
8902 2007-10-31 Robert Millan <rmh@aybabtu.com>
8904 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8905 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8907 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8908 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8910 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8913 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8915 2007-10-27 Robert Millan <rmh@aybabtu.com>
8917 * include/grub/types.h (ULONG_MAX): Define macro.
8919 2007-10-22 Robert Millan <rmh@aybabtu.com>
8921 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8923 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8925 2007-10-22 Robert Millan <rmh@aybabtu.com>
8927 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8928 (pkgdata_MODULES): Add `biosdisk.mod'.
8929 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8932 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8933 (grub_biosdisk_init): Replace with ...
8934 (GRUB_MOD_INIT(biosdisk)): ... this.
8935 (grub_biosdisk_fini): Replace with ...
8936 (GRUB_MOD_FINI(biosdisk)): ... this.
8938 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8939 (grub_machine_init): Remove call to grub_biosdisk_init().
8940 (grub_machine_fini): Remove call to grub_machine_fini().
8942 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8944 2007-10-22 Robert Millan <rmh@aybabtu.com>
8946 * include/grub/time.h: New file.
8947 * include/grub/i386/time.h: Likewise.
8948 * include/grub/powerpc/time.h: Likewise.
8949 * include/grub/sparc64/time.h: Likewise.
8951 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8953 (KERNEL_MACHINE_TIME_HEADER): ... this.
8954 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8956 (KERNEL_MACHINE_TIME_HEADER): ... this.
8957 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8959 (KERNEL_MACHINE_TIME_HEADER): ... this.
8961 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8962 (grub_millisleep): New function.
8963 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8964 (grub_millisleep): New function.
8965 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8966 Remove `grub/machine/time.h' include.
8967 (grub_millisleep): New function.
8968 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8969 Remove `grub/machine/time.h' include.
8970 (grub_millisleep): New function.
8972 * include/grub/misc.h (grub_div_roundup): New function.
8974 * kern/misc.c: Include `<grub/time.h>'.
8975 (grub_millisleep_generic): New function.
8977 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8979 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8981 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8982 `machine/time.h'. Add `time.h'.
8983 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8985 2007-10-21 Robert Millan <rmh@aybabtu.com>
8987 * include/grub/misc.h (grub_max): New function.
8989 2007-10-21 Robert Millan <rmh@aybabtu.com>
8991 * util/misc.c (grub_util_info): Call fflush() before returning.
8993 2007-10-20 Robert Millan <rmh@aybabtu.com>
8995 * genmk.rb (Image): Copy `extra_flags' from here ...
8996 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8998 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8999 to `argc' and `args' arguments.
9001 2007-10-17 Robert Millan <rmh@aybabtu.com>
9003 * kern/i386/loader.S: New file.
9005 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9006 * kern/i386/loader.S (grub_linux_prot_size)... to here.
9007 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9008 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9009 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9010 * kern/i386/loader.S (grub_linux_real_addr)... to here.
9011 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9012 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9013 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9014 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9015 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9016 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9017 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9018 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9020 * kern/i386/realmode.S: New file.
9022 * kern/i386/pc/startup.S (protstack): Moved from here ...
9023 * kern/i386/realmode.S (protstack)... to here.
9024 * kern/i386/pc/startup.S (gdt): Moved from here ...
9025 * kern/i386/realmode.S (gdt)... to here.
9026 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9027 * kern/i386/realmode.S (prot_to_real)... to here.
9029 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9030 `kern/i386/realmode.S'.
9032 2007-10-17 Robert Millan <rmh@aybabtu.com>
9034 * include/grub/i386/loader.h: New file.
9036 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9037 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9038 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9039 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9040 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9041 * include/grub/i386/loader.h (grub_linux_prot_size)
9042 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9043 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9044 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9045 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9047 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9049 2007-10-15 Robert Millan <rmh@aybabtu.com>
9051 * normal/misc.c (grub_normal_print_device_info): Do not probe for
9052 filesystem when dev->disk is unset.
9053 Do probe for filesystem even when dev->disk->has_partitions is set.
9054 In case a filesystem is found, always report it.
9055 In case it isn't, if dev->disk->has_partitions is set, report that
9056 a partition table was found instead of reporting that no filesystem
9057 could be identified.
9059 2007-10-12 Robert Millan <rmh@aybabtu.com>
9061 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9062 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9064 * include/grub/types.h (grub_host_to_target16): New macro.
9065 (grub_host_to_target32): Likewise.
9066 (grub_host_to_target64): Likewise.
9067 (grub_target_to_host16): Likewise.
9068 (grub_target_to_host32): Likewise.
9069 (grub_target_to_host64): Likewise.
9071 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9073 (GRUB_MOD_ALIGN): ...this. Update all users.
9075 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9076 grub_host_to_target32.
9077 Replace grub_be_to_cpu32 with grub_target_to_host32.
9078 (load_modules): Likewise.
9079 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9080 Replace grub_be_to_cpu32 with grub_target_to_host32.
9081 Replace grub_cpu_to_be16 with grub_host_to_target16.
9082 Replace grub_cpu_to_be32 grub_host_to_target32.
9084 2007-10-12 Robert Millan <rmh@aybabtu.com>
9086 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9087 * util/elf/grub-mkimage.c: ... here.
9089 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
9090 `util/powerpc/ieee1275/grub-mkimage.c'.
9092 2007-10-07 Robert Millan <rmh@aybabtu.com>
9094 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9095 and make it easier to figure out.
9096 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9097 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9098 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9099 leave us with less than HEAP_MIN_SIZE total heap.
9100 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9102 2007-10-03 Robert Millan <rmh@aybabtu.com>
9104 * include/grub/i386/io.h: New file.
9105 * commands/i386/pc/play.c (inb): Removed.
9107 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9109 * term/i386/pc/serial.c (inb): Removed.
9111 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9113 * term/i386/pc/vga.c (inb): Removed.
9115 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
9118 2007-10-02 Robert Millan <rmh@aybabtu.com>
9120 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9121 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9122 Reported by Marcin Kurek.
9124 2007-09-07 Robert Millan <rmh@aybabtu.com>
9126 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9127 SmartFirmware version updates (as released by Sven Luther), and avoid
9128 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9129 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9132 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9135 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9136 when merging two regions.
9138 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9140 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9141 * normal/completion.c (grub_normal_do_completion): Likewise.
9142 Reported by Hitoshi Ozeki.
9144 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9146 Do not use devices at boot in chainloading.
9148 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9149 (boot_part_addr): Likewise.
9150 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9151 with BOOT_DRIVE and BOOT_PART_ADDR.
9152 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9153 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9155 2007-08-29 Robert Millan <rmh@aybabtu.com>
9157 Patch from Simon Peter <dn.tlp@gmx.net>:
9158 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9159 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9160 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9161 util/i386/pc/grub-setup.c_DEPENDENCIES.
9162 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9163 util/grub-probe.c_DEPENDENCIES.
9164 * conf/powerpc-ieee1275.rmk: Likewise.
9166 2007-08-28 Robert Millan <rmh@aybabtu.com>
9168 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9169 to tell grub-mkdevicemap how to name devices.
9170 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9173 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9174 util/i386/get_disk_name.c.
9175 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9176 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9177 util/ieee1275/get_disk_name.c.
9179 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9181 * DISTLIST: Add util/i386/get_disk_name.c and
9182 util/ieee1275/get_disk_name.c.
9184 * util/grub-mkdevicemap.c: Replace device naming logic with
9185 grub_util_get_disk_name() calls.
9187 2007-08-20 Robert Millan <rmh@aybabtu.com>
9189 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9190 (so that it works for both plural and singular quantities).
9192 2007-08-05 Robert Millan <rmh@aybabtu.com>
9194 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9195 so that [xz] isn't taken into account when determining order.
9197 2007-08-02 Marco Gerards <marco@gnu.org>
9199 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9200 `include/multiboot2.h', `include/grub/elfload.h',
9201 `include/multiboot.h', `include/grub/multiboot.h',
9202 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9203 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9204 `kern/elf.c', `loader/multiboot_loader.c',
9205 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9206 `loader/i386/pc/multiboot2.c',
9207 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9208 `util/i386/pc/grub-mkrescue.in'. Remove
9209 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9210 `include/grub/i386/pc/util/biosdisk.h' and
9211 `include/grub/powerpc/ieee1275/multiboot.h'.
9213 2007-08-02 Bean <bean123ch@gmail.com>
9215 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9216 (ntfs_mod_SOURCES): New variable.
9217 (ntfs_mod_CFLAGS): Likewise.
9218 (ntfs_mod_LDFLAGS): Likewise.
9220 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9221 (grub_probe_SOURCES): Likewise.
9222 (grub_emu_SOURCES): Likewise.
9224 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9225 (grub_emu_SOURCES): Likewise.
9227 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9228 (grub_emu_SOURCES): Likewise.
9230 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9232 * fs/ntfs.c: New file.
9234 2007-08-02 Bean <bean123ch@gmail.com>
9236 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9238 * file.h (grub_file): Likewise.
9240 * fshelp.h (grub_fshelp_read_file): Likewise.
9242 * util/i386/pc/grub-setup.c (setup): Likewise.
9243 (save_first_sector): Likewise.
9244 (save_blocklists): Likewise.
9246 * fs/affs.c (grub_affs_read_file): Likewise.
9248 * fs/ext2.c (grub_ext2_read_file): Likewise.
9250 * fs/fat.c (grub_fat_read_data): Likewise.
9252 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9254 * fs/hfs.c (grub_hfs_read_file): Likewise.
9256 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9258 * fs/jfs.c (grub_jfs_read_file): Likewise.
9260 * fs/minix.c (grub_minix_read_file): Likewise.
9262 * fs/sfs.c (grub_sfs_read_file): Likewise.
9264 * fs/ufs.c (grub_ufs_read_file): Likewise.
9266 * fs/xfs.c (grub_xfs_read_file): Likewise.
9268 * command/blocklist.c (read_blocklist): Likewise.
9269 (print_blocklist): Likewise.
9271 2007-08-02 Marco Gerards <marco@gnu.org>
9273 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9276 * disk/host.c: New file.
9278 * util/hostfs.c: Likewise.
9280 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9281 return `GRUB_ERR_BAD_FS'.
9282 * fs/sfs.c (grub_sfs_mount): Likewise.
9283 * fs/xfs.c (grub_xfs_mount): Likewise.
9285 * include/grub/disk.h (enum grub_disk_dev_id): Add
9286 `GRUB_DISK_DEVICE_HOST_ID'.
9288 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9290 2007-07-24 Jerone Young <jerone@gmail.com>
9292 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9293 modules for compilation.
9294 * conf/powerpc-ieee1275.rmk: Likewise.
9296 * include/multiboot.h: Move multiboot definitions to one file. Rename
9297 many definitions to not get grub specific.
9298 * include/multiboot2.h: Create header with multiboot 2 definitions.
9299 * include/grub/multiboot.h: Header for grub specific function
9300 prototypes and definitions.
9301 * include/grub/multiboot2.h: Likewise.
9302 * include/grub/multiboot_loader.h: Likewise.
9303 * include/grub/i386/pc/multiboot.h: Removed.
9304 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9306 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9307 and 2 to allow for one multiboot and module commands.
9308 * loader/multiboot2.c: Add multiboot2 functionality.
9309 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9310 and definition names.
9311 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9313 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9314 ieee1275 specific multiboot2 code.
9316 * kern/i386/pc/startup.S: Change headers and definition names for
9317 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9319 2007-07-22 Robert Millan <rmh@aybabtu.com>
9321 * geninitheader.sh: Process file specified in first parameter rather
9322 than hardcoding grub_modules_init.lst.
9323 * geninit.sh: Likewise. Also, construct header name dynamically rather
9324 than hardcoding grub_modules_init.h.
9326 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9327 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9328 grub_probe_init.[ch] and grub_setup_init.[ch].
9330 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9331 grub_modules_init.h with grub_emu_init.h.
9332 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9333 grub_probe_init.[ch] files.
9334 * conf/i386-efi.rmk: Likewise.
9335 * conf/i386-pc.rmk: Likewise.
9336 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9337 grub_setup_init.[ch] files.
9339 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9340 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9341 to initialize modules rather than a list of hardcoded functions.
9342 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9343 grub_init_all() to initialize modules rather than a list of hardcoded
9346 2007-07-22 Robert Millan <rmh@aybabtu.com>
9348 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9349 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9351 2007-07-22 Robert Millan <rmh@aybabtu.com>
9353 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9354 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9355 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9356 flag when running on SmartFirmware.
9357 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9358 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9361 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9362 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9363 rather than decreasing it.
9365 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9366 there's not enough space to do it, fail in the same way as when it
9367 can't be done because there are no partitions.
9369 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9370 when nvsetenv failed.
9372 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9374 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9375 because this rule is automatically generated.
9376 (grub-mkrescue): Removed for the same reason as above.
9378 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9380 Migrate to GNU General Public License Version 3.
9382 * COPYING: Replaced with the plain text version of GPLv3.
9384 * config.guess: Updated from gnulib.
9385 * config.sub: Likewise.
9387 * geninit.sh: Output a GPLv3 copyright notice.
9388 * geninitheader.sh: Likewise.
9389 * genmodsrc.sh: Likewise.
9390 * gensymlist.sh.in: Likewise.
9392 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9393 * boot/i386/pc/diskboot.S: Likewise.
9394 * boot/i386/pc/pxeboot.S: Likewise.
9395 * commands/blocklist.c: Likewise.
9396 * commands/boot.c: Likewise.
9397 * commands/cat.c: Likewise.
9398 * commands/cmp.c: Likewise.
9399 * commands/configfile.c: Likewise.
9400 * commands/echo.c: Likewise.
9401 * commands/help.c: Likewise.
9402 * commands/ls.c: Likewise.
9403 * commands/search.c: Likewise.
9404 * commands/terminal.c: Likewise.
9405 * commands/test.c: Likewise.
9406 * commands/videotest.c: Likewise.
9407 * commands/i386/cpuid.c: Likewise.
9408 * commands/i386/pc/halt.c: Likewise.
9409 * commands/i386/pc/play.c: Likewise.
9410 * commands/i386/pc/reboot.c: Likewise.
9411 * commands/i386/pc/vbeinfo.c: Likewise.
9412 * commands/i386/pc/vbetest.c: Likewise.
9413 * commands/ieee1275/halt.c: Likewise.
9414 * commands/ieee1275/reboot.c: Likewise.
9415 * commands/ieee1275/suspend.c: Likewise.
9416 * disk/loopback.c: Likewise.
9417 * disk/lvm.c: Likewise.
9418 * disk/raid.c: Likewise.
9419 * disk/efi/efidisk.c: Likewise.
9420 * disk/i386/pc/biosdisk.c: Likewise.
9421 * disk/ieee1275/ofdisk.c: Likewise.
9422 * font/manager.c: Likewise.
9423 * fs/affs.c: Likewise.
9424 * fs/ext2.c: Likewise.
9425 * fs/fat.c: Likewise.
9426 * fs/fshelp.c: Likewise.
9427 * fs/hfs.c: Likewise.
9428 * fs/hfsplus.c: Likewise.
9429 * fs/iso9660.c: Likewise.
9430 * fs/jfs.c: Likewise.
9431 * fs/minix.c: Likewise.
9432 * fs/sfs.c: Likewise.
9433 * fs/ufs.c: Likewise.
9434 * fs/xfs.c: Likewise.
9435 * hello/hello.c: Likewise.
9436 * include/grub/acorn_filecore.h: Likewise.
9437 * include/grub/arg.h: Likewise.
9438 * include/grub/bitmap.h: Likewise.
9439 * include/grub/boot.h: Likewise.
9440 * include/grub/cache.h: Likewise.
9441 * include/grub/device.h: Likewise.
9442 * include/grub/disk.h: Likewise.
9443 * include/grub/dl.h: Likewise.
9444 * include/grub/elfload.h: Likewise.
9445 * include/grub/env.h: Likewise.
9446 * include/grub/err.h: Likewise.
9447 * include/grub/file.h: Likewise.
9448 * include/grub/font.h: Likewise.
9449 * include/grub/fs.h: Likewise.
9450 * include/grub/fshelp.h: Likewise.
9451 * include/grub/gzio.h: Likewise.
9452 * include/grub/hfs.h: Likewise.
9453 * include/grub/kernel.h: Likewise.
9454 * include/grub/loader.h: Likewise.
9455 * include/grub/lvm.h: Likewise.
9456 * include/grub/misc.h: Likewise.
9457 * include/grub/mm.h: Likewise.
9458 * include/grub/net.h: Likewise.
9459 * include/grub/normal.h: Likewise.
9460 * include/grub/parser.h: Likewise.
9461 * include/grub/partition.h: Likewise.
9462 * include/grub/pc_partition.h: Likewise.
9463 * include/grub/raid.h: Likewise.
9464 * include/grub/rescue.h: Likewise.
9465 * include/grub/script.h: Likewise.
9466 * include/grub/setjmp.h: Likewise.
9467 * include/grub/symbol.h: Likewise.
9468 * include/grub/term.h: Likewise.
9469 * include/grub/terminfo.h: Likewise.
9470 * include/grub/tparm.h: Likewise.
9471 * include/grub/types.h: Likewise.
9472 * include/grub/video.h: Likewise.
9473 * include/grub/efi/api.h: Likewise.
9474 * include/grub/efi/chainloader.h: Likewise.
9475 * include/grub/efi/console.h: Likewise.
9476 * include/grub/efi/console_control.h: Likewise.
9477 * include/grub/efi/disk.h: Likewise.
9478 * include/grub/efi/efi.h: Likewise.
9479 * include/grub/efi/pe32.h: Likewise.
9480 * include/grub/efi/time.h: Likewise.
9481 * include/grub/i386/linux.h: Likewise.
9482 * include/grub/i386/setjmp.h: Likewise.
9483 * include/grub/i386/types.h: Likewise.
9484 * include/grub/i386/efi/kernel.h: Likewise.
9485 * include/grub/i386/efi/loader.h: Likewise.
9486 * include/grub/i386/efi/time.h: Likewise.
9487 * include/grub/i386/pc/biosdisk.h: Likewise.
9488 * include/grub/i386/pc/boot.h: Likewise.
9489 * include/grub/i386/pc/chainloader.h: Likewise.
9490 * include/grub/i386/pc/console.h: Likewise.
9491 * include/grub/i386/pc/init.h: Likewise.
9492 * include/grub/i386/pc/kernel.h: Likewise.
9493 * include/grub/i386/pc/loader.h: Likewise.
9494 * include/grub/i386/pc/memory.h: Likewise.
9495 * include/grub/i386/pc/multiboot.h: Likewise.
9496 * include/grub/i386/pc/serial.h: Likewise.
9497 * include/grub/i386/pc/time.h: Likewise.
9498 * include/grub/i386/pc/vbe.h: Likewise.
9499 * include/grub/i386/pc/vbeblit.h: Likewise.
9500 * include/grub/i386/pc/vbefill.h: Likewise.
9501 * include/grub/i386/pc/vbeutil.h: Likewise.
9502 * include/grub/i386/pc/vga.h: Likewise.
9503 * include/grub/ieee1275/ieee1275.h: Likewise.
9504 * include/grub/ieee1275/ofdisk.h: Likewise.
9505 * include/grub/powerpc/libgcc.h: Likewise.
9506 * include/grub/powerpc/setjmp.h: Likewise.
9507 * include/grub/powerpc/types.h: Likewise.
9508 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9509 * include/grub/powerpc/ieee1275/console.h: Likewise.
9510 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9511 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9512 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9513 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9514 * include/grub/powerpc/ieee1275/time.h: Likewise.
9515 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9516 * include/grub/sparc64/libgcc.h: Likewise.
9517 * include/grub/sparc64/setjmp.h: Likewise.
9518 * include/grub/sparc64/types.h: Likewise.
9519 * include/grub/sparc64/ieee1275/console.h: Likewise.
9520 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9521 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9522 * include/grub/sparc64/ieee1275/time.h: Likewise.
9523 * include/grub/util/biosdisk.h: Likewise.
9524 * include/grub/util/getroot.h: Likewise.
9525 * include/grub/util/lvm.h: Likewise.
9526 * include/grub/util/misc.h: Likewise.
9527 * include/grub/util/raid.h: Likewise.
9528 * include/grub/util/resolve.h: Likewise.
9529 * io/gzio.c: Likewise.
9530 * kern/device.c: Likewise.
9531 * kern/disk.c: Likewise.
9532 * kern/dl.c: Likewise.
9533 * kern/elf.c: Likewise.
9534 * kern/env.c: Likewise.
9535 * kern/err.c: Likewise.
9536 * kern/file.c: Likewise.
9537 * kern/fs.c: Likewise.
9538 * kern/loader.c: Likewise.
9539 * kern/main.c: Likewise.
9540 * kern/misc.c: Likewise.
9541 * kern/mm.c: Likewise.
9542 * kern/parser.c: Likewise.
9543 * kern/partition.c: Likewise.
9544 * kern/rescue.c: Likewise.
9545 * kern/term.c: Likewise.
9546 * kern/efi/efi.c: Likewise.
9547 * kern/efi/init.c: Likewise.
9548 * kern/efi/mm.c: Likewise.
9549 * kern/i386/dl.c: Likewise.
9550 * kern/i386/efi/init.c: Likewise.
9551 * kern/i386/efi/startup.S: Likewise.
9552 * kern/i386/pc/init.c: Likewise.
9553 * kern/i386/pc/lzo1x.S: Likewise.
9554 * kern/i386/pc/startup.S: Likewise.
9555 * kern/ieee1275/ieee1275.c: Likewise.
9556 * kern/powerpc/cache.S: Likewise.
9557 * kern/powerpc/dl.c: Likewise.
9558 * kern/powerpc/ieee1275/cmain.c: Likewise.
9559 * kern/powerpc/ieee1275/crt0.S: Likewise.
9560 * kern/powerpc/ieee1275/init.c: Likewise.
9561 * kern/powerpc/ieee1275/openfw.c: Likewise.
9562 * kern/sparc64/cache.S: Likewise.
9563 * kern/sparc64/dl.c: Likewise.
9564 * kern/sparc64/ieee1275/init.c: Likewise.
9565 * kern/sparc64/ieee1275/openfw.c: Likewise.
9566 * loader/efi/chainloader.c: Likewise.
9567 * loader/efi/chainloader_normal.c: Likewise.
9568 * loader/i386/efi/linux.c: Likewise.
9569 * loader/i386/efi/linux_normal.c: Likewise.
9570 * loader/i386/pc/chainloader.c: Likewise.
9571 * loader/i386/pc/chainloader_normal.c: Likewise.
9572 * loader/i386/pc/linux.c: Likewise.
9573 * loader/i386/pc/linux_normal.c: Likewise.
9574 * loader/i386/pc/multiboot.c: Likewise.
9575 * loader/i386/pc/multiboot_normal.c: Likewise.
9576 * loader/powerpc/ieee1275/linux.c: Likewise.
9577 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9578 * normal/arg.c: Likewise.
9579 * normal/cmdline.c: Likewise.
9580 * normal/command.c: Likewise.
9581 * normal/completion.c: Likewise.
9582 * normal/execute.c: Likewise.
9583 * normal/function.c: Likewise.
9584 * normal/lexer.c: Likewise.
9585 * normal/main.c: Likewise.
9586 * normal/menu.c: Likewise.
9587 * normal/menu_entry.c: Likewise.
9588 * normal/misc.c: Likewise.
9589 * normal/parser.y: Likewise.
9590 * normal/script.c: Likewise.
9591 * normal/i386/setjmp.S: Likewise.
9592 * normal/powerpc/setjmp.S: Likewise.
9593 * normal/sparc64/setjmp.S: Likewise.
9594 * partmap/acorn.c: Likewise.
9595 * partmap/amiga.c: Likewise.
9596 * partmap/apple.c: Likewise.
9597 * partmap/gpt.c: Likewise.
9598 * partmap/pc.c: Likewise.
9599 * partmap/sun.c: Likewise.
9600 * term/gfxterm.c: Likewise.
9601 * term/terminfo.c: Likewise.
9602 * term/efi/console.c: Likewise.
9603 * term/i386/pc/console.c: Likewise.
9604 * term/i386/pc/serial.c: Likewise.
9605 * term/i386/pc/vesafb.c: Likewise.
9606 * term/i386/pc/vga.c: Likewise.
9607 * term/ieee1275/ofconsole.c: Likewise.
9608 * util/biosdisk.c: Likewise.
9609 * util/console.c: Likewise.
9610 * util/genmoddep.c: Likewise.
9611 * util/getroot.c: Likewise.
9612 * util/grub-emu.c: Likewise.
9613 * util/grub-mkdevicemap.c: Likewise.
9614 * util/grub-probe.c: Likewise.
9615 * util/lvm.c: Likewise.
9616 * util/misc.c: Likewise.
9617 * util/raid.c: Likewise.
9618 * util/resolve.c: Likewise.
9619 * util/update-grub.in: Likewise.
9620 * util/update-grub_lib.in: Likewise.
9621 * util/grub.d/00_header.in: Likewise.
9622 * util/grub.d/10_hurd.in: Likewise.
9623 * util/grub.d/10_linux.in: Likewise.
9624 * util/i386/efi/grub-install.in: Likewise.
9625 * util/i386/efi/grub-mkimage.c: Likewise.
9626 * util/i386/pc/grub-install.in: Likewise.
9627 * util/i386/pc/grub-mkimage.c: Likewise.
9628 * util/i386/pc/grub-mkrescue.in: Likewise.
9629 * util/i386/pc/grub-setup.c: Likewise.
9630 * util/i386/pc/misc.c: Likewise.
9631 * util/powerpc/ieee1275/grub-install.in: Likewise.
9632 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9633 * util/powerpc/ieee1275/misc.c: Likewise.
9634 * video/bitmap.c: Likewise.
9635 * video/video.c: Likewise.
9636 * video/i386/pc/vbe.c: Likewise.
9637 * video/i386/pc/vbeblit.c: Likewise.
9638 * video/i386/pc/vbefill.c: Likewise.
9639 * video/i386/pc/vbeutil.c: Likewise.
9640 * video/readers/tga.c: Likewise.
9642 2007-07-02 Robert Millan <rmh@aybabtu.com>
9644 * conf/i386-efi.rmk: Replace obsolete reference to
9645 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9646 with util/getroot.c.
9647 * conf/powerpc-ieee1275.rmk: Likewise.
9648 * conf/sparc64-ieee1275.rmk: Likewise.
9650 * util/grub-emu.c (main): Fix unchecked pointer handling.
9652 2007-07-02 Robert Millan <rmh@aybabtu.com>
9654 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9655 invocation to fail, in order to support partition-less media.
9657 * util/i386/pc/grub-install.in: Likewise.
9659 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9660 which fs or partmap modules are needed (akin to its sister scripts).
9662 Also use grub-probe to get rid of unportable /proc/mounts check.
9664 Print the same informational message that the other scripts do, before
9667 2007-06-23 Robert Millan <rmh@aybabtu.com>
9669 * util/update-grub_lib.in (font_path): New function. Determine whether
9670 a font file can be found and, if so, echo the GRUB path to it.
9672 * util/update-grub.in: Handle multiple terminals depending on user
9673 input, platform availability and font file presence. Propagate
9674 variables of our findings to /etc/grub.d/ children.
9676 * util/grub.d/00_header.in: Handle multiple terminals, based on
9677 environment setup by update-grub.
9679 2007-06-23 Robert Millan <rmh@aybabtu.com>
9681 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9683 2007-06-21 Robert Millan <rmh@aybabtu.com>
9685 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9686 indicate end of data section in kernel image.
9687 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9688 GRUB_KERNEL_MACHINE_DATA_END.
9690 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9692 * kern/i386/efi/startup.S: Likewise.
9694 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9695 during image generation. Implement --prefix option to override this
9697 * util/i386/efi/grub-mkimage.c: Likewise.
9699 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9700 code to make path relative to its root into a separate function.
9702 * util/i386/pc/grub-install.in: Use newly provided
9703 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9704 pass the result to grub-install --prefix.
9706 2007-06-13 Robert Millan <rmh@aybabtu.com>
9708 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9710 * util/grub-emu.c: Use above definitions from misc.h instead of
9712 * util/grub-mkdevicemap.c: Likewise.
9713 * util/i386/pc/grub-setup.c: Likewise.
9714 * util/grub-probe.c: Likewise.
9715 (probe): Abort with grub_util_error() when either
9716 grub_guess_root_device or grub_util_get_grub_dev fails.
9718 2007-06-12 Robert Millan <rmh@aybabtu.com>
9720 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9722 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9724 * util/grub-probe.c (probe): Likewise for "drive_name".
9726 2007-06-11 Robert Millan <rmh@aybabtu.com>
9728 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9729 not just the cdrom one.
9731 2007-06-11 Robert Millan <rmh@aybabtu.com>
9733 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9734 Add --pkglibdir=DIR option to override pkglibdir.
9735 Mention --image-type=TYPE in help output.
9736 Fix --grub-mkimage (it was a no-op).
9737 Abort gracefully when no parameter is given.
9739 2007-06-11 Robert Millan <rmh@aybabtu.com>
9741 * util/i386/pc/grub-mkrescue.in: New file.
9742 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9743 * Makefile.in: Handle bin_SCRIPTS.
9745 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9747 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9748 list of video modes.
9750 2007-06-06 Robert Millan <rmh@aybabtu.com>
9752 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9753 file doesn't exist, or if it is in a filesystem grub can't read.
9755 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9756 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9757 header comment to fit in 80 columns when the variables are resolved.
9759 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9760 could be identified by update-grub. Remove redundant check for
9761 unifont.pff existence (since convert_system_path_to_grub_path now
9764 2007-06-04 Robert Millan <rmh@aybabtu.com>
9766 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9768 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9770 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9772 2007-06-04 Robert Millan <rmh@aybabtu.com>
9774 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9776 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9777 grub_apple_partition_map_fini.
9780 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9781 to access >2 TiB disks).
9783 Print disk->total_sectors with %llu instead of %lu, since this
9784 variable is always 64-bit (prevents wrong disk size from being displayed
9785 on either >2 TiB disk or big-endian CPU).
9787 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9788 into a generic case that supports all (sane) partition maps.
9790 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9793 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9794 and grub_apple_partition_map_fini() after that.
9796 2007-06-01 Robert Millan <rmh@aybabtu.com>
9798 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9800 * util/grub.d/00_header.in: Only enable gfxterm when
9801 convert_system_path_to_grub_path() succeeds.
9803 2007-05-20 Robert Millan <rmh@aybabtu.com>
9805 * util/update-grub_lib.in: New file.
9806 * DISTLIST: Add update-grub_lib.in.
9807 * conf/common.rmk: Generate update-grub_lib and install it in
9809 * Makefile.in: Add install routine for $(lib_DATA).
9811 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9812 function provided by update-grub_lib to support arbitrary paths of
9814 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9815 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9817 2007-05-19 Robert Millan <rmh@aybabtu.com>
9819 * commands/i386/cpuid.c: New module.
9821 * conf/i386-efi.rmk: Enable cpuid.mod.
9822 * conf/i386-pc.rmk: Likewise.
9824 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9826 * kern/disk.c (grub_disk_read): Check return value of
9829 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9831 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9833 * disk/raid.c (grub_raid_open): Likewise.
9835 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9837 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9838 stack instead of on the heap.
9840 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9841 before doing a read on it.
9843 * configure.ac: Only use -fno-stack-protector for the target
9846 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9848 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9849 __attribute_ ((unused)) to mode_type argument.
9851 * util/getroot.c (grub_guess_root_device): Fix #endif.
9853 * kern/misc.c (memcmp): Fix prototype.
9855 * include/grub/partition.h [GRUB_UTIL]
9856 (grub_gpt_partition_map_init): Add prototype.
9857 (grub_gpt_partition_map_fini): Likewise.
9859 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9862 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9863 (grub_fat_read_data): Likewise.
9864 (grub_fat_find_dir): Likewise.
9866 * font/manager.c (find_glyph): Make table a const.
9867 (grub_font_get_glyph): Remove bitmap from if statement.
9869 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9871 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9872 code, first search for device in /dev/mapper, then in /dev.
9873 (grub_util_get_grub_dev): New function.
9874 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9876 * util/grub-probe.c (probe): Remove check for RAID, call
9877 grub_util_get_grub_dev() instead of
9878 grub_util_biosdisk_get_grub_dev().
9879 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9880 grub_util_biosdisk_get_grub_dev().
9881 * util/i386/pc/grub-setup.c (main): Likewise.
9883 2007-05-16 Robert Millan <rmh@aybabtu.com>
9885 * DISTLIST: Update for the latest changes.
9886 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9887 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9888 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9889 grub/util/biosdisk.h.
9890 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9891 grub/util/biosdisk.h.
9893 2007-05-16 Robert Millan <rmh@aybabtu.com>
9895 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9897 2007-05-16 Robert Millan <rmh@aybabtu.com>
9899 * util/i386/efi/grub-install.in: New.
9900 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9901 newly added grub-install.
9902 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9904 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9905 grub/util/biosdisk.h.
9906 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9907 grub/util/biosdisk.h.
9909 2007-05-16 Robert Millan <rmh@aybabtu.com>
9911 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9912 * include/grub/util/biosdisk.h: ... here.
9913 * util/i386/pc/biosdisk.c: Moved to ...
9914 * util/biosdisk.c: ... here.
9915 * util/i386/pc/getroot.c: Moved to ...
9916 * util/getroot.c: ... here.
9917 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9918 * util/grub-mkdevicemap.c: ... here.
9919 * util/i386/pc/grub-probe.c: Moved to ...
9920 * util/grub-probe.c: ... here.
9922 2007-05-15 Robert Millan <rmh@aybabtu.com>
9924 * util/update-grub.in: Remove duplicated line in grub.cfg header
9927 2007-05-13 Robert Millan <rmh@aybabtu.com>
9929 * util/update-grub.in: Fix a few assumptions about the devices holding
9930 /, /boot and /boot/grub being the same.
9931 * util/grub.d/00_header.in: Likewise.
9932 * util/grub.d/10_hurd.in: Likewise.
9933 * util/grub.d/10_linux.in: Likewise.
9935 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9936 patterns. Use that to define the `.old' suffix as older than `'.
9938 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9940 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9941 the grub.cfg header message.
9943 2007-05-11 Robert Millan <rmh@aybabtu.com>
9945 * util/update-grub.in: Create device.map if it doesn't already exist,
9946 before attempting to run grub-probe.
9947 Check for grub-probe and grub-mkdevicemap with the same code
9948 grub-install is using.
9951 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9953 * Makefile.in: Add the datarootdir autoconf variable.
9955 2007-05-09 Robert Millan <rmh@aybabtu.com>
9957 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9958 fail gracefully if dev->disk->partition == NULL.
9960 2007-05-07 Robert Millan <rmh@aybabtu.com>
9962 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9963 determine partition map module.
9964 * util/i386/pc/grub-install.in: Use this feature to decide which
9965 partition module to load, instead of hardcoding pc and gpt.
9967 2007-05-07 Robert Millan <rmh@aybabtu.com>
9969 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9970 source directory differs from build directory.
9972 2007-05-05 Robert Millan <rmh@aybabtu.com>
9974 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9977 2007-05-05 Robert Millan <rmh@aybabtu.com>
9979 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9981 2007-05-05 Robert Millan <rmh@aybabtu.com>
9983 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9984 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9986 2007-05-05 Robert Millan <rmh@aybabtu.com>
9988 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9989 (grub_probe_SOURCES): Likewise.
9990 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9991 GPT and initialize dos_part and bsd_part accordingly.
9992 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9994 (main): Activate gpt module for use during partition identification,
9995 and deactivate it afterwards.
9996 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9997 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9998 partition identification, and deactivate it afterwards.
10000 2007-05-05 Robert Millan <rmh@aybabtu.com>
10002 * term/i386/pc/console.c (grub_console_fini): Call
10003 grub_term_set_current() before grub_term_unregister().
10005 2007-05-04 Robert Millan <rmh@aybabtu.com>
10007 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10008 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10009 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
10010 and update-grub_DATA.
10011 * conf/common.rmk: Build and install update-grub components.
10012 * conf/common.mk: Regenerate.
10013 * util/update-grub.in: New. Core of update-grub.
10014 * util/grub.d/00_header.in: New. Generates grub.cfg header.
10015 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
10016 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
10017 * util/grub.d/README: New. Document grub.d directory layout.
10019 2007-05-01 Robert Millan <rmh@aybabtu.com>
10021 * util/grub-emu.c: Move initialization functions
10022 grub_util_biosdisk_init() and grub_init_all() before
10023 grub_util_biosdisk_get_grub_dev(), which relies on them.
10025 2007-04-19 Robert Millan <rmh@aybabtu.com>
10027 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10030 2007-04-18 Jerone Young <jerone@gmail.com>
10032 * kernel/elf.c: Add missing parenthesis for conditional statement
10035 2007-04-10 Jerone Young <jerone@gmail.com>
10037 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10038 continue on and look for device node with real device name.
10040 2007-04-10 Jerone Young <jerone@gmail.com>
10042 * configure.ac: Add argument for autoconf to use transformation
10044 * Makefile.in: Add autoconf package transformation code.
10045 * util/i386/pc/grub-install.in: Likewise.
10046 * util/powerpc/ieee1275/grub-install.in: Likewise.
10048 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10050 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10051 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10052 (EXT2_REVISION): Likewise.
10053 (EXT2_INODE_SIZE): Likewise.
10054 (struct grub_ext2_block_group): Added a missing member
10056 (grub_ext2_read_inode): Divide by the inode size in a superblock
10057 instead of 128 to obtain INODES_PER_BLOCK.
10058 Use the macro EXT2_INODE_SIZE instead of directly using
10059 SBLOCK->INODE_SIZE.
10061 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10063 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10064 superblock instead of the structure size to compute an
10065 offset. This fixes the problem that GRUB could not read a
10066 filesystem when inode size is different from 128-byte.
10068 2007-03-05 Marco Gerards <marco@gnu.org>
10070 * normal/main.c (read_config_file): When "menu" is not set, create
10071 an initial context.
10073 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10075 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10076 (HEAP_LIMIT): New macro.
10077 (grub_claim_heap): Claim memory up to `heaplimit'.
10079 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
10081 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10082 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10083 (_start): Likewise.
10084 (grub_arch_modules_addr): Return address after `_end'.
10085 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10086 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10087 (add_segments): Calculate `_end' from phdr size and location.
10088 (ALIGN_UP): Moved to ...
10089 * include/grub/misc.h: here.
10090 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10092 (GRUB_IEEE1275_MODULE_BASE): Removed.
10094 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10096 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10099 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10101 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10103 (grub_elf64_load_hook_t): Likewise.
10104 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10107 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
10109 * kern/mm.c: Update copyright.
10110 (grub_mm_debug): Correct syntax error.
10111 (grub_mm_dump_free): New function.
10112 (grub_debug_free): Call `grub_free'.
10113 * include/grub/mm.h: Update copyright.
10114 (grub_mm_dump_free): Add declaration.
10116 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10118 * include/grub/ieee1275/ieee1275.h: Update copyright.
10119 * kern/powerpc/ieee1275/init.c: Likewise.
10120 * kern/powerpc/ieee1275/openfw.c: Likewise.
10122 * loader/powerpc/ieee1275/linux.c: Likewise.
10123 * include/grub/elfload.h: Likewise.
10124 * kern/elf.c: Likewise.
10125 (grub_elf32_load): Pass `base' and `size' parameters. Update all
10127 (grub_elf64_load): Likewise.
10128 (grub_elf32_load_segment): Move to a nested function.
10129 (grub_elf64_load_segment): Likewise.
10131 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
10133 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10135 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10136 (grub_heap_len): Likewise.
10137 (HEAP_SIZE): New macro.
10138 (grub_claim_heap): New function.
10139 (grub_machine_init): Don't claim heap directly. Call
10141 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10142 (grub_available_iterate): New function.
10144 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
10146 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10147 * configure.ac: Use it for testing the HOST and TARGET compilers.
10149 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10151 * Makefile.in (enable_grub_emu): New variable.
10152 * configure.ac (--enable-grub-emu): New option.
10153 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10154 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10155 * conf/i386-pc.rmk: Likewise.
10156 * conf/powerpc-ieee1275.rmk: Likewise.
10157 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10159 2006-12-12 Marco Gerards <marco@gnu.org>
10161 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10163 * kern/env.c (grub_env_unset): Don't free the member `value' when
10164 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10167 * normal/main.c (current_menu): Removed.
10168 (free_menu): Unset the `menu' environment variable.
10169 (grub_normal_menu_addentry): Make use of the environment variable
10170 `menu', instead of using the global `current_menu'. Allocate
10171 memory for the sourcecode of this entry.
10172 (read_config_file): New argument `nested', changed all callers.
10173 Only in the case of a new context, initialize a new menu. Set the
10174 `menu' environment variable.
10175 (grub_normal_execute): Don't set and unset the environment
10176 variable `menu' here anymore. Only free the menu when leaving the
10179 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10182 2006-12-11 Marco Gerards <marco@gnu.org>
10184 * normal/menu_entry.c (run): Fix off by one bug so the last line
10185 is executed. Move the loader check to outside the loop.
10187 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10189 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10191 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10193 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10194 the number of sectors. Reported by Andrey Shuvikov
10195 <mr_hyro@yahoo.com>.
10197 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10199 * kern/disk.c (grub_disk_read): When there is a read error, always
10200 try to read only the necessary data.
10202 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10204 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10206 [GRUB_UTIL] (grub_raid_fini): Likewise.
10207 [GRUB_UTIL] (grub_lvm_init): Likewise.
10208 [GRUB_UTIL] (grub_lvm_fini): Likewise.
10209 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10210 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10211 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10212 and grub_raid_fini().
10214 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10216 * include/grub/types.h (__unused): Rename to UNUSED.
10217 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10218 (grub_elf64_size): Likewise.
10220 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10222 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10223 grub_error_push and grub_error_pop in the error-handling path.
10224 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10227 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10229 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10230 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10232 (kernel_elf_SOURCES): Likewise.
10233 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10234 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10235 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10236 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10237 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10238 (elf_mod_SOURCES): New variable.
10239 (elf_mod_CFLAGS): Likewise.
10240 (elf_mod_LDFLAGS): Likewise.
10241 * include/grub/types.h (__unused): New macro.
10242 * include/grub/elfload.h: New file.
10243 * kern/elf.c: Likewise.
10244 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10245 (ELF32_LOADMASK): New macro.
10246 (ELF64_LOADMASK): Likewise.
10247 (vmlinux): Removed.
10248 (grub_linux_load32): New function.
10249 (grub_linux_load64): Likewise.
10250 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10251 Use grub_elf_t instead of grub_file_t.
10253 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10255 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10256 `catch_result' to struct set_color_args.
10258 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10260 * normal/menu.c: Include grub/script.h.
10261 * normal/menu_entry.c: Likewise.
10262 * include/grub/normal.h: Do not include grub/script.h.
10264 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10266 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10268 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10270 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10272 (grub_disk_close): Print debug messages when closing a disk.
10273 (grub_disk_read): Print debug messages when disk read fails.
10274 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10276 * kern/partition.c: Include misc.h.
10277 (grub_partition_iterate): Print debug messages when detecting
10280 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10282 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10284 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10286 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10288 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10289 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10291 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10293 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10294 instead of sizeof(lv). Patch by Michael Guntsche.
10296 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10298 * disk/lvm.c: Rename VGS to VG_LIST.
10299 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10300 (grub_lvm_open): Likewise.
10301 Thanks to Michael Guntsche for finding this bug.
10303 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10305 * configure.ac (AC_INIT): Bumped to 1.95.
10307 2006-10-14 Robert Millan <rmh@aybabtu.com>
10309 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10310 with "/dev/.static/dev/md".
10312 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10314 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10315 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10316 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10317 DRIVE_NAME are always freed.
10319 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10320 DOS_PART, as a DOS partition is counted from one instead of zero
10321 now. Reported by Robert Millan.
10323 2006-10-14 Robert Millan <rmh@aybabtu.com>
10325 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10326 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10327 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10328 string returned by grub_guess_root_device.
10329 * util/i386/pc/grub-setup.c: Likewise.
10330 * util/i386/pc/grub-probefs.c: Likewise.
10332 * util/i386/pc/grub-probefs.c: Rename to ...
10333 * util/i386/pc/grub-probe.c: ... this.
10334 * DISTLIST: Remove grub-probefs, add grub-probe.
10335 * conf/i386-efi.rmk: Likewise.
10336 * conf/i386-pc.rmk: Likewise.
10337 * util/i386/pc/grub-install.in: Likewise.
10339 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10340 choose which information we want to print.
10342 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10344 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10345 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10346 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10347 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10348 video/readers/tga.c and video/i386/pc/vbeutil.c.
10350 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10352 Added support for RAID and LVM.
10354 * disk/lvm.c: New file.
10355 * disk/raid.c: Likewise.
10356 * include/grub/lvm.h: Likewise.
10357 * include/grub/raid.h: Likewise.
10358 * include/grub/util/lvm.h: Likewise.
10359 * include/grub/util/raid.h: Likewise.
10360 * util/lvm.c: Likewise.
10361 * util/raid.c: Likewise.
10363 * include/grub/disk.h (grub_disk_dev_id): Add
10364 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10365 (grub_disk_get_size): New prototype.
10366 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10367 returns a partition.
10368 (grub_disk_get_size): New function.
10370 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10371 verbatim if grub_install_dos_part is -2.
10373 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10376 * util/i386/pc/grub-setup.c (setup): New argument
10377 MUST_EMBED. Force embedding of GRUB when the argument is
10378 true. Close FILE before returning.
10379 (main): Add support for RAID and LVM.
10381 * conf/common.rmk: Add RAID and LVM modules.
10382 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10384 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10386 * kern/misc.c (grub_strstr): New function.
10387 * include/grub/misc.h (grub_strstr): New prototype.
10389 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10391 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10393 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10395 * kern/misc.c (grub_strtoull): Guess the base only if not
10398 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10400 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10403 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10405 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10407 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10408 Remove `flags' argument. All callers changed.
10409 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10410 (IEEE1275_IHANDLE_INVALID): New variable.
10411 (IEEE1275_CELL_INVALID): New variable.
10412 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10413 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10414 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10415 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10416 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10417 codes from Open Firmware. All callers updated.
10418 (grub_ieee1275_next_property): Directly return Open Firmware return
10420 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10421 Standardize error checking from `grub_ieee1275_get_property'.
10422 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10423 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10425 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10427 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10428 `instance_to_package_args' to `instance_to_path_args'.
10430 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10431 `grub_ieee1275_chosen'.
10433 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10434 `grub_ieee1275_interpret'.
10436 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10438 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10440 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10442 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10443 (__cmpdi): Likewise.
10445 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10446 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10449 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10451 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10452 to type `grub_ssize_t'.
10453 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10455 2006-09-22 Marco Gerards <marco@gnu.org>
10457 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10460 2006-09-22 Marco Gerards <marco@gnu.org>
10462 * commands/echo.c: New file.
10464 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10466 * conf/common.rmk (echo_mod_SOURCES): New variable.
10467 (echo_mod_CFLAGS): Likewise.
10468 (echo_mod_LDFLAGS): Likewise.
10470 2006-09-22 Marco Gerards <marco@gnu.org>
10472 * normal/main.c (get_line): Malloc memory instead of using
10473 preallocated memory. Removed the arguments `cmdline' and
10474 `max_len'. Updated all callers.
10476 2006-09-22 Marco Gerards <marco@gnu.org>
10478 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10479 (normal_mod_DEPENDENCIES): Likewise.
10481 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10482 (normal_mod_DEPENDENCIES): Likewise.
10484 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10486 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
10488 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10490 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10491 (normal_mod_DEPENDENCIES): Likewise.
10492 * conf/i386-pc.mk: Regenerate.
10493 * conf/i386-efi.mk: Likewise
10494 * conf/common.mk: Likewise.
10495 * conf/powerpc-ieee1275.mk: Likewise.
10496 * conf/sparc64-ieee1275.mk: Likewise.
10498 2006-09-22 Robert Millan <rmh@aybabtu.com>
10500 Sync with i386 version.
10501 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10502 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10504 2006-09-21 Robert Millan <rmh@aybabtu.com>
10506 Import from GRUB Legacy (lib/device.c):
10507 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10508 (init_device_map) [__linux__]: Add support for I2O devices.
10510 2006-09-14 Marco Gerards <marco@gnu.org>
10512 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10515 2006-09-14 Robert Millan <rmh@aybabtu.com>
10517 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10520 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10522 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10523 before adding it to device.map.
10525 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
10527 * genmk.rb: Let GCC generate dependencies the first time it
10528 compiles a file; using the -MD option.
10529 * conf/common.mk: Regenerate.
10530 * conf/i386-pc.mk: Likewise.
10531 * conf/i386-efi.mk: Likewise.
10532 * conf/powerpc-ieee1275.mk: Likewise.
10533 * conf/sparc64-ieee1275.mk: Likewise.
10535 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10537 Move the prototypes of grub_setjmp and grub_longjmp to
10538 cpu/setjmp.h, so that each architecture may specify different
10541 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10542 (grub_longjmp): Likewise.
10543 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10544 (grub_longjmp): Likewise.
10545 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10546 (grub_longjmp): Likewise.
10548 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10549 [!GRUB_UTIL] (grub_longjmp): Removed.
10551 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10553 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10554 "color!" method does not return any value.
10556 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10558 * include/grub/bitmap.h: New file.
10560 * include/grub/i386/pc/vbeutil.h: Likewise.
10562 * video/bitmap.c: Likewise.
10564 * video/readers/tga.c: Likewise.
10566 * video/i386/pc/vbeutil.c: Likewise.
10568 * commands/videotest.c: Code cleanup and updated to reflect to new
10571 * term/gfxterm.c: Likewise.
10573 * video/video.c: Likewise.
10575 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10576 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10577 (bitmap_mod_SOURCES): New entry.
10578 (bitmap_mod_CFLAGS): Likewise.
10579 (bitmap_mod_LDFLAGS): Likewise.
10580 (tga_mod_SOURCES): Likewise.
10581 (tga_mod_CFLAGS): Likewise.
10582 (tga_mod_LDFLAGS): Likewise.
10584 * include/grub/video.h (grub_video_blit_operators): New enum type.
10585 (grub_video_render_target): Changed as forward declaration and moved
10586 actual definition to be video driver specific.
10587 (grub_video_adapter.blit_bitmap): Added blitting operator.
10588 (grub_video_adapter.blit_render_target): Likewise.
10589 (grub_video_blit_bitmap): Likewise.
10590 (grub_video_blit_render_target): Likewise.
10592 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10593 driver specific render target definition.
10594 (grub_video_vbe_map_rgba): Added driver internal helper.
10595 (grub_video_vbe_unmap_color): Updated to use
10596 grub_video_i386_vbeblit_info.
10597 (grub_video_vbe_get_video_ptr): Likewise.
10599 * include/grub/i386/pc/vbeblit.h
10600 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10601 grub_video_i386_vbeblit_info.
10602 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10603 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10604 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10605 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10606 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10607 (grub_video_i386_vbeblit_index_index): Likewise.
10608 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10609 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10610 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10611 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10613 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10616 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10617 include/grub/i386/pc/vbeblit.h.
10619 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10620 Updated to use grub_video_i386_vbeblit_info.
10621 (grub_video_i386_vbefill_R8G8B8): Likewise.
10622 (grub_video_i386_vbefill_index): Likewise.
10623 (grub_video_i386_vbefill): Added generic filler.
10625 * video/i386/pc/vbefill.c: Updated to reflect changes on
10626 include/grub/i386/pc/vbefill.h.
10628 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10629 grub_video_i386_vbeblit_info.
10630 (grub_video_vbe_unmap_color): Likewise.
10631 (grub_video_vbe_blit_glyph): Likewise.
10632 (grub_video_vbe_scroll): Likewise.
10633 (grub_video_vbe_draw_pixel): Removed function.
10634 (grub_video_vbe_get_pixel): Likewise.
10635 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10636 updated code to use it.
10637 (common_blitter): Added common blitter for render target and bitmap.
10638 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10639 (grub_video_vbe_blit_render_target): Likewise.
10641 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
10643 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10644 is in text mode if there is no console control protocol instance
10647 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10649 * include/grub/video.h: Code cleanup.
10651 * include/grub/i386/pc/vbe.h: Likewise.
10653 * video/i386/pc/vbe.c: Likewise.
10655 * video/i386/pc/vbeblit.c: Likewise.
10657 * video/i386/pc/vbefill.c: Likewise.
10659 * video/video.c: Likewise. Also added more comments.
10661 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10663 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10664 (struct grub_biosdisk_dap): Likewise.
10666 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10667 linkage settings for all functions.
10669 2006-07-12 Marco Gerards <marco@gnu.org>
10671 * configure.ac (--enable-mm-debug): Fix typo.
10673 * genkernsyms.sh.in: Use proper quoting for `CC'.
10675 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10677 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10678 (normal_mod_ASFLAGS): Remove "-m32".
10680 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10682 * util/misc.c: Include config.h.
10683 [!HAVE_MEMALIGN]: Do not include malloc.h.
10684 (grub_memalign): Use posix_memalign, if present. Then, use
10685 memalign, if present. Otherwise, emit an error.
10687 * util/grub-emu.c: Do not include malloc.h.
10689 * include/grub/util/misc.h: Include unistd.h. This is required for
10690 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10691 D. Eades III <hde@foobar-qux.org>.
10693 * configure.ac (AC_GNU_SOURCE): Added.
10694 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10697 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10699 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10700 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10702 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10704 * include/grub/types.h (grub_host_addr_t): Rename to
10705 grub_target_addr_t.
10706 (grub_host_off_t): Rename to grub_target_off_t.
10707 (grub_host_size_t): Rename to grub_target_size_t.
10708 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10709 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10711 * include/grub/kernel.h (struct grub_module_header): Change type
10712 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10713 (grub_module_info): Likewise.
10715 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10717 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10718 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10719 Velazquez <jesus.velazquez@gmail.com>.
10721 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10723 Count partitions from 1 instead of 0 in the string representation
10724 of partitions. Still use 0-based internally.
10726 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10727 (sun_partition_map_iterate): Use grub_partition_t instead of
10728 struct grub_partition *. Cast DESC->START_CYLINDER to
10729 grub_uint64_t after converting the endian.
10730 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10731 (sun_partition_map_get_name): Add 1 to P->INDEX.
10733 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10735 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10737 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10738 zero instead of one.
10739 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10740 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10742 * partmap/apple.c (apple_partition_map_iterate): Change the type
10743 of POS to unsigned.
10744 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10745 (apple_partition_map_get_name): Add 1 into P->INDEX.
10747 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10748 of POS to unsigned.
10749 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10750 calculate the offset of a partition.
10751 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10752 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10754 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10755 SECTOR to grub_disk_addr_t.
10756 (acorn_partition_map_iterate): Likewise.
10757 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10758 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10760 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10762 * kern/i386/pc/init.c (make_install_device): Add 1 into
10763 GRUB_INSTALL_DOS_PART.
10765 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10768 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10770 Clean up the code to support 64-bit addressing in disks and
10771 files. This change is not enough for filesystems yet.
10773 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10774 type of "start" to grub_uint64_t.
10775 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10776 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10777 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10780 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10781 to grub_disk_addr_t.
10783 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10786 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10788 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10791 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10793 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10795 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10797 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10798 to grub_off_t, to detect an error from grub_file_seek.
10799 (grub_multiboot_load_elf32): Likewise.
10801 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10802 maximum unsigned long value when an overflow is detected.
10803 (grub_strtoull): New function.
10804 (grub_divmod64): Likewise.
10805 (grub_lltoa): use grub_divmod64.
10807 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10809 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10810 the pointer to next character. Use grub_strtoull instead of
10812 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10813 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10816 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10817 return value is signed.
10818 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10819 test if OFFSET is less than zero, as OFFSET is unsigned now.
10821 * kern/disk.c (struct grub_disk_cache): Change the type of
10822 "sector" to grub_disk_addr_t.
10823 (grub_disk_cache_get_index): Change the type of SECTOR to
10824 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10825 unsigned after shifting.
10826 (grub_disk_cache_invalidate): Change the type of SECTOR to
10828 (grub_disk_cache_unlock): Likewise.
10829 (grub_disk_cache_store): Likewise.
10830 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10831 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10832 grub_disk_addr_t and grub_uint64_t, respectively.
10833 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10834 body, as the value of OFFSET is tweaked by
10835 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10836 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10838 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10839 body, as the value of OFFSET is tweaked by
10840 grub_disk_check_range. Change the types of LEN and N to
10843 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10844 and "saved_offset" to grub_off_t.
10845 (test_header): Cast BUF to char *.
10846 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10848 (grub_gzio_read): Change the types of OFFSET and SIZE to
10849 grub_off_t and grub_size_t, respectively.
10851 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10853 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10854 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10855 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10856 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10857 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10859 * include/grub/types.h (grub_off_t): Unconditionally set to
10861 (grub_disk_addr_t): Changed to grub_uint64_t.
10863 * include/grub/partition.h (struct grub_partition): Change the
10864 types of "start", "len" and "offset" to grub_disk_addr_t,
10865 grub_uint64_t and grub_disk_addr_t, respectively.
10866 (grub_partition_get_start): Return grub_disk_addr_t.
10867 (grub_partition_get_len): Return grub_uint64_t.
10869 * include/grub/misc.h (grub_strtoull): New prototype.
10870 (grub_divmod64): Likewise.
10872 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10873 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10874 grub_off_t, respectively.
10875 All callers and references changed.
10877 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10878 grub_size_t in "read".
10879 All callers and references changed.
10881 * include/grub/file.h (struct grub_file): Change the types of
10882 "offset" and "size" to grub_off_t and grub_off_t,
10883 respectively. Change the type of SECTOR to grub_disk_addr_t in
10885 (grub_file_read): Change the type of LEN to grub_size_t.
10886 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10888 (grub_file_size): Return grub_off_t.
10889 (grub_file_tell): Likewise.
10890 All callers and references changed.
10892 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10893 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10895 (struct grub_disk): Change the type of "total_sectors" to
10896 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10898 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10899 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10900 (grub_disk_write): Likewise.
10901 All callers and references changed.
10903 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10904 char * for grub_strncmp to silence gcc.
10905 (grub_iso9660_mount): Likewise.
10906 (grub_iso9660_mount): Likewise.
10907 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10909 (grub_iso9660_iterate_dir): Likewise.
10910 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10912 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10913 LEN to grub_disk_addr_t and grub_size_t, respectively.
10915 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10917 * fs/jfs.c (grub_jfs_read_file): Likewise.
10919 * fs/minix.c (grub_jfs_read_file): Likewise.
10921 * fs/sfs.c (grub_jfs_read_file): Likewise.
10923 * fs/ufs.c (grub_jfs_read_file): Likewise.
10925 * fs/xfs.c (grub_jfs_read_file): Likewise.
10927 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10928 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10931 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10932 BLKNR to -1 instead of returning GRUB_ERRNO.
10933 (grub_ext2_read_file): Change the types of SECTOR and
10934 LEN to grub_disk_addr_t and grub_size_t, respectively.
10936 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10937 LEN to grub_disk_addr_t and grub_size_t, respectively.
10939 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10942 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10943 string. Do not cast SECTOR explicitly.
10945 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10946 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10947 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10948 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10949 over 2TB and LBA mode is not supported, raise an error.
10950 (get_safe_sectors): New function.
10951 (grub_biosdisk_read): Use get_safe_sectors.
10952 (grub_biosdisk_write): Likewise.
10954 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10955 (grub_efidisk_write): Likewise.
10957 * disk/loopback.c (delete_loopback): Cosmetic changes.
10958 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10960 (grub_loopback_open): Likewise.
10961 (grub_loopback_read): Likewise. Also, change the type of POS to
10962 grub_off_t, and fix the usage of grub_memset.
10964 * commands/i386/pc/play.c: Include grub/machine/time.h.
10966 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10969 * commands/configfile.c: Include grub/env.h.
10971 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10972 GRUB_ERRNO directly instead. Change the type of POS to
10973 grub_off_t. Follow the coding standard.
10975 * commands/blocklist.c: Include grub/partition.h.
10976 (grub_cmd_blocklist): Return an error if the underlying device is
10977 not a disk. Take the starting sector of a partition into account,
10978 if a partition is used.
10980 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10982 (lba_mode): Support 64-bit addresses.
10983 (chs_mode): Likewise.
10984 (copy_buffer): Adapted to the new offsets of a length field and a
10986 (blocklist_default_start): Allocate 64-bit space.
10988 * boot/i386/pc/boot.S (force_lba): Removed.
10989 (boot_drive): Moved to under KERNEL_SECTOR.
10990 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10992 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10994 (lba_mode): Refactored to support a 64-bit address. More size
10996 (setup_sectors): Likewise.
10998 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
11000 * DISTLIST: Added include/grub/i386/linux.h. Removed
11001 include/grub/i386/pc/linux.h
11003 * configure.ac (AC_INIT): Bumped to 1.94.
11005 * config.guess: Updated from gnulib.
11006 * config.sub: Likewise.
11007 * install-sh: Likewise.
11008 * mkinstalldirs: Likewise.
11010 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11012 * conf/common.rmk (grub_modules_init.lst): Depended on
11013 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11016 * genmk.rb (PModule::rule): Reverted the previous change.
11018 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
11020 * conf/common.rmk (grub_modules_init.lst): Depends on
11021 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11022 that the target does not exist before producing.
11023 (grub_modules_init.h): Remove the target before generating.
11024 (grub_emu_init.c): Likewise.
11026 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11028 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
11030 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11031 for the target-specific tests. Make sure that we also have the
11032 up-to-date target variables for those tests.
11034 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11036 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11037 (PModule::rule): Likewise.
11039 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
11041 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11042 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11043 target-specific flags should be prefixed.
11044 (PModule::rule): Likewise.
11046 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
11048 * configure.ac (CMP): Check if cmp is available explicitly.
11050 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
11052 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11053 (target_cpu): New variable.
11054 (pkglibdir): Use target_cpu instead of host_cpu.
11056 * util/i386/pc/grub-install.in (host_cpu): Removed.
11057 (target_cpu): New variable.
11058 (pkglibdir): Use target_cpu instead of host_cpu.
11060 * util/genmoddep.c: Removed.
11062 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11063 instead of GRUB_HOST_SIZEOF_VOID_P.
11064 * kern/dl.c: Likewise.
11066 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11068 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11069 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11070 (GRUB_TARGET_SIZEOF_LONG): ... this.
11071 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11072 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11073 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11075 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11076 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11077 (GRUB_TARGET_SIZEOF_LONG): ... this.
11078 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11079 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11080 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11082 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11083 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11084 (GRUB_TARGET_SIZEOF_LONG): ... this.
11085 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11086 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11088 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11089 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11090 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11091 instead of GRUB_HOST_SIZEOF_LONG.
11092 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11093 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11094 GRUB_CPU_WORDS_BIGENDIAN.
11095 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11096 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11099 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11100 (genmoddep_SOURCES): Likewise.
11101 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11102 (genmoddep_SOURCES): Likewise.
11103 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11104 (genmoddep_SOURCES): Likewise.
11105 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11107 (genmoddep_SOURCES): Likewise.
11109 * genmoddep.awk: New file.
11111 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11112 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11113 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11114 (PModule::rule): Likewise.
11115 (Program::rule): Likewise.
11116 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11117 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11120 * configure.ac: Rewritten intensively to use host and target
11121 instead of build and host, respectively.
11123 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11124 (host_cpu): Removed.
11125 (target_cpu): New variable.
11126 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11127 (BUILD_CC): Removed.
11128 (BUILD_CFLAGS): Likewise.
11129 (BUILD_CPPFLAGS): Likewise.
11130 (TARGET_CC): New variable.
11131 (TARGET_CFLAGS): Likewise.
11132 (TARGET_CPPFLAGS): Likewise.
11133 (TARGET_LDFLAGS): Likewise.
11135 (include): Use target_cpu instead of host_cpu.
11136 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11138 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11140 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
11142 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11143 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
11144 field 'false' to 'exec_on_false'.
11145 (grub_script_create_cmdif): Renamed argument names to reflect above
11148 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11150 * normal/script.c (grub_script_create_cmdif): Likewise.
11152 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11154 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11156 (grub_hfsplus_btree_recptr): Likewise.
11157 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11158 FILEBLOCK both to pass a block number and store next block
11160 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11161 overflow file correctly. Specify errors appropriately, because
11162 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11163 grub_hfsplus_btree_recptr to get the pointer to a found key.
11164 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11167 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11169 (_linux_mod_SOURCES): New variable.
11170 (_linux_mod_CFLAGS): Likewise.
11171 (_linux_mod_LDFLAGS): Likewise.
11172 (linux_mod_SOURCES): Likewise.
11173 (linux_mod_CFLAGS): Likewise.
11174 (linux_mod_LDFLAGS): Likewise.
11176 * DISTLIST: Added loader/i386/efi/linux.c,
11177 loader/i386/efi/linux_normal.c and
11178 include/grub/i386/efi/loader.h.
11180 * loader/i386/efi/linux.c: New file.
11181 * loader/i386/efi/linux_normal.c: Likewise.
11182 * include/grub/i386/efi/loader.h: Likewise.
11184 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11186 * commands/blocklist.c: New file.
11188 * DISTLIST: Added commands/blocklist.c.
11190 * term/efi/console.c (grub_console_highlight_color): Use a lighter
11191 color for the background, and a darker color for the foreground.
11192 (grub_console_checkkey): Return READ_KEY.
11193 (grub_console_cls): Set the background to
11194 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11196 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11198 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11199 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11201 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11204 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11205 BG. The spec is wrong again.
11207 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11209 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11211 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11212 commands/blocklist.c.
11213 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11215 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11216 (blocklist_mod_SOURCES): New variable.
11217 (blocklist_mod_CFLAGS): Likewise.
11218 (blocklist_mod_LDFLAGS): Likewise.
11220 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11222 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11224 (lba_mode): Use %eax more intensively to reduce the code size.
11226 2006-05-20 Marco Gerards <marco@gnu.org>
11228 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11230 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11232 (script): Accept leading newlines.
11233 (newlines): New rule to describe 0 or more newlines.
11234 (commands): Accept `command' with trailing newline. Fixed the
11235 order in which arguments were passed to `grub_script_add_cmd'.
11236 Accept commands separated by newlines.
11237 (function): Changed to accept newlines.
11238 (menuentry) Rewritten.
11240 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11241 front of the list, instead of to the end.
11243 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11245 * util/i386/pc/grub-install.in (bindir): New variable.
11246 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11247 Shaver <lbgwjl@gmail.com>.
11249 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11251 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11252 grub/machine/linux.h
11253 * loader/i386/pc/linux.c: Likewise.
11255 * include/grub/i386/pc/linux.h: Moved to ...
11256 * include/grub/i386/linux.h: ... here.
11258 * include/grub/i386/linux.h (struct linux_kernel_params): New
11261 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11263 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11265 (grub_video_vbe_blit_glyph): Likewise.
11266 (grub_video_vbe_blit_bitmap): Likewise.
11267 (grub_video_vbe_blit_render_target): Likewise.
11269 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11271 * configure.ac (--with-platform): Properly quote the square
11274 2006-05-08 Marco Gerards <marco@gnu.org>
11276 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11278 (kernel_elf_HEADERS): ...to this. Updated all users.
11279 (grubof_symlist.c): Renamed from this...
11280 (kernel_elf_symlist.c): ...to this. Updated all users.
11281 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11282 (grubof_SOURCES): Renamed from this...
11283 (kernel_elf_SOURCES): ...to this.
11284 (grubof_HEADERS): Renamed from this...
11285 (kernel_elf_HEADERS): ...to this.
11286 (grubof_CFLAGS): Renamed from this...
11287 (kernel_elf_CFLAGS): ...to this.
11288 (grubof_ASFLAGS): Renamed from this...
11289 (kernel_elf_ASFLAGS): ...to this.
11290 (grubof_LDFLAGS): Renamed from this...
11291 (kernel_elf_LDFLAGS): ...to this.
11293 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11295 (kernel_elf_HEADERS): ...to this. Updated all users.
11296 (grubof_symlist.c): Renamed from this...
11297 (kernel_elf_symlist.c): ...to this. Updated all users.
11298 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11299 (grubof_SOURCES): Renamed from this...
11300 (kernel_elf_SOURCES): ...to this.
11301 (grubof_HEADERS): Renamed from this...
11302 (kernel_elf_HEADERS): ...to this.
11303 (grubof_CFLAGS): Renamed from this...
11304 (kernel_elf_CFLAGS): ...to this.
11305 (grubof_ASFLAGS): Renamed from this...
11306 (kernel_elf_ASFLAGS): ...to this.
11307 (grubof_LDFLAGS): Renamed from this...
11308 (kernel_elf_LDFLAGS): ...to this.
11310 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11311 `kernel.elf' instead of `grubof'.
11313 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11315 Add --with-platform to configure. Use pkglibdir instead of
11316 pkgdatadir. This is reported by Roger Leigh.
11318 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11319 (host_vendor): Likewise.
11320 (host_os): Likewise.
11321 (pkgdatadir): Likewise.
11322 (platform): New variable.
11323 (pkglibdir): Likewise.
11324 Use PKGLIBDIR instead of PKGDATADIR.
11326 * util/i386/pc/grub-install.in (datadir): Removed.
11327 (host_vendor): Likewise.
11328 (host_os): Likewise.
11329 (pkgdatadir): Likewise.
11330 (platform): New variable.
11331 (pkglibdir): Likewise.
11332 Use PKGLIBDIR instead of PKGDATADIR.
11334 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11335 instead of GRUB_DATADIR.
11337 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11339 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11342 * configure.ac (--with-platform): New option.
11343 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11345 * Makefile.in: Include a makefile based on PLATFORM instead of
11347 (pkgdatadir): Not appended by the machine type.
11348 (pkglibdir): Appended by the machine type.
11349 (host_vendor): Removed.
11350 (platform): New variable.
11351 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11352 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11353 (uninstall): Likewise.
11355 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11357 Use the environment context in the menu. Remove the commands
11358 "default" and "timeout", and use variables instead.
11360 * normal/menu.c: Include grub/env.h.
11361 (print_entry): Cast TITLE to silence gcc.
11362 (get_timeout): New function.
11363 (set_timeout): Likewise.
11364 (get_entry_number): Likewise.
11365 (run_menu): Use a default entry, a fallback entry and a timeout
11366 in the environment variables "default", "fallback" and
11367 "timeout". Also, tweak the default entry if it is not within the
11368 current menu entries.
11369 (grub_menu_run): Use a fallback entry in the environment variable
11372 * normal/main.c (read_config_file): Do not initialize
11373 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11375 (grub_normal_execute): Use a data slot to store the menu.
11377 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11378 fallback_entry and timeout.
11379 (struct grub_menu_list): Removed.
11380 (grub_menu_list_t): Likewise.
11381 (struct grub_context): Likewise.
11382 (grub_context_t): Likewise.
11383 (grub_context_get): Likewise.
11384 (grub_context_get_current_menu): Likewise.
11385 (grub_context_push_menu): Likewise.
11386 (grub_context_pop_menu): Likewise.
11387 (grub_default_init): Likewise.
11388 (grub_default_fini): Likewise.
11389 (grub_timeout_init): Likewise.
11390 (grub_timeout_fini): Likewise.
11392 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11394 (normal_mod_SOURCES): Removed normal/context.c.
11396 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11397 commands/default.c, commands/timeout.c and normal/context.c.
11398 (normal_mod_SOURCES): Removed normal/context.c.
11400 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11401 commands/timeout.c and normal/context.c.
11402 (normal_mod_SOURCES): Removed normal/context.c.
11404 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11405 commands/default.c, commands/timeout.c and normal/context.c.
11406 (normal_mod_SOURCES): Removed normal/context.c.
11408 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11410 (default_mod_SOURCES): Removed.
11411 (default_mod_CFLAGS): Likewise.
11412 (default_mod_LDFLAGS): Likewise.
11413 (timeout_mod_SOURCES): Removed.
11414 (timeout_mod_CFLAGS): Likewise.
11415 (timeout_mod_LDFLAGS): Likewise.
11417 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11420 * commands/default.c: Removed.
11421 * commands/timeout.c: Likewise.
11422 * normal/context.c: Likewise.
11424 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11426 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11428 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11430 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11431 "next" to "prev" for readability.
11432 (struct grub_env_sorted_var): New struct.
11433 (grub_env_context): Renamed to ...
11434 (initial_context): ... this.
11435 (grub_env_var_context): Renamed to ...
11436 (current_context): ... this.
11437 (grub_env_find): Look only at CURRENT_CONTEXT.
11438 (grub_env_context_open): Rewritten to copy exported variables from
11440 (grub_env_context_close): Rewritten according to the new
11441 scheme. Also, add an assertion to prevent the initial context from
11443 (grub_env_insert): Removed the code for the sorted list.
11444 (grub_env_remove): Likewise.
11445 (grub_env_export): Simply mark the variable with
11446 GRUB_ENV_VAR_GLOBAL.
11447 (grub_env_set): A cosmetic change for naming consistency.
11448 (grub_env_get): Likewise.
11449 (grub_env_unset): Likewise.
11450 (grub_env_iterate): Rewritten to sort variables within this
11452 (grub_register_variable_hook): Fixed for naming consistency. Call
11453 grub_env_find again, only if NAME is not found at the first time.
11454 (mangle_data_slot_name): New function.
11455 (grub_env_set_data_slot): Likewise.
11456 (grub_env_get_data_slot): Likewise.
11457 (grub_env_unset_data_slot): Likewise.
11459 * include/grub/env.h (grub_env_var_type): New enum.
11460 (GRUB_ENV_VAR_LOCAL): New constant.
11461 (GRUB_ENV_VAR_GLOBAL): Likewise.
11462 (GRUB_ENV_VAR_DATA): Likewise.
11463 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11465 (grub_env_set): Replace VAR with NAME for consistency.
11466 (grub_register_variable_hook): Likewise.
11467 (grub_env_export): Specify the name of the argument.
11468 (grub_env_set_data_slot): New prototype.
11469 (grub_env_get_data_slot): Likewise.
11470 (grub_env_unset_data_slot): Likewise.
11472 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11474 Extend the loader so that GRUB can accept a loader which comes
11475 back to GRUB when a loaded image exits. Also, this change adds
11476 support for a chainloader on EFI.
11478 * term/efi/console.c: Include grub/misc.h.
11479 (grub_console_checkkey): Display a scan code on the top for
11480 debugging. This will be removed once the EFI port gets stable.
11481 Correct the scan code mapping.
11483 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11484 allocate memory from larger regions, in order to reduce the number
11485 of allocated regions. Otherwise, the MacOSX loader panics.
11486 (filter_memory_map): Avoid less than 1MB for compatibility with
11488 (add_memory_regions): Allocate from the tail of a region, if
11489 possible, to avoid allocating a region near to 1MB, for the MacOSX
11492 * kern/efi/init.c (grub_efi_set_prefix): Specify
11493 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11495 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11496 argument IMAGE_HANDLE and specify it to get a loaded image.
11497 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11498 grub_efi_get_loaded_image.
11499 (grub_efi_get_filename): Divide the length by the size of
11501 (grub_efi_get_device_path): New function.
11502 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11503 the length by the size of grub_efi_char16_t for a file path device
11506 * kern/loader.c (grub_loader_noreturn): New variable.
11507 (grub_loader_set): Accept a new argument NORETURN. Set
11508 GRUB_LOADER_NORETURN to NORETURN.
11509 All callers changed.
11510 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11513 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11515 (grub_efi_get_loaded_image): Take an argument to specify an image
11518 * include/grub/loader.h (grub_loader_set): Added one more argument
11521 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11522 instead of grub_efi_open_protocol.
11523 (grub_efidisk_get_device_name): Likewise.
11524 (grub_efidisk_close): Print a newline.
11525 (grub_efidisk_get_device_handle): Fixed to use
11526 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11527 GRUB_EFI_DEVICE_PATH_TYPE.
11529 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11530 * kern/efi/efi.c (device_path_guid): ... here.
11532 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11534 (kernel_mod_HEADERS): Added efi/disk.h.
11535 (_chain_mod_SOURCES): New variable.
11536 (_chain_mod_CFLAGS): Likewise.
11537 (_chain_mod_LDFLAGS): Likewise.
11538 (chain_mod_SOURCES): Likewise.
11539 (chain_mod_CFLAGS): Likewise.
11540 (chain_mod_LDFLAGS): Likewise.
11542 * DISTLIST: Added include/grub/efi/chainloader.h,
11543 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11545 * include/grub/efi/chainloader.h: New file.
11546 * loader/efi/chainloader.c: Likewise.
11547 * loader/efi/chainloader_normal.c: Likewise.
11549 2006-04-30 Marco Gerards <marco@gnu.org>
11551 * commands/configfile.c (grub_cmd_source): New function.
11552 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11553 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11555 2006-04-30 Marco Gerards <marco@gnu.org>
11557 * normal/execute.c (grub_script_execute_cmd): Change the return
11558 type to `grub_err_t'. Correctly return the error.
11559 (grub_script_execute_cmdline): In case a command line is not a
11560 command or a function, try to interpret it as an assignment.
11562 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11564 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11565 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11566 skip a node whose name is obviously invalid as UTF-16,
11567 i.e. contains a NUL character. Stop the iteration when the last
11568 directory entry is found. Instead of using the return value of
11569 grub_hfsplus_btree_iterate_node, store the value in RET and use
11570 it, because the iterator can be stopped by the last directory
11573 2006-04-30 Marco Gerards <marco@gnu.org>
11575 * include/grub/env.h (grub_env_export): New prototype. Reported
11576 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11578 2006-04-30 Marco Gerards <marco@gnu.org>
11580 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11581 size of the extents in a catalog file record.
11583 2006-04-29 Marco Gerards <marco@gnu.org>
11585 * commands/configfile.c (grub_cmd_configfile): Execute the
11586 configfile within its own context.
11588 * include/grub/env.h (grub_env_context_open): New prototype.
11589 (grub_env_context_close): Likewise.
11591 * kern/env.c (grub_env): Removed.
11592 (grub_env_sorted): Likewise.
11593 (grub_env_context): New variable.
11594 (grub_env_var_context): Likewise.
11595 (grub_env_find): Search both the active context and the global
11597 (grub_env_context_open): New function.
11598 (grub_env_context_close): Likewise.
11599 (grub_env_insert): Likewise.
11600 (grub_env_remove): Likewise.
11601 (grub_env_export): Likewise.
11602 (grub_env_set): Changed to use helper functions to avoid code
11604 (grub_env_iterate): Rewritten so both the current context and the
11605 global context are being used.
11607 * normal/command.c (export_command): New function.
11608 (grub_command_init): Register the `export' function.
11610 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11612 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11613 explicitly to suppress gcc's warnings.
11614 * fs/fat.c (grub_fat_find_dir): Likewise.
11615 (grub_fat_label): Likewise.
11616 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11617 (grub_xfs_mount): Likewise.
11618 (grub_xfs_label): Likewise.
11619 * fs/affs.c (grub_affs_mount): Likewise.
11620 (grub_affs_label): Likewise.
11621 (grub_affs_iterate_dir): Likewise.
11622 * fs/sfs.c (grub_sfs_mount): Likewise.
11623 (grub_sfs_iterate_dir): Likewise.
11624 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11625 * fs/hfs.c (grub_hfs_mount): Likewise.
11626 (grub_hfs_cmp_catkeys): Likewise.
11627 (grub_hfs_find_dir): Likewise.
11628 (grub_hfs_dir): Likewise.
11629 (grub_hfs_label): Likewise.
11630 * fs/jfs.c (grub_jfs_mount): Likewise.
11631 (grub_jfs_opendir): Likewise.
11632 (grub_jfs_getent): Likewise.
11633 (grub_jfs_lookup_symlink): Likewise.
11634 (grub_jfs_label): Likewise.
11635 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11636 (grub_hfsplus_iterate_dir): Likewise.
11637 (grub_hfsplus_btree_iterate_node): Made static.
11639 * util/grub-emu.c (prefix): New variable.
11640 (grub_machine_set_prefix): New function.
11641 (main): Do not set the environment variable "prefix" here. Only
11642 set PREFIX, which is used later by grub_machine_set_prefix.
11644 * include/grub/video.h: Do not include grub/symbol.h.
11645 (grub_video_register): Not exported. This symbol is not defined in
11647 (grub_video_unregister): Likewise.
11648 (grub_video_iterate): Likewise.
11649 (grub_video_setup): Likewise.
11650 (grub_video_restore): Likewise.
11651 (grub_video_get_info): Likewise.
11652 (grub_video_get_blit_format): Likewise.
11653 (grub_video_set_palette): Likewise.
11654 (grub_video_get_palette): Likewise.
11655 (grub_video_set_viewport): Likewise.
11656 (grub_video_get_viewport): Likewise.
11657 (grub_video_map_color): Likewise.
11658 (grub_video_map_rgb): Likewise.
11659 (grub_video_map_rgba): Likewise.
11660 (grub_video_fill_rect): Likewise.
11661 (grub_video_blit_glyph): Likewise.
11662 (grub_video_blit_bitmap): Likewise.
11663 (grub_video_blit_render_target): Likewise.
11664 (grub_video_scroll): Likewise.
11665 (grub_video_swap_buffers): Likewise.
11666 (grub_video_create_render_target): Likewise.
11667 (grub_video_delete_render_target): Likewise.
11668 (grub_video_set_active_render_target): Likewise.
11670 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11672 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11674 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11675 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11676 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11677 instead of $(srcdir)/genkernsyms.sh.
11679 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11680 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11681 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11682 instead of $(srcdir)/genkernsyms.sh.
11684 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11685 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11686 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11687 instead of $(srcdir)/genkernsyms.sh.
11689 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11690 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11691 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11692 instead of $(srcdir)/genkernsyms.sh.
11694 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11697 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11699 (gensymlist.sh): New target.
11700 (genkernsyms.sh): Likewise.
11702 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11703 genkernsyms.sh.in and gensymlist.sh.in.
11705 * genkernsyms.sh: Removed.
11706 * gensymlist.sh: Likewise.
11708 * genkernsyms.sh.in: New file.
11709 * gensymlist.sh.in: Likewise.
11711 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11713 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11714 clobber "prefix", since we may have already set it manually.
11716 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11718 * kern/misc.c (abort): New alias for grub_abort.
11720 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11722 A new machine-specific function "grub_machine_set_prefix" is
11723 defined. This is called after loading modules, so that a prefix
11724 initialization can use modules. Also, this change adds an
11725 intensive debugging feature for the memory manager via the
11726 configure option "--enable-mm-debug".
11728 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11731 * kern/sparc64/ieee1275/init.c (abort): Removed.
11732 (grub_stop): Likewise.
11733 (grub_exit): New function.
11734 (grub_set_prefix): Renamed to ...
11735 (grub_machine_set_prefix): ... this.
11736 (grub_machine_init): Do not call grub_set_prefix.
11738 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11739 (grub_machine_set_prefix): ... this.
11740 (grub_machine_init): Do not call grub_set_prefix.
11742 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11743 (grub_machine_init): Do not set the prefix here.
11745 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11747 * kern/efi/init.c: Include grub/mm.h.
11748 (grub_efi_set_prefix): New function.
11750 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11751 (grub_efi_get_filename): New function.
11752 (grub_print_device_path): Renamed to ...
11753 (grub_efi_print_device_path): ... this.
11755 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11756 [MM_DEBUG] (grub_realloc): Likewise.
11757 [MM_DEBUG] (grub_free): Likewise.
11758 [MM_DEBUG] (grub_memalign): Likewise.
11759 [MM_DEBUG] (grub_mm_debug): New variable.
11760 [MM_DEBUG] (grub_debug_malloc): New function.
11761 [MM_DEBUG] (grub_debug_free): New function.
11762 [MM_DEBUG] (grub_debug_realloc): New function.
11763 [MM_DEBUG] (grub_debug_memalign): New function.
11765 * kern/misc.c (grub_abort): Print a newline to distinguish
11768 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11769 grub_set_root_dev after loading modules. This is necessary when
11770 setting a prefix depends on modules.
11772 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11773 (grub_efi_print_device_path): ... this.
11774 (grub_efi_get_filename): New prototype.
11775 (grub_efi_set_prefix): Likewise.
11777 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11779 (grub_efidisk_get_device_handle): New prototype.
11780 (grub_efidisk_get_device_name): Likewise.
11782 * include/grub/mm.h: Include config.h.
11783 (MM_DEBUG): Removed.
11784 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11785 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11786 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11787 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11788 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11789 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11790 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11791 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11792 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11794 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11796 * disk/efi/efidisk.c: Include grub/partition.h.
11797 (iterate_child_devices): New function.
11798 (add_device): First, compare only last device path nodes, so that
11799 devices are sorted by the types.
11800 (grub_efidisk_get_device_handle): New function.
11801 (grub_efidisk_get_device_name): Likewise.
11803 * configure.ac (--enable-mm-debug): New option to enable the
11804 memory manager debugging feature. This makes the binary much
11805 bigger, so is disabled by default.
11807 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11809 Use grub_abort instead of grub_stop, and grub_exit must be
11810 define in each architecture now. Also, this change adds support
11813 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11814 (grub_getkey): New function.
11815 (grub_term_get_current): Likewise.
11817 * util/i386/pc/grub-setup.c: Include grub/term.h.
11818 (grub_getkey): New function.
11819 (grub_term_get_current): Likewise.
11821 * util/misc.c (grub_stop): Renamed to ...
11822 (grub_exit): ... this.
11824 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11825 (grub_exit): ... this.
11826 (grub_machine_init): Use grub_abort instead of abort.
11827 (grub_stop): Removed.
11829 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11832 * kern/i386/pc/startup.S (grub_exit): New function.
11833 (cold_reboot): New label.
11835 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11836 (grub_efi_init): Call grub_efidisk_init.
11837 (grub_efi_fini): Call grub_efidisk_fini.
11839 * kern/efi/efi.c: Include grub/mm.h.
11840 (grub_efi_console_control_guid): Renamed to ...
11841 (console_control_guid): ... this.
11842 (grub_efi_loaded_image_guid): Renamed to ...
11843 (loaded_image_guid): ... this.
11844 (grub_efi_locate_handle): New function.
11845 (grub_efi_open_protocol): Likewise.
11846 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11847 GRUB_EFI_CONSOLE_CONTROL_GUID.
11848 (grub_efi_exit): Removed.
11849 (grub_stop): Likewise.
11850 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11851 (grub_exit): New function.
11852 (grub_print_device_path): Likewise.
11854 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11855 (grub_enter_rescue_mode): Register "exit".
11857 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11858 (grub_abort): New function.
11860 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11862 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11864 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11866 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11867 (grub_print_device_path): New prototype.
11868 (grub_efi_locate_handle): Likewise.
11869 (grub_efi_open_protocol): Likewise.
11871 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11872 * disk/efi/efidisk.c: Likewise.
11874 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11876 * include/grub/efi/console_control.h
11877 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11879 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11880 last 8 bytes as an array.
11881 (GRUB_EFI_DISK_IO_GUID): New macro.
11882 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11883 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11884 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11886 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11887 (struct grub_efi_device_path): Rename the member "sub_type" to
11889 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11890 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11891 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11892 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11893 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11894 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11895 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11896 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11897 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11898 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11899 (struct grub_efi_pci_device_path): New structure.
11900 (grub_efi_pci_device_path_t): New type.
11901 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11902 (struct grub_efi_pccard_device_path): New structure.
11903 (grub_efi_pccard_device_path_t): New type.
11904 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11905 (struct grub_efi_memory_mapped_device_path): New structure.
11906 (grub_efi_memory_mapped_device_path_t): New type.
11907 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11908 (struct grub_efi_vendor_device_path): New structure.
11909 (grub_efi_vendor_device_path_t): New type.
11910 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11911 (struct grub_efi_controller_device_path): New structure.
11912 (grub_efi_controller_device_path_t): New type.
11913 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11914 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11915 (struct grub_efi_acpi_device_path): New structure.
11916 (grub_efi_acpi_device_path_t): New type.
11917 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11918 (struct grub_efi_expanded_acpi_device_path): New structure.
11919 (grub_efi_expanded_acpi_device_path_t): New type.
11920 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11921 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11922 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11923 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11924 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11925 (struct grub_efi_atapi_device_path): New structure.
11926 (grub_efi_atapi_device_path_t): New type.
11927 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11928 (struct grub_efi_fibre_channel_device_path): New structure.
11929 (grub_efi_fibre_channel_device_path_t): New type.
11930 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11931 (struct grub_efi_1394_device_path): New structure.
11932 (grub_efi_1394_device_path_t): New type.
11933 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11934 (struct grub_efi_usb_device_path): New structure.
11935 (grub_efi_usb_device_path_t): New type.
11936 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11937 (struct grub_efi_usb_class_device_path): New structure.
11938 (grub_efi_usb_class_device_path_t): New type.
11939 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11940 (struct grub_efi_i2o_device_path): New structure.
11941 (grub_efi_i2o_device_path_t): New type.
11942 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11943 (struct grub_efi_mac_address_device_path): New structure.
11944 (grub_efi_mac_address_device_path_t): New type.
11945 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11946 (struct grub_efi_ipv4_device_path): New structure.
11947 (grub_efi_ipv4_device_path_t): New type.
11948 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11949 (struct grub_efi_ipv6_device_path): New structure.
11950 (grub_efi_ipv6_device_path_t): New type.
11951 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11952 (struct grub_efi_infiniband_device_path): New structure.
11953 (grub_efi_infiniband_device_path_t): New type.
11954 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11955 (struct grub_efi_uart_device_path): New structure.
11956 (grub_efi_uart_device_path_t): New type.
11957 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11958 (struct grub_efi_vendor_messaging_device_path): New structure.
11959 (grub_efi_vendor_messaging_device_path_t): New type.
11960 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11961 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11962 (struct grub_efi_hard_drive_device_path): New structure.
11963 (grub_efi_hard_drive_device_path_t): New type.
11964 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11965 (struct grub_efi_cdrom_device_path): New structure.
11966 (grub_efi_cdrom_device_path_t): New type.
11967 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11968 (struct grub_efi_vendor_media_device_path): New structure.
11969 (grub_efi_vendor_media_device_path_t): New type.
11970 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11971 (struct grub_efi_file_path_device_path): New structure.
11972 (grub_efi_file_path_device_path_t): New type.
11973 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11974 (struct grub_efi_protocol_device_path): New structure.
11975 (grub_efi_protocol_device_path_t): New type.
11976 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11977 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11978 (struct grub_efi_bios_device_path): New structure.
11979 (grub_efi_bios_device_path_t): New type.
11980 (struct grub_efi_disk_io): New structure.
11981 (grub_efi_disk_io_t): New type.
11982 (struct grub_efi_block_io_media): New structure.
11983 (grub_efi_block_io_media_t): New type.
11984 (struct grub_efi_block_io): New structure.
11985 (grub_efi_block_io_t): New type.
11987 * include/grub/misc.h (grub_stop): Removed.
11988 (grub_exit): New prototype.
11989 (grub_abort): Likewise.
11991 * include/grub/disk.h (enum grub_disk_dev_id): Added
11992 GRUB_DISK_DEVICE_EFIDISK_ID.
11994 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11995 disk/efi/efidisk.c.
11996 (kernel_syms.lst): Remove the target if an error occurs.
11998 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
12000 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12001 as it was simply too buggy.
12003 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
12005 * kern/misc.c (grub_lltoa): New function.
12006 (grub_vsprintf): Added support for the long long suffix,
12009 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
12011 * Makefile.in (LDFLAGS): Add variable.
12012 (LD): Remove variable.
12013 * configure.ac: Add -m32 to LDFLAGS.
12014 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12015 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12016 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12017 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12018 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12020 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12021 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12022 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12024 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
12026 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12027 length for unknown glyph.
12029 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12031 Add support for pre-loaded modules into the EFI port.
12033 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12034 completely. Accept one more argument DIR. The caller has changed.
12036 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12038 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12039 (grub_efi_loaded_image_guid): New variable.
12040 (grub_efi_get_loaded_image): New function.
12041 (grub_arch_modules_addr): Likewise.
12043 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12046 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12047 (struct grub_efi_loaded_image): New structure.
12048 (grub_efi_loaded_image_t): New type.
12050 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
12052 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12053 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12054 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12056 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
12058 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12060 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
12062 * DISTLIST: Added include/grub/efi/console.h,
12063 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12064 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12066 * include/grub/efi/console.h: New file.
12067 * include/grub/efi/time.h: Likewise.
12068 * include/grub/i386/efi/kernel.h: Likewise.
12069 * kern/efi/init.c: Likewise.
12070 * kern/efi/mm.c: Likewise.
12071 * term/efi/console.c: Likewise.
12073 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12074 (grub_stop): Removed.
12075 (grub_get_rtc): Likewise.
12076 (grub_machine_init): Simply call grub_efi_init.
12077 (grub_machine_fini): Call grub_efi_fini.
12079 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12080 (grub_efi_output_string): Removed.
12081 (grub_efi_stall): New function.
12082 (grub_stop): Likewise.
12083 (grub_get_rtc): Likewise.
12085 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12086 (grub_efi_stall): New prototype.
12087 (grub_efi_allocate_pages): Likewise.
12088 (grub_efi_free_pages): Likewise.
12089 (grub_efi_get_memory_map): Likewise.
12090 (grub_efi_mm_init): Likewise.
12091 (grub_efi_mm_fini): Likewise.
12092 (grub_efi_init): Likewise.
12093 (grub_efi_fini): Likewise.
12095 * include/grub/i386/efi/time.h: Do not include
12096 grub/symbol.h. Include grub/efi/time.h.
12097 (GRUB_TICKS_PER_SECOND): Removed.
12098 (grub_get_rtc): Likewise.
12100 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12101 Added padding. The EFI spec is buggy.
12102 (GRUB_EFI_BLACK): New macro.
12103 (GRUB_EFI_BLUE): Likewise.
12104 (GRUB_EFI_GREEN): Likewise.
12105 (GRUB_EFI_CYAN): Likewise.
12106 (GRUB_EFI_RED): Likewise.
12107 (GRUB_EFI_MAGENTA): Likewise.
12108 (GRUB_EFI_BROWN): Likewise.
12109 (GRUB_EFI_LIGHTGRAY): Likewise.
12110 (GRUB_EFI_BRIGHT): Likewise.
12111 (GRUB_EFI_DARKGRAY): Likewise.
12112 (GRUB_EFI_LIGHTBLUE): Likewise.
12113 (GRUB_EFI_LIGHTGREEN): Likewise.
12114 (GRUB_EFI_LIGHTCYAN): Likewise.
12115 (GRUB_EFI_LIGHTRED): Likewise.
12116 (GRUB_EFI_LIGHTMAGENTA): Likewise.
12117 (GRUB_EFI_YELLOW): Likewise.
12118 (GRUB_EFI_WHITE): Likewise.
12119 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12120 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12121 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12122 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12123 (GRUB_EFI_BACKGROUND_RED): Likewise.
12124 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12125 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12126 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12127 (GRUB_EFI_TEXT_ATTR): Likewise.
12129 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12130 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12131 (kernel_mod_HEADERS): Added efi/time.h.
12133 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
12135 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12136 include/grub/efi/api.h, include/grub/efi/console_control.h,
12137 include/grub/efi/efi.h, include/grub/efi/pe32.h,
12138 include/grub/i386/efi/time.h, kern/efi/efi.c,
12139 kern/i386/efi/init.c, kern/i386/efi/startup.S,
12140 and util/i386/efi/grub-mkimage.c.
12142 * Makefile.in (RMKFILES): Added i386-efi.rmk.
12144 * genmk.rb (PModule#rule): Do not export symbols if
12145 #{prefix}_EXPORTS is set to "no".
12147 * conf/i386-efi.mk: New file.
12148 * conf/i386-efi.rmk: Likewise.
12149 * include/grub/efi/api.h: Likewise.
12150 * include/grub/efi/console_control.h: Likewise.
12151 * include/grub/efi/efi.h: Likewise.
12152 * include/grub/efi/pe32.h: Likewise.
12153 * include/grub/i386/efi/time.h: Likewise.
12154 * kern/efi/efi.c: Likewise.
12155 * kern/i386/efi/init.c: Likewise.
12156 * kern/i386/efi/startup.S: Likewise.
12157 * util/i386/efi/grub-mkimage.c: Likewise.
12159 2006-04-17 Marco Gerards <marco@gnu.org>
12161 * include/grub/script.h: Include <grub/parser.h> and
12162 "grub_script.tab.h".
12163 (struct grub_lexer_param): New struct.
12164 (struct grub_parser_param): Likewise.
12165 (grub_script_create_arglist): Pass the state in an argument.
12166 (grub_script_add_arglist): Likewise.
12167 (grub_script_create_cmdline): Likewise.
12168 (grub_script_create_cmdblock): Likewise.
12169 (grub_script_create_cmdif): Likewise.
12170 (grub_script_create_cmdmenu): Likewise.
12171 (grub_script_add_cmd): Likewise.
12172 (grub_script_arg_add): Likewise.
12173 (grub_script_lexer_ref): Likewise.
12174 (grub_script_lexer_deref): Likewise.
12175 (grub_script_lexer_record_start): Likewise.
12176 (grub_script_lexer_record_stop): Likewise.
12177 (grub_script_mem_record): Likewise.
12178 (grub_script_mem_record_stop): Likewise.
12179 (grub_script_malloc): Likewise.
12180 (grub_script_yylex): Likewise.
12181 (grub_script_yyparse): Likewise.
12182 (grub_script_yyerror): Likewise.
12183 (grub_script_yylex): Likewise.
12184 (grub_script_lexer_init): Return the state.
12186 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12187 (grub_script_lexer_done): Likewise.
12188 (grub_script_lexer_getline): Likewise.
12189 (grub_script_lexer_refs): Likewise.
12190 (script): Likewise.
12191 (newscript): Likewise.
12192 (record): Likewise.
12193 (recording): Likewise.
12194 (recordpos): Likewise.
12195 (recordlen): Likewise.
12196 (grub_script_lexer_init): Return the state instead of setting
12198 (grub_script_lexer_ref): Use the newly added argument for state
12199 instead of globals.
12200 (grub_script_lexer_deref): Likewise.
12201 (grub_script_lexer_record_start): Likewise.
12202 (grub_script_lexer_record_stop): Likewise.
12203 (recordchar): Likewise.
12204 (nextchar): Likewise.
12205 (grub_script_yylex2): Likewise.
12206 (grub_script_yylex): Likewise.
12207 (grub_script_yyerror): Likewise.
12209 * normal/parser.y (func_mem): Removed variable.
12210 (menu_entry): Likewise.
12212 (%lex-param): New parser option.
12213 (%parse-param): Likewise.
12214 (script): Always return the AST.
12215 (argument): Pass the state around.
12216 (arguments): Likewise.
12217 (grubcmd): Likewise.
12218 (commands): Likewise.
12219 (function): Likewise.
12220 (menuentry): Likewise.
12221 (if_statement): Likewise.
12224 * normal/script.c (grub_script_memused): Removed variable.
12225 (grub_script_parsed): Likewise.
12226 (grub_script_malloc): Added a state argument. Use that instead of
12228 (grub_script_mem_record): Likewise.
12229 (grub_script_mem_record_stop): Likewise.
12230 (grub_script_arg_add): Likewise.
12231 (grub_script_add_arglist): Likewise.
12232 (grub_script_create_cmdline): Likewise.
12233 (grub_script_create_cmdif): Likewise.
12234 (grub_script_create_cmdmenu): Likewise.
12235 (grub_script_add_cmd): Likewise.
12236 (grub_script_parse): Setup the state before calling the parser.
12238 2006-04-16 Marco Gerards <marco@gnu.org>
12240 * normal/command.c (grub_command_init): Remove the title command.
12242 * normal/lexer.c (grub_script_yylex): Renamed from this...
12243 (grub_script_yylex2): ... to this.
12244 (grub_script_yylex): New function. Temporary
12245 introduced to filter some tokens.
12246 (grub_script_yyerror): Print a newline.
12248 * normal/main.c (read_config_file): Output information about the
12249 lines that contain errors. Wait for a key after all lines have
12250 been processed. Don't return an empty menu.
12252 * normal/parser.y (func_mem): Don't initialize.
12253 (menu_entry): Likewise.
12254 (err): New variable.
12255 (script): Don't return anything when an error was encountered.
12256 (ws, returns): Removed rules.
12257 (argument): Disabled concatenated variable support.
12258 (arguments): Remove explicit separators.
12259 (grubcmd): Likewise.
12260 (function): Likewise.
12261 (menuentry): Likewise.
12263 (commands): Likewise. Add error handling.
12265 * normal/script.c (grub_script_create_cmdline): If
12266 `grub_script_parsed' is 0, assume the parser encountered an error.
12268 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12270 * configure.ac: Add support for EFI. Fix the typo
12271 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12273 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12275 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12276 foreign multibyte characters should be shown correctly.
12278 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12280 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12282 (read_config_file): Made it to close file before returning.
12284 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12286 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12287 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12288 video/i386/pc/vbefill.c.
12290 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12291 video/i386/pc/vbefill.c.
12293 * include/grub/video.h (grub_video_blit_format): New enum.
12294 (grub_video_mode_info): Added new member blit_format.
12295 (grub_video_get_blit_format): New function prototype.
12297 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12298 function prototype.
12299 (grub_video_vbe_map_rgb): Likewise.
12300 (grub_video_vbe_unmap_color): Likewise.
12302 * include/grub/i386/pc/vbeblit.h: New file.
12304 * include/grub/i386/pc/vbefill.h: New file.
12306 * video/video.c (grub_video_get_blit_format): New function.
12307 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12308 (grub_video_vbe_map_rgb): Likewise.
12309 (grub_video_vbe_unmap_color): Likewise.
12311 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12313 (grub_video_vbe_blit_render_target): Changed to use more optimized
12315 (grub_video_vbe_setup): Added detection for optimized settings.
12316 (grub_video_vbe_create_render_target): Likewise.
12318 * video/i386/pc/vbeblit.c: New file.
12320 * video/i386/pc/vbefill.c: New file.
12322 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12324 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12327 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12328 parsing to support both hex and dec ranges. If filename was missing
12329 show usage information.
12331 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12333 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12334 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12336 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12337 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12338 (video_mod_SOURCES): Added.
12339 (video_mod_CFLAGS): Likewise.
12340 (video_mod_LDFLAGS): Likewise.
12341 (gfxterm_mod_SOURCES): Likewise.
12342 (gfxterm_mod_CFLAGS): Likewise.
12343 (gfxterm_mod_LDFLAGS): Likewise.
12344 (videotest_mod_SOURCES): Likewise.
12345 (videotest_mod_CFLAGS): Likewise.
12346 (videotest_mod_LDFLAGS): Likewise.
12347 (vesafb_mod_SOURCES): Removed.
12348 (vesafb_mod_CFLAGS): Likewise.
12349 (vesafb_mod_LDFLAGS): Likewise.
12350 (vga_mod_SOURCES): Likewise.
12351 (vga_mod_CFLAGS): Likewise.
12352 (vga_mod_LDFLAGS): Likewise.
12354 * commands/videotest.c: New file.
12356 * font/manager.c (fill_with_default_glyph): Modified to use
12358 (grub_font_get_glyph): Likewise.
12359 (fontmanager): Renamed from this...
12360 (font_manager): ... to this.
12362 * include/grub/font.h (grub_font_glyph): Added new structure.
12363 (grub_font_get_glyph): Modified to use grub_font_glyph.
12365 * include/grub/misc.h (grub_abs): Added as inline function.
12367 * include/grub/video.h: New file.
12369 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12370 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12371 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12372 (grub_vbe_get_controller_info): Renamed from this...
12373 (grub_vbe_bios_get_controller_info): ... to this.
12374 (grub_vbe_get_mode_info): Renamed from this...
12375 (grub_vbe_bios_get_mode_info): ... to this.
12376 (grub_vbe_set_mode): Renamed from this...
12377 (grub_vbe_bios_set_mode): ... to this.
12378 (grub_vbe_get_mode): Renamed from this...
12379 (grub_vbe_bios_get_mode): ... to this.
12380 (grub_vbe_set_memory_window): Renamed from this...
12381 (grub_vbe_bios_set_memory_window): ... to this.
12382 (grub_vbe_get_memory_window): Renamed from this...
12383 (grub_vbe_bios_get_memory_window): ... to this.
12384 (grub_vbe_set_scanline_length): Renamed from this...
12385 (grub_vbe_set_scanline_length): ... to this.
12386 (grub_vbe_get_scanline_length): Renamed from this...
12387 (grub_vbe_bios_get_scanline_length): ... to this.
12388 (grub_vbe_set_display_start): Renamed from this...
12389 (grub_vbe_bios_set_display_start): ... to this.
12390 (grub_vbe_get_display_start): Renamed from this...
12391 (grub_vbe_bios_get_display_start): ... to this.
12392 (grub_vbe_set_palette_data): Renamed from this...
12393 (grub_vbe_bios_set_palette_data): ... to this.
12394 (grub_vbe_set_pixel_rgb): Removed.
12395 (grub_vbe_set_pixel_index): Likewise.
12397 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12399 (grub_vbe_bios_get_controller_info): ... to this.
12400 (grub_vbe_get_mode_info): Renamed from this...
12401 (grub_vbe_bios_get_mode_info): ... to this.
12402 (grub_vbe_set_mode): Renamed from this...
12403 (grub_vbe_bios_set_mode): ... to this.
12404 (grub_vbe_get_mode): Renamed from this...
12405 (grub_vbe_bios_get_mode): ... to this.
12406 (grub_vbe_set_memory_window): Renamed from this...
12407 (grub_vbe_bios_set_memory_window): ... to this.
12408 (grub_vbe_get_memory_window): Renamed from this...
12409 (grub_vbe_bios_get_memory_window): ... to this.
12410 (grub_vbe_set_scanline_length): Renamed from this...
12411 (grub_vbe_set_scanline_length): ... to this.
12412 (grub_vbe_get_scanline_length): Renamed from this...
12413 (grub_vbe_bios_get_scanline_length): ... to this.
12414 (grub_vbe_set_display_start): Renamed from this...
12415 (grub_vbe_bios_set_display_start): ... to this.
12416 (grub_vbe_get_display_start): Renamed from this...
12417 (grub_vbe_bios_get_display_start): ... to this.
12418 (grub_vbe_set_palette_data): Renamed from this...
12419 (grub_vbe_bios_set_palette_data): ... to this.
12420 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12421 getting corrupted after calling it. Added more pushes and pops.
12422 (grub_vbe_bios_set_mode): Likewise.
12423 (grub_vbe_bios_get_mode): Likewise.
12424 (grub_vbe_bios_get_memory_window): Likewise.
12425 (grub_vbe_bios_set_scanline_length): Likewise.
12426 (grub_vbe_bios_get_scanline_length): Likewise.
12427 (grub_vbe_bios_get_display_start): Likewise.
12428 (grub_vbe_bios_set_palette_data): Likewise.
12430 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12431 (cl_insert): Likewise.
12432 (cl_delete): Likewise.
12434 * term/gfxterm.c: New file.
12436 * term/i386/pc/vesafb.c: Removed file.
12438 * video/video.c: New file.
12440 * video/i386/pc/vbe.c (real2pm): Added new function.
12441 (grub_video_vbe_draw_pixel): Likewise.
12442 (grub_video_vbe_get_video_ptr): Likewise.
12443 (grub_video_vbe_get_pixel): Likewise
12444 (grub_video_vbe_init): Likewise.
12445 (grub_video_vbe_fini): Likewise.
12446 (grub_video_vbe_setup): Likewise.
12447 (grub_video_vbe_get_info): Likewise.
12448 (grub_video_vbe_set_palette): Likewise.
12449 (grub_video_vbe_get_palette): Likewise.
12450 (grub_video_vbe_set_viewport): Likewise.
12451 (grub_video_vbe_get_viewport): Likewise.
12452 (grub_video_vbe_map_color): Likewise.
12453 (grub_video_vbe_map_rgb): Likewise.
12454 (grub_video_vbe_map_rgba): Likewise.
12455 (grub_video_vbe_unmap_color): Likewise.
12456 (grub_video_vbe_fill_rect): Likewise.
12457 (grub_video_vbe_blit_glyph): Likewise.
12458 (grub_video_vbe_blit_bitmap): Likewise.
12459 (grub_video_vbe_blit_render_target): Likewise.
12460 (grub_video_vbe_scroll): Likewise.
12461 (grub_video_vbe_swap_buffers): Likewise.
12462 (grub_video_vbe_create_render_target): Likewise.
12463 (grub_video_vbe_delete_render_target): Likewise.
12464 (grub_video_vbe_set_active_render_target): Likewise.
12465 (grub_vbe_set_pixel_rgb): Remove function.
12466 (grub_vbe_set_pixel_index): Likewise.
12467 (index_color_mode): Remove static variable.
12468 (active_mode): Likewise.
12469 (framebuffer): Likewise.
12470 (bytes_per_scan_line): Likewise.
12471 (grub_video_vbe_adapter): Added new static variable.
12472 (framebuffer): Likewise.
12473 (render_target): Likewise.
12474 (initial_mode): Likewise.
12475 (mode_in_use): Likewise.
12476 (mode_list): Likewise.
12478 2006-03-10 Marco Gerards <marco@gnu.org>
12480 * configure.ac (AC_INIT): Bumped to 1.93.
12482 * DISTLIST: Added `include/grub/hfs.h'.
12484 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12486 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12487 18H, which might help the BIOS falling back to next boot media.
12489 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12491 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12492 Poe Chen <poe.poechen@gmail.com>.
12494 2006-01-17 Marco Gerards <marco@gnu.org>
12496 * include/grub/normal.h: Include <grub/script.h>.
12497 (grub_command_list): Removed struct.
12498 (grub_command_list_t): Removed type.
12499 (grub_menu_entry): Remove members `num' and `command_list'. Add
12500 members `commands' and `sourcecode'.
12501 * include/grub/script.h: Add inclusion guards.
12502 (grub_script_cmd_menuentry): New struct.
12503 (grub_script_execute_menuentry): New prototype.
12504 (grub_script_lexer_record_start): Likewise.
12505 (grub_script_lexer_record_stop): Likewise.
12506 * normal/execute.c (grub_script_execute_menuentry): New function.
12507 * normal/lexer.c (record, recording, recordpos, recordlen): New
12509 (grub_script_lexer_record_start): New function.
12510 (grub_script_lexer_record_stop): Likewise.
12511 (recordchar): Likewise.
12512 (nextchar): Likewise.
12513 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12514 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12515 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12516 (current_menu): New variable.
12517 (free_menu): Mainly rewritten.
12518 (grub_normal_menu_addentry): New function.
12519 (read_config_file): Rewritten.
12520 * normal/menu.c (run_menu_entry): Mainly rewritten.
12521 * normal/menu_entry.c (make_screen): Rewritten the code to insert
12523 (run): Mainly rewritten.
12524 * normal/parser.y (menu_entry): New variable.
12525 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12526 (menuentry): New rule.
12527 (command): Add `menuentry'.
12528 (if_statement): Allow additional returns before `fi'.
12529 * normal/script.c (grub_script_create_cmdmenu): New function.
12531 2006-01-03 Marco Gerards <marco@gnu.org>
12533 * INSTALL: GNU Bison is required.
12534 * configure.ac: Rewritten the test to detect Bison.
12535 * Makefile.in (YACC): New variable. Reported by Xun Sun
12536 <xun.sun.cn@gmail.com>.
12538 2006-01-03 Marco Gerards <marco@gnu.org>
12540 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12541 the HFS+ filesystem to filesystem blocks.
12542 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12543 GCC warning is silenced.
12545 2006-01-03 Marco Gerards <marco@gnu.org>
12547 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12548 read from disk from big endian to host byte order.
12550 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12552 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12554 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12555 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12556 embedded HFS+ filesystem.
12557 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12558 (grub_hfs_sblock): Move from here...
12559 * include/grub/hfs.h: To here... New file.
12560 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12562 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12564 (grub_hfsplus_volheader): Change type of member `magic' to
12566 (grub_hfsplus_data): Add new member `embedded_offset'.
12567 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12569 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12570 Calculate the offset.
12572 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12574 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12576 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12578 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12580 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12581 ENV->NAME is NULL after allocating ENV->VALUE.
12583 2005-12-25 Marco Gerards <marco@gnu.org>
12585 * kern/env.c (grub_env_set): Rewritten the error handling code.
12587 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12589 * geninit.sh: Made more robust, and more portable.
12591 2005-12-25 Marco Gerards <marco@gnu.org>
12593 Add support for Apple HFS+ filesystems.
12595 * fs/hfsplus.c: New file.
12597 * DISTLIST: Added `fs/hfsplus.c'.
12599 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12600 (hfsplus_mod_SOURCES): New variable.
12601 (hfsplus_mod_CFLAGS): Likewise.
12602 (hfsplus_mod_LDFLAGS): Likewise.
12603 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12604 (grub_setup_SOURCES): Likewise.
12605 (grub_mkdevicemap_SOURCES): Likewise.
12606 (grub_emu_SOURCES): Likewise.
12607 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12609 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12611 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12613 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12615 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12616 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12617 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12618 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12619 normal/lexer.c, normal/parser.y, normal/script.c, and
12621 Removed kern/sparc64/cache.c.
12623 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12624 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12627 * configure.ac (AC_INIT): Bumped to 1.92.
12629 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12631 * kern/err.c (grub_error_push): Added new function to support error
12633 (grub_error_pop): Likewise.
12634 (grub_error_stack_items): New local variable to support error stacks.
12635 (grub_error_stack_pos): Likewise.
12636 (grub_error_stack_assert): Likewise.
12637 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12639 (grub_print_error): Added support to print errors from error stack.
12641 * include/grub/err.h (grub_error_push): Added function prototype.
12642 (grub_error_pop): Likewise.
12644 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12646 * configure.ac: Accept `powerpc64' as host_cpu.
12647 (amd64): Rename to `biarch32'.
12649 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12650 non-cacheline-aligned addresses.
12652 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12653 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12654 if `size' is non-zero.
12656 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
12658 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12659 and `cd' to make sure the filename is not prefixed with a
12661 (pkgdata_MODULES): Add `gpt.mod'.
12662 (gpt_mod_SOURCES): New variable.
12663 (gpt_mod_CFLAGS): Likewise.
12664 (gpt_mod_LDFLAGS): Likewise.
12666 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12668 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12671 * partmap/gpt.c: New file.
12673 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12674 GPT partition map is detected.
12676 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12678 * commands/i386/pc/play.c: New file.
12679 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12680 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12683 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
12685 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12686 ((unused))' to silence gcc warning.
12688 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12690 * configure.ac: Correct `AC_PROG_YACC' test.
12692 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12694 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12695 check before installing files.
12697 2005-11-22 Mike Small <smallm@panix.com>
12699 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12700 number regex so multidigit numbers are recognized correctly.
12702 2005-11-22 Mike Small <smallm@panix.com>
12704 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12705 debugging message before attempting to claim memory.
12706 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12707 multiple addresses in case of failure.
12709 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12711 * term/tparm.c (get_space): Remove empty `if' statement.
12713 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12715 * kern/parser.c (check_varstate): Rename `state' to 's'.
12717 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12719 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12720 variable definitions to the beginning of each function. Sort stack
12722 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12723 `buf' argument to `char *'.
12725 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12727 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12728 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12729 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12730 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12731 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12732 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12733 configfile.mod, search.mod, gzio.mod and test.mod.
12734 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12735 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12736 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12737 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12738 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12739 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12740 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12741 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12742 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12743 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12744 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12745 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12746 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12747 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12748 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12749 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12750 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12751 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12752 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12753 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12754 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12755 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12756 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12758 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12760 (pkgdata_MODULES): Add test.mod.
12762 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12764 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12765 appending to variables with "+=".
12766 (PModule): Use full pathname to generate *.lst filenames.
12768 * Makefile.in: Fixed list rules moved from genmk.rb.
12769 (.DELETE_ON_ERROR): New special target.
12770 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12772 * conf/i386-pc.rmk: Include conf/common.mk.
12773 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12774 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12775 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12776 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12777 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12778 configfile.mod, search.mod, gzio.mod and test.mod.
12779 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12780 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12781 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12782 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12783 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12784 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12785 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12786 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12787 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12788 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12789 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12790 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12791 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12792 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12793 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12794 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12795 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12796 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12797 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12798 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12799 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12800 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12801 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12803 * conf/common.rmk: ... to here. New file.
12805 * conf/common.mk: New file.
12807 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12809 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12810 (grub_script.tab.c): ... here.
12812 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12813 (grub_script.tab.c): ... here.
12815 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12816 (grub_script.tab.c): ... here.
12818 * normal/command.c (grub_command_find): Fixed a memory leak of
12819 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12821 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12823 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12824 "@" which marks the start of a comment on ARM.
12825 (VARIABLE): Likewise.
12827 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12829 Add support for Linux/ADFS partition tables.
12831 * partmap/acorn.c: New file.
12833 * include/grub/acorn_filecore.h: Likewise.
12835 * DISTLIST: Added `partmap/acorn.c' and
12836 `include/grub/acorn_filecore.h'.
12838 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12840 (pkgdata_MODULES): Add `acorn.mod'.
12841 (acorn_mod_SOURCES): New variable.
12842 (acorn_mod_CFLAGS): Likewise.
12844 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12846 (pkgdata_MODULES): Add `acorn.mod'.
12847 (acorn_mod_SOURCES): New variable.
12848 (acorn_mod_CFLAGS): Likewise.
12850 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12851 (pkgdata_MODULES): Add `acorn.mod'.
12852 (acorn_mod_SOURCES): New variable.
12853 (acorn_mod_CFLAGS): Likewise.
12854 (acorn_mod_LDFLAGS): Likewise.
12856 * include/types.h (grub_disk_addr_t): New typedef.
12858 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
12860 * geninit.sh: New file.
12862 * geninitheader.sh: Likewise.
12864 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12865 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12866 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12867 * commands/configfile.c (grub_configfile_init)
12868 (grub_configfile_fini): Likewise.
12869 * commands/default.c (grub_default_init, grub_default_fini):
12871 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12872 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12873 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12874 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12876 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12877 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12879 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12880 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12882 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12884 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12886 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12887 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12888 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12889 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12890 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12891 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12892 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12893 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12894 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12895 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12896 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12897 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12898 * partmap/amiga.c (grub_amiga_partition_map_init)
12899 (grub_amiga_partition_map_fini): Likewise.
12900 * partmap/apple.c (grub_apple_partition_map_init)
12901 (grub_apple_partition_map_fini): Likewise.
12902 * partmap/pc.c (grub_pc_partition_map_init)
12903 (grub_pc_partition_map_fini): Likewise.
12904 * partmap/sun.c (grub_sun_partition_map_init,
12905 grub_sun_partition_map_fini): Likewise.
12906 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12909 * util/grub-emu.c: Include <grub_modules_init.h>.
12910 (main): Don't initialize and de-initialize any modules directly,
12911 use `grub_init_all' and `grub_fini_all' instead.
12913 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12914 `grub_vesafb_mod_init'.
12915 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12917 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12918 `grub_vga_mod_init'. Updated all users.
12919 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12921 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12922 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12925 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12926 Generate a function to initialize the module in utilities.
12927 Updated all callers.
12928 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12929 initialize the module in utilities. Updated all callers.
12931 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12933 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12934 escape sequence and a literal ^L to clear the screen.
12936 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12937 when returning from Open Firmware.
12939 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12941 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12942 (grub_ofconsole_height): Likewise.
12943 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12944 manually insert a '\n'.
12945 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12946 `grub_ofconsole_height'. Return early if these are already set.
12948 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12950 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12951 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12952 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12953 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12954 and `normal/script.c'.
12955 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12956 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12957 (test_mod_SOURCES): New variable.
12958 (test_mod_CFLAGS): Likewise.
12959 (test_mod_LDFLAGS): Likewise.
12960 (pkgdata_MODULES): Add `test.mod'.
12961 (grub_script.tab.c): New rule.
12962 (grub_script.tab.h): Likewise.
12964 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
12966 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12967 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12968 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12969 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12970 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12971 (test_mod_SOURCES): New variable.
12972 (test_mod_CFLAGS): Likewise.
12973 (pkgdata_MODULES): Add `test.mod'.
12974 (grub_script.tab.c): New rule.
12975 (grub_script.tab.h): Likewise.
12977 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
12979 Add initial scripting support.
12981 * commands/test.c: New file.
12982 * include/grub/script.h: Likewise.
12983 * normal/execute.c: Likewise.
12984 * normal/function.c: Likewise.
12985 * normal/lexer.c: Likewise.
12986 * normal/parser.y: Likewise.
12987 * normal/script.c: Likewise.
12989 * configure.ac: Add `AC_PROG_YACC' test.
12991 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12992 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12993 `normal/function.c' and `normal/script.c'.
12994 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12995 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12996 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12998 (pkgdata_MODULES): Add `test.mod'.
12999 (grub_script.tab.c): New rule.
13000 (grub_script.tab.h): Likewise.
13002 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13004 * include/grub/normal.h (grub_test_init): New prototype.
13005 (grub_test_fini): Likewise.
13007 * normal/command.c: Include <grub/script.h>.
13008 (grub_command_execute): Rewritten.
13010 * util/grub-emu.c (main): Call `grub_test_init' and
13013 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13015 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13017 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13018 there are no pending characters.
13020 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13022 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13023 `grub_strndup' to drop device arguments. Replace unnecessary
13024 `grub_strndup' with `grub_strdup'.
13026 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
13028 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13029 `debug' environment variable has been set.
13031 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
13033 * Makefile.in (install-local): Use $(DATA).
13034 (uninstall): Likewise.
13035 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13036 (sbin_UTILITIES): ... to here.
13037 (sbin_SCRIPTS): New variable.
13038 (grub_install_SOURCES): New variable.
13039 * util/powerpc/ieee1275/grub-install.in: New file.
13040 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13042 (add_segments): Call `grub_util_get_path'.
13044 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
13046 From Timothy Baldwin:
13047 * commands/ls.c (grub_ls_list_files): Close FILE with
13049 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13051 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
13053 * include/grub/parser.h: New file.
13055 * kern/parser.c: Likewise.
13057 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13058 (grub_setup_SOURCES): Likewise.
13059 (grub_probefs_SOURCES): Likewise.
13060 (grub_emu_SOURCES): Likewise.
13061 (kernel_img_HEADERS): Add `parser.h'.
13063 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13064 (grub_emu_SOURCES): Add `kern/parser.c'.
13065 (grubof_SOURCES): Likewise.
13067 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13068 (grubof_SOURCES): Add `kern/parser.c'.
13070 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13072 * kern/misc.c (grub_split_cmdline): Removed function.
13074 * kern/rescue.c: Include <grub/parser.h>.
13075 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13076 of `grub_split_cmdline'.
13078 * normal/command.c: Include <grub/parser.h>.
13079 (grub_command_execute): Use `grub_parser_split_cmdline' instead
13080 of `grub_split_cmdline'.
13082 * normal/completion.c: Include <grub/parser.h>.
13083 (cmdline_state): New variable.
13084 (iterate_dir): End the filename with a quote depending on the
13085 command line state.
13086 (get_state): new function.
13087 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13088 split the arguments and determine the current argument. When the
13089 argument string is not quoted, escape all spaces.
13091 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13093 * normal/sparc64/setjmp.S: New file.
13095 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13097 * include/grub/sparc64/libgcc.h: New file.
13098 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13099 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13100 normal/sparc64/setjmp.c.
13102 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
13104 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13105 * kern/sparc64/cache.S: New file.
13106 * kern/sparc64/cache.c: Removed.
13107 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13108 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
13110 (COMMON_LDFLAGS): Add -melf64_sparc.
13111 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13112 (grubof_SOURCES): Use cache.S instead of cache.c.
13113 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
13114 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13115 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13117 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13118 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13119 (linux_mod_CFLAGS): Commented out.
13120 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13121 out because module isn't built.
13122 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13123 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13124 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13125 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13126 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13127 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13128 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13129 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13130 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13131 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13132 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13133 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13134 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13135 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13137 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
13139 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13140 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13141 longer, because HFS should not be used on PC.
13143 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13145 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13146 consistently within the loop.
13148 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
13150 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13151 directory can not be read.
13153 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13155 * configure.ac (AC_INIT): Increase the version number to 1.91.
13157 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13158 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13159 term/i386/pc/serial.c.
13161 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13163 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13164 file size must be permitted.
13166 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13167 between %ah and %al.
13169 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13171 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13173 Call the hook with a NUL-terminated filename.
13174 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13177 * kern/term.c (cursor_state): New variable.
13178 (grub_term_set_current): Reset the cursor state on a new
13180 (grub_setcursor): Rewritten to use CURSOR_STATE.
13181 (grub_getcursor): New function.
13183 * include/grub/term.h (grub_getcursor): New prototype.
13185 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13186 integers on ARM. Reported by Timothy Baldwin
13187 <T.E.Baldwin99@members.leeds.ac.uk>.
13189 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
13191 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13193 (grub_sfs_dir): Likewise.
13195 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
13197 Add support for the SFS filesystem.
13199 * fs/sfs.c: New file.
13201 * DISTLIST: Added `fs/sfs.c'.
13203 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13204 (grub_probefs_SOURCES): Likewise.
13205 (grub_emu_SOURCES): Likewise.
13206 (pkgdata_MODULES): Add `sfs.mod'.
13207 (sfs_mod_SOURCES): New variable.
13208 (sfs_mod_CFLAGS): Likewise.
13209 (sfs_mod_LDFLAGS): Likewise.
13211 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13212 (pkgdata_MODULES): Add `sfs.mod'.
13213 (sfs_mod_SOURCES): New variable.
13214 (sfs_mod_CFLAGS): Likewise.
13216 * util/grub-emu.c (main): Call `grub_sfs_init' and
13219 * include/grub/fs.h (grub_sfs_init): New prototype.
13220 (grub_sfs_fini): Likewise.
13222 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
13224 Add support for the AFFS filesystem.
13226 * fs/affs.c: New file.
13228 * DISTLIST: Added `fs/affs.c'.
13230 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13231 (grub_probefs_SOURCES): Likewise.
13232 (grub_emu_SOURCES): Likewise.
13233 (pkgdata_MODULES): Add `affs.mod'.
13234 (affs_mod_SOURCES): New variable.
13235 (affs_mod_CFLAGS): Likewise.
13236 (affs_mod_LDFLAGS): Likewise.
13238 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13239 (pkgdata_MODULES): Add `affs.mod'.
13240 (affs_mod_SOURCES): New variable.
13241 (affs_mod_CFLAGS): Likewise.
13243 * util/grub-emu.c (main): Call `grub_affs_init' and
13246 * include/grub/fs.h (grub_affs_init): New prototype.
13247 (grub_affs_fini): Likewise.
13249 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13251 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13253 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13255 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13258 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13261 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13262 (COMMON_LDFLAGS): New variable.
13263 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13264 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13265 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13266 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13267 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13268 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13269 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13270 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13271 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13272 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13273 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13274 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13275 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13276 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13277 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13279 (normal_mod_ASFLAGS): Add `-m32'.
13281 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13282 (grub_host_size_t, grub_host_ssize_t): New types.
13283 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13284 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13285 `GRUB_HOST_SIZEOF_VOID_P'.
13287 * include/grub/kernel.h (struct grub_module_header): Type of
13288 member offset changed to `grub_host_off_t'. Type of member size
13289 changed to `grub_host_size_t'.
13290 (struct grub_module_info): Type of member offset changed to
13291 `grub_host_off_t'. Type of member size changed to
13292 `grub_host_size_t'.
13294 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13296 Make GRUB's kernel compliant to Multiboot Specification.
13298 * kern/i386/pc/startup.S (multiboot_header): New label.
13299 (multiboot_entry): Likewise.
13300 (multiboot_trampoline): Likewise.
13302 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13303 Increased to 0x4A0.
13305 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13306 put parentheses after a question mark.
13307 [!GRUB_UTIL] (my_mod): New variable.
13309 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13311 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13313 Adds support for the XFS filesystem. Btrees are not supported
13316 * fs/xfs.c: New file.
13318 * DISTLIST: Added `fs/xfs.c'.
13320 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13321 (grub_probefs_SOURCES): Likewise.
13322 (grub_emu_SOURCES): Likewise.
13323 (pkgdata_MODULES): Add `xfs.mod'.
13324 (xfs_mod_SOURCES): New variable.
13325 (xfs_mod_CFLAGS): Likewise.
13327 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13328 (pkgdata_MODULES): Add `xfs.mod'.
13329 (xfs_mod_SOURCES): New variable.
13330 (xfs_mod_CFLAGS): Likewise.
13332 * util/grub-emu.c (main): Call `grub_xfs_init' and
13335 * include/grub/fs.h (grub_xfs_init): New prototype.
13336 (grub_xfs_fini): Likewise.
13339 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13341 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13342 color modes, allow greater than 16 colors to be configured as
13345 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13347 * normal/completion.c (complete_arguments): Add the qualifier
13348 const into OPTIONS.
13350 From Omniflux <omniflux+lists@omniflux.com>:
13351 * include/grub/terminfo.h: New file.
13352 * include/grub/tparm.h: Likewise.
13353 * include/grub/i386/pc/serial.h: Likewise.
13354 * term/terminfo.c: Likewise.
13355 * term/tparm.c: Likewise.
13356 * term/i386/pc/serial.c: Likewise.
13357 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13359 (terminfo_mod_SOURCES): New variable.
13360 (terminfo_mod_CFLAGS): Likewise.
13361 (serial_mod_SOURCES): Likewise.
13362 (serial_mod_CFLAGS): Likewise.
13364 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13366 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13367 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13368 and kern/powerpc/ieee1275/cmain.c, respectively.
13370 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13371 * kern/powerpc/ieee1275/crt0.S: ... here.
13373 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13374 * kern/powerpc/ieee1275/cmain.c: ... here.
13376 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13377 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13378 instead of boot/powerpc/ieee1275/crt0.S and
13379 boot/powerpc/ieee1275/cmain.c, respectively.
13381 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13382 sectors. It was not used anyway.
13384 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13386 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13387 `unused parameter' warning.
13389 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13391 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13393 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13396 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13398 * include/grub/normal.h (enum grub_completion_type): Added
13399 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13401 * normal/cmdline.c (print_completion): Handle
13402 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13403 * normal/menu_entry.c (store_completion): Likewise.
13405 * normal/completion.c (complete_arguments): New function.
13406 (grub_normal_do_completion): Call `complete_arguments' when the
13407 current words start with a dash.
13409 2005-08-27 Marco Gerards <metgerards@student.han.nl>
13411 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13412 `gzio.mod' instead of `io.mod').
13414 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13416 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13417 (DISTDIRS): Added io and video.
13418 Rewrite the search routine to make an output consistently.
13420 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13421 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13422 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13423 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13424 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13425 util/powerpc/ieee1275/misc.c.
13427 * include/grub/gzio.h: New file.
13428 * io/gzio.c: Likewise.
13430 * kern/file.c (grub_file_close): Call grub_device_close only if
13431 FILE->DEVICE is not NULL.
13433 * include/grub/mm.h [!NULL] (NULL): New macro.
13435 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13437 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13438 (pkgdata_MODULES): Added gzio.mod.
13439 (gzio_mod_SOURCES): New variable.
13440 (gzio_mod_CFLAGS): Likewise.
13442 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13443 (pkgdata_MODULES): Added gzio.mod.
13444 (gzio_mod_SOURCES): New variable.
13445 (gzio_mod_CFLAGS): Likewise.
13447 * commands/cat.c: Include grub/gzio.h.
13448 (grub_cmd_cat): Use grub_gzfile_open instead of
13451 * commands/cmp.c: Include grub/gzio.h.
13452 (grub_cmd_cmp): Use grub_gzfile_open instead of
13455 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13456 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13458 (grub_rescue_cmd_module): Likewise.
13460 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13462 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13463 kern/sparc64/ieee1275/init.c because it contains _start.
13464 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13466 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13468 * configure.ac: Add support for sparc64 host with ieee1275
13470 * configure: Generated from configure.ac.
13471 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13473 (grub_ofdisk_read): Likewise.
13474 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13475 pointers as (void *) to remove a warning.
13476 (grub_ofdisk_close): Likewise.
13477 (grub_ofdisk_read): Likewise.
13478 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13479 returns, so make it return void to remove a warning.
13480 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13481 Corresponding prototype change.
13482 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13483 values, and cast the pointers as (void *) to remove a warning.
13484 (grub_mm_dump): Likewise.
13485 * conf/sparc64-ieee1275.mk: New file.
13486 * conf/sparc64-ieee1275.rmk: Likewise.
13487 * include/grub/sparc64/setjmp.h: Likewise.
13488 * include/grub/sparc64/types.h: Likewise.
13489 * include/grub/sparc64/ieee1275/console.h: Likewise.
13490 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13491 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13492 * include/grub/sparc64/ieee1275/time.h: Likewise.
13493 * kern/sparc64/cache.c: Likewise.
13494 * kern/sparc64/dl.c: Likewise.
13495 * kern/sparc64/ieee1275/init.c: Likewise.
13496 * kern/sparc64/ieee1275/openfw.c: Likewise.
13498 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13500 * util/console.c (grub_ncurses_putchar): If C is greater than
13501 0x7f, set C to a question mark.
13502 (grub_ncurses_getcharwidth): New function.
13503 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13506 * normal/menu.c (print_entry): Made aware of Unicode. First,
13507 convert TITLE to UCS-4, and predict the cursor position by
13510 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13512 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13514 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13516 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13517 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13520 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13521 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13522 grub_strcpy and grub_strlen. Take it into account that a space
13523 character is inserted as a delimiter.
13525 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13527 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13528 invalid magic in the error.
13530 * commands/search.c: New file.
13532 * util/grub-emu.c (main): Call grub_search_init and
13535 * kern/rescue.c (grub_rescue_print_disks): Removed.
13536 (grub_rescue_print_devices): New function.
13537 (grub_rescue_cmd_ls): Use grub_device_iterate with
13538 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13539 grub_rescue_print_disks.
13541 * kern/partition.c (grub_partition_iterate): Return the result of
13542 PARTMAP->ITERATE instead of GRUB_ERRNO.
13544 * kern/device.c: Include grub/partition.h.
13545 (grub_device_iterate): New function.
13547 * include/grub/partition.h (grub_partition_iterate): Return int
13548 instead of grub_err_t.
13550 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13552 [GRUB_UTIL] (grub_search_fini): Likewise.
13554 * include/grub/device.h (grub_device_iterate): New prototype.
13556 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13558 (pkgdata_MODULES): Added search.mod.
13559 (search_mod_SOURCES): New variable.
13560 (search_mod_CFLAGS): Likewise.
13562 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13563 (pkgdata_MODULES): Added search.mod.
13564 (search_mod_SOURCES): New variable.
13565 (search_mod_CFLAGS): Likewise.
13567 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13568 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13569 All callers changed.
13571 * DISTLIST: Added commands/search.c.
13573 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13575 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13577 (grub_getcharwidth): New function.
13579 * kern/misc.c (grub_utf8_to_ucs4): New function.
13581 * include/grub/term.h (struct grub_term): Added a new member
13583 (grub_getcharwidth): New prototype.
13585 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13587 * term/i386/pc/console.c (map_char): New function. Segregated from
13588 grub_console_putchar.
13589 (grub_console_putchar): Use map_char.
13590 (grub_console_getcharwidth): New function.
13591 (grub_console_term): Specified grub_console_getcharwidth as
13594 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13595 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13597 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13599 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13600 on grub_strtoul completely.
13601 (write_char): Declare local variables in the beginning of the
13603 (grub_vesafb_getcharwidth): New function.
13604 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13607 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13609 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13610 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13611 commands/i386/pc/vbetest.c.
13613 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13614 call grub_vbe_get_controller_info again, because the returned
13615 information is volatile.
13616 (grub_vbe_set_video_mode): Mostly rewritten.
13617 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13618 grub_vbe_status_t correctly.
13619 (grub_vbe_get_video_mode_info): Likewise.
13620 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13621 several if statements.
13623 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13624 * commands/i386/pc/vbeinfo.c: ... this.
13626 * commands/i386/pc/vbe_test.c: Renamed to ...
13627 * commands/i386/pc/vbetest.c: ... this.
13629 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13631 (grub_cmd_vbeinfo): ... this. Save video modes before
13632 iterating. Skip a video mode, if it is not available, not enough
13633 information is given or it is monochrome. Show the memory
13634 model. Leave the interpretation of MODEVAR to grub_strtoul
13636 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13637 (GRUB_MOD_FINI): Likewise.
13639 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13640 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13641 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13642 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13643 grub_strtoul completely.
13644 (real2pm): Removed.
13645 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13646 (GRUB_MOD_FINI): Likewise.
13648 * normal/misc.c: Include grub/mm.h.
13650 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13651 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13652 (vbe_list_modes_mod_SOURCES): Removed.
13653 (vbe_list_modes_mod_CFLAGS): Likewise.
13654 (vbe_test_mod_SOURCES): Likewise.
13655 (vbe_test_mod_CFLAGS): Likewise.
13656 (vbeinfo_mod_SOURCES): New variable.
13657 (vbeinfo_mod_CFLAGS): Likewise.
13658 (vbetest_mod_SOURCES): Likewise.
13659 (vbetest_mod_CFLAGS): Likewise.
13661 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13663 * normal/misc.c: New file.
13665 * DISTLIST: Added normal/misc.c.
13667 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13668 DISK to HOOK. Call HOOK with DISK.
13669 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13670 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13671 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13673 * normal/menu_entry.c (struct screen): Added a new member
13674 "completion_shown".
13675 (completion_buffer): New global variable.
13676 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13677 (store_completion): New function.
13678 (complete): Likewise.
13679 (clear_completions): Likewise.
13680 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13681 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13682 a tab, call complete.
13684 * normal/completion.c (disk_dev): Removed.
13685 (print_simple_completion): Likewise.
13686 (print_partition_completion): Likewise.
13687 (print_func): New global variable.
13688 (add_completion): Do not take the arguments WHAT or PRINT any
13689 longer. Added a new argument TYPE. Instead of printing directly,
13690 call PRINT_FUNC if not NULL.
13691 All callers changed.
13692 (complete_device): Use a local variable DEV instead of
13693 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13694 (grub_normal_do_completion): Take a new argument HOOK. Do not
13695 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13696 empty string, return NULL instead.
13697 All callers changed.
13699 * normal/cmdline.c (print_completion): New function.
13701 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13703 All callers changed.
13705 * kern/disk.c (grub_print_partinfo): Removed.
13707 * include/grub/partition.h (struct grub_partition_map): Add a new
13708 argument DISK into HOOK of ITERATE.
13709 (grub_partition_iterate): Add a new argument DISK to HOOK.
13711 * include/grub/normal.h (enum grub_completion_type): New enum.
13712 (grub_completion_type_t): New type.
13713 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13714 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13715 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13716 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13717 (grub_normal_do_completion): Added a new argument HOOK.
13718 (grub_normal_print_device_info): New prototype.
13720 * include/grub/disk.h (grub_print_partinfo): Removed.
13722 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13723 (normal_mod_SOURCES): Likewise.
13724 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13725 (normal_mod_SOURCES): Likewise.
13727 * commands/ls.c (grub_ls_list_disks): Use
13728 grub_normal_print_device_info instead of grub_print_partinfo. Free
13730 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13731 duplicating the code.
13733 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13735 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13736 follow GCS more precisely.
13737 * commands/i386/pc/vbe_test.c: Likewise.
13738 * include/grub/i386/pc/vbe.h: Likewise.
13739 * term/i386/pc/vesafb.c: Likewise.
13740 * video/i386/pc/vbe.c: Likewise.
13742 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13744 * DISTLIST: Added term/i386/pc/vesafb.c
13745 DISTLIST: Added video/i386/pc/vbe.c
13746 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13747 DISTLIST: Added commands/i386/pc/vbe_test.c.
13748 * commands/i386/pc/vbe_list_modes.c: New file.
13749 * commands/i386/pc/vbe_test.c: Likewise.
13750 * term/i386/pc/vesafb.c: Likewise.
13751 * video/i386/pc/vbe.c: Likewise.
13752 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13753 (grub_vbe_probe) Added prototype.
13754 (grub_vbe_set_video_mode) Likewise.
13755 (grub_vbe_get_video_mode) Likewise.
13756 (grub_vbe_get_video_mode_info) Likewise.
13757 (grub_vbe_set_pixel_rgb) Likewise.
13758 (grub_vbe_set_pixel_index) Likewise.
13759 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13760 (pkgdata_MODULES): Added vesafb.mod.
13761 (pkgdata_MODULES): Added vbe_list_modes.mod.
13762 (pkgdata_MODULES): Added vbe_test.mod.
13763 (vbe_mod_SOURCES): Added.
13764 (vbe_mod_CFLAGS): Likewise.
13765 (vesafb_mod_SOURCES): Likewise.
13766 (vesafb_mod_CFLAGS): Likewise.
13767 (vbe_list_modes_mod_SOURCES): Likewise.
13768 (vbe_list_modes_mod_CFLAGS): Likewise.
13769 (vbe_test_mod_SOURCES): Likewise.
13770 (vbe_test_mod_CFLAGS): Likewise.
13772 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13774 * normal/command.c (grub_command_execute): If INTERACTIVE is
13775 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13776 CMDLINE. Disable the pager if INTERACTIVE is true.
13777 All callers are changed.
13779 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13780 before reading a config file.
13781 * normal/main.c (read_config_file): Even if a command is not
13782 found, register it if it is within an entry.
13784 * util/grub-emu.c: Include sys/types.h and unistd.h.
13785 (options): Added --hold.
13786 (struct arguments): Added a new member "hold".
13787 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13789 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13790 cleared by a debugger, if it is not zero.
13792 * include/grub/normal.h (grub_command_execute): Add an argument
13795 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13797 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13799 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13801 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13802 program with another one, because the old one didn't detect a bug
13803 in gcc-3.4. Always use regparm 2, because the new test is still
13804 not enough for gcc-4.0. Someone must investigate a simple test
13805 case which detects a bug in gcc-4.0.
13807 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13809 * DISTLIST: Added normal/completion.c.
13811 * normal/completion.c: New file.
13813 * term/i386/pc/console.c (grub_console_getwh): New function.
13814 (grub_console_term): Assign grub_console_getwh to getwh.
13816 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13817 function is defined in normal/completion.c as
13818 grub_normal_do_completion.
13819 (grub_cmdline_get): Use grub_normal_do_completion instead of
13822 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13823 returns non-zero, otherwise return 0.
13824 (grub_partition_iterate): First, probe the partition map. Then,
13825 call ITERATE only for this partition map.
13827 * kern/misc.c (grub_strncmp): Rewritten.
13829 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13830 returns non-zero. Otherwise return 0.
13832 * include/grub/partition.h (grub_partition_map_iterate): Return
13833 int instead of void.
13835 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13837 * include/grub/misc.h (grub_strncmp): Change the type of N to
13840 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13843 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13844 unsigned explicitly before comparing it with I.
13846 * kern/main.c (grub_env_write_root): Add the attribute unused into
13849 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13850 normal/completion.c.
13851 (normal_mod_SOURCES): Likewise.
13852 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13853 (normal_mod_SOURCES): Likewise.
13855 * normal/command.c (grub_iterate_commands): If ITERATE returns
13856 non-zero, return one immediately.
13858 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13860 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13861 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13863 (grub_vbe_get_controller_info): New function.
13864 (grub_vbe_get_mode_info): Likewise.
13865 (grub_vbe_set_mode): Likewise.
13866 (grub_vbe_get_mode): Likewise.
13867 (grub_vbe_set_memory_window): Likewise.
13868 (grub_vbe_get_memory_window): Likewise.
13869 (grub_vbe_set_scanline_length): Likewise.
13870 (grub_vbe_get_scanline_length): Likewise.
13871 (grub_vbe_set_display_start): Likewise.
13872 (grub_vbe_get_display_start): Likewise.
13873 (grub_vbe_set_palette_data): Likewise.
13874 * include/grub/i386/pc/vbe.h: New file.
13876 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13878 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13879 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13880 * DISTLIST: Likewise.
13881 * kern/ieee1275/of.c: Moved to ...
13882 * kern/ieee1275/ieee1275.c: ... here.
13884 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13886 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13887 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13888 Pass 0 as `end' parameter to grub_strtoul().
13890 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13892 * include/grub/powerpc/ieee1275/console.h: Do not include
13893 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13895 (grub_console_cur_color): Remove i386-specific prototype.
13896 (grub_console_real_putchar): Likewise.
13897 (grub_console_checkkey): Likewise.
13898 (grub_console_getkey): Likewise.
13899 (grub_console_getxy): Likewise.
13900 (grub_console_gotoxy): Likewise.
13901 (grub_console_cls): Likewise.
13902 (grub_console_setcursor): Likewise.
13903 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13904 Include <grub/machine/console.h>.
13905 * term/ieee1275/ofconsole.c: Likewise.
13907 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13909 * Makefile.in (LIBLZO): New variable.
13911 * configure.ac: Check for LZO version 2.
13913 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13914 lzo/lzo1x.h instead of lzo1x.h.
13916 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13919 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13920 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13922 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13923 copying the data from PARTITION to P.
13925 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13927 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13928 negative, unload the module.
13930 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13931 map is "pc_partition_map" but not "pc".
13932 (usage): Fix the description. The options are --boot-image and
13933 --core-image but not --boot-file or --core-file.
13934 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13935 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13938 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13939 --core-file. Specify INSTALL_DEVICE as an argument.
13941 * util/console.c: Include config.h.
13942 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13943 [HAVE_NCURSES_H]: Include ncurses.h.
13944 [HAVE_CURSES_H]: Include curses.h.
13945 [!A_NORMAL] (A_NORMAL): Defined as zero.
13946 [!A_STANDOUT] (A_STANDOUT): Likewise.
13948 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13950 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13952 * configure.ac: Check for curses libraries and headers.
13954 * Makefile.in (LIBCURSES): New variable.
13956 * genmk.rb (Script::rule): Set the executable bits.
13958 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13959 name of the PC partition map is "pc_partition_map" but not "pc".
13961 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13963 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13964 (modules): Likewise.
13965 (usage): Added descriptions for --modules and --grub-probefs.
13966 Handle --modules and --grub-probefs. Save the arguments in MODULES
13967 and GRUB_PROBEFS, respectively.
13968 Auto-detect a filesystem module against GRUBDIR. If the result is
13969 empty and modules are not specified explicitly, abort the
13970 installation. Add the result to MODULES.
13972 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13973 disk/powerpc/ieee1275/ofdisk.c,
13974 include/grub/powerpc/ieee1275/init.h and
13975 term/powerpc/ieee1275/ofconsole.c.
13976 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13977 term/ieee1275/ofconsole.c.
13979 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13981 * COPYING: Upgraded to the latest version. Only the address of the
13982 FSF office has changed.
13984 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13986 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13987 kern/ieee1275.c with kern/ieee1275/of.c.
13989 * kern/ieee1275.c: Moved to ...
13990 * kern/ieee1275/of.c: ... here.
13992 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13994 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
13997 * config.guess: Updated to the latest version from gnulib.
13998 * config.sub: Likewise.
13999 * install.sh: Likewise.
14000 * mkinstalldirs: Likewise.
14002 * include/grub/console.h: Removed. This file is arch-specific. Do
14003 not put this in include/grub.
14005 * include/grub/i386/pc/console.h: Resurrected.
14007 * util/console.c: Include grub/machine/console.h instead of
14009 * util/grub-emu.c: Likewise.
14011 2005-08-04 Marco Gerards <metgerards@student.han.nl>
14013 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14016 From Vincent Pelletier <subdino2004@yahoo.fr>
14017 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14018 Redefined to use grub_getwh.
14019 (grub_term): New member named getwh.
14020 (grub_getwh): New prototype.
14021 * kern/term.c (grub_getwh): New function.
14022 * term/i386/pc/console.c (grub_console_getwh): New function.
14023 (grub_console_term): New member `getwh'.
14024 * term/i386/pc/vga.c (grub_vga_getwh): New function.
14025 (grub_vga_term): New member `getwh'.
14026 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14028 (grub_ofconsole_getw): New function.
14029 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14030 (grub_ofconsole_term): New field named getwh and new initial
14033 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
14035 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14036 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
14037 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14038 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14039 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14040 of <grub/machine/ieee1275.h>.
14041 * commands/ieee1275/reboot.c: Likewise.
14042 * boot/powerpc/ieee1275/ieee1275.c: Move ...
14043 * kern/ieee1275.c: ... to here. All users updated. Change all
14044 parameter structs to use new type `grub_ieee1275_cell_t'.
14045 * term/powerpc/ieee1275/ofconsole.c: Move ...
14046 * term/ieee1275/ofconsole.c: ... to here. All users updated.
14047 * disk/powerpc/ieee1275/ofdisk.c: Move ...
14048 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
14049 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14051 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14052 Remove unused prototypes. All users updated.
14053 * include/grub/powerpc/ieee1275/console.h: Removed.
14054 * include/grub/powerpc/ieee1275/ieee1275.h: Define
14055 `grub_ieee1275_cell_t'.
14056 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14057 Cast comparisons with -1 to the correct type.
14058 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14059 type to match `grub_ieee1275_entry_fn'.
14061 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
14063 * DISTLIST: Added util/i386/pc/grub-probefs.c.
14065 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14066 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14068 (grub_probefs_SOURCES): New variable.
14070 * util/i386/pc/grub-probefs.c: New file.
14072 * util/i386/pc/grub-setup.c (main): Call
14073 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14074 grub_hfs_init and grub_jfs_init to initialize the system. Call
14075 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14076 grub_pc_partition_map_fini to finish the system.
14078 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
14080 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14082 (grub_multiboot_load_elf32): Likewise.
14083 (grub_multiboot_is_elf64): Likewise.
14084 (grub_multiboot_load_elf64): Likewise.
14085 (grub_multiboot_load_elf): Likewise.
14086 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14087 an ELF32 or ELF64 file.
14088 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14090 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14091 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14092 NULL before calling FS->LABEL.
14093 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14094 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14095 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14096 before calling FS->LABEL.
14098 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
14100 * util/i386/pc/grub-install.in (datadir): New variable.
14102 (pkgdatadir): New variable.
14103 (pkglibdir): Removed.
14105 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
14107 * DISTLIST: Added util/i386/pc/grub-install.in.
14109 * util/i386/pc/grub-install.in: New file.
14111 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14112 (grub_install_SOURCES): Likewise.
14114 * genmk.rb: Added support for scripts.
14115 (Script): New class.
14116 (scripts): New variable.
14118 * Makefile.in (install-local): Install sbin_SCRIPTS by
14120 (uninstall): Remove sbin_SCRIPTS.
14122 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14123 device, try to get a GRUB device by
14124 grub_util_biosdisk_get_grub_dev.
14127 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14128 description for --device-map.
14130 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14132 Change the semantics of variable hooks. They now return strings
14133 instead of error values.
14135 * util/i386/pc/grub-setup.c: Include grub/env.h.
14136 (setup): Use grub_device_set_root instead of grub_env_set.
14138 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14139 grub_env_get instead of grub_device_set_root and
14140 grub_device_get_root, respectively.
14142 * kern/main.c (grub_env_write_root): New function.
14143 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14144 grub_env_set instead of grub_device_set_root.
14146 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14148 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14149 rather than calling ENV->WRITE_HOOK afterwards.
14150 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14151 passing a pointer of a pointer.
14152 (grub_register_variable_hook): Change the types of "read_hook" and
14153 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14155 Allocate the default empty string on the heap, because this string
14156 may be freed later.
14158 * kern/device.c: Include grub/env.h.
14159 (grub_device_set_root): Removed.
14160 (grub_device_get_root): Likewise.
14161 (grub_device_open): Use grub_env_get instead of
14162 grub_device_get_root.
14164 * include/grub/env.h (grub_env_read_hook_t): New type.
14165 (grub_env_write_hook_t): Likewise.
14166 (grub_env_var): Change the types of "read_hook" and "write_hook"
14167 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14168 (grub_register_variable_hook): Likewise.
14170 * include/grub/device.h (grub_device_set_root): Removed.
14171 (grub_device_set_root): Likewise.
14173 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14174 make sure that DIRNAME terminates with '/', so that
14175 grub_fat_find_dir will fail if PATH is not a directory.
14177 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14179 Use the qualifier auto for print_files and print_files_long.
14180 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14182 Put a newline only if there is no error.
14183 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14186 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14188 * kern/partition.c (grub_partition_probe): Initialize PART to
14189 NULL. Otherwise, when no partition map is registered, this returns
14192 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14194 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14195 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14198 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14200 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14201 information on each device, if it does not have partitions. Print
14202 "Device" instead of "Disk", because this function is not specific
14205 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14206 static to ensure that it is put on the memory rather than a
14209 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14211 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14212 (grub_cat_init): Likewise.
14213 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14214 (options): Likewise.
14215 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14216 (grub_configfile_init): Likewise.
14217 * font/manager.c (GRUB_MOD_INIT): Likewise.
14218 * commands/help.c (GRUB_MOD_INIT): Likewise.
14219 (grub_help_init): Likewise.
14220 * normal/command.c (grub_command_init): Likewise.
14221 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14222 * disk/loopback.c (grub_loop_init): Likewise.
14223 (GRUB_MOD_INIT): Likewise.
14224 * commands/ls.c (grub_ls_init): Likewise.
14225 (GRUB_MOD_INIT): Likewise.
14226 (options): Likewise.
14227 * commands/boot.c (grub_boot_init): Likewise.
14228 (GRUB_MOD_INIT): Likewise.
14229 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14230 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14231 (GRUB_MOD_INIT): Likewise.
14232 * commands/cmp.c (grub_cmp_init): Likewise.
14233 (GRUB_MOD_INIT): Likewise.
14235 * normal/arg.c: Use <> instead of "" to include header files.
14236 (SHORT_ARG_HELP): New macro.
14237 (SHORT_ARG_USAGE): Likewise.
14238 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14239 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14241 (find_short): Check if C is 'h' or 'u' explicitly.
14242 (grub_arg_show_help): Use space characters instead of tabs. Treat
14243 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14244 are shown with --help and --usage only if they are not used for
14245 the command itself.
14246 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14249 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14250 const into "longarg". Change the type of "shortarg" to int.
14252 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14254 * boot/i386/pc/boot.S (boot_drive_check): New label.
14256 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14259 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14260 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14262 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14264 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14265 When turning off Gate A20, skip the check and return immediately,
14266 because this is not fatal usually.
14268 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14270 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14271 be 0x7C00 instead of 0x8000.
14273 * boot/i386/pc/pxeboot.S: Rewritten.
14275 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14277 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14280 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14282 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14283 robustness. This routine now supports a BIOS call and System
14284 Control Port A to modify the gate A20.
14286 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14287 Increased to 0x440.
14289 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14291 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14292 device path and resulting ihandle.
14293 (grub_ofdisk_close): dprintf the ihandle being closed.
14294 (grub_ofdisk_read): dprintf function parameters.
14295 * kern/mm.c (grub_mm_init_region): Likewise.
14296 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14297 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14298 size, and boot arguments.
14299 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14300 before loading into memory.
14301 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14302 before loading into memory.
14304 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14306 * kern/mm.c: Added much documentation.
14307 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14308 8, set to 5 instead of 8.
14310 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14312 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14314 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14315 (grub_mkdevicemap_SOURCES): New variable.
14317 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14318 lib/device.c of GRUB Legacy.
14320 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14322 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14323 instead of PATH is NULL.
14325 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14327 * commands/cmp.c (BUFFER_SIZE): New macro.
14328 (grub_cmd_cmp): Close the right file at the right time. Compare
14329 only data just read. Don't report files of different size as
14330 identical. Dynamically allocate buffers. Move variable
14331 declarations at the beginning of function.
14333 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14335 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14338 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14340 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14341 when backspace is pressed at beginning of line.
14343 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14345 * DISTLIST: Added genfslist.sh.
14347 * normal/main.c (fs_module_list): New variable.
14348 (autoload_fs_module): New function.
14349 (read_fs_list): Likewise.
14350 (grub_normal_execute): Call read_fs_list.
14352 * kern/fs.c (grub_fs_autoload_hook): New variable.
14353 (grub_fs_probe): Added support for auto-loading.
14355 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14356 (grub_fs_module_list_t): New type.
14358 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14359 (grub_fs_autoload_hook): New prototype.
14361 * genfslist.sh: New file.
14363 * genmk.rb: Added a rule to generate a filesystem list.
14365 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14367 * configure.ac: Fix the test for cross-compiling.
14369 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14370 define GRUB_UTIL anymore.
14372 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14373 so this function works on other systems than just big endian.
14374 (load_modules): Likewise.
14375 (add_segments): Likewise.
14377 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14379 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14380 contains `l' modifier, get a long from va_arg().
14382 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14384 * kern/mm.c (grub_free): If the next free block which is being
14385 merged is the first free block, set the first block to the block
14387 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14389 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14391 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14392 `grub_ieee1275_chosen'.
14394 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14396 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14397 (grub_ieee1275_chosen): New variable.
14398 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14400 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14401 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14402 Rename first argument to `phandle' for consistency.
14403 (grub_ieee1275_get_property_length): Likewise.
14404 (grub_ieee1275_next_property): Likewise. Change type of first argument
14405 to grub_ieee1275_phandle_t.
14406 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14407 Move export next to declaration.
14408 (grub_ieee1275_chosen): New variable.
14409 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14410 Correct cosmetic typo.
14411 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14412 `grub_ieee1275_chosen'.
14413 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14414 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14415 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14416 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14417 `grub_ieee1275_chosen'.
14419 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14421 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14423 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14424 /chosen/bootargs as "variable=value" pairs.
14426 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14428 * include/grub/misc.h (grub_dprintf): New macro.
14429 (grub_real_dprintf): New prototype.
14430 (grub_strword): Likewise.
14431 (grub_iswordseparator): Likewise.
14432 * kern/misc.c (grub_real_dprintf): New function.
14433 (grub_strword): Likewise.
14434 (grub_iswordseparator): Likewise.
14436 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14438 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14439 (roundup): Remove macro.
14440 (grub_ieee1275_flags): Make static.
14441 (grub_ieee1275_realmode): Remove.
14442 (grub_ieee1275_test_flag): New function.
14443 (grub_ieee1275_set_flag): Likewise.
14444 (find_options): Rename to `grub_ieee1275_find_options'; update
14445 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14446 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14447 (cmain): New prototype.
14448 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14449 `grub_ieee1275_flags' directly.
14450 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14451 machine/biosdisk.h.
14452 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14453 Don't include grub/machine/init.h.
14454 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14455 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14457 (grub_ieee1275_realmode): Likewise.
14458 (grub_ieee1275_flag): New enum.
14459 (grub_ieee1275_test_flag): New prototype.
14460 (grub_ieee1275_set_flag): New prototype.
14461 * include/grub/powerpc/ieee1275/init.h: Remove file.
14462 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14463 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14464 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14465 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14467 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14468 `grub_ieee1275_test_flag'.
14469 (grub_ieee1275_encode_devname): Likewise.
14471 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14473 * include/grub/powerpc/ieee1275/ieee1275.h
14474 (grub_ieee1275_encode_devname): New prototype.
14475 (grub_ieee1275_get_filename): Likewise.
14476 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14478 (grub_set_prefix): Likewise.
14479 (grub_machine_init): Call grub_set_prefix.
14480 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14481 (grub_parse_type): New enum.
14482 (grub_ieee1275_get_devargs): New function.
14483 (grub_ieee1275_get_devname): Likewise.
14484 (grub_ieee1275_parse_args): Likewise.
14485 (grub_ieee1275_get_filename): Likewise.
14486 (grub_ieee1275_encode_devname): Likewise.
14488 2005-03-30 Marco Gerards <metgerards@student.han.nl>
14490 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14491 `grub_loader_unset'.
14493 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14495 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14496 instead of grub_ieee1275_interpret.
14497 (grub_halt_init): New function.
14498 (grub_halt_fini): Likewise.
14499 (GRUB_MOD_INIT): Correct message grammar.
14500 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14501 instead of grub_ieee1275_interpret.
14502 (grub_reboot_init): New function.
14503 (grub_reboot_fini): Likewise.
14504 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14505 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14506 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14507 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14508 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14510 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14512 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14514 (grub_halt): Likewise.
14515 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14516 (cmain): Remove __attribute__((unused)).
14517 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14518 (grub_heap_len): Likewise.
14519 (grub_machine_fini): New function.
14520 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14521 (grub_halt): Likewise.
14522 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14524 * util/powerpc/ieee1275/misc.c: New file.
14526 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14528 * DISTLIST: New file.
14529 * gendistlist.sh: Likewise.
14531 * Makefile.in (COMMON_DISTFILES): Removed.
14532 (BOOT_DISTFILES): Likewise.
14533 (CONF_DISTFILES): Likewise.
14534 (DISK_DISTFILES): Likewise.
14535 (FS_DISTFILES): Likewise.
14536 (INCLUDE_DISTFILES): Likewise.
14537 (KERN_DISTFILES): Likewise.
14538 (LOADER_DISTFILES): Likewise.
14539 (TERM_DISTFILES): Likewise.
14540 (UTIL_DISTFILES): Likewise.
14541 (DISTFILES): Likewise.
14542 (uninstall): Uninstall files in $(pkgdata_DATA).
14543 (DISTLIST): New target.
14544 (distdir): Use the contents of the file DISTLIST to get a list of
14547 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14549 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14550 descriptor. This is ported from GRUB Legacy.
14552 * gencmdlist.sh: Added an extra semicolon to make it work with
14553 old sed versions. Reported by Robert Bihlmeyer
14554 <robbe@orcus.priv.at>.
14556 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
14558 Automatic loading of commands is supported.
14560 * normal/main.c (read_command_list): New function.
14561 (grub_normal_execute): Call read_command_list.
14563 * normal/command.c (grub_register_command): Return zero or CMD.
14564 Allocate CMD->NAME from the heap.
14565 Initialize CMD->MODULE_NAME to zero.
14566 Find the same name as well. If the same command is found and it is
14567 a dummy command, overwrite members. If it is not a dummy command,
14569 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14570 (grub_command_find): If a dummy command is found, load a module
14571 and retry to find a command only once.
14573 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14574 make sure that each command is loaded.
14576 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14578 (struct grub_command): Remove const from the member `name'.
14579 Add a new member `module_name'.
14580 (grub_register_command): Return grub_command_t.
14582 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14583 sure that each command is loaded.
14585 * genmk.rb (PModule::rule): Specify a module name without the
14586 suffix ".mod" to gencmdlist.sh.
14588 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14590 * gencmdlist.sh: New file.
14592 * genmk.rb (PModule::rule): Generate a rule for a command list.
14594 Generate command.lst from $(COMMANDFILES).
14596 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14597 (DATA): Added $(pkgdata_DATA).
14598 (install-local): Install files in $(pkgdata_DATA).
14600 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14602 * term/i386/pc/vga.c (debug_command): Removed.
14603 (GRUB_MOD_INIT): Do not register the command "debug".
14605 From Hollis Blanchard:
14606 * commands/configfile.c: New file.
14607 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14608 commands/configfile.c.
14609 (pkgdata_MODULES): Added configfile.mod.
14610 (configfile_mod_SOURCES): New variable.
14611 (configfile_mod_CFLAGS): Likewise.
14612 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14613 commands/configfile.c.
14614 (pkgdata_MODULES): Added configfile.mod.
14615 (configfile_mod_SOURCES): New variable.
14616 (configfile_mod_CFLAGS): Likewise.
14617 * util/grub-emu.c (main): Call grub_configfile_init and
14618 grub_configfile_fini.
14619 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14621 [GRUB_UTIL] (grub_configfile_fini): Likewise.
14623 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14625 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14628 * commands/help.c (grub_cmd_help): Do not print newlines after
14629 the last command in print_command_help.
14631 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14633 * commands/default.h: New file.
14634 * commands/timeout.h: Likewise.
14635 * normal/context.c: Likewise.
14637 * util/misc.c: Do not include sys/times.h.
14638 Include sys/time.h and grub/machine/time.h.
14639 (grub_get_rtc): Rewritten with gettimeofday.
14641 * util/grub-emu.c (main): Call grub_default_init and
14642 grub_timeout_init before grub_normal_init, and call
14643 grub_timeout_fini and grub_default_fini after grub_main.
14645 * util/console.c (grub_ncurses_checkkey): Return the read
14648 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14651 * normal/main.c (read_config_file): Push MENU. If this fails,
14652 print an error and wait for a user input.
14653 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14654 If a menu is empty or an error occurs, pop MENU.
14655 (grub_normal_execute): Pop and free MENU after grub_menu_run
14658 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14660 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14662 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14664 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14666 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14669 * include/grub/normal.h (struct grub_menu_list): New struct.
14670 (grub_menu_list_t): New type.
14671 (struct grub_context): New struct.
14672 (grub_context_t): New type.
14673 (grub_register_command): Got rid of EXPORT_FUNC.
14674 (grub_unregister_command): Likewise.
14675 (grub_context_get): New prototype.
14676 (grub_context_get_current_menu): Likewise.
14677 (grub_context_push_menu): Likewise.
14678 (grub_context_pop_menu): Likewise.
14679 [GRUB_UTIL] (grub_default_init): Likewise.
14680 [GRUB_UTIL] (grub_default_fini): Likewise.
14681 [GRUB_UTIL] (grub_timeout_init): Likewise.
14682 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14684 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14685 commands/timeout.c and normal/context.c.
14686 (pkgdata_MODULES): Added default.mod and timeout.mod.
14687 (normal_mod_SOURCES): Added normal/context.c.
14688 (default_mod_SOURCES): New variable.
14689 (default_mod_CFLAGS): Likewise.
14690 (timeout_mod_SOURCES): Likewise.
14691 (timeout_mod_CFLAGS): Likewise.
14692 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14694 (pkgdata_MODULES): Added default.mod and timeout.mod.
14695 (normal_mod_SOURCES): Added normal/context.c.
14696 (default_mod_SOURCES): New variable.
14697 (default_mod_CFLAGS): Likewise.
14698 (timeout_mod_SOURCES): Likewise.
14699 (timeout_mod_CFLAGS): Likewise.
14701 * Makefile.in (all-local): Added $(MKFILES).
14703 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14705 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14706 (grub_emu_SOURCES): Likewise.
14707 (pkgdata_MODULES): Add `sun.mod'.
14708 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14709 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14711 (pkgdata_MODULES): Add `sun.mod'.
14712 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14713 * include/grub/partition.h (grub_sun_partition_map_init): New
14715 (grub_sun_partition_map_fini): Likewise.
14716 * partmap/sun.c: New file.
14717 * util/grub-emu.c (main): Initialize and de-initialize the sun
14718 partitionmap support.
14720 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14722 This implements an Emacs-like menu entry editor.
14724 * normal/menu_entry.c: New file.
14726 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14727 characters to ASCII.
14728 (saved_char): New variable.
14729 (grub_ncurses_checkkey): Rewritten completely.
14730 (grub_ncurses_getkey): Likewise.
14731 (grub_ncurses_init): Call raw instead of cbreak.
14733 * normal/menu.c (print_entry): Do not put a space.
14734 (init_page): Renamed to ...
14735 (grub_menu_init_page): ... this. All callers changed.
14736 (edit_menu_entry): Removed.
14737 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14739 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14741 * kern/misc.c (grub_vprintf): Call grub_refresh.
14743 * normal/menu.c (DISP_LEFT): Renamed to ...
14744 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14745 * normal/menu.c (DISP_UP): Renamed to ...
14746 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14747 * normal/menu.c (DISP_RIGHT): Renamed to ...
14748 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14749 * normal/menu.c (DISP_DOWN): Renamed to ...
14750 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14751 * normal/menu.c (DISP_HLINE): Renamed to ...
14752 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14753 * normal/menu.c (DISP_VLINE): Renamed to ...
14754 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14755 * normal/menu.c (DISP_UL): Renamed to ...
14756 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14757 * normal/menu.c (DISP_UR): Renamed to ...
14758 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14759 * normal/menu.c (DISP_LL): Renamed to ...
14760 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14761 * normal/menu.c (DISP_LR): Renamed to ...
14762 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14763 * normal/menu.c (TERM_WIDTH): Renamed to ...
14764 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14765 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14766 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14767 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14768 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14769 * normal/menu.c (TERM_MARGIN): Renamed to ...
14770 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14771 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14772 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14773 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14774 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14775 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14776 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14777 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14778 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14779 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14780 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14781 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14782 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14783 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14784 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14785 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14786 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14787 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14788 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14789 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14790 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14791 All callers changed.
14793 * include/grub/normal.h: New prototype.
14795 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14796 normal/menu_entry.c.
14797 (normal_mod_SOURCES): Likewise.
14798 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14799 (normal_mod_SOURCES): Likewise.
14801 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14803 * include/grub/normal.h (grub_halt_init): New prototype.
14804 (grub_halt_fini): Likewise.
14805 (grub_reboot_init): Likewise.
14806 (grub_reboot_fini): Likewise.
14808 * util/grub-emu.c: Include signal.h.
14809 (main_env): New global variable.
14810 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14812 (grub_machine_fini): New function.
14813 (main): Call grub_halt_init and grub_reboot_init before
14814 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14815 Call setjmp with MAIN_ENV to go back afterwards.
14816 Call grub_machine_fini right before return.
14818 * include/grub/util/misc.h: Include setjmp.h.
14819 (main_env): New prototype.
14821 * include/grub/kernel.h (grub_machine_fini): New prototype.
14822 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14823 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14825 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14826 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14827 * term/i386/pc/console.c (grub_console_fini): Likewise.
14829 * util/i386/pc/misc.c: New file.
14831 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14832 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14833 commands/i386/pc/reboot.c.
14835 2005-02-14 Guillem Jover <guillem@hadrons.org>
14837 * include/grub/dl.h (grub_dl_check_header): New prototype.
14838 (grub_arch_dl_check_header): Change return type to grub_err_t,
14839 remove size parameter and export function. Update all callers.
14840 * kern/dl.c (grub_dl_check_header): New function.
14841 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14842 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14843 are inside the core.
14844 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14845 independent ELF header checks.
14846 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14847 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14848 `grub_dl_check_header' instead of explicit checks. Check for the
14850 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14851 `grub_dl_check_header' instead of explicit checks. Remove arch
14852 specific ELF header checks.
14854 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14857 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14859 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14860 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14862 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14864 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14865 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14866 (part_map_iterate): Clear `grub_errno' and return 0 if
14867 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14868 * partmap/amiga.c (amiga_partition_map_iterate): Return
14869 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14870 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14872 2005-02-01 Guillem Jover <guillem@hadrons.org>
14874 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14877 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14879 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14881 (grub_rescue_cmd_linux): New prototype.
14882 (grub_rescue_cmd_initrd): Likewise.
14883 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14885 (grub_linux_release_mem): Release the memory for the initrd.
14886 (grub_load_linux): Renamed from this...
14887 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14888 Changed `entry' not to be static. Loop over memory regions to
14889 find another one when the default fails.
14890 (grub_rescue_cmd_initrd): New function.
14891 (grub_linux_init): Remove function.
14892 (grub_linux_fini): Likewise.
14893 (GRUB_MOD_INIT): Register `initrd'.
14894 (GRUB_MOD_FINI): Unregister `initrd'.
14895 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14897 (grub_linux_normal_fini): Likewise.
14898 (GRUB_MOD_INIT): Register `initrd'.
14899 (GRUB_MOD_FINI): Unregister `initrd'.
14901 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14903 * commands/help.c: New file.
14904 * normal/arg.c (show_help): Renamed to...
14905 (grub_arg_show_help): ... this.
14906 * commands/i386/pc/halt.c: New file.
14907 * commands/i386/pc/reboot.c: Likewise.
14908 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14909 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14910 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14911 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14915 (pkgdata_MODULES): Add `help.mod'.
14916 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14917 * grub/i386/pc/init.h (grub_reboot): New prototype.
14918 (grub_halt): Likewise.
14919 * include/grub/normal.h (grub_arg_show_help): New prototype.
14920 (grub_help_init): Likewise.
14921 (grub_help_fini): Likewise.
14922 * util/grub-emu.c (main): Initialize and deinitialize the help
14925 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14927 * normal/command.c (grub_command_init): Fixed the description of
14928 the `set' and `unset' commands.
14930 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14932 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14934 * commands/ieee1275/halt.c: New file.
14935 * commands/ieee1275/reboot.c: Likewise.
14936 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14937 `__attribute__ ((unused))'. Some GCS related fixed.
14938 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14939 (grub_suspend_fini): Likewise.
14940 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14942 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14943 (halt_mod_CFLAGS): New variables.
14944 * include/grub/powerpc/ieee1275/ieee1275.h
14945 (grub_ieee1275_interpret): New prototype.
14947 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14949 * include/grub/misc.h (memmove): New prototype.
14950 (memcpy): Likewise.
14952 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14954 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14955 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14957 2005-01-22 Marco Gerards <metgerards@student.han.nl>
14959 * kern/misc.c (grub_strndup): Function rewritten.
14961 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14963 * normal/menu.c (TERM_WIDTH): Macro redefined.
14964 (TERM_TOP_BORDER_Y): Likewise.
14965 (draw_border): Replaced while-loop by a for-loop. Make the number
14966 of lines consistent with the number of lines displayed in
14967 print_entries. Added a margin below the rectangle.
14968 (print_entry): Make the entry fit in the rectangle.
14969 (print_entries): Display the scroll arrows next to the right
14972 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14974 * fs/minix.c (grub_minix_find_file): Reserve more space for
14975 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14976 `grub_strncpy' to copy `path' into it.
14978 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14980 Add the loopback device, a device via which files can be accessed
14983 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14984 (pkgdata_MODULES): Add loopback.mod.
14985 (loopback_mod_SOURCES): New variable.
14986 (loopback_mod_CFLAGS): Likewise.
14987 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14989 (pkgdata_MODULES): Add loopback.mod.
14990 (loopback_mod_SOURCES): New variable.
14991 (loopback_mod_CFLAGS): Likewise.
14992 * disk/loopback.c: new file.
14993 * include/grub/normal.h (grub_loop_init): New prototype.
14994 (grub_loop_fini): New prototype.
14995 * util/grub-emu.c (main): Initialize and de-initialize loopback
14997 * include/grub/disk.h (grub_disk_dev_id): Add
14998 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15000 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
15002 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15004 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15005 (suspend_mod_SOURCES): New variable.
15006 (suspend_mod_CFLAGS): Likewise.
15007 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15009 * commands/ieee1275/suspend.c: New file.
15011 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15013 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15014 ((unused))' to `__attribute__ ((used))'.
15015 (GRUB_MOD_FINI): Likewise.
15016 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15017 * genmk.rb (PModule): Assign space to common symbols when linking
15020 2005-01-20 Marco Gerards <metgerards@student.han.nl>
15022 * include/grub/mm.h (grub_mm_init_region): Change the type of the
15023 `unsigned' arguments to `grub_size_t'.
15024 (grub_malloc): Likewise.
15025 (grub_realloc): Likewise.
15026 (grub_memalign): Likewise.
15027 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15028 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15029 * util/misc.c (grub_malloc): Likewise.
15030 (grub_realloc): Likewise.
15031 * kern/mm.c (get_header_from_pointer): Change the casts to
15032 `unsigned' into a cast to `grub_size_t'.
15034 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15035 point to `currnode' when `currnode' is changed.
15037 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
15038 Schottelius <nico-linux@schottelius.org>.
15040 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
15042 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15043 (note_path): Remove variable.
15044 (GRUB_IEEE1275_NOTE_NAME): New macro.
15045 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15046 (grub_ieee1275_note_hdr): New structure.
15047 (grub_ieee1275_note_desc): Likewise.
15048 (grub_ieee1275_note): Likewise.
15049 (load_note): Remove `dir' argument. All callers updated. Remove
15050 `note_img' and `path'. Do not load a file from `note_path'.
15051 Initialize a struct grub_ieee1275_note and write that to `out'.
15052 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15054 2005-01-05 Marco Gerards <metgerards@student.han.nl>
15056 * util/misc.c (grub_util_read_image): Revert last change. It
15057 called `grub_util_read_at', which seeks from the beginning of the
15060 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
15062 * TODO: Add note about endianness in grub-mkimage.
15063 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15065 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15066 (grub_mkimage_SOURCES): New target.
15067 * include/grub/kernel.h (grub_start_addr): Remove variable.
15068 (grub_end_addr): Likewise.
15069 (grub_total_module_size): Likewise.
15070 (grub_kernel_image_size): Likewise.
15071 (GRUB_MODULE_MAGIC): New constant.
15072 (grub_module_info): New structure.
15073 (grub_arch_modules_addr): New prototype.
15074 (grub_get_end_addr): Remove prototype.
15075 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15076 * include/grub/powerpc/ieee1275/kernel.h: New file.
15077 * include/grub/util/misc.h (grub_util_get_fp_size): New
15079 (grub_util_read_at): Likewise.
15080 (grub_util_write_image_at): Likewise.
15081 * kern/main.c (grub_get_end_addr): Remove function.
15082 (grub_load_modules): Call grub_arch_modules_addr instead of using
15083 grub_end_addr. Look for a grub_module_info struct in memory. Use
15084 the grub_module_info fields instead of calling grub_get_end_addr
15085 as loop conditions. Move grub_add_unused_region code here.
15086 (grub_add_unused_region): Remove function.
15087 * kern/i386/pc/init.c: Include grub/cache.h.
15088 (grub_machine_init): Remove call to grub_get_end_addr. Remove
15089 one call to add_mem_region.
15090 (grub_arch_modules_addr): New function.
15091 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15092 (grub_total_module_size): Likewise.
15093 Include grub/machine/kernel.h.
15094 (grub_arch_modules_addr): New function.
15095 * util/grub-emu.c (grub_end_addr): Remove variable.
15096 (grub_total_module_size): Likewise.
15097 (grub_arch_modules_addr): New function.
15098 * util/misc.c: Include unistd.h.
15099 (grub_util_get_fp_size): New function.
15100 (grub_util_read_at): Likewise.
15101 (grub_util_write_image_at): Likewise.
15102 (grub_util_read_image): Call grub_util_read_at.
15103 (grub_util_write_image): Call grub_util_write_image_at.
15104 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15105 additional memory in kernel_img for a struct grub_module_info.
15106 Fill in that grub_module_info.
15107 * util/powerpc/ieee1275/grub-mkimage.c: New file.
15109 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15111 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15113 * include/grub/powerpc/ieee1275/ieee1275.h
15114 (grub_ieee1275_milliseconds): New prototype.
15115 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15117 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15118 grub_ieee1275_milliseconds.
15120 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
15122 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15124 (find_options): New function.
15125 (cmain): Call find_options.
15126 * include/grub/powerpc/ieee1275/ieee1275.h
15127 (grub_ieee1275_realmode): New extern variable.
15128 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15129 grub_map if grub_ieee1275_realmode is false.
15131 2004-12-29 Marco Gerards <metgerards@student.han.nl>
15133 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15134 lines are inserted and make it work like readline. Reported by
15135 Vincent Pelletier <subdino2004@yahoo.fr>.
15137 2004-12-28 Marco Gerards <metgerards@student.han.nl>
15139 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15141 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15142 `kern/powerpc/cache.S'.
15144 2004-12-27 Marco Gerards <metgerards@student.han.nl>
15146 * genmk.rb: Handle the `Program' class in the main loop. Written
15147 by Johan Rydberg <jrydberg@gnu.org>.
15148 (Program): New class.
15149 (programs): New variable.
15150 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15151 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15152 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15153 (help_arch): Function removed.
15154 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15155 `powerpc/libgcc.h' and `loader.h'.
15156 (pkgdata_PROGRAMS): New variable.
15157 (sbin_UTILITIES): Variable removed.
15158 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15159 (grubof_SOURCES): Variable re-defined so it only includes the
15160 core functionality.
15161 (grubof_CFLAGS): Remove `-DGRUBOF'.
15162 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15163 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15164 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15165 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15166 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15167 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15168 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15169 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15170 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15171 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15172 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15173 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15174 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15175 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15176 (pc_mod_CFLAGS): New variables.
15177 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15178 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15179 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15180 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15182 * include/grub/i386/pc/init.h (grub_os_area_addr)
15183 (rub_os_area_size): ... to here.
15184 * include/grub/powerpc/ieee1275/ieee1275.h
15185 (grub_ieee1275_entry_fn): Export symbol.
15186 * include/grub/powerpc/ieee1275/init.h: New file.
15187 * include/grub/powerpc/libgcc.h: Likewise.
15188 * include/grub/cache.h: Likewise.
15189 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15190 <hollis@penguinppc.org>.
15191 * kern/dl.c: Include <grub/cache.h>.
15192 (grub_dl_flush_cache): New function.
15193 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15195 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15196 (grub_console_init): Removed prototypes.
15197 (grub_machine_init): Don't initialize the modules anymore.
15198 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15200 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15201 Macro undef removed.
15202 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15203 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15204 relocation `R_PPC_REL32'. Return an error when the relocation is
15206 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15207 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15208 * util/misc.c (grub_arch_sync_caches): Likewise.
15210 2004-12-19 Marco Gerards <metgerards@student.han.nl>
15212 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15213 `symlist.c', add `grubof_symlist.c'.
15214 (symlist.c): Variable removed.
15215 (grubof_HEADERS): Variable added.
15216 (grubof_symlist.c): New target.
15217 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15218 `kernel_img_HEADERS'.
15219 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15220 * kern/powerpc/dl.c: New file.
15221 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15223 (grub_arch_dl_relocate_symbols): Likewise.
15224 (grub_register_exported_symbols): Likewise.
15226 2004-12-13 Marco Gerards <metgerards@student.han.nl>
15228 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15229 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15230 to fail instead. Reported by Vincent Pelletier
15231 <subdino2004@yahoo.fr>.
15233 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15234 it is not allocated. Reported by Vincent Pelletier
15235 <subdino2004@yahoo.fr>.
15237 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15238 output so the output looks better.
15240 2004-12-04 Marco Gerards <metgerards@student.han.nl>
15242 Modulize the partition map support and add support for the amiga
15245 * commands/ls.c: Include <grub/partition.h> instead of
15246 <grub/machine/partition.h>.
15247 * kern/disk.c: Likewise.
15248 * kern/rescue.c: Likewise.
15249 * loader/i386/pc/chainloader.c: Likewise.
15250 * normal/cmdline.c: Likewise.
15251 * kern/powerpc/ieee1275/init.c: Likewise.
15252 (grub_machine_init): Call `grub_pc_partition_map_init',
15253 `grub_amiga_partition_map_init' and
15254 `grub_apple_partition_map_init'.
15255 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15256 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15257 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15258 `partition.h' and `pc_partition.h'.
15259 (grub_setup_SOURCES): Remove
15260 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15261 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15262 (grub_emu_SOURCES): Likewise.
15263 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15264 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15265 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15266 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15267 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15268 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15269 (grubof_SOURCES): Likewise.
15270 * disk/i386/pc/partition.c: File removed.
15271 * disk/powerpc/ieee1275/partition.c: Likewise.
15272 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15273 * include/grub/i386/pc/partition.h: Likewise.
15274 * kern/partition.c: New file.
15275 * partmap/amiga.c: Likewise.
15276 * partmap/apple.c: Likewise.
15277 * partmap/pc.c: Likewise.
15278 * include/grub/partition.h: Likewise..
15279 * include/grub/pc_partition.h: Likewise.
15280 * util/grub-emu.c: Include <grub/partition.h> instead of
15281 <grub/machine/partition.h>.
15282 (main): Call `grub_pc_partition_map_init',
15283 `grub_amiga_partition_map_init' and
15284 `grub_apple_partition_map_init' and deinitialize afterwards.
15285 * util/i386/pc/biosdisk.c: Include `#include
15286 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15287 `<grub/machine/partition.h>'.
15288 * util/i386/pc/grub-setup.c: Likewise.
15289 * util/i386/pc/biosdisk.c: Likewise.
15290 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15291 partition information in case of a PC partition.
15292 * util/i386/pc/grub-setup.c: Include `#include
15293 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15294 `<grub/machine/partition.h>'.
15295 (setup): Only access the PC specific partition information in case
15298 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15300 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15301 (grub_longjmp): Likewise.
15302 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15304 * normal/powerpc/setjmp.S: New file.
15305 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15306 `normal/powerpc/setjmp.S'.
15307 (grubof_CFLAGS): Add `-DGRUBOF'.
15308 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15309 [GRUB_UTIL && !GRUBOF].
15311 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15313 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15314 property named `name'. Correctly handle the error returned by
15315 `grub_ieee1275_finddevice' if a device can not be opened.
15317 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15319 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15320 `actual' for negativity.
15321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15324 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15326 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15327 (PAGE_OFFSET): New macro.
15328 (CRTC_ADDR_PORT): Likewise.
15329 (CRTC_DATA_PORT): Likewise.
15330 (START_ADDR_HIGH_REGISTER): Likewise.
15331 (START_ADDR_LOW_REGISTER): Likewise.
15332 (GRAPHICS_ADDR_PORT): Likewise.
15333 (GRAPHICS_DATA_PORT): Likewise.
15334 (READ_MAP_REGISTER): Likewise.
15335 (INPUT_STATUS1_REGISTER): Likewise.
15336 (INPUT_STATUS1_VERTR_BIT): Likewise.
15337 (page): New variable.
15338 (wait_vretrace): New function.
15339 (set_read_map): Likewise.
15340 (set_start_address): Likewise.
15341 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15343 (check_vga_mem): Take the page into account.
15344 (write_char): Likewise.
15345 (write_cursor): Likewise.
15346 (scroll_up): Likewise. Copy the page to the page that is not
15347 shown and switch between both pages.
15348 (grub_vga_putchar): Fix off by one error.
15349 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15352 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15354 Add support for iso9660 (including rockridge).
15356 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15357 (iso9660_mod_SOURCES): New variable.
15358 (iso9660_mod_CFLAGS): Likewise.
15359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15360 * include/grub/fs.h (grub_iso9660_init): New prototype.
15361 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15362 * fs/iso9660.c: New file.
15364 * include/grub/misc.h (grub_strncat): New prototype.
15365 * kern/misc.c (grub_strncat): New function.
15367 * fs/hfs.c (grub_hfs_mount): Translate the error
15368 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15369 * fs/jfs.c (grub_jfs_mount): Likewise.
15370 * fs/ufs.c (grub_ufs_mount): Likewise.
15372 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15374 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15375 which initialized BAT registers.
15376 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15377 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15379 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15380 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15382 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15383 (grub_mapclaim): Likewise.
15384 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15385 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15388 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15390 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15391 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15392 -ffreestanding and -msoft-float.
15394 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15396 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15397 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15398 set in grub_ieee1275_flags.
15400 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15402 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15404 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15405 grub_console_init first.
15406 Change the memory range used for grub_ieee1275_claim and
15407 grub_mm_init_region.
15408 Print an error message if the claim fails.
15409 Include <grub/misc.h>.
15411 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15413 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15414 Call grub_children_iterate for device nodes of type `scsi',
15416 (grub_ofdisk_open): Remove manual device alias resolution.
15417 Fix memory leak when device cannot be opened.
15418 * include/grub/powerpc/ieee1275/ieee1275.h
15419 (grub_children_iterate): New prototype.
15420 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15422 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15423 Return -1 if args.size was -1.
15425 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15427 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15428 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15429 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15430 Open Firmware's memory for it; claim memory from _start to _end.
15431 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15432 (_end): New extern.
15433 (_start): Zero BSS from __bss_start to _end.
15434 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15436 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15438 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15440 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15441 -1 if args.base was -1.
15443 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15445 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15446 escape sequence instead of a literal ^L. Also call
15447 grub_ofconsole_gotoxy.
15449 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15451 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15452 void * arguments to grub_addr_t. All callers updated. Also make
15453 the `result' argument optional.
15454 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15455 All callers updated.
15457 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15459 * commands/ls.c (grub_ls_list_files): Use the string following the
15460 initial ')', if present, as the filesystem path.
15461 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15463 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15465 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15467 Make the source code of the menu interface more readable.
15469 * normal/menu.c: Include grub/mm.h.
15470 (TERM_WIDTH): New macro.
15471 (TERM_HEIGHT): Likewise.
15472 (TERM_INFO_HEIGHT): Likewise.
15473 (TERM_MARGIN): Likewise.
15474 (TERM_SCROLL_WIDTH): Likewise.
15475 (TERM_TOP_BORDER_Y): Likewise.
15476 (TERM_LEFT_BORDER_X): Likewise.
15477 (TERM_BORDER_WIDTH): Likewise.
15478 (TERM_MESSAGE_HEIGHT): Likewise.
15479 (TERM_BORDER_HEIGHT): Likewise.
15480 (TERM_NUM_ENTRIES): Likewise.
15481 (TERM_FIRST_ENTRY_Y): Likewise.
15482 (TERM_ENTRY_WIDTH): Likewise.
15483 (TERM_CURSOR_X): Likewise.
15484 (draw_border): Use macros instead of magic numbers.
15485 (print_entry): Likewise.
15486 (print_entries): Likewise.
15487 (run_menu): Likewise. Also, handle the key 'e'.
15488 (run_menu_entry): Ignore empty command lines.
15489 (print_message): Added a new argument EDIT. If EDIT is true,
15490 print a different message.
15491 (init_page): Likewise.
15492 (edit_menu_entry): New function. Not implemented yet.
15494 2004-09-17 Marco Gerards <metgerards@student.han.nl>
15496 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15497 can be loaded from normal mode.
15499 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15501 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15502 (multiboot_mod_CFLAGS): New variables.
15503 * loader/i386/pc/linux_normal.c: New file.
15504 * loader/i386/pc/multiboot_normal.c: Likewise.
15506 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15507 attribute `unused'.
15509 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15510 `fdiro' to read the mode information from instead of `diro'.
15512 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15513 looking up a symlink.
15515 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15517 * normal/command.c (grub_command_execute): Don't parse the
15518 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15519 flags of the command.
15521 * normal/menu.c (grub_menu_run): Fix typo.
15523 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15525 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15527 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15528 `y + 1' instead of `y - 1'.
15530 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15532 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15534 From Hollis Blanchard <hollis@penguinppc.org>:
15535 * kern/misc.c (memmove): New alias for grub_memmove.
15536 (memcmp): New alias for grub_memcmp.
15537 (memset): New alias for grub_memset.
15538 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15539 Change "int handle" to "grub_ieee1275_phandle_t handle".
15540 * include/grub/powerpc/ieee1275/ieee1275.h
15541 (grub_ieee1275_get_property): Likewise.
15543 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15545 Added normal mode command `chainloader' as module chain.mod, which
15546 depends on normal.mod and _chain.mod.
15548 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15549 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15550 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15552 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15553 but arguments parsing moved to ...
15554 (grub_chainloader_cmd): ... here. New function.
15555 * include/grub/i386/pc/chainloader.h: New file.
15556 * loader/i386/pc/chainloader_normal.c: Likewise.
15558 2004-09-11 Marco Gerards <metgerards@student.han.nl>
15560 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15561 (grub_mkimage_LDFLAGS): Likewise.
15562 (grub_emu_SOURCES): Likewise.
15563 (kernel_img_HEADERS): Added fshelp.h.
15564 * fs/ext2.c: Include <grub/fshelp.h>.
15565 (FILETYPE_REG): New macro.
15566 (FILETYPE_INO_REG): Likewise.
15567 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15569 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15571 (grub_fshelp_node): New struct.
15572 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15574 (grub_ext2_get_file_block): Removed function.
15575 (grub_ext2_read_block): New function.
15576 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15577 This function was written.
15578 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15579 (grub_ext2_find_file): Removed function.
15580 (grub_ext2_read_symlink): New function.
15581 (grub_ext2_iterate_dir): Likewise.
15582 (grub_ext2_open): Rewritten.
15583 (grub_ext2_dir): Rewritten.
15584 * include/grub/fshelp.h: New file.
15585 * fs/fshelp.c: Likewise.
15587 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15589 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15590 (print_message): Add a missing newline.
15591 (run_menu): Added timeout support.
15592 (run_menu_entry): New local function.
15593 (grub_menu_run): Added support for booting.
15595 * kern/loader.c (grub_loader_is_loaded): New function.
15597 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15598 (grub_get_rtc): Exported.
15600 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15601 (grub_get_rtc): Exported.
15603 * include/grub/normal.h (struct grub_command_list): Remove
15604 constant from the member `command'.
15606 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15608 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15610 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15612 2004-08-28 Marco Gerards <metgerards@student.han.nl>
15614 Add support for the JFS filesystem.
15616 * fs/jfs.c: New file.
15617 * include/grub/fs.h (grub_jfs_init): New prototype.
15618 (grub_jfs_fini): New prototype.
15619 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15620 (grub_emu_SOURCES): Likewise.
15621 (pkgdata_MODULES): Add jfs.mod.
15622 (jfs_mod_SOURCES): New variable.
15623 (jfs_mod_CFLAGS): Likewise.
15624 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15625 (grubof_SOURCES): Likewise.
15626 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15628 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15629 endian to the host endian.
15630 (grub_fat_utf16_to_utf8): Move function from there...
15631 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
15632 the endianness of the source string anymore.
15633 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15635 2004-08-24 Marco Gerards <metgerards@student.han.nl>
15637 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15638 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15639 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15640 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15642 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15643 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15644 for `node_found' and `it_dir'.
15645 (grub_hfs_dir): Add prototype for `dir_hook'.
15647 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15648 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15649 and `indir32' to silence a gcc warning.
15651 * include/grub/fs.h (grub_hfs_init): New prototype.
15652 (grub_hfs_fini): Likewise.
15655 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15657 Each disk device has its own id now. This is useful to make use
15658 of multiple disk devices.
15660 * include/grub/disk.h (grub_disk_dev_id): New enum.
15661 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15662 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15664 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15665 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15667 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15668 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15670 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15671 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15673 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15674 "id" which is used by the cache manager.
15676 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15679 2004-08-18 Marco Gerards <metgerards@student.han.nl>
15681 * fs/hfs.c: New file.
15682 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15683 (grub_emu_SOURCES): Likewise.
15684 (pkgdata_MODULES): Add hfs.mod.
15685 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15686 (grubof_SOURCES): Likewise.
15687 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15689 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15690 * kern/misc.c (grub_strncasecmp): Add function.
15692 2004-08-14 Marco Gerards <metgerards@student.han.nl>
15694 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15697 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15698 (grub_ext2_dir): In case the directory entry type is unknown, read
15701 2004-08-02 Peter Bruin <pjbruin@dds.nl>
15703 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15704 grub_load_linux instead of grub_rescue_cmd_linux as second
15705 argument of grub_rescue_register_command.
15707 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15709 2004-07-27 Marco Gerards <metgerards@student.han.nl>
15711 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15713 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15714 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15715 `loader/powerpc/ieee1275/linux.c',
15716 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15717 * include/grub/powerpc/ieee1275/ieee1275.h
15718 (grub_ieee1275_release): New prototype.
15719 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15720 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15721 normal, boot, linux and linux_normal.
15722 * loader/powerpc/ieee1275/linux.c: New file.
15723 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15725 2004-07-12 Marco Gerards <metgerards@student.han.nl>
15727 * normal/arg.c (grub_arg_parse): Correct error handling after
15728 reallocating the argumentlist (check if `argl' is not null instead
15729 of checking if `args' is not null).
15730 * kern/mm.c (grub_realloc): Return the same pointer when using the
15731 same region, instead of returning the header address.
15733 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15735 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15736 one block instead of two when looking for the initial partition.
15737 (grub_partition_probe): Initialize the local variable `p' with 0.
15738 Use base 10 for the grub_strtoul call.
15739 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15740 need for one local variable.
15741 (grub_strtoul): Don't add the new value to `num', instead of that
15744 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15746 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15747 (pxeboot_img_SOURCES): New variable.
15748 (pxeboot_img_ASFLAGS): Likewise.
15749 (pxeboot_img_LDFLAGS): Likewise.
15750 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15751 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15752 <lode_leroy@hotmail.com>.
15754 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15756 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15757 there was no input.
15759 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15761 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15762 the history buffer logic.
15764 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15766 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15767 (FILETYPE_INO_SYMLINK): New macros.
15768 (grub_ext2_find_file): Check if the node is a directory using the
15769 inode stat information instead of using the filetype in the
15770 dirent. Exclude the first character of an absolute symlink.
15771 (grub_ext2_dir): Mask out the filetype part of the mode member of
15774 2004-05-24 Marco Gerards <metgerards@student.han.nl>
15776 Add support for UFS version 1 and 2. Add support for the minix
15777 filesystem version 1 and 2, both the variants with 14 and 30 long
15780 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15782 (grub_emu_SOURCES): Likewise.
15783 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15784 (ufs_mod_SOURCES): New variable.
15785 (ufs_mod_CFLAGS): Likewise.
15786 (minix_mod_SOURCES): Likewise.
15787 (minix_mod_CFLAGS): Likewise.
15788 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15790 (grubof_SOURCES): Likewise.
15791 * fs/ufs.c: New file.
15792 * fs/minix.c: New file.
15793 * include/grub/fs.h (grub_ufs_init): New prototype.
15794 (grub_ufs_fini): Likewise.
15795 (grub_minix_init): Likewise.
15796 (grub_minix_fini): Likewise.
15797 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15800 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15802 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15803 commands/ls.c, commands/terminal.c, commands/boot.c,
15804 commands/cmp.c and commands/cat.c.
15805 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15807 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15810 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15812 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15813 and grub_, respectively. Because the conversion is trivial and
15814 mechanical, I omit the details here. Please refer to the CVS
15815 if you need more information.
15817 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15819 * include/pupa: Renamed to ...
15820 * include/grub: ... this.
15821 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15822 * util/i386/pc/grub-mkimage.c: ... this.
15823 * util/i386/pc/pupa-setup.c: Renamed to ...
15824 * util/i386/pc/grub-setup.c: ... this.
15825 * util/pupa-emu.c: Renamed to ...
15826 * util/grub-emu.c: ... this.
15828 2004-03-29 Marco Gerards <metgerards@student.han.nl>
15830 Add support for the newworld apple macintosh (PPC). This has been
15831 tested on the powerbook 2000 only. It only adds support for
15832 generic ieee1275 functions, console and disk support. This should
15833 be easy to port to other architectures with support for Open
15836 * configure.ac: Accept the powerpc as host_cpu. In the case of
15837 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15838 specific tests are only executed while building for the i386.
15839 Inverse test for crosscompile.
15840 * genmk.rb (Utility): Allow assembler files.
15841 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15842 * conf/powerpc-ieee1275.rmk: New file.
15843 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15844 * disk/powerpc/ieee1275/partition.c: Likewise.
15845 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15846 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15847 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15848 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15849 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15850 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15851 * include/pupa/powerpc/ieee1275/loader.h
15852 * include/pupa/powerpc/setjmp.h: Likewise.
15853 * include/pupa/powerpc/types.h: Likewise.
15854 * kern/powerpc/ieee1275/init.c: Likewise.
15855 * kern/powerpc/ieee1275/openfw.c: Likewise.
15856 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15858 These files were written by Johan Rydberg
15859 (jrydberg@night.trouble.net) and I only modified them slightly.
15861 * boot/powerpc/ieee1275/cmain.c: New file.
15862 * boot/powerpc/ieee1275/crt0.S: Likewise.
15863 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15864 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15866 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15868 * Makefile.in: Update copyright.
15869 * genmodsrc.sh: Likewise.
15870 * gensymlist.sh: Likewise.
15871 * term/i386/pc/vga.c: Indent correctly.
15873 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15874 bugreporting address.
15875 * util/i386/pc/pupa-setup.c (usage): Likewise,
15876 (main): Call pupa_ext2_init and pupa_ext2_fini.
15878 * fs/fat.c (log2): Renamed to ...
15879 (fat_log2): ... this.
15880 All callers changed.
15881 * kern/misc.c (memcpy): Alias to pupa_memmove.
15882 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15884 * util/console.c (pupa_ncurses_fini): Return 0.
15886 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15887 Move fail label here.
15888 [__GNU__]: Don't warn when using stat.
15889 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15890 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15891 long int. Use strtol instead of strtoul.
15893 2004-03-14 Marco Gerards <metgerards@student.han.nl>
15895 * commands/boot.c: New file.
15896 * commands/cat.c: Likewise.
15897 * commands/cmp.c: Likewise.
15898 * commands/ls.c: Likewise.
15899 * commands/terminal.c: Likewise.
15900 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15901 (pupa_register_command): Changed interface to match the new
15903 (pupa_command_execute): Changed (almost rewritten) so it uses
15904 pupa_split_command. Added support for setting variables using the
15906 (rescue_command): Changed to work with the new argument parser.
15907 (terminal_command): Moved from here to commands/terminal.c.
15908 (set_command): New function.
15909 (unset_command): New function.
15910 (insmod_command): New function.
15911 (rmmod_command): New function.
15912 (lsmod_command): New function.
15913 (pupa_command_init): Don't initialize the command terminal
15914 anymore. Initialize the commands set, unset, insmod, rmmod and
15916 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15917 (kernel_img_HEADERS): Add arg.h and env.h.
15918 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15919 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15920 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15922 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15924 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15925 (boot_mod_SOURCES): New variable.
15926 (terminal_mod_SOURCES): Likewise.
15927 (ls_mod_SOURCES): Likewise.
15928 (cmp_mod_SOURCES): Likewise.
15929 (cat_mod_SOURCES): Likewise.
15931 * normal/arg.c: New file.
15932 * kern/env.c: Likewise.
15933 * include/pupa/arg.h: Likewise.
15934 * include/pupa/env.h: Likewise.
15935 * font/manager.c (font_command): Changed to match argument parsing
15937 (PUPA_MOD_INIT): Likewise.
15938 * hello/hello.c (pupa_cmd_hello): Likewise.
15939 (PUPA_MOD_INIT): Likewise.
15940 * include/pupa/disk.h: Include <pupa/device.h>.
15941 (pupa_print_partinfo): New prototype.
15942 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15943 (pupa_dl_get_prefix): Likewise.
15944 * include/pupa/misc.h: Include <pupa/err.h>.
15945 (pupa_isgraph): New prototype.
15946 (pupa_isdigit): Likewise.
15947 (pupa_split_cmdline): Likewise.
15948 * include/pupa/normal.h: Include <pupa/arg.h>.
15949 (pupa_command): Changed the prototype of the member `func' to
15950 match the argument parsing interface. Added member `options'.
15951 (pupa_register_command): Updated to match function.
15952 (pupa_arg_parse): New prototype.
15953 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15954 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15955 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15956 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15957 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15958 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15959 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15960 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15961 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15962 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15963 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15964 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15965 * kern/disk.c: Include <pupa/file.h>.
15966 (pupa_print_partinfo): New function.
15967 * kern/dl.c: Include <pupa/env.h>.
15968 (pupa_dl_dir): Variable removed.
15969 (pupa_dl_load): Use the environment variable `prefix' instead of
15970 the variable pupa_dl_dir.
15971 (pupa_dl_set_prefix): Function removed.
15972 (pupa_dl_get_prefix): Likewise.
15973 * kern/i386/pc/init.c: Include <pupa/env.h>.
15974 (pupa_machine_init): Use the environment variable `prefix' instead of
15975 using pupa_dl_set_prefix to set the prefix.
15976 * kern/main.c: Include <pupa/env.h>.
15977 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15978 using pupa_dl_get_prefix to get the prefix.
15979 * kern/misc.c: Include <pupa/env.h>.
15980 (pupa_isdigit): New function.
15981 (pupa_isgraph): Likewise.
15982 (pupa_ftoa): Likewise.
15983 (pupa_vsprintf): Added support for printing values of the type
15984 `double'. Make it possible to format variable output when using
15985 formatting like `%1.2%f'.
15986 (pupa_split_cmdline): New function.
15987 * kern/rescue.c: Include <pupa/env.h>.
15988 (next_word): Removed function.
15989 (pupa_rescue_cmd_prefix): Likewise.
15990 (pupa_rescue_cmd_set): New function.
15991 (pupa_rescue_cmd_unset): New function.
15992 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15993 split the command line instead of splitting it here. Added
15994 support for setting variables using the syntax `foo=bar'. Don't
15995 initialize the prefix command anymore. Initialized the set and
15997 * normal/cmdline.c: Include <pupa/env.h>.
15998 (pupa_tab_complete): Added prototypes for print_simple_completion,
15999 print_partition_completion, add_completion, iterate_commands,
16000 iterate_dev, iterate_part and iterate_dir. Moved code to print
16001 partition information from here to kern/disk.c.
16002 (pupa_cmdline_run): Don't check if the function exists anymore.
16003 * normal/main.c: Include <pupa/env.h>.
16004 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16005 instead of using pupa_dl_get_prefix to get the prefix.
16006 * term/i386/pc/vga.c: Include <pupa/arg.h>.
16007 (check_vga_mem): Cast pointers to `void *' to silence a gcc
16009 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16010 (pupa_vga_setcolor): Declare unused variables with `__attribute__
16011 ((unused))' to silence a gcc warning.
16012 (pupa_vga_setcolor): Likewise.
16013 (debug_command): Changed to match argument parsing
16015 * util/pupa-emu.c: Include <pupa/env.h>.
16016 (options): Added 0's for unused fields to silence a gcc warning.
16018 (main): Use the environment variable `prefix' instead of using
16019 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
16020 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
16023 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16024 * util/misc.c: Include <malloc.h>.
16025 (pupa_malloc): Rewritten so errors are correctly reported.
16026 (pupa_realloc): Likewise.
16027 (pupa_memalign): Likewise.
16028 (pupa_mm_init_region): Declare unused variables with
16029 `__attribute__ ((unused))' to silence a gcc warning.
16030 * normal/i386/setjmp.S: Remove tab at the end of the file to
16031 silence a gcc warning.
16032 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16033 variables with `__attribute__ ((unused))' to silence a gcc
16035 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16036 local variable i unsigned to silence a gcc warning.
16038 * kern/term.c: Include <pupa/misc.h>.
16039 (pupa_more_lines): New variable.
16040 (pupa_more): Likewise.
16041 (pupa_putcode): When the pager is active pause at the end of every
16043 (pupa_set_more): New function.
16044 * include/pupa/term.h (pupa_set_more): New prototype.
16047 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
16049 Now this project is GRUB 2 rather than PUPA. The location of
16050 the CVS repository was moved to GRUB's.
16052 * configure.ac: Use bug-grub as the reporting address.
16053 Use GRUB instead of PUPA.
16054 Change the version number to 1.90.
16056 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
16058 * genkernsyms.sh: Updated copyright information.
16059 * genmk.rb: Likewise.
16060 * genmodsrc.sh: Likewise.
16061 * gensymlist.sh: Likewise.
16062 * boot/i386/pc/boot.S: Likewise.
16063 * boot/i386/pc/diskboot.S: Likewise.
16064 * disk/i386/pc/biosdisk.c: Likewise.
16065 * disk/i386/pc/partition.c: Likewise.
16066 * font/manager.c: Likewise.
16067 * fs/ext2.c: Likewise.
16068 * fs/fat.c: Likewise.
16069 * include/pupa/boot.h: Likewise.
16070 * include/pupa/device.h: Likewise.
16071 * include/pupa/disk.h: Likewise.
16072 * include/pupa/dl.h: Likewise.
16073 * include/pupa/elf.h: Likewise.
16074 * include/pupa/err.h: Likewise.
16075 * include/pupa/file.h: Likewise.
16076 * include/pupa/font.h: Likewise.
16077 * include/pupa/fs.h: Likewise.
16078 * include/pupa/kernel.h: Likewise.
16079 * include/pupa/loader.h: Likewise.
16080 * include/pupa/misc.h: Likewise.
16081 * include/pupa/mm.h: Likewise.
16082 * include/pupa/net.h: Likewise.
16083 * include/pupa/normal.h: Likewise.
16084 * include/pupa/rescue.h: Likewise.
16085 * include/pupa/setjmp.h: Likewise.
16086 * include/pupa/symbol.h: Likewise.
16087 * include/pupa/term.h: Likewise.
16088 * include/pupa/types.h: Likewise.
16089 * include/pupa/i386/setjmp.h: Likewise.
16090 * include/pupa/i386/types.h: Likewise.
16091 * include/pupa/i386/pc/biosdisk.h: Likewise.
16092 * include/pupa/i386/pc/boot.h: Likewise.
16093 * include/pupa/i386/pc/console.h: Likewise.
16094 * include/pupa/i386/pc/init.h: Likewise.
16095 * include/pupa/i386/pc/kernel.h: Likewise.
16096 * include/pupa/i386/pc/linux.h: Likewise.
16097 * include/pupa/i386/pc/loader.h: Likewise.
16098 * include/pupa/i386/pc/memory.h: Likewise.
16099 * include/pupa/i386/pc/multiboot.h: Likewise.
16100 * include/pupa/i386/pc/partition.h: Likewise.
16101 * include/pupa/i386/pc/time.h: Likewise.
16102 * include/pupa/i386/pc/vga.h: Likewise.
16103 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16104 * include/pupa/util/getroot.h: Likewise.
16105 * include/pupa/util/misc.h: Likewise.
16106 * include/pupa/util/resolve.h: Likewise.
16107 * kern/device.c: Likewise.
16108 * kern/disk.c: Likewise.
16109 * kern/dl.c: Likewise.
16110 * kern/err.c: Likewise.
16111 * kern/file.c: Likewise.
16112 * kern/fs.c: Likewise.
16113 * kern/loader.c: Likewise.
16114 * kern/main.c: Likewise.
16115 * kern/misc.c: Likewise.
16116 * kern/mm.c: Likewise.
16117 * kern/rescue.c: Likewise.
16118 * kern/term.c: Likewise.
16119 * kern/i386/dl.c: Likewise.
16120 * kern/i386/pc/init.c: Likewise.
16121 * kern/i386/pc/lzo1x.S: Likewise.
16122 * kern/i386/pc/startup.S: Likewise.
16123 * loader/i386/pc/chainloader.c: Likewise.
16124 * loader/i386/pc/linux.c: Likewise.
16125 * loader/i386/pc/multiboot.c: Likewise.
16126 * normal/cmdline.c: Likewise.
16127 * normal/command.c: Likewise.
16128 * normal/main.c: Likewise.
16129 * normal/menu.c: Likewise.
16130 * normal/i386/setjmp.S: Likewise.
16131 * term/i386/pc/console.c: Likewise.
16132 * term/i386/pc/vga.c: Likewise.
16133 * util/console.c: Likewise.
16134 * util/genmoddep.c: Likewise.
16135 * util/misc.c: Likewise.
16136 * util/pupa-emu.c: Likewise.
16137 * util/resolve.c: Likewise.
16138 * util/unifont2pff.rb: Likewise.
16139 * util/i386/pc/biosdisk.c: Likewise.
16140 * util/i386/pc/getroot.c: Likewise.
16141 * util/i386/pc/pupa-mkimage.c: Likewise.
16142 * util/i386/pc/pupa-setup.c: Likewise.
16144 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
16146 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16147 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16148 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16149 reading and reset it after reading.
16150 (pupa_ext2_close): Return PUPA_ERR_NONE.
16152 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16154 (struct linux_kernel_header): Add kernel_version and
16156 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16157 pupa_file_read succeeds.
16158 (pupa_rescue_cmd_initrd): Implement.
16160 2003-12-03 Marco Gerards <metgerards@student.han.nl>
16162 * fs/ext2.c (pupa_ext2_label): New function.
16163 (pupa_ext2_fs): Added label.
16164 * fs/fat.c (pupa_fat_label): New function.
16165 (pupa_fat_fs): Added label.
16166 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16168 * kern/misc.c (pupa_strndup): New function.
16169 * include/pupa/misc.h (pupa_strndup): New prototype.
16171 * include/pupa/normal.h: Include <pupa/err.h>.
16172 (pupa_set_history): New prototype.
16173 (pupa_iterate_commands): New prototype.
16174 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16175 <pupa/disk.h>, <pupa/file.h>.
16176 (hist_size): New variable.
16177 (hist_lines): Likewise.
16178 (hist_end): Likewise.
16179 (hist_used): Likewise.
16180 (pupa_set_history): New function.
16181 (pupa_history_get): Likewise.
16182 (pupa_history_add): Likewise.
16183 (pupa_history_replace): Likewise.
16184 (pupa_tab_complete): Likewise.
16185 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16186 completion shows partitionnames while completing partitions, this
16187 feature was suggested by Jeff Bailey.
16188 * normal/command.c (pupa_iterate_commands): New function.
16189 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16190 (pupa_normal_init): Initialize history buffer.
16191 (PUPA_MOD_INIT): Likewise.
16192 (pupa_normal_fini): Free the history buffer.
16193 (PUPA_MOD_FINI): Likewise.
16195 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16198 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16199 * configure.ac [i386]: Check for regparam bug.
16200 (NESTED_FUNC_ATTR) [! i386]: Defined.
16202 2003-11-17 Marco Gerards <metgerards@student.han.nl>
16204 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16205 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16206 (pupa_emu_SOURCES): New variable.
16207 (pupa_emu_LDFLAGS): Likewise.
16208 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16209 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16210 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16211 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16212 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16213 (pupa_jmp_buf): New typedef.
16214 (pupa_setjmp) [PUPA_UTIL]: New macro.
16215 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16216 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16217 (pupa_refresh): New prototype.
16218 * include/pupa/util/getroot.h: New file.
16219 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16221 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16222 (pupa_rescue_cmd_cat): Likewise.
16223 (pupa_rescue_cmd_ls): Likewise.
16224 (pupa_rescue_cmd_testload): Likewise.
16225 (pupa_rescue_cmd_lsmod): Likewise.
16226 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16227 * normal/menu.c (run_menu): Likewise.
16228 * kern/term.c (pupa_cls): Likewise.
16229 (pupa_refresh): New function.
16230 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16231 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16232 * util/console.c: New file.
16234 * util/i386/pc/getroot.c: New file.
16235 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16236 (pupa_putchar): New function.
16237 (pupa_refresh): Likewise.
16238 (xgetcwd): Function moved to ...
16239 (strip_extra_slashes): Likewise.
16240 (get_prefix): Likewise.
16241 * util/i386/pc/getroot.c: ... here.
16242 (find_root_device): Function moved and renamed to...
16243 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16244 Changed all callers.
16245 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16247 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16248 Changed all callers.
16249 * util/misc.c (pupa_memalign): New function.
16250 (pupa_mm_init_region): Likewise.
16251 (pupa_register_exported_symbols): Likewise.
16252 (pupa_putchar): Function removed.
16253 * util/pupa-emu.c: New file.
16255 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16257 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16258 (_multiboot_mod_SOURCES): New variable.
16259 (_multiboot_mod_CFLAGS): Likewise.
16260 * loader/i386/pc/multiboot.c: New file.
16261 * include/pupa/i386/pc/multiboot.h: Likewise.
16262 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16263 (pupa_multiboot_real_boot): New function.
16264 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16265 (pupa_multiboot_real_boot): New prototype.
16266 (pupa_rescue_cmd_multiboot): Likewise
16267 (pupa_rescue_cmd_module): Likewise.
16269 * kern/loader.c (pupa_loader_set): Continue when
16270 pupa_loader_unload_func() fails.
16271 (pupa_loader_unset): New function.
16272 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16274 * kern/misc.c (pupa_stpcpy): New function.
16275 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16277 2003-11-12 Marco Gerards <metgerards@student.han.nl>
16279 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16280 for available extensions.
16282 * include/pupa/i386/pc/time.h: New file.
16283 * kern/disk.c: Include <pupa/machine/time.h>.
16284 (PUPA_CACHE_TIMEOUT): New macro.
16285 (pupa_last_time): New variable.
16286 (pupa_disk_open): Flush the cache when there was a timeout.
16287 (pupa_disk_close): Reset the timer.
16288 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16290 * util/misc.c: Include <sys/times.h>
16291 (pupa_get_rtc): New function.
16293 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16295 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16297 (pupa_ext2_get_file_block): Use blocks member.
16299 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16300 first block. Return -1 instead of pupa_errno on error.
16302 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16304 * README: In the pupa-mkimage example use _chain instead of chain
16305 and ext2 instead of fat.
16306 * TODO: Replace ext2fs with jfs as an example. Add an item for
16307 adding journal playback for ext2fs.
16308 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16309 (pkgdata_MODULES): Added ext2.mod.
16310 (ext2_mod_SOURCES): New variable.
16311 (ext2_mod_CFLAGS): Likewise.
16312 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16313 * include/pupa/misc.h (pupa_strncpy): New prototype.
16314 (pupa_strcat): Likewise.
16315 (pupa_strncmp): Likewise.
16316 * kern/misc.c (pupa_strcat): Enable function.
16317 (pupa_strncpy): New function.
16318 (pupa_strncmp): Likewise.
16319 * fs/ext2.c: New file.
16321 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16322 when the read failed before retrying.
16323 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16324 (_FILE_OFFSET_BITS): Likewise.
16325 * configure.ac: Added AC_SYS_LARGEFILE.
16327 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16329 * genmk.rb (PModule#rule): Make sure to get only symbol names
16330 from the output of nm.
16331 Reported by Robert Millan <zeratul2@wanadoo.es>.
16333 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16335 I forgot to check in these changes for a long time. This adds
16336 incomplete support for VGA console, and this is still very
16337 buggy. Also, a lot of consideration is required for I18N,
16338 UNICODE, and VGA font issues. Therefore, assume that this is
16339 such that "better than nothing".
16341 * font/manager.c: New file.
16342 * include/pupa/font.h: Likewise.
16343 * include/pupa/i386/pc/vga.h: Likewise.
16344 * term/i386/pc/vga.c: Likewise.
16345 * util/unifont2pff.rb: Likewise.
16347 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16348 (pkgdata_MODULES): Added vga.mod and font.mod.
16349 (vga_mod_SOURCES): New variables.
16350 (vga_mod_CFLAGS): Likewise.
16351 (font_mod_SOURCES): Likewise.
16352 (font_mod_CFLAGS): Likewise.
16354 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16356 * include/pupa/term.h: Include pupa/err.h.
16357 (struct pupa_term): Added init and fini.
16358 Changed the argument of putchar to pupa_uint32_t.
16360 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16361 (pupa_console_real_putchar): New prototype.
16362 (pupa_console_putchar): Removed.
16363 (pupa_console_checkkey): Exported.
16364 (pupa_console_getkey): Likewise.
16366 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16369 * kern/term.c (pupa_term_set_current): Rewritten.
16370 (pupa_putchar): Likewise.
16371 (pupa_putcode): New function.
16373 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16374 (pupa_console_real_putchar): ... this.
16375 (pupa_vga_set_mode): New function.
16376 (pupa_vga_get_font): Likewise.
16378 * normal/command.c: Include pupa/term.h.
16379 (terminal_command): New function.
16380 (pupa_command_init): Register the command "terminal".
16382 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16383 (DISP_UP): Likewise.
16384 (DISP_RIGHT): Likewise.
16385 (DISP_DOWN): Likewise.
16386 (DISP_HLINE): Likewise.
16387 (DISP_VLINE): Likewise.
16388 (DISP_UL): Likewise.
16389 (DISP_UR): Likewise.
16390 (DISP_LL): Likewise.
16391 (DISP_LR): Likewise.
16393 * term/i386/pc/console.c (pupa_console_putchar): New function.
16395 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16397 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16398 FIX. Reverse the path_list.
16400 * include/pupa/normal.h: Export pupa_register_command and
16401 pupa_unregister_command.
16403 * hello/hello.c (pupa_cmd_hello): New module.
16404 * conf/i386-pc.rmk: Added hello.mod.
16406 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16408 * kern/i386/pc/lzo1x.S: New file.
16410 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16411 (compress_kernel): New variable.
16412 (generate_image): Heavily modified to support compressing a
16413 large part of the core image.
16415 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16417 (pupa_util_load_image): New function.
16419 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16420 (pupa_compressed_size): New variable.
16421 (codestart): Enable Gate A20 here.
16422 Decompress the compressed part of the core image.
16423 Rearrange the code to put functions and variables which are
16424 required for initialization in the non-compressed part.
16427 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16430 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16432 * include/pupa/i386/pc/kernel.h
16433 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16434 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16435 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16436 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16437 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16439 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16441 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16442 (Utility#rule): Likewise.
16444 * configure.ac: Check if LZO is available.
16446 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16448 * include/pupa/normal.h: New file.
16449 * include/pupa/setjmp.h: Likewise.
16450 * include/pupa/i386/setjmp.h: Likewise.
16451 * normal/cmdline.c: Likewise.
16452 * normal/command.c: Likewise.
16453 * normal/main.c: Likewise.
16454 * normal/menu.c: Likewise.
16455 * normal/i386/setjmp.S: Likewise.
16457 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16458 (pupa_rescue_cmd_initrd): Likewise.
16460 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16463 * kern/i386/pc/startup.S (translation_table): New variable.
16464 (translate_keycode): New function.
16465 (pupa_console_getkey): Call translate_keycode.
16467 * kern/rescue.c (attempt_normal_mode): New function.
16468 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16469 it failed, print a message.
16471 * kern/mm.c (pupa_real_malloc): Print more information when a
16472 free magic is broken.
16473 (pupa_free): If the first free header is not free actually, set
16476 * kern/main.c (pupa_load_normal_mode): Just load the module
16478 (pupa_main): Don't print the message
16479 "Entering into rescue mode..." here.
16481 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16483 (pupa_rescue_cmd_initrd): Likewise.
16484 (pupa_rescue_cmd_initrd): Likewise.
16486 * include/pupa/symbol.h (FUNCTION): Specify the type.
16487 (VARIABLE): Likewise.
16489 * include/pupa/err.h (pupa_err_t): Added
16490 PUPA_ERR_UNKNOWN_COMMAND.
16492 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16493 (pupa_dl_get_prefix): Likewise.
16495 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16496 Added _chain.mod and _linux.mod instead of chain.mod and
16498 (chain_mod_SOURCES): Renamed to ...
16499 (_chain_mod_SOURCES): ... this.
16500 (chain_mod_CFLAGS): Renamed to ...
16501 (_chain_mod_CFLAGS): ... this.
16502 (linux_mod_SOURCES): Renamed to ...
16503 (_linux_mod_SOURCES): ... this.
16504 (linux_mod_CFLAGS): Renamed to ...
16505 (_linux_mod_CFLAGS): ... this.
16506 (normal_mod_SOURCES): New variable.
16507 (normal_mod_CFLAGS): Likewise.
16508 (normal_mod_ASFLAGS): Likewise.
16510 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16512 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16515 * kern/dl.c (pupa_dl_ref): Refer depending modules
16517 (pupa_dl_unref): Unrefer depending modules recursively.
16518 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16519 a module is unloaded before one depending on that module is
16521 (pupa_dl_unload): Unload depending modules explicitly,
16524 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16526 * include/pupa/i386/pc/linux.h: New file.
16527 * loader/i386/pc/linux.c: Likewise.
16529 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16531 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16532 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16533 of PUPA_CHAINLOADER_BOOT_SECTOR.
16535 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16536 (pupa_linux_prot_size): New variable.
16537 (pupa_linux_tmp_addr): Likewise.
16538 (pupa_linux_real_addr): Likewise.
16539 (pupa_linux_boot_zimage): New function.
16540 (pupa_linux_boot_bzimage): Likewise.
16542 * kern/i386/pc/init.c (struct mem_region): New structure.
16543 (MAX_REGIONS): New macro.
16544 (mem_regions): New variable.
16545 (num_regions): Likewise.
16546 (pupa_os_area_addr): Likewise.
16547 (pupa_os_area_size): Likewise.
16548 (pupa_lower_mem): Likewise.
16549 (pupa_upper_mem): Likewise.
16550 (add_mem_region): New function.
16551 (compact_mem_regions): Likewise.
16552 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16553 the size of the conventional memory and that of so-called upper
16554 memory (before the first memory hole).
16555 Instead of adding each found region to free memory, use
16556 add_mem_region and add them after removing overlaps.
16557 Also, add only 1/4 of the upper memory to free memory. The rest
16558 is used for loading OS images. Maybe this is ad hoc, but this
16559 makes it much easier to relocate OS images when booting.
16561 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16562 (pupa_enter_rescue_mode): Don't register initrd and module.
16564 * kern/mm.c: Include pupa/dl.h.
16566 * kern/main.c: Include pupa/file.h and pupa/device.h.
16568 * kern/loader.c (pupa_loader_load_module_func): Removed.
16569 (pupa_loader_load_module): Likewise.
16571 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16574 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16575 (pupa_linux_tmp_addr): Likewise.
16576 (pupa_linux_real_addr): Likewise.
16577 (pupa_linux_boot_zimage): Likewise.
16578 (pupa_linux_boot_bzimage): Likewise.
16580 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16581 (pupa_upper_mem): Likewise.
16582 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16583 module is too dangerous.
16585 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16586 (pupa_os_area_size): Likewise.
16587 (pupa_loader_set): Remove the first argument. Loader doesn't
16588 manage modules or initrd any longer.
16589 (pupa_loader_load_module): Removed.
16591 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16592 (linux_mod_SOURCES): New variable.
16593 (linux_mod_CFLAGS): Likewise.
16595 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16597 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16598 the length of a blocklist correctly.
16600 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16601 Use ioctl only if the OS file is a block device.
16602 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16603 not very useful for normal files.
16605 * kern/main.c (pupa_set_root_dev): New function.
16606 (pupa_load_normal_mode): Likewise.
16607 (pupa_main): Call those above.
16609 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16612 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16614 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16616 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16617 (setup): Configure the installed partition information and the
16620 * loader/i386/pc/chainloader.c (my_mod): New variable.
16621 (pupa_chainloader_unload): New function.
16622 (pupa_rescue_cmd_chainloader): Refer itself.
16623 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16625 * kern/i386/pc/startup.S (install_partition): Removed.
16626 (version_string): Likewise.
16627 (config_file): Likewise.
16628 (pupa_install_dos_part): New variable.
16629 (pupa_install_bsd_part): Likewise.
16630 (pupa_prefix): Likewise.
16631 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16633 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16635 (make_install_device): New function.
16636 (pupa_machine_init): Set the dl prefix.
16638 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16639 (buf): Renamed to ...
16640 (linebuf): ... this.
16641 (pupa_rescue_cmd_prefix): New function.
16642 (pupa_rescue_cmd_insmod): Likewise.
16643 (pupa_rescue_cmd_rmmod): Likewise.
16644 (pupa_rescue_cmd_lsmod): Likewise.
16645 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16648 * kern/mm.c (pupa_memalign): If failed even after invalidating
16649 disk caches, unload unneeded modules and retry.
16651 * kern/misc.c (pupa_memmove): New function.
16652 (pupa_memcpy): Removed.
16653 (pupa_strcpy): New function.
16654 (pupa_itoa): Made static.
16656 * kern/dl.c (pupa_dl_iterate): New function.
16657 (pupa_dl_ref): Likewise.
16658 (pupa_dl_unref): Likewise.
16659 (pupa_dl_unload): Return if succeeded or not.
16660 (pupa_dl_unload_unneeded): New function.
16661 (pupa_dl_unload_all): Likewise.
16662 (pupa_dl_init): Renamed to ...
16663 (pupa_dl_set_prefix): ... this.
16664 (pupa_dl_get_prefix): New function.
16666 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16667 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16668 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16669 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16670 (pupa_install_dos_part): Declared.
16671 (pupa_install_bsd_part): Likewise.
16672 (pupa_prefix): Likewise.
16673 (pupa_boot_drive): Likewise.
16675 * include/pupa/types.h: Fix a typo.
16677 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16679 (pupa_memmove): Declared.
16680 (pupa_strcpy): Likewise.
16682 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16683 pupa_mod_init takes one argument, its own module.
16684 (pupa_dl_unload_unneeded): Declared.
16685 (pupa_dl_unload_all): Likewise.
16686 (pupa_dl_ref): Likewise.
16687 (pupa_dl_unref): Likewise.
16688 (pupa_dl_iterate): Likewise.
16689 (pupa_dl_init): Renamed to ...
16690 (pupa_dl_set_prefix): ... this.
16691 (pupa_dl_get_prefix): Declared.
16693 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16694 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16696 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16697 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16699 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16700 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16702 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16704 * util/i386/pc/pupa-setup.c (setup): Define the internal
16705 function find_first_partition_start at the top level, because GCC
16706 3.0.x cannot compile internal functions in deeper scopes
16708 (find_root_device): Use lstat instead of stat.
16709 Don't follow symbolic links.
16710 Fix the path-constructing code.
16712 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16713 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16714 by a BLKGETSIZE ioctl first, because block devices don't fill
16715 the member st_mode of the structure stat on Linux.
16716 [__linux__] (linux_find_partition): Use a temporary buffer
16717 REAL_DEV for the working space. Copy it to DEV before returning.
16718 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16719 buffer cache consistent.
16720 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16721 strncmp. The previous value was merely wrong.
16722 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16724 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16725 FAT size is 12. The previous value was merely wrong.
16727 * kern/main.c (pupa_main): Don't split the starting message from
16730 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16731 LF, because BIOS goes crazy about character attributes in this
16734 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16736 * include/i386/pc/util/biosdisk.h: New file.
16737 * util/i386/pc/biosdisk.c: Likewise.
16738 * util/i386/pc/pupa-setup.c: Likewise.
16740 * Makefile.in (INCLUDE_DISTFILES): Added
16741 include/pupa/i386/pc/util/biosdisk.h.
16742 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16743 directory util/i386/pc.
16744 (install-local): Added a rule for sbin_UTILITIES.
16745 (uninstall): Likewise.
16747 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16749 * util/misc.c (xrealloc): New function.
16750 (pupa_malloc): Likewise.
16751 (pupa_free): Likewise.
16752 (pupa_realloc): Likewise.
16753 (pupa_stop): Likewise.
16754 (pupa_putchar): Likewise.
16756 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16758 * include/pupa/util/misc.h (xrealloc): Declared.
16760 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16762 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16763 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16765 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16766 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16768 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16769 way should be implemented.
16770 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16772 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16773 the size of NAME for safety.
16774 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16777 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16778 (pupa_setup_SOURCES): Likewise.
16780 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16782 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16784 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16785 bunch of pushl's from pusha, because this destroys the return
16788 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16790 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16791 This means that any missing prototypes could be fatal. Also, you
16792 must take care when writing assembly code. See the comments at
16793 the beginning of startup.S, for more details.
16795 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16796 compilation mechanism.
16797 (pupa_chainloader_real_boot): Likewise.
16798 (pupa_biosdisk_rw_int13_extensions): Likewise.
16799 (pupa_biosdisk_rw_standard): Likewise.
16800 (pupa_biosdisk_check_int13_extensions): Likewise.
16801 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16802 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16803 (pupa_get_memsize): Likewise.
16804 (pupa_get_mmap_entry): Likewise.
16805 (pupa_console_putchar): Likewise.
16806 (pupa_console_setcursor): Likewise.
16807 (pupa_getrtsecs): Use pushl instead of push.
16809 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16810 memory instead of the stack for a mmap entry, because some
16811 BIOSes may ignore the maximum size and overflow.
16813 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16815 * genmk.rb (PModule#rule): Compile automatically generated
16816 sources with module-specific CFLAGS as well as other sources.
16818 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16820 * configure.ac: Check ld.
16821 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16822 respectively, before checking endianness and sizes.
16824 * Makefile.in (LD): New variable.
16826 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16828 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16830 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16832 * Changelog: New file.