2009-05-21 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder/solaris.git] / ChangeLog
blob577c82008474bd8ba07ea79527e5bab888de110c
1 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
3         * normal/i386: Remove.
4         * normal/powerpc: Likewise.
5         * normal/sparc64: Likewise.
6         * normal/x86_64: Likewise.
8 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
10         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
11         * loader/i386/linux_trampoline.S: Fix identation
12         * loader/i386/xnu_helper.S: Likewise
14 2009-05-18  Colin D Bennett  <colin@gibibit.com>
16         Display error messages when parsing a Lua statement fails.
17         Previously, executing a syntactically invalid statement like
18         ")foo" or "bar;" would silently fail.
20         * script/lua/grub_main.c (handle_lua_error): New function.
21         (grub_lua_parse_line): Improved reporting of Lua parser and
22         execution errors.
24 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
26         Remove -Werror which causes build to fail on some systems
28         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
29         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
30         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
32 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
34         trampoline for linux on 64-bit platform
36         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
37         loader/i386/efi/linux_trampoline.S
38         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
39         declration
40         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
41         here
42         * loader/i386/linux_trampoline.S: moved here
43         * loader/i386/efi/linux.c (allocate_pages): reserve space for
44         trampoline
45         (jumpvector): removed
46         (grub_linux_trampoline_start): new declaration
47         (grub_linux_trampoline_end): likewise
48         (grub_linux_boot): use trampoline when on 64-bit platform
49         * loader/i386/linux.c: likewise
51 2009-05-16  Pavel Roskin  <proski@gnu.org>
53         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
54         const to avoid a warning.
55         (grub_lua_setenv): Likewise.
56         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
57         lmsg to fix a warning.
59 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
61         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
62         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
63         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
64         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
65         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
66         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
67         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
68         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
70 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
72         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
74 2009-05-16  Bean  <bean123ch@gmail.com>
76         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
77         (lua_mod_SOURCES): New variable.
78         (lua_mod_CFLAGS): Likewise.
79         (lua_mod_LDFLAGS): Likewise.
81         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
82         (setjmp_mod_SOURCES): New variable.
83         (setjmp_mod_CFLAGS): Likewise.
84         (setjmp_LDFLAGS): Likewise.
86         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
87         (setjmp_mod_SOURCES): New variable.
88         (setjmp_mod_CFLAGS): Likewise.
89         (setjmp_LDFLAGS): Likewise.
91         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
92         (setjmp_mod_SOURCES): New variable.
93         (setjmp_mod_CFLAGS): Likewise.
94         (setjmp_LDFLAGS): Likewise.
96         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
97         (setjmp_mod_SOURCES): New variable.
98         (setjmp_mod_CFLAGS): Likewise.
99         (setjmp_LDFLAGS): Likewise.
101         * normal/i386/setjmp.S: Moved from here ...
102         * lib/i386/setjmp.S: ... Moved here
103         * normal/x86_64/setjmp.S: Moved from here ...
104         * lib/x86_64/setjmp.S: ... Moved here
105         * normal/powerpc/setjmp.S: Moved from here ...
106         * lib/powerpc/setjmp.S: ... Moved here
107         * normal/sparc64/setjmp.S: Moved from here ...
108         * lib/sparc64/setjmp.S: ... Moved here
110         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
111         returns_twice in mingw.
113         * script/lua/grub_lib.c: New file.
114         * script/lua/grub_lib.h: Likewise.
115         * script/lua/grub_lua.h: Likewise.
116         * script/lua/grub_main.c: Likewise.
117         * script/lua/lapi.c: Likewise.
118         * script/lua/lapi.h: Likewise.
119         * script/lua/lauxlib.c: Likewise.
120         * script/lua/lauxlib.h: Likewise.
121         * script/lua/lbaselib.c: Likewise.
122         * script/lua/lcode.c: Likewise.
123         * script/lua/lcode.h: Likewise.
124         * script/lua/ldblib.c: Likewise.
125         * script/lua/ldebug.c: Likewise.
126         * script/lua/ldebug.h: Likewise.
127         * script/lua/ldo.c: Likewise.
128         * script/lua/ldo.h: Likewise.
129         * script/lua/ldump.c: Likewise.
130         * script/lua/lfunc.c: Likewise.
131         * script/lua/lfunc.h: Likewise.
132         * script/lua/lgc.c: Likewise.
133         * script/lua/lgc.h: Likewise.
134         * script/lua/linit.c: Likewise.
135         * script/lua/liolib.c: Likewise.
136         * script/lua/llex.c: Likewise.
137         * script/lua/llex.h: Likewise.
138         * script/lua/llimits.h: Likewise.
139         * script/lua/lmathlib.c: Likewise.
140         * script/lua/lmem.c: Likewise.
141         * script/lua/lmem.h: Likewise.
142         * script/lua/loadlib.c: Likewise.
143         * script/lua/lobject.c: Likewise.
144         * script/lua/lobject.h: Likewise.
145         * script/lua/lopcodes.c: Likewise.
146         * script/lua/lopcodes.h: Likewise.
147         * script/lua/loslib.c: Likewise.
148         * script/lua/lparser.c: Likewise.
149         * script/lua/lparser.h: Likewise.
150         * script/lua/lstate.c: Likewise.
151         * script/lua/lstate.h: Likewise.
152         * script/lua/lstring.c: Likewise.
153         * script/lua/lstring.h: Likewise.
154         * script/lua/lstrlib.c: Likewise.
155         * script/lua/ltable.c: Likewise.
156         * script/lua/ltable.h: Likewise.
157         * script/lua/ltablib.c: Likewise.
158         * script/lua/ltm.c: Likewise.
159         * script/lua/ltm.h: Likewise.
160         * script/lua/lua.h: Likewise.
161         * script/lua/luaconf.h: Likewise.
162         * script/lua/lualib.h: Likewise.
163         * script/lua/lundump.c: Likewise.
164         * script/lua/lundump.h: Likewise.
165         * script/lua/lvm.c: Likewise.
166         * script/lua/lvm.h: Likewise.
167         * script/lua/lzio.c: Likewise.
168         * script/lua/lzio.h: Likewise.
170 2009-05-16  Bean  <bean123ch@gmail.com>
172         * include/grub/kernel.h (grub_module_header_types): Add type
173         OBJ_TYPE_CONFIG.
175         * kern/main.c (grub_load_config): New function.
176         (grub_main): Call grub_load_config to read boot config.
178         * grub-mkimage (generate_image): New parameter config_path.
179         (options): New option --config.
180         (main): Parse --config option, and pass it to generate_image.
182 2009-05-14  Christian Franke  <franke@computer.org>
184         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
185         This fixes build on Cygwin.
187 2009-05-14  Pavel Roskin  <proski@gnu.org>
189         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
190         jump.  This saves two bytes, so the typical case of 2 swapped
191         drives would fit 32 bytes.
193 2009-05-13  Pavel Roskin  <proski@gnu.org>
195         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
196         grub_uint32_t to avoid a warning.
198         * loader/i386/linux.c (allocate_pages): When assigning
199         real_mode_mem, cast through grub_size_t to fix a warning.  The
200         code already makes sure that the value would fit a pointer.
201         (grub_linux_setup_video): Cast render_target->data to
202         grub_size_t to fix a warning.
204 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
206         * commands/i386/pc/drivemap.c: New file - implement drivemap
207         command.
208         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
209         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
211 2009-05-13  Pavel Roskin  <proski@gnu.org>
213         * util/i386/pc/grub-setup.c (setup): Remove unused variable
214         embedding_area_exists.
216 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
218         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
219         it easier to understand / work with.
220         Improve warning messages for cases where there's no embedding area,
221         or when it is too small (or core.img too large).
223 2009-05-13  Pavel Roskin  <proski@gnu.org>
225         * loader/i386/pc/multiboot2.c: Add necessary includes for
226         grub_multiboot2_real_boot().
228         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
229         PX record is always little-endian.  We only need the lower 2
230         bytes of the mode.
232         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
233         facilitate code reuse.
234         (grub_cpio_mount): Use "struct head", not a char buffer.  This
235         fixes a warning reported by gcc 4.4.
237         * kernel/disk.c (grub_disk_read): Use void pointer for the
238         buffer.
239         (grub_disk_write): Use const void pointer for the buffer.
240         Adjust all callers.  Remove unnecessary casts.
242 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
244         * util/i386/pc/grub-install.in: Update copyright year.
246 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
248         gptsync
250         * commands/gptsync.c: new file
251         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
252         (gptsync_mod_SOURCES): new variable
253         (gptsync_mod_CFLAGS): likewise
254         (gptsync_mod_LDFLAGS): likewise
255         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
256         new definition
257         (GRUB_PC_PARTITION_TYPE_HFS): likewise
258         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
259         * conf/i386-ieee1275.rmk: likewise
260         * conf/i386-pc.rmk: likewise
261         * conf/powerpc-ieee1275.rmk: likewise
263 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
265         Fixed grub-emu
267         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
268         (grub_dl_ref): likewise
270 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
272         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
273         split in two functions (one for msdos and one for gpt).
275 2009-05-08  Pavel Roskin  <proski@gnu.org>
277         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
278         not modified.
280         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
281         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
282         Initialize them with -1.  Add sanity check for bad1.  Eliminate
283         nerr variable.
285 2009-05-08  David S. Miller  <davem@davemloft.net>
287         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
289 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
291         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
292         existance.
294 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
296         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
297         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
299 2009-05-05  David S. Miller  <davem@davemloft.net>
301         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
303 2009-05-05  Pavel Roskin  <proski@gnu.org>
305         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
306         of grub_dl_ref() and grub_dl_unref().
307         * commands/parttool.c: Remove preprocessor conditionals around
308         grub_dl_ref() and grub_dl_unref().
309         * fs/affs.c: Likewise.
310         * fs/afs.c: Likewise.
311         * fs/cpio.c: Likewise.
312         * fs/ext2.c: Likewise.
313         * fs/fat.c: Likewise.
314         * fs/hfs.c: Likewise.
315         * fs/hfsplus.c: Likewise.
316         * fs/iso9660.c: Likewise.
317         * fs/jfs.c: Likewise.
318         * fs/minix.c: Likewise.
319         * fs/ntfs.c: Likewise.
320         * fs/reiserfs.c: Likewise.
321         * fs/sfs.c: Likewise.
322         * fs/udf.c: Likewise.
323         * fs/ufs.c: Likewise.
324         * fs/xfs.c: Likewise.
325         * include/grub/dl.h: Likewise.
326         * loader/xnu.c: Likewise.
328 2009-05-04  Pavel Roskin  <proski@gnu.org>
330         * commands/acpi.c: Remove unused variable my_mod.
331         * partmap/amiga.c: Likewise.
332         * partmap/apple.c: Likewise.
333         * partmap/gpt.c: Likewise.
334         * partmap/pc.c: Likewise.
335         * partmap/sun.c: Likewise.
336         * term/gfxterm.c: Likewise.
337         * term/i386/pc/vesafb.c: Likewise.
338         * term/i386/pc/vga.c: Likewise.
340 2009-05-04  David S. Miller  <davem@davemloft.net>
342         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
343         pointer args to grub_ieee1275_get_property().
345         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
347         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
348         devices, and do not traverse down under controller nodes.
350         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
351         (grub_ofdisk_open): Use it to un-escape "," characters.
352         * kern/disk.c (find_part_sep): New.
353         (grub_disk_open): Use it to find the first non-escaped ','
354         character in the disk name.
355         * util/ieee1275/devicemap.c (escape_of_path): New.
356         (grub_util_emit_devicemap_entry): Use it.
357         * util/sparc64/ieee1275/grub-install.in: Update script to
358         strip partition specifiers properly by not triggering on
359         '\' escaped ',' characters.
361 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
363         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
364         to 0x300.
365         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
366         resolutions.
367         (linux_vesafb_modes): Add a lot of additional modes to the list (based
368         on documentation from Wikipedia).
370 2009-05-04  Pavel Roskin  <proski@gnu.org>
372         * disk/ata.c: Spelling fixes.
373         * disk/raid.c: Likewise.
374         * disk/usbms.c: Likewise.
375         * disk/dmraid_nvidia.c: Likewise.
376         * kern/ieee1275/openfw.c: Likewise.
377         * kern/ieee1275/init.c: Likewise.
378         * kern/ieee1275/cmain.c: Likewise.
379         * boot/i386/pc/cdboot.S: Likewise.
380         * video/readers/png.c: Likewise.
381         * video/i386/pc/vbe.c: Likewise.
382         * fs/udf.c: Likewise.
383         * fs/hfs.c: Likewise.
384         * fs/reiserfs.c: Likewise.
385         * efiemu/runtime/efiemu.c: Likewise.
386         * efiemu/main.c: Likewise.
387         * efiemu/mm.c: Likewise.
388         * include/grub/elf.h: Likewise.
389         * include/grub/xnu.h: Likewise.
390         * include/grub/usbdesc.h: Likewise.
391         * include/grub/usb.h: Likewise.
392         * include/grub/script_sh.h: Likewise.
393         * include/grub/lib/LzmaEnc.h: Likewise.
394         * include/grub/efiemu/efiemu.h: Likewise.
395         * include/grub/command.h: Likewise.
396         * normal/menu.c: Likewise.
397         * normal/main.c: Likewise.
398         * normal/datetime.c: Likewise.
399         * bus/usb/uhci.c: Likewise.
400         * mmap/i386/uppermem.c: Likewise.
401         * mmap/mmap.c: Likewise.
402         * commands/acpi.c: Likewise.
403         * commands/test.c: Likewise.
404         * partmap/apple.c: Likewise.
405         * font/font.c: Likewise.
406         * loader/sparc64/ieee1275/linux.c: Likewise.
407         * loader/macho.c: Likewise.
408         * loader/i386/bsd_trampoline.S: Likewise.
409         * loader/i386/bsd.c: Likewise.
410         * loader/xnu.c: Likewise.
411         * term/i386/pc/vesafb.c: Likewise.
412         * term/usb_keyboard.c: Likewise.
413         * util/resolve.c: Likewise.
414         * util/getroot.c: Likewise.
416 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
418         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
420 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
422         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
423         build error.
425 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
427         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
428         parameter only available on BIOS.
430 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
432         Removed wrong semicolon in declaration
434         * grub/misc.h (grub_dprintf): remove semicolon
436 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
438         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
439         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
440         is done by grub_cmd_linux() now).
441         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
442         restore video to text mode.
443         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
444         indicates lack of "vga=" parameter.  "vga=0" is mapped to
445         `GRUB_LINUX_VID_MODE_NORMAL'.
447 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
449         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
450         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
451         and `normal/script.c'.  Add `kern/rescue_reader.c',
452         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
453         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
454         `grub_script.tab.c'.
456         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
457         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
458         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
459         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
460         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
462         * Makefile.in: Remove duplicated 2008 in Copyright line.
464 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
466         * util/misc.c (grub_util_warn): New function.  Emmits a warning
467         unconditionally.
468         * include/grub/util/misc.h (grub_util_warn): New declaration.
470         * util/i386/pc/grub-install.in: Understand --force and pass it down
471         to grub-setup.
473         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
474         down to setup().
475         (setup): Improve error messages and add warnings when requested to
476         install in odd layouts.  Refuse to install using blocklists unless
477         --force was set.
479 2009-05-04  martin f. krafft  <madduck@madduck.net>
481         * disk/raid.c (grub_raid_scan_device): Improve debug message.
483 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
485         Updated copyright year
487         * fs/hfsplus.c: updated copyright year
489 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
491         HFS+ UUID
493         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
494         in the space previously used by unused3
495         (grub_hfsplus_uuid): new function
496         (grub_hfsplus_fs): added uuid field
498 2009-05-03  Pavel Roskin  <proski@gnu.org>
500         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
501         suppress warnings.  It's no longer needed.
502         * disk/host.c: Likewise.
503         * disk/ata_pthru.c: Likewise.
504         * disk/loopback.c: Likewise.
505         * hook/datehook.c: Likewise.
506         * parttool/pcpart.c: Likewise.
507         * fs/i386/pc/pxe.c: Likewise.
508         * fs/ntfscomp.c: Likewise.
509         * efiemu/main.c: Likewise.
510         * mmap/mmap.c: Likewise.
511         * commands/crc.c: Likewise.
512         * commands/hexdump.c: Likewise.
513         * commands/hdparm.c: Likewise.
514         * commands/acpi.c: Likewise.
515         * commands/echo.c: Likewise.
516         * commands/minicmd.c: Likewise.
517         * commands/blocklist.c: Likewise.
518         * commands/memrw.c: Likewise.
519         * commands/loadenv.c: Likewise.
520         * commands/usbtest.c: Likewise.
521         * commands/lsmmap.c: Likewise.
522         * commands/boot.c: Likewise.
523         * commands/parttool.c: Likewise.
524         * commands/configfile.c: Likewise.
525         * commands/search.c: Likewise.
526         * commands/ieee1275/suspend.c: Likewise.
527         * commands/cat.c: Likewise.
528         * commands/i386/pc/pxecmd.c: Likewise.
529         * commands/i386/pc/play.c: Likewise.
530         * commands/i386/pc/halt.c: Likewise.
531         * commands/i386/pc/vbeinfo.c: Likewise.
532         * commands/i386/pc/vbetest.c: Likewise.
533         * commands/lspci.c: Likewise.
534         * commands/date.c: Likewise.
535         * commands/handler.c: Likewise.
536         * commands/ls.c: Likewise.
537         * commands/test.c: Likewise.
538         * commands/cmp.c: Likewise.
539         * commands/efi/loadbios.c: Likewise.
540         * commands/efi/fixvideo.c: Likewise.
541         * commands/halt.c: Likewise.
542         * commands/help.c: Likewise.
543         * commands/reboot.c: Likewise.
544         * hello/hello.c: Likewise.
545         * script/sh/main.c: Likewise.
546         * loader/xnu.c: Likewise.
547         * term/terminfo.c: Likewise.
548         * term/i386/pc/serial.c: Likewise.
549         * term/usb_keyboard.c: Likewise.
551 2009-05-03  David S. Miller  <davem@davemloft.net>
553         * normal/menu.c: Include grub/parser.h
555 2009-05-03  Pavel Roskin  <proski@gnu.org>
557         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
558         not char*.
559         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
560         Suggested by Javier Martín <lordhabbit@gmail.com>
562         * util/i386/pc/grub-mkrescue.in: Allow for the case when
563         efiemu??.o doesn't exist.
564         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
565         copying.
567 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
569         FreeBSD 64-bit support
571         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
572         and loader/i386/bsd_trampoline.S
573         (bsd_mod_ASFLAGS): new variable
574         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
575         (FREEBSD_MODTYPE_KERNEL64): likewise
576         (grub_bsd64_trampoline_start): likewise
577         (grub_bsd64_trampoline_end): likewise
578         (grub_bsd64_trampoline_selfjump): likewise
579         (grub_bsd64_trampoline_gdt): likewise
580         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
581         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
582         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
583         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
584         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
585         of "attrib" member
586         * loader/i386/bsd_pagetable.c: new file
587         * loader/i386/bsd_trampoline.S: likewise
588         * loader/i386/bsd.c (ALIGN_QWORD): new macro
589         (ALIGN_VAR): likewise
590         (entry_hi): new variable
591         (kern_end_mdofs): likewise
592         (is_64bit): likewise
593         (grub_freebsd_add_meta): use ALIGN_VAR
594         (grub_e820_mmap): new declaration
595         (grub_freebsd_add_mmap): new function
596         (grub_freebsd_add_meta_module): support 64 bit kernels
597         (grub_freebsd_list_modules): use ALIGN_VAR
598         (gdt_descriptor): new declaration
599         (grub_freebsd_boot): support 64 bit kernels
600         (grub_bsd_elf64_hook): new function
601         (grub_bsd_load_elf): support elf64
603 2009-05-03  Bean  <bean123ch@gmail.com>
605         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
606         after we get the result of if statement.
608 2009-05-03  Bean  <bean123ch@gmail.com>
610         * Makefile.in (enable_efiemu): New variable.
612         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
613         set.
614         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
615         path.
616         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
617         path, add -mno-red-zone option.
618         (efiemu64_s.o): Likewise.
619         (efiemu64.o): Use macro $^ for source file.
621         * configure.ac (--enable-efiemu): New option.
623 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
625         xnu support
627         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
628         (pkglib_MODULES): add xnu.mod
629         (xnu_mod_SOURCES): new variable
630         (xnu_mod_CFLAGS): likewise
631         (xnu_mod_LDFLAGS): likewise
632         (xnu_mod_ASFLAGS): likewise
633         * conf/i386-pc.rmk: likewise
634         * conf/x86_64-efi.rmk: likewise
635         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
636         new declaration
637         * include/grub/i386/macho.h: new file
638         * include/grub/i386/xnu.h: likewise
639         * include/grub/macho.h: likewise
640         * include/grub/machoload.h: likewise
641         * include/grub/x86_64/macho.h: likewise
642         * include/grub/x86_64/xnu.h: likewise
643         * include/grub/xnu.h: likewise
644         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
645         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
646         * loader/i386/efi/xnu.c: new file
647         * loader/i386/pc/xnu.c: likewise
648         * loader/i386/xnu.c: likewise
649         * loader/i386/xnu_helper.S: likewise
650         * loader/macho.c: likewise
651         * loader/xnu.c: likewise
652         * loader/xnu_resume.c: likewise
653         * util/grub-dumpdevtree: likewise
654         * include/grub/i386/pit.h: include grub/err.h
655         (grub_pit_wait): export
656         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
658 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
660         Efiemu
662         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
663         _linux_efi, linux_efi.
664         new files in grub-emu
665         new targets efiemu32.o and efiemu64.o
666         * loader/linux_normal_efiemu.c: likewise
667         * loader/i386/efi/linux.c: added preliminary efiemu support
668         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
669         files to copy
670         * include/grub/autoefi.h: new file
671         * include/grub/i386/efiemu.h: likewise
672         * include/grub/i386/pc/efiemu.h: likewise
673         * include/grub/efi/api.h: add LL suffix when necessary
674         new definitions relating to tables
675         * include/grub/efiemu/efiemu.h: new file
676         * include/grub/efiemu/runtime.h: likewise
677         * efiemu/prepare.c: likewise
678         * efiemu/loadcore_common.c: likewise
679         * efiemu/loadcore64.c: likewise
680         * efiemu/runtime/efiemu.sh: likewise
681         * efiemu/runtime/efiemu.S: likewise
682         * efiemu/runtime/efiemu.c: likewise
683         * efiemu/runtime/config.h: likewise
684         * efiemu/prepare32.c: likewise
685         * efiemu/main.c: likewise
686         * efiemu/modules/pnvram.c: likewise
687         * efiemu/modules/i386: likewise
688         * efiemu/modules/i386/pc: likewise
689         * efiemu/modules/acpi.c: likewise
690         * efiemu/i386/pc/cfgtables.c: likewise
691         * efiemu/i386/loadcore64.c: likewise
692         * efiemu/i386/loadcore32.c: likewise
693         * efiemu/prepare64.c: likewise
694         * efiemu/loadcore.c: likewise
695         * efiemu/symbols.c: likewise
696         * efiemu/mm.c: likewise
697         * efiemu/loadcore32.c: likewise
699 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
701         ACPI spoofing
703         * commands/acpi.c: new file
704         * commands/i386/pc/acpi.c: likewise
705         * commands/efi/acpi.c: likewise
706         * include/grub/acpi.h: likewise
707         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
708         (acpi_mod_SOURCES): new variable
709         (acpi_mod_CFLAGS): likewise
710         (acpi_mod_LDFLAGS): likewise
711         * conf/i386-efi.rmk: likewise
712         * conf/x86_64-efi.rmk: likewise
714 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
716         Missing part from mmap patch
718         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
719         (grub_mmap_unregister)
720         (grub_mmap_free_and_unregister): use grub_mmap_register
722 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
724         Mmap services
726         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
727         * loader/i386/linux.c (find_mmap_size): likewise
728         (allocate_pages): likewise
729         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
730         (grub_fill_multiboot_mmap): likewise
731         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
732         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
733         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
734         (OPENBSD_MMAP_RESERVED): likewise
735         * include/grub/i386/pc/memory.h: include grub/memory.h
736         (grub_lower_mem): removed
737         (grub_upper_mem): likewise
738         (GRUB_MACHINE_MEMORY_ACPI): new definition
739         (GRUB_MACHINE_MEMORY_NVS): likewise
740         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
741         (GRUB_MACHINE_MEMORY_HOLE): likewise
742         (grub_machine_mmap_register): likewise
743         (grub_machine_mmap_unregister): likewise
744         (grub_machine_get_upper): likewise
745         (grub_machine_get_lower): likewise
746         (grub_machine_get_post64): likewise
747         * include/grub/i386/efi/memory.h: new file
748         * include/grub/x86_64/efi/memory.h: likewise
749         * include/grub/efi/memory.h: likewise
750         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
751         (mmap_mod_SOURCES): new variable
752         (mmap_mod_LDFLAGS): likewise
753         (mmap_mod_ASFLAGS): likewise
754         * conf/i386-coreboot.rmk: likewise
755         * conf/i386-ieee1275.rmk: likewise
756         * conf/i386-efi.rmk: likewise
757         * conf/x86_64-efi.rmk: likewise
758         * include/grub/types.h (UINT_TO_PTR): new macro
759         (PTR_TO_UINT32): likewise
760         (PTR_TO_UINT64): likewise
761         * include/grub/memory.h: new file
762         * mmap/i386/pc/mmap.c: likewise
763         * mmap/i386/pc/mmap_helper.S: likewise
764         * mmap/i386/uppermem.c: likewise
765         * mmap/mmap.c: likewise
766         * mmap/efi/mmap.c: likewise
767         * kern/i386/coreboot/init.c (grub_machine_init): don't use
768         grub_upper_mem
769         * kern/i386/pc/init.c (grub_lower_mem): removed variable
770         (grub_upper_mem): likewise
771         (grub_machine_init): don't use grub_upper_mem,
772         make grub_lower_mem local
773         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
774         grub_mmap_iterate and grub_mmap_get_upper
775         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
777 2009-05-02  Bean  <bean123ch@gmail.com>
779         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
780         script/sh/parser.y.
781         (pkglib_MODULES): Add normal.mod and sh.mod.
782         (normal_SOURCES): New variable.
783         (normal_mod_CFLAGS): Likewise.
784         (normal_mod_LDFLAGS): Likewise.
785         (sh_mod_SOURCES): Likewise.
786         (sh_mod_CFLAGS): Likewise.
787         (sh_mod_LDFLAGS): Likewise.
789         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
790         script/sh/lexer.c_DEPENDENCIES.
791         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
792         kern/rescue_reader.c and kern/rescue_parser.c.
793         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
794         (grub_emu_SOURCES): Change source files.
795         (pkglib_MODULES): Remove normal.mod.
796         (normal_SOURCES): Removed.
797         (normal_mod_CFLAGS): Likewise.
798         (normal_mod_LDFLAGS): Likewise.
799         * conf/i386-coreboot.rmk: Likewise.
800         * conf/i386-efi.rmk: Likewise.
801         * conf/i386-ieee1276.rmk: Likewise.
802         * conf/powerpc-ieee1275.rmk: Likewise.
803         * conf/sparc64-ieee1275.rmk: Likewise.
804         * conf/x86_64-efi.rmk: Likewise.
806         * include/grub/command.h (grub_command_execute): New inline function.
808         * include/grub/menu.h (grub_menu_entry): Removed commands field.
810         * include/grub/normal.h: Remove <grub/setjmp.h>.
811         (grub_fs_module_list): Moved to normal/autofs.c.
812         (grub_exit_env): Removed.
813         (grub_command_execute): Likewise.
814         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
815         parameter script.
816         (read_command_list): New function declaration.
817         (read_fs_list): Likewise.
819         * include/parser.h: Include <grub/reader.h>.
820         (grub_parser_split_cmdline): Change type of getline parameter.
821         (grub_parser): New structure.
822         (grub_parser_class): New variable.
823         (grub_parser_execute): New function declaration.
824         (grub_register_rescue_parser): Likewise.
825         (grub_parser_register): New inline function.
826         (grub_parser_unregister): Likewise.
827         (grub_parser_get_current): Likewise.
828         (grub_parser_set_current): Likewise.
830         * include/grub/reader.h: New file.
831         * kern/reader.c: Likewise.
832         * kern/rescue_parser.c: Likewise.
833         * kern/rescue_reader.c: Likewise.
834         * normal/autofs.c: Likewise.
835         * normal/dyncmd.c: Likewise.
837         * include/grub/rescue.h: Removed.
838         * normal/command.h: Likewise.
840         * include/grub/script.h: Moved to ...
841         * include/grub/script_sh.h: ... Moved here.
842         * normal/execute.c: Moved to ...
843         * script/sh/execute.c: ... Moved here.
844         * normal/function.c: Moved to ...
845         * script/sh/function.c: ... Moved here.
846         * normal/lexer.c: Moved to ...
847         * script/sh/lexer.c: ... Moved here.
848         * normal/parser.y: Moved to ...
849         * script/sh/parser.y: ... Moved here.
850         * normal/script.c: Moved to ...
851         * script/sh/script.c: ... Moved here.
853         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
854         <grub/reader.h>.
855         (grub_exit_env): Removed.
856         (fs_module_list): Moved to normal/autofs.c.
857         (grub_file_getline): Don't handle comment here.
858         (free_menu): Skip removed field entry->commands.
859         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
860         script parameter.
861         (read_config_file): Removed nested parameter, change getline function.
862         (grub_enter_normal_mode): Removed.
863         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
864         (read_command_list): Likewise.
865         (autoload_fs_module): Moved to normal/autofs.c.
866         (read_fs_list): Likewise.
867         (reader_nested): New variable.
868         (grub_normal_execute): Run parser.sh to switch to sh parser.
869         (grub_cmd_rescue): Removed.
870         (cmd_normal): Removed.
871         (grub_cmd_normal): Unregister itself at the beginning. Don't register
872         rescue command.
873         (grub_cmdline_run): New function.
874         (grub_normal_reader_init): Likewise.
875         (grub_normal_read_line): Likewise.
876         (grub_env_write_pager): Likewise.
877         (cmdline): New variable.
878         (grub_normal_reader): Likewise.
879         (GRUB_MOD_INIT): Register normal reader and set as current, register
880         pager hook, register normal command with grub_register_command_prio,
881         so that it won't show up in command.lst.
882         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
883         grub_fs_autoload_hook.
885         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
886         (grub_menu_execute_entry): Replace grub_script_execute with
887         grub_parser_execute, change parameter to grub_command_execute.
889         * normal/menu_text.c: Remove <grub/script.h>.
891         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
892         and <grub/parser.h>.
893         (run): Change editor_getline to use new parser interface. Change
894         parameter to grub_command_execute.
896         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
897         <grub/reader.h> and <grub/parser.h>.
898         (grub_load_normal_mode): Execute normal command.
899         (grub_main): Call grub_register_core_commands,
900         grub_register_rescue_parser and grub_register_rescue_reader, use
901         grub_reader_loop to enter input loop.
903         * kern/parser.c (grub_parser_split_cmdline): Change type of
904         getline parameter.
905         (grub_parser_class): New variable.
906         (grub_parser_execute): New function.
908         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
909         * loader/multiboot2.c: Likewise.
910         * loader/sparc64/ieee1275/linux.c: Likewise.
912         * util/grub-emu.c (read_command_list): New dummy function.
914 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
916         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
917         count to 16 for CCISS and IDA.
919 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
921         * normal/menu_text.c  (grub_wait_after_message): Print a newline
922         after waiting for user input.
924         * loader/i386/linux.c: Include `<grub/normal.h>'.
925         (grub_cmd_linux): Improve the error message about `ask' mode, by
926         waiting for user input so it's not missed (we can do this, since
927         user requested interaction).
929 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
931         Added missing lst to grub-mkrescue
933         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
934         and ${input_dir}/parttool.lst
936 2009-04-30  David S. Miller  <davem@davemloft.net>
938         * util/hostdisk.c (device_is_wholedisk): New function.
939         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
940         zero only if device_is_wholedisk() returns true.
942         * util/hostdisk.c (convert_system_partition_to_system_disk):
943         Handle virtual disk devices named /dev/vdiskX as found on sparc
944         and powerpc.
946         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
947         lettered partition specifier is found, convert to numbered.
949 2009-04-29  David S. Miller  <davem@davemloft.net>
951         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
952         * include/grub/sparc64/ieee1275/memory.h: Likewise.
954         * normal/command.c: Add missing newline at end of file.
956         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
957         warnings.
958         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
959         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
960         grub_ofdisk_read): Likewise, and deal similarly with the fact that
961         ihandles have a 32-bit type but need to be stored in a "void *".
963 2009-04-28  Pavel Roskin  <proski@gnu.org>
965         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
966         not disk.  Adjust all dependencies.
967         (grub_fs_uuid_close): Use grub_device_close(), not
968         grub_disk_close().
970         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
971         parent's partition, don't copy it by reference, as it gets freed
972         on close.
974 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
976         Preboot hooks support
978         * commands/boot.c (struct grub_preboot_t): new declaration
979         (preboots_head): new variable
980         (preboots_tail): likewise
981         (grub_loader_register_preboot_hook): new function
982         (grub_loader_unregister_preboot_hook): likewise
983         (grub_loader_set): launch preboot hooks
984         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
985         (grub_loader_register_preboot_hook): new declaration
986         (grub_loader_unregister_preboot_hook): likewise
988 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
990         Warning fix
992         * disk/scsi.c (grub_scsi_open): added missing cast when
993         calling grub_dprintf
995 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
997         Bug and warning fixes
999         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1000         declaration
1001         * commands/test.c (test_parse): fixed bug with file tests and corrected
1002         declaration of find_file
1004 2009-04-26  Pavel Roskin  <proski@gnu.org>
1006         * Makefile.in: Don't install empty manual pages if help2man is
1007         missing.  Use help2man option for output, not shell redirection.
1009 2009-04-26  David S. Miller  <davem@davemloft.net>
1011         * util/grub-mkdevicemap.c (make_device_map): Add missing
1012         NESTED_FUNC_ATTR to process_device().
1014 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1016         Test command
1018         * commands/test.c: rewritten to use bash-like test
1020 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1022         Parttool autoloading and improvements
1024         * Makefile.in (pkglib_DATA): add parttool.lst
1025         (parttool.lst): new target
1026         * genmk.rb: generate parttool-*
1027         (CLEANFILES): add #{parttool}
1028         (PARTTOOLFILES): new variable
1029         * genparttoollist.sh: new file
1030         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1031         (grub_pcpart_type): likewise
1032         * commands/parttool.c (helpmsg): new variable
1033         (grub_cmd_parttool): output help if not enough arguments are supplied
1034         autoload modules
1035         (GRUB_MOD_INIT(parttool)): use helpmsg
1037 2009-04-24  David S. Miller  <davem@davemloft.net>
1039         Avoiding opening same device multiple times in device iterator.
1041         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1042         and use it to build a list of partitions in iterate_disk() and
1043         iterate_partition().
1045         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1046         on disk->data.
1048         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1049         grub_devalias_iterate() result instead of unconditional 0.
1050         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1051         Also, capture hook return value, either directly or via
1052         grub_children_iterate(), and propagate to caller.
1053         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1054         grub_children_iterate): Return value is now 'int' instead of
1055         'grub_err_t'.
1056         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1057         like a proper iterator, stopping when hooks return non-zero.
1058         (grub_devalias_iterate): Likewise.
1060 2009-04-23  David S. Miller  <davem@davemloft.net>
1062         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1064 2009-04-22  David S. Miller  <davem@davemloft.net>
1066         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1067         is larger than address_cells, use that value for address_cells too.
1069         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1070         IEEE1275_MAX_PATH_LEN): Define.
1071         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1072         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1073         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1074         'devtype'.  Explicitly NULL terminate devalias expansion.
1076         * util/sparc64/ieee1275/misc.c: New file.
1077         * util/sparc64/ieee1275/grub-setup.c: New file.
1078         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1079         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1080         * util/sparc64/ieee1275/grub-install.in: New file.
1081         * util/ieee1275/ofpath.c: New file.
1082         * util/ieee1275/devicemap.c: New file.
1083         * util/devicemap.c: New file.
1084         * util/deviceiter.c: New file.
1085         * kern/sparc64/ieee1275/init.c: New file.
1086         * include/grub/util/ofpath.h: New file.
1087         * include/grub/util/deviceiter.h: New file.
1088         * util/grub-mkdevicemap.c: Include deviceiter.h.
1089         Implement using grub_util_emit_devicemap_entry and
1090         grub_util_iterate_devices.
1091         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1092         util/devicemap.c into grub-mkdevicemap
1093         * conf/i386-efi.rmk: Likewise.
1094         * conf/i386-ieee1275.rmk: Likewise.
1095         * conf/i386-pc.rmk: Likewise.
1096         * conf/powerpc-ieee1275.rmk: Likewise.
1097         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1098         images and installation utilities.  Build kernel as image
1099         instead of as elf binary.  Use common rules as much as possible.
1101 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1103         Correct GPT definition
1105         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1106         of "attrib" member
1108 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1110         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1112 2009-04-19  David S. Miller  <davem@davemloft.net>
1114         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1115         (grub_rescue_cmd_linux): Rename to...
1116         (grub_cmd_linux): and fix prototype.
1117         (grub_rescue_cmd_initrd): Rename to...
1118         (grub_cmd_initrd): and fix prototype.
1119         (cmd_linux, cmd_initrd): New.
1120         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1121         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1123 2009-04-17  Pavel Roskin  <proski@gnu.org>
1125         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1126         format.
1127         (grub_ohci_transfer): Likewise.
1129         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1131         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1132         return without a value.  Fix inconsistent indentation.
1134         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1135         match struct grub_fs.
1137         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1138         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1139         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1140         * commands/lspci.c (grub_lspci_iter): Likewise.
1142 2009-04-16  Bean  <bean123ch@gmail.com>
1144         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1145         value.
1147 2009-04-15  Pavel Roskin  <proski@gnu.org>
1149         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1150         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1151         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1152         definitions.
1154 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1156         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1157         that no multiple data or metadata areas are supported and `Unknown
1158         metadata header'.
1160 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1162         Move loader out of the kernel
1164         * kern/loader.c: moved to ...
1165         * commands/boot.c: ... moved here
1166         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1167         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1168         * include/grub/kernel.h (grub_machine_fini): export
1169         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1170         (grub_loader_set): likewise
1171         (grub_loader_unset): likewise
1172         (grub_loader_boot): likewise
1173         * conf/common.rmk: new module boot.mod
1174         (pkglib_MODULES): add boot.mod
1175         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1176         (grub_emu_SOURCES): likewise
1177         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1178         (grub_emu_SOURCES): likewise
1179         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1180         (grub_emu_SOURCES): likewise
1181         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1182         (grub_emu_SOURCES): likewise
1183         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1184         (grub_emu_SOURCES): likewise
1185         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1186         (grub_emu_SOURCES): likewise
1187         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1188         (grub_emu_SOURCES): likewise
1190 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1192         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1194         * kern/misc.c (grub_itoa): Removed function
1195         (grub_ltoa): likewise
1196         (grub_vsprintf): use grub_lltoa
1198 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1200         Restore grub-emu
1202         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1203         * conf/i386-coreboot.rmk: likewise
1204         * conf/i386-ieee1275.rmk: likewise
1205         * conf/powerpc-ieee1275.rmk: likewise
1207 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1209         * INSTALL: Add that `./autogen.sh' needs to be run before
1210         `./configure.'.
1212 2009-04-14  Bean  <bean123ch@gmail.com>
1214         * Makefile.in (pkglib_DATA): Add handler.lst.
1215         (handler.lst): New rule.
1217         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1218         * conf/i386-coreboot.rmk: Likewise.
1219         * conf/i386-ieee1275.rmk: Likewise.
1220         * conf/i386-efi.rmk: Likewise.
1221         * conf/x86_64-efi.rmk: Likewise.
1222         * conf/powerpc-ieee1275.rmk: Likewise.
1223         * conf/sparc64-ieee1275.rmk: Likewise.
1225         * genhandlerlist.sh: New file.
1227         * genmk.rb: Add rules to generate handler.lst.
1229         * include/grub/normal.h (grub_file_getline): New function definition.
1230         (read_handler_list): Likewise.
1231         (free_handler_list): Likewise.
1233         * include/grub/term.h (grub_term_register_input): Add name parameter
1234         for auto generation of handler.lst.
1235         (grub_term_register_output): Likewise.
1237         * normal/handler.c: New file.
1239         * normal/main.c (get_line): Renamed to grub_file_getline.
1240         (read_config_file): Use the newly renamed grub_file_getline.
1241         (read_command_list): Likewise.
1242         (read_fs_list): Likewise.
1243         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1244         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1246         * term/efi/console.c (grub_console_init): Add name parameter for auto
1247         generation of handler.lst.
1248         * term/gfxterm.c: Likewise.
1249         * term/i386/pc/at_keyboard.c: Likewise.
1250         * term/i386/pc/console.c: Likewise.
1251         * term/i386/pc/serial.c: Likewise.
1252         * term/i386/pc/vesafb.c: Likewise.
1253         * term/i386/pc/vga.c: Likewise.
1254         * term/i386/pc/vga_text.c: Likewise.
1255         * term/ieee1275/ofconsole.c: Likewise.
1256         * term/usb_keyboard.c: Likewise.
1258 2009-04-14  Bean  <bean123ch@gmail.com>
1260         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1261         properly with null character.
1263 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1265         * configure: Remove.
1266         * config.h.in: Likewise.
1267         * stamp-h.in: Likewise.
1268         * DISTLIST: Likewise.
1269         * conf/common.mk: Likewise.
1270         * conf/i386-coreboot.mk: Likewise.
1271         * conf/i386-efi.mk: Likewise.
1272         * conf/i386-ieee1275.mk: Likewise.
1273         * conf/i386.mk: Likewise.
1274         * conf/i386-pc.mk: Likewise.
1275         * conf/powerpc-ieee1275.mk: Likewise.
1276         * conf/sparc64-ieee1275.mk: Likewise.
1277         * conf/x86_64-efi.mk: Likewise.
1279         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1280         develop on GRUB.
1282 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1283             David S. Miller  <davem@davemloft.net>
1285         * util/hostdisk.c (make_device_name): Fix buffer length
1286         calculations.
1288 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1290         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1291         <sys/param.h> and <sys/sysctl.h>.
1292         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1293         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1294         opening the device and reset them afterwards.
1296 2009-04-13  Pavel Roskin  <proski@gnu.org>
1298         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1299         Reported by John Stanley <jpsinthemix@verizon.net>
1301 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1303         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1304         that name for menuentries when appropriate.
1306 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1308         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1310 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1312         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1313         to Linux, simply abort telling the user it's no longer supported.
1315 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1317         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1318         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1319         `freebsd_loadenv' only when devices.hints exist.
1321 2009-04-13  Pavel Roskin  <proski@gnu.org>
1323         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1325 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1327         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1328         partition number.
1329         (grub_drive): Likewise.
1331 2009-04-13  David S. Miller  <davem@davemloft.net>
1333         * kern/sparc64/ieee1275/ieee1275.c: New file.
1334         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1335         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1336         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1337         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1338         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1339         grub_ieee1275_alloc_physmem): Declare new exported functions.
1341         * include/grub/sparc64/ieee1275/loader.h: New file.
1342         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1343         * include/grub/sparc64/kernel.h: Likewise.
1344         * loader/sparc64/ieee1275/linux.c: Likewise.
1346         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1347         (grub_fstest_SOURCES): Likewise.
1349         * util/hostdisk.c (make_device_name): Do not make any assumptions
1350         about the length of drive names.
1352         * kern/dl.c (grub_dl_load_file): Close file immediately when
1353         we are done using it.
1355 2009-04-12  David S. Miller  <davem@davemloft.net>
1357         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1358         values.  Noticed by Pavel Roskin.
1360         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1361         target compiler.
1363         * genmk.rb: Add more flexible image type specification, also
1364         pass --strip-unneeded to objcopy.
1365         * conf/i386-pc.rmk: Use *_FORMAT.
1366         * conf/i386-pc.mk: Rebuilt.
1368         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1369         (OFDISK_HASH_SZ): Define.
1370         (ofdisk_hash): New hash table.
1371         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1372         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1373         instead of device phandle which is not unique.
1375         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1376         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1377         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1378         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1379         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1380         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1381         GRUB_KERNEL_MACHINE_DATA_END): Define.
1382         (grub_kernel_image_size, grub_total_module_size): Declare.
1384 2009-04-12  Pavel Roskin  <proski@gnu.org>
1386          * configure.ac: Change the logic when we check for target tools.
1387          Do it when the target is specified and it's different from the
1388          specified value of the host.
1390 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1392         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1393         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1394         GNU/kFreeBSD. Check if a device is a character device. Use
1395         DIOCGMEDIASIZE to get the size.
1396         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1397         support for GNU/kFreeBSD.
1398         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1399         is a character device instead of a block device. Add support for
1400         FreeBSD device names.
1402         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1403         is a character device instead of a block device.
1405         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1406         is a character device instead of a block device.
1408 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1410         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1411         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1412         FreeBSD. Check if a device is a character device. Use
1413         DIOCGMEDIASIZE to get the size.
1414         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1415         support for FreeBSD.
1416         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1417         is a character device instead of a block device. Add support for
1418         FreeBSD device names.
1420         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1421         a character device instead of a block device.
1422         (grub_util_check_char_device): New function.
1424         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1425         a character device instead of a block device.
1427         * include/grub/util/getroot.h (grub_util_check_char_device): New
1428         prototype.
1430 2009-04-11  David S. Miller  <davem@davemloft.net>
1432         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1433         static libgcc.
1434         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1435         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1436         function, if present.
1437         (__bswapdi2): Likewise.
1439         * include/grub/sparc64/ieee1275/boot.h: New file.
1440         * boot/sparc64/ieee1275/boot.S: Likewise.
1441         * boot/sparc64/ieee1275/diskboot.S: Likewise.
1443         * kern/misc.c (grub_ltoa): New function.
1444         (grub_vsprintf): Use it to format 'long' integers.
1446 2009-04-10  David S. Miller  <davem@davemloft.net>
1448         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1449         slots are of type grub_ieee1275_cell_t.
1450         (grub_nand_read): Likewise.
1451         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1452         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1453         macros are used to compare values in arg/ret block of the call.
1454         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1455         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1456         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1457         grub_ieee1275_instance_to_path, grub_ieee1275_write,
1458         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1459         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1460         grub_ieee1275_close, grub_ieee1275_set_property,
1461         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1462         grub_ieee1275_cell_t.
1463         * kern/ieee1275/openfw.c (grub_map): Likewise.
1464         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1465         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1467         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1468         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1469         (grub_devalias_iterate): Likewise.
1471 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
1473         UFS improvements
1475         * fs/ufs.c (INODE_NBLOCKS): new definition
1476         (struct grub_ufs_dirent): added fields for non-BSD dirents
1477         (grub_ufs_get_file_block): fixed double indirect handling
1478         (grub_ufs_lookup_symlink): use more robust way to determine whether
1479         symlink is inline
1480         (grub_ufs_find_file): support for non-BSD dirents
1481         (grub_ufs_dir): support for non-BSD dirents
1483 2009-04-10  Bean  <bean123ch@gnail.com>
1485         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1486         attribute, otherwise the size would be wrong for i386 platform.
1488         * include/grub/pci.h (grub_pci_read_word): New inline function.
1489         (grub_pci_read_byte): Likewise.
1490         (grub_pci_write): Likewise.
1491         (grub_pci_write_word): Likewise.
1492         (grub_pci_write_byte): Likewise.
1494         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1496         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1497         (find_framebuf): Scan pci to locate the frame buffer address.
1499         * commands/efi/fixvideo.c: New file.
1501         * commands/efi/loadbios.c: Likewise.
1503         * commands/memrw.c: Likewise.
1505         * util/grub-dumpbios.in: Likewise.
1507         * conf/common.rmk (grub-dumpbios): New utility.
1508         (pkglib_MODULES): New module memrw.mod.
1509         (memrw_mod_SOURCE): New macro.
1510         (memrw_mod_CFLAGS): Likewise.
1511         (memrw_mod_LDFLAGS): Likewise.
1513         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1514         fixvideo.mod.
1515         (loadbios_mod_SOURCE): New macro.
1516         (loadbios_mod_CFLAGS): Likewise.
1517         (loadbios_mod_LDFLAGS): Likewise.
1518         (fixvideo_mod_SOURCE): Likewise.
1519         (fixvideo_mod_CFLAGS): Likewise.
1520         (fixvideo_mod_LDFLAGS): Likewise.
1522         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1523         fixvideo.mod.
1524         (loadbios_mod_SOURCE): New macro.
1525         (loadbios_mod_CFLAGS): Likewise.
1526         (loadbios_mod_LDFLAGS): Likewise.
1527         (fixvideo_mod_SOURCE): Likewise.
1528         (fixvideo_mod_CFLAGS): Likewise.
1529         (fixvideo_mod_LDFLAGS): Likewise.
1531 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
1533         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1535 2009-04-07  David S. Miller  <davem@davemloft.net>
1537         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1538         support for R_SPARC_OLO10 relocations.  Fix compile warning for
1539         R_SPARC_WDISP30 case.
1540         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1542 2009-04-06  Pavel Roskin  <proski@gnu.org>
1544         * include/grub/misc.h (ARRAY_SIZE): New macro.
1545         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1546         New macro.
1547         * loader/i386/linux.c (allocate_pages): Use free_pages().
1548         (grub_linux_unload): Don't use free_pages().
1549         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1550         wrong index.  Treat all other modes as text modes.
1551         (grub_cmd_linux): Initialize vid_mode unconditionally to
1552         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
1554         * commands/help.c (print_command_help): Use cmd->prio, not
1555         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1557 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
1559         Parttool
1561         * parttool/pcpart.c: new file
1562         * commands/parttool.c: likewise
1563         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1564         (parttool_mod_SOURCES): new variable
1565         (parttool_mod_CFLAGS): likewise
1566         (parttool_mod_LDFLAGS): likewise
1567         (pcpart_mod_SOURCES): likewise
1568         (pcpart_mod_CFLAGS): likewise
1569         (pcpart_mod_LDFLAGS): likewise
1570         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1571         and parttool/pcpart.c
1572         * conf/i386-efi.rmk: likewise
1573         * conf/i386-ieee1275.rmk: likewise
1574         * conf/i386-pc.rmk: likewise
1575         * conf/powerpc-ieee1275.rmk: likewise
1576         * conf/sparc64-ieee1275.rmk: likewise
1577         * conf/x86_64-ieee1275.rmk: likewise
1579 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1581         Support for mtime and further expandability of dir command
1583         * include/grub/lib/datetime.h: moved to ...
1584         * include/grub/datetime.h: ... moved here and added
1585         declaration of grub_unixtime2datetime. All users updated
1586         * include/grub/fs.h: new syntax for dir and mtime functions in
1587         struct grub_fs
1588         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1589         and GRUB_FSHELP_FLAGS_MASK
1590         * commands/ls.c (grub_ls_list_files): Write mtime in long format
1591         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1592         (grub_ext2_mtime): new function
1593         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1594         (grub_hfsplus_mtime): new function
1595         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1596         (GRUB_UFS_ATTR_FILE): likewise
1597         (GRUB_UFS_ATTR_LNK): likewise
1598         (struct grub_ufs_sblock): new fields mtime
1599         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1600         all users updated
1601         (grub_ufs_dir): mtime support
1602         (grub_ufs_mtime): new function
1603         * fs/affs.c (grub_affs_dir): use new dir syntax
1604         * fs/afs.c (grub_afs_dir): likewise
1605         * fs/cpio.c (grub_cpio_dir): likewise
1606         * fs/fat.c (grub_fat_find_dir): likewise
1607         * fs/hfs.c (grub_hfs_dir): likewise
1608         * fs/iso9660.c (grub_iso9660_dir): likewise
1609         * fs/jfs.c (grub_jfs_dir): likewise
1610         * fs/minix.c (grub_minix_dir): likewise
1611         * fs/ntfs.c (grub_ntfs_dir): likewise
1612         * fs/reiserfs.c (grub_reiserfs_dir): likewise
1613         * fs/sfs.c (grub_sfs_dir): likewise
1614         * fs/xfs.c (grub_xfs_dir): likewise
1615         * util/hostfs.c (grub_hostfs_dir): likewise
1616         * lib/datetime.c: moved to ...
1617         * normal/datetime.c: ... moved here
1618         (grub_unixtime2datetime): new function
1619         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1620         * normal/completion.c (iterate_dir): use new dir syntax
1621         * normal/misc.c (grub_normal_print_device_info): tell the
1622         last modification time of a volume
1623         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1624         * conf/common.rmk: added lib/datetime.c to ls.mod
1625         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1626         (normal_mod_SOURCES): likewise
1627         (datetime_mod_SOURCES): Removed lib/datetime.c
1628         * conf/i386-efi.rmk: likewise
1629         * conf/i386-ieee1275.rmk: likewise
1630         * conf/i386-pc.rmk: likewise
1631         * conf/powerpc-ieee1275.rmk: likewise
1632         * conf/sparc64-ieee1275.rmk: likewise
1633         * conf/x86_64-efi.rmk: likewise
1635 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
1637         Trim trailing spaces in FAT label and support mtools-like labels
1639         * fs/fat.c (grub_fat_iterate_dir): New function based
1640         on grub_fat_find_dir
1641         (grub_fat_find_dir): use grub_fat_iterate_dir
1642         (grub_fat_label): likewise
1644 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
1646         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1647         and command.h
1648         remove extraneous kernel_elf_HEADERS
1650 2009-04-04  Bean  <bean123ch@gnail.com>
1652         * include/grub/util/misc.h: Add dummy function fsync for mingw.
1654         * util/misc.c: Likewise.
1656 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
1658         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1659         instead of grub_printf.
1661 2009-04-03  Robert Millan  <rmh@aybabtu.com>
1663         * loader/i386/linux.c (grub_linux_setup_video): Fill
1664         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1665         values from `mode info' structure instead of hardcoded
1666         values.
1668 2009-04-01  Pavel Roskin  <proski@gnu.org>
1670         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1671         unused now.
1672         * genmk.rb: Likewise.
1673         * configure.ac: Likewise.
1675 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
1677         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1678         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
1680 2009-04-01  David S. Miller  <davem@davemloft.net>
1682         * normal/sparc64/setjmp.S: Fix setjmp implementation.
1683         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1684         (grub_setjmp): Mark with 'returns_twice' attribute.
1685         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1686         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1687         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1689 2009-04-01  Robert Millan  <rmh@aybabtu.com>
1691         Reapply fix from 2008-07-28 which was accidentally reverted; also
1692         perform the same fix to a similar check in same function.
1694         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1695         with the same number are found, just use issue a warning with
1696         grub_dprintf(), as this error has been reported to be non-fatal.
1698 2009-03-31  Pavel Roskin  <proski@gnu.org>
1700         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1701         for cross-compilation.
1703 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1705         Fix i386-ieee1275 build.
1707         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1708         Remove declaration.
1710 2009-03-30  Pavel Roskin  <proski@gnu.org>
1712         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1713         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
1714         zero-terminated, rely only on the strlen value.  Fix comparison
1715         of strings differing in length.
1717 2009-03-30  Robert Millan  <rmh@aybabtu.com>
1719         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1720         checking for abi version.  Improve error messages on BIOS to notify
1721         user about `linux16' command.
1723 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
1725         Leak fixes
1727         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1728         in case of collision
1729         * disk/scsi.c (grub_scsi_open): free scsi in case of error
1731 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1733         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1734         set `vid_mode' accordingly.
1735         (grub_linux_boot): Process `vid_mode' and set video mode.
1737 2009-03-29  Robert Millan  <rmh@aybabtu.com>
1739         * util/grub.d/10_linux.in (linux_entry): New function.
1740         Factorize generation of Linux boot entries.
1742 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
1744         Make the format of Environment Block plain text. The boot loader
1745         part is not tested well yet.
1747         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1748         (buffer): Removed.
1749         (envblk): Likewise.
1750         (usage): Remove "info" and "clear". Add "unset". Update the
1751         description of "set", as this does not delete variables any
1752         longer.
1753         (create_envblk_file): Complete rewrite.
1754         (open_envblk_file): Likewise.
1755         (cmd_info): Removed.
1756         (cmd_list): Likewise.
1757         (cmd_set): Likewise.
1758         (cmd_clear): Likewise.
1759         (list_variables): New function.
1760         (write_envblk): Likewise.
1761         (set_variables): Likewise.
1762         (unset_variables): Likewise.
1763         (main): Complete rewrite.
1765         * commands/loadenv.c (buffer): Removed.
1766         (envblk): Likewise.
1767         (open_envblk_file): New function.
1768         (read_envblk_file): Complete rewrite.
1769         (grub_cmd_load_env): Likewise.
1770         (grub_cmd_list_env): Likewise.
1771         (struct blocklist): New struct.
1772         (free_blocklists): New function.
1773         (check_blocklists): Likewise.
1774         (write_blocklists): Likewise.
1775         (grub_cmd_save_env): Complete rewrite.
1777         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1778         a plain text signature.
1779         (GRUB_ENVBLK_MAXLEN): Removed.
1780         (struct grub_envblk): Complete rewrite.
1781         (grub_envblk_find): Removed.
1782         (grub_envblk_insert): Likewise.
1783         (grub_envblk_open): New prototype.
1784         (grub_envblk_set): Likewise.
1785         (grub_envblk_delete): Put const to VALUE.
1786         (grub_envblk_iterate): Put const to NAME and VALUE.
1787         (grub_envblk_close): New prototype.
1788         (grub_envblk_buffer): New inline function.
1789         (grub_envblk_size): Likewise.
1791         * lib/envblk.c: Include grub/mm.h.
1792         (grub_env_find): Removed.
1793         (grub_envblk_open): New function.
1794         (grub_envblk_close): Likewise.
1795         (escaped_value_len): Likewise.
1796         (find_next_line): Likewise.
1797         (grub_envblk_insert): Removed.
1798         (grub_envblk_set): New function.
1799         (grub_envblk_delete): Complete rewrite.
1800         (grub_envblk_iterate): Likewise.
1802 2009-03-28  Robert Millan  <rmh@aybabtu.com>
1804         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1805         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1806         variables.  Use 16-bit loader.
1807         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1808         loader.
1809         * kern/i386/loader.S (grub_linux_boot): Rename to ...
1810         (grub_linux16_boot): ... this.  Update all users.
1811         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1812         (grub_linux_boot): ... this.  Update all users.
1814         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1815         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
1816         commands to `linux16' and `initrd16'.
1817         (GRUB_MOD_FINI(linux)): Rename to ...
1818         (GRUB_MOD_FINI(linux16)): ... this.
1820 2009-03-24  Pavel Roskin  <proski@gnu.org>
1822         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1823         not just for compilation.
1825 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
1827         Move multiboot helper out of kernel
1829         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1830         `loader/i386/multiboot_helper.S'.
1831         * conf/i386-coreboot.rmk: Likewise
1832         * conf/i386-ieee1275.rmk: Likewise
1834         * kern/i386/loader.S: Move multiboot helpers from here...
1835         * loader/i386/multiboot_helper.S: ...moved here
1836         * include/grub/i386/loader.h: Move declarations of multiboot
1837         helpers from here...
1838         * include/grub/i386/multiboot.h: ...moved here
1839         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1841 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1843         * kern/env.c (grub_env_context_open): Added an argument to specify
1844         whether a new context inherits exported variables from current
1845         one. This is useful when making a sandbox to interpret a config
1846         file.
1847         All callers updated.
1849         * include/grub/env.h (grub_env_context_open): Updated the prototype.
1851 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1853         * kern/env.c (grub_env_context_close): Fix memory leaks.
1855 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
1857         * normal/main.c (grub_normal_execute): Added an argument
1858         BATCH to specify if an interactive interface should be provided
1859         after reading a config file.
1860         All callers updated.
1861         (read_command_list): Prevent being executed twice.
1862         (read_fs_list): Likewise.
1864         * include/grub/normal.h (grub_normal_execute): Updated the
1865         prototype.
1867 2009-03-22  Pavel Roskin  <proski@gno.org>
1869         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1870         _start.
1871         * kern/i386/pc/startup.S: Likewise.
1872         * kern/i386/efi/startup.S: Likewise.
1873         * kern/i386/ieee1275/startup.S: Likewise.
1874         * kern/i386/coreboot/startup.S: Likewise.
1875         * kern/x86_64/efi/startup.S: Likewise.
1877         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1878         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1879         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1881 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
1883         Bugfixes in multiboot for bugs uncovered by solaris kernel.
1885         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1886         limit detection.
1887         Use vaddr of correct segment for entry_point.
1889 2009-03-21  Bean  <bean123ch@gmail.com>
1891         * commands/blocklist.c: Add include file <grub/command.h>, remove
1892         <grub/normal.h> and <grub/arg.h>.
1893         (grub_cmd_blocklist): Use the new command interface.
1894         (GRUB_MOD_INIT): Likewise.
1895         (GRUB_MOD_FINI): Likewise.
1896         * commands/boot.c: Likewise.
1897         * commands/cat.c: Likewise.
1898         * commands/cmp.c: Likewise.
1899         * commands/configfile.c: Likewise.
1900         * commands/crc.c: Likewise.
1901         * commands/echo.c: Likewise.
1902         * commands/halt.c: Likewise.
1903         * commands/handler.c: Likewise.
1904         * commands/hdparm.c: Likewise.
1905         * commands/help.c: Likewise.
1906         * commands/hexdump.c: Likewise.
1907         * commands/loadenv.c: Likewise.
1908         * commands/ls.c: Likewise.
1909         * commands/lsmmap.c: Likewise.
1910         * commands/lspci.c: Likewise.
1911         * commands/loadenv.c: Likewise.
1912         * commands/read.c: Likewise.
1913         * commands/reboot.c: Likewise.
1914         * commands/search.c: Likewise.
1915         * commands/sleep.c: Likewise.
1916         * commands/test.c: Likewise.
1917         * commands/usbtest.c: Likewise.
1918         * commands/videotest.c: Likewise.
1919         * commands/i386/cpuid.c: Likewise.
1920         * commands/i386/pc/halt.c: Likewise.
1921         * commands/i386/pc/play.c: Likewise.
1922         * commands/i386/pc/pxecmd.c: Likewise.
1923         * commands/i386/pc/vbeinfo.c: Likewise.
1924         * commands/i386/pc/vbetest.c: Likewise.
1925         * commands/ieee1275/suspend.c: Likewise.
1926         * disk/loopback.c: Likewise.
1927         * font/font_cmd.c: Likewise.
1928         * hello/hello.c: Likewise.
1929         * loader/efi/appleloader.c: Likewise.
1930         * loader/efi/chainloader.c: Likewise.
1931         * loader/i386/bsd.c: Likewise.
1932         * loader/i386/efi/linux.c: Likewise.
1933         * loader/i386/ieee1275/linux.c: Likewise.
1934         * loader/i386/linux.c: Likewise.
1935         * loader/i386/pc/chainloader.c: Likewise.
1936         * loader/i386/pc/linux.c: Likewise.
1937         * loader/powerpc/ieee1275/linux.c: Likewise.
1938         * loader/multiboot_loader.c: Likewise.
1939         * term/gfxterm.c: Likewise.
1940         * term/i386/pc/serial.c: Likewise.
1941         * term/terminfo.c: Likewise.
1943         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1944         * term/i386/pc/vga.c: Likewise.
1945         * video/readers/jpeg.c: Likewise.
1946         * video/readers/png.c: Likewise.
1947         * video/readers/tga.c: Likewise.
1949         * util/grub-fstest (cmd_loopback): Removed.
1950         (cmd_blocklist): Likewise.
1951         (cmd_ls): Likewise.
1952         (grub_register_command): Likewise.
1953         (grub_unregister_command): Likewise.
1954         (execute_command): Use grub_command_find to locate command and execute
1955         it.
1957         * include/grub/efi/chainloader.h: Removed.
1958         * loader/efi/chainloader_normal.c: Likewise.
1959         * loader/i386/bsd_normal.c: Likewise.
1960         * loader/i386/pc/chainloader_normal.c: Likewise.
1961         * loader/i386/pc/multiboot_normal.c: Likewise.
1962         * loader/linux_normal.c: Likewise.
1963         * loader/multiboot_loader_normal.c: Likewise.
1964         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1966         * gencmdlist.sh: Scan new registration command grub_register_extcmd
1967         and grub_register_command_p1.
1969         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1970         kern/command.c, lib/arg.c and commands/extcmd.c.
1971         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1972         (minicmd_mod_SOURCES): New variable.
1973         (minicmd_mod_CFLAGS): Likewise.
1974         (minicmd_mod_LDFLAGS): Likewise.
1975         (extcmd_mod_SOURCES): Likewise.
1976         (extcmd_mod_CFLAGS): Likewise.
1977         (extcmd_mod_LDFLAGS): Likewise.
1978         (boot_mod_SOURCES): Removed.
1979         (boot_mod_CFLAGS): Likewise.
1980         (boot_mod_LDFLAGS): Likewise.
1982         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1983         kern/corecmd.c.
1984         (kernel_img_HEADERS): Add command.h.
1985         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1986         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1987         and lib/arg.c.
1988         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1989         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1990         remove the corresponding normal mode command.
1991         (normal_mod_SOURCES): Remove normal/arg.c.
1992         * conf/i386-coreboot.rmk: Likewise.
1993         * conf/i386-efi.rmk: Likewise.
1994         * conf/i386-ieee1275.rmk: Likewise.
1995         * conf/powerpc-ieee1275.rmk: Likewise.
1996         * conf/x86_64-efi.rmk: Likewise.
1998         * include/grub/arg.h: Move from here ...
1999         * include/grub/lib/arg.h: ... to here.
2001         * normal/arg.c: Move from here ...
2002         * lib/arg.c: ... to here.
2004         * commands/extcmd.c: New file.
2005         * commands/minicmd.c: Likewise.
2006         * include/grub/command.h: Likewise.
2007         * include/grub/extcmd.h: Likewise.
2008         * kern/command.c: Likewise.
2009         * kern/corecmd.c: Likewise.
2011         * kern/list.c (grub_list_iterate): Return int instead of void.
2012         (grub_list_insert): New function.
2013         (grub_prio_list_insert): Likewise.
2015         * kern/rescue.c (grub_rescue_command): Removed.
2016         (grub_rescue_command_list): Likewise.
2017         (grub_rescue_register_command): Likewise.
2018         (grub_rescue_unregister_command): Likewise.
2019         (grub_rescue_cmd_boot): Move to minicmd.c
2020         (grub_rescue_cmd_help): Likewise.
2021         (grub_rescue_cmd_info): Likewise.
2022         (grub_rescue_cmd_boot): Likewise.
2023         (grub_rescue_cmd_testload): Likewise.
2024         (grub_rescue_cmd_dump): Likewise.
2025         (grub_rescue_cmd_rmmod): Likewise.
2026         (grub_rescue_cmd_lsmod): Likewise.
2027         (grub_rescue_cmd_exit): Likewise.
2028         (grub_rescue_print_devices): Moved to corecmd.c.
2029         (grub_rescue_print_files): Likewise.
2030         (grub_rescue_cmd_ls): Likewise.
2031         (grub_rescue_cmd_insmod): Likewise.
2032         (grub_rescue_cmd_set): Likewise.
2033         (grub_rescue_cmd_unset): Likewise.
2034         (attempt_normal_mode): Use grub_command_find to get normal module.
2035         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2036         commands, remove grub_rescue_register_command calls.
2038         * normal/command.c (grub_register_command): Removed.
2039         (grub_unregister_command): Likewise.
2040         (grub_command_find): Likewise.
2041         (grub_iterate_commands): Likewise.
2042         (rescue_command): Likewise.
2043         (export_command): Moved to corecmd.c.
2044         (set_command): Removed.
2045         (unset_command): Likewise.
2046         (insmod_command): Likewise.
2047         (rmmod_command): Likewise.
2048         (lsmod_command): Likewise.
2049         (grub_command_init): Likewise.
2051         * normal/completion.c (iterate_command): Use cmd->prio to check for
2052         active command.
2053         (complete_arguments): Use grub_extcmd_t structure to find options.
2054         (grub_normal_do_completion): Change function grub_iterate_commands to
2055         grub_command_iterate.
2057         * normal/execute.c (grub_script_execute_cmd): No need to parse
2058         argument here.
2060         * normal/main.c (grub_dyncmd_dispatcher): New function.
2061         (read_command_list): Register unload commands as dyncmd.
2062         (grub_cmd_normal): Use new command interface, register rescue,
2063         unregister normal at entry, register normal, unregister rescue at exit.
2065         * include/grub/list.h (grub_list_test_t): New type.
2066         (grub_list_iterate): Return int instead of void.
2067         (grub_list_insert): New function.
2068         (GRUB_AS_NAMED_LIST_P): New macro.
2069         (GRUB_AS_PRIO_LIST): Likewise.
2070         (GRUB_AS_PRIO_LIST_P): Likewise.
2071         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2072         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2073         (grub_prio_list): New structure.
2074         (grub_prio_list_insert): New function.
2075         (grub_prio_list_remove): New inline function.
2077         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2078         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2079         (GRUB_COMMAND_FLAG_MENU): Likewise.
2080         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2081         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2082         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2083         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2084         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2085         (grub_command): Likewise.
2086         (grub_register_command): Likewise.
2087         (grub_command_find): Likewise.
2088         (grub_iterate_commands): Likewise.
2089         (grub_command_init): Likewise.
2090         (grub_arg_parse): Likewise.
2091         (grub_arg_show_help): Likewise.
2093         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2094         (grub_rescue_unregister_command): Likewise.
2096         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2097         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2098         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2100         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2101         grub_rescue_cmd_initrd.
2102         * include/grub/i386/loader.h: Likewise.
2103         * include/grub/x86_64/loader.h: Likewise.
2105         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2107 2009-03-21  Bean  <bean123ch@gmail.com>
2109         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2110         instead of stat in mingw environment.
2112         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2114         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2116         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2117         AC_CONFIG_LINKS.
2119 2009-03-21  Bean  <bean123ch@gmail.com>
2121         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2122         out of range error.
2124 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2126         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2127         checking inode flags for EXT4_EXTENTS_FLAG.
2129 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2131         * loader/i386/linux.c: Include `<grub/video.h>' and
2132         `<grub/i386/pc/vbe.h>'..
2133         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2134         (grub_linux32_boot): Attempt to configure video settings with
2135         grub_linux_setup_video().
2136         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2137         to avoid grub_console_fini() which would step out of graphical mode
2138         unconditionally.
2140 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2142         Fix build on powerpc.
2143         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2145 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2147         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2148         background image command.
2150 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2152         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2153         (grub_gfxterm_putchar): Extract pairs of identical calls to
2154         draw_cursor out of conditional blocks.
2156 2009-03-11  Pavel Roskin  <proski@gnu.org>
2158         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2159         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2161 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2163         * loader/i386/multiboot_elfxx.c
2164         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2166 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2168         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2169         `kern/handler.c'.
2171 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2173         * loader/i386/multiboot.c (code_size): New variable.
2174         (grub_multiboot): Define offsets by adding to `code_size' rather
2175         than subtracting from `grub_multiboot_payload_size'.  Provide
2176         4-byte alignment to MBI and others by increasing
2177         `boot_loader_name_length' appropriately.
2179         * loader/i386/multiboot_elfxx.c
2180         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2182 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2184         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2185         `fs/ext2.c'.
2187 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2189         Make loader/i386/linux.c usable on i386-pc again.
2191         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2192         memory to heap.
2193         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2194         `#error' stanza.
2196 2009-03-07  Bean  <bean123ch@gmail.com>
2198         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2199         allocation.
2201 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2203         Fix display issue on terminals with screen size other than 80x25
2204         (e.g. gfxterm with resolution higher than 640x480).
2206         * normal/main.c (grub_normal_init_page): Display title text in a
2207         position relative to the center of the terminal instead of relying
2208         on a hardcoded offset.
2210 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2212         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2213         installed.
2215         * Makefile.in (host_kernel): New variable.
2216         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2217         scripts instead of just the windows one.
2218         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2220 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2222         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2223         `kern/handler.c'.
2224         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2225         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2226         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2227         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2228         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2229         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2231 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2233         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2234         or if there's no space for the disk label and print the partition number on a
2235         invalid magic.
2237 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2239         * util/misc.c: Include <time.h>.
2240         (grub_millisleep): New function.
2242 2009-03-04  Bean  <bean123ch@gmail.com>
2244         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2245         another option -mno-red-zone.
2247         * commands/handler.c: Change module description.
2249         * kern/handler.c: Add missing space at the end of description line.
2251         * kern/list.c: Likewise.
2253 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2255         Move more components to the relocation area, and fix mbi pointer
2256         handling to use the destination rather than the origin (thanks to
2257         Vladimir Serbinenko for spotting).
2259         * loader/i386/multiboot.c (mbi_dest): New variable.
2260         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2261         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2262         relocation area.
2264 2009-03-01  Bean  <bean123ch@gmail.com>
2266         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2267         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2268         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2269         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2271         * loader/i386/efi/linux.c (acpi_guid): New variable.
2272         (acpi_guid): Likewise.
2273         (EBDA_SEG_ADDR): New constant.
2274         (LOW_MEM_ADDR): Likewise.
2275         (FAKE_EBDA_SEG): Likewise.
2276         (fake_bios_data): New function.
2277         (grub_linux_boot): Call fake_bios_data.
2279 2009-03-01  Bean  <bean123ch@gmail.com>
2281         * commands/terminal.c: Removed.
2283         * commands/handler.c: New file.
2285         * include/grub/list.h: Likewise.
2287         * include/grub/handler.h: Likewise.
2289         * kern/list.c: Likewise.
2291         * kern/handler.c: Likewise.
2293         * kern/term.h: Include header file <grub/handler.h>.
2294         (grub_term_input): Move next field to the beginning.
2295         (grub_term_output): Likewise.
2296         (grub_term_input_class): New variable.
2297         (grub_term_output_class): Likewise.
2298         (grub_term_register_input): Changed to inline function.
2299         (grub_term_register_output): Likewise.
2300         (grub_term_unregister_input): Likewise.
2301         (grub_term_unregister_output): Likewise.
2302         (grub_term_set_current_input): Likewise.
2303         (grub_term_set_current_output): Likewise.
2304         (grub_term_get_current_input): Likewise.
2305         (grub_term_get_current_output): Likewise.
2306         (grub_term_iterate_input): Removed.
2307         (grub_term_iterate_output): Likewise.
2309         * kern/term.c (grub_term_list_input): Removed.
2310         (grub_term_list_output): Likewise.
2311         (grub_term_input_class): New variable.
2312         (grub_term_output_class): Likewise.
2313         (grub_cur_term_input): Change variable as macro.
2314         (grub_cur_term_output): Likewise.
2315         (grub_term_register_input): Removed.
2316         (grub_term_register_output): Likewise.
2317         (grub_term_unregister_input): Likewise.
2318         (grub_term_unregister_output): Likewise.
2319         (grub_term_set_current_input): Likewise.
2320         (grub_term_set_current_output): Likewise.
2321         (grub_term_iterate_input): Likewise.
2322         (grub_term_iterate_output): Likewise.
2323         (grub_term_get_current_input): Likewise.
2324         (grub_term_get_current_output): Likewise.
2326         * util/grub-editenv.c: Include header file <grub/handler.h>.
2327         (grub_term_get_current_input): Removed.
2328         (grub_term_get_current_output): Likewise.
2329         (grub_term_input_class): New variable.
2330         (grub_term_output_class): Likewise.
2332         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2333         (grub_term_get_current_output): Likewise.
2334         (grub_term_input_class): New variable.
2335         (grub_term_output_class): Likewise.
2337         * util/grub-probe.c (grub_term_get_current_input): Removed.
2338         (grub_term_get_current_output): Likewise.
2339         (grub_term_input_class): New variable.
2340         (grub_term_output_class): Likewise.
2342         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2343         (grub_term_get_current_output): Likewise.
2344         (grub_term_input_class): New variable.
2345         (grub_term_output_class): Likewise.
2347         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2348         (terminal_mod_SOURCES): Likewise.
2349         (terminal_mod_CFLAGS): Likewise.
2350         (terminal_mod_LDFLAGS): Likewise.
2352         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2353         handler.c.
2354         (kernel_img_SOURCES): Add list.c and handler.c.
2355         (kernel_img_HEADERS): Add list.h and handler.h.
2357         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2358         handler.c.
2359         (kernel_mod_SOURCES): Add list.c and handler.c.
2360         (kernel_mod_HEADERS): Add list.h and handler.h.
2362         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2363         handler.c.
2364         (kernel_elf_SOURCES): Add list.c and handler.c.
2365         (kernel_elf_HEADERS): Add list.h and handler.h.
2367         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2368         handler.c.
2369         (kernel_elf_SOURCES): Add list.c and handler.c.
2370         (kernel_elf_HEADERS): Add list.h and handler.h.
2372         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2373         handler.c.
2374         (kernel_mod_SOURCES): Add list.c and handler.c.
2375         (kernel_mod_HEADERS): Add list.h and handler.h.
2377         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2378         handler.c.
2379         (kernel_elf_SOURCES): Add list.c and handler.c.
2380         (kernel_elf_HEADERS): Add list.h and handler.h.
2382 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2384         Factorize elf32 / elf64 code in Multiboot loader.  This will
2385         prevent it from getting out of sync again.
2387         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2388         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2389         grub_multiboot_load_elf64): Move from here ...
2390         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2391         grub_multiboot_load_elf): ... to here (new file).
2393 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2395         * util/grub.d/10_linux.in: Rename "single-user mode" to
2396         "recovery mode".
2398 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2400         Don't leak in SCSI code.
2401         * disk/scsi.c (grub_scsi_close): free `scsi'.
2403 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2405         * loader/i386/pc/multiboot.c: Move from here ...
2406         * loader/i386/multiboot.c: ... to here.  Update all users.
2408 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2410         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2411         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2413 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2415         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2416         b-tree.
2418 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2420         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2421         `0x' qualifier as 0 when base is specified as parameter).
2423 2009-02-24  Bean  <bean123ch@gmail.com>
2425         * configure.ac: Check for -mcmodel=large in x86_64 target.
2427         * include/grub/efi/api.h (efi_call_10): New macro.
2428         (efi_wrap_10): New function.
2430         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2431         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2432         (GRUB_PE32_REL_BASED_LOW): Likewise.
2433         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2434         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2435         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2436         (GRUB_PE32_REL_BASED_SECTION): Likewise.
2437         (GRUB_PE32_REL_BASED_REL): Likewise.
2438         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2439         (GRUB_PE32_REL_BASED_DIR64): Likewise.
2440         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2442         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2443         issue.
2445         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2446         (efi_wrap_10): New function.
2448         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2450         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2451         MB/MBP model (NV chipset).
2452         (devdata_devs): Add devpath_5 to the list.
2454         * load/i386/efi/linux.c (video_base): Remove variable.
2455         (RGB_MASK): New macro.
2456         (RGB_MAGIC): Likewise.
2457         (LINE_MIN): Likewise.
2458         (LINE_MAX): Likewise.
2459         (FBTEST_STEP): Likewise.
2460         (FBTEST_COUNT): Likewise.
2461         (fb_list): New variable.
2462         (grub_find_video_card): Remove function.
2463         (find_framebuf): New function.
2464         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2465         line length.
2467         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2468         problem for x86_64.
2470 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
2472         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2474         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2475         coding tool name.
2477 2009-02-22  Robert Millan  <rmh@aybabtu.com>
2479         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2480         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2481         in our relocation, instead of using it directly from heap.  Also
2482         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2484 2009-02-21  Robert Millan  <rmh@aybabtu.com>
2486         Implement USB keyboard support (based on patch by Marco Gerards)
2488         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2489         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2490         (usb_keyboard_mod_LDFLAGS): New variables.
2492         * term/usb_keyboard.c: New file.
2494 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
2496         Corrected wrong declaration
2498         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2500 2009-02-14  Christian Franke  <franke@computer.org>
2502         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2503         (grub_lspci_iter): Print class code and programming interface byte.
2505 2009-02-14  Christian Franke  <franke@computer.org>
2507         * gendistlist.sh: Ignore `.svn' directories.
2509 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
2511         * fs/fat.c: Add 2009 to Copyright line.
2513 2009-02-14  Christian Franke  <franke@computer.org>
2515         * commands/hdparm.c: New file.  Provides `hdparm' command
2516         which sends ATA commands via grub_disk_ata_pass_through ().
2518         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2520         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
2521         and <grub/cpu/io.h> to include/grub/ata.h.
2522         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2523         (GRUB_CDROM_SECTOR_SIZE): Remove.
2524         (GRUB_ATA_*): Move to include/grub/ata.h.
2525         (GRUB_ATAPI_*): Likewise.
2526         (enum grub_ata_commands): Likewise.
2527         (enum grub_ata_timeout_milliseconds): Likewise.
2528         (struct grub_ata_device): Likewise.
2529         (grub_ata_regset): Likewise.
2530         (grub_ata_regget): Likewise.
2531         (grub_ata_regset2): Likewise.
2532         (grub_ata_regget2): Likewise.
2533         (grub_ata_check_ready): Likewise.
2534         (grub_ata_wait_not_busy): Remove static, exported in
2535         include/grub/ata.h.
2536         (grub_ata_wait_drq): Likewise.
2537         (grub_ata_pio_read): Likewise.
2539         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
2540         function for hdparm.mod.
2542         * include/grub/ata.h: New file, contains declarations from
2543         disk/ata.c.
2544         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2546         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2547         (grub_disk_ata_pass_through): New exported variable.
2549         * kern/disk.c (grub_disk_ata_pass_through): New variable.
2551 2009-02-13  Colin D Bennett  <colin@gibibit.com>
2553         Support multiple fallback entries, and provide an API to support
2554         executing default+fallback menu entries.  Renamed the `terminal' menu
2555         viewer to `text'.
2557         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2558         variable declaration.
2559         (grub_menu_execute_callback): New structure declaration.
2560         (grub_menu_execute_callback_t): New typedef.
2561         (grub_menu_execute_with_fallback): New function declaration.
2562         (grub_menu_get_entry): Likewise.
2563         (grub_menu_get_timeout): Likewise.
2564         (grub_menu_set_timeout): Likewise.
2566         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2568         * normal/menu.c (grub_wait_after_message): Moved to
2569         `normal/menu_text.c'.
2570         (draw_border): Likewise.
2571         (print_message): Likewise.
2572         (print_entry): Likewise.
2573         (print_entries): Likewise.
2574         (grub_menu_init_page): Likewise.
2575         (get_entry_number): Likewise.
2576         (print_timeout): Likewise.
2577         (run_menu): Likewise.
2578         (grub_menu_execute_entry): Likewise.
2579         (show_text_menu): Likewise.
2580         (get_and_remove_first_entry_number): New function.
2581         (grub_menu_execute_with_fallback): Likewise.
2582         (get_entry): Renamed to ...
2583         (grub_menu_get_entry): .. this and made it global.
2584         (get_timeout): Renamed to ...
2585         (grub_menu_get_timeout): ... this and made it global.
2586         (set_timeout): Renamed to ...
2587         (grub_menu_set_timeout): ... this and made it global.
2588         (grub_normal_terminal_menu_viewer): Renamed to ...
2589         (grub_normal_text_menu_viewer): ... this.
2591         * normal/menu_text.c: New file.  Extracted text-menu-specific code
2592         from normal/menu.c.
2594         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2595         (normal_mod_SOURCES): Likewise.
2597         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2598         (normal_mod_SOURCES): Likewise.
2600         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2601         (normal_mod_SOURCES): Likewise.
2603         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2604         (normal_mod_SOURCES): Likewise.
2606         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2607         (normal_mod_SOURCES): Likewise.
2609         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2610         (normal_mod_SOURCES): Likewise.
2612         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2613         (normal_mod_SOURCES): Likewise.
2615 2009-02-11  Robert Millan  <rmh@aybabtu.com>
2617         * util/grub.d/00_header.in: Update old reference to `font' command.
2619 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
2621         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2623         Based on patch from Javier Martín.
2625 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2627         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2628         to avoid false positives with FAT.
2629         (grub_fstest_SOURCES): Likewise.
2630         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2631         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2632         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2633         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2634         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2635         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2637 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
2639         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2640         bpb.version_specific.fat12_or_fat16.fstype and
2641         bpb.version_specific.fat32.fstype.
2643 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2645         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2647 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2649         * Makefile.in (host_os, host_cpu): New variables.
2650         (target_os): Remove.  Update all users.
2652 2009-02-08  Marco Gerards  <marco@gnu.org>
2654         * Makefile.in (enable_grub_emu_usb): New variable.
2655         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2656         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2657         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2658         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2659         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2660         `usbtest.mod' and `usbms.mod'.
2661         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2662         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2663         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2664         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2665         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2666         variables.
2668         * disk/usbms.c: New file.
2670         * include/grub/usb.h: Likewise.
2672         * include/grub/usbtrans.h: Likewise.
2674         * include/grub/usbdesc.h: Likewise.
2676         * bus/usb/usbtrans.c: Likewise.
2678         * bus/usb/ohci.c: Likewise.
2680         * bus/usb/uhci.c: Likewise.
2682         * bus/usb/usbhub.c: Likewise.
2684         * bus/usb/usb.c: Likewise.
2686         * commands/usbtest.c: Likewise.
2688         * util/usb.c: Likewise.
2690         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2692         * configure.ac: Test for libusb presence.
2694         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2696 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
2698         * kern/mm.c: Add more comments.
2700 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2702         Patch from Javier Martín.
2703         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2704         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2706 2009-02-08  Robert Millan  <rmh@aybabtu.com>
2708         * fs/cpio.c: Split tar functionality to ...
2709         * fs/tar.c: ... here (new file).  Update all users.
2711 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2713         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2714         backward-incompatible features.
2716         Based on patch from Javier Martín, with some adjustments.
2718 2009-02-07  Michael Scherer  <misc@mandriva.org>
2720         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2722 2009-02-07  Robert Millan  <rmh@aybabtu.com>
2724         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2725         position of `disk/lvm.c' to ensure grub_init_all() always picks it
2726         after the RAID stuff.
2728 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
2730         Fixes problem when running vbetest command as reported by
2731         Vladimir Serbinenko <phcoder@gmail.com>.
2733         * (grub_vbe_set_video_mode): Fixed problem with text modes.
2735 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
2737         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2738         /dev/md/NpN style mdraid devices.
2740 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2742         * util/unifont2pff.rb: Remove.
2744 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2746         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2747         `#'.
2749 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
2751         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2752         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2753         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2754         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2755         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2756         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2757         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2759 2009-02-02  Christian Franke  <franke@computer.org>
2761         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2763 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
2765         * INSTALL: Note that we now require at least autoconf 2.59 and
2766         that LZO is optional.
2768 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2770         Base on patch on bug #24154 created by Tomas Tintera
2771         <trosos@seznam.cz>.
2773         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2775 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
2777         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2778         <bero@arklinux.org>.
2780         * normal/parser.y (script_init): Add missing semicolon.
2782 2009-01-31  Colin D Bennett  <colin@gibibit.com>
2784         * normal/main.c: Add include to grub/menu_viewer.h.
2785         (free_menu_entry_classes): Added.
2786         (grub_normal_menu_addentry): Added class property handling.
2787         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2788         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2790         * normal/menu_viewer.c: New file.
2792         * normal/menu.c (run_menu_entry): Renamed to ...
2793         (grub_menu_execute_entry): ... this and made it as global.
2794         (grub_menu_run): Renamed to ...
2795         (show_text_menu): ... this and made it local.
2796         (show_text_menu): Adapt to new function names.
2797         (grub_normal_terminal_menu_viewer): New global variable.
2799         * include/grub/menu.h: New file.
2801         * include/grub/menu_viewer.h: New file.
2803         * include/grub/normal.h: Added include to grub/menu.h.
2804         (grub_menu_entry): Moved to include/grub/menu.h.
2805         (grub_menu_entry_t): Likewise.
2806         (grub_menu): Likewise.
2807         (grub_menu_t): Likewise.
2808         (grub_normal_terminal_menu_viewer): Added.
2809         (grub_menu_execute_entry): Likewise.
2810         (grub_menu_run): Removed.
2812         * DISTLIST: Added include/grub/menu.h.
2813         Added include/grub/menu_viewer.h.
2814         Added normal/menu_viewer.c.
2816 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
2818         * normal/execute.c (grub_script_execute_menuentry): Changed to use
2819         arglist for menutitle arguments.
2821         * normal/main.c (grub_normal_menu_addentry): Likewise.
2823         * normal/parser.y (menuentry): Likewise.
2825         * normal/script.c (grub_script_create_cmdmenu): Likewise.
2827         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2828         (grub_script_create_cmdmenu): Likewise.
2830         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2832         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2833         changes.
2835         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2837         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2839         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2841         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2843         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2845         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2847 2009-01-30  Christian Franke  <franke@computer.org>
2849         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2850         in option help text.
2852 2009-01-27  Pavel Roskin  <proski@gnu.org>
2854         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2856 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2858         * commands/lsmmap.c: Add include to grub/machine/memory.h.
2860         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2862         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2863         unregister function.
2865 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
2867         * disk/scsi.c (grub_scsi_read): Fix sign problem.
2869         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2871         * util/grub-mkfont.c (usage): Fix typo.
2873         * util/elf/grub-mkimage.c (load_modules): Fix warning.
2875 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
2877         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2879         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2881         * kern/misc.c (grub_strcasecmp): New function.
2882         (grub_strcasecmp): Use grub_size_t instead of int for length.
2883         Fix return value.
2884         * include/grub/misc.h: Update function prototypes.
2886 2009-01-26  Robert Millan  <rmh@aybabtu.com>
2888         * configure.ac: Fix cross-compilation check.
2890 2009-01-22  Christian Franke  <franke@computer.org>
2892         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2893         (precision) digit string.  Allow `.format2' without `format1' (width).
2894         Limit input chars for `%s' output to `format2' if specified.  This is
2895         compatible with standard printf ().
2897 2009-01-22  Christian Franke  <franke@computer.org>
2899         * disk/ata.c (grub_ata_wait_status): Replace by ...
2900         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
2901         other status bits may be invalid while BSY is asserted.
2902         (grub_ata_check_ready): New function.
2903         (grub_ata_cmd): Removed.
2904         (grub_ata_wait_drq): New function.
2905         (grub_ata_strncpy): Remove inline.
2906         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
2907         and error check now done by grub_ata_wait_drq ().
2908         (grub_ata_pio_write): Likewise.
2909         (grub_atapi_identify): Set DEV before check for !BSY.  Use
2910         grub_ata_wait_drq () to wait for data.
2911         (grub_ata_device_initialize): Add status register check to
2912         detect missing SATA slave devices.  Add debug messages.
2913         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2914         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
2915         transfer loop by grub_ata_pio_write ().
2916         (grub_ata_identify): Set DEV before check for !BSY. Use
2917         grub_ata_wait_drq () to wait for data.
2918         (grub_ata_setaddress): Set DEV before check for !BSY.
2919         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2920         read/write in one loop.  Fix invalid command on write.  Fix incomplete
2921         command on (size % batch) == 0.  Add missing error check after write of
2922         last block.  Add debug messages.
2923         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
2925 2009-01-19  Christian Franke  <franke@computer.org>
2927         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2928         (GRUB_ATAPI_IREASON_*): Likewise.
2929         (grub_ata_pio_write): Fix timeout error return.
2930         (grub_atapi_identify): Add grub_ata_wait () after cmd.
2931         (grub_atapi_wait_drq): New function.
2932         (grub_atapi_packet): New parameter `size'.
2933         Use grub_atapi_wait_drq () and direct write instead of
2934         grub_ata_pio_write ().
2935         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2936         reads the number of bytes requested by the device for each DRQ
2937         assertion.
2938         (grub_atapi_write): Remove old implementation, return not
2939         implemented instead.
2941 2009-01-19  Christian Franke  <franke@computer.org>
2943         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2944         of 512 to calculate data size.
2945         (grub_scsi_read12): Likewise.
2946         (grub_scsi_write10): Likewise.
2947         (grub_scsi_write12): Likewise.
2948         (grub_scsi_read): Adjust size according to blocksize.
2949         Add checks for invalid blocksize and unaligned transfer.
2951 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
2953         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2955         * term/gfxterm.c (write_char): Fix background rendering for wide
2956         width glyphs.
2958 2009-01-19  Robert Millan  <rmh@aybabtu.com>
2960         * config.guess: Update to latest version from config git.
2961         * config.sub: Likewise.
2963 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
2965         * Makefile.in: Change font compilation to use new grub-mkfont instead
2966         of java version.
2968         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2969         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2970         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2971         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2972         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2973         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2974         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2975         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2976         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2978 2009-01-16  Christian Franke  <franke@computer.org>
2980         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2981         (enum grub_ata_timeout_milliseconds): New enum.
2982         (grub_ata_wait_status): Add parameter milliseconds.
2983         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
2984         recovery from timed-out commands.
2985         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
2986         return grub_errno instead of REG_ERROR.
2987         (grub_ata_pio_write): Add parameter milliseconds.
2988         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2989         Pass milliseconds to grub_ata_wait_status () and
2990         grub_ata_pio_read ().
2991         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2992         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
2993         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
2994         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2995         It is not suitable for device detection, because DEV bit is ignored,
2996         the command may run too long, and not all devices set the signature
2997         properly.
2998         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2999         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3000         Fix device selection, DEV bit must be set first to address the registers
3001         of the correct device.
3002         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3003         grub_ata_pio_read/write ().
3004         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3005         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3007 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3009         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3011 2009-01-13  Bean  <bean123ch@gmail.com>
3013         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3015 2009-01-13  Bean  <bean123ch@gmail.com>
3017         * Makefile.in: (enable_grub_mkfont): New variable.
3018         (freetype_cflags): Likewise.
3019         (freetype_libs): Likewise.
3021         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3022         (grub_mkfont_SOURCES): New variable.
3023         (grub_mkfont_CFLAGS): Likewise.
3024         (grub_mkfont_LDFLAGS): Likewise.
3026         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3027         library if `--enable-grub-mkfont' is requested.
3028         (enable_grub_mkfont): New variable.
3029         (freetype_cflags): Likewise.
3030         (freetype_libs): Likewise.
3032         * util/grub-mkfont.c: New file.
3034 2009-01-12  Christian Franke  <franke@computer.org>
3036         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3037         mode check.  Fix setting of compat_use[].
3039 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3041         Update a few copyright years which we forgot to do in 2008 (only for
3042         files whose changes made in 2008 were copyright-significant)
3044         * Makefile.in: Add 2008 to Copyright line.
3045         * disk/ieee1275/ofdisk.c: Likewise.
3046         * disk/efi/efidisk.c: Likewise.
3047         * kern/dl.c: Likewise.
3048         * kern/sparc64/ieee1275/init.c: Likewise.
3049         * kern/mm.c: Likewise.
3050         * kern/efi/mm.c: Likewise.
3051         * boot/i386/pc/boot.S: Likewise.
3052         * genfslist.sh: Likewise.
3053         * fs/iso9660.c: Likewise.
3054         * fs/hfs.c: Likewise.
3055         * fs/jfs.c: Likewise.
3056         * fs/minix.c: Likewise.
3057         * fs/ufs.c: Likewise.
3058         * gensymlist.sh.in: Likewise.
3059         * genkernsyms.sh.in: Likewise.
3060         * include/grub/misc.h: Likewise.
3061         * include/grub/types.h: Likewise.
3062         * include/grub/symbol.h: Likewise.
3063         * include/grub/elf.h: Likewise.
3064         * include/grub/kernel.h: Likewise.
3065         * include/grub/disk.h: Likewise.
3066         * include/grub/dl.h: Likewise.
3067         * include/grub/i386/linux.h: Likewise.
3068         * include/grub/i386/pc/biosdisk.h: Likewise.
3069         * include/grub/efi/api.h: Likewise.
3070         * include/grub/efi/pe32.h: Likewise.
3071         * include/grub/util/misc.h: Likewise.
3072         * normal/execute.c: Likewise.
3073         * normal/arg.c: Likewise.
3074         * normal/completion.c: Likewise.
3075         * normal/lexer.c: Likewise.
3076         * normal/parser.y: Likewise.
3077         * normal/misc.c: Likewise.
3078         * commands/i386/pc/vbeinfo.c: Likewise.
3079         * commands/hexdump.c: Likewise.
3080         * commands/terminal.c: Likewise.
3081         * commands/ls.c: Likewise.
3082         * commands/help.c: Likewise.
3083         * partmap/pc.c: Likewise.
3084         * loader/efi/chainloader.c: Likewise.
3085         * loader/multiboot_loader.c: Likewise.
3086         * loader/i386/pc/multiboot2.c: Likewise.
3087         * term/efi/console.c: Likewise.
3088         * term/i386/pc/serial.c: Likewise.
3089         * util/lvm.c: Likewise.
3090         * util/console.c: Likewise.
3091         * util/i386/efi/grub-mkimage.c: Likewise.
3092         * util/raid.c: Likewise.
3094 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3096         * commands/videotest.c: Removed include to grub/machine/memory.h.
3098         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3099         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3100         (video_mod_SOURCES): Removed.
3101         (video_mod_CFLAGS): Likewise.
3102         (video_mod_LDFLAGS): Likewise.
3103         (gfxterm_mod_SOURCES): Likewise.
3104         (gfxterm_mod_CFLAGS): Likewise.
3105         (gfxterm_mod_LDFLAGS): Likewise.
3106         (videotest_mod_SOURCES): Likewise.
3107         (videotest_mod_CFLAGS): Likewise.
3108         (videotest_mod_LDFLAGS): Likewise.
3109         (bitmap_mod_SOURCES): Likewise.
3110         (bitmap_mod_CFLAGS): Likewise.
3111         (bitmap_mod_LDFLAGS): Likewise.
3112         (tga_mod_SOURCES): Likewise.
3113         (tga_mod_CFLAGS): Likewise.
3114         (tga_mod_LDFLAGS): Likewise.
3115         (jpeg_mod_SOURCES): Likewise.
3116         (jpeg_mod_CFLAGS): Likewise.
3117         (jpeg_mod_LDFLAGS): Likewise.
3118         (png_mod_SOURCES): Likewise.
3119         (png_mod_CFLAGS): Likewise.
3120         (png_mod_LDFLAGS): Likewise.
3122         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3123         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3124         (video_mod_SOURCES): Added.
3125         (video_mod_CFLAGS): Likewise.
3126         (video_mod_LDFLAGS): Likewise.
3127         (videotest_mod_SOURCES): Likewise.
3128         (videotest_mod_CFLAGS): Likewise.
3129         (videotest_mod_LDFLAGS): Likewise.
3130         (bitmap_mod_SOURCES): Likewise.
3131         (bitmap_mod_CFLAGS): Likewise.
3132         (bitmap_mod_LDFLAGS): Likewise.
3133         (tga_mod_SOURCES): Likewise.
3134         (tga_mod_CFLAGS): Likewise.
3135         (tga_mod_LDFLAGS): Likewise.
3136         (jpeg_mod_SOURCES): Likewise.
3137         (jpeg_mod_CFLAGS): Likewise.
3138         (jpeg_mod_LDFLAGS): Likewise.
3139         (png_mod_SOURCES): Likewise.
3140         (png_mod_CFLAGS): Likewise.
3141         (png_mod_LDFLAGS): Likewise.
3142         (gfxterm_mod_SOURCES): Likewise.
3143         (gfxterm_mod_CFLAGS): Likewise.
3144         (gfxterm_mod_LDFLAGS): Likewise.
3146         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3147         grub/machine/console.h.
3149 2009-01-04  Jerone Young  <jerone@gmail.com>
3151         Make on screen instructions clearer
3153         Based on patch created by Jidanni <jidanni@jidanni.org>
3155         * normal/menu.c: print clearer instructions on the screen
3157 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3159         New font engine.
3161         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3162         build system and fixed gfxterm.c to work with different sized fonts.
3164         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3166         * configure: Re-generated.
3168         * DISTLIST: Removed font/manager.c.
3169         Added font/font.c.
3170         Added font/font_cmd.c.
3172         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3173         compilation.
3175         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3177         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3179         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3181         * normal/menu.c: Likewise.
3183         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3184         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3186         * include/grub/font.h: Replaced with new file.
3188         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3189         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3190         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3191         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3192         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3193         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3194         fg_red, fg_green, fg_blue, fg_alpha.
3195         (grub_video_adapter): Removed blit_glyph.
3196         (grub_video_blit_glyph): Removed.
3198         * font/manager.c: Removed file.
3200         * font/font.c: New file.
3202         * font/font_cmd.c: Likewise.
3204         * video/video.c (grub_video_blit_glyph): Removed.
3206         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3207         (grub_video_vbe_map_rgba): Likewise.
3208         (grub_video_vbe_unmap_color_int): Likewise.
3209         (grub_video_vbe_blit_glyph): Removed.
3210         (grub_video_vbe_adapter): Removed blit_glyph.
3212         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3213         (get_pixel): Likewise.
3214         (set_pixel): Likewise.
3216         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3218         * term/gfxterm.c: Adapted to new font engine.
3220         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3222         * term/i386/pc/vga.c: Likewise.
3224         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3226         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3228         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3230         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3232         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3234         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3236         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3238         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3240         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3242         * util/grub.d/00_header.in: Changed to use new loadfont command.
3244         * util/grub-mkconfig_lib.in: Changed font extension.
3246 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3248         * util/getroot.c (grub_util_get_grub_dev): Add support for
3249         /dev/md/dNNpNN style partitionable mdraid devices.
3251 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3253         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3254         at a time limit of the PXE TFTP API correctly.
3255         (grub_pxefs_close): Likewise.
3257 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3259         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3260         grub_ata_device_initialize() calls.
3262 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3264         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3265         iteration failed.
3266         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3268 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3270         Fix build on powerpc-ieee1275.  Based on patch created by
3271         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3272         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3273         `kern/ieee1275/mmap.c'.
3274         * include/grub/powerpc/ieee1275/memory.h: New file.
3276         Provide grub-install on coreboot.
3277         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3278         (grub_install_SOURCES): New variable.
3279         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3280         usable on coreboot.
3282 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3284         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3285         to `grub_term_input_t'.
3286         (grub_term_get_current_output): Change return type to
3287         `grub_term_output_t'.
3289 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3291         Fix breakage on coreboot due to declaration mismatch.
3292         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3293         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3294         grub_vga_text_cls().
3296         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3297         comments.  Avoid copying one more byte than necessary (just in case).
3299         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3300         to 0x200000 (avoids trouble with some OFW implementations, and matches
3301         with the one in Yaboot).
3302         Reported by Manoel Abranches
3304 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3306         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3307         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3309         * util/grub-mkconfig_lib.in (grub_warn): New function.
3310         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3311         warnings, to obtain consistent formatting.
3312         * util/grub.d/00_header.in: Likewise.
3313         * util/update-grub_lib.in: Likewise.
3315         * loader/i386/linux.c (allocate_pages): Fix a warning.
3316         Move comment text to `#error' stanza.
3318         Harmonize ieee1275's grub_available_iterate() with the generic
3319         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3320         build problem on i386-ieee1275):
3321         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3322         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3323         parameter `type'.  Update all users of this function.
3324         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3325         `kern/ieee1275/mmap.c'.
3326         * kern/ieee1275/init.c
3327         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3328         with ...
3329         (grub_machine_mmap_iterate): ... this.
3330         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3331         return type to `grub_err_t'.  Update all implementations of this
3332         function prototype.
3333         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3334         Likewise.
3336         Add `lsmmap' command (lists firmware-provided memory map):
3337         * commands/lsmmap.c: New file.
3338         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3339         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3340         variables.
3341         * conf/powerpc-ieee1275.rmk: Likewise.
3342         * conf/i386-coreboot.rmk: Likewise.
3343         * conf/i386-ieee1275.rmk: Likewise.
3345 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3347         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3348         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3349         constraints to initrd allocation (based on code from
3350         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3351         for Linux to find it.
3353 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3355         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3356         order to cope with duplicate slashes.
3358 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3360         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3361         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3362         don't want to mess with lower memory, because it is used in the Linux
3363         loader.
3365         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3366         an appropriate place in lower memory, between 0x10000 and 0x90000,
3367         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3368         is in our heap (probably as a result of it being corrupted during
3369         decompression).  Add #error instance with comment to explain why this
3370         loader isn't currently usable on PC/BIOS.
3372 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3374         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3375         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3377 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3379         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3381         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3382         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3383         from here ...
3384         * include/grub/i386/pc/memory.h: ... to here.
3386 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3388         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3389         split).
3391         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3392         (grub_console_cur_color, grub_console_real_putchar)
3393         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3394         (grub_console_setcolorstate, grub_console_setcolor)
3395         (grub_console_getcolor): Move from here ...
3396         * include/grub/i386/vga_common.h: ... to here (new file).
3398         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3399         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3400         `<grub/i386/io.h>'.
3401         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3402         `<grub/i386/vga_common.h>'.
3404 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3406         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3407         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3408         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3409         variables.
3410         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3411         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3413         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3414         grub_console_init() with call to grub_vga_text_init().
3415         (grub_machine_fini): Replace call to
3416         grub_console_fini() with call to grub_vga_text_fini() and
3417         grub_at_keyboard_fini().
3419         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3420         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3421         (grub_console_setcolorstate, grub_console_setcolor)
3422         (grub_console_getcolor): New function prototypes.
3424         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3425         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3426         (grub_vga_text_setcursor): Static-ize.
3427         (grub_vga_text_term): New structure.
3428         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3430         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3431         (grub_console_cur_color, grub_console_standard_color)
3432         (grub_console_normal_color, grub_console_highlight_color)
3433         (map_char, grub_console_putchar, grub_console_getcharwidth)
3434         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3435         (grub_console_getcolor): Move from here ...
3436         * term/i386/vga_common.c: ... to here (same function names).
3438 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3440         Use newly-added Multiboot support in coreboot.
3442         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3443         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3445         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3446         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3447         (codestart): Store the MBI in `startup_multiboot_info' when we're
3448         being loaded using Multiboot.
3450         * kern/i386/coreboot/init.c (grub_machine_init): Move
3451         grub_at_keyboard_init() call to beginning of function (useful for
3452         debugging).  Call grub_machine_mmap_init() before attempting to use
3453         grub_machine_mmap_iterate().
3454         (grub_lower_mem, grub_upper_mem): Move from here ...
3455         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3456         here (new file).
3458         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3459         function prototype.
3461 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3463         Fix a regression introduced by the at_keyboard.mod split.  Because
3464         some terminals are default on some platforms and non-default on
3465         others, the first terminal being registered determines which is
3466         going to be default.
3468         * kern/term.c (grub_term_register_input): If this is the first
3469         terminal being registered, set it as the current one.
3470         (grub_term_register_output): Likewise.
3472         * term/efi/console.c (grub_console_init): Do not call
3473         grub_term_set_current_output() or grub_term_set_current_input().
3474         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3475         * term/i386/pc/console.c (grub_console_init): Likewise.
3476         (grub_console_fini): Do not call grub_term_set_current_input()
3477         (but leave grub_term_set_current_output() to restore text mode).
3479 2008-11-10  Robert Millan  <rmh@aybabtu.com>
3481         * util/grub.d/00_header.in: Add backward compatibility check for
3482         versions of terminal.mod that don't understand `terminal_input' or
3483         `terminal_output'.
3485 2008-11-09  Robert Millan  <rmh@aybabtu.com>
3487         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3488         `terminal_input' / `terminal_output', not `terminal'.
3490 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3492         * Makefile.in (include_DATA): Fix srcdir=. assumption.
3493         (DISTCLEANFILES): Add `build_env.mk'.
3495 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3497         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3498         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
3499         members.  Update all users.
3500         * util/console.c (grub_ncurses_term): Split in ...
3501         (grub_ncurses_term_input): ... this, and ...
3502         (grub_ncurses_term_output): ... this.  Update all users.
3503         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3505 2008-11-08  Robert Millan  <rmh@aybabtu.com>
3507         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3508         (PKGDATA): Add $(pkgdata_SRCDIR).
3509         (pkglib_BUILDDIR): New variable.
3510         (pkgdata_SRCDIR): New variable.
3511         (build_env.mk): New target.
3512         (include_DATA): New variable.
3513         (install-local): Install $(include_DATA) files in $(includedir).
3515 2008-11-07  Pavel Roskin  <proski@gnu.org>
3517         * gendistlist.sh: Use C locale for sorting to ensure consistent
3518         output on all systems.
3520         * util/grub.d/00_header.in: Remove incorrect space before
3521         "serial".
3523 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3525         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3526         per specification.
3527         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3528         * loader/multiboot_loader.c (find_multi_boot2_header): New function
3529         (based on find_multi_boot1_header).
3530         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3531         using find_multi_boot2_header(), and abort if neither Multiboot or
3532         Multiboot headers were found.
3534 2008-11-07  Robert Millan  <rmh@aybabtu.com>
3536         Modularize at_keyboard.mod:
3538         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3539         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3540         (at_keyboard_mod_LDFLAGS): New variables.
3542         Actual terminal split:
3544         * include/grub/term.h (struct grub_term): Split in ...
3545         (struct grub_term_input): ... this, and ...
3546         (struct grub_term_output): ... this.  Update all users.
3547         (grub_term_set_current): Split in ...
3548         (grub_term_set_current_input): ... this, and ...
3549         (grub_term_set_current_output): ... this.
3550         (grub_term_get_current): Split in ...
3551         (grub_term_get_current_input): ... this, and ...
3552         (grub_term_get_current_output): ... this.
3553         (grub_term_register): Split in ...
3554         (grub_term_register_input): ... this, and ...
3555         (grub_term_register_output): ... this.
3556         (grub_term_unregister): Split in ...
3557         (grub_term_unregister_input): ... this, and ...
3558         (grub_term_unregister_output): ... this.
3559         (grub_term_iterate): Split in ...
3560         (grub_term_iterate_input): ... this, and ...
3561         (grub_term_iterate_output): ... this.
3563         * kern/term.c (grub_term_list): Split in ...
3564         (grub_term_list_input): ... this, and ...
3565         (grub_term_list_output): ... this.  Update all users.
3566         (grub_cur_term): Split in ...
3567         (grub_cur_term_input): ... this, and ...
3568         (grub_cur_term_output): ... this.  Update all users.
3569         (grub_term_set_current): Split in ...
3570         (grub_term_set_current_input): ... this, and ...
3571         (grub_term_set_current_output): ... this.
3572         (grub_term_get_current): Split in ...
3573         (grub_term_get_current_input): ... this, and ...
3574         (grub_term_get_current_output): ... this.
3575         (grub_term_register): Split in ...
3576         (grub_term_register_input): ... this, and ...
3577         (grub_term_register_output): ... this.
3578         (grub_term_unregister): Split in ...
3579         (grub_term_unregister_input): ... this, and ...
3580         (grub_term_unregister_output): ... this.
3581         (grub_term_iterate): Split in ...
3582         (grub_term_iterate_input): ... this, and ...
3583         (grub_term_iterate_output): ... this.
3585         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3586         a check for input and one for output (and only attempt to get keys
3587         from user when input works).
3589         * util/grub-probe.c (grub_term_get_current): Split in ...
3590         (grub_term_get_current_input): ... this, and ...
3591         (grub_term_get_current_output): ... this.
3592         * util/grub-fstest.c: Likewise.
3593         * util/i386/pc/grub-setup.c: Likewise.
3594         * util/grub-editenv.c: Likewise.
3596         Portability adjustments:
3598         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3599         `term/i386/pc/at_keyboard.c'.
3600         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3601         grub_keyboard_controller_init() (now handled by terminal .init).
3602         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3603         grub_at_keyboard_init().
3604         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3605         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3606         at_keyboard.mod via input terminal interface).
3607         * include/grub/i386/coreboot/console.h: Convert into a stub for
3608         `<grub/i386/pc/console.h>'.
3610         Migrate full terminals to new API:
3612         * term/efi/console.c (grub_console_term): Split into ...
3613         (grub_console_term_input): ... this, and ...
3614         (grub_console_term_output): ... this.  Update all users.
3615         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3616         (grub_ofconsole_init): Split into ...
3617         (grub_ofconsole_init_input): ... this, and ...
3618         (grub_ofconsole_init_output): ... this.
3619         (grub_ofconsole_term): Split into ...
3620         (grub_ofconsole_term_input): ... this, and ...
3621         (grub_ofconsole_term_output): ... this.  Update all users.
3622         * term/i386/pc/serial.c (grub_serial_term): Split into ...
3623         (grub_serial_term_input): ... this, and ...
3624         (grub_serial_term_output): ... this.  Update all users.
3625         * term/i386/pc/console.c (grub_console_term): Split into ...
3626         (grub_console_term_input): ... this, and ...
3627         (grub_console_term_output): ... this.  Update all users.
3628         (grub_console_term_input): Only enable it on PC/BIOS platform.
3629         (grub_console_init): Remove grub_keyboard_controller_init() call.
3631         Migrate input terminals to new API:
3633         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3634         `i386' and `i386/pc' to enable build on x86_64 (this driver is
3635         i386-specific anyway).
3636         (grub_console_checkkey): Rename to ...
3637         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
3638         users.
3639         (grub_keyboard_controller_orig): New variable.
3640         (grub_console_getkey): Rename to ...
3641         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
3642         users.
3643         (grub_keyboard_controller_init): Static-ize.  Save original
3644         controller value so that it can be restored ...
3645         (grub_keyboard_controller_fini): ... here (new function).
3646         (grub_at_keyboard_term): New structure.
3647         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3648         functions.
3650         Migrate output terminals to new API:
3652         * term/i386/pc/vga.c (grub_vga_term): Change type to
3653         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3654         members.  Update all users.
3655         * term/gfxterm.c (grub_video_term): Change type to
3656         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
3657         members.  Update all users.
3658         * include/grub/i386/pc/console.h (grub_console_checkkey)
3659         (grub_console_getkey): Do not export (no longer needed by gfxterm,
3660         etc).
3662         Migrate `terminal' command and userland tools to new API:
3664         * commands/terminal.c (grub_cmd_terminal): Split into ...
3665         (grub_cmd_terminal_input): ... this, and ...
3666         (grub_cmd_terminal_output): ... this.
3667         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3668         `terminal_input' and `terminal_output'.
3669         * util/grub.d/00_header.in: Adjust `terminal' calls to new
3670         `terminal_input' / `terminal_output' API.
3671         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3672         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3673         provided ${GRUB_TERMINAL}, convert it).
3675 2008-11-04  Robert Millan  <rmh@aybabtu.com>
3677         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
3678         for FreeBSD.
3679         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3681 2008-11-03  Bean  <bean123ch@gmail.com>
3683         * kern/elf.c (grub_elf32_load): Revert to previous code.
3684         (grub_elf64_load): Likewise.
3686         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3688 2008-11-01  Robert Millan  <rmh@aybabtu.com>
3690         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3691         (TARGET_CPPFLAGS): Likewise.
3692         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3694 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
3696         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3698 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3700         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3701         addition of objects until the code is not going to be able to fail.
3703 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
3705         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3706         (add a missing NULL check, and correct them by moving the pointer
3707         operations after the actual check).
3709 2008-10-29  Robert Millan  <rmh@aybabtu.com>
3711         * util/i386/pc/grub-install.in: Handle empty string as output from
3712         make_system_path_relative_to_its_root().
3714 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
3716         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3717         circular metadata worst case scenario. If the metadata is circular
3718         then copy the wrap in place.
3719         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3720         project lib/format_text/layout.h
3721         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3723 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3725         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3727 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
3729         * util/update-grub_lib.in: Mention filename in warning message.
3731 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3733         * NEWS: Update for rename of update-grub to grub-mkconfig.
3735 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
3737         * util/update-grub_lib.in: Copy to ...
3738         * util/grub-mkconfig_lib.in: ... this.  Update all users.
3739         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3740         * util/update-grub.in: Rename to ...
3741         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
3742         option. Add `--output' option to allow users to specify the generated
3743         configuration file.  Default to stdout.
3744         (update_grub_dir): Rename to ...
3745         (grub_mkconfig_dir): ... this.
3746         (grub_cfg): Default to an empty string.
3747         * conf/common.rmk (update-grub): Rename to ...
3748         (grub-mkconfig): ... this.
3749         (update-grub_lib): Copy to ...
3750         (grub-mkconfig_lib): ... this.
3751         (update-grub_SCRIPTS): Copy to ...
3752         (grub-mkconfig_SCRIPTS): ... this. Update all users.
3753         (update-grub_DATA): Rename to ...
3754         (grub-mkconfig_DATA): ... this.
3756 2008-09-28  Robert Millan  <rmh@aybabtu.com>
3758         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3759         to `modified'.  Add the real `created' field.
3760         (grub_iso9660_uuid): Use `modified' rather than `created' for
3761         constructing the UUID.
3763 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
3765         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3766         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3768 2008-09-28  Bean  <bean123ch@gmail.com>
3770         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3771         Thanks to Christian Franke for finding this bug.
3773 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3775         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3776         instances of grub_util_get_disk_name() (see previous commit).
3778 2008-09-25  Robert Millan  <rmh@aybabtu.com>
3780         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3781         `util/i386/get_disk_name.c'.
3782         * conf/i386-efi.rmk: Likewise.
3783         * conf/x86_64-efi.rmk: Likewise.
3784         * conf/i386-coreboot.rmk: Likewise.
3785         * conf/i386-ieee1275.rmk: Likewise.
3786         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3787         `util/ieee1275/get_disk_name.c'.
3788         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3789         * util/ieee1275/get_disk_name.c: Remove file.
3790         * util/i386/get_disk_name.c: Remove file.
3791         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3792         "hd%d" for device.map entries, rather than using
3793         grub_util_get_disk_name().
3795 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3797         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3798         warning.
3799         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3801 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
3803         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3804         Changed to 0x5100.
3805         (GRUB_TERM_PPAGE): Changed to 0x4900.
3807 2008-09-24  Robert Millan  <rmh@aybabtu.com>
3809         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3810         macros (they were i386-pc specific).
3811         * include/grub/sparc64/ieee1275/console.h: Likewise.
3812         * include/grub/efi/console.h: Likewise.
3814 2008-09-22  Bean  <bean123ch@gmail.com>
3816         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3817         resident and in attribute list.
3819         * include/grub/ntfs.h (BMP_LEN): Removed.
3821 2008-09-22  Bean  <bean123ch@gmail.com>
3823         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3824         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3826         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3827         error occurs, as grub_disk_open will call grub_disk_close, which will
3828         call p->close (scsi).
3830 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3832         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3833         (AC_PREREQ): Bumped to 2.59.
3834         (AC_TRY_COMPILE): Replace obsolete macro with ...
3835         (AC_COMPILE_IFELSE): ... this.
3836         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3837         (AC_LINK_IFELSE): ... this.
3839 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
3841         * autogen.sh: Add a call to `gendistlist.sh'.
3843 2008-09-19  Christian Franke  <franke@computer.org>
3845         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3846         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3847         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3848         Export __enable_execute_stack() to modules.
3849         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3850         New function.
3852 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3854         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3855         Sort the list.
3857 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
3859         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3860         #include <grub/util/hostdisk.h>.
3862 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3864         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3865         segments when their filesz is zero (grub_file_read() interprets
3866         zero-size as "read until EOF", which results in memory corruption).
3867         Use `lowest_segment' rather than 0 for calculating the current
3868         segment load address.
3870 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3872         * util/hostdisk.c (open_device): Replace a grub_util_info() call
3873         with grub_dprintf("hostdisk", ...), as it was so verbose that it
3874         clobbered useful information.
3876 2008-09-08  Robert Millan  <rmh@aybabtu.com>
3878         * include/grub/util/biosdisk.h: Move to ...
3879         * include/grub/util/hostdisk.h: ... here.  Update all users.
3880         * util/biosdisk.c: Move to ...
3881         * util/hostdisk.c: ... here.  Update all users.
3883 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3885         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3886         variables.
3887         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3888         and length can be stored directly in the `mbi->mmap_addr' and
3889         `mbi->mmap_length' struct fields.
3891 2008-09-07  Robert Millan  <rmh@aybabtu.com>
3893         * conf/i386.rmk: New file.  Provides declaration for building
3894         `cpuid.mod'.
3895         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3896         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3897         variables.
3898         Include `conf/i386.mk'.
3899         * conf/i386-efi.rmk: Likewise.
3900         * conf/x86_64-efi.rmk: Likewise.
3901         * conf/i386-coreboot.rmk: Likewise.
3902         * conf/i386-ieee1275.rmk: Likewise.
3904 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
3906         Based on patch created by Colin D Bennett <colin@gibibit.com>.
3907         Adds optimization support for BGR based modes.
3909         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3910         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3911         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3912         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3913         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3914         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3915         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3916         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3917         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3918         (grub_video_i386_vbeblit_index_index): Likewise.
3919         (grub_video_i386_vbeblit_replace_directN): Added.
3920         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3921         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3922         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3923         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3924         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3925         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3926         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3927         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3928         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3929         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3930         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3931         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3932         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3934         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3935         (grub_video_i386_vbefill_R8G8B8): Likewise.
3936         (grub_video_i386_vbefill_index): Likewise.
3937         (grub_video_i386_vbefill_direct32): Added.
3938         (grub_video_i386_vbefill_direct24): Likewise.
3939         (grub_video_i386_vbefill_direct16): Likewise.
3940         (grub_video_i386_vbefill_direct8): Likewise.
3942         * include/grub/video.h (grub_video_blit_format): Removed
3943         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3944         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3945         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3946         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3947         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3949         * video/video.c (grub_video_get_blit_format): Updated to use new
3950         blit formats.  Added handling for 16 bit color modes.
3952         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3953         fillers.
3954         (common_blitter): Updated to use new blitters.
3956         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3957         Removed.
3958         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3959         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3960         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3961         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3962         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3963         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3964         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3965         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3966         (grub_video_i386_vbeblit_index_index): Likewise.
3967         (grub_video_i386_vbeblit_replace_directN): Added.
3968         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3969         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3970         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3971         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3972         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3973         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3974         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3975         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3976         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3977         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3978         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3979         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3980         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3982         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3983         (grub_video_i386_vbefill_R8G8B8): Likewise.
3984         (grub_video_i386_vbefill_index): Likewise.
3985         (grub_video_i386_vbefill_direct32): Added.
3986         (grub_video_i386_vbefill_direct24): Likewise.
3987         (grub_video_i386_vbefill_direct16): Likewise.
3988         (grub_video_i386_vbefill_direct8): Likewise.
3990         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3991         types.
3993         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3994         types.
3996         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3997         blitter types.
3999         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4000         types.
4002 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4004         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4005         RAID level 1.
4007 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4009         * fs/iso9660.c (grub_iso9660_date): New structure.
4010         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4011         (grub_iso9660_uuid): New function.
4013 2008-09-05  Bean  <bean123ch@gmail.com>
4015         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4017         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4018         insensitive bit for names in Win32 and Win32 & DOS namespace.
4020         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4022         * include/grub/types.h (LONG_MAX): Likewise.
4024 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4026         * util/getroot.c: Include <config.h>.
4027         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4028         add support for /dev/md/N devices and handle LVM double dash escaping.
4030 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4032         * config.guess: Update to latest version from config git.
4033         * config.sub: Likewise.
4035 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4037         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4038         `disk->total_sectors'.
4040 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4042         * include/grub/normal.h: Fixed incorrect comment for
4043         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4045 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4047         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4048         values with defines.
4050         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4051         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4052         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4053         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4054         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4055         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4056         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4057         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4058         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4059         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4060         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4061         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4062         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4063         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4064         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4065         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4066         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4067         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4068         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4070 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4072         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4073         declaration.
4074         (grub_multiboot): Fix a few warnings.
4076 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4078         * loader/i386/pc/multiboot.c: Update comment not to say that
4079         boot_device support is unimplemented.
4081 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4083         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4084         or memory map support are unimplemented.
4086 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4088         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4090 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4092         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4093         total video memory in 'vbeinfo' output; show color format details for
4094         each video mode.
4096 2008-08-30  Pavel Roskin  <proski@gnu.org>
4098         * util/genmoddep.c: Remove for real this time.
4099         * DISTLIST: Remove util/genmoddep.c.
4101 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4103         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4104         as required by Multiboot spec (it was already 4-byte aligned, but
4105         only by chance).
4107 2008-08-29  Pavel Roskin  <proski@gnu.org>
4109         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4110         * kern/powerpc/ieee1275/startup.S: ... this.
4111         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4112         * DISTLIST: Likewise.
4114         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4115         grub/cpu/kernel.h.  Add start label for consistency with other
4116         platforms.  Add grub_prefix immediately after start.  Add jump
4117         to the code after grub_prefix.
4118         * include/grub/powerpc/kernel.h: Provide valid values for
4119         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4121 2008-08-29  Bean  <bean123ch@gmail.com>
4123         * configure.ac: Change host_os to cygwin for mingw.
4124         (asprintf): New check for function.
4126         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4127         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4129         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4130         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4131         sync, sleep and grub_util_get_disk_size for mingw.
4133         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4134         to get size in mingw.
4135         (open_device): Use flag O_BINARY if it's defined.
4136         (find_root_device): Add dummy code for mingw.
4138         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4139         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4140         (get_scsi_disk_name): Return 0 for mingw.
4142         * util/hostfs.c: #include <grub/util/misc.h>.
4143         (grub_hostfs_open): Use "rb" flag to open file, use
4144         grub_util_get_disk_size to get disk size for mingw.
4146         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4147         (asprintf): New function if HAVE_ASPRINTF is not set.
4148         (sync): New function for mingw.
4149         (sleep): Likewise.
4150         (grub_util_get_disk_size): Likewise.
4152 2008-08-28  Pavel Roskin  <proski@gnu.org>
4154         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4155         kern/time.c.
4157 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4159         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4161 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4163         Change find_grub_drive() syntax so it doesn't prevent it from
4164         detecting NULL names as errors.
4166         * util/biosdisk.c (find_grub_drive): Move free slot search code
4167         from here ...
4168         (find_free_slot): ... to here.
4169         (read_device_map): Use find_free_slot() to search for free slots.
4171 2008-08-27  Marco Gerards  <marco@gnu.org>
4173         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4174         (scsi_mod_SOURCES): New variable.
4175         (scsi_mod_CFLAGS): Likewise
4176         (scsi_mod_LDFLAGS): Likewise.
4178         * disk/scsi.c: New file.
4180         * include/grub/scsi.h: Likewise.
4182         * include/grub/scsicmd.h: Likewise.
4184         * disk/ata.c: Include <grub/scsi.h>.
4185         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4186         instead.
4187         (grub_ata_iterate): Skip ATAPI devices.
4188         (grub_ata_open): Only handle ATAPI devices.
4189         (struct grub_atapi_read): Removed.
4190         (grub_atapi_readsector): Likewise.
4191         (grub_ata_read): No longer handle ATAPI devices.
4192         (grub_ata_write): Likewise.
4193         (grub_atapi_iterate): New function.
4194         (grub_atapi_read): Likewise.
4195         (grub_atapi_write): Likewise.
4196         (grub_atapi_open): Likewise.
4197         (grub_atapi_close): Likewise.
4198         (grub_atapi_dev): New variable.
4199         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4200         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4202         * include/grub/disk.h (enum grub_disk_dev_id): Add
4203         `GRUB_DISK_DEVICE_SCSI_ID'.
4205 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4207         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4208         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4209         descriptive.
4211 2008-08-23  Bean  <bean123ch@gmail.com>
4213         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4214         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4215         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4216         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4217         dm_nv.mod.
4218         (raid5rec_mod_SOURCES): New macro.
4219         (raid5rec_mod_CFLAGS): Likewise.
4220         (raid5rec_mod_LDFLAGS): Likewise.
4221         (raid6rec_mod_SOURCES): Likewise.
4222         (raid6rec_mod_CFLAGS): Likewise.
4223         (raid6rec_mod_LDFLAGS): Likewise.
4224         (mdraid_mod_SOURCES): Likewise.
4225         (mdraid_mod_CFLAGS): Likewise.
4226         (mdraid_mod_LDFLAGS): Likewise.
4227         (dm_nv_mod_SOURCES): Likewise.
4228         (dm_nv_mod_CFLAGS): Likewise.
4229         (dm_nv_mod_LDFLAGS): Likewise.
4231         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4232         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4233         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4235         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4236         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4238         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4240         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4242         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4244         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4246         * disk/raid5_recover.c: New file.
4248         * disk/raid6_recover.c: Likewise.
4250         * disk/mdraid_linux.c: Likewise.
4252         * disk/dmraid_nvidia.c: Likewise.
4254         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4255         ULONG_MAX.
4257         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4258         calculate the size of raid device.
4259         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4260         different layout of raid5.
4261         (grub_raid_scan_device): Remove code specific to mdraid.
4262         (grub_raid_list): New variable.
4263         (free_array): New function.
4264         (grub_raid_register): Likewise.
4265         (grub_raid_unregister): Likewise.
4266         (grub_raid_rescan): Likewise.
4267         (GRUB_MOD_INIT): Don't iterate device here.
4268         (GRUB_MOD_FINI): Use free_array to release resource.
4270         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4271         (grub_raid5_recover_func_t): New function variable type.
4272         (grub_raid6_recover_func_t): Likewise.
4273         (grub_raid5_recover_func): New variable.
4274         (grub_raid6_recover_func): Likewise.
4275         (grub_raid_register): New function.
4276         (grub_raid_unregister): Likewise.
4277         (grub_raid_rescan): Likewise.
4278         (grub_raid_block_xor): Likewise.
4280         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4281         (CMD_CRC): New macro.
4282         (part): Removed.
4283         (read_file): Handle device as well as file.
4284         (cmd_crc): New function.
4285         (fstest): Handle multiple disks.
4286         (options): Remove part, raw and long, add root and diskcount.
4287         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4288         (main): Find the first non option entry and ignore subsequent options,
4289         add handling for the new options, support multiple disks.
4291         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4293 2008-08-23  Bean  <bean123ch@gmail.com>
4295         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4297         * genfslist.sh: Ignore kernel.mod.
4299         * genpartmaplist.sh: Likewise.
4301 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4303         * util/getroot.c (find_root_device): Skip anything that starts with
4304         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4306 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4308         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4309         * util/grub.d/00_header.in: Allow the administrator to change default
4310         gfxmode via ${GRUB_GFXMODE}.
4312 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4314         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4316 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4318         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4319         loader.
4320         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4321         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4323 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4325         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4326         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4328 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4330         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4331         (struct grub_virtual_screen): Remove `cursor_color'.
4332         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4333         initialization.
4334         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4336 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4338         Unify (identical) linux_normal.c files.
4339         * loader/i386/efi/linux_normal.c: Move from here ...
4340         * loader/linux_normal.c: ... to here.  Update all users.
4341         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4342         * loader/i386/ieee1275/linux_normal.c: Likewise.
4344 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4346         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4347         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4348         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4349         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4350         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4351         New macros.
4352         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4353         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4354         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4355         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4356         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4357         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4358         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4359         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4360         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4361         portably using grub_getxy().
4362         Replace `-EFI' with `-bzImage' in boot message.
4364 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4366         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4368 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4370         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4372         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4373         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4374         (grub_machine_mmap_iterate): New function declaration.
4375         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4376         structure.
4377         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4378         macros.
4380         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4381         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4382         Move e820 parsing from here ...
4383         * kern/i386/pc/mmap.c: New file.
4384         (grub_machine_mmap_iterate): ... to here.
4386         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4387         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4388         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4389         (grub_available_iterate): Redeclare to return `void', and redeclare
4390         its hook to use grub_uint64_t as addr and size parameters, and rename
4391         to ...
4392         (grub_machine_mmap_iterate): ... this.  Update all users.
4394         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4395         to make it more readable.  Rename to ...
4396         (grub_machine_mmap_iterate): ... this.
4398         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4399         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4400         (grub_multiboot): Allocate an extra region after the payload, and fill
4401         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4402         with the extra space.
4403         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4404         with the extra space.
4406 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4408         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4410 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4412         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4413         mdate-sh to the list `find' searches for.
4414         * DISTLIST: Regenerated.
4416 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4418         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4419         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4420         genmoddep.awk, gensymlist.sh.in.
4421         (DISTDIRS): Add bus, docs, hook, lib.
4422         * DISTLIST: Regenerated.
4423         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4425 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4427         * disk/raid.c (grub_raid_init): Handle/report errors set by
4428         grub_device_iterate().
4429         * disk/lvm.c (grub_lvm_init): Likewise.
4431 2008-08-15  Bean  <bean123ch@gmail.com>
4433         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4434         and datehook.mod.
4435         (datetime_mod_SOURCES): New macro.
4436         (datetime_mod_CFLAGS): Likewise.
4437         (datetime_mod_LDFLAGS): Likewise.
4438         (date_mod_SOURCES): Likewise.
4439         (date_mod_CFLAGS): Likewise.
4440         (date_mod_LDFLAGS): Likewise.
4441         (datehook_mod_SOURCES): Likewise.
4442         (datehook_mod_CFLAGS): Likewise.
4443         (datehook_mod_LDFLAGS): Likewise.
4445         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4446         and datehook.mod.
4447         (datetime_mod_SOURCES): New macro.
4448         (datetime_mod_CFLAGS): Likewise.
4449         (datetime_mod_LDFLAGS): Likewise.
4450         (date_mod_SOURCES): Likewise.
4451         (date_mod_CFLAGS): Likewise.
4452         (date_mod_LDFLAGS): Likewise.
4453         (datehook_mod_SOURCES): Likewise.
4454         (datehook_mod_CFLAGS): Likewise.
4455         (datehook_mod_LDFLAGS): Likewise.
4457         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4458         and datehook.mod.
4459         (datetime_mod_SOURCES): New macro.
4460         (datetime_mod_CFLAGS): Likewise.
4461         (datetime_mod_LDFLAGS): Likewise.
4462         (date_mod_SOURCES): Likewise.
4463         (date_mod_CFLAGS): Likewise.
4464         (date_mod_LDFLAGS): Likewise.
4465         (datehook_mod_SOURCES): Likewise.
4466         (datehook_mod_CFLAGS): Likewise.
4467         (datehook_mod_LDFLAGS): Likewise.
4469         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4470         and datehook.mod.
4471         (datetime_mod_SOURCES): New macro.
4472         (datetime_mod_CFLAGS): Likewise.
4473         (datetime_mod_LDFLAGS): Likewise.
4474         (date_mod_SOURCES): Likewise.
4475         (date_mod_CFLAGS): Likewise.
4476         (date_mod_LDFLAGS): Likewise.
4477         (datehook_mod_SOURCES): Likewise.
4478         (datehook_mod_CFLAGS): Likewise.
4479         (datehook_mod_LDFLAGS): Likewise.
4481         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4482         and datehook.mod.
4483         (datetime_mod_SOURCES): New macro.
4484         (datetime_mod_CFLAGS): Likewise.
4485         (datetime_mod_LDFLAGS): Likewise.
4486         (date_mod_SOURCES): Likewise.
4487         (date_mod_CFLAGS): Likewise.
4488         (date_mod_LDFLAGS): Likewise.
4489         (datehook_mod_SOURCES): Likewise.
4490         (datehook_mod_CFLAGS): Likewise.
4491         (datehook_mod_LDFLAGS): Likewise.
4493         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4495         * commands/date.c: New file.
4497         * hook/datehook.c: Likewise.
4499         * include/grub/lib/datetime.h: Likewise.
4501         * include/grub/i386/cmos.h: Likewise.
4503         * lib/datetime.c: Likewise.
4505         * lib/i386/datetime.c: Likewise.
4507         * lib/efi/datetime.c: Likewise.
4509 2008-08-14  Robert Millan  <rmh@aybabtu.com>
4511         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4512         (grub_mkelfimage_SOURCES): New variable.
4513         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4515         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4516         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4517         * conf/powerpc-ieee1275.rmk: Likewise.
4518         * conf/i386-ieee1275.rmk: Likewise.
4520         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4521         * kern/i386/coreboot/init.c: Likewise.
4523         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4524         with `<grub/cpu/kernel.h>'.
4525         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4526         to ...
4527         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4528         * kern/i386/coreboot/startup.S: Likewise.
4530         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4531         (GRUB_MOD_GAP): Remove.
4532         * include/grub/powerpc/kernel.h: New file.
4533         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4534         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4535         * include/grub/i386/kernel.h: New file.
4536         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4537         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4538         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4540         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4541         `grub-mkelfimage'.
4542         Use --directory when invoking grub_mkimage.
4544         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4545         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4546         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4547         and GRUB_KERNEL_CPU_PREFIX.
4549 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
4551         * include/grub/err.h (grub_err_printf): New function prototype.
4552         * util/misc.c (grub_err_printf): New function.
4553         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4554         grub_printf.
4555         * kern/err.c (grub_print_error): Use grub_err_printf.
4557 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4559         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4561 2008-08-13  Robert Millan  <rmh@aybabtu.com>
4563         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4564         boot entry.
4566 2008-08-12  Robert Millan  <rmh@aybabtu.com>
4568         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4569         of the relocation code from here ...
4570         (grub_multiboot): ... to here.
4571         (forward_relocator, backward_relocator): Move from here ...
4572         * kern/i386/loader.S (grub_multiboot_forward_relocator)
4573         (grub_multiboot_backward_relocator): ... to here.
4574         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
4575         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
4576         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4577         (grub_multiboot_forward_relocator_end)
4578         (grub_multiboot_backward_relocator)
4579         (grub_multiboot_backward_relocator_end): New variables.
4581 2008-08-12  Bean  <bean123ch@gmail.com>
4583         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4585 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4587         * kern/i386/linuxbios/startup.S: Move from here ...
4588         * kern/i386/coreboot/startup.S: ... to here.
4590         * kern/i386/linuxbios/init.c: Move from here ...
4591         * kern/i386/coreboot/init.c: ... to here.
4593         * kern/i386/linuxbios/table.c: Move from here ...
4594         * kern/i386/coreboot/mmap.c: ... to here.
4596         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4598 2008-08-11  Robert Millan  <rmh@aybabtu.com>
4600         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4601         errors.  Leave it to the upper layer to handle them.
4603 2008-08-09  Christian Franke  <franke@computer.org>
4605         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4606         * conf/common.rmk: Install `grub-pe2elf' only if requested.
4607         Install `grub.d/10_windows' only on Cygwin.
4608         * configure.ac: Add subst of `target_os'.
4609         Check `target_os' also before setting TARGET_OBJ2ELF.
4610         Add `--enable-grub-pe2elf'.
4612 2008-08-08  Robert Millan  <rmh@aybabtu.com>
4614         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4615         (grub_last_time): Change type to grub_uint64_t.
4616         (grub_disk_open): Migrate code from to using grub_get_time_ms().
4617         (grub_disk_close): Likewise.
4619         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4620         (run_menu): Migrate code from to using grub_get_time_ms().
4622         * util/misc.c (grub_get_time_ms): New function.
4624 2008-08-08  Marco Gerards  <marco@gnu.org>
4626         * disk/ata.c (grub_ata_regget): Change return type to
4627         `grub_uint8_t'.
4628         (grub_ata_regget2): Likewise.
4629         (grub_ata_wait_status): New function.
4630         (grub_ata_wait_busy): Removed function, updated all users to use
4631         `grub_ata_wait_status'.
4632         (grub_ata_wait_drq): Likewise.
4633         (grub_ata_cmd): New function.
4634         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
4635         error handling.
4636         (grub_ata_pio_write): Add error handling.
4637         (grub_atapi_identify): Likewise.
4638         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4639         handling.
4640         (grub_ata_identify): Use `grub_ata_cmd' and improve error
4641         handling.  Actually use the detected registers.  Reorder the
4642         detection logic such that it is easier to read.
4643         (grub_ata_pciinit): Do not assign the same ID to each controller.
4644         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4645         handling.
4646         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4648         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4650 2008-08-08  Marco Gerards  <marco@gnu.org>
4652         * NEWS: Update.
4654 2008-08-07  Bean  <bean123ch@gmail.com>
4656         * include/grub/x86_64/pci.h: New file.
4658 2008-08-07  Christian Franke  <franke@computer.org>
4660         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4661         (TIMER2_GATE): Likewise.
4662         (grub_pit_wait): Add enable/disable of the timer2 gate
4663         bit of port 0x61.  This fixes a possible infinite loop.
4665 2008-08-07  Bean  <bean123ch@gmail.com>
4667         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4668         kern/i386/tsc.c and kern/i386/pit.c.
4670         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4671         x86_64 platform.
4673         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4674         <grub/i386/tsc.h>.
4676         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4678 2008-08-07  Bean  <bean123ch@gmail.com>
4680         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4682         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4684         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4685         multiple inclusion. Add #include <grub/types.h>.
4687 2008-08-06  Christian Franke  <franke@computer.org>
4689         * conf/common.rmk: Build and install `10_windows'.
4690         * util/grub.d/10_windows.in: New script.
4692 2008-08-06  Pavel Roskin  <proski@gnu.org>
4694         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4696 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4698         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4699         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4701 2008-08-06  Bean  <bean123ch@gmail.com>
4703         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4704         (grub_pxefs_fs_int): Remove dummy definition.
4705         (grub_pxefs_open): Use data->block_size to store the current block
4706         size setting.
4707         (grub_pxefs_read): Use block size stored in data->block_size. As the
4708         value of grub_pxe_blksize can be changed after the file is opened.
4710 2008-08-06  Bean  <bean123ch@gmail.com>
4712         * fs/i386/pc/pxe.c (curr_file): new variable.
4713         (grub_pxefs_open): Simply the handling of pxe file system. Don't
4714         require the dummy internal file system anymore.
4715         (grub_pxefs_read): Removed.
4716         (grub_pxefs_close): Likewise.
4717         (grub_pxefs_fs_int): Likewise.
4718         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4719         connection when we switch file.
4720         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4722 2008-08-06  Robert Millan  <rmh@aybabtu.com>
4724         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4725         `halt.mod'.
4726         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4727         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4729         * kern/i386/halt.c: New file.
4730         * kern/i386/reboot.c: Likewise.
4731         * include/grub/i386/reboot.h: Likewise.
4732         * include/grub/i386/halt.h: Likewise.
4734         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4735         Include `<grub/cpu/halt.h>'.
4736         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4737         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4739         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4740         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4741         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4742         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4743         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4744         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4745         from here ...
4746         * include/grub/i386/at_keyboard.h: ... to here.
4748 2008-08-05  Robert Millan  <rmh@aybabtu.com>
4750         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4751         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4752         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4753         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4754         `kern/generic/millisleep.c'.
4756         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4757         instead of grub_get_rtc().
4758         (grub_tsc_init): Initialize `tsc_boot_time'.
4760         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4761         (grub_machine_init): Use grub_tsc_init() rather than
4762         installing an RTC-based handler via grub_install_get_time_ms().
4764         * kern/i386/pit.c: New file.
4765         * include/grub/i386/pit.h: Likewise.
4767 2008-08-05  Bean  <bean123ch@gmail.com>
4769         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4771         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4772         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4773         (pxe_mod_SOURCES): New macro.
4774         (pxe_mod_CFLAGS): Likewise.
4775         (pxe_mod_LDFLAGS): Likewise.
4776         (pxecmd_mod_SOURCES): Likewise.
4777         (pxecmd_mod_CFLAGS): Likewise.
4778         (pxecmd_mod_LDFLAGS): Likewise.
4780         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4781         (grub_pxe_call): Likewise.
4783         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4785         * commands/i386/pc/pxecmd.c: New file.
4787         * fs/i386/pc/pxe.c: Likewise.
4789         * include/grub/i386/pc/pxe.h: Likewise.
4791 2008-08-05  Bean  <bean123ch@gmail.com>
4793         * util/console.c (grub_console_cur_color): New variable.
4794         (grub_console_standard_color): Likewise.
4795         (grub_console_normal_color): Likewise.
4796         (grub_console_highlight_color): Likewise.
4797         (color_map): Likewise.
4798         (use_color): Likewise.
4799         (NUM_COLORS): New macro.
4800         (grub_ncurses_setcolorstate): Handle color properly.
4801         (grub_ncurses_setcolor): Don't change color here, just remember the
4802         settings, color will be set in grub_ncurses_setcolorstate.
4803         (grub_ncurses_getcolor): New function.
4804         (grub_ncurses_init): Initialize color pairs.
4805         (grub_ncurses_term): New member grub_ncurses_getcolor.
4807 2008-08-05  Colin D Bennett  <colin@gibibit.com>
4809         High resolution timer support.  Implemented for x86 CPUs using TSC.
4810         Extracted generic grub_millisleep() so it's linked in only as needed.
4811         This requires a Pentium compatible CPU; if the RDTSC instruction is
4812         not supported, then it falls back on the generic grub_get_time_ms()
4813         implementation that uses the machine's RTC.
4815         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4816         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4817         `kern/generic/millisleep.c'.
4819         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4820         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4822         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4823         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4825         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4827         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4828         `kern/generic/millisleep.c'.
4830         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4832         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4834         * kern/generic/rtc_get_time_ms.c: New file.
4836         * kern/generic/millisleep.c: New file.
4838         * kern/misc.c: Don't include
4839         <kern/time.h> anymore.
4840         (grub_millisleep_generic): Removed.
4842         * commands/sleep.c (grub_interruptible_millisleep): Uses
4843         grub_get_time_ms() instead of grub_get_rtc().
4845         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
4846         function.
4847         (grub_cpu_is_cpuid_supported): New inline function.
4848         (grub_cpu_is_tsc_supported): New inline function.
4849         (grub_tsc_init): New function prototype.
4850         (grub_tsc_get_time_ms): New function prototype.
4852         * kern/i386/tsc.c (grub_get_time_ms): New file.
4854         * include/grub/time.h: Include <grub/types.h.
4855         (grub_millisleep_generic): Removed.
4856         (grub_get_time_ms): New prototype.
4857         (grub_install_get_time_ms): New prototype.
4858         (grub_rtc_get_time_ms): New prototype.
4860         * kern/time.c (grub_get_time_ms): New function.
4861         (grub_install_get_time_ms): New function.
4863         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
4864         <grub/time.h> anymore.
4865         (grub_millisleep): Removed.
4866         (grub_machine_init): Call grub_tsc_init.
4868         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4869         get_time_ms() implementation.
4871         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4872         (ieee1275_get_time_ms): New function.
4873         (grub_machine_init): Install get_time_ms() implementation.
4875         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4876         (grub_machine_init): Call grub_tsc_init().
4877         (grub_millisleep): Removed.
4879         * kern/ieee1275/init.c (grub_millisleep): Removed.
4880         (grub_machine_init): Install ieee1275_get_time_ms()
4881         implementation.
4882         (ieee1275_get_time_ms): New function.
4883         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4884         real work.
4886 2008-08-05  Marco Gerards  <marco@gnu.org>
4888         * disk/ata.c: Include <grub/pci.h>.
4889         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4890         (grub_ata_initialize): Rewritten.
4891         (grub_ata_device_initialize): New function.
4893 2008-08-04  Pavel Roskin  <proski@gnu.org>
4895         * kern/main.c: Include grub/mm.h.
4897 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4899         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4900         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4901         corruption problem).
4903 2008-08-04  Robert Millan  <rmh@aybabtu.com>
4905         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4906         warnings introduced in my last commit.
4908 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4910         Make PCI available on all i386 architectures.
4912         * include/grub/i386/pc/pci.h: Move from here ...
4913         * include/grub/i386/pci.h: ... to here.
4915         * include/grub/i386/pc/pci.h: Remove.
4916         * include/grub/i386/efi/pci.h: Remove.
4917         * include/grub/x86_64/efi/pci.h: Remove.
4919         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4920         `<grub/cpu/pci.h>'.
4922         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4923         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4924         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4926         * conf/i386-ieee1275.rmk: Likewise.
4928 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4930         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4931         (grub_console_setcursor): Make it possible to set cursor off.
4933 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4935         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
4936         of modules instead of assuming which platform provides what.
4937         * util/update-grub.in: Likewise.
4939 2008-08-03  Robert Millan  <rmh@aybabtu.com>
4941         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4942         instead of `grub_install_dos_part' to determine whether a drive needs
4943         to be prepended to prefix (`grub_install_dos_part' is not reliable,
4944         because it can be overridden when loading GRUB via Multiboot).
4946 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4948         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4950 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4952         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4953         of informational grub_dprintf() calls.
4955 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4957         * disk/memdisk.c (memdisk_size): Don't initialize.
4958         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4960         * include/grub/i386/pc/kernel.h
4961         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4962         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4963         (grub_memdisk_image_size, grub_arch_memdisk_addr)
4964         (grub_arch_memdisk_size): Remove.
4966         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4967         field (was only used to transfer a constant).  Add `type' field to
4968         support multiple module types.
4969         (grub_module_iterate): New function.
4971         * kern/device.c (grub_device_open): Do not hide error messages
4972         when grub_disk_open() fails.  Use grub_print_error() instead.
4974         * kern/i386/pc/init.c (grub_arch_modules_addr)
4975         (grub_arch_memdisk_size): Remove functions.
4976         (grub_arch_modules_addr): Return the module address in high memory
4977         (now that it isn't copied anymore).
4979         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4980         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4981         decompression routine (grub_total_module_size already includes that
4982         now).  Don't copy modules back to low memory.
4984         * kern/main.c: Include `<grub/mm.h>'.
4985         (grub_load_modules): Split out (and use) ...
4986         (grub_module_iterate): ... this function, which iterates through
4987         module objects and runs a hook.
4988         Comment out grub_mm_init_region() call, as it would cause non-ELF
4989         modules to be overwritten.
4991         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4992         the memdisk image in its own region, make it part of the module list.
4993         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4994         (main): Parse --memdisk|-m option, and pass user-provided path as
4995         parameter to generate_image().
4996         (add_segments): Pass `memdisk_path' down to load_modules().
4997         (load_modules): Embed memdisk image in module section when requested.
4998         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4999         `header.type' instead of `header.offset'.
5001         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5002         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5003         (memdisk_mod_LDFLAGS): New variables.
5004         * conf/i386-coreboot.rmk: Likewise.
5005         * conf/i386-ieee1275.rmk: Likewise.
5007 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5009         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5010         (backward_relocator): New variables.  Used to allocate and relocate
5011         the payload, respectively.
5012         (grub_multiboot_load_elf32): Load into heap instead of requested
5013         address, install the appropriate relocator code in each bound of
5014         the payload, and set the entry point such that
5015         grub_multiboot_real_boot() will jump to one of them.
5017         * kern/i386/loader.S (grub_multiboot_payload_size)
5018         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5019         (grub_multiboot_payload_entry_offset): New variables.
5020         (grub_multiboot_real_boot): Set cpu context to what the relocator
5021         expects, and jump to the relocator instead of the payload.
5023         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5024         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5025         (grub_multiboot_payload_entry_offset): Export.
5027 2008-08-01  Bean  <bean123ch@gmail.com>
5029         * normal/menu_entry.c (editor_getline): Don't return the original
5030         string as result, as it will be released by lexer once it has done
5031         using it.
5033 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5035         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5036         within menuentries, not before them.
5037         util/grub.d/10_hurd.in: Likewise.
5039 2008-08-01  Bean  <bean123ch@gmail.com>
5041         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5042         (bufio_mod_SOURCES): New macro.
5043         (bufio_mod_CFLAGS): Likewise.
5044         (bufio_mod_LDFLAGS): Likewise.
5046         * include/grub/bufio.h: New file.
5048         * io/bufio.c: Likewise.
5050         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5051         (grub_video_reader_png): Use grub_buffile_open to open file.
5053         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5054         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5056         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5057         (grub_video_reader_tga): Use grub_buffile_open to open file.
5059         * font/manager.c: Include <grub/bufio.h>.
5060         (add_font): Use grub_buffile_open to open file.
5062 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5064         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5065         ELF segments, use a macro for arbitrarily accessing any of them instead
5066         of preparing a pointer that allows access to one at a time.
5067         (grub_multiboot_load_elf64): Likewise.
5069 2008-07-31  Bean  <bean123ch@gmail.com>
5071         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5072         GRUB_KERNEL_MACHINE_DATA_END.
5074 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5076         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5077         Increase from 0x50 to 0x60.
5078         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5079         use UUIDs to identify the root drive for them.  If that's not
5080         possible, abort.
5081         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5082         check, for cross-disk installs.
5084 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5086         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5087         is non-empty, use it to set the `prefix' environment variable instead
5088         of the usual approach.
5089         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5090         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5091         environment variable instead of dummy make_install_device().
5093         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5094         (start): Insert a data section, with `grub_prefix' variable.
5095         * kern/i386/linuxbios/startup.S: Likewise.
5097         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5098         New variable reference.
5099         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5100         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5101         to `start').
5102         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5103         section within startup.S (relative to `start').
5104         * include/grub/i386/coreboot/kernel.h: Likewise.
5106         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5107         Overwrite grub_prefix with its contents, at the beginning of the
5108         first segment.
5109         (main): Understand -p|--prefix.
5111 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5113         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5115 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5117         * term/i386/pc/vga_text.c (grub_console_cls): Use
5118         grub_console_gotoxy() to go back to beginning of the screen.
5119         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5121 2008-07-29  Christian Franke  <franke@computer.org>
5123         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5124         Add conversion of emulated mount points on Cygwin.
5126 2008-07-29  Christian Franke  <franke@computer.org>
5128         * util/update-grub.in: Add a check for admin
5129         group on Cygwin.
5130         Remove old `grub.cfg.new' before creation.
5131         Add `-f' to `mv' to handle the different filesystem
5132         semantics of Windows.
5134 2008-07-29  Bean  <bean123ch@gmail.com>
5136         * normal/main.c (get_line): Fix buffer overflow bug.
5138 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5140         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5141         (struct grub_apple_header): New struct.  Describes the layout of
5142         the partmap header.
5143         (apple_partition_map_iterate): Check the header magic as well as the
5144         partition magic (which was already being checked).
5146 2008-07-28  Pavel Roskin  <proski@gnu.org>
5148         * genmk.rb: Add a warning to the beginning of the output that
5149         it's a generated file and should not be edited.
5151 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5153         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5154         with the same number are found, just use issue a warning with
5155         grub_dprintf(), as this error has been reported to be non-fatal.
5157 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5159         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5160         information.
5162 2008-07-27  Bean  <bean123ch@gmail.com>
5164         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5165         (grub_fat_find_dir): Ignore case when comparing filename.
5167 2008-07-27  Bean  <bean123ch@gmail.com>
5169         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5170         smallino, as it's more descriptive, and i8count can be confused with
5171         the other field count.
5172         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5173         inode type.
5175 2008-07-27  Bean  <bean123ch@gmail.com>
5177         * commands/crc.c: New file.
5179         * lib/crc.c: Likewise.
5181         * include/grub/lib/crc.h: Likewise.
5183         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5185         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5186         (hexdump): Move this function to ...
5188         * lib/hexdump.c: ... here.
5190         * include/grub/hexdump.h: Renamed to ...
5192         * include/grub/lib/hexdump.h: ... this.
5194         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5196         * util/grub-editenv.c: Likewise.
5198         * include/envblk.h: Renamed to ...
5200         * include/lib/envblk.h: ... this.
5202         * util/envblk.c: Renamed to ...
5204         * lib/envblk.c: ... this.
5206         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5207         lib/hexdump.c.
5208         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5209         (pkglib_MODULES): Add crc.mod.
5210         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5211         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5212         (crc_mod_SOURCES): New macro.
5213         (crc_mod_CFLAGS): Likewise.
5214         (crc_mod_LDFLAGS): Likewise.
5216         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5218         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5220         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5222         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5224         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5226 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5228         * commands/help.c: Include <grub/term.h>.
5229         (TERM_WIDTH): Removed.  Updated all users.
5231 2008-07-27  Pavel Roskin  <proski@gnu.org>
5233         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5234         spurious warnings about a comment within a comment.
5236 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5238         * util/getroot.c (find_root_device): Skip devices that match
5239         /dev/dm-[0-9].  This lets the real device be found for any type of
5240         abstraction (LVM, EVMS, RAID..).
5241         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5242         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5243         device is found first, find_root_device() will now skip it.
5245 2008-07-24  Pavel Roskin  <proski@gnu.org>
5247         * include/grub/types.h: Use __builtin_bswap32() and
5248         __builtin_bswap64() with gcc 4.3 and newer.
5250 2008-07-24  Christian Franke  <franke@computer.org>
5252         * util/i386/pc/grub-install.in: If `--debug' is specified,
5253         pass `--verbose' to grub-setup.
5254         Abort script if make_system_path_relative_to_its_root() fails.
5256 2008-07-24  Bean  <bean123ch@gmail.com>
5258         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5259         variable `target_platform' should be `platform'.
5261 2008-07-24  Bean  <bean123ch@gmail.com>
5263         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5264         (grub_png_init_fixed_block): New function.
5265         (grub_png_decode_image_data): Handle fixed huffman code compression.
5267 2008-07-24  Bean  <bean123ch@gmail.com>
5269         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5270         (grub_pe2elf_SOURCES): New macro.
5271         (CLEANFILES): Add grub-pe2elf.
5273         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5274         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5275         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5276         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5277         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5278         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5279         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5280         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5281         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5282         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5283         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5284         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5285         (GRUB_PE32_DT_FUNCTION): Likewise.
5286         (GRUB_PE32_REL_I386_DIR32): Likewise.
5287         (GRUB_PE32_REL_I386_REL32): Likewise.
5288         (grub_pe32_symbol): New structure.
5289         (grub_pe32_reloc): Likewise.
5291         * util/grub-pe2elf.c: New file.
5293         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5294         start symbol in non pc platform.
5296         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5298         The following patches are from Christian Franke.
5300         * include/grub/dl.h: Remove .previous, gas supports this only
5301         for ELF format.
5303         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5304         Remove .type, gas supports this only for ELF format.
5306         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5307         nullbytes in symbol table. This fixes an infinite loop if table is
5308         zero filled.
5310         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5311         TARGET_IMG_LDFLAGS and EXEEXT.
5313         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5314         TARGET_IMG_LDFLAGS_AC.
5315         (grub_CHECK_STACK_ARG_PROBE): New function.
5317         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5319         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5321         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5322         to set TARGET_IMG_LD* accordingly.
5323         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5324         Add call to grub_CHECK_STACK_ARG_PROBE.
5325         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5327         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5329         * genmk.rb: Add EXEEXT to CLEANFILES.
5331 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5333         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5334         define the codes for arrows and lines used for the menu).
5335         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5336         as well.
5338         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5339         fonts, because the latter are too slow.
5341 2008-07-21  Bean  <bean123ch@gmail.com>
5343         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5344         a20. Run keyboard test last, as it will cause macbook to halt.
5346 2008-07-18  Pavel Roskin  <proski@gnu.org>
5348         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5349         load foreign architecture modules correctly anyway.  Keep
5350         support for loading host architecture modules, whether we
5351         compile them or not.
5353 2008-07-17  Pavel Roskin  <proski@gnu.org>
5355         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5356         change target_cpu.  The compiler default can mismatch target_cpu
5357         in any case.
5359         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5360         * kern/efi/efi.c: Likewise.
5362         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5363         target compiler is functional.
5364         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5365         are set up.
5367         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5368         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5369         adjustments from the rest, only do them if target is not
5370         explicitly given.  Merge other adjustments with the final sanity
5371         check.  Remove an extraneous check for supported CPU.  Be
5372         specific which CPU and which platform is not supported.
5374         * configure.ac: Default to pc platform for x86_64.
5376 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5378         Partial LinuxBIOS -> Coreboot rename.
5380         * conf/i386-linuxbios.rmk: Renamed to ...
5381         * conf/i386-coreboot.rmk: ... this.
5382         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5383         * configure.ac: Accept "coreboot" as input platform (but maintain
5384         compatibility with "linuxbios").
5385         * include/grub/i386/linuxbios: Renamed to ...
5386         * include/grub/i386/coreboot: ... this.
5388 2008-07-17  Bean  <bean123ch@gmail.com>
5390         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5391         (appleldr_mod_SOURCE): New variable.
5392         (appleldr_mod_CFLAGS): Likewise.
5393         (appleldr_mod_LDFLAGS): Likewise.
5394         (pci_mod_SOURCES): Likewise.
5395         (pci_mod_CFLAGS): Likewise.
5396         (pci_mod_LDFLAGS): Likewise.
5397         (lspci_mod_SOURCES): Likewise.
5398         (lspci_mod_CFLAGS): Likewise.
5399         (lspci_mod_LDFLAGS): Likewise.
5401         * conf/x86_64-efi.rmk: New file.
5403         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5404         macro.
5405         (grub_efidisk_write): Likewise.
5407         * include/efi/api.h (efi_call_0): New macro.
5408         (efi_call_1): Likewise.
5409         (efi_call_2): Likewise.
5410         (efi_call_3): Likewise.
5411         (efi_call_4): Likewise.
5412         (efi_call_5): Likewise.
5413         (efi_call_6): Likewise.
5415         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5416         grub_rescue_cmd_chainloader.
5418         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5419         (grub_pe32_optional_header): Change some fields based on i386 or
5420         x86_64 platform.
5421         (GRUB_PE32_PE32_MAGIC): Likewise.
5423         * include/grub/efi/uga_draw.h: New file.
5425         * include/grub/elf.h (STN_ABS): New constant.
5426         (R_X86_64_NONE): Relocation constant for x86_64.
5427         (R_X86_64_64): Likewise.
5428         (R_X86_64_PC32): Likewise.
5429         (R_X86_64_GOT32): Likewise.
5430         (R_X86_64_PLT32): Likewise.
5431         (R_X86_64_COPY): Likewise.
5432         (R_X86_64_GLOB_DAT): Likewise.
5433         (R_X86_64_JUMP_SLOT): Likewise.
5434         (R_X86_64_RELATIVE): Likewise.
5435         (R_X86_64_GOTPCREL): Likewise.
5436         (R_X86_64_32): Likewise.
5437         (R_X86_64_32S): Likewise.
5438         (R_X86_64_16): Likewise.
5439         (R_X86_64_PC16): Likewise.
5440         (R_X86_64_8): Likewise.
5441         (R_X86_64_PC8): Likewise.
5443         * include/grub/i386/efi/pci.h: New file.
5445         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5446         Change it value based on platform.
5447         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5448         (GRUB_E820_RAM): Likewise.
5449         (GRUB_E820_RESERVED): Likewise.
5450         (GRUB_E820_ACPI): Likewise.
5451         (GRUB_E820_NVS): Likewise.
5452         (GRUB_E820_EXEC_CODE): Likewise.
5453         (GRUB_E820_MAX_ENTRY): Likewise.
5454         (grub_e820_mmap): New structure.
5455         (linux_kernel_header): Change the efi field according to different
5456         kernel version, also field from linux_kernel_header.
5458         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5460         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5461         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5462         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5463         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5464         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5465         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5466         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5467         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5468         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5469         (GRUB_PCI_ADDR_IO_MASK): Likewise.
5471         * include/grub/x86_64/efi/kernel.h: New file.
5473         * include/grub/x86_64/efi/loader.h: Likewise.
5475         * include/grub/x86_64/efi/machine.h: Likewise.
5477         * include/grub/x86_64/efi/pci.h: Likewise.
5479         * include/grub/x86_64/efi/time.h: Likewise.
5481         * include/grub/x86_64/linux.h: Likewise.
5483         * include/grub/x86_64/setjmp.h: Likewise.
5485         * include/grub/x86_64/time.h: Likewise.
5487         * include/grub/x86_64/types.h: Likewise.
5489         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5490          GRUB_TARGET_SIZEOF_VOID_P.
5492         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5493         (grub_efi_locate_handle): Likewise.
5494         (grub_efi_open_protocol): Likewise.
5495         (grub_efi_set_text_mode): Likewise.
5496         (grub_efi_stall): Likewise.
5497         (grub_exit): Likewise.
5498         (grub_reboot): Likewise.
5499         (grub_halt): Likewise.
5500         (grub_efi_exit_boot_services): Likewise.
5501         (grub_get_rtc): Likewise.
5503         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5504         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5505         (grub_efi_allocate_pages): Wrap efi calls.
5506         (grub_efi_free_pages): Wrap efi calls.
5507         (grub_efi_get_memory_map): Wrap efi calls.
5509         * kern/x86_64/dl.c: New file.
5511         * kern/x86_64/efi/callwrap.S: Likewise.
5513         * kern/x86_64/efi/startup.S: Likewise.
5515         * loader/efi/appleloader.c: Likewise.
5517         * loader/efi/chainloader.c (cmdline): New variable.
5518         (grub_chainloader_unload): Wrap efi calls.
5519         (grub_chainloader_boot): Likewise.
5520         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5521         command line.
5523         * loader/efi/chainloader_normal.c (chainloader_command):
5524         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5525         command line.
5527         * loader/i386/efi/linux.c (allocate_pages): Change allocation
5528         method.
5529         (grub_e820_add_region): New function.
5530         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5531         booting.
5532         (grub_find_video_card): New function.
5533         (grub_linux_setup_video): New function.
5534         (grub_rescue_cmd_linux): Probe for video information.
5536         * normal/x86_64/setjmp.S: New file.
5538         * term/efi/console.c (map_char): New function.
5539         (grub_console_putchar): Map unicode char.
5540         (grub_console_checkkey): Wrap efi calls.
5541         (grub_console_getkey): Likewise.
5542         (grub_console_getwh): Likewise.
5543         (grub_console_gotoxy): Likewise.
5544         (grub_console_cls): Likewise.
5545         (grub_console_setcolorstate): Likewise.
5546         (grub_console_setcursor): Likewise.
5548         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5550 2008-07-16  Pavel Roskin  <proski@gnu.org>
5552         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5553         format strings.
5555         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5556         pointer, not an integer.  This fixes a warning and prevents
5557         precision loss on 64-bit systems.
5558         (relocate_addresses): Remove unneeded cast.
5560 2008-07-15  Pavel Roskin  <proski@gnu.org>
5562         * kern/i386/ieee1275/init.c: Include grub/cache.h.
5564         * term/ieee1275/ofconsole.c: Disable code unused on i386.
5566         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5567         Fix comparison between signed and unsigned.
5569         * include/grub/i386/ieee1275/console.h: Declare
5570         grub_console_init() and grub_console_fini().
5572         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5573         It's empty and unused.
5575         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5576         beginning to avoid warnings with some compilers.
5578         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5579         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5581 2008-07-14  Pavel Roskin  <proski@gnu.org>
5583         * kern/env.c (grub_register_variable_hook): Don't copy empty
5584         string, it leaks memory.  Pass "" to grub_env_set(), it should
5585         handle constant strings.
5587         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5588         * commands/cmp.c (grub_cmd_cmp): Likewise.
5589         * kern/dl.c (grub_dl_flush_cache): Likewise.
5590         (grub_dl_load_core): Likewise.
5591         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5592         (grub_elf64_load_phdrs): Likewise.
5594 2008-07-13  Pavel Roskin  <proski@gnu.org>
5596         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5597         between signed and unsigned.
5598         (LzmaEnc_Finish): Fix warning about an unused parameter.
5600 2008-07-13  Bean  <bean123ch@gmail.com>
5602         * Makefile.in (enable_lzo): New rule.
5604         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5606         * configure.ac (ENABLE_LZO): New option --enable-lzo.
5608         * boot/i386/pc/lnxboot.S: #include <config.h>.
5610         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5611         its value according to the compression algorithm used, lzo or lzma.
5613         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5614         compression algorithm according to configure macro.
5616         * kern/i386/pc/startup.S (codestart): Likewise.
5618         * kern/i386/pc/lzma_decode.S: New file.
5620         * include/grub/lib/LzFind.h: Likewise.
5622         * include/grub/lib/LzHash.h: Likewise.
5624         * include/grub/lib/LzmaDec.h: Likewise.
5626         * include/grub/lib/LzmaEnc.h: Likewise.
5628         * include/grub/lib/LzmaTypes.h: Likewise.
5630         * lib/LzFind.c: Likewise.
5632         * lib/LzmaDec.c: Likewise.
5634         * lib/LzmaEnc.c: Likewise.
5636 2008-07-13  Bean  <bean123ch@gmail.com>
5638         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5639         (grub_ext4_extent_header): New structure.
5640         (grub_ext4_extent): Likewise.
5641         (grub_ext4_extent_idx): Likewise.
5642         (grub_ext4_find_leaf): New function.
5643         (grub_ext2_read_block): Handle extents.
5645 2008-07-12  Robert Millan  <rmh@aybabtu.com>
5647         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5649 2008-07-11  Robert Millan  <rmh@aybabtu.com>
5651         * util/grub.d/40_custom.in: New file. Example on how to add custom
5652         entries to /etc/grub.d.
5653         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5654         40_custom (implicitly, by merging all the grub.d rules).
5656 2008-07-11  Pavel Roskin  <proski@gnu.org>
5658         * commands/read.c (grub_getline): Fix invalid memory access.
5659         Don't add newline to the variable value.
5661         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5662         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5663         (serial_hw_get_port): Check validity of the port number.
5664         (grub_cmd_serial): Check return value of serial_hw_get_port().
5666 2008-07-07  Pavel Roskin  <proski@gnu.org>
5668         * boot/i386/pc/diskboot.S (notification_string): Replace
5669         "Loading kernel" with just "loading".  This is shorter, less
5670         confusing and saves a few bytes for possible future changes.
5672 2008-07-05  Pavel Roskin  <proski@gnu.org>
5674         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5675         size for ATAPI devices, they are undefined.  Output sector
5676         number in decimal form.
5678         * disk/ata.c: Use named constants for status bits.
5680 2008-07-04  Pavel Roskin  <proski@gnu.org>
5682         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5683         grub_addr_t before casting it to the void pointer to fix a
5684         warning.  Non-addressable regions are discarded earlier.
5685         (grub_arch_modules_addr): Cast _end to grub_addr_t.
5686         * kern/i386/linuxbios/table.c: Include grub/misc.h.
5687         (check_signature): Don't shadow table_header.
5688         (grub_linuxbios_table_iterate): Cast numeric constants to
5689         grub_linuxbios_table_header_t.
5690         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5691         grub_stop().
5693         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5694         prevent warnings.
5696         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5697         pointer, which can cause warnings.  Support 64-bit addresses.
5699         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5700         of sizeof(long).  This fixes PowerPC image generation on x86_64.
5702 2008-07-04  Robert Millan  <rmh@aybabtu.com>
5704         This fixes a performance issue when pc & gpt partmap iterators
5705         didn't abort iteration even after our hook found what it was
5706         looking for (often causing expensive probes of non-existent drives).
5708         Some callers relied on previous buggy behaviour, since they would
5709         raise an error when their own hooks caused early abortion of its
5710         iteration.
5712         * kern/device.c (grub_device_open): Improve error message.
5713         * disk/lvm.c (grub_lvm_open): Likewise.
5714         * disk/raid.c (grub_raid_open): Likewise.
5716         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5717         when hook requests it, independently of grub_errno.
5718         (pc_partition_map_probe): Do not fail when find_func() caused
5719         early abortion of pc_partition_map_iterate().
5721         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5722         when hook requests it, independently of grub_errno.
5723         (gpt_partition_map_probe): Do not fail when find_func() caused
5724         early abortion of gpt_partition_map_iterate().
5726         * kern/partition.c (grub_partition_iterate): Abort parent iteration
5727         when hook requests it, independently of grub_errno.  Do not fail when
5728         part_map_iterate_hook() caused early abortion of p->iterate().
5730         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5731         when grub_partition_iterate() returned with non-zero.
5733 2008-07-03  Pavel Roskin  <proski@gnu.org>
5735         * disk/ata.c (grub_ata_pio_write): Check status before writing,
5736         like we do in grub_ata_pio_read().
5737         (grub_ata_readwrite): Always write individual sectors.  Fix the
5738         sector count for the remainder.
5739         (grub_ata_write): Enable writing to ATA devices.  Correctly
5740         report error for ATAPI devices.
5742 2008-07-02  Pavel Roskin  <proski@gnu.org>
5744         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5745         warning.
5747         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5748         for every read sector, we already increment it for the whole
5749         batch.  This fixes reading more than 256 sectors at once.
5751         * util/grub-editenv.c (cmd_info): Cast argument to long
5752         explicitly.  ptrdiff_t reduces to int on i386.
5754         * util/grub-editenv.c (main): Be specific which parameter is
5755         missing.
5757         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5758         (memdisk): Make memdisk_orig_addr a pointer.
5760         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5761         for file offsets, use grub_off_t instead.  Fix printf format
5762         warnings.
5764         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5765         there.  Real unexpected warnings should not drown in the noise
5766         about known problems.
5768         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5769         grub_disk_addr_t for memory addresses.
5771         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5772         explicitly to fix a warning.
5774         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5776         * Makefile.in (MODULE_LDFLAGS): New variable.
5777         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
5778         the linker accepts --build-id=none.
5779         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
5780         MODULE_LDFLAGS.
5781         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5783         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5784         those in Linux XFS code.  Provide a way to access 64-bit parent
5785         inode.
5786         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
5787         the end of struct grub_xfs_dir_header.
5789 2008-07-02  Bean  <bean123ch@gmail.com>
5791         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5792         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5793         and GRUB_IEEE1275_FLAG_NO_ANSI.
5795         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5796         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5797         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5799         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5800         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5802         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5803         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5805         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5806         esc sequence on non ANSI terminal.
5807         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5809         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5810         beginning of file.
5812 2008-07-02  Bean  <bean123ch@gmail.com>
5814         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5815         (grub_editenv_SOURCES): New variable.
5816         (pkglib_MODULES): Add loadenv.mod.
5817         (loadenv_mod_SOURCES): New variable.
5818         (loadenv_mod_CFLAGS): Likewise.
5819         (loadenv_mod_LDFLAGS): Likewise.
5821         * include/grub/envblk.h: New file.
5823         * util/envblk.c: New file.
5825         * util/grub-editenv.c: New file.
5827         * commands/loadenv.c: New file.
5829 2008-07-01  Pavel Roskin  <proski@gnu.org>
5831         * include/multiboot2.h (struct multiboot_tag_module): Use char,
5832         not unsigned char.  This fixes warnings and is consistent with
5833         other tags.
5835         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5837         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5839         * term/tparm.c (analyze): Always set *popcount.
5841         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5842         cast to fix a warning.
5844         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5845         cast to suppress a warning.
5847         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5848         grub_fshelp_read_file() expects.
5850         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
5851         write uuid as a 32-bit value in CPU byte order, so declare and
5852         use it as such.
5854         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5855         long if the format specifier expects it.
5856         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5857         * partmap/pc.c (pc_partition_map_iterate): Likewise.
5858         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5859         long to fix a warning.
5860         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5861         grub_dprintf() arguments to fix warnings.
5863 2008-06-30  Pavel Roskin  <proski@gnu.org>
5865         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5866         install_bsd_part immediately before core.img is embedded or
5867         modified on disk.  This fixes core.img verification if core.img
5868         cannot be embedded.
5870         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5871         core_path to calculate the blocklist.
5872         Patch from Javier Martín <lordhabbit@gmail.com>
5874 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5876         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
5877         block to disk block.
5878         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5879         Patch from Niels Böhm <bitbucket@arcor.de>
5881 2008-06-29  Robert Millan  <rmh@aybabtu.com>
5883         * util/update-grub_lib.in (font_path): Search for fonts in
5884         /boot/grub first, which is more likely to be readable (we aren't
5885         deciding where fonts live, just looking for them).
5887 2008-06-26  Pavel Roskin  <proski@gnu.org>
5889         * util/biosdisk.c (read_device_map): Don't leave dead map
5890         entries for devices failing stat() check.
5892         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5893         core_path_dev for the core.img path on the target device.
5895 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5897         * disk/fs_uuid.c: New file.
5898         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5899         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5900         (fs_uuid_mod_LDFLAGS): New variables.
5901         * include/grub/disk.h (grub_disk_dev_id): Add
5902         `GRUB_DISK_DEVICE_UUID_ID'.
5903         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5904         implement iterate().
5906 2008-06-26  Robert Millan  <rmh@aybabtu.com>
5908         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5909         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5910         Linux image includes no initrd.
5912 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
5914         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5915         call to resolve the core image location that effectively appended the
5916         name twice.
5918 2008-06-21  Robert Millan  <rmh@aybabtu.com>
5920         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5921         call from here ...
5923         * util/grub.d/10_hurd.in: ... to here ...
5924         * util/grub.d/10_linux.in: ... and here.
5926 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5928         * kern/main.c (grub_main): Export `prefix' variable immediately
5929         after it has been set by grub_machine_set_prefix().
5931 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5933         * commands/search.c (search_label, search_fs_uuid, search_file): Print
5934         search result when not saving to variable, not the other way around.
5935         When saving to variable, abort iteration as soon as a match is found.
5937 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5939         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5940         check for partition that provides /boot/grub.  Its logic is flawed,
5941         as it prevents prepare_grub_to_access_device() from being called
5942         multiple times.
5944 2008-06-19  Robert Millan  <rmh@aybabtu.com>
5946         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5947         "insmod" command directly when abstraction modules are needed,
5948         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5949         since it had already been processed).
5951 2008-06-19  Pavel Roskin  <proski@gnu.org>
5953         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5954         changed.  This is needed in case GRUB_LIBDIR changes.
5955         * conf/i386-ieee1275.rmk: Likewise.
5956         * conf/i386-linuxbios.rmk: Likewise.
5957         * conf/i386-pc.rmk: Likewise.
5958         * conf/powerpc-ieee1275.rmk: Likewise.
5960 2008-06-18  Pavel Roskin  <proski@gnu.org>
5962         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5963         kernel_elf_symlist.c to symlist.c for consistency with other
5964         architectures.  Update all users.
5965         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5967 2008-06-18  Robert Millan  <rmh@aybabtu.com>
5969         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5970         it in prefix.
5972         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
5973         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
5974         a RAID device, run setup() for all members independently on whether
5975         LVM abstraction is being used.
5976         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5977         If grub-mkimage has set `*install_dos_part == -2', don't override this
5978         value.
5979         Perform *install_dos_part adjustments independently on whether
5980         we're embedding or not.
5981         Clarify error message when image is too big for embedding.
5982         Remove duplicate *install_dos_part stanza.
5984 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5986         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5987         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5988         variables.
5989         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5990         values in grub_ofconsole_normal_color and
5991         grub_ofconsole_highlight_color (they're not directly related to
5992         background and foreground).
5993         (grub_ofconsole_setcolorstate): Extract background and foreground
5994         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5996 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5998         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5999         /boot/grub for the check in last commit, not /boot (they could be
6000         different partitions).
6002 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6004         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6005         asked to setup access for the same partition that provides /boot,
6006         don't bother using UUIDs since our root already has the value we
6007         want.
6009 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6011         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6012         I2O devices.
6013         Patch from Sven Mueller <sven@debian.org>.
6015 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6017         * util/update-grub.in: Check for $EUID instead of $UID.
6018         Reported by Vincent Zweije.
6020 2008-06-16  Bean  <bean123ch@gmail.com>
6022         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6023         (grub_ext2_read_block): Likewise.
6024         (grub_ext2_read_inode): Likewise.
6025         (grub_ext2_mount): Likewise.
6026         (grub_ext2_close): Likewise.
6027         (grub_ext3_get_journal): Removed.
6029         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6030         (grub_reiserfs_read_symlink): Likewise.
6031         (grub_reiserfs_mount): Likewise.
6032         (grub_reiserfs_open): Likewise.
6033         (grub_reiserfs_read): Likewise.
6034         (grub_reiserfs_close): Likewise.
6035         (grub_reiserfs_get_journal): Removed.
6037         * fs/fshelp.c (grub_fshelp_read): Removed.
6038         (grub_fshelp_map_block): Likewise.
6040         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6041         (grub_fshelp_journal): Likewise.
6042         (grub_fshelp_read): Likewise.
6043         (grub_fshelp_map_block): Likewise.
6045 2008-06-16  Pavel Roskin  <proski@gnu.org>
6047         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6048         floating point anymore.
6049         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6051 2008-06-15  Pavel Roskin  <proski@gnu.org>
6053         * commands/ls.c (grub_ls_list_files): Use integer calculations
6054         for human readable format, avoid floating point use.
6055         * kern/misc.c (grub_ftoa): Remove.
6056         (grub_vsprintf): Remove floating point support.
6058 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6060         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6061         devices.
6062         Reported by Max Vozeler.
6064 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6066         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6067         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6068         skipped later.
6069         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6070         the beginning of the prefix.
6072         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6073         It is assumed that if we have a memdisk, grub-mkimage has set
6074         grub_prefix to include the "(memdisk)" drive in it.
6076 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6078         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6079         Initialize keyboard controller after registering the terminal, so that
6080         grub_printf() can be called from grub_keyboard_controller_init().
6082 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6084         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6085         extent-btree which is written as big endian on disk.
6086         Reported by Alain Greppin  <al@chilibi.org>.
6088 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6090         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6091         * util/i386/pc/grub-install.in (modules): Likewise.
6093 2008-06-13  Pavel Roskin  <proski@gnu.org>
6095         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6097 2008-06-13  Bean  <bean123ch@gmail.com>
6099         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6101         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6103         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6104         to indicate sparse block.
6106 2008-06-12  Pavel Roskin  <proski@gnu.org>
6108         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6109         number, grub_fshelp_read() does it for us.
6111         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6112         linear disk read with journal translation.
6113         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6114         * include/grub/fshelp.h: Declare grub_fshelp_read().
6116 2008-06-09  Pavel Roskin  <proski@gnu.org>
6118         * fs/minix.c (grub_minix_mount): Handle error reading
6119         superblock.
6121 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6123         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6124         don't append the RAID prefix afterwards.
6125         Reported by Clint Adams.
6127 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6129         Based on description from Pavel:
6130         * kern/disk.c (grub_disk_check_range): Rename to ...
6131         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6132         tasks performed by this function.
6134 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6136         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6137         `num_serial' (for consistency with other variables).
6138         (struct grub_ntfs_data): Add `uuid' member.
6139         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6140         (grub_ntfs_uuid): New function.
6141         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6143 2008-06-07  Pavel Roskin  <proski@gnu.org>
6145         * util/biosdisk.c (open_device): Revert last change to the
6146         function, it broke installation.  The sector needs to be
6147         different dependent on which device is opened.
6149 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6151         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6152         rest of GRUB, and breakage doesn't happen if its value were modified.
6154         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6155         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6156         a constant (same value).
6157         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6158         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6160 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6162         * util/biosdisk.c (open_device): Do not modify sector offset when
6163         accessing a partition.  kern/disk.c already handles this for us.
6165 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6167         * util/grub-emu.c (grub_machine_init): Move code in this function from
6168         here ...
6169         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6170         segfault in case grub_printf() is called).
6172         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6173         grub_probe.  Update all users not to explicitly add it again.
6174         (grub_device): New variable; contains corresponding device for grubdir.
6175         (fs_module, partmap_module, devabstraction_module): Pass
6176         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6177         every time.
6179 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6181         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6182         is found, print it (same layout as with labels).
6184 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6186         * util/biosdisk.c (get_drive): Rename to ...
6187         (find_grub_drive): ... this.  Update all users.
6189         (get_os_disk): Rename to ...
6190         (convert_system_partition_to_system_disk): ... this.  Update all users.
6192         (find_drive): Rename to ...
6193         (find_system_device): ... this.  Update all users.
6195 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6197         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6198         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6199         (make_device_map): Likewise.
6201 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6203         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6204         before dereferencing it.
6206         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6207         union with fat12/fat16-specific ones.  Add some new fields, including
6208         `num_serial' for both versions.
6209         (struct grub_fat_data): Add `uuid' member.
6210         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6211         names.  Initialize `data->uuid' using `num_serial'.
6212         (grub_fat_uuid): New function.
6213         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6215         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6216         (grub_reiserfs_uuid): New function.
6217         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6218         member.
6220         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6221         (grub_xfs_uuid): New function.
6222         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6224 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6226         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6227         code that is backward compatible with pre-uuid search command.
6229 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6231         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6232         floppies after everything else, to ensure floppy drive isn't accessed
6233         unnecessarily (patch from Bean).
6235 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6237         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6238         not print device names when we were asked to set a variable.
6240 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6242         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6243         using "cursor-on" and "cursor-off" commands (understood at least by
6244         the Open Firmware flavour on OLPC).
6246 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6248         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6249         on and off sequences.
6251 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6253         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6254         * util/update-grub.in: Likewise.
6256 2008-05-30  Pavel Roskin  <proski@gnu.org>
6258         * util/biosdisk.c (linux_find_partition): Simplify logic and
6259         make the code more universal.  Keep special processing for
6260         devfs, but use a simple rule for all other devices.  If the
6261         device ends with a number, append 'p' and the partition number.
6262         Otherwise, append only the partition number.
6264 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6266         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6267         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6268         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6269         the `root' parameter to Linux.
6271 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6273         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6274         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6275         --fs_uuid with --fs-uuid.
6276         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6277         all filesystems support them).
6279 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6281         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6282         grub_printf() flags, since we're printing in units of 2 bytes.
6284 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6286         * util/grub.d/00_header.in: Remove obsolete comment referencing
6287         convert_system_path_to_grub_path().
6288         * util/update-grub.in: Likewise.
6289         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6290         (convert_system_path_to_grub_path): Add a warning message explaining
6291         that this function is deprecated.  Rely on is_path_readable_by_grub()
6292         for the readability checks.
6293         (font_path): Use is_path_readable_by_grub() for the readability
6294         check rather than convert_system_path_to_grub_path().
6296 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6298         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6299         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6300         converting it first.
6301         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6302         grub.cfg for access to font file, and afterwards call it again to set
6303         the root device.
6305 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6307         * commands/search.c (options): Add --fs_uuid option.
6308         (search_fs_uuid): New function.
6309         (grub_cmd_search): Fix --set argument passing.
6310         Use search_fs_uuid() when requested via --fs_uuid.
6311         (grub_search_init): Update help message.
6312         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6313         and redeclare it as an array of 16-bit words.
6314         (grub_ext2_uuid): New function.
6315         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6316         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6317         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6318         (GRUB_DEVICE_BOOT_UUID): New variables.
6319         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6320         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6321         whenever possible.
6322         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6323         just assume `root' variable has the right value.
6324         * util/grub.d/10_linux.in: Likewise.
6325         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6326         via PRINT_FS_UUID.
6327         (main): Recognise `-t fs_uuid' argument.
6329 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6331         * util/biosdisk.c (map): Redefine structure to hold information
6332         about GRUB drive name.
6333         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6334         drive names.
6335         (call_hook): Remove.
6336         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6337         member.  Assume drive has partitions.
6338         (grub_util_biosdisk_open): Access device names via `.device' struct
6339         member.
6340         (open_device): Likewise.
6341         (find_drive): Likewise.
6342         (read_device_map): Adjust map[] usage to match the new struct
6343         definition.  Don't check for duplicates (still possible, but not cheap
6344         anymore).
6345         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6346         (make_device_name): Remove assumption of BIOS-like drive names.
6348 2008-05-30  Pavel Roskin  <proski@gnu.org>
6350         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6351         compiling execute.c doesn't need grub_script.tab.h anymore.
6352         (normal/command.c_DEPENDENCIES): Likewise.
6353         (normal/function.c_DEPENDENCIES): Likewise.
6354         * conf/i386-ieee1275.rmk: Likewise.
6355         * conf/i386-linuxbios.rmk: Likewise.
6356         * conf/i386-pc.rmk: Likewise.
6357         * conf/powerpc-ieee1275.rmk: Likewise.
6358         * conf/sparc64-ieee1275.rmk: Likewise.
6360 2008-05-29  Pavel Roskin  <proski@gnu.org>
6362         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6363         when scanning metadata for volume group name.
6365         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6366         a generated file, which may only be included from the files with
6367         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6368         use union YYSTYPE, as the later allows forward declaration.
6369         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6371 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6373         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6374         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6375         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6376         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6377         scan codes.
6379 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6381         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6382         control key combinations.
6384 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6386         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6387         * util/ieee1275/grub-install.in: ... to here.
6388         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6389         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6390         (grub_install_SOURCES): Likewise.
6392 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6394         * fs/affs.c: Update copyright year.
6395         * fs/ext2.c: Likewise.
6396         * fs/fshelp.c: Likewise.
6397         * fs/hfsplus.c: Likewise.
6398         * fs/ntfs.c: Likewise.
6399         * fs/xfs.c: Likewise.
6400         * include/grub/fshelp.h: Likewise.
6401         * util/grub-mkdevicemap.c: Likewise.
6403 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6405         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6406         might need to be fatfs to support some firmware implementations
6407         (e.g. OFW or EFI).
6409 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6411         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6412         devices.
6413         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6414         (make_device_map): Likewise.
6416 2008-05-20  Bean  <bean123ch@gmail.com>
6418         * fs/fshelp.c (grub_fshelp_map_block): New function.
6419         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6420         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6422         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6423         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6424         (grub_fshelp_journal): New structure.
6425         (grub_fshelp_map_block): New function prototype.
6426         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6427         (grub_fshelp_map_block): Likewise.
6429         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6430         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6431         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6432         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6433         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6434         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6435         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6436         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6437         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6438         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6439         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6440         (grub_ext2_sblock): New members for journal support.
6441         (grub_ext3_journal_header): New structure.
6442         (grub_ext3_journal_revoke_header): Likewise.
6443         (grub_ext3_journal_block_tag): Likewise.
6444         (grub_ext3_journal_sblock): Likewise.
6445         (grub_fshelp_node): New members logfile and journal.
6446         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6447         grub_fshelp_map_block to get real block number.
6448         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6449         number.
6450         (grub_ext2_read_inode): Likewise.
6451         (grub_ext3_get_journal): New function.
6452         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6453         (grub_ext2_close): Release memory used by journal.
6455         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6456         (REISERFS_MAGIC_DESC_BLOCK): New macro.
6457         (grub_reiserfs_transaction_header): Renamed to
6458         grub_reiserfs_description_block, replace field data with real_blocks.
6459         (grub_reiserfs_commit_block): New structure.
6460         (grub_reiserfs_data): New member journal.
6461         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6462         number.
6463         (grub_reiserfs_read_symlink): Likewise.
6464         (grub_reiserfs_iterate_dir): Likewise.
6465         (grub_reiserfs_open): Likewise.
6466         (grub_reiserfs_read): Likewise.
6467         (grub_reiserfs_get_journal): New function.
6468         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6469         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6470         using grub_reiserfs_get_journal.
6471         (grub_reiserfs_close): Release memory used by journal.
6473         * fs/affs.c (grub_affs_read_block): Change block type to
6474         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6476         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6478         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6480         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6482         * fs/udf.c (grub_udf_read_block): Change block type to
6483         grub_disk_addr_t. Use type cast to avoid warning.
6485         * fs/xfs.c (grub_xfs_read_block): Likewise.
6487 2008-05-16  Christian Franke  <franke@computer.org>
6489         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6490         to ensure that break with ESC will always work.
6491         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6492         Remove ESC from keyboard queue.
6494 2008-05-16  Christian Franke  <franke@computer.org>
6496         * util/biosdisk.c: [__CYGWIN__] Add includes.
6497         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6498         (get_os_disk): Move variable declarations to OS specific
6499         parts to avoid warning.
6500         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6501         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6502         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6503         Cygwin.
6504         * util/getroot.c: [__CYGWIN__] Add includes.
6505         (strip_extra_slashes): Fix "/" case.
6506         [__CYGWIN__] (get_win32_path): New function.
6507         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6508         [__CYGWIN__] (find_root_device): Disable.
6509         [__CYGWIN__] (get_bootsec_serial): New function.
6510         [__CYGWIN__] (find_cygwin_root_device): Likewise.
6511         [__linux__] (grub_guess_root_device): Add early returns to simplify
6512         structure.
6513         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6514         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6515         check for Linux only.
6517 2008-05-15  Bean  <bean123ch@gmail.com>
6519         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6520         keyboard hang problem in apple's intel mac.
6522 2008-05-09  Robert Millan  <rmh@aybabtu.com>
6524         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6525         devices.
6526         * util/grub-mkdevicemap.c (get_virtio_disk_name)
6527         (make_device_map): Likewise.
6528         Reported by Aurelien Jarno <aurel32@debian.org>
6530 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
6532         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6533         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6534         (make_device_map): Output entries for xvd type disks.
6536 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6538         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6539         devices.
6540         * util/grub-mkdevicemap.c (get_cciss_disk_name)
6541         (make_device_map): Likewise.
6542         Reported by Roland Dreier <rdreier@cisco.com>
6544 2008-05-07  Robert Millan  <rmh@aybabtu.com>
6546         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6547         grub_strstr() call.  Correct a few mistakes in failure path handling.
6549 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6551         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6552         Do not print a trailing slash (therefore, the root directory is an
6553         empty string).
6554         (convert_system_path_to_grub_path): Do not remove trailing slash
6555         from make_system_path_relative_to_its_root() output.
6557         * util/i386/pc/grub-install.in: Add trailing slash to output from
6558         make_system_path_relative_to_its_root().
6560 2008-05-06  Robert Millan  <rmh@aybabtu.com>
6562         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
6563         ensures that output lines aren't intermangled with those sent to
6564         stderr (via grub_util_info()).
6565         * util/grub-probe.c (grub_refresh): Likewise.
6566         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6568 2008-05-05  Christian Franke  <franke@computer.org>
6570         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6571         Add Cygwin device names.
6572         (get_ide_disk_name) [__CYGWIN__]: Likewise.
6573         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6574         (check_device): Return error instead of success on empty name.
6575         (make_device_map): Move label inside linux specific code to
6576         prevent compiler warning.
6578 2008-04-30  Robert Millan  <rmh@aybabtu.com>
6580         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6581         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6582         first boot option.
6583         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6585 2008-04-29  Robert Millan  <rmh@aybabtu.com>
6587         * docs/grub.cfg: New file (example GRUB configuration).
6589 2008-04-26  Robert Millan  <rmh@aybabtu.com>
6591         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
6592         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6593         and `disk/ieee1275/nand.c'.
6595 2008-04-25  Bean  <bean123ch@gmail.com>
6597         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6598         i386-linuxbios.
6600         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6601         change the buffer size to 4096 for cdrom device.
6603         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6604         and nand.mod.
6605         (_linux_mod_SOURCES): New variable.
6606         (_linux_mod_CFLAGS): Likewise.
6607         (_linux_mod_LDFLAGS): Likewise.
6608         (linux_mod_SOURCES): Likewise.
6609         (linux_mod_CFLAGS): Likewise.
6610         (linux_mod_LDFLAGS): Likewise.
6611         (nand_mod_SOURCES): Likewise.
6612         (nand_mod_CFLAGS): Likewise.
6613         (nand_mod_LDFLAGS): Likewise.
6615         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6616         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6617         type property. (nand device in olpc don't have this property)
6619         * include/grub/disk.h (grub_disk_dev_id): New macro
6620         GRUB_DISK_DEVICE_NAND_ID.
6622         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6623         function prototype.
6624         (grub_rescue_cmd_initrd): Likewise.
6626         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6627         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6628         ofw_cif_handler and ofw_idt, adjust padding number.
6630         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6631         GRUB_MACHINE_IEEE1275 is defined.
6633         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6634         Use NESTED_FUNC_ATTR attribute on the hook parameter.
6636         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6637         on nested function heap_init.
6638         (grub_upper_mem): New variable for i386-ieee1275.
6639         (grub_get_extended_memory): New function for i386-ieee1275.
6640         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6642         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6643         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6644         property.
6646         * loader/i386/ieee1275/linux.c: New file.
6648         * loader/i386/ieee1275/linux_normal.c: New file.
6650         * disk/ieee1275/nand.c: New file.
6652 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
6654         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6655         value.
6656         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6658 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6660         Restructures early code path on ieee1275 to unify grub_main() as
6661         the first C function that is executed in every platform.
6663         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6664         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6665         cmain().
6666         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6667         * kern/ieee1275/cmain.c (cmain): Rename to ...
6668         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6669         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6670         at the beginning.
6672 2008-04-18  Robert Millan  <rmh@aybabtu.com>
6674         * util/update-grub.in: Fix syntax error when setting
6675         `GRUB_PRELOAD_MODULES'.
6676         Reported by Stephane Chazelas <stephane@artesyncp.com>
6678 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
6680         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6681         section into account, newer toolchains generate unique build ids
6682         * configure.ac: remove the test for --build-id=none acceptance,
6683         we want build ids to be preserved
6684         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6685         far from other sections don't cause the raw binary images grow
6686         size
6688 2008-04-15  Robert Millan  <rmh@aybabtu.com>
6690         * disk/lvm.c: Update copyright year.
6691         * kern/misc.c: Likewise.
6693 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6695         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6696         there is no memory left for physical volume name.
6698 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
6700         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6701         volume name mapping to support bigger than 9 character names properly.
6703 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6705         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6706         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6708 2008-04-13  Christian Franke  <franke@computer.org>
6710         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6711         to create a floppy emulation boot CD when non emulation mode
6712         does not work.
6713         Enable Joliet CD filesystem extension.
6715 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6717         * kern/misc.c (grub_strncat): Fix off-by-one error.
6718         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6720         * kern/env.c (grub_env_context_close): Clear current context, not
6721         previous one.
6722         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6724         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6726 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6728         Improve robustness when handling LVM.
6730         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6731         (and leave `*p' unmodified).
6732         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6733         through it.
6734         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6735         iterating through it.
6736         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6737         through it.
6738         (grub_lvm_scan_device): Check the return value (and fail gracefully
6739         when due) on each grub_lvm_getvalue() or grub_strstr() call.
6740         Don't assume `vg->pvs != NULL' when iterating through it.
6742 2008-04-13  Robert Millan  <rmh@aybabtu.com>
6744         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6745         * genmk.rb (partmap): New variable.
6746         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6747         (#{partmap}): New target rule.
6748         * genpartmaplist.sh: New file.
6749         * Makefile.in (pkglib_DATA): Add partmap.lst.
6750         (partmap.lst): New target rule.
6751         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6752         modules (including all partition maps), instead of preloading them.
6754 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
6756         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6757         `linux-boot-prober' (if installed) to detect other operating
6758         systems which are installed on the computer and add them to
6759         the boot menu.
6760         * conf/common.rmk: Build and install 30_os-prober.
6762 2008-04-12  Robert Millan  <rmh@aybabtu.com>
6764         * kern/powerpc/ieee1275/init.c: Move from here ...
6765         * kern/ieee1275/init.c: ... to here.  Update all users.
6767         * kern/powerpc/ieee1275/cmain.c: Move from here ...
6768         * kern/ieee1275/cmain.c: ... to here.  Update all users.
6770         * kern/powerpc/ieee1275/openfw.c: Move from here ...
6771         * kern/ieee1275/openfw.c: ... to here.  Update all users.
6773         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6774         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
6776 2008-04-10  Pavel Roskin  <proski@gnu.org>
6778         * configure.ac: Always use "_cv_" in cache variables for
6779         compatibility with Autoconf 2.62.
6781 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6783         Revert grub/machine/init.h addition by Pavel (since it breaks on
6784         i386-ieee1275 and others):
6785         * util/i386/pc/misc.c: Remove grub/machine/init.h.
6786         * util/powerpc/ieee1275/misc.c: Likewise.
6788 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6790         * util/grub-probe.c (probe): Improve error message.
6792 2008-04-07  Robert Millan  <rmh@aybabtu.com>
6794         * util/biosdisk.c (read_device_map): Skip devices that don't exist
6795         (this prevents the presence of a bogus entry from ruining the whole
6796         thing).
6798 2008-04-06  Pavel Roskin  <proski@gnu.org>
6800         * util/biosdisk.c: Include grub/util/biosdisk.h.
6801         * util/grub-fstest.c (execute_command): Make static.
6802         * util/grub-mkdevicemap.c (check_device): Likewise.
6803         * util/i386/pc/misc.c: Include grub/machine/init.h.
6804         * util/powerpc/ieee1275/misc.c: Likewise.
6805         * util/lvm.c: Include grub/util/lvm.h.
6806         * util/misc.c: Include grub/kernel.h, grub/misc.h and
6807         grub/cache.h.
6808         * util/raid.c: Include grub/util/raid.h.
6809         (grub_util_getdiskname): Make static.
6811         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6812         grub_hostfs_fini(), as they are called from grub_init_all() and
6813         grub_fini_all() respectively.  This fixes an infinite loop in
6814         grub-fstest due to double registration of hostfs.
6815         Reported by Christian Franke <Christian.Franke@t-online.de>
6817 2008-04-05  Pavel Roskin  <proski@gnu.org>
6819         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6820         all 8 functions.  Otherwise, probe function 0 only.
6822 2008-04-04  Pavel Roskin  <proski@gnu.org>
6824         * commands/lspci.c (grub_lspci_iter): Print the bus number
6825         correctly.
6827         * commands/lspci.c (grub_pci_classes): Fix typos.
6828         (grub_lspci_iter): Don't print func twice.  Print vendor ID
6829         before device ID, as it's normally done.
6831         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6832         Fix signedness warnings.
6833         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6834         Likewise.
6835         * util/ieee1275/get_disk_name.c: Include config.h so that
6836         _GNU_SOURCE is defined and getline() is declared.  Mark an
6837         unused argument as such.  Fix a signedness warning.
6839 2008-04-02  Pavel Roskin  <proski@gnu.org>
6841         * genkernsyms.sh.in: Use more robust assignments for CC and
6842         srcdir.  Quote srcdir.
6843         * gensymlist.sh.in: Likewise.  Assert at the compile time that
6844         the symbol table is not empty.
6846         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6847         * fs/cpio.c (grub_cpio_read): Likewise.
6849 2008-04-01  Pavel Roskin  <proski@gnu.org>
6851         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6852         * disk/host.c (grub_host_open): Likewise.
6853         * disk/loopback.c (grub_loopback_open): Likewise.
6854         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6855         disk->id as in disk/host.c, not a multi-character constant.
6857         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
6858         later is obsolete, potentially dangerous and sets a bad example.
6859         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6860         * util/misc.c (grub_util_get_image_size): Likewise.
6862         * disk/loopback.c (options): Improve help for "--partitions".
6864         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6865         options to align them with the short options, e.g. "echo -e".
6867 2008-03-31  Bean  <bean123ch@gmail.com>
6869         * video/reader/png.c (grub_png_data): New member is_16bit and
6870         image_data.
6871         (grub_png_decode_image_header): Detect 16 bit png image.
6872         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6873         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6874         (grub_video_reader_png): Release memory occupied by image_data.
6876         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6877         4096 bytes.
6878         (grub_nfs_mount): Skip the test for sector per cluster.
6880         * include/grub/ntfs.h (MAX_SPC): Removed.
6882 2008-03-31  Bean  <bean123ch@gmail.com>
6884         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6885         (grub_probe_SOURCES): Add fs/afs.c.
6886         (grub_fstest_SOURCES): Likewise.
6887         (afs_mod_SOURCES): New variable.
6888         (afs_mod_CFLAGS): Likewise.
6889         (afs_mod_LDFLAGS): Likewise.
6891         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6892         (grub_emu_SOURCES): Likewise.
6894         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6896         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6898         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6900         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6902         * fs/afs.c: New file.
6904 2008-03-30  Pavel Roskin  <proski@gnu.org>
6906         * disk/host.c: Include grub/misc.h to fix a warning.
6907         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6908         warnings about implicit declarations.
6910         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6911         variable.
6912         * include/grub/i386/loader.h: Change declaration of
6913         grub_linux_boot() to match what grub_loader_set() expects.
6914         * util/getroot.c (grub_guess_root_device): Return const char* to
6915         fix a warning.
6916         * util/grub-probe.c (probe): Fix a warning about uninitialized
6917         abstraction_name variable.
6918         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6919         second argument as unused to fix a warning.
6921         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6922         missing grub_error() call.
6924         * util/update-grub_lib.in: Define datarootdir, since Autoconf
6925         2.60 and newer uses it to define datadir.
6927         * commands/sleep.c: Fix warning about implicit declaration.
6928         * disk/memdisk.c: Likewise.
6929         * loader/aout.c: Likewise.
6930         * loader/i386/bsd_normal.c: Likewise.
6931         * util/grub-probe.c: Likewise.
6933         * commands/i386/cpuid.c (has_longmode): Make static.
6934         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6935         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6937         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6938         GDT.  This is more robust, as %ds can change.
6939         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6940         calling real_to_prot().
6941         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6943 2008-03-28  Pavel Roskin  <proski@gnu.org>
6945         * kern/i386/pc/startup.S: Assert that uncompressed functions
6946         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6947         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6948         code, as they push parts of the code (error handlers) beyond
6949         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
6950         code as correctness and size.
6952 2008-03-28  Pavel Roskin  <proski@gnu.org>
6954         * kern/i386/pc/startup.S
6955         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6956         data block address to the real mode, keep offset minimal.  This
6957         works around a bug in AWARD BIOS on old Athlon systems, which
6958         makes CD detection hang.
6960 2008-03-26  Pavel Roskin  <proski@gnu.org>
6962         * normal/color.c (grub_parse_color_name_pair): Make `name' a
6963         const.
6964         * include/grub/normal.h: Add grub_parse_color_name_pair()
6965         declaration.
6967 2008-03-24  Bean  <bean123ch@gmail.com>
6969         * disk/i386/pc/biosdisk.c (cd_start): Removed.
6970         (cd_count): Removed.
6971         (cd_drive): New variable.
6972         (grub_biosdisk_get_drive): Don't check for (cdN) device.
6973         (grub_biosdisk_call_hook): Likewise.
6974         (grub_biosdisk_iterate): Change cdrom detection method.
6975         (grub_biosdisk_open): Replace cd_start with cd_drive.
6976         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6977         detect cdrom device.
6979         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6980         Removed.
6981         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6982         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6983         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6984         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6985         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6986         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6987         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6988         (grub_biosdisk_cdrp): New structure.
6989         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6991         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6993         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6994         device.
6996         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6997         New function.
6999 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7001         Remove 2 TiB limit in ata.mod.
7002         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7003         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7004         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7005         grub_uint64_t instead of grub_uint32_t.
7007 2008-03-05  Bean  <bean123ch@gmail.com>
7009         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7010         (grub_multiboot): Set boot device.
7012         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7014 2008-03-02  Bean  <bean123ch@gmail.com>
7016         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7017         symlink_buffer.
7019 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7021         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7022         texinfo.tex.
7024         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7025         modified.
7027         * docs/fdl.texi: New file.
7029         * docs/mdate-sh: New file. Copied from gnulib.
7030         * docs/texinfo.tex: Likewise.
7032         * config.guess: Updated from gnulib.
7033         * install-sh: Likewise.
7035 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7037         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7038         (aout_mod_SOURCES): New variable.
7039         (aout_mod_CFLAGS): Likewise.
7040         (aout_mod_LDFLAGS): Likewise.
7042         * conf/i386-ieee1275.rmk: Likewise.
7044 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7046         * util/update-grub.in: Reorganise terminal validity check.  Accept
7047         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7048         Based on suggestion by Franklin PIAT.
7050 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7052         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7053         function.
7054         * util/getroot.c (grub_util_check_block_device): New function that
7055         returns the given argument if it is a block device and returns NULL else.
7056         * util/grub-probe.c (argument_is_device): New variable.
7057         (probe): Promote device_name from a variable to an argument. Receive
7058         device_name from grub_util_check_block_device() if path is NULL and from
7059         grub_guess_root_device() else. Do not free() device_name anymore.
7060         (options): Introduce new parameter '-d, --device'.
7061         (main): Add description of the new parameter to the help screen.
7062         Rename path variable to argument. Set argument_is_device if the '-d'
7063         option is given. Pass argument to probe() depending on
7064         argument_is_device.
7066 2008-02-24  Bean  <bean123ch@gmail.com>
7068         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7069         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7070         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7071         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7072         (GRUB_ISO9660_VOLDESC_END): Likewise.
7073         (grub_iso9660_primary_voldesc): New member escape.
7074         (grub_iso9660_data): New member joliet.
7075         (grub_iso9660_convert_string): New function.
7076         (grub_iso9660_mount): Detect joliet extension.
7077         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7078         (grub_iso9660_iso9660_label): Likewise.
7080         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7081         (grub_setup_SOURCES): Add fs/udf.c.
7082         (grub_fstest_SOURCES): Likewise.
7083         (udf_mod_SOURCES): New variable.
7084         (udf_mod_CFLAGS): Likewise.
7085         (udf_mod_LDFLAGS): Likewise.
7087         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7088         (grub_emu_SOURCES): Likewise.
7090         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7092         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7094         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7096         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7098         * fs/udf.c: New file.
7100 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7102         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7103         (normal/lexer.c_DEPENDENCIES): New variables.
7104         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7105         (normal/lexer.c_DEPENDENCIES): Likewise.
7106         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7107         (normal/lexer.c_DEPENDENCIES): Likewise.
7108         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7109         (normal/lexer.c_DEPENDENCIES): Likewise.
7110         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7111         (normal/lexer.c_DEPENDENCIES): Likewise.
7112         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7113         (normal/lexer.c_DEPENDENCIES): Likewise.
7115 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7117         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7118         since they were intended to be in hex.  This didn't break previously
7119         because of a bug in gpt_partition_map_iterate() (see below).
7121         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7122         when checking the validity of GPT header.
7123         Remove `partno', since it always provides the same information as `i'.
7125 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7127         * include/grub/efi/time.h: Fix a wrong comment.
7129 2008-02-19  Pavel Roskin  <proski@gnu.org>
7131         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7132         message.
7134 2008-02-19  Bean  <bean123ch@gmail.com>
7136         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7137         (aout_mod_SOURCES): New variable.
7138         (aout_mod_CFLAGS): Likewise.
7139         (aout_mod_LDFLAGS): Likewise.
7140         (_bsd_mod_SOURCES): New variable.
7141         (_bsd_mod_CFLAGS): Likewise.
7142         (_bsd_mod_LDFLAGS): Likewise.
7143         (bsd_mod_SOURCES): New variable.
7144         (bsd_mod_CFLAGS): Likewise.
7145         (bsd_mod_LDFLAGS): Likewise.
7147         * include/grub/aout.h: New file.
7149         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7151         * include/grub/i386/bsd.h: New file.
7153         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7154         to make it public.
7156         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7157         function is called, so that it's possible to change it inside the hook.
7158         (grub_elf64_load): Likewise.
7159         (grub_elf_file): Don't close the file if elf header is not found.
7160         (grub_elf_close): Close the file if grub_elf_file fails (The new
7161         grub_elf_file won't close it).
7162         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7163         (grub_elf64_size): Likewise.
7165         * kern/i386/loader.S (grub_unix_real_boot): New function.
7167         * loader/aout.c: New file.
7169         * loader/i386/bsd.c: New file.
7171         * loader/i386/bsd_normal.c: New file.
7173         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7175         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7176         can test other formats.
7178 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7180         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7181         (grub_gpt_partition_type_empty): Redefine with macro from
7182         `<grub/gpt_partition.h>'.
7183         (gpt_partition_map_iterate): Adjust partition type comparison.
7185         Export `entry' as partmap-specific `part.data' struct.
7186         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7188         * include/grub/gpt_partition.h (grub_gpt_header)
7189         (grub_gpt_partentry): ... to here (new file).
7191         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7193         (grub_gpt_partition_type_bios_boot): New const variable, defined
7194         with macro from `<grub/gpt_partition.h>'.
7196         (setup): Replace `first_start' with `embed_region', which keeps
7197         track of the embed region (and is partmap-agnostic).
7199         Replace find_first_partition_start() with find_usable_region(),
7200         which finds a usable region for embedding using partmap-specific
7201         knowledge (supports PC/MSDOS and GPT).
7203         Fix all assumptions that the embed region start at sector 1, using
7204         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7205         rather than `first_start' to calculate available size.
7207         In grub_util_info() message, replace "into after the MBR" with an
7208         indication of the specific sector our embed region starts at.
7210 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7212         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7213         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7214         `commands/reboot.c'.
7215         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7216         (halt_mod_SOURCES): Likewise.
7217         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7218         (halt_mod_SOURCES): Likewise.
7220 2008-02-17  Christian Franke  <franke@computer.org>
7222         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7224 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7226         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7227         set `first_start' to 0 for non-PC/MSDOS partition maps.
7229 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7231         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7232         do not assume partition map is PC/MSDOS before performing checks that
7233         are specific to that layout.
7235 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7237         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7238         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7239         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7241 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7243         * configure.ac: Only a cosmetic change on the handling of
7244         -fno-stack-protector.
7246 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7248         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7249         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7250         reboot.c.
7251         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7252         (halt_mod_SOURCES): New variable.
7253         (halt_mod_CFLAGS): Likewise.
7254         (halt_mod_LDFLAGS): Likewise.
7255         (reboot_mod_SOURCES): Likewise.
7256         (reboot_mod_CFLAGS): Likewise.
7257         (reboot_mod_LDFLAGS): Likewise.
7259         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7260         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7261         reboot.c.
7262         (halt_mod_SOURCES): Likewise.
7263         (reboot_mod_SOURCES): Likewise.
7265         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7266         commands/i386/pc/reboot.c by commands/reboot.c.
7267         (reboot_mod_SOURCES): Likewise.
7269         * commands/i386/pc/reboot.c: merge this file ...
7271         * commands/ieee1275/reboot.c: ... and this file ...
7273         * commands/reboot.c: ... to this file.
7274         Add some precompiler directive to include the correct header for
7275         each machine.
7277         * commands/ieee1275/halt.c: move this file ...
7279         * commands/halt.c: ... to here.
7280         Add some precompiler directive to include the correct header for
7281         each machine.
7283         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7284         (grub_halt): Likewise.
7286         * kern/efi/efi.c (grub_reboot): New function.
7287         (grub_halt): Likewise.
7289 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7291         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7292         /dev (like it is done for /dev/mapper).  This doesn't provide support
7293         for EVMS, but at least it is now easy to identify the problem when it
7294         arises.
7296 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7298         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7299         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7300         comparing it with -1, not 0.
7302 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7304         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7305         `disk/lvm.c'.
7306         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7307         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7309         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7310         `disk/lvm.c' to the end of the list.
7311         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7312         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7314 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7316         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7317         grub_print_error() instead.  This will let user know why we're entering
7318         rescue mode.
7319         Based on suggestions from Sam Morris.
7321 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7323         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7324         on remaining N args, instead of "--" arg N times.
7326 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7328         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7329         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7330         pattern for unknown glyphs.
7332 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7334         * configure.ac: Probe for `help2man'.
7335         * Makefile.in (builddir): New variable.
7336         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7337         or otherwise add a few flags/options to it.
7338         (install-local): For every executable utility or script that is
7339         installed, invoke $(HELP2MAN) to install a manpage based on --help
7340         output.
7342         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7343         that it doesn't prevent --help from working in build tree.
7345         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7346         with `bug-grub@gnu.org'.
7347         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7348         * util/update-grub.in (usage): New function.
7349         Implement proper argument check, with support for --help and --version
7350         (as well as existing -y).
7352 2008-02-09  Christian Franke  <franke@computer.org>
7354         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7355         avoid overwriting previous output.
7356         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7358 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7360         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7361         drawing the menu.
7363 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7365         * commands/sleep.c: New file.
7366         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7367         (sleep_mod_SOURCES): New variable.
7368         (sleep_mod_CFLAGS): Likewise.
7369         (sleep_mod_LDFLAGS): Likewise.
7371 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7373         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7374         situations in which we can deduce the RAID size and the superblock
7375         doesn't match it.
7377 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7379         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7380         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7381         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7383         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7384         and return a grub_diskmemberlist_t composed of physical array members.
7385         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7387         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7388         prototype.
7389         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7390         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7391         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7393         * util/grub-probe.c (probe): Move partmap probing code from here ...
7394         (probe_partmap): ... to here.
7395         (probe): Use probe_partmap() once for the disk we're probing, and
7396         additionally, when such disk contains a memberlist() struct member,
7397         once for each disk that is contained in the structure returned by
7398         memberlist().
7400 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7402         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7403         environment variable to 'all' in order to obtain debug output from
7404         non-util/ code.
7405         * util/i386/pc/grub-setup.c (main): Likewise.
7407 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7409         * disk/raid.c (grub_raid_scan_device): Check for
7410         `array->device[sb.this_disk.number]' rather than for
7411         `array->device[sb.this_disk.number]->name', since the latter is not
7412         guaranteed to be accessible.
7414 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7416         * disk/raid.c: Update copyright.
7417         * fs/cpio.c: Likewise.
7418         * include/grub/raid.h: Likewise.
7419         * loader/i386/pc/multiboot.c: Likewise.
7420         * util/hostfs.c: Likewise.
7422 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7424         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7425         to a grub_disk_t array.
7426         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7427         `device[x]'.
7428         (grub_raid_scan_device): Replace `device[x].name' accesses with
7429         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7431 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7433         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7434         grub_dprintf() calls.
7435         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7436         error message.
7438 2008-02-07  Christian Franke  <franke@computer.org>
7440         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7441         instead of fseek and ftell to support large files.
7442         (grub_hostfs_read): Likewise.
7444 2008-02-07  Robert Millan  <rmh@aybabtu.com>
7446         Patch from Jeroen Dekkers.
7447         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7448         failure, since successfully reading all array members might not be
7449         required.
7451 2008-02-06  Robert Millan  <rmh@aybabtu.com>
7453         * util/grub-probe.c (probe): Simplify partmap probing (with the
7454         assumption that the first word up to the underscore equals to
7455         the module name).
7457 2008-02-06  Christian Franke  <franke@computer.org>
7459         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7460         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7461         last block of a cpio or tar stream.
7462         Check for "TRAILER!!!" instead of any empty data
7463         block to detect last block of a cpio stream.
7464         (grub_cpio_dir): Fix constness of variable np.
7465         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7466         cpio or tar trailer is detected.  This fixes a crash
7467         on open of a non existing file.
7469 2008-02-05  Bean  <bean123ch@gmail.com>
7471         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7472         address of entry.
7473         (grub_multiboot_load_elf64): Likewise.
7474         (grub_multiboot): Initialize mbi structure.
7476         * util/grub-fstest.c: Don't include unused header file script.h.
7478         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7479         of file.
7480         (grub_fstest_SOURCES): Likewise.
7482 2008-02-05  Robert Millan  <rmh@aybabtu.com>
7484         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7485         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7486         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7487         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7489         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7490         (translation_table): Replace hardcoded values with macros
7491         provided by `<grub/term.h>'.
7493         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7494         (keyboard_map): Correct/add a few values, with macros provided
7495         by `<grub/term.h>'.
7496         (keyboard_map_shift): Zero values that don't differ from their
7497         `keyboard_map' equivalents.
7498         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7499         Discard the second scan code that is always sent by Caps lock.
7500         Only use `keyboard_map_shift' when it provides a non-zero value,
7501         otherwise fallback to `keyboard_map'.
7503 2008-02-04  Bean  <bean123ch@gmail.com>
7505         * Makefile.in (enable_grub_fstest): New variable.
7507         * conf/common.rmk (grub_fstest_init.lst): New rule.
7508         (grub_fstest_init.h): Likewise.
7509         (grub_fstest_init.c): Likewise.
7510         (util/grub-fstest.c_DEPENDENCIES): New variable.
7511         (grub_fstest_SOURCES): Likewise.
7513         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7515         * util/grub-fstest.c: New file.
7517 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7519         Make grub-setup handle a separate root device.
7521         * util/i386/pc/grub-setup.c (setup): Always open the root device,
7522         so that the root device can be compared with the destination
7523         device.
7524         When embedding the core image, if the root and destination devices
7525         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7526         0xFF.
7527         When not embedding, set ROOT_DRIVE to 0xFF.
7529 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7531         Add support for having a grub directory in a different drive. This
7532         is still only the data handling part.
7534         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7535         (codestart): Save %dh in GRUB_ROOT_DRIVE.
7536         (grub_root_drive): New variable.
7538         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7539         instead of GRUB_BOOT_DRIVE to construct a device name. Set
7540         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7541         as it was.
7543         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7545         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7546         macro.
7547         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7549         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7550         is bogus, because PXE booting does not specify any drive
7551         correctly.
7553         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7554         am not sure if this is really correct.
7556         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7557         is always identical to the boot drive when booting from a CD.
7559         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7560         longer.
7561         (root_drive): New variable.
7562         (real_start): Unconditionally set %dh to ROOT_DRIVE.
7563         (setup_sectors): Push %dx right after popping it, because %dh will
7564         be modified later.
7565         (copy_buffer): Restore %dx.
7567 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7569         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7570         use `cdboot.img' for cdrom images.
7572 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7574         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7575         only setup gfxterm when `font' command has succeeded.
7577 2008-02-03  Robert Millan  <rmh@aybabtu.com>
7579         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7580         (grub_rescue_cmd_multiboot_loader)
7581         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7583 2008-02-03  Pavel Roskin  <proski@gnu.org>
7585         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7586         %edx and %esi from stack only after grub_gate_a20() is called.
7587         grub_gate_a20() clobbers %edx.
7589 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
7591         * configure.ac (AC_INIT): Bumped to 1.96.
7593         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7594         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7595         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7596         video/readers/png.c.
7598 2008-02-03  Bean  <bean123ch@gmail.com>
7600         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7601         (cdboot_img_SOURCES): New variable.
7602         (cdboot_img_ASFLAGS): New variable.
7603         (cdboot_img_LDFLAGS): New variable.
7605         * boot/i386/pc/cdboot.S: New file.
7607         * disk/i386/pc/biosdisk.c (cd_start): New variable.
7608         (cd_count): Likewise.
7609         (grub_biosdisk_get_drive): Add support for cd device.
7610         (grub_biosdisk_call_hook): Likewise.
7611         (grub_biosdisk_iterate): Likewise.
7612         (grub_biosdisk_open): Likewise.
7613         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7614         (grub_biosdisk_rw): Support reading from cd device.
7615         (GRUB_MOD_INIT): Iterate cd devices.
7617         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7618         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7619         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7621         * kern/i386/pc/init.c (make_install_device): Check for cd device.
7623 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7625         * commands/read.c: New file.
7626         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7627         (read_mod_SOURCES): New variable.
7628         (read_mod_CFLAGS): Likewise.
7629         (read_mod_LDFLAGS): Likewise.
7631 2008-02-02  Robert Millan  <rmh@aybabtu.com>
7633         * normal/main.c (grub_normal_execute): Check for `menu->size' when
7634         determining whether menu has to be displayed.
7636 2008-02-02  Marco Gerards  <marco@gnu.org>
7638         * bus/pci.c: New file.
7640         * include/grub/pci.h: Likewise.
7642         * include/grub/i386/pc/pci.h: Likewise.
7644         * commands/lspci.c: Likewise.
7646         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7647         `lspci.mod'.
7648         (pci_mod_SOURCES): New variable.
7649         (pci_mod_CFLAGS): Likewise.
7650         (pci_mod_LDFLAGS): Likewise.
7651         (lspci_mod_SOURCES): Likewise.
7652         (lspci_mod_CFLAGS): Likewise.
7653         (lspci_mod_LDFLAGS): Likewise.
7655 2008-02-02  Bean  <bean123ch@gmail.com>
7657         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7658         (grub_ufs_get_file_block): Fix indirect block calculation problem.
7660         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7661         (grub_xfs_btree_node): New structure.
7662         (grub_xfs_btree_root): New structure.
7663         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7664         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7665         (GRUB_XFS_EXTENT_BLOCK): Likewise.
7666         (GRUB_XFS_EXTENT_SIZE): Likewise.
7667         (grub_xfs_read_block): Support btree format type.
7668         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7669         Use directory block as basic unit.
7671         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7673         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7674         __attribute__ ((__regparm__ (1))).
7676 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7678         Correct a mistake in previous commit.
7680         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7681         top.
7682         (normal/command.c_DEPENDENCIES): New variable.
7684 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7686         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7687         top.
7688         (normal/command.c_DEPENDENCIES): New variable.
7689         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7690         * conf/i386-ieee1275.rmk: Likewise.
7691         * conf/i386-linuxbios.rmk: Likewise.
7692         * conf/i386-pc.rmk: Likewise.
7693         * conf/sparc64-ieee1275.rmk: Likewise.
7694         * conf/powerpc-ieee1275.rmk: Likewise.
7695         (grub_emu_SOURCES): Add `fs/fshelp.c'.
7697         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7699 2008-02-01  Robert Millan  <rmh@aybabtu.com>
7701         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7702         call at beginning of function.
7704 2008-01-31  Pavel Roskin  <proski@gnu.org>
7706         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7707         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7708         (grub_mkrescue_SOURCES): Likewise.
7709         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7711 2008-01-30  Robert Millan  <rmh@aybabtu.com>
7713         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7714         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7715         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7716         (grub_probe_SOURCES): ... to here.
7718         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7719         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7720         * conf/i386-ieee1275.rmk: Likewise.
7721         * conf/i386-linuxbios.rmk: Likewise.
7722         * conf/powerpc-ieee1275.rmk: Likewise.
7724 2008-01-30  Tristan Gingold  <gingold@free.fr>
7726         * kern/rescue.c: Silently accept empty lines.
7728 2008-01-29  Bean  <bean123ch@gmail.com>
7730         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7731         (real_code_2): Code cleanup and change comment style.
7732         (move_memory): Avoid using 32-bit address mode.
7734 2008-01-29  Bean  <bean123ch@gmail.com>
7736         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7737         (png_mod_SOURCES): New variable.
7738         (png_mod_CFLAGS): Likewise.
7739         (png_mod_LDFLAGS): Likewise.
7741         * video/readers/png.c: New file.
7743 2008-01-28  Robert Millan  <rmh@aybabtu.com>
7745         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7746         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7747         `ifndef GRUB_MOD_GAP' hack.
7748         * util/elf/grub-mkimage.c (add_segments): Likewise.
7750 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7752         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7753         `GRUB_MOD_GAP' for platforms in which it's not defined.
7754         * util/elf/grub-mkimage.c (add_segments): Likewise.
7756 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7758         Get grub-emu to build again (including parallel builds).
7760         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7761         Split into ...
7762         (util/grub-emu.c_DEPENDENCIES): ... this, ...
7763         (normal/execute.c_DEPENDENCIES): ... this, ...
7764         (grub-emu_DEPENDENCIES): ... and this.
7766         * conf/i386-efi.rmk: Likewise.
7767         * conf/i386-linuxbios.rmk: Likewise.
7768         * conf/i386-ieee1275.rmk: Likewise.
7769         * conf/powerpc-ieee1275.rmk: Likewise.
7770         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7772 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7774         * NEWS: Add a few items.
7776 2008-01-27  Robert Millan  <rmh@aybabtu.com>
7778         Fix parallel builds with grub-emu.  Based on earlier commit for
7779         grub-probe and grub-setup.
7781         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7782         (util/grub-emu.c_DEPENDENCIES): ... this.
7783         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7784         (util/grub-emu.c_DEPENDENCIES): ... this.
7785         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7786         (util/grub-emu.c_DEPENDENCIES): ... this.
7787         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7788         (util/grub-emu.c_DEPENDENCIES): ... this.
7789         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7790         (util/grub-emu.c_DEPENDENCIES): ... this.
7792 2008-01-27  Pavel Roskin  <proski@gnu.org>
7794         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7795         to create a gap between _end and the modules added to the image
7796         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
7797         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7798         * util/elf/grub-mkimage.c (add_segments): Likewise.
7800 2008-01-26  Pavel Roskin  <proski@gnu.org>
7802         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7803         just return an error.
7805 2008-01-26  Bean  <bean123ch@gmail.com>
7807         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7808         (grub_reiserfs_get_item): Save offset of the next item.
7809         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7811 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7813         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7814         make all filesystem sources appear together (possibly fixing omissions
7815         while at it).
7816         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7817         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7818         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7819         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7821         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
7822         add `kern/file.c'.
7823         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7824         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7825         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7826         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7828         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7829         (probe): Add a sanity check to make sure of our ability to read
7830         requested files when probing for filesystem type.
7832         * genmk.rb: Update copyright year (2007).
7834         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7835         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7836         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7837         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7838         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7839         : Remove function prototypes.
7841 2008-01-25  Robert Millan  <rmh@aybabtu.com>
7843         Revert my previous commits (based on wrong assumption of how grub_errno
7844         works).
7846         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7847         * kern/file.c (grub_file_open): Likewise.
7849 2008-01-24  Pavel Roskin  <proski@gnu.org>
7851         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7852         that hang if GRUB tries to setup colors.
7853         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7854         colors for firmwares that don't support it.
7855         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7856         Recognize Open Hack'Ware, set flags to work around its
7857         limitations.
7859 2008-01-24  Robert Millan  <rmh@aybabtu.com>
7861         * kern/file.c (grub_file_open): Do not account previous failures of
7862         unrelated functions when grub_errno is checked for.
7863         Reported by Oleg Strikov.
7865 2008-01-24  Bean  <bean123ch@gmail.com>
7867         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7868         (grub_ufs_sblock): New member volume name.
7869         (grub_ufs_find_file): Fix string copy bug.
7870         (grub_ufs_label): Implement this function properly.
7872         * fs/hfs.c (grub_hfs_cnid_type): New enum.
7873         (grub_hfs_iterate_records): Use the correct file number for extents
7874         and catalog file. Fix problem in next index calculation.
7875         (grub_hfs_find_node): Replace recursive function call with loop.
7876         (grub_hfs_iterate_dir): Replace recursive function call with loop.
7878 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7880         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7881         `<grub/symbol.h>' and `<grub/multiboot.h>'.
7882         (grub_multiboot2_real_boot): New function prototype.
7884         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7885         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7887         * kern/i386/ieee1275/init.c (grub_os_area_addr)
7888         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7890 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7892         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7893         #ifdef'ed out grub_printf().
7895 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7897         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7898         grub_dprintf calls, since they make "debug=all" mode unusable.
7899         (grub_console_checkkey): Likewise.
7901 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7903         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7904         `term/i386/pc/at_keyboard.c'.
7905         (pkglib_MODULES): Add `serial.mod'.
7906         (serial_mod_SOURCES): New variable.
7907         (serial_mod_CFLAGS): Likewise.
7908         (serial_mod_LDFLAGS): Likewise.
7910         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
7911         `<grub/powerpc/ieee1275/console.h>'.
7912         (grub_keyboard_controller_init): New function prototype.
7913         (grub_console_checkkey): Likewise.
7914         (grub_console_getkey): Likewise.
7916         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7917         keyboard on i386.
7919         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7920         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7922 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7924         * kern/i386/pc/init.c (make_install_device): When memdisk image is
7925         present, "(memdisk)/boot/grub" becomes the default prefix.
7927         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7928         a memdisk tarball with all the modules.  Add --overlay=DIR option that
7929         allows users to overlay additional files into the image.
7931 2008-01-23  Robert Millan  <rmh@aybabtu.com>
7933         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7934         and `machine/memory.h'.
7935         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7936         (_multiboot_mod_SOURCES): New variable.
7937         (_multiboot_mod_CFLAGS): Likewise.
7938         (_multiboot_mod_LDFLAGS): Likewise.
7939         (multiboot_mod_SOURCES): Likewise.
7940         (multiboot_mod_CFLAGS): Likewise.
7941         (multiboot_mod_LDFLAGS): Likewise.
7943         * include/grub/i386/ieee1275/loader.h: New file.
7945         * include/grub/i386/ieee1275/machine.h: Likewise.
7947         * include/grub/i386/ieee1275/memory.h: Likewise.
7949         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7950         variable declaration.
7951         (grub_os_area_size): Likewise.
7953         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7954         (grub_lower_mem, grub_upper_mem): New variables.
7955         (grub_stop_floppy): New function (just to make
7956         grub_multiboot2_real_boot() happy).
7958         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7959         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7960         (grub_stop): New function.
7961         Include `"../realmode.S"' and `"../loader.S"'.
7963         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7964         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7966         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7967         rely on grub_multiboot2_real_boot() for final boot.
7969 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7971         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7972         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7973         device that doesn't look like an SD card.
7974         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7975         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7976         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7977         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7978         found.
7980 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7982         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7983         avoid claiming over our own code.
7985 2008-01-22  Bean  <bean123ch@gmail.com>
7987         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7988         (jpeg_mod_SOURCES): New variable.
7989         (jpeg_mod_CFLAGS): Likewise.
7990         (jpeg_mod_LDFLAGS): Likewise.
7992         * video/readers/jpeg.c : New file.
7994 2008-01-22  Bean  <bean123ch@gmail.com>
7996         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7997         there are no more items.
7999 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8001         * kern/mm.c (grub_mm_init_region): Improve debug message.
8003 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8005         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8006         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8007         address.
8008         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8009         a C macro.
8010         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8011         Indicates start of upper memory.
8012         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8013         (generate_image): Abort when image size is big enough to corrupt
8014         upper memory.
8016         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8017         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8018         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8019         instead of hardcoding 0xA0000.
8020         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8021         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8022         instead of hardcoding 0xA0000.
8024 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8026         * disk/memdisk.c (memdisk_size): New variable.
8027         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8028         `memdisk_size'.
8029         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8030         image to dynamic memory.
8031         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8032         `memdisk_size'.  Free memdisk block.
8034 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8036         Fix detection of very small filesystems (like tar).
8038         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8039         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8040         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8041         a problem with this disk).
8043 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8045         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8046         on grub_biosdisk_rw_standard() error.
8048 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8050         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8051         recent changes.
8052         * kern/elf.c: Likewise.
8053         * kern/ieee1275/ieee1275.c: Likewise.
8054         * kern/powerpc/ieee1275/openfw.c: Likewise.
8055         * term/ieee1275/ofconsole.c: Likewise.
8057 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8059         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8061         * include/grub/kernel.h (grub_arch_memdisk_addr)
8062         (grub_arch_memdisk_size): Moved from here ...
8064         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8065         (grub_arch_memdisk_size): ... to here.
8067 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8069         Mostly based on bugfix from Bean.
8071         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8072         attribute with hook() parameter.
8073         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8074         declaration.
8075         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8076         attribute with hook() parameter.
8077         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8078         declaration.
8080 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8082         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8083         (pkglib_MODULES): Add `memdisk.mod'.
8084         (memdisk_mod_SOURCES): New variable.
8085         (memdisk_mod_CFLAGS): Likewise.
8086         (memdisk_mod_LDFLAGS): Likewise.
8088         * disk/memdisk.c: New file.
8090         * include/grub/disk.h (grub_disk_dev_id): Add
8091         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8093         * include/grub/i386/pc/kernel.h
8094         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8095         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8096         (grub_kernel_image_size): New variable declaration.
8097         (grub_total_module_size): Likewise.
8098         (grub_memdisk_image_size): Likewise.
8100         * include/grub/i386/pc/memory.h
8101         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8103         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8104         (grub_arch_memdisk_addr): New variable declaration.
8105         (grub_arch_memdisk_size): Likewise.
8107         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8108         (grub_arch_memdisk_size): Likewise.
8110         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8111         (codestart): Replace hardcoded `0x100000' with
8112         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8114         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8115         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8116         not NULL, append the contents of the file it refers to, at the end of
8117         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8118         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8119         (options): Add "memdisk"|'m' option.
8120         (main): Parse --memdisk|-m option, and pass user-provided path as
8121         parameter to generate_image().
8123 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8125         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8126         grub_dprintf() calls from here ...
8127         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8129 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8131         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8133         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8134         declaration.
8135         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8136         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8137         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8138         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8139         property).
8140         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8141         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8143 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8145         Get rid of confusing function (superseded by
8146         `grub_ieee1275_get_integer_property')
8147         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8148         prototype.
8149         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8150         function.
8151         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8152         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8153         in native endianness from grub_ieee1275_get_integer_property().
8155 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8157         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8158         command after "shut-down", since implementations differ on which
8159         the command for halt is.
8161 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8163         * include/grub/i386/linuxbios/console.h: Add header protection.
8164         (grub_keyboard_controller_init): New function prototype.
8165         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8166         (KEYBOARD_COMMAND_READ): Likewise.
8167         (KEYBOARD_COMMAND_WRITE): Likewise.
8168         (KEYBOARD_SCANCODE_SET1): Likewise.
8169         (grub_keyboard_controller_write): New function.
8170         (grub_keyboard_controller_read): Likewise.
8171         (grub_keyboard_controller_init): Likewise.
8173         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8174         (grub_console_init): On coreboot/LinuxBIOS, call
8175         grub_keyboard_controller_init().
8177 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8179         PowerPC changes provided by Pavel Roskin.
8181         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8182         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8183         don't rely on cmain() doing it.
8184         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8185         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8187 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8189         * include/grub/i386/linuxbios/memory.h
8190         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8191         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8192         receive `table_header' as argument.  Instead, probe for it in the
8193         known memory ranges where it can be present.
8194         (grub_available_iterate): Do not pass a fixed `table_header' address
8195         to grub_linuxbios_table_iterate().
8197 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8199         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8200         * conf/i386-ieee1275.rmk: New file.
8201         * include/grub/i386/ieee1275/console.h: Likewise.
8202         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8203         * include/grub/i386/ieee1275/kernel.h: Likewise.
8204         * include/grub/i386/ieee1275/time.h: Likewise.
8205         * kern/i386/ieee1275/init.c: Likewise.
8206         * kern/i386/ieee1275/startup.S: Likewise.
8208 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8210         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8211         when pointers are 32-bit (but still do set it to one when they are
8212         64-bit).
8214 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8216         * include/grub/ieee1275/ieee1275.h
8217         (grub_ieee1275_get_integer_property): New function prototype.
8219         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8220         (grub_ieee1275_get_integer_property): New function.  Wraps around
8221         grub_ieee1275_get_property() to handle endianness.
8223         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8224         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8225         where appropriate.
8226         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8227         (grub_map): Likewise.
8228         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8230 2008-01-15  Bean  <bean123ch@gmail.com>
8232         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8233         (grub_script_execute_cmdline): Reset grub_errno.
8235         * normal/main.c (read_config_file): Reset grub_errno.
8237         * normal/parse.y (script_init): New.
8238         (script): Move function and menuentry here.
8239         (delimiter): New.
8240         (command): Add delimiter at the end of command.
8241         (commands): Adjust to match the new command.
8242         (commandblock): Remove grub_script_lexer_record_start.
8243         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8244         (if): Use the new commands.
8246         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8248 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8250         * normal/menu.c (run_menu): Move timeout message from here ...
8251         (print_timeout): ... to here.
8252         (run_menu): Use print_timeout() once during initial draw to print
8253         the whole message, and again in every clock tick to update only
8254         the number of seconds.
8256 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8258         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8259         actual size of `available' from grub_ieee1275_get_property(), and
8260         restrict parsing to that bound.
8262 2008-01-15  Christian Franke  <franke@computer.org>
8264         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8265         (argp_program_version): Remove variable.
8266         (argp_program_bug_address): Likewise.
8267         (options): Convert from struct argp_option to struct option.
8268         (struct arguments): Remove.
8269         (parse_opt): Remove.
8270         (usage): New function.
8271         (main): Replace struct args members by simple variables.
8272         Replace argp_parse() by getopt_long().
8273         Add switch to evaluate options.
8274         Add missing "(...)" around root_dev in prefix string.
8276 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8278         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8279         for grub_ieee1275_exit(), in order to improve portability.
8281 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8283         * util/grub.d/10_linux.in (prefix): Define.
8284         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8286 2008-01-13  Pavel Roskin  <proski@gnu.org>
8288         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8289         grub_errno if no errors have been detected.
8291 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8293         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8294         (grub_util_get_dev_abstraction): New function prototype.
8296         * util/getroot.c: Include `<grub/util/getroot.h>'
8297         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8298         (grub_util_get_dev_abstraction): ... here (new function).
8300         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8301         `PRINT_ABSTRACTION'.
8302         (probe): Probe for abstraction type when requested.
8303         (main): Understand `--target=abstraction'.
8305         * util/i386/efi/grub-install.in: Add abstraction module to core
8306         image when it is found to be necessary.
8307         * util/i386/pc/grub-install.in: Likewise.
8308         * util/powerpc/ieee1275/grub-install.in: Likewise.
8310         * util/update-grub_lib.in (font_path): Return system path without
8311         converting to GRUB path.
8312         * util/update-grub.in: Convert system path returned by font_path()
8313         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8314         abstraction module is needed for loading fonts (if any).  Export
8315         that as `GRUB_PRELOAD_MODULES'.
8316         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8317         insmod commands).
8319 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8321         Remove some unused code from reiserfs.
8323         * fs/reiserfs.c (struct grub_reiserfs_key)
8324         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8325         (struct grub_reiserfs_node_body): Removed.
8326         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8327         Likewise.
8328         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8329         Likewise.
8330         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8331         Likewise.
8332         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8333         Likewise.
8334         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8335         Likewise.
8336         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8337         Likewise.
8338         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8339         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8340         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8342 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8344         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8345         Determines if a file is garbage left by packaging systems, etc.
8346         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8347         for processing /etc/grub.d scripts.
8348         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8349         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8350         as a condition for processing Linux images.
8352 2008-01-10  Pavel Roskin  <proski@gnu.org>
8354         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8355         to compile reiserfs.c on PowerPC.
8357 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8359         * kern/device.c (grub_device_iterate): Do not abort device iteration
8360         when one of the devices cannot be opened.
8361         * kern/disk.c (grub_disk_open): Do not account previous failures of
8362         unrelated functions when grub_errno is checked for.
8364 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8366         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8367         `! grub_linux_is_bzimage', change order of address comparison to make
8368         it more intuitive, and improve "too big zImage" error message.
8370 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8372         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8373         `$(update-grub_DATA)'.
8374         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8375         targets.
8377 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8379         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8380         which instruction is modified by grub-setup during installation
8381         (since it wasn't obvious by only looking at this file).
8383 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8385         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8386         listing actual TODO items.
8388 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8390         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8391         correctly.
8392         (grub_reiserfs_get_key_offset): Likewise.
8393         (grub_reiserfs_set_key_offset): Likewise.
8394         (grub_reiserfs_set_key_type): Likewise.
8395         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8397         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8398         better to remove the bitfield version completely.
8400 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8402         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8403         allocated from the heap, due to the fshelp implementation.
8404         (grub_reiserfs_dir): Free NODE, due to the same reason.
8406 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8408         Mostly from Vincent Pelletier:
8410         * fs/reiserfs.c: New file.
8412         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8413         (reiserfs_mod_SOURCES): New variable.
8414         (reiserfs_mod_CFLAGS): Likewise.
8415         (reiserfs_mod_LDFLAGS): Likewise.
8417         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8418         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8419         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8420         normal/color.c.
8422 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8424         * normal/color.c: Remove `<grub/env.h>'.
8426 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8428         * include/grub/normal.h: Include <grub/env.h>.
8430 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8432         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8433         usage example with `(hd0,1)'.
8434         Reported by Samuel Thibault.
8436 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8438         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8439         (grub_linux_boot_zimage): Rename to ...
8440         (grub_linux_boot): ... this.
8441         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8442         (grub_linux_boot_zimage): Conditionalize zImage copy.
8444         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8445         (grub_linux_boot_bzimage): Remove prototype.
8446         (grub_linux_boot_zimage): Rename to ...
8447         (grub_linux_boot): ... this.
8449         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8450         (grub_linux_boot): Remove function.
8452 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8454         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8455         (grub_env_write_color_highlight): Likewise.
8456         (grub_wait_after_message): Likewise.
8458         * normal/color.c: New file.
8460         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8461         (normal_mod_DEPENDENCIES): Likewise.
8463         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8464         (normal_mod_DEPENDENCIES): Likewise.
8466         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8467         (normal_mod_DEPENDENCIES): Likewise.
8469         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8470         (normal_mod_DEPENDENCIES): Likewise.
8472         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8473         for waiting after a message is printed.
8474         * normal/main.c (read_config_file): Likewise.
8475         (grub_normal_init): Register grub_env_write_color_normal() and
8476         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
8477         `color_highlight' variables as global.
8479         * normal/menu.c (grub_wait_after_message): New function.
8480         (grub_color_menu_normal): New variable.  Replaces ...
8481         (GRUB_COLOR_MENU_NORMAL): ... this macro.
8482         (grub_color_menu_highlight): New variable.  Replaces ...
8483         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8484         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8485         `GRUB_TERM_COLOR_STANDARD'.
8486         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
8487         `normal_code' and `highlight_code' to `old_color_normal' and
8488         `old_color_highlight', respectively.
8489         (grub_menu_init_page): Update colors when drawing the menu, based on
8490         `menu_color_normal' and `menu_color_highlight' variables.
8491         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8492         a message is printed.
8494 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8496         * kern/env.c (grub_env_context_open): Propagate hooks for global
8497         variables to new context.
8499         * kern/main.c (grub_set_root_dev): Export `root' variable.
8501 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8503         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8504         discs unconditionally, since udev and others have options to provide
8505         them.
8507 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8509         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8511 2008-01-04  Christian Franke  <franke@computer.org>
8513         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8514         of eisa_mmap.
8516 2008-01-03  Pavel Roskin  <proski@gnu.org>
8518         * kern/i386/linuxbios/init.c: Put "void" to all function
8519         declarations with no arguments.
8520         * kern/powerpc/ieee1275/init.c: Likewise.
8521         * term/i386/pc/at_keyboard.c: Likewise.
8522         * term/i386/pc/vga_text.c: Likewise.
8523         * util/grub-mkdevicemap.c: Likewise.
8525 2008-01-02  Robert Millan  <rmh@aybabtu.com>
8527         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8528         message when loaded image is out of bounds.
8529         (grub_multiboot_load_elf64): Likewise.
8531 2008-01-02  Pavel Roskin  <proski@gnu.org>
8533         * util/grub.d/10_linux.in: Try version without ".old" when
8534         looking for initrd.  It's better to use initrd from the newer
8535         kernel of the same version than no initrd at all.
8537 2008-01-01  Robert Millan  <rmh@aybabtu.com>
8539         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8541 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
8543         * include/grub/video.h: Added grub_video_unmap_color and
8544         grub_video_get_active_render_target.
8545         (grub_video_adapter): Added unmap_color and get_active_render_target.
8547         * video/video.c: Added grub_video_unmap_color and
8548         grub_video_get_active_render_target.
8549         (grub_video_get_info): Changed method to accept NULL pointer as an
8550         argument to allow detection of active video adapter.
8552         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8553         grub_video_vbe_unmap_color_int.
8554         Added grub_video_vbe_unmap_color and
8555         grub_video_vbe_get_active_render_target.
8556         (grub_video_vbe_adapter): Added unmap_color and
8557         get_active_render_target.
8559         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8560         with grub_video_vbe_unmap_color_int.
8562         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8563         (DEFAULT_NORMAL_COLOR): Likewise.
8564         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8565         (DEFAULT_FG_COLOR): Removed.
8566         (DEFAULT_BG_COLOR): Likewise.
8567         (DEFAULT_CURSOR_COLOR): Changed value.
8568         (grub_virtual_screen): Added standard_color_setting,
8569         normal_color_setting, highlight_color_setting and term_color.
8570         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8571         (bitmap_width): Added.
8572         (bitmap_height): Likewise.
8573         (bitmap): Likewise.
8574         (set_term_color): Likewise.
8575         (grub_virtual_screen_setup): Changed to use new terminal coloring
8576         settings.
8577         (grub_gfxterm_init): Added init for bitmap.
8578         (grub_gfxterm_fini): Added destroy for bitmap.
8579         (redraw_screen_rect): Updated to use background bitmap and new
8580         terminal coloring.
8581         (scroll_up): Added optimization for case when there is no bitmap.
8582         (grub_gfxterm_cls): Fixed to use correct background color.
8583         (grub_virtual_screen_setcolorstate): Changed to use new terminal
8584         coloring.
8585         (grub_virtual_screen_setcolor): Likewise.
8586         (grub_virtual_screen_getcolor): Added.
8587         (grub_gfxterm_background_image_cmd): Likewise.
8588         (grub_video_term): Added setcolor and getcolor.
8589         (MOD_INIT): Added registration of background_image command.
8590         (MOD_TERM): Added unregistration for background_image command.
8592 2007-12-30  Pavel Roskin  <proski@gnu.org>
8594         * loader/multiboot_loader.c: Fix multiboot command
8595         unregistration.  Fix all typos in the word "multiboot".
8597 2007-12-29  Pavel Roskin  <proski@gnu.org>
8599         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
8600         support for initrd names used in Fedora.
8602 2007-12-26  Bean  <bean123ch@gmail.com>
8604         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8605         (cpio_mod_SOURCES): New variable.
8606         (cpio_mod_CFLAGS): Likewise.
8607         (cpio_mod_LDFLAGS): Likewise.
8609         * fs/cpio.c: New file.
8611         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8613         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8615         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8617         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8619 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8621         * include/grub/term.h (struct grub_term): Add `getcolor' function.
8622         (grub_getcolor): New function.
8624         * kern/term.c (grub_getcolor): New function.
8625         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8626         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8627         (print_entry): Set normal and highlight colors to
8628         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8629         respectively, before printing and restore them to old
8630         values afterwards.
8631         (grub_menu_init_page): Likewise.  Fill an additional colored space
8632         that would otherwise be left blank.
8634         * term/efi/console.c (grub_console_getcolor): New function.
8635         (struct grub_console_term.getcolor): New variable.
8636         * term/i386/pc/console.c (grub_console_getcolor): New function.
8637         (struct grub_console_term.getcolor): New variable.
8638         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8639         (struct grub_console_term.getcolor): New variable.
8641         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8642         (struct grub_console_term.setcolor): Remove variable.
8643         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8644         (struct grub_console_term.setcolor): Remove variable.
8645         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8646         (struct grub_console_term.setcolor): Remove variable.
8647         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8648         (struct grub_console_term.setcolor): Remove variable.
8650 2007-12-25  Robert Millan  <rmh@aybabtu.com>
8652         * configure.ac: Search for possible unifont.hex locations, and
8653         define UNIFONT_HEX if found.
8655         * Makefile.in (UNIFONT_HEX): Define variable.
8656         (DATA): Rename to ...
8657         (PKGLIB): ... this.  Update all users.
8658         (PKGDATA): New variable.
8659         (pkgdata_IMAGES): Rename to ...
8660         (pkglib_IMAGES): ... this. Update all users.
8661         (pkgdata_MODULES): Rename to ...
8662         (pkglib_MODULES): ... this. Update all users.
8663         (pkgdata_PROGRAMS): Rename to ...
8664         (pkglib_PROGRAMS): ... this. Update all users.
8665         (pkgdata_DATA): Rename to ...
8666         (pkglib_DATA): ... this. Update all users.
8667         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8668         (unicode.pff, ascii.pff): New rules.
8669         (all-local): Add `$(PKGDATA)' dependency.
8670         (install-local): Process `$(PKGDATA)'.
8672         * util/update-grub_lib.in (font_path): Search for *.pff files in
8673         a few more locations, including `${pkgdata}'.
8675 2007-12-23  Robert Millan  <rmh@aybabtu.com>
8677         Patch from Bean  <bean123ch@gmail.com>:
8678         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8679         `size'.
8681 2007-12-21  Bean  <bean123ch@gmail.com>
8683         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8684         (ntfscomp_mod_SOURCES): New variable.
8685         (ntfscomp_mod_CFLAGS): Likewise.
8686         (ntfscomp_mod_LDFLAGS): Likewise.
8688         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8689         (grub_probe_SOURCES): Likewise.
8690         (grub_emu_SOURCES): Likewise.
8692         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8693         (grub_emu_SOURCES): Likewise.
8695         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8696         (grub_emu_SOURCES): Likewise.
8698         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8699         (grub_emu_SOURCES): Likewise.
8701         * fs/ntfs.c (grub_ntfscomp_func): New variable.
8702         (read_run_list): Renamed to grub_ntfs_read_run_list.
8703         (decomp_nextvcn): Moved to ntfscomp.c.
8704         (decomp_getch): Likewise.
8705         (decomp_get16): Likewise.
8706         (decomp_block): Likewise.
8707         (read_block): Likewise.
8708         (read_data): Partially moved to ntfscomp.c.
8709         (fixup): Change unsigned to grub_uint16_t.
8710         (read_mft): Change unsigned long to grub_uint32_t.
8711         (read_attr): Likewise.
8712         (read_data): Likewise.
8713         (read_run_data): Likewise.
8714         (read_run_list): Likewise.
8715         (read_mft): Likewise.
8717         * fs/ntfscomp.c: New file.
8719         * include/grub/ntfs.h: New file.
8721 2007-12-16  Robert Millan  <rmh@aybabtu.com>
8723         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8724         IDE disk check, since Linux is known to support 20 IDE disks.
8725         Reported by Colin Watson.
8727 2007-12-15  Bean  <bean123ch@gmail.com>
8729         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8730         (lnxboot_img_SOURCES): New variable.
8731         (lnxboot_img_ASFLAGS): Likewise.
8732         (lnxboot_img_LDFLAGS): Likewise.
8734         * boot/i386/pc/lnxboot.S: New file.
8736 2007-11-24  Pavel Roskin  <proski@gnu.org>
8738         * configure.ac: Test if '--build-id=none' is supported by the
8739         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
8740         objcopy to generate incorrect binary files (binutils
8741         2.17.50.0.18-1 as shipped by Fedora 8).
8742         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8743         linking, so that build ID doesn't break the test.
8745 2007-11-24  Pavel Roskin  <proski@gnu.org>
8747         * include/grub/i386/time.h: use "void" in the argument list
8748         of grub_cpu_idle().
8749         * include/grub/powerpc/time.h: Likewise.
8750         * include/grub/sparc64/time.h: Likewise.
8752 2007-11-18  Christian Franke  <franke@computer.org>
8754         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8755         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8756         This fixes the problem that function keys did not work in grub-emu.
8758 2007-11-18  Christian Franke  <franke@computer.org>
8760         * disk/host.c (grub_host_open): Remove attribute unused from
8761         name parameter. Add check for "host". This fixes the problem
8762         that grub-emu does not find partitions.
8764 2007-11-18  Christian Franke  <franke@computer.org>
8766         * util/hostfs.c (is_dir): New function.
8767         (grub_hostfs_dir):  Handle missing dirent.d_type case.
8768         (grub_hostfs_read): Add missing fseek().
8769         (grub_hostfs_label): Clear label pointer.  This fixes a crash
8770         of grub-emu on "ls (host)".
8772 2007-11-18  Christian Franke  <franke@computer.org>
8774         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8775         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8776         to 64 bit boundary by default.
8778 2007-11-18  Bean  <bean123ch@gmail.com>
8780         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8781         (hexdump_mod_SOURCES): New variable.
8782         (hexdump_mod_CFLAGS): Likewise.
8783         (hexdump_mod_LDFLAGS): Likewise.
8785         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8787         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8789         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8791         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8793         * include/grub/hexdump.h: New file.
8795         * commands/hexdump.c: New file.
8797 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8799         * commands/i386/pc/play.c (beep_off): Switch order of arguments
8800         in grub_outb() calls.
8801         (beep_on): Likewise.
8803 2007-11-10  Christian Franke  <franke@computer.org>
8805         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8806         (grub_menu_run): Likewise.
8808 2007-11-10  Robert Millan  <rmh@aybabtu.com>
8810         * include/grub/i386/efi/machine.h: New file.
8811         * include/grub/i386/linuxbios/machine.h: Likewise.
8812         * include/grub/i386/pc/machine.h: Likewise.
8813         * include/grub/powerpc/ieee1275/machine.h: Likewise.
8814         * include/grub/sparc64/ieee1275/machine.h: Likewise.
8816         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8817         (serial_hw_io_addr): New variable.
8818         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8819         instead of `(unsigned short *) 0x400'.
8821 2007-11-10  Bean  <bean123ch@gmail.com>
8823         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8825 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8827         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8828         (vga_mod_SOURCES): Added.
8829         (vga_mod_CFLAGS): Likewise.
8830         (vga_mod_LDFLAGS): Likewise.
8832         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8833         grub_outb() calls.
8834         (set_map_mask): Likewise.
8835         (set_read_map): Likewise.
8836         (set_read_address): Likewise.
8837         (vga_font): Removed variable.
8838         (get_vga_glyph): Removed function.
8839         (invalidate_char): Likewise.
8840         (write_char): Changed to use grub_font_get_glyph() for font
8841         information.
8842         (grub_vga_putchar): Likewise.
8843         (grub_vga_getcharwidth): Likewise.
8845 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
8847         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8848         flags.
8849         (pxeboot_img_LDFLAGS): Likewise.
8850         (diskboot_img_LDFLAGS): Likewise.
8851         (kernel_img_LDFLAGS): Likewise.
8853 2007-11-06  Robert Millan  <rmh@aybabtu.com>
8855         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8856         in grub_outb() calls.
8857         (serial_hw_init): Likewise.
8859 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8861         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8862         spaces.  Skip non-regular files.
8864 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8866         * kern/disk.c (grub_disk_firmware_fini)
8867         (grub_disk_firmware_is_tainted): New variables.
8869         * include/grub/disk.h (grub_disk_firmware_fini)
8870         (grub_disk_firmware_is_tainted): Likewise.
8872         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8873         (grub_disk_biosdisk_fini): ... to here.
8874         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8875         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8876         is set.  Register grub_disk_biosdisk_fini() in
8877         `grub_disk_firmware_fini'.
8879         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8880         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8881         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8882         to finish existing firmware disk interface.
8884         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8885         (ata_mod_SOURCES): New variable.
8886         (ata_mod_CFLAGS): Likewise.
8887         (ata_mod_LDFLAGS): Likewise.
8889 2007-11-05  Robert Millan  <rmh@aybabtu.com>
8891         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
8892         (grub_ata_wait): Reimplement using grub_millisleep().
8894         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8895         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8897 2007-11-03  Marco Gerards  <marco@gnu.org>
8899         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8900         (CRTC_ADDR_PORT): New macro.
8901         (CRTC_DATA_PORT): Likewise.
8902         (CRTC_CURSOR): Likewise.
8903         (CRTC_CURSOR_ADDR_HIGH): Likewise.
8904         (CRTC_CURSOR_ADDR_LOW): Likewise.
8905         (update_cursor): New function.
8906         (grub_console_real_putchar): Call `update_cursor'.
8907         (grub_console_gotoxy): Likewise.
8908         (grub_console_cls): Set the default color when clearing the
8909         screen.
8910         (grub_console_setcursor): Implemented.
8912 2007-11-03  Marco Gerards  <marco@gnu.org>
8914         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8915         become activate.
8916         (grub_ata_pio_write): Likewise.
8918         (grub_atapi_identify): Wait after issuing an ATA command.
8919         (grub_atapi_packet): Likewise.
8920         (grub_ata_identify): Likewise.
8921         (grub_ata_readwrite): Likewise.
8923 2007-11-03  Marco Gerards  <marco@gnu.org>
8925         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8926         (grub_ata_pio_write): Likewise.
8927         (grub_ata_readwrite): Use `grub_error', instead of
8928         returning `grub_errno'.
8930 2007-11-03  Marco Gerards  <marco@gnu.org>
8932         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8933         grub_ata_pio_write once for every single sector, instead of for
8934         multiple sectors.
8936 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8938         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8940         * conf/i386-linuxbios.rmk: New file.
8942         * kern/i386/pc/hardware.c: Likewise.
8943         * term/i386/pc/at_keyboard.c: Likewise.
8944         * term/i386/pc/vga_text.c: Likewise.
8946         * include/grub/i386/linuxbios/boot.h: Likewise.
8947         * include/grub/i386/linuxbios/console.h: Likewise.
8948         * include/grub/i386/linuxbios/init.h: Likewise.
8949         * include/grub/i386/linuxbios/kernel.h: Likewise.
8950         * include/grub/i386/linuxbios/loader.h: Likewise.
8951         * include/grub/i386/linuxbios/memory.h: Likewise.
8952         * include/grub/i386/linuxbios/serial.h: Likewise.
8953         * include/grub/i386/linuxbios/time.h: Likewise.
8955         * kern/i386/linuxbios/init.c: Likewise.
8956         * kern/i386/linuxbios/startup.S: Likewise.
8957         * kern/i386/linuxbios/table.c: Likewise.
8959 2007-10-31  Marco Gerards  <marco@gnu.org>
8961         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8962         (ata_mod_SOURCES): New variable.
8963         (ata_mod_CFLAGS): Likewise.
8964         (ata_mod_LDFLAGS): Likewise.
8966         * disk/ata.c: New file.
8968         * include/grub/disk.h (grub_disk_dev_id): Add
8969         `GRUB_DISK_DEV_ATA_ID'.
8971 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8973         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8974         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8976         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8977         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8979         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8980         `<grub/types.h>'.
8982         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8984 2007-10-27  Robert Millan  <rmh@aybabtu.com>
8986         * include/grub/types.h (ULONG_MAX): Define macro.
8988 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8990         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
8991         `"../realmode.S"'.
8992         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
8994 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8996         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8997         (pkgdata_MODULES): Add `biosdisk.mod'.
8998         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8999         variables.
9001         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9002         (grub_biosdisk_init): Replace with ...
9003         (GRUB_MOD_INIT(biosdisk)): ... this.
9004         (grub_biosdisk_fini): Replace with ...
9005         (GRUB_MOD_FINI(biosdisk)): ... this.
9007         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9008         (grub_machine_init): Remove call to grub_biosdisk_init().
9009         (grub_machine_fini): Remove call to grub_machine_fini().
9011         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9013 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9015         * include/grub/time.h: New file.
9016         * include/grub/i386/time.h: Likewise.
9017         * include/grub/powerpc/time.h: Likewise.
9018         * include/grub/sparc64/time.h: Likewise.
9020         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9021         instances to ...
9022         (KERNEL_MACHINE_TIME_HEADER): ... this.
9023         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9024         instances to ...
9025         (KERNEL_MACHINE_TIME_HEADER): ... this.
9026         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9027         instances to ...
9028         (KERNEL_MACHINE_TIME_HEADER): ... this.
9030         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9031         (grub_millisleep): New function.
9032         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9033         (grub_millisleep): New function.
9034         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9035         Remove `grub/machine/time.h' include.
9036         (grub_millisleep): New function.
9037         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9038         Remove `grub/machine/time.h' include.
9039         (grub_millisleep): New function.
9041         * include/grub/misc.h (grub_div_roundup): New function.
9043         * kern/misc.c: Include `<grub/time.h>'.
9044         (grub_millisleep_generic): New function.
9046         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9047         Add `time.h'.
9048         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9049         Add `time.h'.
9050         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9051         `machine/time.h'.  Add `time.h'.
9052         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9054 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9056         * include/grub/misc.h (grub_max): New function.
9058 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9060         * util/misc.c (grub_util_info): Call fflush() before returning.
9062 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9064         * genmk.rb (Image): Copy `extra_flags' from here ...
9065         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9067         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9068         to `argc' and `args' arguments.
9070 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9072         * kern/i386/loader.S: New file.
9074         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9075         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9076         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9077         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9078         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9079         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9080         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9081         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9082         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9083         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9084         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9085         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9086         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9087         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9089         * kern/i386/realmode.S: New file.
9091         * kern/i386/pc/startup.S (protstack): Moved from here ...
9092         * kern/i386/realmode.S (protstack)... to here.
9093         * kern/i386/pc/startup.S (gdt): Moved from here ...
9094         * kern/i386/realmode.S (gdt)... to here.
9095         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9096         * kern/i386/realmode.S (prot_to_real)... to here.
9098         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9099         `kern/i386/realmode.S'.
9101 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9103         * include/grub/i386/loader.h: New file.
9105         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9106         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9107         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9108         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9109         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9110         * include/grub/i386/loader.h (grub_linux_prot_size)
9111         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9112         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9113         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9114         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9116         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9118 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9120         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9121         filesystem when dev->disk is unset.
9122         Do probe for filesystem even when dev->disk->has_partitions is set.
9123         In case a filesystem is found, always report it.
9124         In case it isn't, if dev->disk->has_partitions is set, report that
9125         a partition table was found instead of reporting that no filesystem
9126         could be identified.
9128 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9130         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9131         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9133         * include/grub/types.h (grub_host_to_target16): New macro.
9134         (grub_host_to_target32): Likewise.
9135         (grub_host_to_target64): Likewise.
9136         (grub_target_to_host16): Likewise.
9137         (grub_target_to_host32): Likewise.
9138         (grub_target_to_host64): Likewise.
9140         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9141         Renamed from to ...
9142         (GRUB_MOD_ALIGN): ...this.  Update all users.
9144         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9145         grub_host_to_target32.
9146         Replace grub_be_to_cpu32 with grub_target_to_host32.
9147         (load_modules): Likewise.
9148         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9149         Replace grub_be_to_cpu32 with grub_target_to_host32.
9150         Replace grub_cpu_to_be16 with grub_host_to_target16.
9151         Replace grub_cpu_to_be32 grub_host_to_target32.
9153 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9155         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9156         * util/elf/grub-mkimage.c: ... here.
9158         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9159         `util/powerpc/ieee1275/grub-mkimage.c'.
9161 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9163         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9164         and make it easier to figure out.
9165         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9166         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9167         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9168         leave us with less than HEAP_MIN_SIZE total heap.
9169         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9171 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9173         * include/grub/i386/io.h: New file.
9174         * commands/i386/pc/play.c (inb): Removed.
9175         (outb): Removed.
9176         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9177         with grub_outb().
9178         * term/i386/pc/serial.c  (inb): Removed.
9179         (outb): Removed.
9180         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9181         with grub_outb().
9182         * term/i386/pc/vga.c  (inb): Removed.
9183         (outb): Removed.
9184         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9185         with grub_outb().
9187 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9189         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9190         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9191         Reported by Marcin Kurek.
9193 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9195         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9196         SmartFirmware version updates (as released by Sven Luther), and avoid
9197         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9198         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9199         known broken.
9201 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9203         From Hitoshi Ozeki:
9204         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9205         when merging two regions.
9207 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9209         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9210         * normal/completion.c (grub_normal_do_completion): Likewise.
9211         Reported by Hitoshi Ozeki.
9213 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9215         Do not use devices at boot in chainloading.
9217         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9218         (boot_part_addr): Likewise.
9219         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9220         with BOOT_DRIVE and BOOT_PART_ADDR.
9221         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9222         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9224 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9226         Patch from Simon Peter <dn.tlp@gmx.net>:
9227         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9228         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9229         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9230         util/i386/pc/grub-setup.c_DEPENDENCIES.
9231         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9232         util/grub-probe.c_DEPENDENCIES.
9233         * conf/powerpc-ieee1275.rmk: Likewise.
9235 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9237         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9238         to tell grub-mkdevicemap how to name devices.
9239         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9240         feature).
9242         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9243         util/i386/get_disk_name.c.
9244         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9245         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9246         util/ieee1275/get_disk_name.c.
9248         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9250         * DISTLIST: Add util/i386/get_disk_name.c and
9251         util/ieee1275/get_disk_name.c.
9253         * util/grub-mkdevicemap.c: Replace device naming logic with
9254         grub_util_get_disk_name() calls.
9256 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9258         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9259         (so that it works for both plural and singular quantities).
9261 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9263         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9264         so that [xz] isn't taken into account when determining order.
9266 2007-08-02  Marco Gerards  <marco@gnu.org>
9268         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9269         `include/multiboot2.h', `include/grub/elfload.h',
9270         `include/multiboot.h', `include/grub/multiboot.h',
9271         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9272         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9273         `kern/elf.c', `loader/multiboot_loader.c',
9274         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9275         `loader/i386/pc/multiboot2.c',
9276         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9277         `util/i386/pc/grub-mkrescue.in'.  Remove
9278         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9279         `include/grub/i386/pc/util/biosdisk.h' and
9280         `include/grub/powerpc/ieee1275/multiboot.h'.
9282 2007-08-02  Bean  <bean123ch@gmail.com>
9284         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9285         (ntfs_mod_SOURCES): New variable.
9286         (ntfs_mod_CFLAGS): Likewise.
9287         (ntfs_mod_LDFLAGS): Likewise.
9289         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9290         (grub_probe_SOURCES): Likewise.
9291         (grub_emu_SOURCES): Likewise.
9293         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9294         (grub_emu_SOURCES): Likewise.
9296         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9297         (grub_emu_SOURCES): Likewise.
9299         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9301         * fs/ntfs.c: New file.
9303 2007-08-02  Bean  <bean123ch@gmail.com>
9305         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9307         * file.h (grub_file): Likewise.
9309         * fshelp.h (grub_fshelp_read_file): Likewise.
9311         * util/i386/pc/grub-setup.c (setup): Likewise.
9312         (save_first_sector): Likewise.
9313         (save_blocklists): Likewise.
9315         * fs/affs.c (grub_affs_read_file): Likewise.
9317         * fs/ext2.c (grub_ext2_read_file): Likewise.
9319         * fs/fat.c (grub_fat_read_data): Likewise.
9321         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9323         * fs/hfs.c (grub_hfs_read_file): Likewise.
9325         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9327         * fs/jfs.c (grub_jfs_read_file): Likewise.
9329         * fs/minix.c (grub_minix_read_file): Likewise.
9331         * fs/sfs.c (grub_sfs_read_file): Likewise.
9333         * fs/ufs.c (grub_ufs_read_file): Likewise.
9335         * fs/xfs.c (grub_xfs_read_file): Likewise.
9337         * command/blocklist.c (read_blocklist): Likewise.
9338         (print_blocklist): Likewise.
9340 2007-08-02  Marco Gerards  <marco@gnu.org>
9342         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9343         `util/hostfs.c'.
9345         * disk/host.c: New file.
9347         * util/hostfs.c: Likewise.
9349         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9350         return `GRUB_ERR_BAD_FS'.
9351         * fs/sfs.c (grub_sfs_mount): Likewise.
9352         * fs/xfs.c (grub_xfs_mount): Likewise.
9354         * include/grub/disk.h (enum grub_disk_dev_id): Add
9355         `GRUB_DISK_DEVICE_HOST_ID'.
9357         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9359 2007-07-24  Jerone Young  <jerone@gmail.com>
9361         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9362         modules for compilation.
9363         * conf/powerpc-ieee1275.rmk: Likewise.
9365         * include/multiboot.h: Move multiboot definitions to one file. Rename
9366         many definitions to not get grub specific.
9367         * include/multiboot2.h: Create header with multiboot 2 definitions.
9368         * include/grub/multiboot.h: Header for grub specific function
9369         prototypes and definitions.
9370         * include/grub/multiboot2.h: Likewise.
9371         * include/grub/multiboot_loader.h: Likewise.
9372         * include/grub/i386/pc/multiboot.h: Removed.
9373         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9375         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9376         and 2 to allow for one multiboot and module commands.
9377         * loader/multiboot2.c: Add multiboot2 functionality.
9378         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9379         and definition names.
9380         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9381         2 functions.
9382         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9383         ieee1275 specific multiboot2 code.
9385         * kern/i386/pc/startup.S: Change headers and definition names for
9386         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9388 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9390         * geninitheader.sh: Process file specified in first parameter rather
9391         than hardcoding grub_modules_init.lst.
9392         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9393         than hardcoding grub_modules_init.h.
9395         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9396         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9397         grub_probe_init.[ch] and grub_setup_init.[ch].
9399         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9400         grub_modules_init.h with grub_emu_init.h.
9401         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9402         grub_probe_init.[ch] files.
9403         * conf/i386-efi.rmk: Likewise.
9404         * conf/i386-pc.rmk: Likewise.
9405         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9406         grub_setup_init.[ch] files.
9408         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9409         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9410         to initialize modules rather than a list of hardcoded functions.
9411         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9412         grub_init_all() to initialize modules rather than a list of hardcoded
9413         functions.
9415 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9417         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9418         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9420 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9422         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9423         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9424         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9425         flag when running on SmartFirmware.
9426         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9427         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9428         was set.
9430         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9431         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9432         rather than decreasing it.
9434         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9435         there's not enough space to do it, fail in the same way as when it
9436         can't be done because there are no partitions.
9438         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9439         when nvsetenv failed.
9441 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9443         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9444         because this rule is automatically generated.
9445         (grub-mkrescue): Removed for the same reason as above.
9447 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
9449         Migrate to GNU General Public License Version 3.
9451         * COPYING: Replaced with the plain text version of GPLv3.
9453         * config.guess: Updated from gnulib.
9454         * config.sub: Likewise.
9456         * geninit.sh: Output a GPLv3 copyright notice.
9457         * geninitheader.sh: Likewise.
9458         * genmodsrc.sh: Likewise.
9459         * gensymlist.sh.in: Likewise.
9461         * boot/i386/pc/boot.S: Upgraded to GPLv3.
9462         * boot/i386/pc/diskboot.S: Likewise.
9463         * boot/i386/pc/pxeboot.S: Likewise.
9464         * commands/blocklist.c: Likewise.
9465         * commands/boot.c: Likewise.
9466         * commands/cat.c: Likewise.
9467         * commands/cmp.c: Likewise.
9468         * commands/configfile.c: Likewise.
9469         * commands/echo.c: Likewise.
9470         * commands/help.c: Likewise.
9471         * commands/ls.c: Likewise.
9472         * commands/search.c: Likewise.
9473         * commands/terminal.c: Likewise.
9474         * commands/test.c: Likewise.
9475         * commands/videotest.c: Likewise.
9476         * commands/i386/cpuid.c: Likewise.
9477         * commands/i386/pc/halt.c: Likewise.
9478         * commands/i386/pc/play.c: Likewise.
9479         * commands/i386/pc/reboot.c: Likewise.
9480         * commands/i386/pc/vbeinfo.c: Likewise.
9481         * commands/i386/pc/vbetest.c: Likewise.
9482         * commands/ieee1275/halt.c: Likewise.
9483         * commands/ieee1275/reboot.c: Likewise.
9484         * commands/ieee1275/suspend.c: Likewise.
9485         * disk/loopback.c: Likewise.
9486         * disk/lvm.c: Likewise.
9487         * disk/raid.c: Likewise.
9488         * disk/efi/efidisk.c: Likewise.
9489         * disk/i386/pc/biosdisk.c: Likewise.
9490         * disk/ieee1275/ofdisk.c: Likewise.
9491         * font/manager.c: Likewise.
9492         * fs/affs.c: Likewise.
9493         * fs/ext2.c: Likewise.
9494         * fs/fat.c: Likewise.
9495         * fs/fshelp.c: Likewise.
9496         * fs/hfs.c: Likewise.
9497         * fs/hfsplus.c: Likewise.
9498         * fs/iso9660.c: Likewise.
9499         * fs/jfs.c: Likewise.
9500         * fs/minix.c: Likewise.
9501         * fs/sfs.c: Likewise.
9502         * fs/ufs.c: Likewise.
9503         * fs/xfs.c: Likewise.
9504         * hello/hello.c: Likewise.
9505         * include/grub/acorn_filecore.h: Likewise.
9506         * include/grub/arg.h: Likewise.
9507         * include/grub/bitmap.h: Likewise.
9508         * include/grub/boot.h: Likewise.
9509         * include/grub/cache.h: Likewise.
9510         * include/grub/device.h: Likewise.
9511         * include/grub/disk.h: Likewise.
9512         * include/grub/dl.h: Likewise.
9513         * include/grub/elfload.h: Likewise.
9514         * include/grub/env.h: Likewise.
9515         * include/grub/err.h: Likewise.
9516         * include/grub/file.h: Likewise.
9517         * include/grub/font.h: Likewise.
9518         * include/grub/fs.h: Likewise.
9519         * include/grub/fshelp.h: Likewise.
9520         * include/grub/gzio.h: Likewise.
9521         * include/grub/hfs.h: Likewise.
9522         * include/grub/kernel.h: Likewise.
9523         * include/grub/loader.h: Likewise.
9524         * include/grub/lvm.h: Likewise.
9525         * include/grub/misc.h: Likewise.
9526         * include/grub/mm.h: Likewise.
9527         * include/grub/net.h: Likewise.
9528         * include/grub/normal.h: Likewise.
9529         * include/grub/parser.h: Likewise.
9530         * include/grub/partition.h: Likewise.
9531         * include/grub/pc_partition.h: Likewise.
9532         * include/grub/raid.h: Likewise.
9533         * include/grub/rescue.h: Likewise.
9534         * include/grub/script.h: Likewise.
9535         * include/grub/setjmp.h: Likewise.
9536         * include/grub/symbol.h: Likewise.
9537         * include/grub/term.h: Likewise.
9538         * include/grub/terminfo.h: Likewise.
9539         * include/grub/tparm.h: Likewise.
9540         * include/grub/types.h: Likewise.
9541         * include/grub/video.h: Likewise.
9542         * include/grub/efi/api.h: Likewise.
9543         * include/grub/efi/chainloader.h: Likewise.
9544         * include/grub/efi/console.h: Likewise.
9545         * include/grub/efi/console_control.h: Likewise.
9546         * include/grub/efi/disk.h: Likewise.
9547         * include/grub/efi/efi.h: Likewise.
9548         * include/grub/efi/pe32.h: Likewise.
9549         * include/grub/efi/time.h: Likewise.
9550         * include/grub/i386/linux.h: Likewise.
9551         * include/grub/i386/setjmp.h: Likewise.
9552         * include/grub/i386/types.h: Likewise.
9553         * include/grub/i386/efi/kernel.h: Likewise.
9554         * include/grub/i386/efi/loader.h: Likewise.
9555         * include/grub/i386/efi/time.h: Likewise.
9556         * include/grub/i386/pc/biosdisk.h: Likewise.
9557         * include/grub/i386/pc/boot.h: Likewise.
9558         * include/grub/i386/pc/chainloader.h: Likewise.
9559         * include/grub/i386/pc/console.h: Likewise.
9560         * include/grub/i386/pc/init.h: Likewise.
9561         * include/grub/i386/pc/kernel.h: Likewise.
9562         * include/grub/i386/pc/loader.h: Likewise.
9563         * include/grub/i386/pc/memory.h: Likewise.
9564         * include/grub/i386/pc/multiboot.h: Likewise.
9565         * include/grub/i386/pc/serial.h: Likewise.
9566         * include/grub/i386/pc/time.h: Likewise.
9567         * include/grub/i386/pc/vbe.h: Likewise.
9568         * include/grub/i386/pc/vbeblit.h: Likewise.
9569         * include/grub/i386/pc/vbefill.h: Likewise.
9570         * include/grub/i386/pc/vbeutil.h: Likewise.
9571         * include/grub/i386/pc/vga.h: Likewise.
9572         * include/grub/ieee1275/ieee1275.h: Likewise.
9573         * include/grub/ieee1275/ofdisk.h: Likewise.
9574         * include/grub/powerpc/libgcc.h: Likewise.
9575         * include/grub/powerpc/setjmp.h: Likewise.
9576         * include/grub/powerpc/types.h: Likewise.
9577         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9578         * include/grub/powerpc/ieee1275/console.h: Likewise.
9579         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9580         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9581         * include/grub/powerpc/ieee1275/loader.h: Likewise.
9582         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9583         * include/grub/powerpc/ieee1275/time.h: Likewise.
9584         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9585         * include/grub/sparc64/libgcc.h: Likewise.
9586         * include/grub/sparc64/setjmp.h: Likewise.
9587         * include/grub/sparc64/types.h: Likewise.
9588         * include/grub/sparc64/ieee1275/console.h: Likewise.
9589         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9590         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9591         * include/grub/sparc64/ieee1275/time.h: Likewise.
9592         * include/grub/util/biosdisk.h: Likewise.
9593         * include/grub/util/getroot.h: Likewise.
9594         * include/grub/util/lvm.h: Likewise.
9595         * include/grub/util/misc.h: Likewise.
9596         * include/grub/util/raid.h: Likewise.
9597         * include/grub/util/resolve.h: Likewise.
9598         * io/gzio.c: Likewise.
9599         * kern/device.c: Likewise.
9600         * kern/disk.c: Likewise.
9601         * kern/dl.c: Likewise.
9602         * kern/elf.c: Likewise.
9603         * kern/env.c: Likewise.
9604         * kern/err.c: Likewise.
9605         * kern/file.c: Likewise.
9606         * kern/fs.c: Likewise.
9607         * kern/loader.c: Likewise.
9608         * kern/main.c: Likewise.
9609         * kern/misc.c: Likewise.
9610         * kern/mm.c: Likewise.
9611         * kern/parser.c: Likewise.
9612         * kern/partition.c: Likewise.
9613         * kern/rescue.c: Likewise.
9614         * kern/term.c: Likewise.
9615         * kern/efi/efi.c: Likewise.
9616         * kern/efi/init.c: Likewise.
9617         * kern/efi/mm.c: Likewise.
9618         * kern/i386/dl.c: Likewise.
9619         * kern/i386/efi/init.c: Likewise.
9620         * kern/i386/efi/startup.S: Likewise.
9621         * kern/i386/pc/init.c: Likewise.
9622         * kern/i386/pc/lzo1x.S: Likewise.
9623         * kern/i386/pc/startup.S: Likewise.
9624         * kern/ieee1275/ieee1275.c: Likewise.
9625         * kern/powerpc/cache.S: Likewise.
9626         * kern/powerpc/dl.c: Likewise.
9627         * kern/powerpc/ieee1275/cmain.c: Likewise.
9628         * kern/powerpc/ieee1275/crt0.S: Likewise.
9629         * kern/powerpc/ieee1275/init.c: Likewise.
9630         * kern/powerpc/ieee1275/openfw.c: Likewise.
9631         * kern/sparc64/cache.S: Likewise.
9632         * kern/sparc64/dl.c: Likewise.
9633         * kern/sparc64/ieee1275/init.c: Likewise.
9634         * kern/sparc64/ieee1275/openfw.c: Likewise.
9635         * loader/efi/chainloader.c: Likewise.
9636         * loader/efi/chainloader_normal.c: Likewise.
9637         * loader/i386/efi/linux.c: Likewise.
9638         * loader/i386/efi/linux_normal.c: Likewise.
9639         * loader/i386/pc/chainloader.c: Likewise.
9640         * loader/i386/pc/chainloader_normal.c: Likewise.
9641         * loader/i386/pc/linux.c: Likewise.
9642         * loader/i386/pc/linux_normal.c: Likewise.
9643         * loader/i386/pc/multiboot.c: Likewise.
9644         * loader/i386/pc/multiboot_normal.c: Likewise.
9645         * loader/powerpc/ieee1275/linux.c: Likewise.
9646         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9647         * normal/arg.c: Likewise.
9648         * normal/cmdline.c: Likewise.
9649         * normal/command.c: Likewise.
9650         * normal/completion.c: Likewise.
9651         * normal/execute.c: Likewise.
9652         * normal/function.c: Likewise.
9653         * normal/lexer.c: Likewise.
9654         * normal/main.c: Likewise.
9655         * normal/menu.c: Likewise.
9656         * normal/menu_entry.c: Likewise.
9657         * normal/misc.c: Likewise.
9658         * normal/parser.y: Likewise.
9659         * normal/script.c: Likewise.
9660         * normal/i386/setjmp.S: Likewise.
9661         * normal/powerpc/setjmp.S: Likewise.
9662         * normal/sparc64/setjmp.S: Likewise.
9663         * partmap/acorn.c: Likewise.
9664         * partmap/amiga.c: Likewise.
9665         * partmap/apple.c: Likewise.
9666         * partmap/gpt.c: Likewise.
9667         * partmap/pc.c: Likewise.
9668         * partmap/sun.c: Likewise.
9669         * term/gfxterm.c: Likewise.
9670         * term/terminfo.c: Likewise.
9671         * term/efi/console.c: Likewise.
9672         * term/i386/pc/console.c: Likewise.
9673         * term/i386/pc/serial.c: Likewise.
9674         * term/i386/pc/vesafb.c: Likewise.
9675         * term/i386/pc/vga.c: Likewise.
9676         * term/ieee1275/ofconsole.c: Likewise.
9677         * util/biosdisk.c: Likewise.
9678         * util/console.c: Likewise.
9679         * util/genmoddep.c: Likewise.
9680         * util/getroot.c: Likewise.
9681         * util/grub-emu.c: Likewise.
9682         * util/grub-mkdevicemap.c: Likewise.
9683         * util/grub-probe.c: Likewise.
9684         * util/lvm.c: Likewise.
9685         * util/misc.c: Likewise.
9686         * util/raid.c: Likewise.
9687         * util/resolve.c: Likewise.
9688         * util/update-grub.in: Likewise.
9689         * util/update-grub_lib.in: Likewise.
9690         * util/grub.d/00_header.in: Likewise.
9691         * util/grub.d/10_hurd.in: Likewise.
9692         * util/grub.d/10_linux.in: Likewise.
9693         * util/i386/efi/grub-install.in: Likewise.
9694         * util/i386/efi/grub-mkimage.c: Likewise.
9695         * util/i386/pc/grub-install.in: Likewise.
9696         * util/i386/pc/grub-mkimage.c: Likewise.
9697         * util/i386/pc/grub-mkrescue.in: Likewise.
9698         * util/i386/pc/grub-setup.c: Likewise.
9699         * util/i386/pc/misc.c: Likewise.
9700         * util/powerpc/ieee1275/grub-install.in: Likewise.
9701         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9702         * util/powerpc/ieee1275/misc.c: Likewise.
9703         * video/bitmap.c: Likewise.
9704         * video/video.c: Likewise.
9705         * video/i386/pc/vbe.c: Likewise.
9706         * video/i386/pc/vbeblit.c: Likewise.
9707         * video/i386/pc/vbefill.c: Likewise.
9708         * video/i386/pc/vbeutil.c: Likewise.
9709         * video/readers/tga.c: Likewise.
9711 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9713         * conf/i386-efi.rmk: Replace obsolete reference to
9714         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9715         with util/getroot.c.
9716         * conf/powerpc-ieee1275.rmk: Likewise.
9717         * conf/sparc64-ieee1275.rmk: Likewise.
9719         * util/grub-emu.c (main): Fix unchecked pointer handling.
9721 2007-07-02  Robert Millan  <rmh@aybabtu.com>
9723         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9724         invocation to fail, in order to support partition-less media.
9726         * util/i386/pc/grub-install.in: Likewise.
9728         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9729         which fs or partmap modules are needed (akin to its sister scripts).
9731         Also use grub-probe to get rid of unportable /proc/mounts check.
9733         Print the same informational message that the other scripts do, before
9734         exiting.
9736 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9738         * util/update-grub_lib.in (font_path): New function.  Determine whether
9739         a font file can be found and, if so, echo the GRUB path to it.
9741         * util/update-grub.in: Handle multiple terminals depending on user
9742         input, platform availability and font file presence.  Propagate
9743         variables of our findings to /etc/grub.d/ children.
9745         * util/grub.d/00_header.in: Handle multiple terminals, based on
9746         environment setup by update-grub.
9748 2007-06-23  Robert Millan  <rmh@aybabtu.com>
9750         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9752 2007-06-21  Robert Millan  <rmh@aybabtu.com>
9754         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9755         indicate end of data section in kernel image.
9756         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9757         GRUB_KERNEL_MACHINE_DATA_END.
9759         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9760         space for it.
9761         * kern/i386/efi/startup.S: Likewise.
9763         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9764         during image generation.  Implement --prefix option to override this
9765         patch.
9766         * util/i386/efi/grub-mkimage.c: Likewise.
9768         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9769         code to make path relative to its root into a separate function.
9771         * util/i386/pc/grub-install.in: Use newly provided
9772         make_system_path_relative_to_its_root() to convert ${grubdir}, then
9773         pass the result to grub-install --prefix.
9775 2007-06-13  Robert Millan  <rmh@aybabtu.com>
9777         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9778         DEFAULT_DEVICE_MAP.
9779         * util/grub-emu.c: Use above definitions from misc.h instead of
9780         defining them.
9781         * util/grub-mkdevicemap.c: Likewise.
9782         * util/i386/pc/grub-setup.c: Likewise.
9783         * util/grub-probe.c: Likewise.
9784         (probe): Abort with grub_util_error() when either
9785         grub_guess_root_device or grub_util_get_grub_dev fails.
9787 2007-06-12  Robert Millan  <rmh@aybabtu.com>
9789         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9790         "pager" assignment.
9791         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9792         "pcdata".
9793         * util/grub-probe.c (probe): Likewise for "drive_name".
9795 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9797         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9798         not just the cdrom one.
9800 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9802         * util/i386/pc/grub-mkrescue.in: Add "set -e".
9803         Add --pkglibdir=DIR option to override pkglibdir.
9804         Mention --image-type=TYPE in help output.
9805         Fix --grub-mkimage (it was a no-op).
9806         Abort gracefully when no parameter is given.
9808 2007-06-11  Robert Millan  <rmh@aybabtu.com>
9810         * util/i386/pc/grub-mkrescue.in: New file.
9811         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
9812         * Makefile.in: Handle bin_SCRIPTS.
9814 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
9816         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9817         list of video modes.
9819 2007-06-06  Robert Millan  <rmh@aybabtu.com>
9821         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9822         file doesn't exist, or if it is in a filesystem grub can't read.
9824         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
9825         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
9826         header comment to fit in 80 columns when the variables are resolved.
9828         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9829         could be identified by update-grub.  Remove redundant check for
9830         unifont.pff existence (since convert_system_path_to_grub_path now
9831         handles that).
9833 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9835         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9837         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9839         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9841 2007-06-04  Robert Millan  <rmh@aybabtu.com>
9843         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9845         * include/grub/partition.h: Declare grub_apple_partition_map_init and
9846         grub_apple_partition_map_fini.
9848         * util/biosdisk.c
9849         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9850         to access >2 TiB disks).
9852         Print disk->total_sectors with %llu instead of %lu, since this
9853         variable is always 64-bit (prevents wrong disk size from being displayed
9854         on either >2 TiB disk or big-endian CPU).
9856         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9857         into a generic case that supports all (sane) partition maps.
9859         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9860         breaks big-endian.
9862         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9863         and grub_apple_partition_map_fini() after that.
9865 2007-06-01  Robert Millan  <rmh@aybabtu.com>
9867         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9869         * util/grub.d/00_header.in: Only enable gfxterm when
9870         convert_system_path_to_grub_path() succeeds.
9872 2007-05-20  Robert Millan  <rmh@aybabtu.com>
9874         * util/update-grub_lib.in: New file.
9875         * DISTLIST: Add update-grub_lib.in.
9876         * conf/common.rmk: Generate update-grub_lib and install it in
9877         $(lib_DATA).
9878         * Makefile.in: Add install routine for $(lib_DATA).
9880         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9881         function provided by update-grub_lib to support arbitrary paths of
9882         unifont.pff.
9883         * util/update-grub.in: Use convert_system_path_to_grub_path() to
9884         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9886 2007-05-19  Robert Millan  <rmh@aybabtu.com>
9888         * commands/i386/cpuid.c: New module.
9889         * DISTLIST: Add it.
9890         * conf/i386-efi.rmk: Enable cpuid.mod.
9891         * conf/i386-pc.rmk: Likewise.
9893 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9895         * kern/disk.c (grub_disk_read): Check return value of
9896         grub_realloc().
9898 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9900         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9901         arrays.
9902         * disk/raid.c (grub_raid_open): Likewise.
9904 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9906         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9907         stack instead of on the heap.
9909         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9910         before doing a read on it.
9912         * configure.ac: Only use -fno-stack-protector for the target
9913         environment.
9915 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
9917         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9918         __attribute_ ((unused)) to mode_type argument.
9920         * util/getroot.c (grub_guess_root_device): Fix #endif.
9922         * kern/misc.c (memcmp): Fix prototype.
9924         * include/grub/partition.h [GRUB_UTIL]
9925         (grub_gpt_partition_map_init): Add prototype.
9926         (grub_gpt_partition_map_fini): Likewise.
9928         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9929         at the right place.
9931         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9932         (grub_fat_read_data): Likewise.
9933         (grub_fat_find_dir): Likewise.
9935         * font/manager.c (find_glyph): Make table a const.
9936         (grub_font_get_glyph): Remove bitmap from if statement.
9938 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
9940         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9941         code, first search for device in /dev/mapper, then in /dev.
9942         (grub_util_get_grub_dev): New function.
9943         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9944         prototype.
9945         * util/grub-probe.c (probe): Remove check for RAID, call
9946         grub_util_get_grub_dev() instead of
9947         grub_util_biosdisk_get_grub_dev().
9948         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9949         grub_util_biosdisk_get_grub_dev().
9950         * util/i386/pc/grub-setup.c (main): Likewise.
9952 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9954         * DISTLIST: Update for the latest changes.
9955         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9956         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9957         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9958         grub/util/biosdisk.h.
9959         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9960         grub/util/biosdisk.h.
9962 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9964         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9966 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9968         * util/i386/efi/grub-install.in: New.
9969         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9970         newly added grub-install.
9971         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9972         include.
9973         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9974         grub/util/biosdisk.h.
9975         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9976         grub/util/biosdisk.h.
9978 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9980         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9981         * include/grub/util/biosdisk.h: ... here.
9982         * util/i386/pc/biosdisk.c: Moved to ...
9983         * util/biosdisk.c: ... here.
9984         * util/i386/pc/getroot.c: Moved to ...
9985         * util/getroot.c: ... here.
9986         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9987         * util/grub-mkdevicemap.c: ... here.
9988         * util/i386/pc/grub-probe.c: Moved to ...
9989         * util/grub-probe.c: ... here.
9991 2007-05-15  Robert Millan  <rmh@aybabtu.com>
9993         * util/update-grub.in: Remove duplicated line in grub.cfg header
9994         message.
9996 2007-05-13  Robert Millan  <rmh@aybabtu.com>
9998         * util/update-grub.in: Fix a few assumptions about the devices holding
9999         /, /boot and /boot/grub being the same.
10000         * util/grub.d/00_header.in: Likewise.
10001         * util/grub.d/10_hurd.in: Likewise.
10002         * util/grub.d/10_linux.in: Likewise.
10004         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10005         patterns.  Use that to define the `.old' suffix as older than `'.
10007         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10009         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10010         the grub.cfg header message.
10012 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10014         * util/update-grub.in: Create device.map if it doesn't already exist,
10015         before attempting to run grub-probe.
10016         Check for grub-probe and grub-mkdevicemap with the same code
10017         grub-install is using.
10018         Remove test mode.
10020 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10022         * Makefile.in: Add the datarootdir autoconf variable.
10024 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10026         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10027         fail gracefully if dev->disk->partition == NULL.
10029 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10031         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10032         determine partition map module.
10033         * util/i386/pc/grub-install.in: Use this feature to decide which
10034         partition module to load, instead of hardcoding pc and gpt.
10036 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10038         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10039         source directory differs from build directory.
10041 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10043         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10044         initialisation.
10046 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10048         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10050 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10052         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10053         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10055 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10057         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10058         (grub_probe_SOURCES): Likewise.
10059         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10060         GPT and initialize dos_part and bsd_part accordingly.
10061         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10062         install_bsd_part.
10063         (main): Activate gpt module for use during partition identification,
10064         and deactivate it afterwards.
10065         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10066         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10067         partition identification, and deactivate it afterwards.
10069 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10071         * term/i386/pc/console.c (grub_console_fini): Call
10072         grub_term_set_current() before grub_term_unregister().
10074 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10076         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10077         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10078         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10079         and update-grub_DATA.
10080         * conf/common.rmk: Build and install update-grub components.
10081         * conf/common.mk: Regenerate.
10082         * util/update-grub.in: New.  Core of update-grub.
10083         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10084         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10085         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10086         * util/grub.d/README: New.  Document grub.d directory layout.
10088 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10090         * util/grub-emu.c: Move initialization functions
10091         grub_util_biosdisk_init() and grub_init_all() before
10092         grub_util_biosdisk_get_grub_dev(), which relies on them.
10094 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10096         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10097         it is used later.
10099 2007-04-18  Jerone Young  <jerone@gmail.com>
10101         * kernel/elf.c: Add missing parenthesis for conditional statement
10102         stanza.
10104 2007-04-10  Jerone Young  <jerone@gmail.com>
10106         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10107         continue on and look for device node with real device name.
10109 2007-04-10  Jerone Young  <jerone@gmail.com>
10111         * configure.ac: Add argument for autoconf to use transformation
10112         ability.
10113         * Makefile.in: Add autoconf package transformation code.
10114         * util/i386/pc/grub-install.in: Likewise.
10115         * util/powerpc/ieee1275/grub-install.in: Likewise.
10117 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10119         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10120         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10121         (EXT2_REVISION): Likewise.
10122         (EXT2_INODE_SIZE): Likewise.
10123         (struct grub_ext2_block_group): Added a missing member
10124         "used_dirs".
10125         (grub_ext2_read_inode): Divide by the inode size in a superblock
10126         instead of 128 to obtain INODES_PER_BLOCK.
10127         Use the macro EXT2_INODE_SIZE instead of directly using
10128         SBLOCK->INODE_SIZE.
10130 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10132         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10133         superblock instead of the structure size to compute an
10134         offset. This fixes the problem that GRUB could not read a
10135         filesystem when inode size is different from 128-byte.
10137 2007-03-05  Marco Gerards  <marco@gnu.org>
10139         * normal/main.c (read_config_file): When "menu" is not set, create
10140         an initial context.
10142 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10144         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10145         (HEAP_LIMIT): New macro.
10146         (grub_claim_heap): Claim memory up to `heaplimit'.
10148 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10150         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10151         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10152         (_start): Likewise.
10153         (grub_arch_modules_addr): Return address after `_end'.
10154         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10155         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10156         (add_segments): Calculate `_end' from phdr size and location.
10157         (ALIGN_UP): Moved to ...
10158         * include/grub/misc.h: here.
10159         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10160         New macro.
10161         (GRUB_IEEE1275_MODULE_BASE): Removed.
10163 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10165         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10166         loop boundary.
10168 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10170         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10171         All users updated.
10172         (grub_elf64_load_hook_t): Likewise.
10173         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10174         debug output.
10176 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10178         * kern/mm.c: Update copyright.
10179         (grub_mm_debug): Correct syntax error.
10180         (grub_mm_dump_free): New function.
10181         (grub_debug_free): Call `grub_free'.
10182         * include/grub/mm.h: Update copyright.
10183         (grub_mm_dump_free): Add declaration.
10185 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10187         * include/grub/ieee1275/ieee1275.h: Update copyright.
10188         * kern/powerpc/ieee1275/init.c: Likewise.
10189         * kern/powerpc/ieee1275/openfw.c: Likewise.
10191         * loader/powerpc/ieee1275/linux.c: Likewise.
10192         * include/grub/elfload.h: Likewise.
10193         * kern/elf.c: Likewise.
10194         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10195         callers.
10196         (grub_elf64_load): Likewise.
10197         (grub_elf32_load_segment): Move to a nested function.
10198         (grub_elf64_load_segment): Likewise.
10200 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10202         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10203         prototype.
10204         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10205         (grub_heap_len): Likewise.
10206         (HEAP_SIZE): New macro.
10207         (grub_claim_heap): New function.
10208         (grub_machine_init): Don't claim heap directly.  Call
10209         `grub_claim_heap'.
10210         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10211         (grub_available_iterate): New function.
10213 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10215         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10216         * configure.ac: Use it for testing the HOST and TARGET compilers.
10218 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10220         * Makefile.in (enable_grub_emu): New variable.
10221         * configure.ac (--enable-grub-emu): New option.
10222         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10223         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10224         * conf/i386-pc.rmk: Likewise.
10225         * conf/powerpc-ieee1275.rmk: Likewise.
10226         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10228 2006-12-12  Marco Gerards  <marco@gnu.org>
10230         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10232         * kern/env.c (grub_env_unset): Don't free the member `value' when
10233         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10234         pointer.
10236         * normal/main.c (current_menu): Removed.
10237         (free_menu): Unset the `menu' environment variable.
10238         (grub_normal_menu_addentry): Make use of the environment variable
10239         `menu', instead of using the global `current_menu'.  Allocate
10240         memory for the sourcecode of this entry.
10241         (read_config_file): New argument `nested', changed all callers.
10242         Only in the case of a new context, initialize a new menu.  Set the
10243         `menu' environment variable.
10244         (grub_normal_execute): Don't set and unset the environment
10245         variable `menu' here anymore.  Only free the menu when leaving the
10246         context.
10248         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10249         leak.
10251 2006-12-11  Marco Gerards  <marco@gnu.org>
10253         * normal/menu_entry.c (run): Fix off by one bug so the last line
10254         is executed.  Move the loader check to outside the loop.
10256 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10258         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10260 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10262         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10263         the number of sectors.  Reported by Andrey Shuvikov
10264         <mr_hyro@yahoo.com>.
10266 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10268         * kern/disk.c (grub_disk_read): When there is a read error, always
10269         try to read only the necessary data.
10271         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10272         disk/raid.c.
10273         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10274         prototype.
10275         [GRUB_UTIL] (grub_raid_fini): Likewise.
10276         [GRUB_UTIL] (grub_lvm_init): Likewise.
10277         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10278         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10279         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10280         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10281         and grub_raid_fini().
10283 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10285         * include/grub/types.h (__unused): Rename to UNUSED.
10286         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10287         (grub_elf64_size): Likewise.
10289 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10291         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10292         grub_error_push and grub_error_pop in the error-handling path.
10293         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10294         length.
10296 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10298         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10299         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10300         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10301         (kernel_elf_SOURCES): Likewise.
10302         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10303         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10304         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10305         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10306         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10307         (elf_mod_SOURCES): New variable.
10308         (elf_mod_CFLAGS): Likewise.
10309         (elf_mod_LDFLAGS): Likewise.
10310         * include/grub/types.h (__unused): New macro.
10311         * include/grub/elfload.h: New file.
10312         * kern/elf.c: Likewise.
10313         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10314         (ELF32_LOADMASK): New macro.
10315         (ELF64_LOADMASK): Likewise.
10316         (vmlinux): Removed.
10317         (grub_linux_load32): New function.
10318         (grub_linux_load64): Likewise.
10319         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10320         Use grub_elf_t instead of grub_file_t.
10322 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10324         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10325         `catch_result' to struct set_color_args.
10327 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10329         * normal/menu.c: Include grub/script.h.
10330         * normal/menu_entry.c: Likewise.
10331         * include/grub/normal.h: Do not include grub/script.h.
10333 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10335         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10337 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10339         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10340         disk.
10341         (grub_disk_close): Print debug messages when closing a disk.
10342         (grub_disk_read): Print debug messages when disk read fails.
10343         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10344         filesystem type.
10345         * kern/partition.c: Include misc.h.
10346         (grub_partition_iterate): Print debug messages when detecting
10347         partition type.
10349 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10351         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10352         is negative.
10353         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10355 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10357         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10358         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10360 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10362         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10363         instead of sizeof(lv). Patch by Michael Guntsche.
10365 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10367         * disk/lvm.c: Rename VGS to VG_LIST.
10368         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10369         (grub_lvm_open): Likewise.
10370         Thanks to Michael Guntsche for finding this bug.
10372 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10374         * configure.ac (AC_INIT): Bumped to 1.95.
10376 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10378         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10379         with "/dev/.static/dev/md".
10381 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10383         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10384         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10385         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10386         DRIVE_NAME are always freed.
10388         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10389         DOS_PART, as a DOS partition is counted from one instead of zero
10390         now. Reported by Robert Millan.
10392 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10394         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10395         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10396         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10397         string returned by grub_guess_root_device.
10398         * util/i386/pc/grub-setup.c: Likewise.
10399         * util/i386/pc/grub-probefs.c: Likewise.
10401         * util/i386/pc/grub-probefs.c: Rename to ...
10402         * util/i386/pc/grub-probe.c: ... this.
10403         * DISTLIST: Remove grub-probefs, add grub-probe.
10404         * conf/i386-efi.rmk: Likewise.
10405         * conf/i386-pc.rmk: Likewise.
10406         * util/i386/pc/grub-install.in: Likewise.
10408         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10409         choose which information we want to print.
10411 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10413         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10414         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10415         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10416         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10417         video/readers/tga.c and video/i386/pc/vbeutil.c.
10419 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10421         Added support for RAID and LVM.
10423         * disk/lvm.c: New file.
10424         * disk/raid.c: Likewise.
10425         * include/grub/lvm.h: Likewise.
10426         * include/grub/raid.h: Likewise.
10427         * include/grub/util/lvm.h: Likewise.
10428         * include/grub/util/raid.h: Likewise.
10429         * util/lvm.c: Likewise.
10430         * util/raid.c: Likewise.
10432         * include/grub/disk.h (grub_disk_dev_id): Add
10433         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10434         (grub_disk_get_size): New prototype.
10435         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10436         returns a partition.
10437         (grub_disk_get_size): New function.
10439         * kern/i386/pc/init.c (make_install_device): Copy the prefix
10440         verbatim if grub_install_dos_part is -2.
10442         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10443         and LVM devices.
10445         * util/i386/pc/grub-setup.c (setup): New argument
10446         MUST_EMBED. Force embedding of GRUB when the argument is
10447         true. Close FILE before returning.
10448         (main): Add support for RAID and LVM.
10450         * conf/common.rmk: Add RAID and LVM modules.
10451         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10452         util/lvm.c.
10453         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10455         * kern/misc.c (grub_strstr): New function.
10456         * include/grub/misc.h (grub_strstr): New prototype.
10458 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
10460         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10462 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
10464         * kern/misc.c (grub_strtoull): Guess the base only if not
10465         specified.
10467 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10469         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10470         PowerMac support.
10472 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10474         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10476         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10477         Remove `flags' argument.  All callers changed.
10478         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10479         (IEEE1275_IHANDLE_INVALID): New variable.
10480         (IEEE1275_CELL_INVALID): New variable.
10481         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10482         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10483         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10484         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10485         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10486         codes from Open Firmware.  All callers updated.
10487         (grub_ieee1275_next_property): Directly return Open Firmware return
10488         code.
10489         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10490         Standardize error checking from `grub_ieee1275_get_property'.
10491         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10492         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
10494 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
10496         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10497         `instance_to_package_args' to `instance_to_path_args'.
10499         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10500         `grub_ieee1275_chosen'.
10502         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10503         `grub_ieee1275_interpret'.
10505 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10507         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10509 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
10511         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10512         (__cmpdi): Likewise.
10514         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10515         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
10516         `grub_ssize_t'.
10518         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10520         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10521         to type `grub_ssize_t'.
10522         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10524 2006-09-22  Marco Gerards  <marco@gnu.org>
10526         * normal/script.c (grub_script_create_cmdmenu): Skip leading
10527         newlines.
10529 2006-09-22  Marco Gerards  <marco@gnu.org>
10531         * commands/echo.c: New file.
10533         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10535         * conf/common.rmk (echo_mod_SOURCES): New variable.
10536         (echo_mod_CFLAGS): Likewise.
10537         (echo_mod_LDFLAGS): Likewise.
10539 2006-09-22  Marco Gerards  <marco@gnu.org>
10541         * normal/main.c (get_line): Malloc memory instead of using
10542         preallocated memory.  Removed the arguments `cmdline' and
10543         `max_len'.  Updated all callers.
10545 2006-09-22  Marco Gerards  <marco@gnu.org>
10547         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10548         (normal_mod_DEPENDENCIES): Likewise.
10550         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10551         (normal_mod_DEPENDENCIES): Likewise.
10553         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10555 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
10557         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10558         programs.
10559         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10560         (normal_mod_DEPENDENCIES): Likewise.
10561         * conf/i386-pc.mk: Regenerate.
10562         * conf/i386-efi.mk: Likewise
10563         * conf/common.mk: Likewise.
10564         * conf/powerpc-ieee1275.mk: Likewise.
10565         * conf/sparc64-ieee1275.mk: Likewise.
10567 2006-09-22  Robert Millan  <rmh@aybabtu.com>
10569         Sync with i386 version.
10570         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10571         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10573 2006-09-21  Robert Millan  <rmh@aybabtu.com>
10575         Import from GRUB Legacy (lib/device.c):
10576         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10577         (init_device_map) [__linux__]: Add support for I2O devices.
10579 2006-09-14  Marco Gerards  <marco@gnu.org>
10581         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10582         `-melf_i386'.
10584 2006-09-14  Robert Millan  <rmh@aybabtu.com>
10586         * util/i386/pc/grub-install.in: Skip menu.lst when removing
10587         /boot/grub/*.lst.
10589         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10591         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10592         before adding it to device.map.
10594 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
10596         * genmk.rb: Let GCC generate dependencies the first time it
10597         compiles a file; using the -MD option.
10598         * conf/common.mk: Regenerate.
10599         * conf/i386-pc.mk: Likewise.
10600         * conf/i386-efi.mk: Likewise.
10601         * conf/powerpc-ieee1275.mk: Likewise.
10602         * conf/sparc64-ieee1275.mk: Likewise.
10604 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
10606         Move the prototypes of grub_setjmp and grub_longjmp to
10607         cpu/setjmp.h, so that each architecture may specify different
10608         attributes.
10610         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10611         (grub_longjmp): Likewise.
10612         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10613         (grub_longjmp): Likewise.
10614         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10615         (grub_longjmp): Likewise.
10617         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10618         [!GRUB_UTIL] (grub_longjmp): Removed.
10620 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
10622         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10623         "color!" method does not return any value.
10625 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10627         * include/grub/bitmap.h: New file.
10629         * include/grub/i386/pc/vbeutil.h: Likewise.
10631         * video/bitmap.c: Likewise.
10633         * video/readers/tga.c: Likewise.
10635         * video/i386/pc/vbeutil.c: Likewise.
10637         * commands/videotest.c: Code cleanup and updated to reflect to new
10638         video API.
10640         * term/gfxterm.c: Likewise.
10642         * video/video.c: Likewise.
10644         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10645         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10646         (bitmap_mod_SOURCES): New entry.
10647         (bitmap_mod_CFLAGS): Likewise.
10648         (bitmap_mod_LDFLAGS): Likewise.
10649         (tga_mod_SOURCES): Likewise.
10650         (tga_mod_CFLAGS): Likewise.
10651         (tga_mod_LDFLAGS): Likewise.
10653         * include/grub/video.h (grub_video_blit_operators): New enum type.
10654         (grub_video_render_target): Changed as forward declaration and moved
10655         actual definition to be video driver specific.
10656         (grub_video_adapter.blit_bitmap): Added blitting operator.
10657         (grub_video_adapter.blit_render_target): Likewise.
10658         (grub_video_blit_bitmap): Likewise.
10659         (grub_video_blit_render_target): Likewise.
10661         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10662         driver specific render target definition.
10663         (grub_video_vbe_map_rgba): Added driver internal helper.
10664         (grub_video_vbe_unmap_color): Updated to use
10665         grub_video_i386_vbeblit_info.
10666         (grub_video_vbe_get_video_ptr): Likewise.
10668         * include/grub/i386/pc/vbeblit.h
10669         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10670         grub_video_i386_vbeblit_info.
10671         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10672         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10673         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10674         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10675         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10676         (grub_video_i386_vbeblit_index_index): Likewise.
10677         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10678         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10679         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10680         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10681         operator.
10682         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10683         operator.
10685         * video/i386/pc/vbeblit.c: Updated to reflect changes on
10686         include/grub/i386/pc/vbeblit.h.
10688         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10689         Updated to use grub_video_i386_vbeblit_info.
10690         (grub_video_i386_vbefill_R8G8B8): Likewise.
10691         (grub_video_i386_vbefill_index): Likewise.
10692         (grub_video_i386_vbefill): Added generic filler.
10694         * video/i386/pc/vbefill.c: Updated to reflect changes on
10695         include/grub/i386/pc/vbefill.h.
10697         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10698         grub_video_i386_vbeblit_info.
10699         (grub_video_vbe_unmap_color): Likewise.
10700         (grub_video_vbe_blit_glyph): Likewise.
10701         (grub_video_vbe_scroll): Likewise.
10702         (grub_video_vbe_draw_pixel): Removed function.
10703         (grub_video_vbe_get_pixel): Likewise.
10704         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10705         updated code to use it.
10706         (common_blitter): Added common blitter for render target and bitmap.
10707         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10708         (grub_video_vbe_blit_render_target): Likewise.
10710 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
10712         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10713         is in text mode if there is no console control protocol instance
10714         available.
10716 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10718         * include/grub/video.h: Code cleanup.
10720         * include/grub/i386/pc/vbe.h: Likewise.
10722         * video/i386/pc/vbe.c: Likewise.
10724         * video/i386/pc/vbeblit.c: Likewise.
10726         * video/i386/pc/vbefill.c: Likewise.
10728         * video/video.c: Likewise.  Also added more comments.
10730 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
10732         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10733         (struct grub_biosdisk_dap): Likewise.
10735         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
10736         linkage settings for all functions.
10738 2006-07-12  Marco Gerards  <marco@gnu.org>
10740         * configure.ac (--enable-mm-debug): Fix typo.
10742         * genkernsyms.sh.in: Use proper quoting for `CC'.
10744 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
10746         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10747         (normal_mod_ASFLAGS): Remove "-m32".
10749 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
10751         * util/misc.c: Include config.h.
10752         [!HAVE_MEMALIGN]: Do not include malloc.h.
10753         (grub_memalign): Use posix_memalign, if present. Then, use
10754         memalign, if present. Otherwise, emit an error.
10756         * util/grub-emu.c: Do not include malloc.h.
10758         * include/grub/util/misc.h: Include unistd.h. This is required for
10759         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10760         D. Eades III <hde@foobar-qux.org>.
10762         * configure.ac (AC_GNU_SOURCE): Added.
10763         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10764         type.
10766 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
10768         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10769         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10771 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
10773         * include/grub/types.h (grub_host_addr_t): Rename to
10774         grub_target_addr_t.
10775         (grub_host_off_t): Rename to grub_target_off_t.
10776         (grub_host_size_t): Rename to grub_target_size_t.
10777         (grub_host_ssize_t): Rename to grub_target_ssize_t.
10778         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10780         * include/grub/kernel.h (struct grub_module_header): Change type
10781         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10782         (grub_module_info): Likewise.
10784 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10786         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10787         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10788         Velazquez <jesus.velazquez@gmail.com>.
10790 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
10792         Count partitions from 1 instead of 0 in the string representation
10793         of partitions. Still use 0-based internally.
10795         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10796         (sun_partition_map_iterate): Use grub_partition_t instead of
10797         struct grub_partition *. Cast DESC->START_CYLINDER to
10798         grub_uint64_t after converting the endian.
10799         (sun_partition_map_probe): Subtract 1 for PARTNUM.
10800         (sun_partition_map_get_name): Add 1 to P->INDEX.
10802         * partmap/pc.c (grub_partition_parse): Subtract 1 for
10803         PCDATA->DOS_PART.
10804         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10806         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10807         zero instead of one.
10808         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10809         (gpt_partition_map_get_name): Add 1 into P->INDEX.
10811         * partmap/apple.c (apple_partition_map_iterate): Change the type
10812         of POS to unsigned.
10813         (apple_partition_map_probe): Subtract 1 for PARTNUM.
10814         (apple_partition_map_get_name): Add 1 into P->INDEX.
10816         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10817         of POS to unsigned.
10818         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10819         calculate the offset of a partition.
10820         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10821         (amiga_partition_map_get_name): Add 1 into P->INDEX.
10823         * partmap/acorn.c (acorn_partition_map_find): Change the type of
10824         SECTOR to grub_disk_addr_t.
10825         (acorn_partition_map_iterate): Likewise.
10826         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10827         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10828         top.
10829         (acorn_partition_map_get_name): Add 1 into P->INDEX.
10831         * kern/i386/pc/init.c (make_install_device): Add 1 into
10832         GRUB_INSTALL_DOS_PART.
10834         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10835         conditional.
10837 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10839         Clean up the code to support 64-bit addressing in disks and
10840         files. This change is not enough for filesystems yet.
10842         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10843         type of "start" to grub_uint64_t.
10844         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10845         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10846         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10847         convert addresses.
10849         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10850         to grub_disk_addr_t.
10852         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10853         string.
10855         * partmap/pc.c (pc_partition_map_iterate): Likewise.
10857         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10858         to char *.
10860         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10862         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10864         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10866         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10867         to grub_off_t, to detect an error from grub_file_seek.
10868         (grub_multiboot_load_elf32): Likewise.
10870         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10871         maximum unsigned long value when an overflow is detected.
10872         (grub_strtoull): New function.
10873         (grub_divmod64): Likewise.
10874         (grub_lltoa): use grub_divmod64.
10876         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10877         grub_disk_addr_t.
10878         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10879         the pointer to next character. Use grub_strtoull instead of
10880         grub_strtoul.
10881         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10882         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10883         respectively.
10885         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10886         return value is signed.
10887         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10888         test if OFFSET is less than zero, as OFFSET is unsigned now.
10890         * kern/disk.c (struct grub_disk_cache): Change the type of
10891         "sector" to grub_disk_addr_t.
10892         (grub_disk_cache_get_index): Change the type of SECTOR to
10893         grub_disk_addr_t. Calculate the hash with SECTOR casted to
10894         unsigned after shifting.
10895         (grub_disk_cache_invalidate): Change the type of SECTOR to
10896         grub_disk_addr_t.
10897         (grub_disk_cache_unlock): Likewise.
10898         (grub_disk_cache_store): Likewise.
10899         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10900         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10901         grub_disk_addr_t and grub_uint64_t, respectively.
10902         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10903         body, as the value of OFFSET is tweaked by
10904         grub_disk_check_range. Change the types of START_SECTOR, LEN and
10905         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10906         respectively.
10907         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10908         body, as the value of OFFSET is tweaked by
10909         grub_disk_check_range. Change the types of LEN and N to
10910         grub_size_t.
10912         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10913         and "saved_offset" to grub_off_t.
10914         (test_header): Cast BUF to char *.
10915         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10916         to char *.
10917         (grub_gzio_read): Change the types of OFFSET and SIZE to
10918         grub_off_t and grub_size_t, respectively.
10920         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10921         Removed.
10922         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10923         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10924         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10925         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10926         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10928         * include/grub/types.h (grub_off_t): Unconditionally set to
10929         grub_uint64_t.
10930         (grub_disk_addr_t): Changed to grub_uint64_t.
10932         * include/grub/partition.h (struct grub_partition): Change the
10933         types of "start", "len" and "offset" to grub_disk_addr_t,
10934         grub_uint64_t and grub_disk_addr_t, respectively.
10935         (grub_partition_get_start): Return grub_disk_addr_t.
10936         (grub_partition_get_len): Return grub_uint64_t.
10938         * include/grub/misc.h (grub_strtoull): New prototype.
10939         (grub_divmod64): Likewise.
10941         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10942         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10943         grub_off_t, respectively.
10944         All callers and references changed.
10946         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10947         grub_size_t in "read".
10948         All callers and references changed.
10950         * include/grub/file.h (struct grub_file): Change the types of
10951         "offset" and "size" to grub_off_t and grub_off_t,
10952         respectively. Change the type of SECTOR to grub_disk_addr_t in
10953         "read_hook".
10954         (grub_file_read): Change the type of LEN to grub_size_t.
10955         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10956         grub_off_t.
10957         (grub_file_size): Return grub_off_t.
10958         (grub_file_tell): Likewise.
10959         All callers and references changed.
10961         * include/grub/disk.h (struct grub_disk_dev): Change the types of
10962         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10963         "write".
10964         (struct grub_disk): Change the type of "total_sectors" to
10965         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10966         "read_hook".
10967         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10968         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10969         (grub_disk_write): Likewise.
10970         All callers and references changed.
10972         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10973         char * for grub_strncmp to silence gcc.
10974         (grub_iso9660_mount): Likewise.
10975         (grub_iso9660_mount): Likewise.
10976         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10977         return statement.
10978         (grub_iso9660_iterate_dir): Likewise.
10979         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10981         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10982         LEN to grub_disk_addr_t and grub_size_t, respectively.
10984         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10986         * fs/jfs.c (grub_jfs_read_file): Likewise.
10988         * fs/minix.c (grub_jfs_read_file): Likewise.
10990         * fs/sfs.c (grub_jfs_read_file): Likewise.
10992         * fs/ufs.c (grub_jfs_read_file): Likewise.
10994         * fs/xfs.c (grub_jfs_read_file): Likewise.
10996         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10997         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10998         respectively.
11000         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11001         BLKNR to -1 instead of returning GRUB_ERRNO.
11002         (grub_ext2_read_file): Change the types of SECTOR and
11003         LEN to grub_disk_addr_t and grub_size_t, respectively.
11005         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11006         LEN to grub_disk_addr_t and grub_size_t, respectively.
11008         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11009         grub_file_read.
11011         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11012         string. Do not cast SECTOR explicitly.
11014         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11015         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11016         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11017         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11018         over 2TB and LBA mode is not supported, raise an error.
11019         (get_safe_sectors): New function.
11020         (grub_biosdisk_read): Use get_safe_sectors.
11021         (grub_biosdisk_write): Likewise.
11023         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11024         (grub_efidisk_write): Likewise.
11026         * disk/loopback.c (delete_loopback): Cosmetic changes.
11027         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11028         correctly.
11029         (grub_loopback_open): Likewise.
11030         (grub_loopback_read): Likewise. Also, change the type of POS to
11031         grub_off_t, and fix the usage of grub_memset.
11033         * commands/i386/pc/play.c: Include grub/machine/time.h.
11035         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11036         print FILE->SIZE.
11038         * commands/configfile.c: Include grub/env.h.
11040         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11041         GRUB_ERRNO directly instead. Change the type of POS to
11042         grub_off_t. Follow the coding standard.
11044         * commands/blocklist.c: Include grub/partition.h.
11045         (grub_cmd_blocklist): Return an error if the underlying device is
11046         not a disk. Take the starting sector of a partition into account,
11047         if a partition is used.
11049         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11050         a length field.
11051         (lba_mode): Support 64-bit addresses.
11052         (chs_mode): Likewise.
11053         (copy_buffer): Adapted to the new offsets of a length field and a
11054         segment field.
11055         (blocklist_default_start): Allocate 64-bit space.
11057         * boot/i386/pc/boot.S (force_lba): Removed.
11058         (boot_drive): Moved to under KERNEL_SECTOR.
11059         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11060         space.
11061         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11062         is useless.
11063         (lba_mode): Refactored to support a 64-bit address. More size
11064         optimization.
11065         (setup_sectors): Likewise.
11067 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11069         * DISTLIST: Added include/grub/i386/linux.h. Removed
11070         include/grub/i386/pc/linux.h
11072         * configure.ac (AC_INIT): Bumped to 1.94.
11074         * config.guess: Updated from gnulib.
11075         * config.sub: Likewise.
11076         * install-sh: Likewise.
11077         * mkinstalldirs: Likewise.
11079 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11081         * conf/common.rmk (grub_modules_init.lst): Depended on
11082         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11083         MODSRCFILES.
11085         * genmk.rb (PModule::rule): Reverted the previous change.
11087 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11089         * conf/common.rmk (grub_modules_init.lst): Depends on
11090         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11091         that the target does not exist before producing.
11092         (grub_modules_init.h): Remove the target before generating.
11093         (grub_emu_init.c): Likewise.
11095         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11097 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11099         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11100         for the target-specific tests. Make sure that we also have the
11101         up-to-date target variables for those tests.
11103 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11105         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11106         (PModule::rule): Likewise.
11108 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11110         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11111         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11112         target-specific flags should be prefixed.
11113         (PModule::rule): Likewise.
11115 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11117         * configure.ac (CMP): Check if cmp is available explicitly.
11119 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11121         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11122         (target_cpu): New variable.
11123         (pkglibdir): Use target_cpu instead of host_cpu.
11125         * util/i386/pc/grub-install.in (host_cpu): Removed.
11126         (target_cpu): New variable.
11127         (pkglibdir): Use target_cpu instead of host_cpu.
11129         * util/genmoddep.c: Removed.
11131         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11132         instead of GRUB_HOST_SIZEOF_VOID_P.
11133         * kern/dl.c: Likewise.
11135         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11136         ...
11137         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11138         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11139         (GRUB_TARGET_SIZEOF_LONG): ... this.
11140         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11141         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11142         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11143         to ...
11144         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11145         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11146         (GRUB_TARGET_SIZEOF_LONG): ... this.
11147         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11148         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11149         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11150         to ...
11151         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11152         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11153         (GRUB_TARGET_SIZEOF_LONG): ... this.
11154         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11155         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11157         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11158         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11159         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11160         instead of GRUB_HOST_SIZEOF_LONG.
11161         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11162         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11163         GRUB_CPU_WORDS_BIGENDIAN.
11164         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11165         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11166         grub_host_ssize_t.
11168         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11169         (genmoddep_SOURCES): Likewise.
11170         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11171         (genmoddep_SOURCES): Likewise.
11172         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11173         (genmoddep_SOURCES): Likewise.
11174         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11175         Likewise.
11176         (genmoddep_SOURCES): Likewise.
11178         * genmoddep.awk: New file.
11180         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11181         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11182         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11183         (PModule::rule): Likewise.
11184         (Program::rule): Likewise.
11185         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11186         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11187         respectively.
11189         * configure.ac: Rewritten intensively to use host and target
11190         instead of build and host, respectively.
11192         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11193         (host_cpu): Removed.
11194         (target_cpu): New variable.
11195         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11196         (BUILD_CC): Removed.
11197         (BUILD_CFLAGS): Likewise.
11198         (BUILD_CPPFLAGS): Likewise.
11199         (TARGET_CC): New variable.
11200         (TARGET_CFLAGS): Likewise.
11201         (TARGET_CPPFLAGS): Likewise.
11202         (TARGET_LDFLAGS): Likewise.
11203         (AWK): Likewise.
11204         (include): Use target_cpu instead of host_cpu.
11205         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11207         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11209 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11211         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11212         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11213         field 'false' to 'exec_on_false'.
11214         (grub_script_create_cmdif): Renamed argument names to reflect above
11215         changes.
11217         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11219         * normal/script.c (grub_script_create_cmdif): Likewise.
11221 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11223         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11224         top.
11225         (grub_hfsplus_btree_recptr): Likewise.
11226         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11227         FILEBLOCK both to pass a block number and store next block
11228         number.
11229         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11230         overflow file correctly. Specify errors appropriately, because
11231         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11232         grub_hfsplus_btree_recptr to get the pointer to a found key.
11233         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11234         is found.
11236         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11237         linux.mod.
11238         (_linux_mod_SOURCES): New variable.
11239         (_linux_mod_CFLAGS): Likewise.
11240         (_linux_mod_LDFLAGS): Likewise.
11241         (linux_mod_SOURCES): Likewise.
11242         (linux_mod_CFLAGS): Likewise.
11243         (linux_mod_LDFLAGS): Likewise.
11245         * DISTLIST: Added loader/i386/efi/linux.c,
11246         loader/i386/efi/linux_normal.c and
11247         include/grub/i386/efi/loader.h.
11249         * loader/i386/efi/linux.c: New file.
11250         * loader/i386/efi/linux_normal.c: Likewise.
11251         * include/grub/i386/efi/loader.h: Likewise.
11253 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11255         * commands/blocklist.c: New file.
11257         * DISTLIST: Added commands/blocklist.c.
11259         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11260         color for the background, and a darker color for the foreground.
11261         (grub_console_checkkey): Return READ_KEY.
11262         (grub_console_cls): Set the background to
11263         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11265         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11267         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11268         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11270         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11271         prototype.
11273         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11274         BG. The spec is wrong again.
11276         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11277         prototype.
11278         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11280         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11281         commands/blocklist.c.
11282         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11284         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11285         (blocklist_mod_SOURCES): New variable.
11286         (blocklist_mod_CFLAGS): Likewise.
11287         (blocklist_mod_LDFLAGS): Likewise.
11289 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11291         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11292         duplication.
11293         (lba_mode): Use %eax more intensively to reduce the code size.
11295 2006-05-20  Marco Gerards  <marco@gnu.org>
11297         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11299         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11300         for `menuentry'.
11301         (script): Accept leading newlines.
11302         (newlines): New rule to describe 0 or more newlines.
11303         (commands): Accept `command' with trailing newline.  Fixed the
11304         order in which arguments were passed to `grub_script_add_cmd'.
11305         Accept commands separated by newlines.
11306         (function): Changed to accept newlines.
11307         (menuentry) Rewritten.
11309         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11310         front of the list, instead of to the end.
11312 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11314         * util/i386/pc/grub-install.in (bindir): New variable.
11315         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11316         Shaver <lbgwjl@gmail.com>.
11318 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11320         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11321         grub/machine/linux.h
11322         * loader/i386/pc/linux.c: Likewise.
11324         * include/grub/i386/pc/linux.h: Moved to ...
11325         * include/grub/i386/linux.h: ... here.
11327         * include/grub/i386/linux.h (struct linux_kernel_params): New
11328         struct.
11330 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11332         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11333         checking.
11334         (grub_video_vbe_blit_glyph): Likewise.
11335         (grub_video_vbe_blit_bitmap): Likewise.
11336         (grub_video_vbe_blit_render_target): Likewise.
11338 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11340         * configure.ac (--with-platform): Properly quote the square
11341         brackets.
11343 2006-05-08  Marco Gerards  <marco@gnu.org>
11345         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11346         this...
11347         (kernel_elf_HEADERS): ...to this.  Updated all users.
11348         (grubof_symlist.c): Renamed from this...
11349         (kernel_elf_symlist.c): ...to this.  Updated all users.
11350         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11351         (grubof_SOURCES): Renamed from this...
11352         (kernel_elf_SOURCES): ...to this.
11353         (grubof_HEADERS): Renamed from this...
11354         (kernel_elf_HEADERS): ...to this.
11355         (grubof_CFLAGS): Renamed from this...
11356         (kernel_elf_CFLAGS): ...to this.
11357         (grubof_ASFLAGS): Renamed from this...
11358         (kernel_elf_ASFLAGS): ...to this.
11359         (grubof_LDFLAGS): Renamed from this...
11360         (kernel_elf_LDFLAGS): ...to this.
11362         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11363         this...
11364         (kernel_elf_HEADERS): ...to this.  Updated all users.
11365         (grubof_symlist.c): Renamed from this...
11366         (kernel_elf_symlist.c): ...to this.  Updated all users.
11367         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11368         (grubof_SOURCES): Renamed from this...
11369         (kernel_elf_SOURCES): ...to this.
11370         (grubof_HEADERS): Renamed from this...
11371         (kernel_elf_HEADERS): ...to this.
11372         (grubof_CFLAGS): Renamed from this...
11373         (kernel_elf_CFLAGS): ...to this.
11374         (grubof_ASFLAGS): Renamed from this...
11375         (kernel_elf_ASFLAGS): ...to this.
11376         (grubof_LDFLAGS): Renamed from this...
11377         (kernel_elf_LDFLAGS): ...to this.
11379         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11380         `kernel.elf' instead of `grubof'.
11382 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11384         Add --with-platform to configure. Use pkglibdir instead of
11385         pkgdatadir. This is reported by Roger Leigh.
11387         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11388         (host_vendor): Likewise.
11389         (host_os): Likewise.
11390         (pkgdatadir): Likewise.
11391         (platform): New variable.
11392         (pkglibdir): Likewise.
11393         Use PKGLIBDIR instead of PKGDATADIR.
11395         * util/i386/pc/grub-install.in (datadir): Removed.
11396         (host_vendor): Likewise.
11397         (host_os): Likewise.
11398         (pkgdatadir): Likewise.
11399         (platform): New variable.
11400         (pkglibdir): Likewise.
11401         Use PKGLIBDIR instead of PKGDATADIR.
11403         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11404         instead of GRUB_DATADIR.
11405         (main): Likewise.
11406         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11407         (main): Likewise.
11408         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11409         (main): Likewise.
11411         * configure.ac (--with-platform): New option.
11412         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11414         * Makefile.in: Include a makefile based on PLATFORM instead of
11415         HOST_VENDOR.
11416         (pkgdatadir): Not appended by the machine type.
11417         (pkglibdir): Appended by the machine type.
11418         (host_vendor): Removed.
11419         (platform): New variable.
11420         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11421         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11422         (uninstall): Likewise.
11424 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11426         Use the environment context in the menu. Remove the commands
11427         "default" and "timeout", and use variables instead.
11429         * normal/menu.c: Include grub/env.h.
11430         (print_entry): Cast TITLE to silence gcc.
11431         (get_timeout): New function.
11432         (set_timeout): Likewise.
11433         (get_entry_number): Likewise.
11434         (run_menu): Use a default entry, a fallback entry and a timeout
11435         in the environment variables "default", "fallback" and
11436         "timeout". Also, tweak the default entry if it is not within the
11437         current menu entries.
11438         (grub_menu_run): Use a fallback entry in the environment variable
11439         "fallback".
11441         * normal/main.c (read_config_file): Do not initialize
11442         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11443         NEWMENU->TIMEOUT.
11444         (grub_normal_execute): Use a data slot to store the menu.
11446         * include/grub/normal.h (struct grub_menu): Removed default_entry,
11447         fallback_entry and timeout.
11448         (struct grub_menu_list): Removed.
11449         (grub_menu_list_t): Likewise.
11450         (struct grub_context): Likewise.
11451         (grub_context_t): Likewise.
11452         (grub_context_get): Likewise.
11453         (grub_context_get_current_menu): Likewise.
11454         (grub_context_push_menu): Likewise.
11455         (grub_context_pop_menu): Likewise.
11456         (grub_default_init): Likewise.
11457         (grub_default_fini): Likewise.
11458         (grub_timeout_init): Likewise.
11459         (grub_timeout_fini): Likewise.
11461         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11462         and timeout.mod.
11463         (normal_mod_SOURCES): Removed normal/context.c.
11465         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11466         commands/default.c, commands/timeout.c and normal/context.c.
11467         (normal_mod_SOURCES): Removed normal/context.c.
11469         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11470         commands/timeout.c and normal/context.c.
11471         (normal_mod_SOURCES): Removed normal/context.c.
11473         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11474         commands/default.c, commands/timeout.c and normal/context.c.
11475         (normal_mod_SOURCES): Removed normal/context.c.
11477         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11478         timeout.mod.
11479         (default_mod_SOURCES): Removed.
11480         (default_mod_CFLAGS): Likewise.
11481         (default_mod_LDFLAGS): Likewise.
11482         (timeout_mod_SOURCES): Removed.
11483         (timeout_mod_CFLAGS): Likewise.
11484         (timeout_mod_LDFLAGS): Likewise.
11486         * DISTLIST: Removed commands/default.c, commands/timeout.c and
11487         normal/context.c.
11489         * commands/default.c: Removed.
11490         * commands/timeout.c: Likewise.
11491         * normal/context.c: Likewise.
11493 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
11495         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11497 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
11499         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11500         "next" to "prev" for readability.
11501         (struct grub_env_sorted_var): New struct.
11502         (grub_env_context): Renamed to ...
11503         (initial_context): ... this.
11504         (grub_env_var_context): Renamed to ...
11505         (current_context): ... this.
11506         (grub_env_find): Look only at CURRENT_CONTEXT.
11507         (grub_env_context_open): Rewritten to copy exported variables from
11508         previous context.
11509         (grub_env_context_close): Rewritten according to the new
11510         scheme. Also, add an assertion to prevent the initial context from
11511         removed.
11512         (grub_env_insert): Removed the code for the sorted list.
11513         (grub_env_remove): Likewise.
11514         (grub_env_export): Simply mark the variable with
11515         GRUB_ENV_VAR_GLOBAL.
11516         (grub_env_set): A cosmetic change for naming consistency.
11517         (grub_env_get): Likewise.
11518         (grub_env_unset): Likewise.
11519         (grub_env_iterate): Rewritten to sort variables within this
11520         function.
11521         (grub_register_variable_hook): Fixed for naming consistency. Call
11522         grub_env_find again, only if NAME is not found at the first time.
11523         (mangle_data_slot_name): New function.
11524         (grub_env_set_data_slot): Likewise.
11525         (grub_env_get_data_slot): Likewise.
11526         (grub_env_unset_data_slot): Likewise.
11528         * include/grub/env.h (grub_env_var_type): New enum.
11529         (GRUB_ENV_VAR_LOCAL): New constant.
11530         (GRUB_ENV_VAR_GLOBAL): Likewise.
11531         (GRUB_ENV_VAR_DATA): Likewise.
11532         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11533         "type".
11534         (grub_env_set): Replace VAR with NAME for consistency.
11535         (grub_register_variable_hook): Likewise.
11536         (grub_env_export): Specify the name of the argument.
11537         (grub_env_set_data_slot): New prototype.
11538         (grub_env_get_data_slot): Likewise.
11539         (grub_env_unset_data_slot): Likewise.
11541 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11543         Extend the loader so that GRUB can accept a loader which comes
11544         back to GRUB when a loaded image exits. Also, this change adds
11545         support for a chainloader on EFI.
11547         * term/efi/console.c: Include grub/misc.h.
11548         (grub_console_checkkey): Display a scan code on the top for
11549         debugging. This will be removed once the EFI port gets stable.
11550         Correct the scan code mapping.
11552         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11553         allocate memory from larger regions, in order to reduce the number
11554         of allocated regions. Otherwise, the MacOSX loader panics.
11555         (filter_memory_map): Avoid less than 1MB for compatibility with
11556         other loaders.
11557         (add_memory_regions): Allocate from the tail of a region, if
11558         possible, to avoid allocating a region near to 1MB, for the MacOSX
11559         loader.
11561         * kern/efi/init.c (grub_efi_set_prefix): Specify
11562         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11564         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11565         argument IMAGE_HANDLE and specify it to get a loaded image.
11566         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11567         grub_efi_get_loaded_image.
11568         (grub_efi_get_filename): Divide the length by the size of
11569         grub_efi_char16_t.
11570         (grub_efi_get_device_path): New function.
11571         (grub_efi_print_device_path): Print End Device Path nodes. Divide
11572         the length by the size of grub_efi_char16_t for a file path device
11573         path node.
11575         * kern/loader.c (grub_loader_noreturn): New variable.
11576         (grub_loader_set): Accept a new argument NORETURN. Set
11577         GRUB_LOADER_NORETURN to NORETURN.
11578         All callers changed.
11579         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11580         grub_machine_fini.
11582         * include/grub/efi/efi.h (grub_efi_get_device_path): New
11583         prototype.
11584         (grub_efi_get_loaded_image): Take an argument to specify an image
11585         handle.
11587         * include/grub/loader.h (grub_loader_set): Added one more argument
11588         NORETURN.
11590         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11591         instead of grub_efi_open_protocol.
11592         (grub_efidisk_get_device_name): Likewise.
11593         (grub_efidisk_close): Print a newline.
11594         (grub_efidisk_get_device_handle): Fixed to use
11595         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11596         GRUB_EFI_DEVICE_PATH_TYPE.
11598         * disk/efi/efidisk.c (device_path_guid): Moved to ...
11599         * kern/efi/efi.c (device_path_guid): ... here.
11601         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11602         chain.mod.
11603         (kernel_mod_HEADERS): Added efi/disk.h.
11604         (_chain_mod_SOURCES): New variable.
11605         (_chain_mod_CFLAGS): Likewise.
11606         (_chain_mod_LDFLAGS): Likewise.
11607         (chain_mod_SOURCES): Likewise.
11608         (chain_mod_CFLAGS): Likewise.
11609         (chain_mod_LDFLAGS): Likewise.
11611         * DISTLIST: Added include/grub/efi/chainloader.h,
11612         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11614         * include/grub/efi/chainloader.h: New file.
11615         * loader/efi/chainloader.c: Likewise.
11616         * loader/efi/chainloader_normal.c: Likewise.
11618 2006-04-30  Marco Gerards  <marco@gnu.org>
11620         * commands/configfile.c (grub_cmd_source): New function.
11621         (GRUB_MOD_INIT): Register the commands `source' and `.'.
11622         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11624 2006-04-30  Marco Gerards  <marco@gnu.org>
11626         * normal/execute.c (grub_script_execute_cmd): Change the return
11627         type to `grub_err_t'.  Correctly return the error.
11628         (grub_script_execute_cmdline): In case a command line is not a
11629         command or a function, try to interpret it as an assignment.
11631 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
11633         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11634         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11635         skip a node whose name is obviously invalid as UTF-16,
11636         i.e. contains a NUL character. Stop the iteration when the last
11637         directory entry is found. Instead of using the return value of
11638         grub_hfsplus_btree_iterate_node, store the value in RET and use
11639         it, because the iterator can be stopped by the last directory
11640         entry.
11642 2006-04-30  Marco Gerards  <marco@gnu.org>
11644         * include/grub/env.h (grub_env_export): New prototype.  Reported
11645         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11647 2006-04-30  Marco Gerards  <marco@gnu.org>
11649         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11650         size of the extents in a catalog file record.
11652 2006-04-29  Marco Gerards  <marco@gnu.org>
11654         * commands/configfile.c (grub_cmd_configfile): Execute the
11655         configfile within its own context.
11657         * include/grub/env.h (grub_env_context_open): New prototype.
11658         (grub_env_context_close): Likewise.
11660         * kern/env.c (grub_env): Removed.
11661         (grub_env_sorted): Likewise.
11662         (grub_env_context): New variable.
11663         (grub_env_var_context): Likewise.
11664         (grub_env_find): Search both the active context and the global
11665         context.
11666         (grub_env_context_open): New function.
11667         (grub_env_context_close): Likewise.
11668         (grub_env_insert): Likewise.
11669         (grub_env_remove): Likewise.
11670         (grub_env_export): Likewise.
11671         (grub_env_set): Changed to use helper functions to avoid code
11672         duplication.
11673         (grub_env_iterate): Rewritten so both the current context and the
11674         global context are being used.
11676         * normal/command.c (export_command): New function.
11677         (grub_command_init): Register the `export' function.
11679 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
11681         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11682         explicitly to suppress gcc's warnings.
11683         * fs/fat.c (grub_fat_find_dir): Likewise.
11684         (grub_fat_label): Likewise.
11685         * fs/xfs.c (grub_xfs_read_inode): Likewise.
11686         (grub_xfs_mount): Likewise.
11687         (grub_xfs_label): Likewise.
11688         * fs/affs.c (grub_affs_mount): Likewise.
11689         (grub_affs_label): Likewise.
11690         (grub_affs_iterate_dir): Likewise.
11691         * fs/sfs.c (grub_sfs_mount): Likewise.
11692         (grub_sfs_iterate_dir): Likewise.
11693         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11694         * fs/hfs.c (grub_hfs_mount): Likewise.
11695         (grub_hfs_cmp_catkeys): Likewise.
11696         (grub_hfs_find_dir): Likewise.
11697         (grub_hfs_dir): Likewise.
11698         (grub_hfs_label): Likewise.
11699         * fs/jfs.c (grub_jfs_mount): Likewise.
11700         (grub_jfs_opendir): Likewise.
11701         (grub_jfs_getent): Likewise.
11702         (grub_jfs_lookup_symlink): Likewise.
11703         (grub_jfs_label): Likewise.
11704         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11705         (grub_hfsplus_iterate_dir): Likewise.
11706         (grub_hfsplus_btree_iterate_node): Made static.
11708         * util/grub-emu.c (prefix): New variable.
11709         (grub_machine_set_prefix): New function.
11710         (main): Do not set the environment variable "prefix" here. Only
11711         set PREFIX, which is used later by grub_machine_set_prefix.
11713         * include/grub/video.h: Do not include grub/symbol.h.
11714         (grub_video_register): Not exported. This symbol is not defined in
11715         the kernel.
11716         (grub_video_unregister): Likewise.
11717         (grub_video_iterate): Likewise.
11718         (grub_video_setup): Likewise.
11719         (grub_video_restore): Likewise.
11720         (grub_video_get_info): Likewise.
11721         (grub_video_get_blit_format): Likewise.
11722         (grub_video_set_palette): Likewise.
11723         (grub_video_get_palette): Likewise.
11724         (grub_video_set_viewport): Likewise.
11725         (grub_video_get_viewport): Likewise.
11726         (grub_video_map_color): Likewise.
11727         (grub_video_map_rgb): Likewise.
11728         (grub_video_map_rgba): Likewise.
11729         (grub_video_fill_rect): Likewise.
11730         (grub_video_blit_glyph): Likewise.
11731         (grub_video_blit_bitmap): Likewise.
11732         (grub_video_blit_render_target): Likewise.
11733         (grub_video_scroll): Likewise.
11734         (grub_video_swap_buffers): Likewise.
11735         (grub_video_create_render_target): Likewise.
11736         (grub_video_delete_render_target): Likewise.
11737         (grub_video_set_active_render_target): Likewise.
11739         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11740         Undefined.
11741         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11743         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11744         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11745         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11746         instead of $(srcdir)/genkernsyms.sh.
11748         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11749         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11750         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11751         instead of $(srcdir)/genkernsyms.sh.
11753         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11754         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11755         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11756         instead of $(srcdir)/genkernsyms.sh.
11758         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11759         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11760         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11761         instead of $(srcdir)/genkernsyms.sh.
11763         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11764         genkernsyms.sh.
11766         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11767         genkernsyms.sh.
11768         (gensymlist.sh): New target.
11769         (genkernsyms.sh): Likewise.
11771         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11772         genkernsyms.sh.in and gensymlist.sh.in.
11774         * genkernsyms.sh: Removed.
11775         * gensymlist.sh: Likewise.
11777         * genkernsyms.sh.in: New file.
11778         * gensymlist.sh.in: Likewise.
11780 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11782         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11783         clobber "prefix", since we may have already set it manually.
11785 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
11787         * kern/misc.c (abort): New alias for grub_abort.
11789 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
11791         A new machine-specific function "grub_machine_set_prefix" is
11792         defined. This is called after loading modules, so that a prefix
11793         initialization can use modules. Also, this change adds an
11794         intensive debugging feature for the memory manager via the
11795         configure option "--enable-mm-debug".
11797         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11798         PART.LEN.
11800         * kern/sparc64/ieee1275/init.c (abort): Removed.
11801         (grub_stop): Likewise.
11802         (grub_exit): New function.
11803         (grub_set_prefix): Renamed to ...
11804         (grub_machine_set_prefix): ... this.
11805         (grub_machine_init): Do not call grub_set_prefix.
11807         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11808         (grub_machine_set_prefix): ... this.
11809         (grub_machine_init): Do not call grub_set_prefix.
11811         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11812         (grub_machine_init): Do not set the prefix here.
11814         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11816         * kern/efi/init.c: Include grub/mm.h.
11817         (grub_efi_set_prefix): New function.
11819         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11820         (grub_efi_get_filename): New function.
11821         (grub_print_device_path): Renamed to ...
11822         (grub_efi_print_device_path): ... this.
11824         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11825         [MM_DEBUG] (grub_realloc): Likewise.
11826         [MM_DEBUG] (grub_free): Likewise.
11827         [MM_DEBUG] (grub_memalign): Likewise.
11828         [MM_DEBUG] (grub_mm_debug): New variable.
11829         [MM_DEBUG] (grub_debug_malloc): New function.
11830         [MM_DEBUG] (grub_debug_free): New function.
11831         [MM_DEBUG] (grub_debug_realloc): New function.
11832         [MM_DEBUG] (grub_debug_memalign): New function.
11834         * kern/misc.c (grub_abort): Print a newline to distinguish
11835         the message.
11837         * kern/main.c (grub_main): Call grub_machine_set_prefix and
11838         grub_set_root_dev after loading modules. This is necessary when
11839         setting a prefix depends on modules.
11841         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11842         (grub_efi_print_device_path): ... this.
11843         (grub_efi_get_filename): New prototype.
11844         (grub_efi_set_prefix): Likewise.
11846         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11847         and grub/disk.h.
11848         (grub_efidisk_get_device_handle): New prototype.
11849         (grub_efidisk_get_device_name): Likewise.
11851         * include/grub/mm.h: Include config.h.
11852         (MM_DEBUG): Removed.
11853         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11854         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11855         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11856         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11857         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11858         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11859         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11860         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11861         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11863         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11865         * disk/efi/efidisk.c: Include grub/partition.h.
11866         (iterate_child_devices): New function.
11867         (add_device): First, compare only last device path nodes, so that
11868         devices are sorted by the types.
11869         (grub_efidisk_get_device_handle): New function.
11870         (grub_efidisk_get_device_name): Likewise.
11872         * configure.ac (--enable-mm-debug): New option to enable the
11873         memory manager debugging feature. This makes the binary much
11874         bigger, so is disabled by default.
11876 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
11878         Use grub_abort instead of grub_stop, and grub_exit must be
11879         define in each architecture now. Also, this change adds support
11880         for EFI disks.
11882         * util/i386/pc/grub-probefs.c: Include grub/term.h.
11883         (grub_getkey): New function.
11884         (grub_term_get_current): Likewise.
11886         * util/i386/pc/grub-setup.c: Include grub/term.h.
11887         (grub_getkey): New function.
11888         (grub_term_get_current): Likewise.
11890         * util/misc.c (grub_stop): Renamed to ...
11891         (grub_exit): ... this.
11893         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11894         (grub_exit): ... this.
11895         (grub_machine_init): Use grub_abort instead of abort.
11896         (grub_stop): Removed.
11898         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11899         abort.
11901         * kern/i386/pc/startup.S (grub_exit): New function.
11902         (cold_reboot): New label.
11904         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11905         (grub_efi_init): Call grub_efidisk_init.
11906         (grub_efi_fini): Call grub_efidisk_fini.
11908         * kern/efi/efi.c: Include grub/mm.h.
11909         (grub_efi_console_control_guid): Renamed to ...
11910         (console_control_guid): ... this.
11911         (grub_efi_loaded_image_guid): Renamed to ...
11912         (loaded_image_guid): ... this.
11913         (grub_efi_locate_handle): New function.
11914         (grub_efi_open_protocol): Likewise.
11915         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11916         GRUB_EFI_CONSOLE_CONTROL_GUID.
11917         (grub_efi_exit): Removed.
11918         (grub_stop): Likewise.
11919         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11920         (grub_exit): New function.
11921         (grub_print_device_path): Likewise.
11923         * kern/rescue.c (grub_rescue_cmd_exit): New function.
11924         (grub_enter_rescue_mode): Register "exit".
11926         * kern/misc.c (grub_real_dprintf): A cosmetic change.
11927         (grub_abort): New function.
11929         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11931         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11933         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11935         * include/grub/efi/efi.h (grub_efi_exit): Removed.
11936         (grub_print_device_path): New prototype.
11937         (grub_efi_locate_handle): Likewise.
11938         (grub_efi_open_protocol): Likewise.
11940         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11941         * disk/efi/efidisk.c: Likewise.
11943         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11945         * include/grub/efi/console_control.h
11946         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11948         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11949         last 8 bytes as an array.
11950         (GRUB_EFI_DISK_IO_GUID): New macro.
11951         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11952         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11953         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11954         grub_uint8_t.
11955         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11956         (struct grub_efi_device_path): Rename the member "sub_type" to
11957         "subtype".
11958         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11959         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11960         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11961         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11962         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11963         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11964         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11965         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11966         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11967         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11968         (struct grub_efi_pci_device_path): New structure.
11969         (grub_efi_pci_device_path_t): New type.
11970         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11971         (struct grub_efi_pccard_device_path): New structure.
11972         (grub_efi_pccard_device_path_t): New type.
11973         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11974         (struct grub_efi_memory_mapped_device_path): New structure.
11975         (grub_efi_memory_mapped_device_path_t): New type.
11976         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11977         (struct grub_efi_vendor_device_path): New structure.
11978         (grub_efi_vendor_device_path_t): New type.
11979         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11980         (struct grub_efi_controller_device_path): New structure.
11981         (grub_efi_controller_device_path_t): New type.
11982         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11983         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11984         (struct grub_efi_acpi_device_path): New structure.
11985         (grub_efi_acpi_device_path_t): New type.
11986         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11987         (struct grub_efi_expanded_acpi_device_path): New structure.
11988         (grub_efi_expanded_acpi_device_path_t): New type.
11989         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11990         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11991         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11992         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11993         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11994         (struct grub_efi_atapi_device_path): New structure.
11995         (grub_efi_atapi_device_path_t): New type.
11996         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11997         (struct grub_efi_fibre_channel_device_path): New structure.
11998         (grub_efi_fibre_channel_device_path_t): New type.
11999         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12000         (struct grub_efi_1394_device_path): New structure.
12001         (grub_efi_1394_device_path_t): New type.
12002         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12003         (struct grub_efi_usb_device_path): New structure.
12004         (grub_efi_usb_device_path_t): New type.
12005         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12006         (struct grub_efi_usb_class_device_path): New structure.
12007         (grub_efi_usb_class_device_path_t): New type.
12008         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12009         (struct grub_efi_i2o_device_path): New structure.
12010         (grub_efi_i2o_device_path_t): New type.
12011         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12012         (struct grub_efi_mac_address_device_path): New structure.
12013         (grub_efi_mac_address_device_path_t): New type.
12014         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12015         (struct grub_efi_ipv4_device_path): New structure.
12016         (grub_efi_ipv4_device_path_t): New type.
12017         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12018         (struct grub_efi_ipv6_device_path): New structure.
12019         (grub_efi_ipv6_device_path_t): New type.
12020         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12021         (struct grub_efi_infiniband_device_path): New structure.
12022         (grub_efi_infiniband_device_path_t): New type.
12023         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12024         (struct grub_efi_uart_device_path): New structure.
12025         (grub_efi_uart_device_path_t): New type.
12026         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12027         (struct grub_efi_vendor_messaging_device_path): New structure.
12028         (grub_efi_vendor_messaging_device_path_t): New type.
12029         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12030         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12031         (struct grub_efi_hard_drive_device_path): New structure.
12032         (grub_efi_hard_drive_device_path_t): New type.
12033         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12034         (struct grub_efi_cdrom_device_path): New structure.
12035         (grub_efi_cdrom_device_path_t): New type.
12036         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12037         (struct grub_efi_vendor_media_device_path): New structure.
12038         (grub_efi_vendor_media_device_path_t): New type.
12039         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12040         (struct grub_efi_file_path_device_path): New structure.
12041         (grub_efi_file_path_device_path_t): New type.
12042         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12043         (struct grub_efi_protocol_device_path): New structure.
12044         (grub_efi_protocol_device_path_t): New type.
12045         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12046         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12047         (struct grub_efi_bios_device_path): New structure.
12048         (grub_efi_bios_device_path_t): New type.
12049         (struct grub_efi_disk_io): New structure.
12050         (grub_efi_disk_io_t): New type.
12051         (struct grub_efi_block_io_media): New structure.
12052         (grub_efi_block_io_media_t): New type.
12053         (struct grub_efi_block_io): New structure.
12054         (grub_efi_block_io_t): New type.
12056         * include/grub/misc.h (grub_stop): Removed.
12057         (grub_exit): New prototype.
12058         (grub_abort): Likewise.
12060         * include/grub/disk.h (enum grub_disk_dev_id): Added
12061         GRUB_DISK_DEVICE_EFIDISK_ID.
12063         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12064         disk/efi/efidisk.c.
12065         (kernel_syms.lst): Remove the target if an error occurs.
12067 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12069         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12070         as it was simply too buggy.
12072 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12074         * kern/misc.c (grub_lltoa): New function.
12075         (grub_vsprintf): Added support for the long long suffix,
12076         i.e. "ll".
12078 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12080         * Makefile.in (LDFLAGS): Add variable.
12081         (LD): Remove variable.
12082         * configure.ac: Add -m32 to LDFLAGS.
12083         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12084         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12085         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12086         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12087         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12088         variables.
12089         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12090         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12091         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12093 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12095         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12096         length for unknown glyph.
12098 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12100         Add support for pre-loaded modules into the EFI port.
12102         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12103         completely. Accept one more argument DIR. The caller has changed.
12105         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12107         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12108         (grub_efi_loaded_image_guid): New variable.
12109         (grub_efi_get_loaded_image): New function.
12110         (grub_arch_modules_addr): Likewise.
12112         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12113         prototype.
12115         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12116         (struct grub_efi_loaded_image): New structure.
12117         (grub_efi_loaded_image_t): New type.
12119 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12121         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12122         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12123         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12125 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12127         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12129 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12131         * DISTLIST: Added include/grub/efi/console.h,
12132         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12133         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12135         * include/grub/efi/console.h: New file.
12136         * include/grub/efi/time.h: Likewise.
12137         * include/grub/i386/efi/kernel.h: Likewise.
12138         * kern/efi/init.c: Likewise.
12139         * kern/efi/mm.c: Likewise.
12140         * term/efi/console.c: Likewise.
12142         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12143         (grub_stop): Removed.
12144         (grub_get_rtc): Likewise.
12145         (grub_machine_init): Simply call grub_efi_init.
12146         (grub_machine_fini): Call grub_efi_fini.
12148         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12149         (grub_efi_output_string): Removed.
12150         (grub_efi_stall): New function.
12151         (grub_stop): Likewise.
12152         (grub_get_rtc): Likewise.
12154         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12155         (grub_efi_stall): New prototype.
12156         (grub_efi_allocate_pages): Likewise.
12157         (grub_efi_free_pages): Likewise.
12158         (grub_efi_get_memory_map): Likewise.
12159         (grub_efi_mm_init): Likewise.
12160         (grub_efi_mm_fini): Likewise.
12161         (grub_efi_init): Likewise.
12162         (grub_efi_fini): Likewise.
12164         * include/grub/i386/efi/time.h: Do not include
12165         grub/symbol.h. Include grub/efi/time.h.
12166         (GRUB_TICKS_PER_SECOND): Removed.
12167         (grub_get_rtc): Likewise.
12169         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12170         Added padding. The EFI spec is buggy.
12171         (GRUB_EFI_BLACK): New macro.
12172         (GRUB_EFI_BLUE): Likewise.
12173         (GRUB_EFI_GREEN): Likewise.
12174         (GRUB_EFI_CYAN): Likewise.
12175         (GRUB_EFI_RED): Likewise.
12176         (GRUB_EFI_MAGENTA): Likewise.
12177         (GRUB_EFI_BROWN): Likewise.
12178         (GRUB_EFI_LIGHTGRAY): Likewise.
12179         (GRUB_EFI_BRIGHT): Likewise.
12180         (GRUB_EFI_DARKGRAY): Likewise.
12181         (GRUB_EFI_LIGHTBLUE): Likewise.
12182         (GRUB_EFI_LIGHTGREEN): Likewise.
12183         (GRUB_EFI_LIGHTCYAN): Likewise.
12184         (GRUB_EFI_LIGHTRED): Likewise.
12185         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12186         (GRUB_EFI_YELLOW): Likewise.
12187         (GRUB_EFI_WHITE): Likewise.
12188         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12189         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12190         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12191         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12192         (GRUB_EFI_BACKGROUND_RED): Likewise.
12193         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12194         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12195         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12196         (GRUB_EFI_TEXT_ATTR): Likewise.
12198         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12199         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12200         (kernel_mod_HEADERS): Added efi/time.h.
12202 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12204         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12205         include/grub/efi/api.h, include/grub/efi/console_control.h,
12206         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12207         include/grub/i386/efi/time.h, kern/efi/efi.c,
12208         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12209         and util/i386/efi/grub-mkimage.c.
12211         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12213         * genmk.rb (PModule#rule): Do not export symbols if
12214         #{prefix}_EXPORTS is set to "no".
12216         * conf/i386-efi.mk: New file.
12217         * conf/i386-efi.rmk: Likewise.
12218         * include/grub/efi/api.h: Likewise.
12219         * include/grub/efi/console_control.h: Likewise.
12220         * include/grub/efi/efi.h: Likewise.
12221         * include/grub/efi/pe32.h: Likewise.
12222         * include/grub/i386/efi/time.h: Likewise.
12223         * kern/efi/efi.c: Likewise.
12224         * kern/i386/efi/init.c: Likewise.
12225         * kern/i386/efi/startup.S: Likewise.
12226         * util/i386/efi/grub-mkimage.c: Likewise.
12228 2006-04-17  Marco Gerards  <marco@gnu.org>
12230         * include/grub/script.h: Include <grub/parser.h> and
12231         "grub_script.tab.h".
12232         (struct grub_lexer_param): New struct.
12233         (struct grub_parser_param): Likewise.
12234         (grub_script_create_arglist): Pass the state in an argument.
12235         (grub_script_add_arglist): Likewise.
12236         (grub_script_create_cmdline): Likewise.
12237         (grub_script_create_cmdblock): Likewise.
12238         (grub_script_create_cmdif): Likewise.
12239         (grub_script_create_cmdmenu): Likewise.
12240         (grub_script_add_cmd): Likewise.
12241         (grub_script_arg_add): Likewise.
12242         (grub_script_lexer_ref): Likewise.
12243         (grub_script_lexer_deref): Likewise.
12244         (grub_script_lexer_record_start): Likewise.
12245         (grub_script_lexer_record_stop): Likewise.
12246         (grub_script_mem_record): Likewise.
12247         (grub_script_mem_record_stop): Likewise.
12248         (grub_script_malloc): Likewise.
12249         (grub_script_yylex): Likewise.
12250         (grub_script_yyparse): Likewise.
12251         (grub_script_yyerror): Likewise.
12252         (grub_script_yylex): Likewise.
12253         (grub_script_lexer_init): Return the state.
12255         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12256         (grub_script_lexer_done): Likewise.
12257         (grub_script_lexer_getline): Likewise.
12258         (grub_script_lexer_refs): Likewise.
12259         (script): Likewise.
12260         (newscript): Likewise.
12261         (record): Likewise.
12262         (recording): Likewise.
12263         (recordpos): Likewise.
12264         (recordlen): Likewise.
12265         (grub_script_lexer_init): Return the state instead of setting
12266         global variables.
12267         (grub_script_lexer_ref): Use the newly added argument for state
12268         instead of globals.
12269         (grub_script_lexer_deref): Likewise.
12270         (grub_script_lexer_record_start): Likewise.
12271         (grub_script_lexer_record_stop): Likewise.
12272         (recordchar): Likewise.
12273         (nextchar): Likewise.
12274         (grub_script_yylex2): Likewise.
12275         (grub_script_yylex): Likewise.
12276         (grub_script_yyerror): Likewise.
12278         * normal/parser.y (func_mem): Removed variable.
12279         (menu_entry): Likewise.
12280         (err): Likewise.
12281         (%lex-param): New parser option.
12282         (%parse-param): Likewise.
12283         (script): Always return the AST.
12284         (argument): Pass the state around.
12285         (arguments): Likewise.
12286         (grubcmd): Likewise.
12287         (commands): Likewise.
12288         (function): Likewise.
12289         (menuentry): Likewise.
12290         (if_statement): Likewise.
12291         (if): Likewise.
12293         * normal/script.c (grub_script_memused): Removed variable.
12294         (grub_script_parsed): Likewise.
12295         (grub_script_malloc): Added a state argument.  Use that instead of
12296         global variables.
12297         (grub_script_mem_record): Likewise.
12298         (grub_script_mem_record_stop): Likewise.
12299         (grub_script_arg_add): Likewise.
12300         (grub_script_add_arglist): Likewise.
12301         (grub_script_create_cmdline): Likewise.
12302         (grub_script_create_cmdif): Likewise.
12303         (grub_script_create_cmdmenu): Likewise.
12304         (grub_script_add_cmd): Likewise.
12305         (grub_script_parse): Setup the state before calling the parser.
12307 2006-04-16  Marco Gerards  <marco@gnu.org>
12309         * normal/command.c (grub_command_init): Remove the title command.
12311         * normal/lexer.c (grub_script_yylex): Renamed from this...
12312         (grub_script_yylex2): ... to this.
12313         (grub_script_yylex): New function.  Temporary
12314         introduced to filter some tokens.
12315         (grub_script_yyerror): Print a newline.
12317         * normal/main.c (read_config_file): Output information about the
12318         lines that contain errors.  Wait for a key after all lines have
12319         been processed.  Don't return an empty menu.
12321         * normal/parser.y (func_mem): Don't initialize.
12322         (menu_entry): Likewise.
12323         (err): New variable.
12324         (script): Don't return anything when an error was encountered.
12325         (ws, returns): Removed rules.
12326         (argument): Disabled concatenated variable support.
12327         (arguments): Remove explicit separators.
12328         (grubcmd): Likewise.
12329         (function): Likewise.
12330         (menuentry): Likewise.
12331         (if): Likewise.
12332         (commands): Likewise.  Add error handling.
12334         * normal/script.c (grub_script_create_cmdline): If
12335         `grub_script_parsed' is 0, assume the parser encountered an error.
12337 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12339         * configure.ac: Add support for EFI. Fix the typo
12340         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12342 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12344         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12345         foreign multibyte characters should be shown correctly.
12347 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12349         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12350         calculation.
12351         (read_config_file): Made it to close file before returning.
12353 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12355         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12356         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12357         video/i386/pc/vbefill.c.
12359         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12360         video/i386/pc/vbefill.c.
12362         * include/grub/video.h (grub_video_blit_format): New enum.
12363         (grub_video_mode_info): Added new member blit_format.
12364         (grub_video_get_blit_format): New function prototype.
12366         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12367         function prototype.
12368         (grub_video_vbe_map_rgb): Likewise.
12369         (grub_video_vbe_unmap_color): Likewise.
12371         * include/grub/i386/pc/vbeblit.h: New file.
12373         * include/grub/i386/pc/vbefill.h: New file.
12375         * video/video.c (grub_video_get_blit_format): New function.
12376         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12377         (grub_video_vbe_map_rgb): Likewise.
12378         (grub_video_vbe_unmap_color): Likewise.
12380         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12381         optimized fills.
12382         (grub_video_vbe_blit_render_target): Changed to use more optimized
12383         blits.
12384         (grub_video_vbe_setup): Added detection for optimized settings.
12385         (grub_video_vbe_create_render_target): Likewise.
12387         * video/i386/pc/vbeblit.c: New file.
12389         * video/i386/pc/vbefill.c: New file.
12391 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12393         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12394         here...
12396         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12397         parsing to support both hex and dec ranges.  If filename was missing
12398         show usage information.
12400 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12402         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12403         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12405         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12406         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12407         (video_mod_SOURCES): Added.
12408         (video_mod_CFLAGS): Likewise.
12409         (video_mod_LDFLAGS): Likewise.
12410         (gfxterm_mod_SOURCES): Likewise.
12411         (gfxterm_mod_CFLAGS): Likewise.
12412         (gfxterm_mod_LDFLAGS): Likewise.
12413         (videotest_mod_SOURCES): Likewise.
12414         (videotest_mod_CFLAGS): Likewise.
12415         (videotest_mod_LDFLAGS): Likewise.
12416         (vesafb_mod_SOURCES): Removed.
12417         (vesafb_mod_CFLAGS): Likewise.
12418         (vesafb_mod_LDFLAGS): Likewise.
12419         (vga_mod_SOURCES): Likewise.
12420         (vga_mod_CFLAGS): Likewise.
12421         (vga_mod_LDFLAGS): Likewise.
12423         * commands/videotest.c: New file.
12425         * font/manager.c (fill_with_default_glyph): Modified to use
12426         grub_font_glyph.
12427         (grub_font_get_glyph): Likewise.
12428         (fontmanager): Renamed from this...
12429         (font_manager): ... to this.
12431         * include/grub/font.h (grub_font_glyph): Added new structure.
12432         (grub_font_get_glyph): Modified to use grub_font_glyph.
12434         * include/grub/misc.h (grub_abs): Added as inline function.
12436         * include/grub/video.h: New file.
12438         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12439         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12440         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12441         (grub_vbe_get_controller_info): Renamed from this...
12442         (grub_vbe_bios_get_controller_info): ... to this.
12443         (grub_vbe_get_mode_info): Renamed from this...
12444         (grub_vbe_bios_get_mode_info): ... to this.
12445         (grub_vbe_set_mode): Renamed from this...
12446         (grub_vbe_bios_set_mode): ... to this.
12447         (grub_vbe_get_mode): Renamed from this...
12448         (grub_vbe_bios_get_mode): ... to this.
12449         (grub_vbe_set_memory_window): Renamed from this...
12450         (grub_vbe_bios_set_memory_window): ... to this.
12451         (grub_vbe_get_memory_window): Renamed from this...
12452         (grub_vbe_bios_get_memory_window): ... to this.
12453         (grub_vbe_set_scanline_length): Renamed from this...
12454         (grub_vbe_set_scanline_length): ... to this.
12455         (grub_vbe_get_scanline_length): Renamed from this...
12456         (grub_vbe_bios_get_scanline_length): ... to this.
12457         (grub_vbe_set_display_start): Renamed from this...
12458         (grub_vbe_bios_set_display_start): ... to this.
12459         (grub_vbe_get_display_start): Renamed from this...
12460         (grub_vbe_bios_get_display_start): ... to this.
12461         (grub_vbe_set_palette_data): Renamed from this...
12462         (grub_vbe_bios_set_palette_data): ... to this.
12463         (grub_vbe_set_pixel_rgb): Removed.
12464         (grub_vbe_set_pixel_index): Likewise.
12466         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12467         from this...
12468         (grub_vbe_bios_get_controller_info): ... to this.
12469         (grub_vbe_get_mode_info): Renamed from this...
12470         (grub_vbe_bios_get_mode_info): ... to this.
12471         (grub_vbe_set_mode): Renamed from this...
12472         (grub_vbe_bios_set_mode): ... to this.
12473         (grub_vbe_get_mode): Renamed from this...
12474         (grub_vbe_bios_get_mode): ... to this.
12475         (grub_vbe_set_memory_window): Renamed from this...
12476         (grub_vbe_bios_set_memory_window): ... to this.
12477         (grub_vbe_get_memory_window): Renamed from this...
12478         (grub_vbe_bios_get_memory_window): ... to this.
12479         (grub_vbe_set_scanline_length): Renamed from this...
12480         (grub_vbe_set_scanline_length): ... to this.
12481         (grub_vbe_get_scanline_length): Renamed from this...
12482         (grub_vbe_bios_get_scanline_length): ... to this.
12483         (grub_vbe_set_display_start): Renamed from this...
12484         (grub_vbe_bios_set_display_start): ... to this.
12485         (grub_vbe_get_display_start): Renamed from this...
12486         (grub_vbe_bios_get_display_start): ... to this.
12487         (grub_vbe_set_palette_data): Renamed from this...
12488         (grub_vbe_bios_set_palette_data): ... to this.
12489         (grub_vbe_bios_get_controller_info): Fixed problem with registers
12490         getting corrupted after calling it.  Added more pushes and pops.
12491         (grub_vbe_bios_set_mode): Likewise.
12492         (grub_vbe_bios_get_mode): Likewise.
12493         (grub_vbe_bios_get_memory_window): Likewise.
12494         (grub_vbe_bios_set_scanline_length): Likewise.
12495         (grub_vbe_bios_get_scanline_length): Likewise.
12496         (grub_vbe_bios_get_display_start): Likewise.
12497         (grub_vbe_bios_set_palette_data): Likewise.
12499         * normal/cmdline.c (cl_set_pos): Refresh the screen.
12500         (cl_insert): Likewise.
12501         (cl_delete): Likewise.
12503         * term/gfxterm.c: New file.
12505         * term/i386/pc/vesafb.c: Removed file.
12507         * video/video.c: New file.
12509         * video/i386/pc/vbe.c (real2pm): Added new function.
12510         (grub_video_vbe_draw_pixel): Likewise.
12511         (grub_video_vbe_get_video_ptr): Likewise.
12512         (grub_video_vbe_get_pixel): Likewise
12513         (grub_video_vbe_init): Likewise.
12514         (grub_video_vbe_fini): Likewise.
12515         (grub_video_vbe_setup): Likewise.
12516         (grub_video_vbe_get_info): Likewise.
12517         (grub_video_vbe_set_palette): Likewise.
12518         (grub_video_vbe_get_palette): Likewise.
12519         (grub_video_vbe_set_viewport): Likewise.
12520         (grub_video_vbe_get_viewport): Likewise.
12521         (grub_video_vbe_map_color): Likewise.
12522         (grub_video_vbe_map_rgb): Likewise.
12523         (grub_video_vbe_map_rgba): Likewise.
12524         (grub_video_vbe_unmap_color): Likewise.
12525         (grub_video_vbe_fill_rect): Likewise.
12526         (grub_video_vbe_blit_glyph): Likewise.
12527         (grub_video_vbe_blit_bitmap): Likewise.
12528         (grub_video_vbe_blit_render_target): Likewise.
12529         (grub_video_vbe_scroll): Likewise.
12530         (grub_video_vbe_swap_buffers): Likewise.
12531         (grub_video_vbe_create_render_target): Likewise.
12532         (grub_video_vbe_delete_render_target): Likewise.
12533         (grub_video_vbe_set_active_render_target): Likewise.
12534         (grub_vbe_set_pixel_rgb): Remove function.
12535         (grub_vbe_set_pixel_index): Likewise.
12536         (index_color_mode): Remove static variable.
12537         (active_mode): Likewise.
12538         (framebuffer): Likewise.
12539         (bytes_per_scan_line): Likewise.
12540         (grub_video_vbe_adapter): Added new static variable.
12541         (framebuffer): Likewise.
12542         (render_target): Likewise.
12543         (initial_mode): Likewise.
12544         (mode_in_use): Likewise.
12545         (mode_list): Likewise.
12547 2006-03-10  Marco Gerards  <marco@gnu.org>
12549         * configure.ac (AC_INIT): Bumped to 1.93.
12551         * DISTLIST: Added `include/grub/hfs.h'.
12553 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
12555         * boot/i386/pc/boot.S (general_error): Before looping, try INT
12556         18H, which might help the BIOS falling back to next boot media.
12558 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
12560         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12561         Poe Chen <poe.poechen@gmail.com>.
12563 2006-01-17  Marco Gerards  <marco@gnu.org>
12565         * include/grub/normal.h: Include <grub/script.h>.
12566         (grub_command_list): Removed struct.
12567         (grub_command_list_t): Removed type.
12568         (grub_menu_entry): Remove members `num' and `command_list'.  Add
12569         members `commands' and `sourcecode'.
12570         * include/grub/script.h: Add inclusion guards.
12571         (grub_script_cmd_menuentry): New struct.
12572         (grub_script_execute_menuentry): New prototype.
12573         (grub_script_lexer_record_start): Likewise.
12574         (grub_script_lexer_record_stop): Likewise.
12575         * normal/execute.c (grub_script_execute_menuentry): New function.
12576         * normal/lexer.c (record, recording, recordpos, recordlen): New
12577         variables.
12578         (grub_script_lexer_record_start): New function.
12579         (grub_script_lexer_record_stop): Likewise.
12580         (recordchar): Likewise.
12581         (nextchar): Likewise.
12582         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
12583         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
12584         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12585         (current_menu): New variable.
12586         (free_menu): Mainly rewritten.
12587         (grub_normal_menu_addentry): New function.
12588         (read_config_file): Rewritten.
12589         * normal/menu.c (run_menu_entry): Mainly rewritten.
12590         * normal/menu_entry.c (make_screen): Rewritten the code to insert
12591         the menu entry.
12592         (run): Mainly rewritten.
12593         * normal/parser.y (menu_entry): New variable.
12594         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12595         (menuentry): New rule.
12596         (command): Add `menuentry'.
12597         (if_statement): Allow additional returns before `fi'.
12598         * normal/script.c (grub_script_create_cmdmenu): New function.
12600 2006-01-03  Marco Gerards  <marco@gnu.org>
12602         * INSTALL: GNU Bison is required.
12603         * configure.ac: Rewritten the test to detect Bison.
12604         * Makefile.in (YACC): New variable.  Reported by Xun Sun
12605         <xun.sun.cn@gmail.com>.
12607 2006-01-03  Marco Gerards  <marco@gnu.org>
12609         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12610         the HFS+ filesystem to filesystem blocks.
12611         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12612         GCC warning is silenced.
12614 2006-01-03  Marco Gerards  <marco@gnu.org>
12616         * partmap/apple.c (apple_partition_map_iterate): Convert the data
12617         read from disk from big endian to host byte order.
12619 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
12621         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
12622         documentation.
12623         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12624         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12625         embedded HFS+ filesystem.
12626         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12627         (grub_hfs_sblock): Move from here...
12628         * include/grub/hfs.h: To here...  New file.
12629         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
12630         documentation.
12631         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12632         New macros.
12633         (grub_hfsplus_volheader): Change type of member `magic' to
12634         `grub_uint16_t'.
12635         (grub_hfsplus_data): Add new member `embedded_offset'.
12636         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12637         returned block.
12638         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12639         Calculate the offset.
12641 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12643         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12644         Removed.
12645         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12647 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12649         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12650         ENV->NAME is NULL after allocating ENV->VALUE.
12652 2005-12-25  Marco Gerards  <marco@gnu.org>
12654         * kern/env.c (grub_env_set): Rewritten the error handling code.
12656 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12658         * geninit.sh: Made more robust, and more portable.
12660 2005-12-25  Marco Gerards  <marco@gnu.org>
12662         Add support for Apple HFS+ filesystems.
12664         * fs/hfsplus.c: New file.
12666         * DISTLIST: Added `fs/hfsplus.c'.
12668         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12669         (hfsplus_mod_SOURCES): New variable.
12670         (hfsplus_mod_CFLAGS): Likewise.
12671         (hfsplus_mod_LDFLAGS): Likewise.
12672         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12673         (grub_setup_SOURCES): Likewise.
12674         (grub_mkdevicemap_SOURCES): Likewise.
12675         (grub_emu_SOURCES): Likewise.
12676         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12678         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12680         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12682 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
12684         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12685         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12686         include/grub/parser.h, include/grub/script.h, kern/parser.c,
12687         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12688         normal/lexer.c, normal/parser.y, normal/script.c, and
12689         partmap/gpt.c.
12690         Removed kern/sparc64/cache.c.
12692         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12693         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12694         grub_emu_init.c.
12696         * configure.ac (AC_INIT): Bumped to 1.92.
12698 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
12700         * kern/err.c (grub_error_push): Added new function to support error
12701         stacks.
12702         (grub_error_pop): Likewise.
12703         (grub_error_stack_items): New local variable to support error stacks.
12704         (grub_error_stack_pos): Likewise.
12705         (grub_error_stack_assert): Likewise.
12706         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12707         stack depth.
12708         (grub_print_error): Added support to print errors from error stack.
12710         * include/grub/err.h (grub_error_push): Added function prototype.
12711         (grub_error_pop): Likewise.
12713 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
12715         * configure.ac: Accept `powerpc64' as host_cpu.
12716         (amd64): Rename to `biarch32'.
12718         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12719         non-cacheline-aligned addresses.
12721         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12722         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
12723         if `size' is non-zero.
12725 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
12727         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12728         and `cd' to make sure the filename is not prefixed with a
12729         directory name.
12730         (pkgdata_MODULES): Add `gpt.mod'.
12731         (gpt_mod_SOURCES): New variable.
12732         (gpt_mod_CFLAGS): Likewise.
12733         (gpt_mod_LDFLAGS): Likewise.
12735         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12737         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12738         New macro.
12740         * partmap/gpt.c: New file.
12742         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12743         GPT partition map is detected.
12745 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
12747         * commands/i386/pc/play.c: New file.
12748         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12749         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12750         macros.
12752 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
12754         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12755         ((unused))' to silence gcc warning.
12757 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
12759         * configure.ac: Correct `AC_PROG_YACC' test.
12761 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12763         * util/powerpc/ieee1275/grub-install.in: Run the mount point
12764         check before installing files.
12766 2005-11-22  Mike Small  <smallm@panix.com>
12768         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12769         number regex so multidigit numbers are recognized correctly.
12771 2005-11-22  Mike Small  <smallm@panix.com>
12773         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12774         debugging message before attempting to claim memory.
12775         (grub_rescue_cmd_initrd): Add a claim debugging message and try
12776         multiple addresses in case of failure.
12778 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12780         * term/tparm.c (get_space): Remove empty `if' statement.
12782         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12784         * kern/parser.c (check_varstate): Rename `state' to 's'.
12786 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12788         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
12789         variable definitions to the beginning of each function.  Sort stack
12790         variables by size.
12791         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
12792         `buf' argument to `char *'.
12794 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
12796         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12797         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12798         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12799         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12800         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12801         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12802         configfile.mod, search.mod, gzio.mod and test.mod.
12803         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12804         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12805         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12806         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12807         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12808         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12809         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12810         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12811         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12812         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12813         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12814         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12815         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12816         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12817         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12818         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12819         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12820         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12821         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12822         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12823         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12824         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12825         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12827         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12828         `grep --include'.
12829         (pkgdata_MODULES): Add test.mod.
12831 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12833         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
12834         appending to variables with "+=".
12835         (PModule): Use full pathname to generate *.lst filenames.
12837         * Makefile.in: Fixed list rules moved from genmk.rb.
12838         (.DELETE_ON_ERROR): New special target.
12839         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12841         * conf/i386-pc.rmk: Include conf/common.mk.
12842         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12843         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12844         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12845         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12846         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12847         configfile.mod, search.mod, gzio.mod and test.mod.
12848         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12849         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12850         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12851         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12852         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12853         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12854         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12855         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12856         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12857         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12858         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12859         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12860         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12861         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12862         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12863         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12864         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12865         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12866         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12867         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12868         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12869         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12870         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12871         here...
12872         * conf/common.rmk: ... to here.  New file.
12874         * conf/common.mk: New file.
12876 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
12878         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12879         (grub_script.tab.c): ... here.
12881         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12882         (grub_script.tab.c): ... here.
12884         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12885         (grub_script.tab.c): ... here.
12887         * normal/command.c (grub_command_find): Fixed a memory leak of
12888         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12890 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12892         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12893         "@" which marks the start of a comment on ARM.
12894         (VARIABLE): Likewise.
12896 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12898         Add support for Linux/ADFS partition tables.
12900         * partmap/acorn.c: New file.
12902         * include/grub/acorn_filecore.h: Likewise.
12904         * DISTLIST: Added `partmap/acorn.c' and
12905         `include/grub/acorn_filecore.h'.
12907         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12908         `partmap/acorn.c'.
12909         (pkgdata_MODULES): Add `acorn.mod'.
12910         (acorn_mod_SOURCES): New variable.
12911         (acorn_mod_CFLAGS): Likewise.
12913         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12914         `partmap/acorn.c'.
12915         (pkgdata_MODULES): Add `acorn.mod'.
12916         (acorn_mod_SOURCES): New variable.
12917         (acorn_mod_CFLAGS): Likewise.
12919         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12920         (pkgdata_MODULES): Add `acorn.mod'.
12921         (acorn_mod_SOURCES): New variable.
12922         (acorn_mod_CFLAGS): Likewise.
12923         (acorn_mod_LDFLAGS): Likewise.
12925         * include/types.h (grub_disk_addr_t): New typedef.
12927 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
12929         * geninit.sh: New file.
12931         * geninitheader.sh: Likewise.
12933         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12934         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12935         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12936         * commands/configfile.c (grub_configfile_init)
12937         (grub_configfile_fini): Likewise.
12938         * commands/default.c (grub_default_init, grub_default_fini):
12939         Likewise.
12940         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12941         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12942         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12943         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12944         Likewise.
12945         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12946         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12947         Likewise.
12948         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12949         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12950         Likewise.
12951         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12952         Likewise.
12953         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12954         Likewise.
12955         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12956         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12957         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12958         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12959         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12960         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12961         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12962         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12963         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12964         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12965         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12966         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12967         * partmap/amiga.c (grub_amiga_partition_map_init)
12968         (grub_amiga_partition_map_fini): Likewise.
12969         * partmap/apple.c (grub_apple_partition_map_init)
12970         (grub_apple_partition_map_fini): Likewise.
12971         * partmap/pc.c (grub_pc_partition_map_init)
12972         (grub_pc_partition_map_fini): Likewise.
12973         * partmap/sun.c (grub_sun_partition_map_init,
12974         grub_sun_partition_map_fini): Likewise.
12975         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12976         Likewise.
12978         * util/grub-emu.c: Include <grub_modules_init.h>.
12979         (main): Don't initialize and de-initialize any modules directly,
12980         use `grub_init_all' and `grub_fini_all' instead.
12982         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12983         `grub_vesafb_mod_init'.
12984         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
12985         all users.
12986         * term/i386/pc/vga.c (grub_vga_init): Renamed to
12987         `grub_vga_mod_init'.  Updated all users.
12988         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12990         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12991         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12992         rules.
12994         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12995         Generate a function to initialize the module in utilities.
12996         Updated all callers.
12997         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
12998         initialize the module in utilities.  Updated all callers.
13000 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13002         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13003         escape sequence and a literal ^L to clear the screen.
13005         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13006         when returning from Open Firmware.
13008 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13010         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13011         (grub_ofconsole_height): Likewise.
13012         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13013         manually insert a '\n'.
13014         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13015         `grub_ofconsole_height'.  Return early if these are already set.
13017 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13019         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13020         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13021         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13022         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13023         and `normal/script.c'.
13024         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13025         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13026         (test_mod_SOURCES): New variable.
13027         (test_mod_CFLAGS): Likewise.
13028         (test_mod_LDFLAGS): Likewise.
13029         (pkgdata_MODULES): Add `test.mod'.
13030         (grub_script.tab.c): New rule.
13031         (grub_script.tab.h): Likewise.
13033 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13035         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13036         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13037         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13038         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13039         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13040         (test_mod_SOURCES): New variable.
13041         (test_mod_CFLAGS): Likewise.
13042         (pkgdata_MODULES): Add `test.mod'.
13043         (grub_script.tab.c): New rule.
13044         (grub_script.tab.h): Likewise.
13046 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13048         Add initial scripting support.
13050         * commands/test.c: New file.
13051         * include/grub/script.h: Likewise.
13052         * normal/execute.c: Likewise.
13053         * normal/function.c: Likewise.
13054         * normal/lexer.c: Likewise.
13055         * normal/parser.y: Likewise.
13056         * normal/script.c: Likewise.
13058         * configure.ac: Add `AC_PROG_YACC' test.
13060         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13061         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13062         `normal/function.c' and `normal/script.c'.
13063         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13064         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13065         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13066         variables.
13067         (pkgdata_MODULES): Add `test.mod'.
13068         (grub_script.tab.c): New rule.
13069         (grub_script.tab.h): Likewise.
13071         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13073         * include/grub/normal.h (grub_test_init): New prototype.
13074         (grub_test_fini): Likewise.
13076         * normal/command.c: Include <grub/script.h>.
13077         (grub_command_execute): Rewritten.
13079         * util/grub-emu.c (main): Call `grub_test_init' and
13080         `grub_test_fini'.
13082 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13084         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13085         to 0.
13086         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13087         there are no pending characters.
13089 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13091         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13092         `grub_strndup' to drop device arguments. Replace unnecessary
13093         `grub_strndup' with `grub_strdup'.
13095 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13097         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13098         `debug' environment variable has been set.
13100 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13102         * Makefile.in (install-local): Use $(DATA).
13103         (uninstall): Likewise.
13104         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13105         (sbin_UTILITIES): ... to here.
13106         (sbin_SCRIPTS): New variable.
13107         (grub_install_SOURCES): New variable.
13108         * util/powerpc/ieee1275/grub-install.in: New file.
13109         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13110         variable.
13111         (add_segments): Call `grub_util_get_path'.
13113 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13115         From Timothy Baldwin:
13116         * commands/ls.c (grub_ls_list_files): Close FILE with
13117         grub_file_close.
13118         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13120 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13122         * include/grub/parser.h: New file.
13124         * kern/parser.c: Likewise.
13126         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13127         (grub_setup_SOURCES): Likewise.
13128         (grub_probefs_SOURCES): Likewise.
13129         (grub_emu_SOURCES): Likewise.
13130         (kernel_img_HEADERS): Add `parser.h'.
13132         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13133         (grub_emu_SOURCES): Add `kern/parser.c'.
13134         (grubof_SOURCES): Likewise.
13136         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13137         (grubof_SOURCES): Add `kern/parser.c'.
13139         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13141         * kern/misc.c (grub_split_cmdline): Removed function.
13143         * kern/rescue.c: Include <grub/parser.h>.
13144         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13145         of `grub_split_cmdline'.
13147         * normal/command.c: Include <grub/parser.h>.
13148         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13149         of `grub_split_cmdline'.
13151         * normal/completion.c: Include <grub/parser.h>.
13152         (cmdline_state): New variable.
13153         (iterate_dir): End the filename with a quote depending on the
13154         command line state.
13155         (get_state): new function.
13156         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13157         split the arguments and determine the current argument.  When the
13158         argument string is not quoted, escape all spaces.
13160 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13162         * normal/sparc64/setjmp.S: New file.
13164 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13166         * include/grub/sparc64/libgcc.h: New file.
13167         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13168         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13169         normal/sparc64/setjmp.c.
13171 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13173         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13174         * kern/sparc64/cache.S: New file.
13175         * kern/sparc64/cache.c: Removed.
13176         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13177         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13178         -mtune=ultrasparc.
13179         (COMMON_LDFLAGS): Add -melf64_sparc.
13180         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13181         (grubof_SOURCES): Use cache.S instead of cache.c.
13182         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13183         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13184         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13185         commented though.
13186         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13187         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13188         (linux_mod_CFLAGS): Commented out.
13189         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13190         out because module isn't built.
13191         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13192         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13193         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13194         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13195         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13196         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13197         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13198         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13199         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13200         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13201         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13202         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13203         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13204         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13206 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13208         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13209         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13210         longer, because HFS should not be used on PC.
13212 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13214         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13215         consistently within the loop.
13217 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13219         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13220         directory can not be read.
13222 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13224         * configure.ac (AC_INIT): Increase the version number to 1.91.
13226         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13227         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13228         term/i386/pc/serial.c.
13230 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13232         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13233         file size must be permitted.
13235         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13236         between %ah and %al.
13238 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13240         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13241         grub_uint64_t.
13242         Call the hook with a NUL-terminated filename.
13243         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13244         grub_cpu_to_be32.
13246         * kern/term.c (cursor_state): New variable.
13247         (grub_term_set_current): Reset the cursor state on a new
13248         terminal.
13249         (grub_setcursor): Rewritten to use CURSOR_STATE.
13250         (grub_getcursor): New function.
13252         * include/grub/term.h (grub_getcursor): New prototype.
13254         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13255         integers on ARM. Reported by Timothy Baldwin
13256         <T.E.Baldwin99@members.leeds.ac.uk>.
13258 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13260         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13261         allocated.
13262         (grub_sfs_dir): Likewise.
13264 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13266         Add support for the SFS filesystem.
13268         * fs/sfs.c: New file.
13270         * DISTLIST: Added `fs/sfs.c'.
13272         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13273         (grub_probefs_SOURCES): Likewise.
13274         (grub_emu_SOURCES): Likewise.
13275         (pkgdata_MODULES): Add `sfs.mod'.
13276         (sfs_mod_SOURCES): New variable.
13277         (sfs_mod_CFLAGS): Likewise.
13278         (sfs_mod_LDFLAGS): Likewise.
13280         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13281         (pkgdata_MODULES): Add `sfs.mod'.
13282         (sfs_mod_SOURCES): New variable.
13283         (sfs_mod_CFLAGS): Likewise.
13285         * util/grub-emu.c (main): Call `grub_sfs_init' and
13286         `grub_sfs_fini'.
13288         * include/grub/fs.h (grub_sfs_init): New prototype.
13289         (grub_sfs_fini): Likewise.
13291 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13293         Add support for the AFFS filesystem.
13295         * fs/affs.c: New file.
13297         * DISTLIST: Added `fs/affs.c'.
13299         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13300         (grub_probefs_SOURCES): Likewise.
13301         (grub_emu_SOURCES): Likewise.
13302         (pkgdata_MODULES): Add `affs.mod'.
13303         (affs_mod_SOURCES): New variable.
13304         (affs_mod_CFLAGS): Likewise.
13305         (affs_mod_LDFLAGS): Likewise.
13307         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13308         (pkgdata_MODULES): Add `affs.mod'.
13309         (affs_mod_SOURCES): New variable.
13310         (affs_mod_CFLAGS): Likewise.
13312         * util/grub-emu.c (main): Call `grub_affs_init' and
13313         `grub_affs_fini'.
13315         * include/grub/fs.h (grub_affs_init): New prototype.
13316         (grub_affs_fini): Likewise.
13318 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13320         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13322 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13324         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13325         `-m32' to CFLAGS.
13327         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13328         linking.
13330         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13331         (COMMON_LDFLAGS): New variable.
13332         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13333         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13334         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13335         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13336         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13337         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13338         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13339         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13340         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13341         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13342         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13343         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13344         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13345         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13346         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13347         variables.
13348         (normal_mod_ASFLAGS): Add `-m32'.
13350         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13351         (grub_host_size_t, grub_host_ssize_t): New types.
13352         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13353         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13354         `GRUB_HOST_SIZEOF_VOID_P'.
13356         * include/grub/kernel.h (struct grub_module_header): Type of
13357         member offset changed to `grub_host_off_t'.  Type of member size
13358         changed to `grub_host_size_t'.
13359         (struct grub_module_info): Type of member offset changed to
13360         `grub_host_off_t'.  Type of member size changed to
13361         `grub_host_size_t'.
13363 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13365         Make GRUB's kernel compliant to Multiboot Specification.
13367         * kern/i386/pc/startup.S (multiboot_header): New label.
13368         (multiboot_entry): Likewise.
13369         (multiboot_trampoline): Likewise.
13371         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13372         Increased to 0x4A0.
13374         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13375         put parentheses after a question mark.
13376         [!GRUB_UTIL] (my_mod): New variable.
13378         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13380 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13382         Adds support for the XFS filesystem.  Btrees are not supported
13383         yet.
13385         * fs/xfs.c: New file.
13387         * DISTLIST: Added `fs/xfs.c'.
13389         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13390         (grub_probefs_SOURCES): Likewise.
13391         (grub_emu_SOURCES): Likewise.
13392         (pkgdata_MODULES): Add `xfs.mod'.
13393         (xfs_mod_SOURCES): New variable.
13394         (xfs_mod_CFLAGS): Likewise.
13396         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13397         (pkgdata_MODULES): Add `xfs.mod'.
13398         (xfs_mod_SOURCES): New variable.
13399         (xfs_mod_CFLAGS): Likewise.
13401         * util/grub-emu.c (main): Call `grub_xfs_init' and
13402         `grub_xfs_fini'.
13404         * include/grub/fs.h (grub_xfs_init): New prototype.
13405         (grub_xfs_fini): Likewise.
13408 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13410         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13411         color modes, allow greater than 16 colors to be configured as
13412         a default palette.
13414 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13416         * normal/completion.c (complete_arguments): Add the qualifier
13417         const into OPTIONS.
13419         From Omniflux <omniflux+lists@omniflux.com>:
13420         * include/grub/terminfo.h: New file.
13421         * include/grub/tparm.h: Likewise.
13422         * include/grub/i386/pc/serial.h: Likewise.
13423         * term/terminfo.c: Likewise.
13424         * term/tparm.c: Likewise.
13425         * term/i386/pc/serial.c: Likewise.
13426         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13427         serial.mod.
13428         (terminfo_mod_SOURCES): New variable.
13429         (terminfo_mod_CFLAGS): Likewise.
13430         (serial_mod_SOURCES): Likewise.
13431         (serial_mod_CFLAGS): Likewise.
13433 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
13435         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13436         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13437         and kern/powerpc/ieee1275/cmain.c, respectively.
13439         * boot/powerpc/ieee1275/crt0.S: Moved to ...
13440         * kern/powerpc/ieee1275/crt0.S: ... here.
13442         * boot/powerpc/ieee1275/cmain.c: Moved to ...
13443         * kern/powerpc/ieee1275/cmain.c: ... here.
13445         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13446         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13447         instead of boot/powerpc/ieee1275/crt0.S and
13448         boot/powerpc/ieee1275/cmain.c, respectively.
13450         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13451         sectors. It was not used anyway.
13453 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13455         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13456         `unused parameter' warning.
13458 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
13460         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13461         function.
13462         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13463         getcharwidth.
13465 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
13467         * include/grub/normal.h (enum grub_completion_type): Added
13468         `GRUB_COMPLETION_TYPE_ARGUMENT'.
13470         * normal/cmdline.c (print_completion): Handle
13471         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13472         * normal/menu_entry.c (store_completion): Likewise.
13474         * normal/completion.c (complete_arguments): New function.
13475         (grub_normal_do_completion): Call `complete_arguments' when the
13476         current words start with a dash.
13478 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
13480         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13481         `gzio.mod' instead of `io.mod').
13483 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
13485         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13486         (DISTDIRS): Added io and video.
13487         Rewrite the search routine to make an output consistently.
13489         * DISTLIST: Added conf/sparc64-ieee1275.mk,
13490         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13491         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13492         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13493         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13494         util/powerpc/ieee1275/misc.c.
13496         * include/grub/gzio.h: New file.
13497         * io/gzio.c: Likewise.
13499         * kern/file.c (grub_file_close): Call grub_device_close only if
13500         FILE->DEVICE is not NULL.
13502         * include/grub/mm.h [!NULL] (NULL): New macro.
13504         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13506         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13507         (pkgdata_MODULES): Added gzio.mod.
13508         (gzio_mod_SOURCES): New variable.
13509         (gzio_mod_CFLAGS): Likewise.
13511         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13512         (pkgdata_MODULES): Added gzio.mod.
13513         (gzio_mod_SOURCES): New variable.
13514         (gzio_mod_CFLAGS): Likewise.
13516         * commands/cat.c: Include grub/gzio.h.
13517         (grub_cmd_cat): Use grub_gzfile_open instead of
13518         grub_file_open.
13520         * commands/cmp.c: Include grub/gzio.h.
13521         (grub_cmd_cmp): Use grub_gzfile_open instead of
13522         grub_file_open.
13524         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13525         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13526         grub_file_open.
13527         (grub_rescue_cmd_module): Likewise.
13529 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13531         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13532         kern/sparc64/ieee1275/init.c because it contains _start.
13533         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13535 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13537         * configure.ac: Add support for sparc64 host with ieee1275
13538         firmware.
13539         * configure: Generated from configure.ac.
13540         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13541         instead of int.
13542         (grub_ofdisk_read): Likewise.
13543         (grub_ofdisk_open): Use %p to print pointer values, and cast the
13544         pointers as (void *) to remove a warning.
13545         (grub_ofdisk_close): Likewise.
13546         (grub_ofdisk_read): Likewise.
13547         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13548         returns, so make it return void to remove a warning.
13549         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13550         Corresponding prototype change.
13551         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13552         values, and cast the pointers as (void *) to remove a warning.
13553         (grub_mm_dump): Likewise.
13554         * conf/sparc64-ieee1275.mk: New file.
13555         * conf/sparc64-ieee1275.rmk: Likewise.
13556         * include/grub/sparc64/setjmp.h: Likewise.
13557         * include/grub/sparc64/types.h: Likewise.
13558         * include/grub/sparc64/ieee1275/console.h: Likewise.
13559         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13560         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13561         * include/grub/sparc64/ieee1275/time.h: Likewise.
13562         * kern/sparc64/cache.c: Likewise.
13563         * kern/sparc64/dl.c: Likewise.
13564         * kern/sparc64/ieee1275/init.c: Likewise.
13565         * kern/sparc64/ieee1275/openfw.c: Likewise.
13567 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
13569         * util/console.c (grub_ncurses_putchar): If C is greater than
13570         0x7f, set C to a question mark.
13571         (grub_ncurses_getcharwidth): New function.
13572         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13573         getcharwidth.
13575         * normal/menu.c (print_entry): Made aware of Unicode. First,
13576         convert TITLE to UCS-4, and predict the cursor position by
13577         grub_getcharwidth.
13579         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13580         const to SRC.
13581         * kern/misc.c (grub_utf16_to_utf8): Likewise.
13583 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13585         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13586         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13587         grub_strcat.
13589         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13590         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13591         grub_strcpy and grub_strlen. Take it into account that a space
13592         character is inserted as a delimiter.
13594 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13596         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13597         invalid magic in the error.
13599         * commands/search.c: New file.
13601         * util/grub-emu.c (main): Call grub_search_init and
13602         grub_search_fini.
13604         * kern/rescue.c (grub_rescue_print_disks): Removed.
13605         (grub_rescue_print_devices): New function.
13606         (grub_rescue_cmd_ls): Use grub_device_iterate with
13607         grub_rescue_print_devices instead of grub_disk_dev_iterate with
13608         grub_rescue_print_disks.
13610         * kern/partition.c (grub_partition_iterate): Return the result of
13611         PARTMAP->ITERATE instead of GRUB_ERRNO.
13613         * kern/device.c: Include grub/partition.h.
13614         (grub_device_iterate): New function.
13616         * include/grub/partition.h (grub_partition_iterate): Return int
13617         instead of grub_err_t.
13619         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13620         prototype.
13621         [GRUB_UTIL] (grub_search_fini): Likewise.
13623         * include/grub/device.h (grub_device_iterate): New prototype.
13625         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13626         commands/search.c.
13627         (pkgdata_MODULES): Added search.mod.
13628         (search_mod_SOURCES): New variable.
13629         (search_mod_CFLAGS): Likewise.
13631         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13632         (pkgdata_MODULES): Added search.mod.
13633         (search_mod_SOURCES): New variable.
13634         (search_mod_CFLAGS): Likewise.
13636         * commands/ls.c (grub_ls_list_disks): Renamed to ...
13637         (grub_ls_list_devices): ... this, and use grub_device_iterate.
13638         All callers changed.
13640         * DISTLIST: Added commands/search.c.
13642 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
13644         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13645         conversion.
13646         (grub_getcharwidth): New function.
13648         * kern/misc.c (grub_utf8_to_ucs4): New function.
13650         * include/grub/term.h (struct grub_term): Added a new member
13651         "getcharwidth".
13652         (grub_getcharwidth): New prototype.
13654         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13656         * term/i386/pc/console.c (map_char): New function. Segregated from
13657         grub_console_putchar.
13658         (grub_console_putchar): Use map_char.
13659         (grub_console_getcharwidth): New function.
13660         (grub_console_term): Specified grub_console_getcharwidth as
13661         getcharwidth.
13663         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13664         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13666         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13667         GRUB_ERRNO.
13668         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13669         on grub_strtoul completely.
13670         (write_char): Declare local variables in the beginning of the
13671         function.
13672         (grub_vesafb_getcharwidth): New function.
13673         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13674         getcharwidth.
13676 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
13678         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13679         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13680         commands/i386/pc/vbetest.c.
13682         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13683         call grub_vbe_get_controller_info again, because the returned
13684         information is volatile.
13685         (grub_vbe_set_video_mode): Mostly rewritten.
13686         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13687         grub_vbe_status_t correctly.
13688         (grub_vbe_get_video_mode_info): Likewise.
13689         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13690         several if statements.
13692         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13693         * commands/i386/pc/vbeinfo.c: ... this.
13695         * commands/i386/pc/vbe_test.c: Renamed to ...
13696         * commands/i386/pc/vbetest.c: ... this.
13698         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13699         ...
13700         (grub_cmd_vbeinfo): ... this. Save video modes before
13701         iterating. Skip a video mode, if it is not available, not enough
13702         information is given or it is monochrome. Show the memory
13703         model. Leave the interpretation of MODEVAR to grub_strtoul
13704         completely.
13705         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13706         (GRUB_MOD_FINI): Likewise.
13708         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13709         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13710         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13711         duplicated grub_env_get. Leave the interpretation of MODEVAR to
13712         grub_strtoul completely.
13713         (real2pm): Removed.
13714         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13715         (GRUB_MOD_FINI): Likewise.
13717         * normal/misc.c: Include grub/mm.h.
13719         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13720         vbe_list_modes with vbetest.mod and vbeinfo.mod.
13721         (vbe_list_modes_mod_SOURCES): Removed.
13722         (vbe_list_modes_mod_CFLAGS): Likewise.
13723         (vbe_test_mod_SOURCES): Likewise.
13724         (vbe_test_mod_CFLAGS): Likewise.
13725         (vbeinfo_mod_SOURCES): New variable.
13726         (vbeinfo_mod_CFLAGS): Likewise.
13727         (vbetest_mod_SOURCES): Likewise.
13728         (vbetest_mod_CFLAGS): Likewise.
13730 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
13732         * normal/misc.c: New file.
13734         * DISTLIST: Added normal/misc.c.
13736         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13737         DISK to HOOK. Call HOOK with DISK.
13738         * partmap/apple.c (apple_partition_map_iterate): Likewise.
13739         * partmap/pc.c (pc_partition_map_iterate): Likewise.
13740         * partmap/sun.c (sun_partition_map_iterate): Likewise.
13742         * normal/menu_entry.c (struct screen): Added a new member
13743         "completion_shown".
13744         (completion_buffer): New global variable.
13745         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13746         (store_completion): New function.
13747         (complete): Likewise.
13748         (clear_completions): Likewise.
13749         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13750         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13751         a tab, call complete.
13753         * normal/completion.c (disk_dev): Removed.
13754         (print_simple_completion): Likewise.
13755         (print_partition_completion): Likewise.
13756         (print_func): New global variable.
13757         (add_completion): Do not take the arguments WHAT or PRINT any
13758         longer. Added a new argument TYPE. Instead of printing directly,
13759         call PRINT_FUNC if not NULL.
13760         All callers changed.
13761         (complete_device): Use a local variable DEV instead of
13762         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13763         (grub_normal_do_completion): Take a new argument HOOK. Do not
13764         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13765         empty string, return NULL instead.
13766         All callers changed.
13768         * normal/cmdline.c (print_completion): New function.
13770         * kern/partition.c (grub_partition_iterate): Add an argument DISK
13771         to HOOK.
13772         All callers changed.
13774         * kern/disk.c (grub_print_partinfo): Removed.
13776         * include/grub/partition.h (struct grub_partition_map): Add a new
13777         argument DISK into HOOK of ITERATE.
13778         (grub_partition_iterate): Add a new argument DISK to HOOK.
13780         * include/grub/normal.h (enum grub_completion_type): New enum.
13781         (grub_completion_type_t): New type.
13782         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13783         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13784         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13785         (GRUB_COMPLETION_TYPE_FILE): Likewise.
13786         (grub_normal_do_completion): Added a new argument HOOK.
13787         (grub_normal_print_device_info): New prototype.
13789         * include/grub/disk.h (grub_print_partinfo): Removed.
13791         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13792         (normal_mod_SOURCES): Likewise.
13793         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13794         (normal_mod_SOURCES): Likewise.
13796         * commands/ls.c (grub_ls_list_disks): Use
13797         grub_normal_print_device_info instead of grub_print_partinfo. Free
13798         PNAME.
13799         (grub_ls_list_files): Use grub_normal_print_device_info instead of
13800         duplicating the code.
13802 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13804         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13805         follow GCS more precisely.
13806         * commands/i386/pc/vbe_test.c: Likewise.
13807         * include/grub/i386/pc/vbe.h: Likewise.
13808         * term/i386/pc/vesafb.c: Likewise.
13809         * video/i386/pc/vbe.c: Likewise.
13811 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
13813         * DISTLIST: Added term/i386/pc/vesafb.c
13814         DISTLIST: Added video/i386/pc/vbe.c
13815         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13816         DISTLIST: Added commands/i386/pc/vbe_test.c.
13817         * commands/i386/pc/vbe_list_modes.c: New file.
13818         * commands/i386/pc/vbe_test.c: Likewise.
13819         * term/i386/pc/vesafb.c: Likewise.
13820         * video/i386/pc/vbe.c: Likewise.
13821         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13822         (grub_vbe_probe) Added prototype.
13823         (grub_vbe_set_video_mode) Likewise.
13824         (grub_vbe_get_video_mode) Likewise.
13825         (grub_vbe_get_video_mode_info) Likewise.
13826         (grub_vbe_set_pixel_rgb) Likewise.
13827         (grub_vbe_set_pixel_index) Likewise.
13828         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13829         (pkgdata_MODULES): Added vesafb.mod.
13830         (pkgdata_MODULES): Added vbe_list_modes.mod.
13831         (pkgdata_MODULES): Added vbe_test.mod.
13832         (vbe_mod_SOURCES): Added.
13833         (vbe_mod_CFLAGS): Likewise.
13834         (vesafb_mod_SOURCES): Likewise.
13835         (vesafb_mod_CFLAGS): Likewise.
13836         (vbe_list_modes_mod_SOURCES): Likewise.
13837         (vbe_list_modes_mod_CFLAGS): Likewise.
13838         (vbe_test_mod_SOURCES): Likewise.
13839         (vbe_test_mod_CFLAGS): Likewise.
13841 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
13843         * normal/command.c (grub_command_execute): If INTERACTIVE is
13844         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13845         CMDLINE. Disable the pager if INTERACTIVE is true.
13846         All callers are changed.
13848         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13849         before reading a config file.
13850         * normal/main.c (read_config_file): Even if a command is not
13851         found, register it if it is within an entry.
13853         * util/grub-emu.c: Include sys/types.h and unistd.h.
13854         (options): Added --hold.
13855         (struct arguments): Added a new member "hold".
13856         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13857         missing.
13858         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13859         cleared by a debugger, if it is not zero.
13861         * include/grub/normal.h (grub_command_execute): Add an argument
13862         INTERACTIVE.
13864 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
13866         * DISTLIST: Added include/grub/i386/pc/vbe.h.
13868 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
13870         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13871         program with another one, because the old one didn't detect a bug
13872         in gcc-3.4. Always use regparm 2, because the new test is still
13873         not enough for gcc-4.0. Someone must investigate a simple test
13874         case which detects a bug in gcc-4.0.
13876 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
13878         * DISTLIST: Added normal/completion.c.
13880         * normal/completion.c: New file.
13882         * term/i386/pc/console.c (grub_console_getwh): New function.
13883         (grub_console_term): Assign grub_console_getwh to getwh.
13885         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13886         function is defined in normal/completion.c as
13887         grub_normal_do_completion.
13888         (grub_cmdline_get): Use grub_normal_do_completion instead of
13889         grub_tab_complete.
13891         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13892         returns non-zero, otherwise return 0.
13893         (grub_partition_iterate): First, probe the partition map. Then,
13894         call ITERATE only for this partition map.
13896         * kern/misc.c (grub_strncmp): Rewritten.
13898         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13899         returns non-zero. Otherwise return 0.
13901         * include/grub/partition.h (grub_partition_map_iterate): Return
13902         int instead of void.
13904         * include/grub/normal.h (grub_normal_do_completion): New prototype.
13906         * include/grub/misc.h (grub_strncmp): Change the type of N to
13907         grub_size_t.
13909         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13910         of void.
13912         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13913         unsigned explicitly before comparing it with I.
13915         * kern/main.c (grub_env_write_root): Add the attribute unused into
13916         VAR.
13918         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13919         normal/completion.c.
13920         (normal_mod_SOURCES): Likewise.
13921         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13922         (normal_mod_SOURCES): Likewise.
13924         * normal/command.c (grub_iterate_commands): If ITERATE returns
13925         non-zero, return one immediately.
13927 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
13929         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13930         * kern/i386/pc/startup.S: Updated Global Descriptor table's
13931         descriptions.
13932         (grub_vbe_get_controller_info): New function.
13933         (grub_vbe_get_mode_info): Likewise.
13934         (grub_vbe_set_mode): Likewise.
13935         (grub_vbe_get_mode): Likewise.
13936         (grub_vbe_set_memory_window): Likewise.
13937         (grub_vbe_get_memory_window): Likewise.
13938         (grub_vbe_set_scanline_length): Likewise.
13939         (grub_vbe_get_scanline_length): Likewise.
13940         (grub_vbe_set_display_start): Likewise.
13941         (grub_vbe_get_display_start): Likewise.
13942         (grub_vbe_set_palette_data): Likewise.
13943         * include/grub/i386/pc/vbe.h: New file.
13945 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13947         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13948         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13949         * DISTLIST: Likewise.
13950         * kern/ieee1275/of.c: Moved to ...
13951         * kern/ieee1275/ieee1275.c: ... here.
13953 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13955         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13956         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13957         Pass 0 as `end' parameter to grub_strtoul().
13959 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
13961         * include/grub/powerpc/ieee1275/console.h: Do not include
13962         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
13963         ifdef.
13964         (grub_console_cur_color): Remove i386-specific prototype.
13965         (grub_console_real_putchar): Likewise.
13966         (grub_console_checkkey): Likewise.
13967         (grub_console_getkey): Likewise.
13968         (grub_console_getxy): Likewise.
13969         (grub_console_gotoxy): Likewise.
13970         (grub_console_cls): Likewise.
13971         (grub_console_setcursor): Likewise.
13972         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13973         Include <grub/machine/console.h>.
13974         * term/ieee1275/ofconsole.c: Likewise.
13976 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
13978         * Makefile.in (LIBLZO): New variable.
13980         * configure.ac: Check for LZO version 2.
13982         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13983         lzo/lzo1x.h instead of lzo1x.h.
13985         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13986         of -llzo.
13988         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13989         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13991         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13992         copying the data from PARTITION to P.
13994 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13996         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13997         negative, unload the module.
13999         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14000         map is "pc_partition_map" but not "pc".
14001         (usage): Fix the description. The options are --boot-image and
14002         --core-image but not --boot-file or --core-file.
14003         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14004         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14005         DEFAULT_DIRECTORY.
14007         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14008         --core-file. Specify INSTALL_DEVICE as an argument.
14010         * util/console.c: Include config.h.
14011         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14012         [HAVE_NCURSES_H]: Include ncurses.h.
14013         [HAVE_CURSES_H]: Include curses.h.
14014         [!A_NORMAL] (A_NORMAL): Defined as zero.
14015         [!A_STANDOUT] (A_STANDOUT): Likewise.
14017         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14018         -lncurses.
14019         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14021         * configure.ac: Check for curses libraries and headers.
14023         * Makefile.in (LIBCURSES): New variable.
14025         * genmk.rb (Script::rule): Set the executable bits.
14027         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14028         name of the PC partition map is "pc_partition_map" but not "pc".
14030 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14032         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14033         (modules): Likewise.
14034         (usage): Added descriptions for --modules and --grub-probefs.
14035         Handle --modules and --grub-probefs. Save the arguments in MODULES
14036         and GRUB_PROBEFS, respectively.
14037         Auto-detect a filesystem module against GRUBDIR. If the result is
14038         empty and modules are not specified explicitly, abort the
14039         installation. Add the result to MODULES.
14041         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14042         disk/powerpc/ieee1275/ofdisk.c,
14043         include/grub/powerpc/ieee1275/init.h and
14044         term/powerpc/ieee1275/ofconsole.c.
14045         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14046         term/ieee1275/ofconsole.c.
14048         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14050         * COPYING: Upgraded to the latest version. Only the address of the
14051         FSF office has changed.
14053 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14055         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14056         kern/ieee1275.c with kern/ieee1275/of.c.
14058         * kern/ieee1275.c: Moved to ...
14059         * kern/ieee1275/of.c: ... here.
14061 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14063         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14064         readability.
14066         * config.guess: Updated to the latest version from gnulib.
14067         * config.sub: Likewise.
14068         * install.sh: Likewise.
14069         * mkinstalldirs: Likewise.
14071         * include/grub/console.h: Removed. This file is arch-specific. Do
14072         not put this in include/grub.
14074         * include/grub/i386/pc/console.h: Resurrected.
14076         * util/console.c: Include grub/machine/console.h instead of
14077         grub/console.h.
14078         * util/grub-emu.c: Likewise.
14080 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14082         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14083         hardcoded value.
14085         From Vincent Pelletier  <subdino2004@yahoo.fr>
14086         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14087         Redefined to use grub_getwh.
14088         (grub_term): New member named getwh.
14089         (grub_getwh): New prototype.
14090         * kern/term.c (grub_getwh): New function.
14091         * term/i386/pc/console.c (grub_console_getwh): New function.
14092         (grub_console_term): New member `getwh'.
14093         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14094         (grub_vga_term): New member `getwh'.
14095         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14096         grub_ssize_t.
14097         (grub_ofconsole_getw): New function.
14098         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14099         (grub_ofconsole_term): New field named getwh and new initial
14100         value.
14102 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14104         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14105         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14106         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14107         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14108         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14109         of <grub/machine/ieee1275.h>.
14110         * commands/ieee1275/reboot.c: Likewise.
14111         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14112         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14113         parameter structs to use new type `grub_ieee1275_cell_t'.
14114         * term/powerpc/ieee1275/ofconsole.c: Move ...
14115         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14116         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14117         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14118         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14119         to return int.
14120         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14121         Remove unused prototypes.  All users updated.
14122         * include/grub/powerpc/ieee1275/console.h: Removed.
14123         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14124         `grub_ieee1275_cell_t'.
14125         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14126         Cast comparisons with -1 to the correct type.
14127         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14128         type to match `grub_ieee1275_entry_fn'.
14130 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14132         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14134         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14135         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14136         partmap/sun.c.
14137         (grub_probefs_SOURCES): New variable.
14139         * util/i386/pc/grub-probefs.c: New file.
14141         * util/i386/pc/grub-setup.c (main): Call
14142         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14143         grub_hfs_init and grub_jfs_init to initialize the system. Call
14144         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14145         grub_pc_partition_map_fini to finish the system.
14147 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14149         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14150         function.
14151         (grub_multiboot_load_elf32): Likewise.
14152         (grub_multiboot_is_elf64): Likewise.
14153         (grub_multiboot_load_elf64): Likewise.
14154         (grub_multiboot_load_elf): Likewise.
14155         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14156         an ELF32 or ELF64 file.
14157         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14159         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14160         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14161         NULL before calling FS->LABEL.
14162         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14163         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14164         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14165         before calling FS->LABEL.
14167 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14169         * util/i386/pc/grub-install.in (datadir): New variable.
14170         (libdir): Removed.
14171         (pkgdatadir): New variable.
14172         (pkglibdir): Removed.
14174 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14176         * DISTLIST: Added util/i386/pc/grub-install.in.
14178         * util/i386/pc/grub-install.in: New file.
14180         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14181         (grub_install_SOURCES): Likewise.
14183         * genmk.rb: Added support for scripts.
14184         (Script): New class.
14185         (scripts): New variable.
14187         * Makefile.in (install-local): Install sbin_SCRIPTS by
14188         INSTALL_SCRIPT.
14189         (uninstall): Remove sbin_SCRIPTS.
14191         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14192         device, try to get a GRUB device by
14193         grub_util_biosdisk_get_grub_dev.
14194         Free DEST_DEV.
14196         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14197         description for --device-map.
14199 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14201         Change the semantics of variable hooks. They now return strings
14202         instead of error values.
14204         * util/i386/pc/grub-setup.c: Include grub/env.h.
14205         (setup): Use grub_device_set_root instead of grub_env_set.
14207         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14208         grub_env_get instead of grub_device_set_root and
14209         grub_device_get_root, respectively.
14211         * kern/main.c (grub_env_write_root): New function.
14212         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14213         grub_env_set instead of grub_device_set_root.
14215         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14216         many variables.
14217         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14218         rather than calling ENV->WRITE_HOOK afterwards.
14219         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14220         passing a pointer of a pointer.
14221         (grub_register_variable_hook): Change the types of "read_hook" and
14222         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14223         respectively.
14224         Allocate the default empty string on the heap, because this string
14225         may be freed later.
14227         * kern/device.c: Include grub/env.h.
14228         (grub_device_set_root): Removed.
14229         (grub_device_get_root): Likewise.
14230         (grub_device_open): Use grub_env_get instead of
14231         grub_device_get_root.
14233         * include/grub/env.h (grub_env_read_hook_t): New type.
14234         (grub_env_write_hook_t): Likewise.
14235         (grub_env_var): Change the types of "read_hook" and "write_hook"
14236         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14237         (grub_register_variable_hook): Likewise.
14239         * include/grub/device.h (grub_device_set_root): Removed.
14240         (grub_device_set_root): Likewise.
14242         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14243         make sure that DIRNAME terminates with '/', so that
14244         grub_fat_find_dir will fail if PATH is not a directory.
14246         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14247         from DIRNAME.
14248         Use the qualifier auto for print_files and print_files_long.
14249         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14250         as a regular file.
14251         Put a newline only if there is no error.
14252         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14253         used.
14255 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14257         * kern/partition.c (grub_partition_probe): Initialize PART to
14258         NULL. Otherwise, when no partition map is registered, this returns
14259         a garbage.
14261 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14263         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14264         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14265         valid.
14267 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14269         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14270         information on each device, if it does not have partitions. Print
14271         "Device" instead of "Disk", because this function is not specific
14272         to disk devices.
14274         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14275         static to ensure that it is put on the memory rather than a
14276         register.
14278 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14280         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14281         (grub_cat_init): Likewise.
14282         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14283         (options): Likewise.
14284         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14285         (grub_configfile_init): Likewise.
14286         * font/manager.c (GRUB_MOD_INIT): Likewise.
14287         * commands/help.c (GRUB_MOD_INIT): Likewise.
14288         (grub_help_init): Likewise.
14289         * normal/command.c (grub_command_init): Likewise.
14290         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14291         * disk/loopback.c (grub_loop_init): Likewise.
14292         (GRUB_MOD_INIT): Likewise.
14293         * commands/ls.c (grub_ls_init): Likewise.
14294         (GRUB_MOD_INIT): Likewise.
14295         (options): Likewise.
14296         * commands/boot.c (grub_boot_init): Likewise.
14297         (GRUB_MOD_INIT): Likewise.
14298         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14299         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14300         (GRUB_MOD_INIT): Likewise.
14301         * commands/cmp.c (grub_cmp_init): Likewise.
14302         (GRUB_MOD_INIT): Likewise.
14304         * normal/arg.c: Use <> instead of "" to include header files.
14305         (SHORT_ARG_HELP): New macro.
14306         (SHORT_ARG_USAGE): Likewise.
14307         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14308         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14309         descriptions.
14310         (find_short): Check if C is 'h' or 'u' explicitly.
14311         (grub_arg_show_help): Use space characters instead of tabs. Treat
14312         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14313         are shown with --help and --usage only if they are not used for
14314         the command itself.
14315         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14316         'h' and 'u'.
14318         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14319         const into "longarg". Change the type of "shortarg" to int.
14321 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14323         * boot/i386/pc/boot.S (boot_drive_check): New label.
14325         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14326         macro.
14328         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14329         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14331 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14333         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14334         When turning off Gate A20, skip the check and return immediately,
14335         because this is not fatal usually.
14337 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14339         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14340         be 0x7C00 instead of 0x8000.
14342         * boot/i386/pc/pxeboot.S: Rewritten.
14344         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14345         EXT_C.
14346         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14347         result.
14349 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14351         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14352         robustness. This routine now supports a BIOS call and System
14353         Control Port A to modify the gate A20.
14355         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14356         Increased to 0x440.
14358 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14360         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14361         device path and resulting ihandle.
14362         (grub_ofdisk_close): dprintf the ihandle being closed.
14363         (grub_ofdisk_read): dprintf function parameters.
14364         * kern/mm.c (grub_mm_init_region): Likewise.
14365         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14366         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14367         size, and boot arguments.
14368         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14369         before loading into memory.
14370         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14371         before loading into memory.
14373 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14375         * kern/mm.c: Added much documentation.
14376         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14377         8, set to 5 instead of 8.
14379 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14381         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14383         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14384         (grub_mkdevicemap_SOURCES): New variable.
14386         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14387         lib/device.c of GRUB Legacy.
14389 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14391         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14392         instead of PATH is NULL.
14394 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14396         * commands/cmp.c (BUFFER_SIZE): New macro.
14397         (grub_cmd_cmp): Close the right file at the right time.  Compare
14398         only data just read.  Don't report files of different  size as
14399         identical.  Dynamically allocate buffers.  Move variable
14400         declarations at the beginning of function.
14402 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14404         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14405         reverse.
14407 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14409         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14410         when backspace is pressed at beginning of line.
14412 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14414         * DISTLIST: Added genfslist.sh.
14416         * normal/main.c (fs_module_list): New variable.
14417         (autoload_fs_module): New function.
14418         (read_fs_list): Likewise.
14419         (grub_normal_execute): Call read_fs_list.
14421         * kern/fs.c (grub_fs_autoload_hook): New variable.
14422         (grub_fs_probe): Added support for auto-loading.
14424         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14425         (grub_fs_module_list_t): New type.
14427         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14428         (grub_fs_autoload_hook): New prototype.
14430         * genfslist.sh: New file.
14432         * genmk.rb: Added a rule to generate a filesystem list.
14434 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
14436         * configure.ac: Fix the test for cross-compiling.
14438         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
14439         define GRUB_UTIL anymore.
14441         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14442         so this function works on other systems than just big endian.
14443         (load_modules): Likewise.
14444         (add_segments): Likewise.
14446 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
14448         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
14449         contains `l' modifier, get a long from va_arg().
14451 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
14453         * kern/mm.c (grub_free): If the next free block which is being
14454         merged is the first free block, set the first block to the block
14455         being freed.
14456         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14458 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14460         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14461         `grub_ieee1275_chosen'.
14463 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
14465         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14466         (grub_ieee1275_chosen): New variable.
14467         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14468         `chosen'.
14469         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14470         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14471         Rename first argument to `phandle' for consistency.
14472         (grub_ieee1275_get_property_length): Likewise.
14473         (grub_ieee1275_next_property): Likewise.  Change type of first argument
14474         to grub_ieee1275_phandle_t.
14475         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14476         Move export next to declaration.
14477         (grub_ieee1275_chosen): New variable.
14478         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14479         Correct cosmetic typo.
14480         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14481         `grub_ieee1275_chosen'.
14482         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14483         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14484         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14485         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14486         `grub_ieee1275_chosen'.
14488 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
14490         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14491         /chosen/bootargs.
14492         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14493         /chosen/bootargs as "variable=value" pairs.
14495 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
14497         * include/grub/misc.h (grub_dprintf): New macro.
14498         (grub_real_dprintf): New prototype.
14499         (grub_strword): Likewise.
14500         (grub_iswordseparator): Likewise.
14501         * kern/misc.c (grub_real_dprintf): New function.
14502         (grub_strword): Likewise.
14503         (grub_iswordseparator): Likewise.
14505 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
14507         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14508         (roundup): Remove macro.
14509         (grub_ieee1275_flags): Make static.
14510         (grub_ieee1275_realmode): Remove.
14511         (grub_ieee1275_test_flag): New function.
14512         (grub_ieee1275_set_flag): Likewise.
14513         (find_options): Rename to `grub_ieee1275_find_options'; update
14514         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14515         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14516         (cmain): New prototype.
14517         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14518         `grub_ieee1275_flags' directly.
14519         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14520         machine/biosdisk.h.
14521         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14522         Don't include grub/machine/init.h.
14523         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14524         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14525         Remove prototype.
14526         (grub_ieee1275_realmode): Likewise.
14527         (grub_ieee1275_flag): New enum.
14528         (grub_ieee1275_test_flag): New prototype.
14529         (grub_ieee1275_set_flag): New prototype.
14530         * include/grub/powerpc/ieee1275/init.h: Remove file.
14531         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14532         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14533         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
14534         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
14535         comment.
14536         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14537         `grub_ieee1275_test_flag'.
14538         (grub_ieee1275_encode_devname): Likewise.
14540 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
14542         * include/grub/powerpc/ieee1275/ieee1275.h
14543         (grub_ieee1275_encode_devname): New prototype.
14544         (grub_ieee1275_get_filename): Likewise.
14545         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14546         function.
14547         (grub_set_prefix): Likewise.
14548         (grub_machine_init): Call grub_set_prefix.
14549         * kern/powerpc/ieee1275/openfw.c: Fix typos.
14550         (grub_parse_type): New enum.
14551         (grub_ieee1275_get_devargs): New function.
14552         (grub_ieee1275_get_devname): Likewise.
14553         (grub_ieee1275_parse_args): Likewise.
14554         (grub_ieee1275_get_filename): Likewise.
14555         (grub_ieee1275_encode_devname): Likewise.
14557 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
14559         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14560         `grub_loader_unset'.
14562 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
14564         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14565         instead of grub_ieee1275_interpret.
14566         (grub_halt_init): New function.
14567         (grub_halt_fini): Likewise.
14568         (GRUB_MOD_INIT): Correct message grammar.
14569         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14570         instead of grub_ieee1275_interpret.
14571         (grub_reboot_init): New function.
14572         (grub_reboot_fini): Likewise.
14573         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14574         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14575         util/i386/pc/misc.c with commands/ieee1275/halt.c,
14576         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14577         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14578         function.
14579         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14580         Add prototype.
14581         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14582         prototype.
14583         (grub_halt): Likewise.
14584         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14585         (cmain): Remove __attribute__((unused)).
14586         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14587         (grub_heap_len): Likewise.
14588         (grub_machine_fini): New function.
14589         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14590         (grub_halt): Likewise.
14591         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14592         function.
14593         * util/powerpc/ieee1275/misc.c: New file.
14595 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
14597         * DISTLIST: New file.
14598         * gendistlist.sh: Likewise.
14600         * Makefile.in (COMMON_DISTFILES): Removed.
14601         (BOOT_DISTFILES): Likewise.
14602         (CONF_DISTFILES): Likewise.
14603         (DISK_DISTFILES): Likewise.
14604         (FS_DISTFILES): Likewise.
14605         (INCLUDE_DISTFILES): Likewise.
14606         (KERN_DISTFILES): Likewise.
14607         (LOADER_DISTFILES): Likewise.
14608         (TERM_DISTFILES): Likewise.
14609         (UTIL_DISTFILES): Likewise.
14610         (DISTFILES): Likewise.
14611         (uninstall): Uninstall files in $(pkgdata_DATA).
14612         (DISTLIST): New target.
14613         (distdir): Use the contents of the file DISTLIST to get a list of
14614         distributed files.
14616 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
14618         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14619         descriptor. This is ported from GRUB Legacy.
14621         * gencmdlist.sh: Added an extra semicolon to make it work with
14622         old sed versions. Reported by Robert Bihlmeyer
14623         <robbe@orcus.priv.at>.
14625 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
14627         Automatic loading of commands is supported.
14629         * normal/main.c (read_command_list): New function.
14630         (grub_normal_execute): Call read_command_list.
14632         * normal/command.c (grub_register_command): Return zero or CMD.
14633         Allocate CMD->NAME from the heap.
14634         Initialize CMD->MODULE_NAME to zero.
14635         Find the same name as well. If the same command is found and it is
14636         a dummy command, overwrite members. If it is not a dummy command,
14637         return zero.
14638         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14639         (grub_command_find): If a dummy command is found, load a module
14640         and retry to find a command only once.
14642         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14643         make sure that each command is loaded.
14645         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14646         macro.
14647         (struct grub_command): Remove const from the member `name'.
14648         Add a new member `module_name'.
14649         (grub_register_command): Return grub_command_t.
14651         * commands/help.c (grub_cmd_help): Call grub_command_find to make
14652         sure that each command is loaded.
14654         * genmk.rb (PModule::rule): Specify a module name without the
14655         suffix ".mod" to gencmdlist.sh.
14657 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14659         * gencmdlist.sh: New file.
14661         * genmk.rb (PModule::rule): Generate a rule for a command list.
14662         Clean command.lst.
14663         Generate command.lst from $(COMMANDFILES).
14665         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14666         (DATA): Added $(pkgdata_DATA).
14667         (install-local): Install files in $(pkgdata_DATA).
14669 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
14671         * term/i386/pc/vga.c (debug_command): Removed.
14672         (GRUB_MOD_INIT): Do not register the command "debug".
14674         From Hollis Blanchard:
14675         * commands/configfile.c: New file.
14676         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14677         commands/configfile.c.
14678         (pkgdata_MODULES): Added configfile.mod.
14679         (configfile_mod_SOURCES): New variable.
14680         (configfile_mod_CFLAGS): Likewise.
14681         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14682         commands/configfile.c.
14683         (pkgdata_MODULES): Added configfile.mod.
14684         (configfile_mod_SOURCES): New variable.
14685         (configfile_mod_CFLAGS): Likewise.
14686         * util/grub-emu.c (main): Call grub_configfile_init and
14687         grub_configfile_fini.
14688         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14689         prototype.
14690         [GRUB_UTIL] (grub_configfile_fini): Likewise.
14692 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14694         * normal/arg.c (grub_arg_show_help): Do not show the bug report
14695         address.
14697         * commands/help.c (grub_cmd_help): Do not print newlines after
14698         the last command in print_command_help.
14700 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
14702         * commands/default.h: New file.
14703         * commands/timeout.h: Likewise.
14704         * normal/context.c: Likewise.
14706         * util/misc.c: Do not include sys/times.h.
14707         Include sys/time.h and grub/machine/time.h.
14708         (grub_get_rtc): Rewritten with gettimeofday.
14710         * util/grub-emu.c (main): Call grub_default_init and
14711         grub_timeout_init before grub_normal_init, and call
14712         grub_timeout_fini and grub_default_fini after grub_main.
14714         * util/console.c (grub_ncurses_checkkey): Return the read
14715         character or -1.
14717         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14718         timeouts.
14720         * normal/main.c (read_config_file): Push MENU. If this fails,
14721         print an error and wait for a user input.
14722         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14723         If a menu is empty or an error occurs, pop MENU.
14724         (grub_normal_execute): Pop and free MENU after grub_menu_run
14725         returns.
14727         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14729         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14730         include time.h.
14731         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14732         without GRUB_UTIL.
14733         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14734         time.h.
14735         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14736         without GRUB_UTIL.
14738         * include/grub/normal.h (struct grub_menu_list): New struct.
14739         (grub_menu_list_t): New type.
14740         (struct grub_context): New struct.
14741         (grub_context_t): New type.
14742         (grub_register_command): Got rid of EXPORT_FUNC.
14743         (grub_unregister_command): Likewise.
14744         (grub_context_get): New prototype.
14745         (grub_context_get_current_menu): Likewise.
14746         (grub_context_push_menu): Likewise.
14747         (grub_context_pop_menu): Likewise.
14748         [GRUB_UTIL] (grub_default_init): Likewise.
14749         [GRUB_UTIL] (grub_default_fini): Likewise.
14750         [GRUB_UTIL] (grub_timeout_init): Likewise.
14751         [GRUB_UTIL] (grub_timeout_fini): Likewise.
14753         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14754         commands/timeout.c and normal/context.c.
14755         (pkgdata_MODULES): Added default.mod and timeout.mod.
14756         (normal_mod_SOURCES): Added normal/context.c.
14757         (default_mod_SOURCES): New variable.
14758         (default_mod_CFLAGS): Likewise.
14759         (timeout_mod_SOURCES): Likewise.
14760         (timeout_mod_CFLAGS): Likewise.
14761         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14762         conf/i386-pc.rmk.
14763         (pkgdata_MODULES): Added default.mod and timeout.mod.
14764         (normal_mod_SOURCES): Added normal/context.c.
14765         (default_mod_SOURCES): New variable.
14766         (default_mod_CFLAGS): Likewise.
14767         (timeout_mod_SOURCES): Likewise.
14768         (timeout_mod_CFLAGS): Likewise.
14770         * Makefile.in (all-local): Added $(MKFILES).
14772 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14774         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14775         (grub_emu_SOURCES): Likewise.
14776         (pkgdata_MODULES): Add `sun.mod'.
14777         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14778         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14779         `partmap/sun.c'.
14780         (pkgdata_MODULES): Add `sun.mod'.
14781         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14782         * include/grub/partition.h (grub_sun_partition_map_init): New
14783         prototype.
14784         (grub_sun_partition_map_fini): Likewise.
14785         * partmap/sun.c: New file.
14786         * util/grub-emu.c (main): Initialize and de-initialize the sun
14787         partitionmap support.
14789 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
14791         This implements an Emacs-like menu entry editor.
14793         * normal/menu_entry.c: New file.
14795         * util/console.c (grub_ncurses_putchar): Translate some Unicode
14796         characters to ASCII.
14797         (saved_char): New variable.
14798         (grub_ncurses_checkkey): Rewritten completely.
14799         (grub_ncurses_getkey): Likewise.
14800         (grub_ncurses_init): Call raw instead of cbreak.
14802         * normal/menu.c (print_entry): Do not put a space.
14803         (init_page): Renamed to ...
14804         (grub_menu_init_page): ... this. All callers changed.
14805         (edit_menu_entry): Removed.
14806         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14808         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14810         * kern/misc.c (grub_vprintf): Call grub_refresh.
14812         * normal/menu.c (DISP_LEFT): Renamed to ...
14813         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14814         * normal/menu.c (DISP_UP): Renamed to ...
14815         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14816         * normal/menu.c (DISP_RIGHT): Renamed to ...
14817         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14818         * normal/menu.c (DISP_DOWN): Renamed to ...
14819         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14820         * normal/menu.c (DISP_HLINE): Renamed to ...
14821         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14822         * normal/menu.c (DISP_VLINE): Renamed to ...
14823         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14824         * normal/menu.c (DISP_UL): Renamed to ...
14825         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14826         * normal/menu.c (DISP_UR): Renamed to ...
14827         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14828         * normal/menu.c (DISP_LL): Renamed to ...
14829         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14830         * normal/menu.c (DISP_LR): Renamed to ...
14831         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14832         * normal/menu.c (TERM_WIDTH): Renamed to ...
14833         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14834         * normal/menu.c (TERM_HEIGHT): Renamed to ...
14835         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14836         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14837         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14838         * normal/menu.c (TERM_MARGIN): Renamed to ...
14839         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14840         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14841         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14842         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14843         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14844         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14845         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14846         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14847         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14848         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14849         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14850         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14851         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14852         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14853         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14854         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14855         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14856         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14857         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14858         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14859         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14860         All callers changed.
14862         * include/grub/normal.h: New prototype.
14864         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14865         normal/menu_entry.c.
14866         (normal_mod_SOURCES): Likewise.
14867         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14868         (normal_mod_SOURCES): Likewise.
14870 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
14872         * include/grub/normal.h (grub_halt_init): New prototype.
14873         (grub_halt_fini): Likewise.
14874         (grub_reboot_init): Likewise.
14875         (grub_reboot_fini): Likewise.
14877         * util/grub-emu.c: Include signal.h.
14878         (main_env): New global variable.
14879         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14880         catch C-c.
14881         (grub_machine_fini): New function.
14882         (main): Call grub_halt_init and grub_reboot_init before
14883         grub_main, and grub_reboot_fini and grub_halt_fini after it.
14884         Call setjmp with MAIN_ENV to go back afterwards.
14885         Call grub_machine_fini right before return.
14887         * include/grub/util/misc.h: Include setjmp.h.
14888         (main_env): New prototype.
14890         * include/grub/kernel.h (grub_machine_fini): New prototype.
14891         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14892         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14894         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14895         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14896         * term/i386/pc/console.c (grub_console_fini): Likewise.
14898         * util/i386/pc/misc.c: New file.
14900         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14901         util/i386/pc/misc.c, commands/i386/pc/halt.c and
14902         commands/i386/pc/reboot.c.
14904 2005-02-14  Guillem Jover  <guillem@hadrons.org>
14906         * include/grub/dl.h (grub_dl_check_header): New prototype.
14907         (grub_arch_dl_check_header): Change return type to grub_err_t,
14908         remove size parameter and export function.  Update all callers.
14909         * kern/dl.c (grub_dl_check_header): New function.
14910         (grub_dl_load_core): Use `grub_dl_check_header' instead of
14911         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
14912         are inside the core.
14913         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14914         independent ELF header checks.
14915         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14916         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14917         `grub_dl_check_header' instead of explicit checks.  Check for the
14918         ELF type.
14919         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14920         `grub_dl_check_header' instead of explicit checks.  Remove arch
14921         specific ELF header checks.
14923         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14924         argument SIZE.
14926 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
14928         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14929         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14931 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
14933         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14934         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14935         (part_map_iterate): Clear `grub_errno' and return 0 if
14936         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14937         * partmap/amiga.c (amiga_partition_map_iterate): Return
14938         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14939         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14941 2005-02-01  Guillem Jover  <guillem@hadrons.org>
14943         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14944         help info.
14946 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14948         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14949         Removed prototype.
14950         (grub_rescue_cmd_linux): New prototype.
14951         (grub_rescue_cmd_initrd): Likewise.
14952         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14953         `bi_rec'.
14954         (grub_linux_release_mem): Release the memory for the initrd.
14955         (grub_load_linux): Renamed from this...
14956         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
14957         Changed `entry' not to be static.  Loop over memory regions to
14958         find another one when the default fails.
14959         (grub_rescue_cmd_initrd): New function.
14960         (grub_linux_init): Remove function.
14961         (grub_linux_fini): Likewise.
14962         (GRUB_MOD_INIT): Register `initrd'.
14963         (GRUB_MOD_FINI): Unregister `initrd'.
14964         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14965         Function removed.
14966         (grub_linux_normal_fini): Likewise.
14967         (GRUB_MOD_INIT): Register `initrd'.
14968         (GRUB_MOD_FINI): Unregister `initrd'.
14970 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14972         * commands/help.c: New file.
14973         * normal/arg.c (show_help): Renamed to...
14974         (grub_arg_show_help): ... this.
14975         * commands/i386/pc/halt.c: New file.
14976         * commands/i386/pc/reboot.c: Likewise.
14977         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14978         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14979         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14980         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14981         variables.
14982         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14983         `commands/help.c'.
14984         (pkgdata_MODULES): Add `help.mod'.
14985         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14986         * grub/i386/pc/init.h (grub_reboot): New prototype.
14987         (grub_halt): Likewise.
14988         * include/grub/normal.h (grub_arg_show_help): New prototype.
14989         (grub_help_init): Likewise.
14990         (grub_help_fini): Likewise.
14991         * util/grub-emu.c (main): Initialize and deinitialize the help
14992         command.
14994         * normal/cmdline.c (grub_cmdline_get): Doc fix.
14996         * normal/command.c (grub_command_init): Fixed the description of
14997         the `set' and `unset' commands.
14999 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15001         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15002         function.
15003         * commands/ieee1275/halt.c: New file.
15004         * commands/ieee1275/reboot.c: Likewise.
15005         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15006         `__attribute__ ((unused))'.  Some GCS related fixed.
15007         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15008         (grub_suspend_fini): Likewise.
15009         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15010         and `halt.mod'.
15011         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15012         (halt_mod_CFLAGS): New variables.
15013         * include/grub/powerpc/ieee1275/ieee1275.h
15014         (grub_ieee1275_interpret): New prototype.
15016 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15018         * include/grub/misc.h (memmove): New prototype.
15019         (memcpy): Likewise.
15021 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15023         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15024         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15026 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15028         * kern/misc.c (grub_strndup): Function rewritten.
15030 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15032         * normal/menu.c (TERM_WIDTH): Macro redefined.
15033         (TERM_TOP_BORDER_Y): Likewise.
15034         (draw_border): Replaced while-loop by a for-loop.  Make the number
15035         of lines consistent with the number of lines displayed in
15036         print_entries.  Added a margin below the rectangle.
15037         (print_entry): Make the entry fit in the rectangle.
15038         (print_entries): Display the scroll arrows next to the right
15039         border.
15041 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15043         * fs/minix.c (grub_minix_find_file): Reserve more space for
15044         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15045         `grub_strncpy' to copy `path' into it.
15047 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15049         Add the loopback device, a device via which files can be accessed
15050         as devices.
15052         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15053         (pkgdata_MODULES): Add loopback.mod.
15054         (loopback_mod_SOURCES): New variable.
15055         (loopback_mod_CFLAGS): Likewise.
15056         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15057         `disk/loopback.c'.
15058         (pkgdata_MODULES): Add loopback.mod.
15059         (loopback_mod_SOURCES): New variable.
15060         (loopback_mod_CFLAGS): Likewise.
15061         * disk/loopback.c: new file.
15062         * include/grub/normal.h (grub_loop_init): New prototype.
15063         (grub_loop_fini): New prototype.
15064         * util/grub-emu.c (main): Initialize and de-initialize loopback
15065         support.
15066         * include/grub/disk.h (grub_disk_dev_id): Add
15067         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15069 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15071         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15072         function.
15073         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15074         (suspend_mod_SOURCES): New variable.
15075         (suspend_mod_CFLAGS): Likewise.
15076         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15077         New prototype.
15078         * commands/ieee1275/suspend.c: New file.
15080 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15082         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15083         ((unused))' to `__attribute__ ((used))'.
15084         (GRUB_MOD_FINI): Likewise.
15085         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15086         * genmk.rb (PModule): Assign space to common symbols when linking
15087         modules.
15089 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15091         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15092         `unsigned' arguments to `grub_size_t'.
15093         (grub_malloc): Likewise.
15094         (grub_realloc): Likewise.
15095         (grub_memalign): Likewise.
15096         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15097         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15098         * util/misc.c (grub_malloc): Likewise.
15099         (grub_realloc): Likewise.
15100         * kern/mm.c (get_header_from_pointer): Change the casts to
15101         `unsigned' into a cast to `grub_size_t'.
15103         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15104         point to `currnode' when `currnode' is changed.
15106         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15107         Schottelius <nico-linux@schottelius.org>.
15109 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15111         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15112         (note_path): Remove variable.
15113         (GRUB_IEEE1275_NOTE_NAME): New macro.
15114         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15115         (grub_ieee1275_note_hdr): New structure.
15116         (grub_ieee1275_note_desc): Likewise.
15117         (grub_ieee1275_note): Likewise.
15118         (load_note): Remove `dir' argument.  All callers updated.  Remove
15119         `note_img' and `path'.  Do not load a file from `note_path'.
15120         Initialize a struct grub_ieee1275_note and write that to `out'.
15121         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15123 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15125         * util/misc.c (grub_util_read_image): Revert last change.  It
15126         called `grub_util_read_at', which seeks from the beginning of the
15127         file.
15129 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15131         * TODO: Add note about endianness in grub-mkimage.
15132         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15133         section.
15134         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15135         (grub_mkimage_SOURCES): New target.
15136         * include/grub/kernel.h (grub_start_addr): Remove variable.
15137         (grub_end_addr): Likewise.
15138         (grub_total_module_size): Likewise.
15139         (grub_kernel_image_size): Likewise.
15140         (GRUB_MODULE_MAGIC): New constant.
15141         (grub_module_info): New structure.
15142         (grub_arch_modules_addr): New prototype.
15143         (grub_get_end_addr): Remove prototype.
15144         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15145         * include/grub/powerpc/ieee1275/kernel.h: New file.
15146         * include/grub/util/misc.h (grub_util_get_fp_size): New
15147         prototype.
15148         (grub_util_read_at): Likewise.
15149         (grub_util_write_image_at): Likewise.
15150         * kern/main.c (grub_get_end_addr): Remove function.
15151         (grub_load_modules): Call grub_arch_modules_addr instead of using
15152         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15153         the grub_module_info fields instead of calling grub_get_end_addr
15154         as loop conditions.  Move grub_add_unused_region code here.
15155         (grub_add_unused_region): Remove function.
15156         * kern/i386/pc/init.c: Include grub/cache.h.
15157         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15158         one call to add_mem_region.
15159         (grub_arch_modules_addr): New function.
15160         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15161         (grub_total_module_size): Likewise.
15162         Include grub/machine/kernel.h.
15163         (grub_arch_modules_addr): New function.
15164         * util/grub-emu.c (grub_end_addr): Remove variable.
15165         (grub_total_module_size): Likewise.
15166         (grub_arch_modules_addr): New function.
15167         * util/misc.c: Include unistd.h.
15168         (grub_util_get_fp_size): New function.
15169         (grub_util_read_at): Likewise.
15170         (grub_util_write_image_at): Likewise.
15171         (grub_util_read_image): Call grub_util_read_at.
15172         (grub_util_write_image): Call grub_util_write_image_at.
15173         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15174         additional memory in kernel_img for a struct grub_module_info.
15175         Fill in that grub_module_info.
15176         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15178 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15180         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15181         New function.
15182         * include/grub/powerpc/ieee1275/ieee1275.h
15183         (grub_ieee1275_milliseconds): New prototype.
15184         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15185         Change to 1000.
15186         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15187         grub_ieee1275_milliseconds.
15189 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15191         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15192         variable.
15193         (find_options): New function.
15194         (cmain): Call find_options.
15195         * include/grub/powerpc/ieee1275/ieee1275.h
15196         (grub_ieee1275_realmode): New extern variable.
15197         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15198         grub_map if grub_ieee1275_realmode is false.
15200 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15202         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15203         lines are inserted and make it work like readline.  Reported by
15204         Vincent Pelletier <subdino2004@yahoo.fr>.
15206 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15208         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15210         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15211         `kern/powerpc/cache.S'.
15213 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15215         * genmk.rb: Handle the `Program' class in the main loop.  Written
15216         by Johan Rydberg <jrydberg@gnu.org>.
15217         (Program): New class.
15218         (programs): New variable.
15219         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15220         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15221         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15222         (help_arch): Function removed.
15223         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15224         `powerpc/libgcc.h' and `loader.h'.
15225         (pkgdata_PROGRAMS): New variable.
15226         (sbin_UTILITIES): Variable removed.
15227         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15228         (grubof_SOURCES): Variable re-defined so it only includes the
15229         core functionality.
15230         (grubof_CFLAGS): Remove `-DGRUBOF'.
15231         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15232         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15233         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15234         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15235         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15236         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15237         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15238         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15239         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15240         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15241         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15242         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15243         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15244         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15245         (pc_mod_CFLAGS): New variables.
15246         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15247         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15248         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15249         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15250         Moved from here...
15251         * include/grub/i386/pc/init.h (grub_os_area_addr)
15252         (rub_os_area_size): ... to here.
15253         * include/grub/powerpc/ieee1275/ieee1275.h
15254         (grub_ieee1275_entry_fn): Export symbol.
15255         * include/grub/powerpc/ieee1275/init.h: New file.
15256         * include/grub/powerpc/libgcc.h: Likewise.
15257         * include/grub/cache.h: Likewise.
15258         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15259         <hollis@penguinppc.org>.
15260         * kern/dl.c: Include <grub/cache.h>.
15261         (grub_dl_flush_cache): New function.
15262         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15263         for this module.
15264         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15265         (grub_console_init): Removed prototypes.
15266         (grub_machine_init): Don't initialize the modules anymore.
15267         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15268         static.
15269         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15270         Macro undef removed.
15271         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15272         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15273         relocation `R_PPC_REL32'.  Return an error when the relocation is
15274         unknown.
15275         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15276         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15277         * util/misc.c (grub_arch_sync_caches): Likewise.
15279 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15281         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15282         `symlist.c', add `grubof_symlist.c'.
15283         (symlist.c): Variable removed.
15284         (grubof_HEADERS): Variable added.
15285         (grubof_symlist.c): New target.
15286         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15287         `kernel_img_HEADERS'.
15288         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15289         * kern/powerpc/dl.c: New file.
15290         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15291         Function removed.
15292         (grub_arch_dl_relocate_symbols): Likewise.
15293         (grub_register_exported_symbols): Likewise.
15295 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15297         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15298         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15299         to fail instead.  Reported by Vincent Pelletier
15300         <subdino2004@yahoo.fr>.
15302         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15303         it is not allocated.  Reported by Vincent Pelletier
15304         <subdino2004@yahoo.fr>.
15306         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15307         output so the output looks better.
15309 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15311         Modulize the partition map support and add support for the amiga
15312         partition map.
15314         * commands/ls.c: Include <grub/partition.h> instead of
15315         <grub/machine/partition.h>.
15316         * kern/disk.c: Likewise.
15317         * kern/rescue.c: Likewise.
15318         * loader/i386/pc/chainloader.c: Likewise.
15319         * normal/cmdline.c: Likewise.
15320         * kern/powerpc/ieee1275/init.c: Likewise.
15321         (grub_machine_init): Call `grub_pc_partition_map_init',
15322         `grub_amiga_partition_map_init' and
15323         `grub_apple_partition_map_init'.
15324         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15325         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15326         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15327         `partition.h' and `pc_partition.h'.
15328         (grub_setup_SOURCES): Remove
15329         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15330         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15331         (grub_emu_SOURCES): Likewise.
15332         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15333         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15334         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15335         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15336         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15337         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15338         (grubof_SOURCES): Likewise.
15339         * disk/i386/pc/partition.c: File removed.
15340         * disk/powerpc/ieee1275/partition.c: Likewise.
15341         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15342         * include/grub/i386/pc/partition.h: Likewise.
15343         * kern/partition.c: New file.
15344         * partmap/amiga.c: Likewise.
15345         * partmap/apple.c: Likewise.
15346         * partmap/pc.c: Likewise.
15347         * include/grub/partition.h: Likewise..
15348         * include/grub/pc_partition.h: Likewise.
15349         * util/grub-emu.c: Include <grub/partition.h> instead of
15350         <grub/machine/partition.h>.
15351         (main): Call `grub_pc_partition_map_init',
15352         `grub_amiga_partition_map_init' and
15353         `grub_apple_partition_map_init' and deinitialize afterwards.
15354         * util/i386/pc/biosdisk.c: Include `#include
15355         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15356         `<grub/machine/partition.h>'.
15357         * util/i386/pc/grub-setup.c: Likewise.
15358         * util/i386/pc/biosdisk.c: Likewise.
15359         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15360         partition information in case of a PC partition.
15361         * util/i386/pc/grub-setup.c: Include `#include
15362         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15363         `<grub/machine/partition.h>'.
15364         (setup): Only access the PC specific partition information in case
15365         of a PC partition.
15367 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15369         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15370         (grub_longjmp): Likewise.
15371         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15372         20.
15373         * normal/powerpc/setjmp.S: New file.
15374         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15375         `normal/powerpc/setjmp.S'.
15376         (grubof_CFLAGS): Add `-DGRUBOF'.
15377         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15378         [GRUB_UTIL && !GRUBOF].
15380 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15382         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15383         property named `name'.  Correctly handle the error returned by
15384         `grub_ieee1275_finddevice' if a device can not be opened.
15386 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15388         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15389         `actual' for negativity.
15390         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15391         kern/fshelp.c.
15393 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15395         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15396         (PAGE_OFFSET): New macro.
15397         (CRTC_ADDR_PORT): Likewise.
15398         (CRTC_DATA_PORT): Likewise.
15399         (START_ADDR_HIGH_REGISTER): Likewise.
15400         (START_ADDR_LOW_REGISTER): Likewise.
15401         (GRAPHICS_ADDR_PORT): Likewise.
15402         (GRAPHICS_DATA_PORT): Likewise.
15403         (READ_MAP_REGISTER): Likewise.
15404         (INPUT_STATUS1_REGISTER): Likewise.
15405         (INPUT_STATUS1_VERTR_BIT): Likewise.
15406         (page): New variable.
15407         (wait_vretrace): New function.
15408         (set_read_map): Likewise.
15409         (set_start_address): Likewise.
15410         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15411         the right page.
15412         (check_vga_mem): Take the page into account.
15413         (write_char): Likewise.
15414         (write_cursor): Likewise.
15415         (scroll_up): Likewise.  Copy the page to the page that is not
15416         shown and switch between both pages.
15417         (grub_vga_putchar): Fix off by one error.
15418         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15419         account.
15421 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15423         Add support for iso9660 (including rockridge).
15425         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15426         (iso9660_mod_SOURCES): New variable.
15427         (iso9660_mod_CFLAGS): Likewise.
15428         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15429         * include/grub/fs.h (grub_iso9660_init): New prototype.
15430         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15431         * fs/iso9660.c: New file.
15433         * include/grub/misc.h (grub_strncat): New prototype.
15434         * kern/misc.c (grub_strncat): New function.
15436         * fs/hfs.c (grub_hfs_mount): Translate the error
15437         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15438         * fs/jfs.c (grub_jfs_mount): Likewise.
15439         * fs/ufs.c (grub_ufs_mount): Likewise.
15441 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
15443         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15444         which initialized BAT registers.
15445         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15446         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15447         Move from here...
15448         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15449         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15450         ... to here.
15451         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15452         (grub_mapclaim): Likewise.
15453         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15454         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
15455         hand.
15457 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
15459         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15460         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15461         -ffreestanding and -msoft-float.
15463 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
15465         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15466         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15467         set in grub_ieee1275_flags.
15469 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
15471         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15472         prototype.
15473         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15474         grub_console_init first.
15475         Change the memory range used for grub_ieee1275_claim and
15476         grub_mm_init_region.
15477         Print an error message if the claim fails.
15478         Include <grub/misc.h>.
15480 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
15482         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15483         Call grub_children_iterate for device nodes of type `scsi',
15484         `ide', or `ata'.
15485         (grub_ofdisk_open): Remove manual device alias resolution.
15486         Fix memory leak when device cannot be opened.
15487         * include/grub/powerpc/ieee1275/ieee1275.h
15488         (grub_children_iterate): New prototype.
15489         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15490         New function.
15491         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15492         Return -1 if args.size was -1.
15494 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15496         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15497         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15498         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15499         Open Firmware's memory for it; claim memory from _start to _end.
15500         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15501         (_end): New extern.
15502         (_start): Zero BSS from __bss_start to _end.
15503         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15504         New extern.
15505         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15507 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
15509         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15510         -1 if args.base was -1.
15512 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
15514         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15515         escape sequence instead of a literal ^L. Also call
15516         grub_ofconsole_gotoxy.
15518 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
15520         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15521         void *  arguments to grub_addr_t.  All callers updated.  Also make
15522         the `result' argument optional.
15523         (grub_ieee1275_release): change void * arguments to grub_addr_t.
15524         All callers updated.
15526 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
15528         * commands/ls.c (grub_ls_list_files): Use the string following the
15529         initial ')', if present, as the filesystem path.
15530         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15532         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15534 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
15536         Make the source code of the menu interface more readable.
15538         * normal/menu.c: Include grub/mm.h.
15539         (TERM_WIDTH): New macro.
15540         (TERM_HEIGHT): Likewise.
15541         (TERM_INFO_HEIGHT): Likewise.
15542         (TERM_MARGIN): Likewise.
15543         (TERM_SCROLL_WIDTH): Likewise.
15544         (TERM_TOP_BORDER_Y): Likewise.
15545         (TERM_LEFT_BORDER_X): Likewise.
15546         (TERM_BORDER_WIDTH): Likewise.
15547         (TERM_MESSAGE_HEIGHT): Likewise.
15548         (TERM_BORDER_HEIGHT): Likewise.
15549         (TERM_NUM_ENTRIES): Likewise.
15550         (TERM_FIRST_ENTRY_Y): Likewise.
15551         (TERM_ENTRY_WIDTH): Likewise.
15552         (TERM_CURSOR_X): Likewise.
15553         (draw_border): Use macros instead of magic numbers.
15554         (print_entry): Likewise.
15555         (print_entries): Likewise.
15556         (run_menu): Likewise. Also, handle the key 'e'.
15557         (run_menu_entry): Ignore empty command lines.
15558         (print_message): Added a new argument EDIT. If EDIT is true,
15559         print a different message.
15560         (init_page): Likewise.
15561         (edit_menu_entry): New function. Not implemented yet.
15563 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
15565         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15566         can be loaded from normal mode.
15568         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15569         `multiboot.mod'.
15570         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15571         (multiboot_mod_CFLAGS): New variables.
15572         * loader/i386/pc/linux_normal.c: New file.
15573         * loader/i386/pc/multiboot_normal.c: Likewise.
15575         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15576         attribute `unused'.
15578         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
15579         `fdiro' to read the mode information from instead of `diro'.
15581         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15582         looking up a symlink.
15584         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15585         macro.
15586         * normal/command.c (grub_command_execute): Don't parse the
15587         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15588         flags of the command.
15590         * normal/menu.c (grub_menu_run): Fix typo.
15592 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
15594         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15596         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15597         `y + 1' instead of `y - 1'.
15599         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15601 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
15603         From Hollis Blanchard <hollis@penguinppc.org>:
15604         * kern/misc.c (memmove): New alias for grub_memmove.
15605         (memcmp): New alias for grub_memcmp.
15606         (memset): New alias for grub_memset.
15607         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15608         Change "int handle" to "grub_ieee1275_phandle_t handle".
15609         * include/grub/powerpc/ieee1275/ieee1275.h
15610         (grub_ieee1275_get_property): Likewise.
15612 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
15614         Added normal mode command `chainloader' as module chain.mod, which
15615         depends on normal.mod and _chain.mod.
15617         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15618         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15619         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15620         Deleted prototype.
15621         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15622         but arguments parsing moved to ...
15623         (grub_chainloader_cmd): ... here.  New function.
15624         * include/grub/i386/pc/chainloader.h: New file.
15625         * loader/i386/pc/chainloader_normal.c: Likewise.
15627 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
15629         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15630         (grub_mkimage_LDFLAGS): Likewise.
15631         (grub_emu_SOURCES): Likewise.
15632         (kernel_img_HEADERS): Added fshelp.h.
15633         * fs/ext2.c: Include <grub/fshelp.h>.
15634         (FILETYPE_REG): New macro.
15635         (FILETYPE_INO_REG): Likewise.
15636         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15637         Changed all users.
15638         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
15639         all users.
15640         (grub_fshelp_node): New struct.
15641         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
15642         to a pointer.
15643         (grub_ext2_get_file_block): Removed function.
15644         (grub_ext2_read_block): New function.
15645         (grub_ext2_read_file): Replaced parameter `data' by `node'.
15646         This function was written.
15647         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
15648         (grub_ext2_find_file): Removed function.
15649         (grub_ext2_read_symlink): New function.
15650         (grub_ext2_iterate_dir): Likewise.
15651         (grub_ext2_open): Rewritten.
15652         (grub_ext2_dir): Rewritten.
15653         * include/grub/fshelp.h: New file.
15654         * fs/fshelp.c: Likewise.
15656 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
15658         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15659         (print_message): Add a missing newline.
15660         (run_menu): Added timeout support.
15661         (run_menu_entry): New local function.
15662         (grub_menu_run): Added support for booting.
15664         * kern/loader.c (grub_loader_is_loaded): New function.
15666         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15667         (grub_get_rtc): Exported.
15669         * include/grub/i386/pc/time.h: Include grub/symbol.h.
15670         (grub_get_rtc): Exported.
15672         * include/grub/normal.h (struct grub_command_list): Remove
15673         constant from the member `command'.
15675         * include/grub/loader.h (grub_loader_is_loaded): Declared.
15677         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15679         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15681 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
15683         Add support for the JFS filesystem.
15685         * fs/jfs.c: New file.
15686         * include/grub/fs.h (grub_jfs_init): New prototype.
15687         (grub_jfs_fini): New prototype.
15688         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15689         (grub_emu_SOURCES): Likewise.
15690         (pkgdata_MODULES): Add jfs.mod.
15691         (jfs_mod_SOURCES): New variable.
15692         (jfs_mod_CFLAGS): Likewise.
15693         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15694         (grubof_SOURCES): Likewise.
15695         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15697         * fs/fat.c (grub_fat_find_dir): Convert the filename little
15698         endian to the host endian.
15699         (grub_fat_utf16_to_utf8): Move function from there...
15700         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
15701         the endianness of the source string anymore.
15702         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15704 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
15706         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15707         (grub_boot_fini) [GRUB_UTIL]: Likewise.
15708         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15709         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15711         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15712         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
15713         for `node_found' and `it_dir'.
15714         (grub_hfs_dir): Add prototype for `dir_hook'.
15716         * fs/minix.c (grub_minix_get_file_block): Add prototype for
15717         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
15718         and `indir32' to silence a gcc warning.
15720         * include/grub/fs.h (grub_hfs_init): New prototype.
15721         (grub_hfs_fini): Likewise.
15724 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15726         Each disk device has its own id now. This is useful to make use
15727         of multiple disk devices.
15729         * include/grub/disk.h (grub_disk_dev_id): New enum.
15730         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15731         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15733         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15734         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15736         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15737         GRUB_DISK_DEVICE_OFDISK_ID as an id.
15739         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15740         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15742         * include/grub/disk.h (struct grub_disk_dev): Added a new member
15743         "id" which is used by the cache manager.
15745         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15746         of just "GRUB".
15748 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
15750         * fs/hfs.c: New file.
15751         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15752         (grub_emu_SOURCES): Likewise.
15753         (pkgdata_MODULES): Add hfs.mod.
15754         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15755         (grubof_SOURCES): Likewise.
15756         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15758         * include/grub/misc.h (grub_strncasecmp): Add prototype.
15759         * kern/misc.c (grub_strncasecmp): Add function.
15761 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
15763         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15764         with parentheses.
15766         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15767         (grub_ext2_dir): In case the directory entry type is unknown, read
15768         it from the inode.
15770 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
15772         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15773         grub_load_linux instead of grub_rescue_cmd_linux as second
15774         argument of grub_rescue_register_command.
15776         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15778 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
15780         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15781         function.
15782         * commands/boot.c: Remove the check for `GRUB_UTIL'.
15783         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15784         `loader/powerpc/ieee1275/linux.c',
15785         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15786         * include/grub/powerpc/ieee1275/ieee1275.h
15787         (grub_ieee1275_release): New prototype.
15788         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15789         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15790         normal, boot, linux and linux_normal.
15791         * loader/powerpc/ieee1275/linux.c: New file.
15792         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15794 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
15796         * normal/arg.c (grub_arg_parse): Correct error handling after
15797         reallocating the argumentlist (check if `argl' is not null instead
15798         of checking if `args' is not null).
15799         * kern/mm.c (grub_realloc): Return the same pointer when using the
15800         same region, instead of returning the header address.
15802 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15804         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15805         one block instead of two when looking for the initial partition.
15806         (grub_partition_probe): Initialize the local variable `p' with 0.
15807         Use base 10 for the grub_strtoul call.
15808         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
15809         need for one local variable.
15810         (grub_strtoul): Don't add the new value to `num', instead of that
15811         just assign it.
15813 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
15815         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15816         (pxeboot_img_SOURCES): New variable.
15817         (pxeboot_img_ASFLAGS): Likewise.
15818         (pxeboot_img_LDFLAGS): Likewise.
15819         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
15820         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
15821         <lode_leroy@hotmail.com>.
15823 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15825         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15826         there was no input.
15828 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15830         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
15831         the history buffer logic.
15833 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
15835         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15836         (FILETYPE_INO_SYMLINK): New macros.
15837         (grub_ext2_find_file): Check if the node is a directory using the
15838         inode stat information instead of using the filetype in the
15839         dirent.  Exclude the first character of an absolute symlink.
15840         (grub_ext2_dir): Mask out the filetype part of the mode member of
15841         the inode.
15843 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
15845         Add support for UFS version 1 and 2.  Add support for the minix
15846         filesystem version 1 and 2, both the variants with 14 and 30 long
15847         filenames.
15849         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15850         fs/minix.c.
15851         (grub_emu_SOURCES): Likewise.
15852         (pkgdata_MODULES): Add ufs.mod and minix.mod.
15853         (ufs_mod_SOURCES): New variable.
15854         (ufs_mod_CFLAGS): Likewise.
15855         (minix_mod_SOURCES): Likewise.
15856         (minix_mod_CFLAGS): Likewise.
15857         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15858         fs/minix.c.
15859         (grubof_SOURCES): Likewise.
15860         * fs/ufs.c: New file.
15861         * fs/minix.c: New file.
15862         * include/grub/fs.h (grub_ufs_init): New prototype.
15863         (grub_ufs_fini): Likewise.
15864         (grub_minix_init): Likewise.
15865         (grub_minix_fini): Likewise.
15866         * util/grub-emu.c (main): Initialize and deinitialize UFS and
15867         minix fs.
15869 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
15871         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15872         commands/ls.c, commands/terminal.c, commands/boot.c,
15873         commands/cmp.c and commands/cat.c.
15874         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15876         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15877         "env.h"
15879 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15881         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15882         and grub_, respectively. Because the conversion is trivial and
15883         mechanical, I omit the details here. Please refer to the CVS
15884         if you need more information.
15886 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
15888         * include/pupa: Renamed to ...
15889         * include/grub: ... this.
15890         * util/i386/pc/pupa-mkimage.c: Renamed to ...
15891         * util/i386/pc/grub-mkimage.c: ... this.
15892         * util/i386/pc/pupa-setup.c: Renamed to ...
15893         * util/i386/pc/grub-setup.c: ... this.
15894         * util/pupa-emu.c: Renamed to ...
15895         * util/grub-emu.c: ... this.
15897 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
15899         Add support for the newworld apple macintosh (PPC).  This has been
15900         tested on the powerbook 2000 only.  It only adds support for
15901         generic ieee1275 functions, console and disk support.  This should
15902         be easy to port to other architectures with support for Open
15903         Firmware.
15905         * configure.ac: Accept the powerpc as host_cpu.  In the case of
15906         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
15907         specific tests are only executed while building for the i386.
15908         Inverse test for crosscompile.
15909         * genmk.rb (Utility): Allow assembler files.
15910         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15911         * conf/powerpc-ieee1275.rmk: New file.
15912         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15913         * disk/powerpc/ieee1275/partition.c: Likewise.
15914         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15915         * include/pupa/powerpc/ieee1275/console.h: Likewise.
15916         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15917         * include/pupa/powerpc/ieee1275/time.h: Likewise.
15918         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15919         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15920         * include/pupa/powerpc/ieee1275/loader.h
15921         * include/pupa/powerpc/setjmp.h: Likewise.
15922         * include/pupa/powerpc/types.h: Likewise.
15923         * kern/powerpc/ieee1275/init.c: Likewise.
15924         * kern/powerpc/ieee1275/openfw.c: Likewise.
15925         * term/powerpc/ieee1275/ofconsole.c: Likewise.
15927         These files were written by Johan Rydberg
15928         (jrydberg@night.trouble.net) and I only modified them slightly.
15930         * boot/powerpc/ieee1275/cmain.c: New file.
15931         * boot/powerpc/ieee1275/crt0.S: Likewise.
15932         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15933         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15935 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
15937         * Makefile.in: Update copyright.
15938         * genmodsrc.sh: Likewise.
15939         * gensymlist.sh: Likewise.
15940         * term/i386/pc/vga.c: Indent correctly.
15942         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15943         bugreporting address.
15944         * util/i386/pc/pupa-setup.c (usage): Likewise,
15945         (main): Call pupa_ext2_init and pupa_ext2_fini.
15947         * fs/fat.c (log2): Renamed to ...
15948         (fat_log2): ... this.
15949         All callers changed.
15950         * kern/misc.c (memcpy): Alias to pupa_memmove.
15951         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15952         lvalue cast.
15953         * util/console.c (pupa_ncurses_fini): Return 0.
15955         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15956         Move fail label here.
15957         [__GNU__]: Don't warn when using stat.
15958         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15959         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15960         long int. Use strtol instead of strtoul.
15962 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
15964         * commands/boot.c: New file.
15965         * commands/cat.c: Likewise.
15966         * commands/cmp.c: Likewise.
15967         * commands/ls.c: Likewise.
15968         * commands/terminal.c: Likewise.
15969         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15970         (pupa_register_command): Changed interface to match the new
15971         argument parser.
15972         (pupa_command_execute): Changed (almost rewritten) so it uses
15973         pupa_split_command.  Added support for setting variables using the
15974         syntax `foo=bar'.
15975         (rescue_command): Changed to work with the new argument parser.
15976         (terminal_command): Moved from here to commands/terminal.c.
15977         (set_command): New function.
15978         (unset_command): New function.
15979         (insmod_command): New function.
15980         (rmmod_command): New function.
15981         (lsmod_command): New function.
15982         (pupa_command_init): Don't initialize the command terminal
15983         anymore.  Initialize the commands set, unset, insmod, rmmod and
15984         lsmod.
15985         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15986         (kernel_img_HEADERS): Add arg.h and env.h.
15987         (pupa_mkimage_LDFLAGS): Add kern/env.c.
15988         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15989         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15990         normal/arg.c.
15991         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15992         terminal.mod.
15993         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15994         (boot_mod_SOURCES): New variable.
15995         (terminal_mod_SOURCES): Likewise.
15996         (ls_mod_SOURCES): Likewise.
15997         (cmp_mod_SOURCES): Likewise.
15998         (cat_mod_SOURCES): Likewise.
16000         * normal/arg.c: New file.
16001         * kern/env.c: Likewise.
16002         * include/pupa/arg.h: Likewise.
16003         * include/pupa/env.h: Likewise.
16004         * font/manager.c (font_command): Changed to match argument parsing
16005         interface changes.
16006         (PUPA_MOD_INIT): Likewise.
16007         * hello/hello.c (pupa_cmd_hello): Likewise.
16008         (PUPA_MOD_INIT): Likewise.
16009         * include/pupa/disk.h: Include <pupa/device.h>.
16010         (pupa_print_partinfo): New prototype.
16011         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16012         (pupa_dl_get_prefix): Likewise.
16013         * include/pupa/misc.h: Include <pupa/err.h>.
16014         (pupa_isgraph): New prototype.
16015         (pupa_isdigit): Likewise.
16016         (pupa_split_cmdline): Likewise.
16017         * include/pupa/normal.h: Include <pupa/arg.h>.
16018         (pupa_command): Changed the prototype of the member `func' to
16019         match the argument parsing interface.  Added member `options'.
16020         (pupa_register_command): Updated to match function.
16021         (pupa_arg_parse): New prototype.
16022         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16023         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16024         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16025         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16026         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16027         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16028         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16029         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16030         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16031         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16032         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16033         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16034         * kern/disk.c: Include <pupa/file.h>.
16035         (pupa_print_partinfo): New function.
16036         * kern/dl.c: Include <pupa/env.h>.
16037         (pupa_dl_dir): Variable removed.
16038         (pupa_dl_load): Use the environment variable `prefix' instead of
16039         the variable pupa_dl_dir.
16040         (pupa_dl_set_prefix): Function removed.
16041         (pupa_dl_get_prefix): Likewise.
16042         * kern/i386/pc/init.c: Include <pupa/env.h>.
16043         (pupa_machine_init): Use the environment variable `prefix' instead of
16044         using pupa_dl_set_prefix to set the prefix.
16045         * kern/main.c: Include <pupa/env.h>.
16046         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16047         using pupa_dl_get_prefix to get the prefix.
16048         * kern/misc.c: Include <pupa/env.h>.
16049         (pupa_isdigit): New function.
16050         (pupa_isgraph): Likewise.
16051         (pupa_ftoa): Likewise.
16052         (pupa_vsprintf): Added support for printing values of the type
16053         `double'.  Make it possible to format variable output when using
16054         formatting like `%1.2%f'.
16055         (pupa_split_cmdline): New function.
16056         * kern/rescue.c: Include <pupa/env.h>.
16057         (next_word): Removed function.
16058         (pupa_rescue_cmd_prefix): Likewise.
16059         (pupa_rescue_cmd_set): New function.
16060         (pupa_rescue_cmd_unset): New function.
16061         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16062         split the command line instead of splitting it here.  Added
16063         support for setting variables using the syntax `foo=bar'.  Don't
16064         initialize the prefix command anymore.  Initialized the set and
16065         unset commands.
16066         * normal/cmdline.c: Include <pupa/env.h>.
16067         (pupa_tab_complete): Added prototypes for print_simple_completion,
16068         print_partition_completion, add_completion, iterate_commands,
16069         iterate_dev, iterate_part and iterate_dir. Moved code to print
16070         partition information from here to kern/disk.c.
16071         (pupa_cmdline_run): Don't check if the function exists anymore.
16072         * normal/main.c: Include <pupa/env.h>.
16073         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16074         instead of using pupa_dl_get_prefix to get the prefix.
16075         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16076         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16077         warning.
16078         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16079         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16080         ((unused))' to silence a gcc warning.
16081         (pupa_vga_setcolor): Likewise.
16082         (debug_command): Changed to match argument parsing
16083         interface changes.
16084         * util/pupa-emu.c: Include <pupa/env.h>.
16085         (options): Added 0's for unused fields to silence a gcc warning.
16086         (argp): Likewise.
16087         (main): Use the environment variable `prefix' instead of using
16088         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16089         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16090         and terminal.
16092         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16093         * util/misc.c: Include <malloc.h>.
16094         (pupa_malloc): Rewritten so errors are correctly reported.
16095         (pupa_realloc): Likewise.
16096         (pupa_memalign): Likewise.
16097         (pupa_mm_init_region): Declare unused variables with
16098         `__attribute__ ((unused))' to silence a gcc warning.
16099         * normal/i386/setjmp.S: Remove tab at the end of the file to
16100         silence a gcc warning.
16101         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16102         variables with `__attribute__ ((unused))' to silence a gcc
16103         warning.
16104         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16105         local variable i unsigned to silence a gcc warning.
16107         * kern/term.c: Include <pupa/misc.h>.
16108         (pupa_more_lines): New variable.
16109         (pupa_more): Likewise.
16110         (pupa_putcode): When the pager is active pause at the end of every
16111         screen.
16112         (pupa_set_more): New function.
16113         * include/pupa/term.h (pupa_set_more): New prototype.
16116 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16118         Now this project is GRUB 2 rather than PUPA. The location of
16119         the CVS repository was moved to GRUB's.
16121         * configure.ac: Use bug-grub as the reporting address.
16122         Use GRUB instead of PUPA.
16123         Change the version number to 1.90.
16125 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16127         * genkernsyms.sh: Updated copyright information.
16128         * genmk.rb: Likewise.
16129         * genmodsrc.sh: Likewise.
16130         * gensymlist.sh: Likewise.
16131         * boot/i386/pc/boot.S: Likewise.
16132         * boot/i386/pc/diskboot.S: Likewise.
16133         * disk/i386/pc/biosdisk.c: Likewise.
16134         * disk/i386/pc/partition.c: Likewise.
16135         * font/manager.c: Likewise.
16136         * fs/ext2.c: Likewise.
16137         * fs/fat.c: Likewise.
16138         * include/pupa/boot.h: Likewise.
16139         * include/pupa/device.h: Likewise.
16140         * include/pupa/disk.h: Likewise.
16141         * include/pupa/dl.h: Likewise.
16142         * include/pupa/elf.h: Likewise.
16143         * include/pupa/err.h: Likewise.
16144         * include/pupa/file.h: Likewise.
16145         * include/pupa/font.h: Likewise.
16146         * include/pupa/fs.h: Likewise.
16147         * include/pupa/kernel.h: Likewise.
16148         * include/pupa/loader.h: Likewise.
16149         * include/pupa/misc.h: Likewise.
16150         * include/pupa/mm.h: Likewise.
16151         * include/pupa/net.h: Likewise.
16152         * include/pupa/normal.h: Likewise.
16153         * include/pupa/rescue.h: Likewise.
16154         * include/pupa/setjmp.h: Likewise.
16155         * include/pupa/symbol.h: Likewise.
16156         * include/pupa/term.h: Likewise.
16157         * include/pupa/types.h: Likewise.
16158         * include/pupa/i386/setjmp.h: Likewise.
16159         * include/pupa/i386/types.h: Likewise.
16160         * include/pupa/i386/pc/biosdisk.h: Likewise.
16161         * include/pupa/i386/pc/boot.h: Likewise.
16162         * include/pupa/i386/pc/console.h: Likewise.
16163         * include/pupa/i386/pc/init.h: Likewise.
16164         * include/pupa/i386/pc/kernel.h: Likewise.
16165         * include/pupa/i386/pc/linux.h: Likewise.
16166         * include/pupa/i386/pc/loader.h: Likewise.
16167         * include/pupa/i386/pc/memory.h: Likewise.
16168         * include/pupa/i386/pc/multiboot.h: Likewise.
16169         * include/pupa/i386/pc/partition.h: Likewise.
16170         * include/pupa/i386/pc/time.h: Likewise.
16171         * include/pupa/i386/pc/vga.h: Likewise.
16172         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16173         * include/pupa/util/getroot.h: Likewise.
16174         * include/pupa/util/misc.h: Likewise.
16175         * include/pupa/util/resolve.h: Likewise.
16176         * kern/device.c: Likewise.
16177         * kern/disk.c: Likewise.
16178         * kern/dl.c: Likewise.
16179         * kern/err.c: Likewise.
16180         * kern/file.c: Likewise.
16181         * kern/fs.c: Likewise.
16182         * kern/loader.c: Likewise.
16183         * kern/main.c: Likewise.
16184         * kern/misc.c: Likewise.
16185         * kern/mm.c: Likewise.
16186         * kern/rescue.c: Likewise.
16187         * kern/term.c: Likewise.
16188         * kern/i386/dl.c: Likewise.
16189         * kern/i386/pc/init.c: Likewise.
16190         * kern/i386/pc/lzo1x.S: Likewise.
16191         * kern/i386/pc/startup.S: Likewise.
16192         * loader/i386/pc/chainloader.c: Likewise.
16193         * loader/i386/pc/linux.c: Likewise.
16194         * loader/i386/pc/multiboot.c: Likewise.
16195         * normal/cmdline.c: Likewise.
16196         * normal/command.c: Likewise.
16197         * normal/main.c: Likewise.
16198         * normal/menu.c: Likewise.
16199         * normal/i386/setjmp.S: Likewise.
16200         * term/i386/pc/console.c: Likewise.
16201         * term/i386/pc/vga.c: Likewise.
16202         * util/console.c: Likewise.
16203         * util/genmoddep.c: Likewise.
16204         * util/misc.c: Likewise.
16205         * util/pupa-emu.c: Likewise.
16206         * util/resolve.c: Likewise.
16207         * util/unifont2pff.rb: Likewise.
16208         * util/i386/pc/biosdisk.c: Likewise.
16209         * util/i386/pc/getroot.c: Likewise.
16210         * util/i386/pc/pupa-mkimage.c: Likewise.
16211         * util/i386/pc/pupa-setup.c: Likewise.
16213 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16215         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16216         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16217         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16218         reading and reset it after reading.
16219         (pupa_ext2_close): Return PUPA_ERR_NONE.
16221         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16222         Correct value.
16223         (struct linux_kernel_header): Add kernel_version and
16224         initrd_addr_max.
16225         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16226         pupa_file_read succeeds.
16227         (pupa_rescue_cmd_initrd): Implement.
16229 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16231         * fs/ext2.c (pupa_ext2_label): New function.
16232         (pupa_ext2_fs): Added label.
16233         * fs/fat.c (pupa_fat_label): New function.
16234         (pupa_fat_fs): Added label.
16235         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16237         * kern/misc.c (pupa_strndup): New function.
16238         * include/pupa/misc.h (pupa_strndup): New prototype.
16240         * include/pupa/normal.h: Include <pupa/err.h>.
16241         (pupa_set_history): New prototype.
16242         (pupa_iterate_commands): New prototype.
16243         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16244         <pupa/disk.h>, <pupa/file.h>.
16245         (hist_size): New variable.
16246         (hist_lines): Likewise.
16247         (hist_end): Likewise.
16248         (hist_used): Likewise.
16249         (pupa_set_history): New function.
16250         (pupa_history_get): Likewise.
16251         (pupa_history_add): Likewise.
16252         (pupa_history_replace): Likewise.
16253         (pupa_tab_complete): Likewise.
16254         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16255         completion shows partitionnames while completing partitions, this
16256         feature was suggested by Jeff Bailey.
16257         * normal/command.c (pupa_iterate_commands): New function.
16258         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16259         (pupa_normal_init): Initialize history buffer.
16260         (PUPA_MOD_INIT): Likewise.
16261         (pupa_normal_fini): Free the history buffer.
16262         (PUPA_MOD_FINI): Likewise.
16264         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16265         key.
16267         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16268         * configure.ac [i386]: Check for regparam bug.
16269         (NESTED_FUNC_ATTR) [! i386]: Defined.
16271 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16273         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16274         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16275         (pupa_emu_SOURCES): New variable.
16276         (pupa_emu_LDFLAGS): Likewise.
16277         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16278         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16279         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16280         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16281         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16282         (pupa_jmp_buf): New typedef.
16283         (pupa_setjmp) [PUPA_UTIL]: New macro.
16284         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16285         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16286         (pupa_refresh): New prototype.
16287         * include/pupa/util/getroot.h: New file.
16288         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16289         it.
16290         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16291         (pupa_rescue_cmd_cat): Likewise.
16292         (pupa_rescue_cmd_ls): Likewise.
16293         (pupa_rescue_cmd_testload): Likewise.
16294         (pupa_rescue_cmd_lsmod): Likewise.
16295         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16296         * normal/menu.c (run_menu): Likewise.
16297         * kern/term.c (pupa_cls): Likewise.
16298         (pupa_refresh): New function.
16299         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16300         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16301         * util/console.c: New file.
16303         * util/i386/pc/getroot.c: New file.
16304         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16305         (pupa_putchar): New function.
16306         (pupa_refresh): Likewise.
16307         (xgetcwd): Function moved to ...
16308         (strip_extra_slashes): Likewise.
16309         (get_prefix): Likewise.
16310         * util/i386/pc/getroot.c: ... here.
16311         (find_root_device): Function moved and renamed to...
16312         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16313         Changed all callers.
16314         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16315         and renamed to...
16316         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16317         Changed all callers.
16318         * util/misc.c (pupa_memalign): New function.
16319         (pupa_mm_init_region): Likewise.
16320         (pupa_register_exported_symbols): Likewise.
16321         (pupa_putchar): Function removed.
16322         * util/pupa-emu.c: New file.
16324 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16326         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16327         (_multiboot_mod_SOURCES): New variable.
16328         (_multiboot_mod_CFLAGS): Likewise.
16329         * loader/i386/pc/multiboot.c: New file.
16330         * include/pupa/i386/pc/multiboot.h: Likewise.
16331         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16332         (pupa_multiboot_real_boot): New function.
16333         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16334         (pupa_multiboot_real_boot): New prototype.
16335         (pupa_rescue_cmd_multiboot): Likewise
16336         (pupa_rescue_cmd_module): Likewise.
16338         * kern/loader.c (pupa_loader_set): Continue when
16339         pupa_loader_unload_func() fails.
16340         (pupa_loader_unset): New function.
16341         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16343         * kern/misc.c (pupa_stpcpy): New function.
16344         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16346 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16348         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16349         for available extensions.
16351         * include/pupa/i386/pc/time.h: New file.
16352         * kern/disk.c: Include <pupa/machine/time.h>.
16353         (PUPA_CACHE_TIMEOUT): New macro.
16354         (pupa_last_time): New variable.
16355         (pupa_disk_open): Flush the cache when there was a timeout.
16356         (pupa_disk_close): Reset the timer.
16357         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16358         pupa_currticks.
16359         * util/misc.c: Include <sys/times.h>
16360         (pupa_get_rtc): New function.
16362 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16364         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16365         as blocks.
16366         (pupa_ext2_get_file_block): Use blocks member.
16368         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16369         first block. Return -1 instead of pupa_errno on error.
16371 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16373         * README: In the pupa-mkimage example use _chain instead of chain
16374         and ext2 instead of fat.
16375         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16376         adding journal playback for ext2fs.
16377         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16378         (pkgdata_MODULES): Added ext2.mod.
16379         (ext2_mod_SOURCES): New variable.
16380         (ext2_mod_CFLAGS): Likewise.
16381         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16382         * include/pupa/misc.h (pupa_strncpy): New prototype.
16383         (pupa_strcat): Likewise.
16384         (pupa_strncmp): Likewise.
16385         * kern/misc.c (pupa_strcat): Enable function.
16386         (pupa_strncpy): New function.
16387         (pupa_strncmp): Likewise.
16388         * fs/ext2.c: New file.
16390         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16391         when the read failed before retrying.
16392         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16393         (_FILE_OFFSET_BITS): Likewise.
16394         * configure.ac: Added AC_SYS_LARGEFILE.
16396 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16398         * genmk.rb (PModule#rule): Make sure to get only symbol names
16399         from the output of nm.
16400         Reported by Robert Millan <zeratul2@wanadoo.es>.
16402 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16404         I forgot to check in these changes for a long time. This adds
16405         incomplete support for VGA console, and this is still very
16406         buggy. Also, a lot of consideration is required for I18N,
16407         UNICODE, and VGA font issues. Therefore, assume that this is
16408         such that "better than nothing".
16410         * font/manager.c: New file.
16411         * include/pupa/font.h: Likewise.
16412         * include/pupa/i386/pc/vga.h: Likewise.
16413         * term/i386/pc/vga.c: Likewise.
16414         * util/unifont2pff.rb: Likewise.
16416         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16417         (pkgdata_MODULES): Added vga.mod and font.mod.
16418         (vga_mod_SOURCES): New variables.
16419         (vga_mod_CFLAGS): Likewise.
16420         (font_mod_SOURCES): Likewise.
16421         (font_mod_CFLAGS): Likewise.
16423         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16425         * include/pupa/term.h: Include pupa/err.h.
16426         (struct pupa_term): Added init and fini.
16427         Changed the argument of putchar to pupa_uint32_t.
16429         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16430         (pupa_console_real_putchar): New prototype.
16431         (pupa_console_putchar): Removed.
16432         (pupa_console_checkkey): Exported.
16433         (pupa_console_getkey): Likewise.
16435         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16436         characters.
16438         * kern/term.c (pupa_term_set_current): Rewritten.
16439         (pupa_putchar): Likewise.
16440         (pupa_putcode): New function.
16442         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16443         (pupa_console_real_putchar): ... this.
16444         (pupa_vga_set_mode): New function.
16445         (pupa_vga_get_font): Likewise.
16447         * normal/command.c: Include pupa/term.h.
16448         (terminal_command): New function.
16449         (pupa_command_init): Register the command "terminal".
16451         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16452         (DISP_UP): Likewise.
16453         (DISP_RIGHT): Likewise.
16454         (DISP_DOWN): Likewise.
16455         (DISP_HLINE): Likewise.
16456         (DISP_VLINE): Likewise.
16457         (DISP_UL): Likewise.
16458         (DISP_UR): Likewise.
16459         (DISP_LL): Likewise.
16460         (DISP_LR): Likewise.
16462         * term/i386/pc/console.c (pupa_console_putchar): New function.
16464 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
16466         * util/resolve.c (pupa_util_resolve_dependencies): BUG
16467         FIX. Reverse the path_list.
16469         * include/pupa/normal.h: Export pupa_register_command and
16470         pupa_unregister_command.
16472         * hello/hello.c (pupa_cmd_hello): New module.
16473         * conf/i386-pc.rmk: Added hello.mod.
16475 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
16477         * kern/i386/pc/lzo1x.S: New file.
16479         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16480         (compress_kernel): New variable.
16481         (generate_image): Heavily modified to support compressing a
16482         large part of the core image.
16484         * util/misc.c (pupa_util_read_image): Fix a file descriptor
16485         leak.
16486         (pupa_util_load_image): New function.
16488         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16489         (pupa_compressed_size): New variable.
16490         (codestart): Enable Gate A20 here.
16491         Decompress the compressed part of the core image.
16492         Rearrange the code to put functions and variables which are
16493         required for initialization in the non-compressed part.
16494         Include lzo1x.S.
16496         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16497         here.
16499         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16501         * include/pupa/i386/pc/kernel.h
16502         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16503         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16504         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16505         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16506         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16508         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16510         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16511         (Utility#rule): Likewise.
16513         * configure.ac: Check if LZO is available.
16515 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
16517         * include/pupa/normal.h: New file.
16518         * include/pupa/setjmp.h: Likewise.
16519         * include/pupa/i386/setjmp.h: Likewise.
16520         * normal/cmdline.c: Likewise.
16521         * normal/command.c: Likewise.
16522         * normal/main.c: Likewise.
16523         * normal/menu.c: Likewise.
16524         * normal/i386/setjmp.S: Likewise.
16526         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16527         (pupa_rescue_cmd_initrd): Likewise.
16529         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16530         Likewise.
16532         * kern/i386/pc/startup.S (translation_table): New variable.
16533         (translate_keycode): New function.
16534         (pupa_console_getkey): Call translate_keycode.
16536         * kern/rescue.c (attempt_normal_mode): New function.
16537         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16538         it failed, print a message.
16540         * kern/mm.c (pupa_real_malloc): Print more information when a
16541         free magic is broken.
16542         (pupa_free): If the first free header is not free actually, set
16543         it to P.
16545         * kern/main.c (pupa_load_normal_mode): Just load the module
16546         "normal".
16547         (pupa_main): Don't print the message
16548         "Entering into rescue mode..." here.
16550         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16551         Declared.
16552         (pupa_rescue_cmd_initrd): Likewise.
16553         (pupa_rescue_cmd_initrd): Likewise.
16555         * include/pupa/symbol.h (FUNCTION): Specify the type.
16556         (VARIABLE): Likewise.
16558         * include/pupa/err.h (pupa_err_t): Added
16559         PUPA_ERR_UNKNOWN_COMMAND.
16561         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16562         (pupa_dl_get_prefix): Likewise.
16564         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16565         Added _chain.mod and _linux.mod instead of chain.mod and
16566         linux.mod.
16567         (chain_mod_SOURCES): Renamed to ...
16568         (_chain_mod_SOURCES): ... this.
16569         (chain_mod_CFLAGS): Renamed to ...
16570         (_chain_mod_CFLAGS): ... this.
16571         (linux_mod_SOURCES): Renamed to ...
16572         (_linux_mod_SOURCES): ... this.
16573         (linux_mod_CFLAGS): Renamed to ...
16574         (_linux_mod_CFLAGS): ... this.
16575         (normal_mod_SOURCES): New variable.
16576         (normal_mod_CFLAGS): Likewise.
16577         (normal_mod_ASFLAGS): Likewise.
16579 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
16581         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16582         possible.
16584         * kern/dl.c (pupa_dl_ref): Refer depending modules
16585         recursively.
16586         (pupa_dl_unref): Unrefer depending modules recursively.
16587         Don't call pupa_dl_unload implicitly, because PUPA can crash if
16588         a module is unloaded before one depending on that module is
16589         unloaded.
16590         (pupa_dl_unload): Unload depending modules explicitly,
16591         if possible.
16593 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
16595         * include/pupa/i386/pc/linux.h: New file.
16596         * loader/i386/pc/linux.c: Likewise.
16598         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16599         Removed.
16600         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16601         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16602         of PUPA_CHAINLOADER_BOOT_SECTOR.
16604         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16605         (pupa_linux_prot_size): New variable.
16606         (pupa_linux_tmp_addr): Likewise.
16607         (pupa_linux_real_addr): Likewise.
16608         (pupa_linux_boot_zimage): New function.
16609         (pupa_linux_boot_bzimage): Likewise.
16611         * kern/i386/pc/init.c (struct mem_region): New structure.
16612         (MAX_REGIONS): New macro.
16613         (mem_regions): New variable.
16614         (num_regions): Likewise.
16615         (pupa_os_area_addr): Likewise.
16616         (pupa_os_area_size): Likewise.
16617         (pupa_lower_mem): Likewise.
16618         (pupa_upper_mem): Likewise.
16619         (add_mem_region): New function.
16620         (compact_mem_regions): Likewise.
16621         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16622         the size of the conventional memory and that of so-called upper
16623         memory (before the first memory hole).
16624         Instead of adding each found region to free memory, use
16625         add_mem_region and add them after removing overlaps.
16626         Also, add only 1/4 of the upper memory to free memory. The rest
16627         is used for loading OS images. Maybe this is ad hoc, but this
16628         makes it much easier to relocate OS images when booting.
16630         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16631         (pupa_enter_rescue_mode): Don't register initrd and module.
16633         * kern/mm.c: Include pupa/dl.h.
16635         * kern/main.c: Include pupa/file.h and pupa/device.h.
16637         * kern/loader.c (pupa_loader_load_module_func): Removed.
16638         (pupa_loader_load_module): Likewise.
16640         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16641         ``.o''.
16643         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16644         (pupa_linux_tmp_addr): Likewise.
16645         (pupa_linux_real_addr): Likewise.
16646         (pupa_linux_boot_zimage): Likewise.
16647         (pupa_linux_boot_bzimage): Likewise.
16649         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16650         (pupa_upper_mem): Likewise.
16651         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16652         module is too dangerous.
16654         * include/pupa/loader.h (pupa_os_area_addr): Declared.
16655         (pupa_os_area_size): Likewise.
16656         (pupa_loader_set): Remove the first argument. Loader doesn't
16657         manage modules or initrd any longer.
16658         (pupa_loader_load_module): Removed.
16660         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16661         (linux_mod_SOURCES): New variable.
16662         (linux_mod_CFLAGS): Likewise.
16664 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
16666         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16667         the length of a blocklist correctly.
16669         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16670         Use ioctl only if the OS file is a block device.
16671         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16672         not very useful for normal files.
16674         * kern/main.c (pupa_set_root_dev): New function.
16675         (pupa_load_normal_mode): Likewise.
16676         (pupa_main): Call those above.
16678         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16679         pupa_uint16_t.
16681         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16683 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
16685         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16686         (setup): Configure the installed partition information and the
16687         dl prefix.
16689         * loader/i386/pc/chainloader.c (my_mod): New variable.
16690         (pupa_chainloader_unload): New function.
16691         (pupa_rescue_cmd_chainloader): Refer itself.
16692         (PUPA_MOD_INIT): Save its own module in MY_MOD.
16694         * kern/i386/pc/startup.S (install_partition): Removed.
16695         (version_string): Likewise.
16696         (config_file): Likewise.
16697         (pupa_install_dos_part): New variable.
16698         (pupa_install_bsd_part): Likewise.
16699         (pupa_prefix): Likewise.
16700         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16702         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16703         and pupa/misc.h.
16704         (make_install_device): New function.
16705         (pupa_machine_init): Set the dl prefix.
16707         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16708         (buf): Renamed to ...
16709         (linebuf): ... this.
16710         (pupa_rescue_cmd_prefix): New function.
16711         (pupa_rescue_cmd_insmod): Likewise.
16712         (pupa_rescue_cmd_rmmod): Likewise.
16713         (pupa_rescue_cmd_lsmod): Likewise.
16714         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16715         rmmod and lsmod.
16717         * kern/mm.c (pupa_memalign): If failed even after invalidating
16718         disk caches, unload unneeded modules and retry.
16720         * kern/misc.c (pupa_memmove): New function.
16721         (pupa_memcpy): Removed.
16722         (pupa_strcpy): New function.
16723         (pupa_itoa): Made static.
16725         * kern/dl.c (pupa_dl_iterate): New function.
16726         (pupa_dl_ref): Likewise.
16727         (pupa_dl_unref): Likewise.
16728         (pupa_dl_unload): Return if succeeded or not.
16729         (pupa_dl_unload_unneeded): New function.
16730         (pupa_dl_unload_all): Likewise.
16731         (pupa_dl_init): Renamed to ...
16732         (pupa_dl_set_prefix): ... this.
16733         (pupa_dl_get_prefix): New function.
16735         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16736         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16737         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16738         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16739         (pupa_install_dos_part): Declared.
16740         (pupa_install_bsd_part): Likewise.
16741         (pupa_prefix): Likewise.
16742         (pupa_boot_drive): Likewise.
16744         * include/pupa/types.h: Fix a typo.
16746         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16747         pupa_memmove.
16748         (pupa_memmove): Declared.
16749         (pupa_strcpy): Likewise.
16751         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16752         pupa_mod_init takes one argument, its own module.
16753         (pupa_dl_unload_unneeded): Declared.
16754         (pupa_dl_unload_all): Likewise.
16755         (pupa_dl_ref): Likewise.
16756         (pupa_dl_unref): Likewise.
16757         (pupa_dl_iterate): Likewise.
16758         (pupa_dl_init): Renamed to ...
16759         (pupa_dl_set_prefix): ... this.
16760         (pupa_dl_get_prefix): Declared.
16762         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16763         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16764         unloaded.
16765         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16766         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16768         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16769         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16771 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16773         * util/i386/pc/pupa-setup.c (setup): Define the internal
16774         function find_first_partition_start at the top level, because GCC
16775         3.0.x cannot compile internal functions in deeper scopes
16776         correctly.
16777         (find_root_device): Use lstat instead of stat.
16778         Don't follow symbolic links.
16779         Fix the path-constructing code.
16781         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16782         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16783         by a BLKGETSIZE ioctl first, because block devices don't fill
16784         the member st_mode of the structure stat on Linux.
16785         [__linux__] (linux_find_partition): Use a temporary buffer
16786         REAL_DEV for the working space. Copy it to DEV before returning.
16787         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16788         buffer cache consistent.
16789         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16790         strncmp. The previous value was merely wrong.
16791         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16793         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16794         FAT size is 12. The previous value was merely wrong.
16796         * kern/main.c (pupa_main): Don't split the starting message from
16797         newlines.
16799         * kern/term.c (pupa_putchar): Put CR after LF instead of before
16800         LF, because BIOS goes crazy about character attributes in this
16801         case.
16803 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
16805         * include/i386/pc/util/biosdisk.h: New file.
16806         * util/i386/pc/biosdisk.c: Likewise.
16807         * util/i386/pc/pupa-setup.c: Likewise.
16809         * Makefile.in (INCLUDE_DISTFILES): Added
16810         include/pupa/i386/pc/util/biosdisk.h.
16811         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16812         directory util/i386/pc.
16813         (install-local): Added a rule for sbin_UTILITIES.
16814         (uninstall): Likewise.
16816         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16818         * util/misc.c (xrealloc): New function.
16819         (pupa_malloc): Likewise.
16820         (pupa_free): Likewise.
16821         (pupa_realloc): Likewise.
16822         (pupa_stop): Likewise.
16823         (pupa_putchar): Likewise.
16825         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16827         * include/pupa/util/misc.h (xrealloc): Declared.
16829         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16830         macro.
16831         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16832         (PUPA_BOOT_MACHINE_BPB_END): ... this.
16834         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16835         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16837         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16838         way should be implemented.
16839         [PUPA_UTIL] (pupa_fat_fini): Likewise.
16841         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16842         the size of NAME for safety.
16843         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16844         0x88.
16846         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16847         (pupa_setup_SOURCES): Likewise.
16849         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16851 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16853         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16854         bunch of pushl's from pusha, because this destroys the return
16855         value.
16857 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
16859         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16860         This means that any missing prototypes could be fatal. Also, you
16861         must take care when writing assembly code. See the comments at
16862         the beginning of startup.S, for more details.
16864         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16865         compilation mechanism.
16866         (pupa_chainloader_real_boot): Likewise.
16867         (pupa_biosdisk_rw_int13_extensions): Likewise.
16868         (pupa_biosdisk_rw_standard): Likewise.
16869         (pupa_biosdisk_check_int13_extensions): Likewise.
16870         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16871         (pupa_biosdisk_get_diskinfo_standard): Likewise.
16872         (pupa_get_memsize): Likewise.
16873         (pupa_get_mmap_entry): Likewise.
16874         (pupa_console_putchar): Likewise.
16875         (pupa_console_setcursor): Likewise.
16876         (pupa_getrtsecs): Use pushl instead of push.
16878         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16879         memory instead of the stack for a mmap entry, because some
16880         BIOSes may ignore the maximum size and overflow.
16882         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16884         * genmk.rb (PModule#rule): Compile automatically generated
16885         sources with module-specific CFLAGS as well as other sources.
16887 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16889         * configure.ac: Check ld.
16890         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16891         respectively, before checking endianness and sizes.
16893         * Makefile.in (LD): New variable.
16895 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16897         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16899 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
16901         * Changelog: New file.