1 2009-05-08 Pavel Roskin <proski@gnu.org>
3 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
4 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
5 Initialize them with -1. Add sanity check for bad1. Eliminate
8 2009-05-08 David S. Miller <davem@davemloft.net>
10 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
12 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
14 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
17 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
19 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
20 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
22 2009-05-05 David S. Miller <davem@davemloft.net>
24 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
26 2009-05-05 Pavel Roskin <proski@gnu.org>
28 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
29 of grub_dl_ref() and grub_dl_unref().
30 * commands/parttool.c: Remove preprocessor conditionals around
31 grub_dl_ref() and grub_dl_unref().
32 * fs/affs.c: Likewise.
34 * fs/cpio.c: Likewise.
35 * fs/ext2.c: Likewise.
38 * fs/hfsplus.c: Likewise.
39 * fs/iso9660.c: Likewise.
41 * fs/minix.c: Likewise.
42 * fs/ntfs.c: Likewise.
43 * fs/reiserfs.c: Likewise.
48 * include/grub/dl.h: Likewise.
49 * loader/xnu.c: Likewise.
51 2009-05-04 Pavel Roskin <proski@gnu.org>
53 * commands/acpi.c: Remove unused variable my_mod.
54 * partmap/amiga.c: Likewise.
55 * partmap/apple.c: Likewise.
56 * partmap/gpt.c: Likewise.
57 * partmap/pc.c: Likewise.
58 * partmap/sun.c: Likewise.
59 * term/gfxterm.c: Likewise.
60 * term/i386/pc/vesafb.c: Likewise.
61 * term/i386/pc/vga.c: Likewise.
63 2009-05-04 David S. Miller <davem@davemloft.net>
65 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
66 pointer args to grub_ieee1275_get_property().
68 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
70 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
71 devices, and do not traverse down under controller nodes.
73 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
74 (grub_ofdisk_open): Use it to un-escape "," characters.
75 * kern/disk.c (find_part_sep): New.
76 (grub_disk_open): Use it to find the first non-escaped ','
77 character in the disk name.
78 * util/ieee1275/devicemap.c (escape_of_path): New.
79 (grub_util_emit_devicemap_entry): Use it.
80 * util/sparc64/ieee1275/grub-install.in: Update script to
81 strip partition specifiers properly by not triggering on
82 '\' escaped ',' characters.
84 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
86 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
88 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
90 (linux_vesafb_modes): Add a lot of additional modes to the list (based
91 on documentation from Wikipedia).
93 2009-05-04 Pavel Roskin <proski@gnu.org>
95 * disk/ata.c: Spelling fixes.
96 * disk/raid.c: Likewise.
97 * disk/usbms.c: Likewise.
98 * disk/dmraid_nvidia.c: Likewise.
99 * kern/ieee1275/openfw.c: Likewise.
100 * kern/ieee1275/init.c: Likewise.
101 * kern/ieee1275/cmain.c: Likewise.
102 * boot/i386/pc/cdboot.S: Likewise.
103 * video/readers/png.c: Likewise.
104 * video/i386/pc/vbe.c: Likewise.
105 * fs/udf.c: Likewise.
106 * fs/hfs.c: Likewise.
107 * fs/reiserfs.c: Likewise.
108 * efiemu/runtime/efiemu.c: Likewise.
109 * efiemu/main.c: Likewise.
110 * efiemu/mm.c: Likewise.
111 * include/grub/elf.h: Likewise.
112 * include/grub/xnu.h: Likewise.
113 * include/grub/usbdesc.h: Likewise.
114 * include/grub/usb.h: Likewise.
115 * include/grub/script_sh.h: Likewise.
116 * include/grub/lib/LzmaEnc.h: Likewise.
117 * include/grub/efiemu/efiemu.h: Likewise.
118 * include/grub/command.h: Likewise.
119 * normal/menu.c: Likewise.
120 * normal/main.c: Likewise.
121 * normal/datetime.c: Likewise.
122 * bus/usb/uhci.c: Likewise.
123 * mmap/i386/uppermem.c: Likewise.
124 * mmap/mmap.c: Likewise.
125 * commands/acpi.c: Likewise.
126 * commands/test.c: Likewise.
127 * partmap/apple.c: Likewise.
128 * font/font.c: Likewise.
129 * loader/sparc64/ieee1275/linux.c: Likewise.
130 * loader/macho.c: Likewise.
131 * loader/i386/bsd_trampoline.S: Likewise.
132 * loader/i386/bsd.c: Likewise.
133 * loader/xnu.c: Likewise.
134 * term/i386/pc/vesafb.c: Likewise.
135 * term/usb_keyboard.c: Likewise.
136 * util/resolve.c: Likewise.
137 * util/getroot.c: Likewise.
139 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
141 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
143 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
145 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
148 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
150 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
151 parameter only available on BIOS.
153 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
155 Removed wrong semicolon in declaration
157 * grub/misc.h (grub_dprintf): remove semicolon
159 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
161 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
162 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
163 is done by grub_cmd_linux() now).
164 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
165 restore video to text mode.
166 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
167 indicates lack of "vga=" parameter. "vga=0" is mapped to
168 `GRUB_LINUX_VID_MODE_NORMAL'.
170 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
172 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
173 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
174 and `normal/script.c'. Add `kern/rescue_reader.c',
175 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
176 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
179 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
180 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
182 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
183 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
185 * Makefile.in: Remove duplicated 2008 in Copyright line.
187 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
189 * util/misc.c (grub_util_warn): New function. Emmits a warning
191 * include/grub/util/misc.h (grub_util_warn): New declaration.
193 * util/i386/pc/grub-install.in: Understand --force and pass it down
196 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
198 (setup): Improve error messages and add warnings when requested to
199 install in odd layouts. Refuse to install using blocklists unless
202 2009-05-04 martin f. krafft <madduck@madduck.net>
204 * disk/raid.c (grub_raid_scan_device): Improve debug message.
206 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
208 Updated copyright year
210 * fs/hfsplus.c: updated copyright year
212 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
216 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
217 in the space previously used by unused3
218 (grub_hfsplus_uuid): new function
219 (grub_hfsplus_fs): added uuid field
221 2009-05-03 Pavel Roskin <proski@gnu.org>
223 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
224 suppress warnings. It's no longer needed.
225 * disk/host.c: Likewise.
226 * disk/ata_pthru.c: Likewise.
227 * disk/loopback.c: Likewise.
228 * hook/datehook.c: Likewise.
229 * parttool/pcpart.c: Likewise.
230 * fs/i386/pc/pxe.c: Likewise.
231 * fs/ntfscomp.c: Likewise.
232 * efiemu/main.c: Likewise.
233 * mmap/mmap.c: Likewise.
234 * commands/crc.c: Likewise.
235 * commands/hexdump.c: Likewise.
236 * commands/hdparm.c: Likewise.
237 * commands/acpi.c: Likewise.
238 * commands/echo.c: Likewise.
239 * commands/minicmd.c: Likewise.
240 * commands/blocklist.c: Likewise.
241 * commands/memrw.c: Likewise.
242 * commands/loadenv.c: Likewise.
243 * commands/usbtest.c: Likewise.
244 * commands/lsmmap.c: Likewise.
245 * commands/boot.c: Likewise.
246 * commands/parttool.c: Likewise.
247 * commands/configfile.c: Likewise.
248 * commands/search.c: Likewise.
249 * commands/ieee1275/suspend.c: Likewise.
250 * commands/cat.c: Likewise.
251 * commands/i386/pc/pxecmd.c: Likewise.
252 * commands/i386/pc/play.c: Likewise.
253 * commands/i386/pc/halt.c: Likewise.
254 * commands/i386/pc/vbeinfo.c: Likewise.
255 * commands/i386/pc/vbetest.c: Likewise.
256 * commands/lspci.c: Likewise.
257 * commands/date.c: Likewise.
258 * commands/handler.c: Likewise.
259 * commands/ls.c: Likewise.
260 * commands/test.c: Likewise.
261 * commands/cmp.c: Likewise.
262 * commands/efi/loadbios.c: Likewise.
263 * commands/efi/fixvideo.c: Likewise.
264 * commands/halt.c: Likewise.
265 * commands/help.c: Likewise.
266 * commands/reboot.c: Likewise.
267 * hello/hello.c: Likewise.
268 * script/sh/main.c: Likewise.
269 * loader/xnu.c: Likewise.
270 * term/terminfo.c: Likewise.
271 * term/i386/pc/serial.c: Likewise.
272 * term/usb_keyboard.c: Likewise.
274 2009-05-03 David S. Miller <davem@davemloft.net>
276 * normal/menu.c: Include grub/parser.h
278 2009-05-03 Pavel Roskin <proski@gnu.org>
280 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
282 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
283 Suggested by Javier MartÃn <lordhabbit@gmail.com>
285 * util/i386/pc/grub-mkrescue.in: Allow for the case when
286 efiemu??.o doesn't exist.
287 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
290 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
292 FreeBSD 64-bit support
294 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
295 and loader/i386/bsd_trampoline.S
296 (bsd_mod_ASFLAGS): new variable
297 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
298 (FREEBSD_MODTYPE_KERNEL64): likewise
299 (grub_bsd64_trampoline_start): likewise
300 (grub_bsd64_trampoline_end): likewise
301 (grub_bsd64_trampoline_selfjump): likewise
302 (grub_bsd64_trampoline_gdt): likewise
303 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
304 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
305 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
306 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
307 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
309 * loader/i386/bsd_pagetable.c: new file
310 * loader/i386/bsd_trampoline.S: likewise
311 * loader/i386/bsd.c (ALIGN_QWORD): new macro
312 (ALIGN_VAR): likewise
313 (entry_hi): new variable
314 (kern_end_mdofs): likewise
316 (grub_freebsd_add_meta): use ALIGN_VAR
317 (grub_e820_mmap): new declaration
318 (grub_freebsd_add_mmap): new function
319 (grub_freebsd_add_meta_module): support 64 bit kernels
320 (grub_freebsd_list_modules): use ALIGN_VAR
321 (gdt_descriptor): new declaration
322 (grub_freebsd_boot): support 64 bit kernels
323 (grub_bsd_elf64_hook): new function
324 (grub_bsd_load_elf): support elf64
326 2009-05-03 Bean <bean123ch@gmail.com>
328 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
329 after we get the result of if statement.
331 2009-05-03 Bean <bean123ch@gmail.com>
333 * Makefile.in (enable_efiemu): New variable.
335 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
337 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
339 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
340 path, add -mno-red-zone option.
341 (efiemu64_s.o): Likewise.
342 (efiemu64.o): Use macro $^ for source file.
344 * configure.ac (--enable-efiemu): New option.
346 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
350 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
351 (pkglib_MODULES): add xnu.mod
352 (xnu_mod_SOURCES): new variable
353 (xnu_mod_CFLAGS): likewise
354 (xnu_mod_LDFLAGS): likewise
355 (xnu_mod_ASFLAGS): likewise
356 * conf/i386-pc.rmk: likewise
357 * conf/x86_64-efi.rmk: likewise
358 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
360 * include/grub/i386/macho.h: new file
361 * include/grub/i386/xnu.h: likewise
362 * include/grub/macho.h: likewise
363 * include/grub/machoload.h: likewise
364 * include/grub/x86_64/macho.h: likewise
365 * include/grub/x86_64/xnu.h: likewise
366 * include/grub/xnu.h: likewise
367 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
368 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
369 * loader/i386/efi/xnu.c: new file
370 * loader/i386/pc/xnu.c: likewise
371 * loader/i386/xnu.c: likewise
372 * loader/i386/xnu_helper.S: likewise
373 * loader/macho.c: likewise
374 * loader/xnu.c: likewise
375 * loader/xnu_resume.c: likewise
376 * util/grub-dumpdevtree: likewise
377 * include/grub/i386/pit.h: include grub/err.h
378 (grub_pit_wait): export
379 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
381 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
385 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
386 _linux_efi, linux_efi.
387 new files in grub-emu
388 new targets efiemu32.o and efiemu64.o
389 * loader/linux_normal_efiemu.c: likewise
390 * loader/i386/efi/linux.c: added preliminary efiemu support
391 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
393 * include/grub/autoefi.h: new file
394 * include/grub/i386/efiemu.h: likewise
395 * include/grub/i386/pc/efiemu.h: likewise
396 * include/grub/efi/api.h: add LL suffix when necessary
397 new definitions relating to tables
398 * include/grub/efiemu/efiemu.h: new file
399 * include/grub/efiemu/runtime.h: likewise
400 * efiemu/prepare.c: likewise
401 * efiemu/loadcore_common.c: likewise
402 * efiemu/loadcore64.c: likewise
403 * efiemu/runtime/efiemu.sh: likewise
404 * efiemu/runtime/efiemu.S: likewise
405 * efiemu/runtime/efiemu.c: likewise
406 * efiemu/runtime/config.h: likewise
407 * efiemu/prepare32.c: likewise
408 * efiemu/main.c: likewise
409 * efiemu/modules/pnvram.c: likewise
410 * efiemu/modules/i386: likewise
411 * efiemu/modules/i386/pc: likewise
412 * efiemu/modules/acpi.c: likewise
413 * efiemu/i386/pc/cfgtables.c: likewise
414 * efiemu/i386/loadcore64.c: likewise
415 * efiemu/i386/loadcore32.c: likewise
416 * efiemu/prepare64.c: likewise
417 * efiemu/loadcore.c: likewise
418 * efiemu/symbols.c: likewise
419 * efiemu/mm.c: likewise
420 * efiemu/loadcore32.c: likewise
422 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
426 * commands/acpi.c: new file
427 * commands/i386/pc/acpi.c: likewise
428 * commands/efi/acpi.c: likewise
429 * include/grub/acpi.h: likewise
430 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
431 (acpi_mod_SOURCES): new variable
432 (acpi_mod_CFLAGS): likewise
433 (acpi_mod_LDFLAGS): likewise
434 * conf/i386-efi.rmk: likewise
435 * conf/x86_64-efi.rmk: likewise
437 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
439 Missing part from mmap patch
441 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
442 (grub_mmap_unregister)
443 (grub_mmap_free_and_unregister): use grub_mmap_register
445 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
449 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
450 * loader/i386/linux.c (find_mmap_size): likewise
451 (allocate_pages): likewise
452 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
453 (grub_fill_multiboot_mmap): likewise
454 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
455 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
456 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
457 (OPENBSD_MMAP_RESERVED): likewise
458 * include/grub/i386/pc/memory.h: include grub/memory.h
459 (grub_lower_mem): removed
460 (grub_upper_mem): likewise
461 (GRUB_MACHINE_MEMORY_ACPI): new definition
462 (GRUB_MACHINE_MEMORY_NVS): likewise
463 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
464 (GRUB_MACHINE_MEMORY_HOLE): likewise
465 (grub_machine_mmap_register): likewise
466 (grub_machine_mmap_unregister): likewise
467 (grub_machine_get_upper): likewise
468 (grub_machine_get_lower): likewise
469 (grub_machine_get_post64): likewise
470 * include/grub/i386/efi/memory.h: new file
471 * include/grub/x86_64/efi/memory.h: likewise
472 * include/grub/efi/memory.h: likewise
473 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
474 (mmap_mod_SOURCES): new variable
475 (mmap_mod_LDFLAGS): likewise
476 (mmap_mod_ASFLAGS): likewise
477 * conf/i386-coreboot.rmk: likewise
478 * conf/i386-ieee1275.rmk: likewise
479 * conf/i386-efi.rmk: likewise
480 * conf/x86_64-efi.rmk: likewise
481 * include/grub/types.h (UINT_TO_PTR): new macro
482 (PTR_TO_UINT32): likewise
483 (PTR_TO_UINT64): likewise
484 * include/grub/memory.h: new file
485 * mmap/i386/pc/mmap.c: likewise
486 * mmap/i386/pc/mmap_helper.S: likewise
487 * mmap/i386/uppermem.c: likewise
488 * mmap/mmap.c: likewise
489 * mmap/efi/mmap.c: likewise
490 * kern/i386/coreboot/init.c (grub_machine_init): don't use
492 * kern/i386/pc/init.c (grub_lower_mem): removed variable
493 (grub_upper_mem): likewise
494 (grub_machine_init): don't use grub_upper_mem,
495 make grub_lower_mem local
496 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
497 grub_mmap_iterate and grub_mmap_get_upper
498 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
500 2009-05-02 Bean <bean123ch@gmail.com>
502 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
504 (pkglib_MODULES): Add normal.mod and sh.mod.
505 (normal_SOURCES): New variable.
506 (normal_mod_CFLAGS): Likewise.
507 (normal_mod_LDFLAGS): Likewise.
508 (sh_mod_SOURCES): Likewise.
509 (sh_mod_CFLAGS): Likewise.
510 (sh_mod_LDFLAGS): Likewise.
512 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
513 script/sh/lexer.c_DEPENDENCIES.
514 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
515 kern/rescue_reader.c and kern/rescue_parser.c.
516 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
517 (grub_emu_SOURCES): Change source files.
518 (pkglib_MODULES): Remove normal.mod.
519 (normal_SOURCES): Removed.
520 (normal_mod_CFLAGS): Likewise.
521 (normal_mod_LDFLAGS): Likewise.
522 * conf/i386-coreboot.rmk: Likewise.
523 * conf/i386-efi.rmk: Likewise.
524 * conf/i386-ieee1276.rmk: Likewise.
525 * conf/powerpc-ieee1275.rmk: Likewise.
526 * conf/sparc64-ieee1275.rmk: Likewise.
527 * conf/x86_64-efi.rmk: Likewise.
529 * include/grub/command.h (grub_command_execute): New inline function.
531 * include/grub/menu.h (grub_menu_entry): Removed commands field.
533 * include/grub/normal.h: Remove <grub/setjmp.h>.
534 (grub_fs_module_list): Moved to normal/autofs.c.
535 (grub_exit_env): Removed.
536 (grub_command_execute): Likewise.
537 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
539 (read_command_list): New function declaration.
540 (read_fs_list): Likewise.
542 * include/parser.h: Include <grub/reader.h>.
543 (grub_parser_split_cmdline): Change type of getline parameter.
544 (grub_parser): New structure.
545 (grub_parser_class): New variable.
546 (grub_parser_execute): New function declaration.
547 (grub_register_rescue_parser): Likewise.
548 (grub_parser_register): New inline function.
549 (grub_parser_unregister): Likewise.
550 (grub_parser_get_current): Likewise.
551 (grub_parser_set_current): Likewise.
553 * include/grub/reader.h: New file.
554 * kern/reader.c: Likewise.
555 * kern/rescue_parser.c: Likewise.
556 * kern/rescue_reader.c: Likewise.
557 * normal/autofs.c: Likewise.
558 * normal/dyncmd.c: Likewise.
560 * include/grub/rescue.h: Removed.
561 * normal/command.h: Likewise.
563 * include/grub/script.h: Moved to ...
564 * include/grub/script_sh.h: ... Moved here.
565 * normal/execute.c: Moved to ...
566 * script/sh/execute.c: ... Moved here.
567 * normal/function.c: Moved to ...
568 * script/sh/function.c: ... Moved here.
569 * normal/lexer.c: Moved to ...
570 * script/sh/lexer.c: ... Moved here.
571 * normal/parser.y: Moved to ...
572 * script/sh/parser.y: ... Moved here.
573 * normal/script.c: Moved to ...
574 * script/sh/script.c: ... Moved here.
576 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
578 (grub_exit_env): Removed.
579 (fs_module_list): Moved to normal/autofs.c.
580 (grub_file_getline): Don't handle comment here.
581 (free_menu): Skip removed field entry->commands.
582 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
584 (read_config_file): Removed nested parameter, change getline function.
585 (grub_enter_normal_mode): Removed.
586 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
587 (read_command_list): Likewise.
588 (autoload_fs_module): Moved to normal/autofs.c.
589 (read_fs_list): Likewise.
590 (reader_nested): New variable.
591 (grub_normal_execute): Run parser.sh to switch to sh parser.
592 (grub_cmd_rescue): Removed.
593 (cmd_normal): Removed.
594 (grub_cmd_normal): Unregister itself at the beginning. Don't register
596 (grub_cmdline_run): New function.
597 (grub_normal_reader_init): Likewise.
598 (grub_normal_read_line): Likewise.
599 (grub_env_write_pager): Likewise.
600 (cmdline): New variable.
601 (grub_normal_reader): Likewise.
602 (GRUB_MOD_INIT): Register normal reader and set as current, register
603 pager hook, register normal command with grub_register_command_prio,
604 so that it won't show up in command.lst.
605 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
606 grub_fs_autoload_hook.
608 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
609 (grub_menu_execute_entry): Replace grub_script_execute with
610 grub_parser_execute, change parameter to grub_command_execute.
612 * normal/menu_text.c: Remove <grub/script.h>.
614 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
616 (run): Change editor_getline to use new parser interface. Change
617 parameter to grub_command_execute.
619 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
620 <grub/reader.h> and <grub/parser.h>.
621 (grub_load_normal_mode): Execute normal command.
622 (grub_main): Call grub_register_core_commands,
623 grub_register_rescue_parser and grub_register_rescue_reader, use
624 grub_reader_loop to enter input loop.
626 * kern/parser.c (grub_parser_split_cmdline): Change type of
628 (grub_parser_class): New variable.
629 (grub_parser_execute): New function.
631 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
632 * loader/multiboot2.c: Likewise.
633 * loader/sparc64/ieee1275/linux.c: Likewise.
635 * util/grub-emu.c (read_command_list): New dummy function.
637 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
639 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
640 count to 16 for CCISS and IDA.
642 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
644 * normal/menu_text.c (grub_wait_after_message): Print a newline
645 after waiting for user input.
647 * loader/i386/linux.c: Include `<grub/normal.h>'.
648 (grub_cmd_linux): Improve the error message about `ask' mode, by
649 waiting for user input so it's not missed (we can do this, since
650 user requested interaction).
652 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
654 Added missing lst to grub-mkrescue
656 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
657 and ${input_dir}/parttool.lst
659 2009-04-30 David S. Miller <davem@davemloft.net>
661 * util/hostdisk.c (device_is_wholedisk): New function.
662 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
663 zero only if device_is_wholedisk() returns true.
665 * util/hostdisk.c (convert_system_partition_to_system_disk):
666 Handle virtual disk devices named /dev/vdiskX as found on sparc
669 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
670 lettered partition specifier is found, convert to numbered.
672 2009-04-29 David S. Miller <davem@davemloft.net>
674 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
675 * include/grub/sparc64/ieee1275/memory.h: Likewise.
677 * normal/command.c: Add missing newline at end of file.
679 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
681 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
682 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
683 grub_ofdisk_read): Likewise, and deal similarly with the fact that
684 ihandles have a 32-bit type but need to be stored in a "void *".
686 2009-04-28 Pavel Roskin <proski@gnu.org>
688 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
689 not disk. Adjust all dependencies.
690 (grub_fs_uuid_close): Use grub_device_close(), not
693 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
694 parent's partition, don't copy it by reference, as it gets freed
697 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
699 Preboot hooks support
701 * commands/boot.c (struct grub_preboot_t): new declaration
702 (preboots_head): new variable
703 (preboots_tail): likewise
704 (grub_loader_register_preboot_hook): new function
705 (grub_loader_unregister_preboot_hook): likewise
706 (grub_loader_set): launch preboot hooks
707 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
708 (grub_loader_register_preboot_hook): new declaration
709 (grub_loader_unregister_preboot_hook): likewise
711 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
715 * disk/scsi.c (grub_scsi_open): added missing cast when
718 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
720 Bug and warning fixes
722 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
724 * commands/test.c (test_parse): fixed bug with file tests and corrected
725 declaration of find_file
727 2009-04-26 Pavel Roskin <proski@gnu.org>
729 * Makefile.in: Don't install empty manual pages if help2man is
730 missing. Use help2man option for output, not shell redirection.
732 2009-04-26 David S. Miller <davem@davemloft.net>
734 * util/grub-mkdevicemap.c (make_device_map): Add missing
735 NESTED_FUNC_ATTR to process_device().
737 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
741 * commands/test.c: rewritten to use bash-like test
743 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
745 Parttool autoloading and improvements
747 * Makefile.in (pkglib_DATA): add parttool.lst
748 (parttool.lst): new target
749 * genmk.rb: generate parttool-*
750 (CLEANFILES): add #{parttool}
751 (PARTTOOLFILES): new variable
752 * genparttoollist.sh: new file
753 * parttool/pcpart.c (grub_pcpart_boot): more feedback
754 (grub_pcpart_type): likewise
755 * commands/parttool.c (helpmsg): new variable
756 (grub_cmd_parttool): output help if not enough arguments are supplied
758 (GRUB_MOD_INIT(parttool)): use helpmsg
760 2009-04-24 David S. Miller <davem@davemloft.net>
762 Avoiding opening same device multiple times in device iterator.
764 * kern/device.c: (grub_device_iterate): Define struct part_ent,
765 and use it to build a list of partitions in iterate_disk() and
768 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
771 * disk/ieee1275/nand.c (grub_nand_iterate): Return
772 grub_devalias_iterate() result instead of unconditional 0.
773 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
774 Also, capture hook return value, either directly or via
775 grub_children_iterate(), and propagate to caller.
776 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
777 grub_children_iterate): Return value is now 'int' instead of
779 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
780 like a proper iterator, stopping when hooks return non-zero.
781 (grub_devalias_iterate): Likewise.
783 2009-04-23 David S. Miller <davem@davemloft.net>
785 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
787 2009-04-22 David S. Miller <davem@davemloft.net>
789 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
790 is larger than address_cells, use that value for address_cells too.
792 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
793 IEEE1275_MAX_PATH_LEN): Define.
794 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
795 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
796 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
797 'devtype'. Explicitly NULL terminate devalias expansion.
799 * util/sparc64/ieee1275/misc.c: New file.
800 * util/sparc64/ieee1275/grub-setup.c: New file.
801 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
802 * util/sparc64/ieee1275/grub-mkimage.c: New file.
803 * util/sparc64/ieee1275/grub-install.in: New file.
804 * util/ieee1275/ofpath.c: New file.
805 * util/ieee1275/devicemap.c: New file.
806 * util/devicemap.c: New file.
807 * util/deviceiter.c: New file.
808 * kern/sparc64/ieee1275/init.c: New file.
809 * include/grub/util/ofpath.h: New file.
810 * include/grub/util/deviceiter.h: New file.
811 * util/grub-mkdevicemap.c: Include deviceiter.h.
812 Implement using grub_util_emit_devicemap_entry and
813 grub_util_iterate_devices.
814 * conf/i386-corebook.rmk: Build util/deviceiter.c and
815 util/devicemap.c into grub-mkdevicemap
816 * conf/i386-efi.rmk: Likewise.
817 * conf/i386-ieee1275.rmk: Likewise.
818 * conf/i386-pc.rmk: Likewise.
819 * conf/powerpc-ieee1275.rmk: Likewise.
820 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
821 images and installation utilities. Build kernel as image
822 instead of as elf binary. Use common rules as much as possible.
824 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
826 Correct GPT definition
828 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
831 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
833 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
835 2009-04-19 David S. Miller <davem@davemloft.net>
837 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
838 (grub_rescue_cmd_linux): Rename to...
839 (grub_cmd_linux): and fix prototype.
840 (grub_rescue_cmd_initrd): Rename to...
841 (grub_cmd_initrd): and fix prototype.
842 (cmd_linux, cmd_initrd): New.
843 (GRUB_MOD_INIT(linux)): Use grub_register_command().
844 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
846 2009-04-17 Pavel Roskin <proski@gnu.org>
848 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
850 (grub_ohci_transfer): Likewise.
852 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
854 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
855 return without a value. Fix inconsistent indentation.
857 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
858 match struct grub_fs.
860 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
861 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
862 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
863 * commands/lspci.c (grub_lspci_iter): Likewise.
865 2009-04-16 Bean <bean123ch@gmail.com>
867 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
870 2009-04-15 Pavel Roskin <proski@gnu.org>
872 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
873 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
874 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
877 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
879 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
880 that no multiple data or metadata areas are supported and `Unknown
883 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
885 Move loader out of the kernel
887 * kern/loader.c: moved to ...
888 * commands/boot.c: ... moved here
889 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
890 * commands/boot.c (grub_cmd_boot): moved here. All users updated
891 * include/grub/kernel.h (grub_machine_fini): export
892 * include/grub/loader.h (grub_loader_is_loaded): update declaration
893 (grub_loader_set): likewise
894 (grub_loader_unset): likewise
895 (grub_loader_boot): likewise
896 * conf/common.rmk: new module boot.mod
897 (pkglib_MODULES): add boot.mod
898 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
899 (grub_emu_SOURCES): likewise
900 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
901 (grub_emu_SOURCES): likewise
902 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
903 (grub_emu_SOURCES): likewise
904 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
905 (grub_emu_SOURCES): likewise
906 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
907 (grub_emu_SOURCES): likewise
908 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
909 (grub_emu_SOURCES): likewise
910 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
911 (grub_emu_SOURCES): likewise
913 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
915 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
917 * kern/misc.c (grub_itoa): Removed function
918 (grub_ltoa): likewise
919 (grub_vsprintf): use grub_lltoa
921 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
925 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
926 * conf/i386-coreboot.rmk: likewise
927 * conf/i386-ieee1275.rmk: likewise
928 * conf/powerpc-ieee1275.rmk: likewise
930 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
932 * INSTALL: Add that `./autogen.sh' needs to be run before
935 2009-04-14 Bean <bean123ch@gmail.com>
937 * Makefile.in (pkglib_DATA): Add handler.lst.
938 (handler.lst): New rule.
940 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
941 * conf/i386-coreboot.rmk: Likewise.
942 * conf/i386-ieee1275.rmk: Likewise.
943 * conf/i386-efi.rmk: Likewise.
944 * conf/x86_64-efi.rmk: Likewise.
945 * conf/powerpc-ieee1275.rmk: Likewise.
946 * conf/sparc64-ieee1275.rmk: Likewise.
948 * genhandlerlist.sh: New file.
950 * genmk.rb: Add rules to generate handler.lst.
952 * include/grub/normal.h (grub_file_getline): New function definition.
953 (read_handler_list): Likewise.
954 (free_handler_list): Likewise.
956 * include/grub/term.h (grub_term_register_input): Add name parameter
957 for auto generation of handler.lst.
958 (grub_term_register_output): Likewise.
960 * normal/handler.c: New file.
962 * normal/main.c (get_line): Renamed to grub_file_getline.
963 (read_config_file): Use the newly renamed grub_file_getline.
964 (read_command_list): Likewise.
965 (read_fs_list): Likewise.
966 (grub_normal_execute): Call read_handler_list to parse handler.lst.
967 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
969 * term/efi/console.c (grub_console_init): Add name parameter for auto
970 generation of handler.lst.
971 * term/gfxterm.c: Likewise.
972 * term/i386/pc/at_keyboard.c: Likewise.
973 * term/i386/pc/console.c: Likewise.
974 * term/i386/pc/serial.c: Likewise.
975 * term/i386/pc/vesafb.c: Likewise.
976 * term/i386/pc/vga.c: Likewise.
977 * term/i386/pc/vga_text.c: Likewise.
978 * term/ieee1275/ofconsole.c: Likewise.
979 * term/usb_keyboard.c: Likewise.
981 2009-04-14 Bean <bean123ch@gmail.com>
983 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
984 properly with null character.
986 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
989 * config.h.in: Likewise.
990 * stamp-h.in: Likewise.
991 * DISTLIST: Likewise.
992 * conf/common.mk: Likewise.
993 * conf/i386-coreboot.mk: Likewise.
994 * conf/i386-efi.mk: Likewise.
995 * conf/i386-ieee1275.mk: Likewise.
996 * conf/i386.mk: Likewise.
997 * conf/i386-pc.mk: Likewise.
998 * conf/powerpc-ieee1275.mk: Likewise.
999 * conf/sparc64-ieee1275.mk: Likewise.
1000 * conf/x86_64-efi.mk: Likewise.
1002 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1005 2009-04-14 John Stanley <jpsinthemix@verizon.net>
1006 David S. Miller <davem@davemloft.net>
1008 * util/hostdisk.c (make_device_name): Fix buffer length
1011 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1013 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1014 <sys/param.h> and <sys/sysctl.h>.
1015 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1016 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1017 opening the device and reset them afterwards.
1019 2009-04-13 Pavel Roskin <proski@gnu.org>
1021 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1022 Reported by John Stanley <jpsinthemix@verizon.net>
1024 2009-04-13 Robert Millan <rmh@aybabtu.com>
1026 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1027 that name for menuentries when appropriate.
1029 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1031 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1033 2009-04-13 Robert Millan <rmh@aybabtu.com>
1035 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1036 to Linux, simply abort telling the user it's no longer supported.
1038 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1040 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1041 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
1042 `freebsd_loadenv' only when devices.hints exist.
1044 2009-04-13 Pavel Roskin <proski@gnu.org>
1046 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1048 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1050 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1052 (grub_drive): Likewise.
1054 2009-04-13 David S. Miller <davem@davemloft.net>
1056 * kern/sparc64/ieee1275/ieee1275.c: New file.
1057 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1058 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1059 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1060 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1061 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1062 grub_ieee1275_alloc_physmem): Declare new exported functions.
1064 * include/grub/sparc64/ieee1275/loader.h: New file.
1065 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1066 * include/grub/sparc64/kernel.h: Likewise.
1067 * loader/sparc64/ieee1275/linux.c: Likewise.
1069 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1070 (grub_fstest_SOURCES): Likewise.
1072 * util/hostdisk.c (make_device_name): Do not make any assumptions
1073 about the length of drive names.
1075 * kern/dl.c (grub_dl_load_file): Close file immediately when
1076 we are done using it.
1078 2009-04-12 David S. Miller <davem@davemloft.net>
1080 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1081 values. Noticed by Pavel Roskin.
1083 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1086 * genmk.rb: Add more flexible image type specification, also
1087 pass --strip-unneeded to objcopy.
1088 * conf/i386-pc.rmk: Use *_FORMAT.
1089 * conf/i386-pc.mk: Rebuilt.
1091 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1092 (OFDISK_HASH_SZ): Define.
1093 (ofdisk_hash): New hash table.
1094 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1095 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1096 instead of device phandle which is not unique.
1098 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1099 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1100 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1101 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1102 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1103 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1104 GRUB_KERNEL_MACHINE_DATA_END): Define.
1105 (grub_kernel_image_size, grub_total_module_size): Declare.
1107 2009-04-12 Pavel Roskin <proski@gnu.org>
1109 * configure.ac: Change the logic when we check for target tools.
1110 Do it when the target is specified and it's different from the
1111 specified value of the host.
1113 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1115 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1116 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1117 GNU/kFreeBSD. Check if a device is a character device. Use
1118 DIOCGMEDIASIZE to get the size.
1119 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1120 support for GNU/kFreeBSD.
1121 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1122 is a character device instead of a block device. Add support for
1123 FreeBSD device names.
1125 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1126 is a character device instead of a block device.
1128 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1129 is a character device instead of a block device.
1131 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1133 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1134 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1135 FreeBSD. Check if a device is a character device. Use
1136 DIOCGMEDIASIZE to get the size.
1137 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1138 support for FreeBSD.
1139 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1140 is a character device instead of a block device. Add support for
1141 FreeBSD device names.
1143 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1144 a character device instead of a block device.
1145 (grub_util_check_char_device): New function.
1147 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1148 a character device instead of a block device.
1150 * include/grub/util/getroot.h (grub_util_check_char_device): New
1153 2009-04-11 David S. Miller <davem@davemloft.net>
1155 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1157 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1158 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1159 function, if present.
1160 (__bswapdi2): Likewise.
1162 * include/grub/sparc64/ieee1275/boot.h: New file.
1163 * boot/sparc64/ieee1275/boot.S: Likewise.
1164 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1166 * kern/misc.c (grub_ltoa): New function.
1167 (grub_vsprintf): Use it to format 'long' integers.
1169 2009-04-10 David S. Miller <davem@davemloft.net>
1171 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1172 slots are of type grub_ieee1275_cell_t.
1173 (grub_nand_read): Likewise.
1174 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1175 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1176 macros are used to compare values in arg/ret block of the call.
1177 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1178 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1179 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1180 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1181 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1182 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1183 grub_ieee1275_close, grub_ieee1275_set_property,
1184 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1185 grub_ieee1275_cell_t.
1186 * kern/ieee1275/openfw.c (grub_map): Likewise.
1187 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1188 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1190 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1191 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1192 (grub_devalias_iterate): Likewise.
1194 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
1198 * fs/ufs.c (INODE_NBLOCKS): new definition
1199 (struct grub_ufs_dirent): added fields for non-BSD dirents
1200 (grub_ufs_get_file_block): fixed double indirect handling
1201 (grub_ufs_lookup_symlink): use more robust way to determine whether
1203 (grub_ufs_find_file): support for non-BSD dirents
1204 (grub_ufs_dir): support for non-BSD dirents
1206 2009-04-10 Bean <bean123ch@gnail.com>
1208 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1209 attribute, otherwise the size would be wrong for i386 platform.
1211 * include/grub/pci.h (grub_pci_read_word): New inline function.
1212 (grub_pci_read_byte): Likewise.
1213 (grub_pci_write): Likewise.
1214 (grub_pci_write_word): Likewise.
1215 (grub_pci_write_byte): Likewise.
1217 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1219 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1220 (find_framebuf): Scan pci to locate the frame buffer address.
1222 * commands/efi/fixvideo.c: New file.
1224 * commands/efi/loadbios.c: Likewise.
1226 * commands/memrw.c: Likewise.
1228 * util/grub-dumpbios.in: Likewise.
1230 * conf/common.rmk (grub-dumpbios): New utility.
1231 (pkglib_MODULES): New module memrw.mod.
1232 (memrw_mod_SOURCE): New macro.
1233 (memrw_mod_CFLAGS): Likewise.
1234 (memrw_mod_LDFLAGS): Likewise.
1236 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1238 (loadbios_mod_SOURCE): New macro.
1239 (loadbios_mod_CFLAGS): Likewise.
1240 (loadbios_mod_LDFLAGS): Likewise.
1241 (fixvideo_mod_SOURCE): Likewise.
1242 (fixvideo_mod_CFLAGS): Likewise.
1243 (fixvideo_mod_LDFLAGS): Likewise.
1245 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1247 (loadbios_mod_SOURCE): New macro.
1248 (loadbios_mod_CFLAGS): Likewise.
1249 (loadbios_mod_LDFLAGS): Likewise.
1250 (fixvideo_mod_SOURCE): Likewise.
1251 (fixvideo_mod_CFLAGS): Likewise.
1252 (fixvideo_mod_LDFLAGS): Likewise.
1254 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
1256 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1258 2009-04-07 David S. Miller <davem@davemloft.net>
1260 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1261 support for R_SPARC_OLO10 relocations. Fix compile warning for
1262 R_SPARC_WDISP30 case.
1263 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1265 2009-04-06 Pavel Roskin <proski@gnu.org>
1267 * include/grub/misc.h (ARRAY_SIZE): New macro.
1268 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1270 * loader/i386/linux.c (allocate_pages): Use free_pages().
1271 (grub_linux_unload): Don't use free_pages().
1272 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1273 wrong index. Treat all other modes as text modes.
1274 (grub_cmd_linux): Initialize vid_mode unconditionally to
1275 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1277 * commands/help.c (print_command_help): Use cmd->prio, not
1278 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1280 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
1284 * parttool/pcpart.c: new file
1285 * commands/parttool.c: likewise
1286 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1287 (parttool_mod_SOURCES): new variable
1288 (parttool_mod_CFLAGS): likewise
1289 (parttool_mod_LDFLAGS): likewise
1290 (pcpart_mod_SOURCES): likewise
1291 (pcpart_mod_CFLAGS): likewise
1292 (pcpart_mod_LDFLAGS): likewise
1293 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1294 and parttool/pcpart.c
1295 * conf/i386-efi.rmk: likewise
1296 * conf/i386-ieee1275.rmk: likewise
1297 * conf/i386-pc.rmk: likewise
1298 * conf/powerpc-ieee1275.rmk: likewise
1299 * conf/sparc64-ieee1275.rmk: likewise
1300 * conf/x86_64-ieee1275.rmk: likewise
1302 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1304 Support for mtime and further expandability of dir command
1306 * include/grub/lib/datetime.h: moved to ...
1307 * include/grub/datetime.h: ... moved here and added
1308 declaration of grub_unixtime2datetime. All users updated
1309 * include/grub/fs.h: new syntax for dir and mtime functions in
1311 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1312 and GRUB_FSHELP_FLAGS_MASK
1313 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1314 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1315 (grub_ext2_mtime): new function
1316 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1317 (grub_hfsplus_mtime): new function
1318 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1319 (GRUB_UFS_ATTR_FILE): likewise
1320 (GRUB_UFS_ATTR_LNK): likewise
1321 (struct grub_ufs_sblock): new fields mtime
1322 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1324 (grub_ufs_dir): mtime support
1325 (grub_ufs_mtime): new function
1326 * fs/affs.c (grub_affs_dir): use new dir syntax
1327 * fs/afs.c (grub_afs_dir): likewise
1328 * fs/cpio.c (grub_cpio_dir): likewise
1329 * fs/fat.c (grub_fat_find_dir): likewise
1330 * fs/hfs.c (grub_hfs_dir): likewise
1331 * fs/iso9660.c (grub_iso9660_dir): likewise
1332 * fs/jfs.c (grub_jfs_dir): likewise
1333 * fs/minix.c (grub_minix_dir): likewise
1334 * fs/ntfs.c (grub_ntfs_dir): likewise
1335 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1336 * fs/sfs.c (grub_sfs_dir): likewise
1337 * fs/xfs.c (grub_xfs_dir): likewise
1338 * util/hostfs.c (grub_hostfs_dir): likewise
1339 * lib/datetime.c: moved to ...
1340 * normal/datetime.c: ... moved here
1341 (grub_unixtime2datetime): new function
1342 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1343 * normal/completion.c (iterate_dir): use new dir syntax
1344 * normal/misc.c (grub_normal_print_device_info): tell the
1345 last modification time of a volume
1346 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1347 * conf/common.rmk: added lib/datetime.c to ls.mod
1348 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1349 (normal_mod_SOURCES): likewise
1350 (datetime_mod_SOURCES): Removed lib/datetime.c
1351 * conf/i386-efi.rmk: likewise
1352 * conf/i386-ieee1275.rmk: likewise
1353 * conf/i386-pc.rmk: likewise
1354 * conf/powerpc-ieee1275.rmk: likewise
1355 * conf/sparc64-ieee1275.rmk: likewise
1356 * conf/x86_64-efi.rmk: likewise
1358 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1360 Trim trailing spaces in FAT label and support mtools-like labels
1362 * fs/fat.c (grub_fat_iterate_dir): New function based
1363 on grub_fat_find_dir
1364 (grub_fat_find_dir): use grub_fat_iterate_dir
1365 (grub_fat_label): likewise
1367 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1369 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1371 remove extraneous kernel_elf_HEADERS
1373 2009-04-04 Bean <bean123ch@gnail.com>
1375 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1377 * util/misc.c: Likewise.
1379 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1381 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1382 instead of grub_printf.
1384 2009-04-03 Robert Millan <rmh@aybabtu.com>
1386 * loader/i386/linux.c (grub_linux_setup_video): Fill
1387 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1388 values from `mode info' structure instead of hardcoded
1391 2009-04-01 Pavel Roskin <proski@gnu.org>
1393 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1395 * genmk.rb: Likewise.
1396 * configure.ac: Likewise.
1398 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1400 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1401 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1403 2009-04-01 David S. Miller <davem@davemloft.net>
1405 * normal/sparc64/setjmp.S: Fix setjmp implementation.
1406 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1407 (grub_setjmp): Mark with 'returns_twice' attribute.
1408 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1409 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1410 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1412 2009-04-01 Robert Millan <rmh@aybabtu.com>
1414 Reapply fix from 2008-07-28 which was accidentally reverted; also
1415 perform the same fix to a similar check in same function.
1417 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1418 with the same number are found, just use issue a warning with
1419 grub_dprintf(), as this error has been reported to be non-fatal.
1421 2009-03-31 Pavel Roskin <proski@gnu.org>
1423 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1424 for cross-compilation.
1426 2009-03-30 Robert Millan <rmh@aybabtu.com>
1428 Fix i386-ieee1275 build.
1430 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1433 2009-03-30 Pavel Roskin <proski@gnu.org>
1435 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1436 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1437 zero-terminated, rely only on the strlen value. Fix comparison
1438 of strings differing in length.
1440 2009-03-30 Robert Millan <rmh@aybabtu.com>
1442 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1443 checking for abi version. Improve error messages on BIOS to notify
1444 user about `linux16' command.
1446 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1450 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1451 in case of collision
1452 * disk/scsi.c (grub_scsi_open): free scsi in case of error
1454 2009-03-29 Robert Millan <rmh@aybabtu.com>
1456 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1457 set `vid_mode' accordingly.
1458 (grub_linux_boot): Process `vid_mode' and set video mode.
1460 2009-03-29 Robert Millan <rmh@aybabtu.com>
1462 * util/grub.d/10_linux.in (linux_entry): New function.
1463 Factorize generation of Linux boot entries.
1465 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1467 Make the format of Environment Block plain text. The boot loader
1468 part is not tested well yet.
1470 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1473 (usage): Remove "info" and "clear". Add "unset". Update the
1474 description of "set", as this does not delete variables any
1476 (create_envblk_file): Complete rewrite.
1477 (open_envblk_file): Likewise.
1478 (cmd_info): Removed.
1479 (cmd_list): Likewise.
1480 (cmd_set): Likewise.
1481 (cmd_clear): Likewise.
1482 (list_variables): New function.
1483 (write_envblk): Likewise.
1484 (set_variables): Likewise.
1485 (unset_variables): Likewise.
1486 (main): Complete rewrite.
1488 * commands/loadenv.c (buffer): Removed.
1490 (open_envblk_file): New function.
1491 (read_envblk_file): Complete rewrite.
1492 (grub_cmd_load_env): Likewise.
1493 (grub_cmd_list_env): Likewise.
1494 (struct blocklist): New struct.
1495 (free_blocklists): New function.
1496 (check_blocklists): Likewise.
1497 (write_blocklists): Likewise.
1498 (grub_cmd_save_env): Complete rewrite.
1500 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1501 a plain text signature.
1502 (GRUB_ENVBLK_MAXLEN): Removed.
1503 (struct grub_envblk): Complete rewrite.
1504 (grub_envblk_find): Removed.
1505 (grub_envblk_insert): Likewise.
1506 (grub_envblk_open): New prototype.
1507 (grub_envblk_set): Likewise.
1508 (grub_envblk_delete): Put const to VALUE.
1509 (grub_envblk_iterate): Put const to NAME and VALUE.
1510 (grub_envblk_close): New prototype.
1511 (grub_envblk_buffer): New inline function.
1512 (grub_envblk_size): Likewise.
1514 * lib/envblk.c: Include grub/mm.h.
1515 (grub_env_find): Removed.
1516 (grub_envblk_open): New function.
1517 (grub_envblk_close): Likewise.
1518 (escaped_value_len): Likewise.
1519 (find_next_line): Likewise.
1520 (grub_envblk_insert): Removed.
1521 (grub_envblk_set): New function.
1522 (grub_envblk_delete): Complete rewrite.
1523 (grub_envblk_iterate): Likewise.
1525 2009-03-28 Robert Millan <rmh@aybabtu.com>
1527 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1528 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1529 variables. Use 16-bit loader.
1530 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1532 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1533 (grub_linux16_boot): ... this. Update all users.
1534 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1535 (grub_linux_boot): ... this. Update all users.
1537 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1538 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1539 commands to `linux16' and `initrd16'.
1540 (GRUB_MOD_FINI(linux)): Rename to ...
1541 (GRUB_MOD_FINI(linux16)): ... this.
1543 2009-03-24 Pavel Roskin <proski@gnu.org>
1545 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1546 not just for compilation.
1548 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1550 Move multiboot helper out of kernel
1552 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1553 `loader/i386/multiboot_helper.S'.
1554 * conf/i386-coreboot.rmk: Likewise
1555 * conf/i386-ieee1275.rmk: Likewise
1557 * kern/i386/loader.S: Move multiboot helpers from here...
1558 * loader/i386/multiboot_helper.S: ...moved here
1559 * include/grub/i386/loader.h: Move declarations of multiboot
1560 helpers from here...
1561 * include/grub/i386/multiboot.h: ...moved here
1562 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1564 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1566 * kern/env.c (grub_env_context_open): Added an argument to specify
1567 whether a new context inherits exported variables from current
1568 one. This is useful when making a sandbox to interpret a config
1570 All callers updated.
1572 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1574 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1576 * kern/env.c (grub_env_context_close): Fix memory leaks.
1578 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1580 * normal/main.c (grub_normal_execute): Added an argument
1581 BATCH to specify if an interactive interface should be provided
1582 after reading a config file.
1583 All callers updated.
1584 (read_command_list): Prevent being executed twice.
1585 (read_fs_list): Likewise.
1587 * include/grub/normal.h (grub_normal_execute): Updated the
1590 2009-03-22 Pavel Roskin <proski@gno.org>
1592 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1594 * kern/i386/pc/startup.S: Likewise.
1595 * kern/i386/efi/startup.S: Likewise.
1596 * kern/i386/ieee1275/startup.S: Likewise.
1597 * kern/i386/coreboot/startup.S: Likewise.
1598 * kern/x86_64/efi/startup.S: Likewise.
1600 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1601 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1602 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1604 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1606 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1608 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1610 Use vaddr of correct segment for entry_point.
1612 2009-03-21 Bean <bean123ch@gmail.com>
1614 * commands/blocklist.c: Add include file <grub/command.h>, remove
1615 <grub/normal.h> and <grub/arg.h>.
1616 (grub_cmd_blocklist): Use the new command interface.
1617 (GRUB_MOD_INIT): Likewise.
1618 (GRUB_MOD_FINI): Likewise.
1619 * commands/boot.c: Likewise.
1620 * commands/cat.c: Likewise.
1621 * commands/cmp.c: Likewise.
1622 * commands/configfile.c: Likewise.
1623 * commands/crc.c: Likewise.
1624 * commands/echo.c: Likewise.
1625 * commands/halt.c: Likewise.
1626 * commands/handler.c: Likewise.
1627 * commands/hdparm.c: Likewise.
1628 * commands/help.c: Likewise.
1629 * commands/hexdump.c: Likewise.
1630 * commands/loadenv.c: Likewise.
1631 * commands/ls.c: Likewise.
1632 * commands/lsmmap.c: Likewise.
1633 * commands/lspci.c: Likewise.
1634 * commands/loadenv.c: Likewise.
1635 * commands/read.c: Likewise.
1636 * commands/reboot.c: Likewise.
1637 * commands/search.c: Likewise.
1638 * commands/sleep.c: Likewise.
1639 * commands/test.c: Likewise.
1640 * commands/usbtest.c: Likewise.
1641 * commands/videotest.c: Likewise.
1642 * commands/i386/cpuid.c: Likewise.
1643 * commands/i386/pc/halt.c: Likewise.
1644 * commands/i386/pc/play.c: Likewise.
1645 * commands/i386/pc/pxecmd.c: Likewise.
1646 * commands/i386/pc/vbeinfo.c: Likewise.
1647 * commands/i386/pc/vbetest.c: Likewise.
1648 * commands/ieee1275/suspend.c: Likewise.
1649 * disk/loopback.c: Likewise.
1650 * font/font_cmd.c: Likewise.
1651 * hello/hello.c: Likewise.
1652 * loader/efi/appleloader.c: Likewise.
1653 * loader/efi/chainloader.c: Likewise.
1654 * loader/i386/bsd.c: Likewise.
1655 * loader/i386/efi/linux.c: Likewise.
1656 * loader/i386/ieee1275/linux.c: Likewise.
1657 * loader/i386/linux.c: Likewise.
1658 * loader/i386/pc/chainloader.c: Likewise.
1659 * loader/i386/pc/linux.c: Likewise.
1660 * loader/powerpc/ieee1275/linux.c: Likewise.
1661 * loader/multiboot_loader.c: Likewise.
1662 * term/gfxterm.c: Likewise.
1663 * term/i386/pc/serial.c: Likewise.
1664 * term/terminfo.c: Likewise.
1666 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1667 * term/i386/pc/vga.c: Likewise.
1668 * video/readers/jpeg.c: Likewise.
1669 * video/readers/png.c: Likewise.
1670 * video/readers/tga.c: Likewise.
1672 * util/grub-fstest (cmd_loopback): Removed.
1673 (cmd_blocklist): Likewise.
1675 (grub_register_command): Likewise.
1676 (grub_unregister_command): Likewise.
1677 (execute_command): Use grub_command_find to locate command and execute
1680 * include/grub/efi/chainloader.h: Removed.
1681 * loader/efi/chainloader_normal.c: Likewise.
1682 * loader/i386/bsd_normal.c: Likewise.
1683 * loader/i386/pc/chainloader_normal.c: Likewise.
1684 * loader/i386/pc/multiboot_normal.c: Likewise.
1685 * loader/linux_normal.c: Likewise.
1686 * loader/multiboot_loader_normal.c: Likewise.
1687 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1689 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1690 and grub_register_command_p1.
1692 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1693 kern/command.c, lib/arg.c and commands/extcmd.c.
1694 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1695 (minicmd_mod_SOURCES): New variable.
1696 (minicmd_mod_CFLAGS): Likewise.
1697 (minicmd_mod_LDFLAGS): Likewise.
1698 (extcmd_mod_SOURCES): Likewise.
1699 (extcmd_mod_CFLAGS): Likewise.
1700 (extcmd_mod_LDFLAGS): Likewise.
1701 (boot_mod_SOURCES): Removed.
1702 (boot_mod_CFLAGS): Likewise.
1703 (boot_mod_LDFLAGS): Likewise.
1705 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1707 (kernel_img_HEADERS): Add command.h.
1708 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1709 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1711 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1712 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1713 remove the corresponding normal mode command.
1714 (normal_mod_SOURCES): Remove normal/arg.c.
1715 * conf/i386-coreboot.rmk: Likewise.
1716 * conf/i386-efi.rmk: Likewise.
1717 * conf/i386-ieee1275.rmk: Likewise.
1718 * conf/powerpc-ieee1275.rmk: Likewise.
1719 * conf/x86_64-efi.rmk: Likewise.
1721 * include/grub/arg.h: Move from here ...
1722 * include/grub/lib/arg.h: ... to here.
1724 * normal/arg.c: Move from here ...
1725 * lib/arg.c: ... to here.
1727 * commands/extcmd.c: New file.
1728 * commands/minicmd.c: Likewise.
1729 * include/grub/command.h: Likewise.
1730 * include/grub/extcmd.h: Likewise.
1731 * kern/command.c: Likewise.
1732 * kern/corecmd.c: Likewise.
1734 * kern/list.c (grub_list_iterate): Return int instead of void.
1735 (grub_list_insert): New function.
1736 (grub_prio_list_insert): Likewise.
1738 * kern/rescue.c (grub_rescue_command): Removed.
1739 (grub_rescue_command_list): Likewise.
1740 (grub_rescue_register_command): Likewise.
1741 (grub_rescue_unregister_command): Likewise.
1742 (grub_rescue_cmd_boot): Move to minicmd.c
1743 (grub_rescue_cmd_help): Likewise.
1744 (grub_rescue_cmd_info): Likewise.
1745 (grub_rescue_cmd_boot): Likewise.
1746 (grub_rescue_cmd_testload): Likewise.
1747 (grub_rescue_cmd_dump): Likewise.
1748 (grub_rescue_cmd_rmmod): Likewise.
1749 (grub_rescue_cmd_lsmod): Likewise.
1750 (grub_rescue_cmd_exit): Likewise.
1751 (grub_rescue_print_devices): Moved to corecmd.c.
1752 (grub_rescue_print_files): Likewise.
1753 (grub_rescue_cmd_ls): Likewise.
1754 (grub_rescue_cmd_insmod): Likewise.
1755 (grub_rescue_cmd_set): Likewise.
1756 (grub_rescue_cmd_unset): Likewise.
1757 (attempt_normal_mode): Use grub_command_find to get normal module.
1758 (grub_enter_rescue_mode): Use grub_register_core_commands to register
1759 commands, remove grub_rescue_register_command calls.
1761 * normal/command.c (grub_register_command): Removed.
1762 (grub_unregister_command): Likewise.
1763 (grub_command_find): Likewise.
1764 (grub_iterate_commands): Likewise.
1765 (rescue_command): Likewise.
1766 (export_command): Moved to corecmd.c.
1767 (set_command): Removed.
1768 (unset_command): Likewise.
1769 (insmod_command): Likewise.
1770 (rmmod_command): Likewise.
1771 (lsmod_command): Likewise.
1772 (grub_command_init): Likewise.
1774 * normal/completion.c (iterate_command): Use cmd->prio to check for
1776 (complete_arguments): Use grub_extcmd_t structure to find options.
1777 (grub_normal_do_completion): Change function grub_iterate_commands to
1778 grub_command_iterate.
1780 * normal/execute.c (grub_script_execute_cmd): No need to parse
1783 * normal/main.c (grub_dyncmd_dispatcher): New function.
1784 (read_command_list): Register unload commands as dyncmd.
1785 (grub_cmd_normal): Use new command interface, register rescue,
1786 unregister normal at entry, register normal, unregister rescue at exit.
1788 * include/grub/list.h (grub_list_test_t): New type.
1789 (grub_list_iterate): Return int instead of void.
1790 (grub_list_insert): New function.
1791 (GRUB_AS_NAMED_LIST_P): New macro.
1792 (GRUB_AS_PRIO_LIST): Likewise.
1793 (GRUB_AS_PRIO_LIST_P): Likewise.
1794 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1795 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1796 (grub_prio_list): New structure.
1797 (grub_prio_list_insert): New function.
1798 (grub_prio_list_remove): New inline function.
1800 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1801 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1802 (GRUB_COMMAND_FLAG_MENU): Likewise.
1803 (GRUB_COMMAND_FLAG_BOTH): Likewise.
1804 (GRUB_COMMAND_FLAG_TITLE): Likewise.
1805 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1806 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1807 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1808 (grub_command): Likewise.
1809 (grub_register_command): Likewise.
1810 (grub_command_find): Likewise.
1811 (grub_iterate_commands): Likewise.
1812 (grub_command_init): Likewise.
1813 (grub_arg_parse): Likewise.
1814 (grub_arg_show_help): Likewise.
1816 * include/grub/rescue.h (grub_rescue_register_command): Removed.
1817 (grub_rescue_unregister_command): Likewise.
1819 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1820 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1821 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1823 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1824 grub_rescue_cmd_initrd.
1825 * include/grub/i386/loader.h: Likewise.
1826 * include/grub/x86_64/loader.h: Likewise.
1828 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1830 2009-03-21 Bean <bean123ch@gmail.com>
1832 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1833 instead of stat in mingw environment.
1835 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1837 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1839 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1842 2009-03-21 Bean <bean123ch@gmail.com>
1844 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1847 2009-03-18 Michel Dänzer <michel@daenzer.net>
1849 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1850 checking inode flags for EXT4_EXTENTS_FLAG.
1852 2009-03-18 Robert Millan <rmh@aybabtu.com>
1854 * loader/i386/linux.c: Include `<grub/video.h>' and
1855 `<grub/i386/pc/vbe.h>'..
1856 (grub_linux_setup_video): New function. Loosely based on the EFI one.
1857 (grub_linux32_boot): Attempt to configure video settings with
1858 grub_linux_setup_video().
1859 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1860 to avoid grub_console_fini() which would step out of graphical mode
1863 2009-03-14 Robert Millan <rmh@aybabtu.com>
1865 Fix build on powerpc.
1866 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1868 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
1870 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1871 background image command.
1873 2009-03-12 Colin D Bennett <colin@gibibit.com>
1875 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1876 (grub_gfxterm_putchar): Extract pairs of identical calls to
1877 draw_cursor out of conditional blocks.
1879 2009-03-11 Pavel Roskin <proski@gnu.org>
1881 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1882 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1884 2009-03-11 Robert Millan <rmh@aybabtu.com>
1886 * loader/i386/multiboot_elfxx.c
1887 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1889 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
1891 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1894 2009-03-11 Robert Millan <rmh@aybabtu.com>
1896 * loader/i386/multiboot.c (code_size): New variable.
1897 (grub_multiboot): Define offsets by adding to `code_size' rather
1898 than subtracting from `grub_multiboot_payload_size'. Provide
1899 4-byte alignment to MBI and others by increasing
1900 `boot_loader_name_length' appropriately.
1902 * loader/i386/multiboot_elfxx.c
1903 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1905 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
1907 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1910 2009-03-08 Robert Millan <rmh@aybabtu.com>
1912 Make loader/i386/linux.c usable on i386-pc again.
1914 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1916 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1919 2009-03-07 Bean <bean123ch@gmail.com>
1921 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1924 2009-03-06 Robert Millan <rmh@aybabtu.com>
1926 Fix display issue on terminals with screen size other than 80x25
1927 (e.g. gfxterm with resolution higher than 640x480).
1929 * normal/main.c (grub_normal_init_page): Display title text in a
1930 position relative to the center of the terminal instead of relying
1931 on a hardcoded offset.
1933 2009-03-04 Robert Millan <rmh@aybabtu.com>
1935 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1938 * Makefile.in (host_kernel): New variable.
1939 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1940 scripts instead of just the windows one.
1941 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1943 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1945 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1947 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1948 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1949 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1951 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1952 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1954 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1956 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1957 or if there's no space for the disk label and print the partition number on a
1960 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1962 * util/misc.c: Include <time.h>.
1963 (grub_millisleep): New function.
1965 2009-03-04 Bean <bean123ch@gmail.com>
1967 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1968 another option -mno-red-zone.
1970 * commands/handler.c: Change module description.
1972 * kern/handler.c: Add missing space at the end of description line.
1974 * kern/list.c: Likewise.
1976 2009-03-03 Robert Millan <rmh@aybabtu.com>
1978 Move more components to the relocation area, and fix mbi pointer
1979 handling to use the destination rather than the origin (thanks to
1980 Vladimir Serbinenko for spotting).
1982 * loader/i386/multiboot.c (mbi_dest): New variable.
1983 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1984 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1987 2009-03-01 Bean <bean123ch@gmail.com>
1989 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
1990 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1991 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1992 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1994 * loader/i386/efi/linux.c (acpi_guid): New variable.
1995 (acpi_guid): Likewise.
1996 (EBDA_SEG_ADDR): New constant.
1997 (LOW_MEM_ADDR): Likewise.
1998 (FAKE_EBDA_SEG): Likewise.
1999 (fake_bios_data): New function.
2000 (grub_linux_boot): Call fake_bios_data.
2002 2009-03-01 Bean <bean123ch@gmail.com>
2004 * commands/terminal.c: Removed.
2006 * commands/handler.c: New file.
2008 * include/grub/list.h: Likewise.
2010 * include/grub/handler.h: Likewise.
2012 * kern/list.c: Likewise.
2014 * kern/handler.c: Likewise.
2016 * kern/term.h: Include header file <grub/handler.h>.
2017 (grub_term_input): Move next field to the beginning.
2018 (grub_term_output): Likewise.
2019 (grub_term_input_class): New variable.
2020 (grub_term_output_class): Likewise.
2021 (grub_term_register_input): Changed to inline function.
2022 (grub_term_register_output): Likewise.
2023 (grub_term_unregister_input): Likewise.
2024 (grub_term_unregister_output): Likewise.
2025 (grub_term_set_current_input): Likewise.
2026 (grub_term_set_current_output): Likewise.
2027 (grub_term_get_current_input): Likewise.
2028 (grub_term_get_current_output): Likewise.
2029 (grub_term_iterate_input): Removed.
2030 (grub_term_iterate_output): Likewise.
2032 * kern/term.c (grub_term_list_input): Removed.
2033 (grub_term_list_output): Likewise.
2034 (grub_term_input_class): New variable.
2035 (grub_term_output_class): Likewise.
2036 (grub_cur_term_input): Change variable as macro.
2037 (grub_cur_term_output): Likewise.
2038 (grub_term_register_input): Removed.
2039 (grub_term_register_output): Likewise.
2040 (grub_term_unregister_input): Likewise.
2041 (grub_term_unregister_output): Likewise.
2042 (grub_term_set_current_input): Likewise.
2043 (grub_term_set_current_output): Likewise.
2044 (grub_term_iterate_input): Likewise.
2045 (grub_term_iterate_output): Likewise.
2046 (grub_term_get_current_input): Likewise.
2047 (grub_term_get_current_output): Likewise.
2049 * util/grub-editenv.c: Include header file <grub/handler.h>.
2050 (grub_term_get_current_input): Removed.
2051 (grub_term_get_current_output): Likewise.
2052 (grub_term_input_class): New variable.
2053 (grub_term_output_class): Likewise.
2055 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2056 (grub_term_get_current_output): Likewise.
2057 (grub_term_input_class): New variable.
2058 (grub_term_output_class): Likewise.
2060 * util/grub-probe.c (grub_term_get_current_input): Removed.
2061 (grub_term_get_current_output): Likewise.
2062 (grub_term_input_class): New variable.
2063 (grub_term_output_class): Likewise.
2065 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2066 (grub_term_get_current_output): Likewise.
2067 (grub_term_input_class): New variable.
2068 (grub_term_output_class): Likewise.
2070 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2071 (terminal_mod_SOURCES): Likewise.
2072 (terminal_mod_CFLAGS): Likewise.
2073 (terminal_mod_LDFLAGS): Likewise.
2075 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2077 (kernel_img_SOURCES): Add list.c and handler.c.
2078 (kernel_img_HEADERS): Add list.h and handler.h.
2080 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2082 (kernel_mod_SOURCES): Add list.c and handler.c.
2083 (kernel_mod_HEADERS): Add list.h and handler.h.
2085 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2087 (kernel_elf_SOURCES): Add list.c and handler.c.
2088 (kernel_elf_HEADERS): Add list.h and handler.h.
2090 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2092 (kernel_elf_SOURCES): Add list.c and handler.c.
2093 (kernel_elf_HEADERS): Add list.h and handler.h.
2095 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2097 (kernel_mod_SOURCES): Add list.c and handler.c.
2098 (kernel_mod_HEADERS): Add list.h and handler.h.
2100 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2102 (kernel_elf_SOURCES): Add list.c and handler.c.
2103 (kernel_elf_HEADERS): Add list.h and handler.h.
2105 2009-02-27 Robert Millan <rmh@aybabtu.com>
2107 Factorize elf32 / elf64 code in Multiboot loader. This will
2108 prevent it from getting out of sync again.
2110 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2111 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2112 grub_multiboot_load_elf64): Move from here ...
2113 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2114 grub_multiboot_load_elf): ... to here (new file).
2116 2009-02-27 Robert Millan <rmh@aybabtu.com>
2118 * util/grub.d/10_linux.in: Rename "single-user mode" to
2121 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2123 Don't leak in SCSI code.
2124 * disk/scsi.c (grub_scsi_close): free `scsi'.
2126 2009-02-27 Robert Millan <rmh@aybabtu.com>
2128 * loader/i386/pc/multiboot.c: Move from here ...
2129 * loader/i386/multiboot.c: ... to here. Update all users.
2131 2009-02-27 Robert Millan <rmh@aybabtu.com>
2133 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2134 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2136 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2138 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2141 2009-02-27 Robert Millan <rmh@aybabtu.com>
2143 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2144 `0x' qualifier as 0 when base is specified as parameter).
2146 2009-02-24 Bean <bean123ch@gmail.com>
2148 * configure.ac: Check for -mcmodel=large in x86_64 target.
2150 * include/grub/efi/api.h (efi_call_10): New macro.
2151 (efi_wrap_10): New function.
2153 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2154 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2155 (GRUB_PE32_REL_BASED_LOW): Likewise.
2156 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2157 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2158 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2159 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2160 (GRUB_PE32_REL_BASED_REL): Likewise.
2161 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2162 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2163 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2165 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2168 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2169 (efi_wrap_10): New function.
2171 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2173 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2174 MB/MBP model (NV chipset).
2175 (devdata_devs): Add devpath_5 to the list.
2177 * load/i386/efi/linux.c (video_base): Remove variable.
2178 (RGB_MASK): New macro.
2179 (RGB_MAGIC): Likewise.
2180 (LINE_MIN): Likewise.
2181 (LINE_MAX): Likewise.
2182 (FBTEST_STEP): Likewise.
2183 (FBTEST_COUNT): Likewise.
2184 (fb_list): New variable.
2185 (grub_find_video_card): Remove function.
2186 (find_framebuf): New function.
2187 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2190 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2193 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2195 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2197 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2200 2009-02-22 Robert Millan <rmh@aybabtu.com>
2202 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2203 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2204 in our relocation, instead of using it directly from heap. Also
2205 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2207 2009-02-21 Robert Millan <rmh@aybabtu.com>
2209 Implement USB keyboard support (based on patch by Marco Gerards)
2211 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2212 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2213 (usb_keyboard_mod_LDFLAGS): New variables.
2215 * term/usb_keyboard.c: New file.
2217 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2219 Corrected wrong declaration
2221 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2223 2009-02-14 Christian Franke <franke@computer.org>
2225 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2226 (grub_lspci_iter): Print class code and programming interface byte.
2228 2009-02-14 Christian Franke <franke@computer.org>
2230 * gendistlist.sh: Ignore `.svn' directories.
2232 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
2234 * fs/fat.c: Add 2009 to Copyright line.
2236 2009-02-14 Christian Franke <franke@computer.org>
2238 * commands/hdparm.c: New file. Provides `hdparm' command
2239 which sends ATA commands via grub_disk_ata_pass_through ().
2241 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2243 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2244 and <grub/cpu/io.h> to include/grub/ata.h.
2245 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2246 (GRUB_CDROM_SECTOR_SIZE): Remove.
2247 (GRUB_ATA_*): Move to include/grub/ata.h.
2248 (GRUB_ATAPI_*): Likewise.
2249 (enum grub_ata_commands): Likewise.
2250 (enum grub_ata_timeout_milliseconds): Likewise.
2251 (struct grub_ata_device): Likewise.
2252 (grub_ata_regset): Likewise.
2253 (grub_ata_regget): Likewise.
2254 (grub_ata_regset2): Likewise.
2255 (grub_ata_regget2): Likewise.
2256 (grub_ata_check_ready): Likewise.
2257 (grub_ata_wait_not_busy): Remove static, exported in
2259 (grub_ata_wait_drq): Likewise.
2260 (grub_ata_pio_read): Likewise.
2262 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2263 function for hdparm.mod.
2265 * include/grub/ata.h: New file, contains declarations from
2267 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2269 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2270 (grub_disk_ata_pass_through): New exported variable.
2272 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2274 2009-02-13 Colin D Bennett <colin@gibibit.com>
2276 Support multiple fallback entries, and provide an API to support
2277 executing default+fallback menu entries. Renamed the `terminal' menu
2280 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2281 variable declaration.
2282 (grub_menu_execute_callback): New structure declaration.
2283 (grub_menu_execute_callback_t): New typedef.
2284 (grub_menu_execute_with_fallback): New function declaration.
2285 (grub_menu_get_entry): Likewise.
2286 (grub_menu_get_timeout): Likewise.
2287 (grub_menu_set_timeout): Likewise.
2289 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2291 * normal/menu.c (grub_wait_after_message): Moved to
2292 `normal/menu_text.c'.
2293 (draw_border): Likewise.
2294 (print_message): Likewise.
2295 (print_entry): Likewise.
2296 (print_entries): Likewise.
2297 (grub_menu_init_page): Likewise.
2298 (get_entry_number): Likewise.
2299 (print_timeout): Likewise.
2300 (run_menu): Likewise.
2301 (grub_menu_execute_entry): Likewise.
2302 (show_text_menu): Likewise.
2303 (get_and_remove_first_entry_number): New function.
2304 (grub_menu_execute_with_fallback): Likewise.
2305 (get_entry): Renamed to ...
2306 (grub_menu_get_entry): .. this and made it global.
2307 (get_timeout): Renamed to ...
2308 (grub_menu_get_timeout): ... this and made it global.
2309 (set_timeout): Renamed to ...
2310 (grub_menu_set_timeout): ... this and made it global.
2311 (grub_normal_terminal_menu_viewer): Renamed to ...
2312 (grub_normal_text_menu_viewer): ... this.
2314 * normal/menu_text.c: New file. Extracted text-menu-specific code
2317 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2318 (normal_mod_SOURCES): Likewise.
2320 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2321 (normal_mod_SOURCES): Likewise.
2323 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2324 (normal_mod_SOURCES): Likewise.
2326 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2327 (normal_mod_SOURCES): Likewise.
2329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2330 (normal_mod_SOURCES): Likewise.
2332 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2333 (normal_mod_SOURCES): Likewise.
2335 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2336 (normal_mod_SOURCES): Likewise.
2338 2009-02-11 Robert Millan <rmh@aybabtu.com>
2340 * util/grub.d/00_header.in: Update old reference to `font' command.
2342 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
2344 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2346 Based on patch from Javier MartÃn.
2348 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2350 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2351 to avoid false positives with FAT.
2352 (grub_fstest_SOURCES): Likewise.
2353 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2354 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2355 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2356 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2357 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2358 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2360 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2362 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2363 bpb.version_specific.fat12_or_fat16.fstype and
2364 bpb.version_specific.fat32.fstype.
2366 2009-02-08 Robert Millan <rmh@aybabtu.com>
2368 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2370 2009-02-08 Robert Millan <rmh@aybabtu.com>
2372 * Makefile.in (host_os, host_cpu): New variables.
2373 (target_os): Remove. Update all users.
2375 2009-02-08 Marco Gerards <marco@gnu.org>
2377 * Makefile.in (enable_grub_emu_usb): New variable.
2378 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2379 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2380 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2381 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2382 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2383 `usbtest.mod' and `usbms.mod'.
2384 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2385 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2386 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2387 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2388 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2391 * disk/usbms.c: New file.
2393 * include/grub/usb.h: Likewise.
2395 * include/grub/usbtrans.h: Likewise.
2397 * include/grub/usbdesc.h: Likewise.
2399 * bus/usb/usbtrans.c: Likewise.
2401 * bus/usb/ohci.c: Likewise.
2403 * bus/usb/uhci.c: Likewise.
2405 * bus/usb/usbhub.c: Likewise.
2407 * bus/usb/usb.c: Likewise.
2409 * commands/usbtest.c: Likewise.
2411 * util/usb.c: Likewise.
2413 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2415 * configure.ac: Test for libusb presence.
2417 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2419 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2421 * kern/mm.c: Add more comments.
2423 2009-02-08 Robert Millan <rmh@aybabtu.com>
2425 Patch from Javier MartÃn.
2426 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2427 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2429 2009-02-08 Robert Millan <rmh@aybabtu.com>
2431 * fs/cpio.c: Split tar functionality to ...
2432 * fs/tar.c: ... here (new file). Update all users.
2434 2009-02-07 Robert Millan <rmh@aybabtu.com>
2436 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2437 backward-incompatible features.
2439 Based on patch from Javier MartÃn, with some adjustments.
2441 2009-02-07 Michael Scherer <misc@mandriva.org>
2443 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2445 2009-02-07 Robert Millan <rmh@aybabtu.com>
2447 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2448 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2449 after the RAID stuff.
2451 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2453 Fixes problem when running vbetest command as reported by
2454 Vladimir Serbinenko <phcoder@gmail.com>.
2456 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2458 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
2460 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2461 /dev/md/NpN style mdraid devices.
2463 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2465 * util/unifont2pff.rb: Remove.
2467 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2469 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2472 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2474 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2475 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2476 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2477 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2478 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2479 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2480 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2482 2009-02-02 Christian Franke <franke@computer.org>
2484 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2486 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
2488 * INSTALL: Note that we now require at least autoconf 2.59 and
2489 that LZO is optional.
2491 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2493 Base on patch on bug #24154 created by Tomas Tintera
2496 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2498 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2500 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2501 <bero@arklinux.org>.
2503 * normal/parser.y (script_init): Add missing semicolon.
2505 2009-01-31 Colin D Bennett <colin@gibibit.com>
2507 * normal/main.c: Add include to grub/menu_viewer.h.
2508 (free_menu_entry_classes): Added.
2509 (grub_normal_menu_addentry): Added class property handling.
2510 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2511 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2513 * normal/menu_viewer.c: New file.
2515 * normal/menu.c (run_menu_entry): Renamed to ...
2516 (grub_menu_execute_entry): ... this and made it as global.
2517 (grub_menu_run): Renamed to ...
2518 (show_text_menu): ... this and made it local.
2519 (show_text_menu): Adapt to new function names.
2520 (grub_normal_terminal_menu_viewer): New global variable.
2522 * include/grub/menu.h: New file.
2524 * include/grub/menu_viewer.h: New file.
2526 * include/grub/normal.h: Added include to grub/menu.h.
2527 (grub_menu_entry): Moved to include/grub/menu.h.
2528 (grub_menu_entry_t): Likewise.
2529 (grub_menu): Likewise.
2530 (grub_menu_t): Likewise.
2531 (grub_normal_terminal_menu_viewer): Added.
2532 (grub_menu_execute_entry): Likewise.
2533 (grub_menu_run): Removed.
2535 * DISTLIST: Added include/grub/menu.h.
2536 Added include/grub/menu_viewer.h.
2537 Added normal/menu_viewer.c.
2539 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2541 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2542 arglist for menutitle arguments.
2544 * normal/main.c (grub_normal_menu_addentry): Likewise.
2546 * normal/parser.y (menuentry): Likewise.
2548 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2550 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2551 (grub_script_create_cmdmenu): Likewise.
2553 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2555 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2558 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2560 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2562 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2564 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2566 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2568 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2570 2009-01-30 Christian Franke <franke@computer.org>
2572 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2573 in option help text.
2575 2009-01-27 Pavel Roskin <proski@gnu.org>
2577 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2579 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2581 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2583 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2585 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2586 unregister function.
2588 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2590 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2592 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2594 * util/grub-mkfont.c (usage): Fix typo.
2596 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2598 2009-01-26 Daniel Mierswa <impulze@impulze.org>
2600 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2602 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2604 * kern/misc.c (grub_strcasecmp): New function.
2605 (grub_strcasecmp): Use grub_size_t instead of int for length.
2607 * include/grub/misc.h: Update function prototypes.
2609 2009-01-26 Robert Millan <rmh@aybabtu.com>
2611 * configure.ac: Fix cross-compilation check.
2613 2009-01-22 Christian Franke <franke@computer.org>
2615 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2616 (precision) digit string. Allow `.format2' without `format1' (width).
2617 Limit input chars for `%s' output to `format2' if specified. This is
2618 compatible with standard printf ().
2620 2009-01-22 Christian Franke <franke@computer.org>
2622 * disk/ata.c (grub_ata_wait_status): Replace by ...
2623 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2624 other status bits may be invalid while BSY is asserted.
2625 (grub_ata_check_ready): New function.
2626 (grub_ata_cmd): Removed.
2627 (grub_ata_wait_drq): New function.
2628 (grub_ata_strncpy): Remove inline.
2629 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2630 and error check now done by grub_ata_wait_drq ().
2631 (grub_ata_pio_write): Likewise.
2632 (grub_atapi_identify): Set DEV before check for !BSY. Use
2633 grub_ata_wait_drq () to wait for data.
2634 (grub_ata_device_initialize): Add status register check to
2635 detect missing SATA slave devices. Add debug messages.
2636 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2637 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2638 transfer loop by grub_ata_pio_write ().
2639 (grub_ata_identify): Set DEV before check for !BSY. Use
2640 grub_ata_wait_drq () to wait for data.
2641 (grub_ata_setaddress): Set DEV before check for !BSY.
2642 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2643 read/write in one loop. Fix invalid command on write. Fix incomplete
2644 command on (size % batch) == 0. Add missing error check after write of
2645 last block. Add debug messages.
2646 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2648 2009-01-19 Christian Franke <franke@computer.org>
2650 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2651 (GRUB_ATAPI_IREASON_*): Likewise.
2652 (grub_ata_pio_write): Fix timeout error return.
2653 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2654 (grub_atapi_wait_drq): New function.
2655 (grub_atapi_packet): New parameter `size'.
2656 Use grub_atapi_wait_drq () and direct write instead of
2657 grub_ata_pio_write ().
2658 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2659 reads the number of bytes requested by the device for each DRQ
2661 (grub_atapi_write): Remove old implementation, return not
2662 implemented instead.
2664 2009-01-19 Christian Franke <franke@computer.org>
2666 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2667 of 512 to calculate data size.
2668 (grub_scsi_read12): Likewise.
2669 (grub_scsi_write10): Likewise.
2670 (grub_scsi_write12): Likewise.
2671 (grub_scsi_read): Adjust size according to blocksize.
2672 Add checks for invalid blocksize and unaligned transfer.
2674 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2676 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2678 * term/gfxterm.c (write_char): Fix background rendering for wide
2681 2009-01-19 Robert Millan <rmh@aybabtu.com>
2683 * config.guess: Update to latest version from config git.
2684 * config.sub: Likewise.
2686 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
2688 * Makefile.in: Change font compilation to use new grub-mkfont instead
2691 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2692 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2693 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2694 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2695 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2696 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2697 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2698 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2699 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2701 2009-01-16 Christian Franke <franke@computer.org>
2703 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2704 (enum grub_ata_timeout_milliseconds): New enum.
2705 (grub_ata_wait_status): Add parameter milliseconds.
2706 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2707 recovery from timed-out commands.
2708 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2709 return grub_errno instead of REG_ERROR.
2710 (grub_ata_pio_write): Add parameter milliseconds.
2711 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2712 Pass milliseconds to grub_ata_wait_status () and
2713 grub_ata_pio_read ().
2714 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2715 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2716 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2717 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2718 It is not suitable for device detection, because DEV bit is ignored,
2719 the command may run too long, and not all devices set the signature
2721 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2722 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2723 Fix device selection, DEV bit must be set first to address the registers
2724 of the correct device.
2725 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2726 grub_ata_pio_read/write ().
2727 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2728 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2730 2009-01-13 Carles Pina i Estany <carles@pina.cat>
2732 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2734 2009-01-13 Bean <bean123ch@gmail.com>
2736 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2738 2009-01-13 Bean <bean123ch@gmail.com>
2740 * Makefile.in: (enable_grub_mkfont): New variable.
2741 (freetype_cflags): Likewise.
2742 (freetype_libs): Likewise.
2744 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2745 (grub_mkfont_SOURCES): New variable.
2746 (grub_mkfont_CFLAGS): Likewise.
2747 (grub_mkfont_LDFLAGS): Likewise.
2749 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2750 library if `--enable-grub-mkfont' is requested.
2751 (enable_grub_mkfont): New variable.
2752 (freetype_cflags): Likewise.
2753 (freetype_libs): Likewise.
2755 * util/grub-mkfont.c: New file.
2757 2009-01-12 Christian Franke <franke@computer.org>
2759 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2760 mode check. Fix setting of compat_use[].
2762 2009-01-10 Robert Millan <rmh@aybabtu.com>
2764 Update a few copyright years which we forgot to do in 2008 (only for
2765 files whose changes made in 2008 were copyright-significant)
2767 * Makefile.in: Add 2008 to Copyright line.
2768 * disk/ieee1275/ofdisk.c: Likewise.
2769 * disk/efi/efidisk.c: Likewise.
2770 * kern/dl.c: Likewise.
2771 * kern/sparc64/ieee1275/init.c: Likewise.
2772 * kern/mm.c: Likewise.
2773 * kern/efi/mm.c: Likewise.
2774 * boot/i386/pc/boot.S: Likewise.
2775 * genfslist.sh: Likewise.
2776 * fs/iso9660.c: Likewise.
2777 * fs/hfs.c: Likewise.
2778 * fs/jfs.c: Likewise.
2779 * fs/minix.c: Likewise.
2780 * fs/ufs.c: Likewise.
2781 * gensymlist.sh.in: Likewise.
2782 * genkernsyms.sh.in: Likewise.
2783 * include/grub/misc.h: Likewise.
2784 * include/grub/types.h: Likewise.
2785 * include/grub/symbol.h: Likewise.
2786 * include/grub/elf.h: Likewise.
2787 * include/grub/kernel.h: Likewise.
2788 * include/grub/disk.h: Likewise.
2789 * include/grub/dl.h: Likewise.
2790 * include/grub/i386/linux.h: Likewise.
2791 * include/grub/i386/pc/biosdisk.h: Likewise.
2792 * include/grub/efi/api.h: Likewise.
2793 * include/grub/efi/pe32.h: Likewise.
2794 * include/grub/util/misc.h: Likewise.
2795 * normal/execute.c: Likewise.
2796 * normal/arg.c: Likewise.
2797 * normal/completion.c: Likewise.
2798 * normal/lexer.c: Likewise.
2799 * normal/parser.y: Likewise.
2800 * normal/misc.c: Likewise.
2801 * commands/i386/pc/vbeinfo.c: Likewise.
2802 * commands/hexdump.c: Likewise.
2803 * commands/terminal.c: Likewise.
2804 * commands/ls.c: Likewise.
2805 * commands/help.c: Likewise.
2806 * partmap/pc.c: Likewise.
2807 * loader/efi/chainloader.c: Likewise.
2808 * loader/multiboot_loader.c: Likewise.
2809 * loader/i386/pc/multiboot2.c: Likewise.
2810 * term/efi/console.c: Likewise.
2811 * term/i386/pc/serial.c: Likewise.
2812 * util/lvm.c: Likewise.
2813 * util/console.c: Likewise.
2814 * util/i386/efi/grub-mkimage.c: Likewise.
2815 * util/raid.c: Likewise.
2817 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
2819 * commands/videotest.c: Removed include to grub/machine/memory.h.
2821 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2822 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2823 (video_mod_SOURCES): Removed.
2824 (video_mod_CFLAGS): Likewise.
2825 (video_mod_LDFLAGS): Likewise.
2826 (gfxterm_mod_SOURCES): Likewise.
2827 (gfxterm_mod_CFLAGS): Likewise.
2828 (gfxterm_mod_LDFLAGS): Likewise.
2829 (videotest_mod_SOURCES): Likewise.
2830 (videotest_mod_CFLAGS): Likewise.
2831 (videotest_mod_LDFLAGS): Likewise.
2832 (bitmap_mod_SOURCES): Likewise.
2833 (bitmap_mod_CFLAGS): Likewise.
2834 (bitmap_mod_LDFLAGS): Likewise.
2835 (tga_mod_SOURCES): Likewise.
2836 (tga_mod_CFLAGS): Likewise.
2837 (tga_mod_LDFLAGS): Likewise.
2838 (jpeg_mod_SOURCES): Likewise.
2839 (jpeg_mod_CFLAGS): Likewise.
2840 (jpeg_mod_LDFLAGS): Likewise.
2841 (png_mod_SOURCES): Likewise.
2842 (png_mod_CFLAGS): Likewise.
2843 (png_mod_LDFLAGS): Likewise.
2845 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2846 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2847 (video_mod_SOURCES): Added.
2848 (video_mod_CFLAGS): Likewise.
2849 (video_mod_LDFLAGS): Likewise.
2850 (videotest_mod_SOURCES): Likewise.
2851 (videotest_mod_CFLAGS): Likewise.
2852 (videotest_mod_LDFLAGS): Likewise.
2853 (bitmap_mod_SOURCES): Likewise.
2854 (bitmap_mod_CFLAGS): Likewise.
2855 (bitmap_mod_LDFLAGS): Likewise.
2856 (tga_mod_SOURCES): Likewise.
2857 (tga_mod_CFLAGS): Likewise.
2858 (tga_mod_LDFLAGS): Likewise.
2859 (jpeg_mod_SOURCES): Likewise.
2860 (jpeg_mod_CFLAGS): Likewise.
2861 (jpeg_mod_LDFLAGS): Likewise.
2862 (png_mod_SOURCES): Likewise.
2863 (png_mod_CFLAGS): Likewise.
2864 (png_mod_LDFLAGS): Likewise.
2865 (gfxterm_mod_SOURCES): Likewise.
2866 (gfxterm_mod_CFLAGS): Likewise.
2867 (gfxterm_mod_LDFLAGS): Likewise.
2869 * term/gfxterm.c: Removed include to grub/machine/memory.h,
2870 grub/machine/console.h.
2872 2009-01-04 Jerone Young <jerone@gmail.com>
2874 Make on screen instructions clearer
2876 Based on patch created by Jidanni <jidanni@jidanni.org>
2878 * normal/menu.c: print clearer instructions on the screen
2880 2009-01-02 Colin D Bennett <colin@gibibit.com>
2884 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2885 build system and fixed gfxterm.c to work with different sized fonts.
2887 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
2889 * configure: Re-generated.
2891 * DISTLIST: Removed font/manager.c.
2893 Added font/font_cmd.c.
2895 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2898 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
2900 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
2902 * kern/term.c: Changed users of grub_utf8_to_ucs4.
2904 * normal/menu.c: Likewise.
2906 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2907 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
2909 * include/grub/font.h: Replaced with new file.
2911 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2912 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2913 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2914 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2915 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
2916 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
2917 fg_red, fg_green, fg_blue, fg_alpha.
2918 (grub_video_adapter): Removed blit_glyph.
2919 (grub_video_blit_glyph): Removed.
2921 * font/manager.c: Removed file.
2923 * font/font.c: New file.
2925 * font/font_cmd.c: Likewise.
2927 * video/video.c (grub_video_blit_glyph): Removed.
2929 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2930 (grub_video_vbe_map_rgba): Likewise.
2931 (grub_video_vbe_unmap_color_int): Likewise.
2932 (grub_video_vbe_blit_glyph): Removed.
2933 (grub_video_vbe_adapter): Removed blit_glyph.
2935 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2936 (get_pixel): Likewise.
2937 (set_pixel): Likewise.
2939 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
2941 * term/gfxterm.c: Adapted to new font engine.
2943 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
2945 * term/i386/pc/vga.c: Likewise.
2947 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
2949 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2951 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2953 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2955 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2957 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2959 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2961 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2963 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2965 * util/grub.d/00_header.in: Changed to use new loadfont command.
2967 * util/grub-mkconfig_lib.in: Changed font extension.
2969 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
2971 * util/getroot.c (grub_util_get_grub_dev): Add support for
2972 /dev/md/dNNpNN style partitionable mdraid devices.
2974 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
2976 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2977 at a time limit of the PXE TFTP API correctly.
2978 (grub_pxefs_close): Likewise.
2980 2008-11-29 Robert Millan <rmh@aybabtu.com>
2982 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
2983 grub_ata_device_initialize() calls.
2985 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
2987 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2989 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2991 2008-11-28 Robert Millan <rmh@aybabtu.com>
2993 Fix build on powerpc-ieee1275. Based on patch created by
2994 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2995 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2996 `kern/ieee1275/mmap.c'.
2997 * include/grub/powerpc/ieee1275/memory.h: New file.
2999 Provide grub-install on coreboot.
3000 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3001 (grub_install_SOURCES): New variable.
3002 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3005 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
3007 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3008 to `grub_term_input_t'.
3009 (grub_term_get_current_output): Change return type to
3010 `grub_term_output_t'.
3012 2008-11-22 Robert Millan <rmh@aybabtu.com>
3014 Fix breakage on coreboot due to declaration mismatch.
3015 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3016 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3017 grub_vga_text_cls().
3019 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3020 comments. Avoid copying one more byte than necessary (just in case).
3022 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3023 to 0x200000 (avoids trouble with some OFW implementations, and matches
3024 with the one in Yaboot).
3025 Reported by Manoel Abranches
3027 2008-11-20 Robert Millan <rmh@aybabtu.com>
3029 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3030 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3032 * util/grub-mkconfig_lib.in (grub_warn): New function.
3033 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3034 warnings, to obtain consistent formatting.
3035 * util/grub.d/00_header.in: Likewise.
3036 * util/update-grub_lib.in: Likewise.
3038 * loader/i386/linux.c (allocate_pages): Fix a warning.
3039 Move comment text to `#error' stanza.
3041 Harmonize ieee1275's grub_available_iterate() with the generic
3042 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3043 build problem on i386-ieee1275):
3044 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3045 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3046 parameter `type'. Update all users of this function.
3047 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3048 `kern/ieee1275/mmap.c'.
3049 * kern/ieee1275/init.c
3050 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3052 (grub_machine_mmap_iterate): ... this.
3053 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3054 return type to `grub_err_t'. Update all implementations of this
3056 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3059 Add `lsmmap' command (lists firmware-provided memory map):
3060 * commands/lsmmap.c: New file.
3061 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3062 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3064 * conf/powerpc-ieee1275.rmk: Likewise.
3065 * conf/i386-coreboot.rmk: Likewise.
3066 * conf/i386-ieee1275.rmk: Likewise.
3068 2008-11-19 Robert Millan <rmh@aybabtu.com>
3070 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3071 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3072 constraints to initrd allocation (based on code from
3073 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3074 for Linux to find it.
3076 2008-11-14 Robert Millan <rmh@aybabtu.com>
3078 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3079 order to cope with duplicate slashes.
3081 2008-11-14 Robert Millan <rmh@aybabtu.com>
3083 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3084 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3085 don't want to mess with lower memory, because it is used in the Linux
3088 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3089 an appropriate place in lower memory, between 0x10000 and 0x90000,
3090 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3091 is in our heap (probably as a result of it being corrupted during
3092 decompression). Add #error instance with comment to explain why this
3093 loader isn't currently usable on PC/BIOS.
3095 2008-11-14 Robert Millan <rmh@aybabtu.com>
3097 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3098 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3100 2008-11-12 Robert Millan <rmh@aybabtu.com>
3102 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3104 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3105 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3107 * include/grub/i386/pc/memory.h: ... to here.
3109 2008-11-12 Robert Millan <rmh@aybabtu.com>
3111 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3114 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3115 (grub_console_cur_color, grub_console_real_putchar)
3116 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3117 (grub_console_setcolorstate, grub_console_setcolor)
3118 (grub_console_getcolor): Move from here ...
3119 * include/grub/i386/vga_common.h: ... to here (new file).
3121 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3122 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3124 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3125 `<grub/i386/vga_common.h>'.
3127 2008-11-12 Robert Millan <rmh@aybabtu.com>
3129 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3130 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3131 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3133 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3134 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3136 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3137 grub_console_init() with call to grub_vga_text_init().
3138 (grub_machine_fini): Replace call to
3139 grub_console_fini() with call to grub_vga_text_fini() and
3140 grub_at_keyboard_fini().
3142 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3143 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3144 (grub_console_setcolorstate, grub_console_setcolor)
3145 (grub_console_getcolor): New function prototypes.
3147 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3148 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3149 (grub_vga_text_setcursor): Static-ize.
3150 (grub_vga_text_term): New structure.
3151 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3153 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3154 (grub_console_cur_color, grub_console_standard_color)
3155 (grub_console_normal_color, grub_console_highlight_color)
3156 (map_char, grub_console_putchar, grub_console_getcharwidth)
3157 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3158 (grub_console_getcolor): Move from here ...
3159 * term/i386/vga_common.c: ... to here (same function names).
3161 2008-11-12 Robert Millan <rmh@aybabtu.com>
3163 Use newly-added Multiboot support in coreboot.
3165 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3166 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3168 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3169 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3170 (codestart): Store the MBI in `startup_multiboot_info' when we're
3171 being loaded using Multiboot.
3173 * kern/i386/coreboot/init.c (grub_machine_init): Move
3174 grub_at_keyboard_init() call to beginning of function (useful for
3175 debugging). Call grub_machine_mmap_init() before attempting to use
3176 grub_machine_mmap_iterate().
3177 (grub_lower_mem, grub_upper_mem): Move from here ...
3178 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3181 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3184 2008-11-12 Robert Millan <rmh@aybabtu.com>
3186 Fix a regression introduced by the at_keyboard.mod split. Because
3187 some terminals are default on some platforms and non-default on
3188 others, the first terminal being registered determines which is
3189 going to be default.
3191 * kern/term.c (grub_term_register_input): If this is the first
3192 terminal being registered, set it as the current one.
3193 (grub_term_register_output): Likewise.
3195 * term/efi/console.c (grub_console_init): Do not call
3196 grub_term_set_current_output() or grub_term_set_current_input().
3197 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3198 * term/i386/pc/console.c (grub_console_init): Likewise.
3199 (grub_console_fini): Do not call grub_term_set_current_input()
3200 (but leave grub_term_set_current_output() to restore text mode).
3202 2008-11-10 Robert Millan <rmh@aybabtu.com>
3204 * util/grub.d/00_header.in: Add backward compatibility check for
3205 versions of terminal.mod that don't understand `terminal_input' or
3208 2008-11-09 Robert Millan <rmh@aybabtu.com>
3210 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3211 `terminal_input' / `terminal_output', not `terminal'.
3213 2008-11-08 Robert Millan <rmh@aybabtu.com>
3215 * Makefile.in (include_DATA): Fix srcdir=. assumption.
3216 (DISTCLEANFILES): Add `build_env.mk'.
3218 2008-11-08 Robert Millan <rmh@aybabtu.com>
3220 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3221 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3222 members. Update all users.
3223 * util/console.c (grub_ncurses_term): Split in ...
3224 (grub_ncurses_term_input): ... this, and ...
3225 (grub_ncurses_term_output): ... this. Update all users.
3226 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3228 2008-11-08 Robert Millan <rmh@aybabtu.com>
3230 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3231 (PKGDATA): Add $(pkgdata_SRCDIR).
3232 (pkglib_BUILDDIR): New variable.
3233 (pkgdata_SRCDIR): New variable.
3234 (build_env.mk): New target.
3235 (include_DATA): New variable.
3236 (install-local): Install $(include_DATA) files in $(includedir).
3238 2008-11-07 Pavel Roskin <proski@gnu.org>
3240 * gendistlist.sh: Use C locale for sorting to ensure consistent
3241 output on all systems.
3243 * util/grub.d/00_header.in: Remove incorrect space before
3246 2008-11-07 Robert Millan <rmh@aybabtu.com>
3248 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3250 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3251 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3252 (based on find_multi_boot1_header).
3253 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3254 using find_multi_boot2_header(), and abort if neither Multiboot or
3255 Multiboot headers were found.
3257 2008-11-07 Robert Millan <rmh@aybabtu.com>
3259 Modularize at_keyboard.mod:
3261 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3262 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3263 (at_keyboard_mod_LDFLAGS): New variables.
3265 Actual terminal split:
3267 * include/grub/term.h (struct grub_term): Split in ...
3268 (struct grub_term_input): ... this, and ...
3269 (struct grub_term_output): ... this. Update all users.
3270 (grub_term_set_current): Split in ...
3271 (grub_term_set_current_input): ... this, and ...
3272 (grub_term_set_current_output): ... this.
3273 (grub_term_get_current): Split in ...
3274 (grub_term_get_current_input): ... this, and ...
3275 (grub_term_get_current_output): ... this.
3276 (grub_term_register): Split in ...
3277 (grub_term_register_input): ... this, and ...
3278 (grub_term_register_output): ... this.
3279 (grub_term_unregister): Split in ...
3280 (grub_term_unregister_input): ... this, and ...
3281 (grub_term_unregister_output): ... this.
3282 (grub_term_iterate): Split in ...
3283 (grub_term_iterate_input): ... this, and ...
3284 (grub_term_iterate_output): ... this.
3286 * kern/term.c (grub_term_list): Split in ...
3287 (grub_term_list_input): ... this, and ...
3288 (grub_term_list_output): ... this. Update all users.
3289 (grub_cur_term): Split in ...
3290 (grub_cur_term_input): ... this, and ...
3291 (grub_cur_term_output): ... this. Update all users.
3292 (grub_term_set_current): Split in ...
3293 (grub_term_set_current_input): ... this, and ...
3294 (grub_term_set_current_output): ... this.
3295 (grub_term_get_current): Split in ...
3296 (grub_term_get_current_input): ... this, and ...
3297 (grub_term_get_current_output): ... this.
3298 (grub_term_register): Split in ...
3299 (grub_term_register_input): ... this, and ...
3300 (grub_term_register_output): ... this.
3301 (grub_term_unregister): Split in ...
3302 (grub_term_unregister_input): ... this, and ...
3303 (grub_term_unregister_output): ... this.
3304 (grub_term_iterate): Split in ...
3305 (grub_term_iterate_input): ... this, and ...
3306 (grub_term_iterate_output): ... this.
3308 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3309 a check for input and one for output (and only attempt to get keys
3310 from user when input works).
3312 * util/grub-probe.c (grub_term_get_current): Split in ...
3313 (grub_term_get_current_input): ... this, and ...
3314 (grub_term_get_current_output): ... this.
3315 * util/grub-fstest.c: Likewise.
3316 * util/i386/pc/grub-setup.c: Likewise.
3317 * util/grub-editenv.c: Likewise.
3319 Portability adjustments:
3321 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3322 `term/i386/pc/at_keyboard.c'.
3323 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3324 grub_keyboard_controller_init() (now handled by terminal .init).
3325 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3326 grub_at_keyboard_init().
3327 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3328 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3329 at_keyboard.mod via input terminal interface).
3330 * include/grub/i386/coreboot/console.h: Convert into a stub for
3331 `<grub/i386/pc/console.h>'.
3333 Migrate full terminals to new API:
3335 * term/efi/console.c (grub_console_term): Split into ...
3336 (grub_console_term_input): ... this, and ...
3337 (grub_console_term_output): ... this. Update all users.
3338 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3339 (grub_ofconsole_init): Split into ...
3340 (grub_ofconsole_init_input): ... this, and ...
3341 (grub_ofconsole_init_output): ... this.
3342 (grub_ofconsole_term): Split into ...
3343 (grub_ofconsole_term_input): ... this, and ...
3344 (grub_ofconsole_term_output): ... this. Update all users.
3345 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3346 (grub_serial_term_input): ... this, and ...
3347 (grub_serial_term_output): ... this. Update all users.
3348 * term/i386/pc/console.c (grub_console_term): Split into ...
3349 (grub_console_term_input): ... this, and ...
3350 (grub_console_term_output): ... this. Update all users.
3351 (grub_console_term_input): Only enable it on PC/BIOS platform.
3352 (grub_console_init): Remove grub_keyboard_controller_init() call.
3354 Migrate input terminals to new API:
3356 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3357 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3358 i386-specific anyway).
3359 (grub_console_checkkey): Rename to ...
3360 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3362 (grub_keyboard_controller_orig): New variable.
3363 (grub_console_getkey): Rename to ...
3364 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3366 (grub_keyboard_controller_init): Static-ize. Save original
3367 controller value so that it can be restored ...
3368 (grub_keyboard_controller_fini): ... here (new function).
3369 (grub_at_keyboard_term): New structure.
3370 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3373 Migrate output terminals to new API:
3375 * term/i386/pc/vga.c (grub_vga_term): Change type to
3376 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3377 members. Update all users.
3378 * term/gfxterm.c (grub_video_term): Change type to
3379 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3380 members. Update all users.
3381 * include/grub/i386/pc/console.h (grub_console_checkkey)
3382 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3385 Migrate `terminal' command and userland tools to new API:
3387 * commands/terminal.c (grub_cmd_terminal): Split into ...
3388 (grub_cmd_terminal_input): ... this, and ...
3389 (grub_cmd_terminal_output): ... this.
3390 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3391 `terminal_input' and `terminal_output'.
3392 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3393 `terminal_input' / `terminal_output' API.
3394 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3395 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3396 provided ${GRUB_TERMINAL}, convert it).
3398 2008-11-04 Robert Millan <rmh@aybabtu.com>
3400 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3402 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3404 2008-11-03 Bean <bean123ch@gmail.com>
3406 * kern/elf.c (grub_elf32_load): Revert to previous code.
3407 (grub_elf64_load): Likewise.
3409 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3411 2008-11-01 Robert Millan <rmh@aybabtu.com>
3413 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3414 (TARGET_CPPFLAGS): Likewise.
3415 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3417 2008-11-01 Carles Pina i Estany <carles@pina.cat>
3419 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3421 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3423 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3424 addition of objects until the code is not going to be able to fail.
3426 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3428 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3429 (add a missing NULL check, and correct them by moving the pointer
3430 operations after the actual check).
3432 2008-10-29 Robert Millan <rmh@aybabtu.com>
3434 * util/i386/pc/grub-install.in: Handle empty string as output from
3435 make_system_path_relative_to_its_root().
3437 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3439 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3440 circular metadata worst case scenario. If the metadata is circular
3441 then copy the wrap in place.
3442 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3443 project lib/format_text/layout.h
3444 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3446 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3448 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3450 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3452 * util/update-grub_lib.in: Mention filename in warning message.
3454 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3456 * NEWS: Update for rename of update-grub to grub-mkconfig.
3458 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3460 * util/update-grub_lib.in: Copy to ...
3461 * util/grub-mkconfig_lib.in: ... this. Update all users.
3462 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3463 * util/update-grub.in: Rename to ...
3464 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3465 option. Add `--output' option to allow users to specify the generated
3466 configuration file. Default to stdout.
3467 (update_grub_dir): Rename to ...
3468 (grub_mkconfig_dir): ... this.
3469 (grub_cfg): Default to an empty string.
3470 * conf/common.rmk (update-grub): Rename to ...
3471 (grub-mkconfig): ... this.
3472 (update-grub_lib): Copy to ...
3473 (grub-mkconfig_lib): ... this.
3474 (update-grub_SCRIPTS): Copy to ...
3475 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3476 (update-grub_DATA): Rename to ...
3477 (grub-mkconfig_DATA): ... this.
3479 2008-09-28 Robert Millan <rmh@aybabtu.com>
3481 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3482 to `modified'. Add the real `created' field.
3483 (grub_iso9660_uuid): Use `modified' rather than `created' for
3484 constructing the UUID.
3486 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
3488 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3489 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3491 2008-09-28 Bean <bean123ch@gmail.com>
3493 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3494 Thanks to Christian Franke for finding this bug.
3496 2008-09-25 Robert Millan <rmh@aybabtu.com>
3498 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3499 instances of grub_util_get_disk_name() (see previous commit).
3501 2008-09-25 Robert Millan <rmh@aybabtu.com>
3503 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3504 `util/i386/get_disk_name.c'.
3505 * conf/i386-efi.rmk: Likewise.
3506 * conf/x86_64-efi.rmk: Likewise.
3507 * conf/i386-coreboot.rmk: Likewise.
3508 * conf/i386-ieee1275.rmk: Likewise.
3509 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3510 `util/ieee1275/get_disk_name.c'.
3511 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3512 * util/ieee1275/get_disk_name.c: Remove file.
3513 * util/i386/get_disk_name.c: Remove file.
3514 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3515 "hd%d" for device.map entries, rather than using
3516 grub_util_get_disk_name().
3518 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3520 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3522 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3524 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3526 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3528 (GRUB_TERM_PPAGE): Changed to 0x4900.
3530 2008-09-24 Robert Millan <rmh@aybabtu.com>
3532 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3533 macros (they were i386-pc specific).
3534 * include/grub/sparc64/ieee1275/console.h: Likewise.
3535 * include/grub/efi/console.h: Likewise.
3537 2008-09-22 Bean <bean123ch@gmail.com>
3539 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3540 resident and in attribute list.
3542 * include/grub/ntfs.h (BMP_LEN): Removed.
3544 2008-09-22 Bean <bean123ch@gmail.com>
3546 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3547 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3549 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3550 error occurs, as grub_disk_open will call grub_disk_close, which will
3551 call p->close (scsi).
3553 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3555 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3556 (AC_PREREQ): Bumped to 2.59.
3557 (AC_TRY_COMPILE): Replace obsolete macro with ...
3558 (AC_COMPILE_IFELSE): ... this.
3559 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3560 (AC_LINK_IFELSE): ... this.
3562 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3564 * autogen.sh: Add a call to `gendistlist.sh'.
3566 2008-09-19 Christian Franke <franke@computer.org>
3568 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3569 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3570 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3571 Export __enable_execute_stack() to modules.
3572 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3575 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3577 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3580 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3582 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3583 #include <grub/util/hostdisk.h>.
3585 2008-09-08 Robert Millan <rmh@aybabtu.com>
3587 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3588 segments when their filesz is zero (grub_file_read() interprets
3589 zero-size as "read until EOF", which results in memory corruption).
3590 Use `lowest_segment' rather than 0 for calculating the current
3591 segment load address.
3593 2008-09-08 Robert Millan <rmh@aybabtu.com>
3595 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3596 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3597 clobbered useful information.
3599 2008-09-08 Robert Millan <rmh@aybabtu.com>
3601 * include/grub/util/biosdisk.h: Move to ...
3602 * include/grub/util/hostdisk.h: ... here. Update all users.
3603 * util/biosdisk.c: Move to ...
3604 * util/hostdisk.c: ... here. Update all users.
3606 2008-09-07 Robert Millan <rmh@aybabtu.com>
3608 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3610 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3611 and length can be stored directly in the `mbi->mmap_addr' and
3612 `mbi->mmap_length' struct fields.
3614 2008-09-07 Robert Millan <rmh@aybabtu.com>
3616 * conf/i386.rmk: New file. Provides declaration for building
3618 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3619 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3621 Include `conf/i386.mk'.
3622 * conf/i386-efi.rmk: Likewise.
3623 * conf/x86_64-efi.rmk: Likewise.
3624 * conf/i386-coreboot.rmk: Likewise.
3625 * conf/i386-ieee1275.rmk: Likewise.
3627 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3629 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3630 Adds optimization support for BGR based modes.
3632 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3633 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3634 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3635 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3636 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3637 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3638 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3639 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3640 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3641 (grub_video_i386_vbeblit_index_index): Likewise.
3642 (grub_video_i386_vbeblit_replace_directN): Added.
3643 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3644 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3645 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3646 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3647 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3648 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3649 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3650 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3651 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3652 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3653 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3654 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3655 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3657 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3658 (grub_video_i386_vbefill_R8G8B8): Likewise.
3659 (grub_video_i386_vbefill_index): Likewise.
3660 (grub_video_i386_vbefill_direct32): Added.
3661 (grub_video_i386_vbefill_direct24): Likewise.
3662 (grub_video_i386_vbefill_direct16): Likewise.
3663 (grub_video_i386_vbefill_direct8): Likewise.
3665 * include/grub/video.h (grub_video_blit_format): Removed
3666 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3667 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3668 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3669 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3670 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3672 * video/video.c (grub_video_get_blit_format): Updated to use new
3673 blit formats. Added handling for 16 bit color modes.
3675 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3677 (common_blitter): Updated to use new blitters.
3679 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3681 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3682 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3683 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3684 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3685 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3686 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3687 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3688 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3689 (grub_video_i386_vbeblit_index_index): Likewise.
3690 (grub_video_i386_vbeblit_replace_directN): Added.
3691 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3692 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3693 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3694 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3695 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3696 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3697 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3698 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3699 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3700 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3701 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3702 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3703 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3705 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3706 (grub_video_i386_vbefill_R8G8B8): Likewise.
3707 (grub_video_i386_vbefill_index): Likewise.
3708 (grub_video_i386_vbefill_direct32): Added.
3709 (grub_video_i386_vbefill_direct24): Likewise.
3710 (grub_video_i386_vbefill_direct16): Likewise.
3711 (grub_video_i386_vbefill_direct8): Likewise.
3713 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3716 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3719 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3722 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3725 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3727 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3730 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3732 * fs/iso9660.c (grub_iso9660_date): New structure.
3733 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3734 (grub_iso9660_uuid): New function.
3736 2008-09-05 Bean <bean123ch@gmail.com>
3738 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3740 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3741 insensitive bit for names in Win32 and Win32 & DOS namespace.
3743 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3745 * include/grub/types.h (LONG_MAX): Likewise.
3747 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3749 * util/getroot.c: Include <config.h>.
3750 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3751 add support for /dev/md/N devices and handle LVM double dash escaping.
3753 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3755 * config.guess: Update to latest version from config git.
3756 * config.sub: Likewise.
3758 2008-09-03 Robert Millan <rmh@aybabtu.com>
3760 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3761 `disk->total_sectors'.
3763 2008-09-01 Colin D Bennett <colin@gibibit.com>
3765 * include/grub/normal.h: Fixed incorrect comment for
3766 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3768 2008-09-01 Colin D Bennett <colin@gibibit.com>
3770 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3771 values with defines.
3773 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3774 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3775 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3776 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3777 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3778 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3779 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3780 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3781 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3782 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3783 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3784 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3785 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3786 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3787 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3788 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3789 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3790 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3791 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3793 2008-08-31 Robert Millan <rmh@aybabtu.com>
3795 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3797 (grub_multiboot): Fix a few warnings.
3799 2008-08-31 Robert Millan <rmh@aybabtu.com>
3801 * loader/i386/pc/multiboot.c: Update comment not to say that
3802 boot_device support is unimplemented.
3804 2008-08-31 Robert Millan <rmh@aybabtu.com>
3806 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3807 or memory map support are unimplemented.
3809 2008-08-31 Colin D Bennett <colin@gibibit.com>
3811 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3813 2008-08-31 Colin D Bennett <colin@gibibit.com>
3815 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3816 total video memory in 'vbeinfo' output; show color format details for
3819 2008-08-30 Pavel Roskin <proski@gnu.org>
3821 * util/genmoddep.c: Remove for real this time.
3822 * DISTLIST: Remove util/genmoddep.c.
3824 2008-08-30 Robert Millan <rmh@aybabtu.com>
3826 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3827 as required by Multiboot spec (it was already 4-byte aligned, but
3830 2008-08-29 Pavel Roskin <proski@gnu.org>
3832 * kern/powerpc/ieee1275/crt0.S: Rename to ...
3833 * kern/powerpc/ieee1275/startup.S: ... this.
3834 * conf/powerpc-ieee1275.rmk: Adjust for the above.
3835 * DISTLIST: Likewise.
3837 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3838 grub/cpu/kernel.h. Add start label for consistency with other
3839 platforms. Add grub_prefix immediately after start. Add jump
3840 to the code after grub_prefix.
3841 * include/grub/powerpc/kernel.h: Provide valid values for
3842 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3844 2008-08-29 Bean <bean123ch@gmail.com>
3846 * configure.ac: Change host_os to cygwin for mingw.
3847 (asprintf): New check for function.
3849 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3850 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3852 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
3853 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
3854 sync, sleep and grub_util_get_disk_size for mingw.
3856 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3857 to get size in mingw.
3858 (open_device): Use flag O_BINARY if it's defined.
3859 (find_root_device): Add dummy code for mingw.
3861 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3862 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3863 (get_scsi_disk_name): Return 0 for mingw.
3865 * util/hostfs.c: #include <grub/util/misc.h>.
3866 (grub_hostfs_open): Use "rb" flag to open file, use
3867 grub_util_get_disk_size to get disk size for mingw.
3869 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3870 (asprintf): New function if HAVE_ASPRINTF is not set.
3871 (sync): New function for mingw.
3873 (grub_util_get_disk_size): Likewise.
3875 2008-08-28 Pavel Roskin <proski@gnu.org>
3877 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3880 2008-08-28 Robert Millan <rmh@aybabtu.com>
3882 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3884 2008-08-28 Robert Millan <rmh@aybabtu.com>
3886 Change find_grub_drive() syntax so it doesn't prevent it from
3887 detecting NULL names as errors.
3889 * util/biosdisk.c (find_grub_drive): Move free slot search code
3891 (find_free_slot): ... to here.
3892 (read_device_map): Use find_free_slot() to search for free slots.
3894 2008-08-27 Marco Gerards <marco@gnu.org>
3896 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3897 (scsi_mod_SOURCES): New variable.
3898 (scsi_mod_CFLAGS): Likewise
3899 (scsi_mod_LDFLAGS): Likewise.
3901 * disk/scsi.c: New file.
3903 * include/grub/scsi.h: Likewise.
3905 * include/grub/scsicmd.h: Likewise.
3907 * disk/ata.c: Include <grub/scsi.h>.
3908 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3910 (grub_ata_iterate): Skip ATAPI devices.
3911 (grub_ata_open): Only handle ATAPI devices.
3912 (struct grub_atapi_read): Removed.
3913 (grub_atapi_readsector): Likewise.
3914 (grub_ata_read): No longer handle ATAPI devices.
3915 (grub_ata_write): Likewise.
3916 (grub_atapi_iterate): New function.
3917 (grub_atapi_read): Likewise.
3918 (grub_atapi_write): Likewise.
3919 (grub_atapi_open): Likewise.
3920 (grub_atapi_close): Likewise.
3921 (grub_atapi_dev): New variable.
3922 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3923 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3925 * include/grub/disk.h (enum grub_disk_dev_id): Add
3926 `GRUB_DISK_DEVICE_SCSI_ID'.
3928 2008-08-26 Robert Millan <rmh@aybabtu.com>
3930 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3931 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3934 2008-08-23 Bean <bean123ch@gmail.com>
3936 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3937 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3938 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3939 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3941 (raid5rec_mod_SOURCES): New macro.
3942 (raid5rec_mod_CFLAGS): Likewise.
3943 (raid5rec_mod_LDFLAGS): Likewise.
3944 (raid6rec_mod_SOURCES): Likewise.
3945 (raid6rec_mod_CFLAGS): Likewise.
3946 (raid6rec_mod_LDFLAGS): Likewise.
3947 (mdraid_mod_SOURCES): Likewise.
3948 (mdraid_mod_CFLAGS): Likewise.
3949 (mdraid_mod_LDFLAGS): Likewise.
3950 (dm_nv_mod_SOURCES): Likewise.
3951 (dm_nv_mod_CFLAGS): Likewise.
3952 (dm_nv_mod_LDFLAGS): Likewise.
3954 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3955 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3956 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3958 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3959 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3961 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3963 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3965 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3969 * disk/raid5_recover.c: New file.
3971 * disk/raid6_recover.c: Likewise.
3973 * disk/mdraid_linux.c: Likewise.
3975 * disk/dmraid_nvidia.c: Likewise.
3977 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3980 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3981 calculate the size of raid device.
3982 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3983 different layout of raid5.
3984 (grub_raid_scan_device): Remove code specific to mdraid.
3985 (grub_raid_list): New variable.
3986 (free_array): New function.
3987 (grub_raid_register): Likewise.
3988 (grub_raid_unregister): Likewise.
3989 (grub_raid_rescan): Likewise.
3990 (GRUB_MOD_INIT): Don't iterate device here.
3991 (GRUB_MOD_FINI): Use free_array to release resource.
3993 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3994 (grub_raid5_recover_func_t): New function variable type.
3995 (grub_raid6_recover_func_t): Likewise.
3996 (grub_raid5_recover_func): New variable.
3997 (grub_raid6_recover_func): Likewise.
3998 (grub_raid_register): New function.
3999 (grub_raid_unregister): Likewise.
4000 (grub_raid_rescan): Likewise.
4001 (grub_raid_block_xor): Likewise.
4003 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4004 (CMD_CRC): New macro.
4006 (read_file): Handle device as well as file.
4007 (cmd_crc): New function.
4008 (fstest): Handle multiple disks.
4009 (options): Remove part, raw and long, add root and diskcount.
4010 (usage): Add crc, remove -p, -r, -l, add -r and -c.
4011 (main): Find the first non option entry and ignore subsequent options,
4012 add handling for the new options, support multiple disks.
4014 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4016 2008-08-23 Bean <bean123ch@gmail.com>
4018 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4020 * genfslist.sh: Ignore kernel.mod.
4022 * genpartmaplist.sh: Likewise.
4024 2008-08-23 Robert Millan <rmh@aybabtu.com>
4026 * util/getroot.c (find_root_device): Skip anything that starts with
4027 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4029 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
4031 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4032 * util/grub.d/00_header.in: Allow the administrator to change default
4033 gfxmode via ${GRUB_GFXMODE}.
4035 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
4037 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4039 2008-08-21 Robert Millan <rmh@aybabtu.com>
4041 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4043 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4044 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4046 2008-08-20 Carles Pina i Estany <carles@pina.cat>
4048 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4049 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4051 2008-08-19 Robert Millan <rmh@aybabtu.com>
4053 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4054 (struct grub_virtual_screen): Remove `cursor_color'.
4055 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4057 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4059 2008-08-18 Robert Millan <rmh@aybabtu.com>
4061 Unify (identical) linux_normal.c files.
4062 * loader/i386/efi/linux_normal.c: Move from here ...
4063 * loader/linux_normal.c: ... to here. Update all users.
4064 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4065 * loader/i386/ieee1275/linux_normal.c: Likewise.
4067 2008-08-18 Robert Millan <rmh@aybabtu.com>
4069 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4070 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4071 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4072 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4073 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4075 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4076 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4077 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4078 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4079 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4080 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4081 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4082 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4083 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4084 portably using grub_getxy().
4085 Replace `-EFI' with `-bzImage' in boot message.
4087 2008-08-17 Robert Millan <rmh@aybabtu.com>
4089 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4091 2008-08-17 Robert Millan <rmh@aybabtu.com>
4093 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4095 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4096 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4097 (grub_machine_mmap_iterate): New function declaration.
4098 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4100 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4103 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4104 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4105 Move e820 parsing from here ...
4106 * kern/i386/pc/mmap.c: New file.
4107 (grub_machine_mmap_iterate): ... to here.
4109 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4110 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4111 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4112 (grub_available_iterate): Redeclare to return `void', and redeclare
4113 its hook to use grub_uint64_t as addr and size parameters, and rename
4115 (grub_machine_mmap_iterate): ... this. Update all users.
4117 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4118 to make it more readable. Rename to ...
4119 (grub_machine_mmap_iterate): ... this.
4121 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4122 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4123 (grub_multiboot): Allocate an extra region after the payload, and fill
4124 it with a Multiboot memory map. Adjust a.out loader to calculate size
4125 with the extra space.
4126 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4127 with the extra space.
4129 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4131 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4133 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4135 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4136 mdate-sh to the list `find' searches for.
4137 * DISTLIST: Regenerated.
4139 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4141 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4142 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4143 genmoddep.awk, gensymlist.sh.in.
4144 (DISTDIRS): Add bus, docs, hook, lib.
4145 * DISTLIST: Regenerated.
4146 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4148 2008-08-16 Robert Millan <rmh@aybabtu.com>
4150 * disk/raid.c (grub_raid_init): Handle/report errors set by
4151 grub_device_iterate().
4152 * disk/lvm.c (grub_lvm_init): Likewise.
4154 2008-08-15 Bean <bean123ch@gmail.com>
4156 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4158 (datetime_mod_SOURCES): New macro.
4159 (datetime_mod_CFLAGS): Likewise.
4160 (datetime_mod_LDFLAGS): Likewise.
4161 (date_mod_SOURCES): Likewise.
4162 (date_mod_CFLAGS): Likewise.
4163 (date_mod_LDFLAGS): Likewise.
4164 (datehook_mod_SOURCES): Likewise.
4165 (datehook_mod_CFLAGS): Likewise.
4166 (datehook_mod_LDFLAGS): Likewise.
4168 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4170 (datetime_mod_SOURCES): New macro.
4171 (datetime_mod_CFLAGS): Likewise.
4172 (datetime_mod_LDFLAGS): Likewise.
4173 (date_mod_SOURCES): Likewise.
4174 (date_mod_CFLAGS): Likewise.
4175 (date_mod_LDFLAGS): Likewise.
4176 (datehook_mod_SOURCES): Likewise.
4177 (datehook_mod_CFLAGS): Likewise.
4178 (datehook_mod_LDFLAGS): Likewise.
4180 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4182 (datetime_mod_SOURCES): New macro.
4183 (datetime_mod_CFLAGS): Likewise.
4184 (datetime_mod_LDFLAGS): Likewise.
4185 (date_mod_SOURCES): Likewise.
4186 (date_mod_CFLAGS): Likewise.
4187 (date_mod_LDFLAGS): Likewise.
4188 (datehook_mod_SOURCES): Likewise.
4189 (datehook_mod_CFLAGS): Likewise.
4190 (datehook_mod_LDFLAGS): Likewise.
4192 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4194 (datetime_mod_SOURCES): New macro.
4195 (datetime_mod_CFLAGS): Likewise.
4196 (datetime_mod_LDFLAGS): Likewise.
4197 (date_mod_SOURCES): Likewise.
4198 (date_mod_CFLAGS): Likewise.
4199 (date_mod_LDFLAGS): Likewise.
4200 (datehook_mod_SOURCES): Likewise.
4201 (datehook_mod_CFLAGS): Likewise.
4202 (datehook_mod_LDFLAGS): Likewise.
4204 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4206 (datetime_mod_SOURCES): New macro.
4207 (datetime_mod_CFLAGS): Likewise.
4208 (datetime_mod_LDFLAGS): Likewise.
4209 (date_mod_SOURCES): Likewise.
4210 (date_mod_CFLAGS): Likewise.
4211 (date_mod_LDFLAGS): Likewise.
4212 (datehook_mod_SOURCES): Likewise.
4213 (datehook_mod_CFLAGS): Likewise.
4214 (datehook_mod_LDFLAGS): Likewise.
4216 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4218 * commands/date.c: New file.
4220 * hook/datehook.c: Likewise.
4222 * include/grub/lib/datetime.h: Likewise.
4224 * include/grub/i386/cmos.h: Likewise.
4226 * lib/datetime.c: Likewise.
4228 * lib/i386/datetime.c: Likewise.
4230 * lib/efi/datetime.c: Likewise.
4232 2008-08-14 Robert Millan <rmh@aybabtu.com>
4234 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4235 (grub_mkelfimage_SOURCES): New variable.
4236 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4238 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4239 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4240 * conf/powerpc-ieee1275.rmk: Likewise.
4241 * conf/i386-ieee1275.rmk: Likewise.
4243 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4244 * kern/i386/coreboot/init.c: Likewise.
4246 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4247 with `<grub/cpu/kernel.h>'.
4248 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4250 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4251 * kern/i386/coreboot/startup.S: Likewise.
4253 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4254 (GRUB_MOD_GAP): Remove.
4255 * include/grub/powerpc/kernel.h: New file.
4256 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4257 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4258 * include/grub/i386/kernel.h: New file.
4259 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4260 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4261 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4263 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4265 Use --directory when invoking grub_mkimage.
4267 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4268 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4269 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4270 and GRUB_KERNEL_CPU_PREFIX.
4272 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
4274 * include/grub/err.h (grub_err_printf): New function prototype.
4275 * util/misc.c (grub_err_printf): New function.
4276 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4278 * kern/err.c (grub_print_error): Use grub_err_printf.
4280 2008-08-13 Robert Millan <rmh@aybabtu.com>
4282 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4284 2008-08-13 Robert Millan <rmh@aybabtu.com>
4286 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4289 2008-08-12 Robert Millan <rmh@aybabtu.com>
4291 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4292 of the relocation code from here ...
4293 (grub_multiboot): ... to here.
4294 (forward_relocator, backward_relocator): Move from here ...
4295 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4296 (grub_multiboot_backward_relocator): ... to here.
4297 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4298 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4299 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4300 (grub_multiboot_forward_relocator_end)
4301 (grub_multiboot_backward_relocator)
4302 (grub_multiboot_backward_relocator_end): New variables.
4304 2008-08-12 Bean <bean123ch@gmail.com>
4306 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4308 2008-08-11 Robert Millan <rmh@aybabtu.com>
4310 * kern/i386/linuxbios/startup.S: Move from here ...
4311 * kern/i386/coreboot/startup.S: ... to here.
4313 * kern/i386/linuxbios/init.c: Move from here ...
4314 * kern/i386/coreboot/init.c: ... to here.
4316 * kern/i386/linuxbios/table.c: Move from here ...
4317 * kern/i386/coreboot/mmap.c: ... to here.
4319 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4321 2008-08-11 Robert Millan <rmh@aybabtu.com>
4323 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4324 errors. Leave it to the upper layer to handle them.
4326 2008-08-09 Christian Franke <franke@computer.org>
4328 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4329 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4330 Install `grub.d/10_windows' only on Cygwin.
4331 * configure.ac: Add subst of `target_os'.
4332 Check `target_os' also before setting TARGET_OBJ2ELF.
4333 Add `--enable-grub-pe2elf'.
4335 2008-08-08 Robert Millan <rmh@aybabtu.com>
4337 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4338 (grub_last_time): Change type to grub_uint64_t.
4339 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4340 (grub_disk_close): Likewise.
4342 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4343 (run_menu): Migrate code from to using grub_get_time_ms().
4345 * util/misc.c (grub_get_time_ms): New function.
4347 2008-08-08 Marco Gerards <marco@gnu.org>
4349 * disk/ata.c (grub_ata_regget): Change return type to
4351 (grub_ata_regget2): Likewise.
4352 (grub_ata_wait_status): New function.
4353 (grub_ata_wait_busy): Removed function, updated all users to use
4354 `grub_ata_wait_status'.
4355 (grub_ata_wait_drq): Likewise.
4356 (grub_ata_cmd): New function.
4357 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4359 (grub_ata_pio_write): Add error handling.
4360 (grub_atapi_identify): Likewise.
4361 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4363 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4364 handling. Actually use the detected registers. Reorder the
4365 detection logic such that it is easier to read.
4366 (grub_ata_pciinit): Do not assign the same ID to each controller.
4367 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4369 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4371 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4373 2008-08-08 Marco Gerards <marco@gnu.org>
4377 2008-08-07 Bean <bean123ch@gmail.com>
4379 * include/grub/x86_64/pci.h: New file.
4381 2008-08-07 Christian Franke <franke@computer.org>
4383 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4384 (TIMER2_GATE): Likewise.
4385 (grub_pit_wait): Add enable/disable of the timer2 gate
4386 bit of port 0x61. This fixes a possible infinite loop.
4388 2008-08-07 Bean <bean123ch@gmail.com>
4390 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4391 kern/i386/tsc.c and kern/i386/pit.c.
4393 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4396 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4399 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4401 2008-08-07 Bean <bean123ch@gmail.com>
4403 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4405 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4407 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4408 multiple inclusion. Add #include <grub/types.h>.
4410 2008-08-06 Christian Franke <franke@computer.org>
4412 * conf/common.rmk: Build and install `10_windows'.
4413 * util/grub.d/10_windows.in: New script.
4415 2008-08-06 Pavel Roskin <proski@gnu.org>
4417 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4419 2008-08-06 Robert Millan <rmh@aybabtu.com>
4421 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4422 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4424 2008-08-06 Bean <bean123ch@gmail.com>
4426 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4427 (grub_pxefs_fs_int): Remove dummy definition.
4428 (grub_pxefs_open): Use data->block_size to store the current block
4430 (grub_pxefs_read): Use block size stored in data->block_size. As the
4431 value of grub_pxe_blksize can be changed after the file is opened.
4433 2008-08-06 Bean <bean123ch@gmail.com>
4435 * fs/i386/pc/pxe.c (curr_file): new variable.
4436 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4437 require the dummy internal file system anymore.
4438 (grub_pxefs_read): Removed.
4439 (grub_pxefs_close): Likewise.
4440 (grub_pxefs_fs_int): Likewise.
4441 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4442 connection when we switch file.
4443 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4445 2008-08-06 Robert Millan <rmh@aybabtu.com>
4447 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4449 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4450 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4452 * kern/i386/halt.c: New file.
4453 * kern/i386/reboot.c: Likewise.
4454 * include/grub/i386/reboot.h: Likewise.
4455 * include/grub/i386/halt.h: Likewise.
4457 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4458 Include `<grub/cpu/halt.h>'.
4459 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4460 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4462 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4463 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4464 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4465 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4466 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4467 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4469 * include/grub/i386/at_keyboard.h: ... to here.
4471 2008-08-05 Robert Millan <rmh@aybabtu.com>
4473 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4474 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4475 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4476 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4477 `kern/generic/millisleep.c'.
4479 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4480 instead of grub_get_rtc().
4481 (grub_tsc_init): Initialize `tsc_boot_time'.
4483 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4484 (grub_machine_init): Use grub_tsc_init() rather than
4485 installing an RTC-based handler via grub_install_get_time_ms().
4487 * kern/i386/pit.c: New file.
4488 * include/grub/i386/pit.h: Likewise.
4490 2008-08-05 Bean <bean123ch@gmail.com>
4492 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4494 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4495 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4496 (pxe_mod_SOURCES): New macro.
4497 (pxe_mod_CFLAGS): Likewise.
4498 (pxe_mod_LDFLAGS): Likewise.
4499 (pxecmd_mod_SOURCES): Likewise.
4500 (pxecmd_mod_CFLAGS): Likewise.
4501 (pxecmd_mod_LDFLAGS): Likewise.
4503 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4504 (grub_pxe_call): Likewise.
4506 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4508 * commands/i386/pc/pxecmd.c: New file.
4510 * fs/i386/pc/pxe.c: Likewise.
4512 * include/grub/i386/pc/pxe.h: Likewise.
4514 2008-08-05 Bean <bean123ch@gmail.com>
4516 * util/console.c (grub_console_cur_color): New variable.
4517 (grub_console_standard_color): Likewise.
4518 (grub_console_normal_color): Likewise.
4519 (grub_console_highlight_color): Likewise.
4520 (color_map): Likewise.
4521 (use_color): Likewise.
4522 (NUM_COLORS): New macro.
4523 (grub_ncurses_setcolorstate): Handle color properly.
4524 (grub_ncurses_setcolor): Don't change color here, just remember the
4525 settings, color will be set in grub_ncurses_setcolorstate.
4526 (grub_ncurses_getcolor): New function.
4527 (grub_ncurses_init): Initialize color pairs.
4528 (grub_ncurses_term): New member grub_ncurses_getcolor.
4530 2008-08-05 Colin D Bennett <colin@gibibit.com>
4532 High resolution timer support. Implemented for x86 CPUs using TSC.
4533 Extracted generic grub_millisleep() so it's linked in only as needed.
4534 This requires a Pentium compatible CPU; if the RDTSC instruction is
4535 not supported, then it falls back on the generic grub_get_time_ms()
4536 implementation that uses the machine's RTC.
4538 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4539 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4540 `kern/generic/millisleep.c'.
4542 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4543 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4545 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4546 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4548 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4550 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4551 `kern/generic/millisleep.c'.
4553 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4555 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4557 * kern/generic/rtc_get_time_ms.c: New file.
4559 * kern/generic/millisleep.c: New file.
4561 * kern/misc.c: Don't include
4562 <kern/time.h> anymore.
4563 (grub_millisleep_generic): Removed.
4565 * commands/sleep.c (grub_interruptible_millisleep): Uses
4566 grub_get_time_ms() instead of grub_get_rtc().
4568 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4570 (grub_cpu_is_cpuid_supported): New inline function.
4571 (grub_cpu_is_tsc_supported): New inline function.
4572 (grub_tsc_init): New function prototype.
4573 (grub_tsc_get_time_ms): New function prototype.
4575 * kern/i386/tsc.c (grub_get_time_ms): New file.
4577 * include/grub/time.h: Include <grub/types.h.
4578 (grub_millisleep_generic): Removed.
4579 (grub_get_time_ms): New prototype.
4580 (grub_install_get_time_ms): New prototype.
4581 (grub_rtc_get_time_ms): New prototype.
4583 * kern/time.c (grub_get_time_ms): New function.
4584 (grub_install_get_time_ms): New function.
4586 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4587 <grub/time.h> anymore.
4588 (grub_millisleep): Removed.
4589 (grub_machine_init): Call grub_tsc_init.
4591 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4592 get_time_ms() implementation.
4594 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4595 (ieee1275_get_time_ms): New function.
4596 (grub_machine_init): Install get_time_ms() implementation.
4598 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4599 (grub_machine_init): Call grub_tsc_init().
4600 (grub_millisleep): Removed.
4602 * kern/ieee1275/init.c (grub_millisleep): Removed.
4603 (grub_machine_init): Install ieee1275_get_time_ms()
4605 (ieee1275_get_time_ms): New function.
4606 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4609 2008-08-05 Marco Gerards <marco@gnu.org>
4611 * disk/ata.c: Include <grub/pci.h>.
4612 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4613 (grub_ata_initialize): Rewritten.
4614 (grub_ata_device_initialize): New function.
4616 2008-08-04 Pavel Roskin <proski@gnu.org>
4618 * kern/main.c: Include grub/mm.h.
4620 2008-08-04 Robert Millan <rmh@aybabtu.com>
4622 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4623 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4624 corruption problem).
4626 2008-08-04 Robert Millan <rmh@aybabtu.com>
4628 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4629 warnings introduced in my last commit.
4631 2008-08-03 Robert Millan <rmh@aybabtu.com>
4633 Make PCI available on all i386 architectures.
4635 * include/grub/i386/pc/pci.h: Move from here ...
4636 * include/grub/i386/pci.h: ... to here.
4638 * include/grub/i386/pc/pci.h: Remove.
4639 * include/grub/i386/efi/pci.h: Remove.
4640 * include/grub/x86_64/efi/pci.h: Remove.
4642 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4645 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4646 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4647 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4649 * conf/i386-ieee1275.rmk: Likewise.
4651 2008-08-03 Robert Millan <rmh@aybabtu.com>
4653 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4654 (grub_console_setcursor): Make it possible to set cursor off.
4656 2008-08-03 Robert Millan <rmh@aybabtu.com>
4658 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4659 of modules instead of assuming which platform provides what.
4660 * util/update-grub.in: Likewise.
4662 2008-08-03 Robert Millan <rmh@aybabtu.com>
4664 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4665 instead of `grub_install_dos_part' to determine whether a drive needs
4666 to be prepended to prefix (`grub_install_dos_part' is not reliable,
4667 because it can be overridden when loading GRUB via Multiboot).
4669 2008-08-02 Robert Millan <rmh@aybabtu.com>
4671 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4673 2008-08-02 Robert Millan <rmh@aybabtu.com>
4675 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4676 of informational grub_dprintf() calls.
4678 2008-08-02 Robert Millan <rmh@aybabtu.com>
4680 * disk/memdisk.c (memdisk_size): Don't initialize.
4681 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4683 * include/grub/i386/pc/kernel.h
4684 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4685 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4686 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4687 (grub_arch_memdisk_size): Remove.
4689 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4690 field (was only used to transfer a constant). Add `type' field to
4691 support multiple module types.
4692 (grub_module_iterate): New function.
4694 * kern/device.c (grub_device_open): Do not hide error messages
4695 when grub_disk_open() fails. Use grub_print_error() instead.
4697 * kern/i386/pc/init.c (grub_arch_modules_addr)
4698 (grub_arch_memdisk_size): Remove functions.
4699 (grub_arch_modules_addr): Return the module address in high memory
4700 (now that it isn't copied anymore).
4702 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4703 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4704 decompression routine (grub_total_module_size already includes that
4705 now). Don't copy modules back to low memory.
4707 * kern/main.c: Include `<grub/mm.h>'.
4708 (grub_load_modules): Split out (and use) ...
4709 (grub_module_iterate): ... this function, which iterates through
4710 module objects and runs a hook.
4711 Comment out grub_mm_init_region() call, as it would cause non-ELF
4712 modules to be overwritten.
4714 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4715 the memdisk image in its own region, make it part of the module list.
4716 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4717 (main): Parse --memdisk|-m option, and pass user-provided path as
4718 parameter to generate_image().
4719 (add_segments): Pass `memdisk_path' down to load_modules().
4720 (load_modules): Embed memdisk image in module section when requested.
4721 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4722 `header.type' instead of `header.offset'.
4724 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4725 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4726 (memdisk_mod_LDFLAGS): New variables.
4727 * conf/i386-coreboot.rmk: Likewise.
4728 * conf/i386-ieee1275.rmk: Likewise.
4730 2008-08-02 Robert Millan <rmh@aybabtu.com>
4732 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4733 (backward_relocator): New variables. Used to allocate and relocate
4734 the payload, respectively.
4735 (grub_multiboot_load_elf32): Load into heap instead of requested
4736 address, install the appropriate relocator code in each bound of
4737 the payload, and set the entry point such that
4738 grub_multiboot_real_boot() will jump to one of them.
4740 * kern/i386/loader.S (grub_multiboot_payload_size)
4741 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4742 (grub_multiboot_payload_entry_offset): New variables.
4743 (grub_multiboot_real_boot): Set cpu context to what the relocator
4744 expects, and jump to the relocator instead of the payload.
4746 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4747 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4748 (grub_multiboot_payload_entry_offset): Export.
4750 2008-08-01 Bean <bean123ch@gmail.com>
4752 * normal/menu_entry.c (editor_getline): Don't return the original
4753 string as result, as it will be released by lexer once it has done
4756 2008-08-01 Robert Millan <rmh@aybabtu.com>
4758 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4759 within menuentries, not before them.
4760 util/grub.d/10_hurd.in: Likewise.
4762 2008-08-01 Bean <bean123ch@gmail.com>
4764 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4765 (bufio_mod_SOURCES): New macro.
4766 (bufio_mod_CFLAGS): Likewise.
4767 (bufio_mod_LDFLAGS): Likewise.
4769 * include/grub/bufio.h: New file.
4771 * io/bufio.c: Likewise.
4773 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4774 (grub_video_reader_png): Use grub_buffile_open to open file.
4776 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4777 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4779 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4780 (grub_video_reader_tga): Use grub_buffile_open to open file.
4782 * font/manager.c: Include <grub/bufio.h>.
4783 (add_font): Use grub_buffile_open to open file.
4785 2008-07-31 Robert Millan <rmh@aybabtu.com>
4787 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4788 ELF segments, use a macro for arbitrarily accessing any of them instead
4789 of preparing a pointer that allows access to one at a time.
4790 (grub_multiboot_load_elf64): Likewise.
4792 2008-07-31 Bean <bean123ch@gmail.com>
4794 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4795 GRUB_KERNEL_MACHINE_DATA_END.
4797 2008-07-30 Robert Millan <rmh@aybabtu.com>
4799 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4800 Increase from 0x50 to 0x60.
4801 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4802 use UUIDs to identify the root drive for them. If that's not
4804 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4805 check, for cross-disk installs.
4807 2008-07-30 Robert Millan <rmh@aybabtu.com>
4809 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4810 is non-empty, use it to set the `prefix' environment variable instead
4811 of the usual approach.
4812 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4813 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4814 environment variable instead of dummy make_install_device().
4816 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4817 (start): Insert a data section, with `grub_prefix' variable.
4818 * kern/i386/linuxbios/startup.S: Likewise.
4820 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4821 New variable reference.
4822 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4823 New macro. Defines offset of `grub_prefix' within startup.S (relative
4825 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
4826 section within startup.S (relative to `start').
4827 * include/grub/i386/coreboot/kernel.h: Likewise.
4829 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4830 Overwrite grub_prefix with its contents, at the beginning of the
4832 (main): Understand -p|--prefix.
4834 2008-07-30 Robert Millan <rmh@aybabtu.com>
4836 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4838 2008-07-30 Robert Millan <rmh@aybabtu.com>
4840 * term/i386/pc/vga_text.c (grub_console_cls): Use
4841 grub_console_gotoxy() to go back to beginning of the screen.
4842 Found by Patrick Georgi <patrick.georgi@coresystems.de>
4844 2008-07-29 Christian Franke <franke@computer.org>
4846 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4847 Add conversion of emulated mount points on Cygwin.
4849 2008-07-29 Christian Franke <franke@computer.org>
4851 * util/update-grub.in: Add a check for admin
4853 Remove old `grub.cfg.new' before creation.
4854 Add `-f' to `mv' to handle the different filesystem
4855 semantics of Windows.
4857 2008-07-29 Bean <bean123ch@gmail.com>
4859 * normal/main.c (get_line): Fix buffer overflow bug.
4861 2008-07-28 Robert Millan <rmh@aybabtu.com>
4863 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4864 (struct grub_apple_header): New struct. Describes the layout of
4866 (apple_partition_map_iterate): Check the header magic as well as the
4867 partition magic (which was already being checked).
4869 2008-07-28 Pavel Roskin <proski@gnu.org>
4871 * genmk.rb: Add a warning to the beginning of the output that
4872 it's a generated file and should not be edited.
4874 2008-07-28 Robert Millan <rmh@aybabtu.com>
4876 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4877 with the same number are found, just use issue a warning with
4878 grub_dprintf(), as this error has been reported to be non-fatal.
4880 2008-07-27 Robert Millan <rmh@aybabtu.com>
4882 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4885 2008-07-27 Bean <bean123ch@gmail.com>
4887 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4888 (grub_fat_find_dir): Ignore case when comparing filename.
4890 2008-07-27 Bean <bean123ch@gmail.com>
4892 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4893 smallino, as it's more descriptive, and i8count can be confused with
4894 the other field count.
4895 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4898 2008-07-27 Bean <bean123ch@gmail.com>
4900 * commands/crc.c: New file.
4902 * lib/crc.c: Likewise.
4904 * include/grub/lib/crc.h: Likewise.
4906 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4908 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4909 (hexdump): Move this function to ...
4911 * lib/hexdump.c: ... here.
4913 * include/grub/hexdump.h: Renamed to ...
4915 * include/grub/lib/hexdump.h: ... this.
4917 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4919 * util/grub-editenv.c: Likewise.
4921 * include/envblk.h: Renamed to ...
4923 * include/lib/envblk.h: ... this.
4925 * util/envblk.c: Renamed to ...
4927 * lib/envblk.c: ... this.
4929 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4931 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4932 (pkglib_MODULES): Add crc.mod.
4933 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4934 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4935 (crc_mod_SOURCES): New macro.
4936 (crc_mod_CFLAGS): Likewise.
4937 (crc_mod_LDFLAGS): Likewise.
4939 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4941 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4943 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4945 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4947 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4949 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
4951 * commands/help.c: Include <grub/term.h>.
4952 (TERM_WIDTH): Removed. Updated all users.
4954 2008-07-27 Pavel Roskin <proski@gnu.org>
4956 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4957 spurious warnings about a comment within a comment.
4959 2008-07-25 Robert Millan <rmh@aybabtu.com>
4961 * util/getroot.c (find_root_device): Skip devices that match
4962 /dev/dm-[0-9]. This lets the real device be found for any type of
4963 abstraction (LVM, EVMS, RAID..).
4964 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4965 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4966 device is found first, find_root_device() will now skip it.
4968 2008-07-24 Pavel Roskin <proski@gnu.org>
4970 * include/grub/types.h: Use __builtin_bswap32() and
4971 __builtin_bswap64() with gcc 4.3 and newer.
4973 2008-07-24 Christian Franke <franke@computer.org>
4975 * util/i386/pc/grub-install.in: If `--debug' is specified,
4976 pass `--verbose' to grub-setup.
4977 Abort script if make_system_path_relative_to_its_root() fails.
4979 2008-07-24 Bean <bean123ch@gmail.com>
4981 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4982 variable `target_platform' should be `platform'.
4984 2008-07-24 Bean <bean123ch@gmail.com>
4986 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
4987 (grub_png_init_fixed_block): New function.
4988 (grub_png_decode_image_data): Handle fixed huffman code compression.
4990 2008-07-24 Bean <bean123ch@gmail.com>
4992 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4993 (grub_pe2elf_SOURCES): New macro.
4994 (CLEANFILES): Add grub-pe2elf.
4996 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4997 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4998 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4999 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5000 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5001 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5002 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5003 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5004 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5005 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5006 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5007 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5008 (GRUB_PE32_DT_FUNCTION): Likewise.
5009 (GRUB_PE32_REL_I386_DIR32): Likewise.
5010 (GRUB_PE32_REL_I386_REL32): Likewise.
5011 (grub_pe32_symbol): New structure.
5012 (grub_pe32_reloc): Likewise.
5014 * util/grub-pe2elf.c: New file.
5016 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5017 start symbol in non pc platform.
5019 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5021 The following patches are from Christian Franke.
5023 * include/grub/dl.h: Remove .previous, gas supports this only
5026 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5027 Remove .type, gas supports this only for ELF format.
5029 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5030 nullbytes in symbol table. This fixes an infinite loop if table is
5033 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5034 TARGET_IMG_LDFLAGS and EXEEXT.
5036 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5037 TARGET_IMG_LDFLAGS_AC.
5038 (grub_CHECK_STACK_ARG_PROBE): New function.
5040 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5042 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5044 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5045 to set TARGET_IMG_LD* accordingly.
5046 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5047 Add call to grub_CHECK_STACK_ARG_PROBE.
5048 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5050 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5052 * genmk.rb: Add EXEEXT to CLEANFILES.
5054 2008-07-23 Robert Millan <rmh@aybabtu.com>
5056 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5057 define the codes for arrows and lines used for the menu).
5058 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5061 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5062 fonts, because the latter are too slow.
5064 2008-07-21 Bean <bean123ch@gmail.com>
5066 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5067 a20. Run keyboard test last, as it will cause macbook to halt.
5069 2008-07-18 Pavel Roskin <proski@gnu.org>
5071 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5072 load foreign architecture modules correctly anyway. Keep
5073 support for loading host architecture modules, whether we
5074 compile them or not.
5076 2008-07-17 Pavel Roskin <proski@gnu.org>
5078 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5079 change target_cpu. The compiler default can mismatch target_cpu
5082 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5083 * kern/efi/efi.c: Likewise.
5085 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5086 target compiler is functional.
5087 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5090 * configure.ac: Default to efi platform for x86_64-apple. Allow
5091 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5092 adjustments from the rest, only do them if target is not
5093 explicitly given. Merge other adjustments with the final sanity
5094 check. Remove an extraneous check for supported CPU. Be
5095 specific which CPU and which platform is not supported.
5097 * configure.ac: Default to pc platform for x86_64.
5099 2008-07-17 Robert Millan <rmh@aybabtu.com>
5101 Partial LinuxBIOS -> Coreboot rename.
5103 * conf/i386-linuxbios.rmk: Renamed to ...
5104 * conf/i386-coreboot.rmk: ... this.
5105 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5106 * configure.ac: Accept "coreboot" as input platform (but maintain
5107 compatibility with "linuxbios").
5108 * include/grub/i386/linuxbios: Renamed to ...
5109 * include/grub/i386/coreboot: ... this.
5111 2008-07-17 Bean <bean123ch@gmail.com>
5113 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5114 (appleldr_mod_SOURCE): New variable.
5115 (appleldr_mod_CFLAGS): Likewise.
5116 (appleldr_mod_LDFLAGS): Likewise.
5117 (pci_mod_SOURCES): Likewise.
5118 (pci_mod_CFLAGS): Likewise.
5119 (pci_mod_LDFLAGS): Likewise.
5120 (lspci_mod_SOURCES): Likewise.
5121 (lspci_mod_CFLAGS): Likewise.
5122 (lspci_mod_LDFLAGS): Likewise.
5124 * conf/x86_64-efi.rmk: New file.
5126 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5128 (grub_efidisk_write): Likewise.
5130 * include/efi/api.h (efi_call_0): New macro.
5131 (efi_call_1): Likewise.
5132 (efi_call_2): Likewise.
5133 (efi_call_3): Likewise.
5134 (efi_call_4): Likewise.
5135 (efi_call_5): Likewise.
5136 (efi_call_6): Likewise.
5138 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5139 grub_rescue_cmd_chainloader.
5141 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5142 (grub_pe32_optional_header): Change some fields based on i386 or
5144 (GRUB_PE32_PE32_MAGIC): Likewise.
5146 * include/grub/efi/uga_draw.h: New file.
5148 * include/grub/elf.h (STN_ABS): New constant.
5149 (R_X86_64_NONE): Relocation constant for x86_64.
5150 (R_X86_64_64): Likewise.
5151 (R_X86_64_PC32): Likewise.
5152 (R_X86_64_GOT32): Likewise.
5153 (R_X86_64_PLT32): Likewise.
5154 (R_X86_64_COPY): Likewise.
5155 (R_X86_64_GLOB_DAT): Likewise.
5156 (R_X86_64_JUMP_SLOT): Likewise.
5157 (R_X86_64_RELATIVE): Likewise.
5158 (R_X86_64_GOTPCREL): Likewise.
5159 (R_X86_64_32): Likewise.
5160 (R_X86_64_32S): Likewise.
5161 (R_X86_64_16): Likewise.
5162 (R_X86_64_PC16): Likewise.
5163 (R_X86_64_8): Likewise.
5164 (R_X86_64_PC8): Likewise.
5166 * include/grub/i386/efi/pci.h: New file.
5168 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5169 Change it value based on platform.
5170 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5171 (GRUB_E820_RAM): Likewise.
5172 (GRUB_E820_RESERVED): Likewise.
5173 (GRUB_E820_ACPI): Likewise.
5174 (GRUB_E820_NVS): Likewise.
5175 (GRUB_E820_EXEC_CODE): Likewise.
5176 (GRUB_E820_MAX_ENTRY): Likewise.
5177 (grub_e820_mmap): New structure.
5178 (linux_kernel_header): Change the efi field according to different
5179 kernel version, also field from linux_kernel_header.
5181 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5183 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5184 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5185 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5186 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5187 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5188 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5189 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5190 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5191 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5192 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5194 * include/grub/x86_64/efi/kernel.h: New file.
5196 * include/grub/x86_64/efi/loader.h: Likewise.
5198 * include/grub/x86_64/efi/machine.h: Likewise.
5200 * include/grub/x86_64/efi/pci.h: Likewise.
5202 * include/grub/x86_64/efi/time.h: Likewise.
5204 * include/grub/x86_64/linux.h: Likewise.
5206 * include/grub/x86_64/setjmp.h: Likewise.
5208 * include/grub/x86_64/time.h: Likewise.
5210 * include/grub/x86_64/types.h: Likewise.
5212 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5213 GRUB_TARGET_SIZEOF_VOID_P.
5215 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5216 (grub_efi_locate_handle): Likewise.
5217 (grub_efi_open_protocol): Likewise.
5218 (grub_efi_set_text_mode): Likewise.
5219 (grub_efi_stall): Likewise.
5220 (grub_exit): Likewise.
5221 (grub_reboot): Likewise.
5222 (grub_halt): Likewise.
5223 (grub_efi_exit_boot_services): Likewise.
5224 (grub_get_rtc): Likewise.
5226 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5227 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5228 (grub_efi_allocate_pages): Wrap efi calls.
5229 (grub_efi_free_pages): Wrap efi calls.
5230 (grub_efi_get_memory_map): Wrap efi calls.
5232 * kern/x86_64/dl.c: New file.
5234 * kern/x86_64/efi/callwrap.S: Likewise.
5236 * kern/x86_64/efi/startup.S: Likewise.
5238 * loader/efi/appleloader.c: Likewise.
5240 * loader/efi/chainloader.c (cmdline): New variable.
5241 (grub_chainloader_unload): Wrap efi calls.
5242 (grub_chainloader_boot): Likewise.
5243 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5246 * loader/efi/chainloader_normal.c (chainloader_command):
5247 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5250 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5252 (grub_e820_add_region): New function.
5253 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5255 (grub_find_video_card): New function.
5256 (grub_linux_setup_video): New function.
5257 (grub_rescue_cmd_linux): Probe for video information.
5259 * normal/x86_64/setjmp.S: New file.
5261 * term/efi/console.c (map_char): New function.
5262 (grub_console_putchar): Map unicode char.
5263 (grub_console_checkkey): Wrap efi calls.
5264 (grub_console_getkey): Likewise.
5265 (grub_console_getwh): Likewise.
5266 (grub_console_gotoxy): Likewise.
5267 (grub_console_cls): Likewise.
5268 (grub_console_setcolorstate): Likewise.
5269 (grub_console_setcursor): Likewise.
5271 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5273 2008-07-16 Pavel Roskin <proski@gnu.org>
5275 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5278 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5279 pointer, not an integer. This fixes a warning and prevents
5280 precision loss on 64-bit systems.
5281 (relocate_addresses): Remove unneeded cast.
5283 2008-07-15 Pavel Roskin <proski@gnu.org>
5285 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5287 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5289 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5290 Fix comparison between signed and unsigned.
5292 * include/grub/i386/ieee1275/console.h: Declare
5293 grub_console_init() and grub_console_fini().
5295 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5296 It's empty and unused.
5298 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5299 beginning to avoid warnings with some compilers.
5301 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5302 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5304 2008-07-14 Pavel Roskin <proski@gnu.org>
5306 * kern/env.c (grub_register_variable_hook): Don't copy empty
5307 string, it leaks memory. Pass "" to grub_env_set(), it should
5308 handle constant strings.
5310 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5311 * commands/cmp.c (grub_cmd_cmp): Likewise.
5312 * kern/dl.c (grub_dl_flush_cache): Likewise.
5313 (grub_dl_load_core): Likewise.
5314 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5315 (grub_elf64_load_phdrs): Likewise.
5317 2008-07-13 Pavel Roskin <proski@gnu.org>
5319 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5320 between signed and unsigned.
5321 (LzmaEnc_Finish): Fix warning about an unused parameter.
5323 2008-07-13 Bean <bean123ch@gmail.com>
5325 * Makefile.in (enable_lzo): New rule.
5327 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5329 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5331 * boot/i386/pc/lnxboot.S: #include <config.h>.
5333 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5334 its value according to the compression algorithm used, lzo or lzma.
5336 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5337 compression algorithm according to configure macro.
5339 * kern/i386/pc/startup.S (codestart): Likewise.
5341 * kern/i386/pc/lzma_decode.S: New file.
5343 * include/grub/lib/LzFind.h: Likewise.
5345 * include/grub/lib/LzHash.h: Likewise.
5347 * include/grub/lib/LzmaDec.h: Likewise.
5349 * include/grub/lib/LzmaEnc.h: Likewise.
5351 * include/grub/lib/LzmaTypes.h: Likewise.
5353 * lib/LzFind.c: Likewise.
5355 * lib/LzmaDec.c: Likewise.
5357 * lib/LzmaEnc.c: Likewise.
5359 2008-07-13 Bean <bean123ch@gmail.com>
5361 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5362 (grub_ext4_extent_header): New structure.
5363 (grub_ext4_extent): Likewise.
5364 (grub_ext4_extent_idx): Likewise.
5365 (grub_ext4_find_leaf): New function.
5366 (grub_ext2_read_block): Handle extents.
5368 2008-07-12 Robert Millan <rmh@aybabtu.com>
5370 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5372 2008-07-11 Robert Millan <rmh@aybabtu.com>
5374 * util/grub.d/40_custom.in: New file. Example on how to add custom
5375 entries to /etc/grub.d.
5376 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5377 40_custom (implicitly, by merging all the grub.d rules).
5379 2008-07-11 Pavel Roskin <proski@gnu.org>
5381 * commands/read.c (grub_getline): Fix invalid memory access.
5382 Don't add newline to the variable value.
5384 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5385 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5386 (serial_hw_get_port): Check validity of the port number.
5387 (grub_cmd_serial): Check return value of serial_hw_get_port().
5389 2008-07-07 Pavel Roskin <proski@gnu.org>
5391 * boot/i386/pc/diskboot.S (notification_string): Replace
5392 "Loading kernel" with just "loading". This is shorter, less
5393 confusing and saves a few bytes for possible future changes.
5395 2008-07-05 Pavel Roskin <proski@gnu.org>
5397 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5398 size for ATAPI devices, they are undefined. Output sector
5399 number in decimal form.
5401 * disk/ata.c: Use named constants for status bits.
5403 2008-07-04 Pavel Roskin <proski@gnu.org>
5405 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5406 grub_addr_t before casting it to the void pointer to fix a
5407 warning. Non-addressable regions are discarded earlier.
5408 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5409 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5410 (check_signature): Don't shadow table_header.
5411 (grub_linuxbios_table_iterate): Cast numeric constants to
5412 grub_linuxbios_table_header_t.
5413 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5416 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5419 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5420 pointer, which can cause warnings. Support 64-bit addresses.
5422 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5423 of sizeof(long). This fixes PowerPC image generation on x86_64.
5425 2008-07-04 Robert Millan <rmh@aybabtu.com>
5427 This fixes a performance issue when pc & gpt partmap iterators
5428 didn't abort iteration even after our hook found what it was
5429 looking for (often causing expensive probes of non-existent drives).
5431 Some callers relied on previous buggy behaviour, since they would
5432 raise an error when their own hooks caused early abortion of its
5435 * kern/device.c (grub_device_open): Improve error message.
5436 * disk/lvm.c (grub_lvm_open): Likewise.
5437 * disk/raid.c (grub_raid_open): Likewise.
5439 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5440 when hook requests it, independently of grub_errno.
5441 (pc_partition_map_probe): Do not fail when find_func() caused
5442 early abortion of pc_partition_map_iterate().
5444 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5445 when hook requests it, independently of grub_errno.
5446 (gpt_partition_map_probe): Do not fail when find_func() caused
5447 early abortion of gpt_partition_map_iterate().
5449 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5450 when hook requests it, independently of grub_errno. Do not fail when
5451 part_map_iterate_hook() caused early abortion of p->iterate().
5453 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5454 when grub_partition_iterate() returned with non-zero.
5456 2008-07-03 Pavel Roskin <proski@gnu.org>
5458 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5459 like we do in grub_ata_pio_read().
5460 (grub_ata_readwrite): Always write individual sectors. Fix the
5461 sector count for the remainder.
5462 (grub_ata_write): Enable writing to ATA devices. Correctly
5463 report error for ATAPI devices.
5465 2008-07-02 Pavel Roskin <proski@gnu.org>
5467 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5470 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5471 for every read sector, we already increment it for the whole
5472 batch. This fixes reading more than 256 sectors at once.
5474 * util/grub-editenv.c (cmd_info): Cast argument to long
5475 explicitly. ptrdiff_t reduces to int on i386.
5477 * util/grub-editenv.c (main): Be specific which parameter is
5480 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5481 (memdisk): Make memdisk_orig_addr a pointer.
5483 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5484 for file offsets, use grub_off_t instead. Fix printf format
5487 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5488 there. Real unexpected warnings should not drown in the noise
5489 about known problems.
5491 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5492 grub_disk_addr_t for memory addresses.
5494 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5495 explicitly to fix a warning.
5497 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5499 * Makefile.in (MODULE_LDFLAGS): New variable.
5500 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5501 the linker accepts --build-id=none.
5502 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5504 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5506 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5507 those in Linux XFS code. Provide a way to access 64-bit parent
5509 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5510 the end of struct grub_xfs_dir_header.
5512 2008-07-02 Bean <bean123ch@gmail.com>
5514 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5515 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5516 and GRUB_IEEE1275_FLAG_NO_ANSI.
5518 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5519 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5520 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5522 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5523 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5525 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5526 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5528 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5529 esc sequence on non ANSI terminal.
5530 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5532 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5535 2008-07-02 Bean <bean123ch@gmail.com>
5537 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5538 (grub_editenv_SOURCES): New variable.
5539 (pkglib_MODULES): Add loadenv.mod.
5540 (loadenv_mod_SOURCES): New variable.
5541 (loadenv_mod_CFLAGS): Likewise.
5542 (loadenv_mod_LDFLAGS): Likewise.
5544 * include/grub/envblk.h: New file.
5546 * util/envblk.c: New file.
5548 * util/grub-editenv.c: New file.
5550 * commands/loadenv.c: New file.
5552 2008-07-01 Pavel Roskin <proski@gnu.org>
5554 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5555 not unsigned char. This fixes warnings and is consistent with
5558 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5560 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5562 * term/tparm.c (analyze): Always set *popcount.
5564 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5565 cast to fix a warning.
5567 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5568 cast to suppress a warning.
5570 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5571 grub_fshelp_read_file() expects.
5573 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5574 write uuid as a 32-bit value in CPU byte order, so declare and
5577 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5578 long if the format specifier expects it.
5579 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5580 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5581 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5582 long to fix a warning.
5583 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5584 grub_dprintf() arguments to fix warnings.
5586 2008-06-30 Pavel Roskin <proski@gnu.org>
5588 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5589 install_bsd_part immediately before core.img is embedded or
5590 modified on disk. This fixes core.img verification if core.img
5593 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5594 core_path to calculate the blocklist.
5595 Patch from Javier MartÃn <lordhabbit@gmail.com>
5597 2008-06-29 Robert Millan <rmh@aybabtu.com>
5599 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5600 block to disk block.
5601 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5602 Patch from Niels Böhm <bitbucket@arcor.de>
5604 2008-06-29 Robert Millan <rmh@aybabtu.com>
5606 * util/update-grub_lib.in (font_path): Search for fonts in
5607 /boot/grub first, which is more likely to be readable (we aren't
5608 deciding where fonts live, just looking for them).
5610 2008-06-26 Pavel Roskin <proski@gnu.org>
5612 * util/biosdisk.c (read_device_map): Don't leave dead map
5613 entries for devices failing stat() check.
5615 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5616 core_path_dev for the core.img path on the target device.
5618 2008-06-26 Robert Millan <rmh@aybabtu.com>
5620 * disk/fs_uuid.c: New file.
5621 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5622 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5623 (fs_uuid_mod_LDFLAGS): New variables.
5624 * include/grub/disk.h (grub_disk_dev_id): Add
5625 `GRUB_DISK_DEVICE_UUID_ID'.
5626 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5627 implement iterate().
5629 2008-06-26 Robert Millan <rmh@aybabtu.com>
5631 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5632 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5633 Linux image includes no initrd.
5635 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
5637 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5638 call to resolve the core image location that effectively appended the
5641 2008-06-21 Robert Millan <rmh@aybabtu.com>
5643 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5646 * util/grub.d/10_hurd.in: ... to here ...
5647 * util/grub.d/10_linux.in: ... and here.
5649 2008-06-19 Robert Millan <rmh@aybabtu.com>
5651 * kern/main.c (grub_main): Export `prefix' variable immediately
5652 after it has been set by grub_machine_set_prefix().
5654 2008-06-19 Robert Millan <rmh@aybabtu.com>
5656 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5657 search result when not saving to variable, not the other way around.
5658 When saving to variable, abort iteration as soon as a match is found.
5660 2008-06-19 Robert Millan <rmh@aybabtu.com>
5662 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5663 check for partition that provides /boot/grub. Its logic is flawed,
5664 as it prevents prepare_grub_to_access_device() from being called
5667 2008-06-19 Robert Millan <rmh@aybabtu.com>
5669 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5670 "insmod" command directly when abstraction modules are needed,
5671 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5672 since it had already been processed).
5674 2008-06-19 Pavel Roskin <proski@gnu.org>
5676 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5677 changed. This is needed in case GRUB_LIBDIR changes.
5678 * conf/i386-ieee1275.rmk: Likewise.
5679 * conf/i386-linuxbios.rmk: Likewise.
5680 * conf/i386-pc.rmk: Likewise.
5681 * conf/powerpc-ieee1275.rmk: Likewise.
5683 2008-06-18 Pavel Roskin <proski@gnu.org>
5685 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5686 kernel_elf_symlist.c to symlist.c for consistency with other
5687 architectures. Update all users.
5688 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5690 2008-06-18 Robert Millan <rmh@aybabtu.com>
5692 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5695 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5696 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5697 a RAID device, run setup() for all members independently on whether
5698 LVM abstraction is being used.
5699 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5700 If grub-mkimage has set `*install_dos_part == -2', don't override this
5702 Perform *install_dos_part adjustments independently on whether
5703 we're embedding or not.
5704 Clarify error message when image is too big for embedding.
5705 Remove duplicate *install_dos_part stanza.
5707 2008-06-17 Robert Millan <rmh@aybabtu.com>
5709 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5710 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5712 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5713 values in grub_ofconsole_normal_color and
5714 grub_ofconsole_highlight_color (they're not directly related to
5715 background and foreground).
5716 (grub_ofconsole_setcolorstate): Extract background and foreground
5717 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5719 2008-06-17 Robert Millan <rmh@aybabtu.com>
5721 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5722 /boot/grub for the check in last commit, not /boot (they could be
5723 different partitions).
5725 2008-06-16 Robert Millan <rmh@aybabtu.com>
5727 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5728 asked to setup access for the same partition that provides /boot,
5729 don't bother using UUIDs since our root already has the value we
5732 2008-06-16 Robert Millan <rmh@aybabtu.com>
5734 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5736 Patch from Sven Mueller <sven@debian.org>.
5738 2008-06-16 Robert Millan <rmh@aybabtu.com>
5740 * util/update-grub.in: Check for $EUID instead of $UID.
5741 Reported by Vincent Zweije.
5743 2008-06-16 Bean <bean123ch@gmail.com>
5745 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5746 (grub_ext2_read_block): Likewise.
5747 (grub_ext2_read_inode): Likewise.
5748 (grub_ext2_mount): Likewise.
5749 (grub_ext2_close): Likewise.
5750 (grub_ext3_get_journal): Removed.
5752 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5753 (grub_reiserfs_read_symlink): Likewise.
5754 (grub_reiserfs_mount): Likewise.
5755 (grub_reiserfs_open): Likewise.
5756 (grub_reiserfs_read): Likewise.
5757 (grub_reiserfs_close): Likewise.
5758 (grub_reiserfs_get_journal): Removed.
5760 * fs/fshelp.c (grub_fshelp_read): Removed.
5761 (grub_fshelp_map_block): Likewise.
5763 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5764 (grub_fshelp_journal): Likewise.
5765 (grub_fshelp_read): Likewise.
5766 (grub_fshelp_map_block): Likewise.
5768 2008-06-16 Pavel Roskin <proski@gnu.org>
5770 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5771 floating point anymore.
5772 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5774 2008-06-15 Pavel Roskin <proski@gnu.org>
5776 * commands/ls.c (grub_ls_list_files): Use integer calculations
5777 for human readable format, avoid floating point use.
5778 * kern/misc.c (grub_ftoa): Remove.
5779 (grub_vsprintf): Remove floating point support.
5781 2008-06-15 Robert Millan <rmh@aybabtu.com>
5783 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5785 Reported by Max Vozeler.
5787 2008-06-15 Robert Millan <rmh@aybabtu.com>
5789 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5790 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5792 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5793 the beginning of the prefix.
5795 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5796 It is assumed that if we have a memdisk, grub-mkimage has set
5797 grub_prefix to include the "(memdisk)" drive in it.
5799 2008-06-15 Robert Millan <rmh@aybabtu.com>
5801 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5802 Initialize keyboard controller after registering the terminal, so that
5803 grub_printf() can be called from grub_keyboard_controller_init().
5805 2008-06-15 Robert Millan <rmh@aybabtu.com>
5807 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5808 extent-btree which is written as big endian on disk.
5809 Reported by Alain Greppin <al@chilibi.org>.
5811 2008-06-14 Robert Millan <rmh@aybabtu.com>
5813 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5814 * util/i386/pc/grub-install.in (modules): Likewise.
5816 2008-06-13 Pavel Roskin <proski@gnu.org>
5818 * commands/ls.c (grub_ls_list_files): Fix format warnings.
5820 2008-06-13 Bean <bean123ch@gmail.com>
5822 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5824 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5826 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5827 to indicate sparse block.
5829 2008-06-12 Pavel Roskin <proski@gnu.org>
5831 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5832 number, grub_fshelp_read() does it for us.
5834 * fs/fshelp.c (grub_fshelp_read): New function. Implement
5835 linear disk read with journal translation.
5836 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5837 * include/grub/fshelp.h: Declare grub_fshelp_read().
5839 2008-06-09 Pavel Roskin <proski@gnu.org>
5841 * fs/minix.c (grub_minix_mount): Handle error reading
5844 2008-06-08 Robert Millan <rmh@aybabtu.com>
5846 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5847 don't append the RAID prefix afterwards.
5848 Reported by Clint Adams.
5850 2008-06-08 Robert Millan <rmh@aybabtu.com>
5852 Based on description from Pavel:
5853 * kern/disk.c (grub_disk_check_range): Rename to ...
5854 (grub_disk_adjust_range): ... this. Add a comment explaining the
5855 tasks performed by this function.
5857 2008-06-08 Robert Millan <rmh@aybabtu.com>
5859 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5860 `num_serial' (for consistency with other variables).
5861 (struct grub_ntfs_data): Add `uuid' member.
5862 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5863 (grub_ntfs_uuid): New function.
5864 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5866 2008-06-07 Pavel Roskin <proski@gnu.org>
5868 * util/biosdisk.c (open_device): Revert last change to the
5869 function, it broke installation. The sector needs to be
5870 different dependent on which device is opened.
5872 2008-06-06 Robert Millan <rmh@aybabtu.com>
5874 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5875 rest of GRUB, and breakage doesn't happen if its value were modified.
5877 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5878 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5879 a constant (same value).
5880 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5881 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5883 2008-06-06 Robert Millan <rmh@aybabtu.com>
5885 * util/biosdisk.c (open_device): Do not modify sector offset when
5886 accessing a partition. kern/disk.c already handles this for us.
5888 2008-06-06 Robert Millan <rmh@aybabtu.com>
5890 * util/grub-emu.c (grub_machine_init): Move code in this function from
5892 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5893 segfault in case grub_printf() is called).
5895 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5896 grub_probe. Update all users not to explicitly add it again.
5897 (grub_device): New variable; contains corresponding device for grubdir.
5898 (fs_module, partmap_module, devabstraction_module): Pass
5899 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5902 2008-06-05 Robert Millan <rmh@aybabtu.com>
5904 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5905 is found, print it (same layout as with labels).
5907 2008-06-04 Robert Millan <rmh@aybabtu.com>
5909 * util/biosdisk.c (get_drive): Rename to ...
5910 (find_grub_drive): ... this. Update all users.
5912 (get_os_disk): Rename to ...
5913 (convert_system_partition_to_system_disk): ... this. Update all users.
5915 (find_drive): Rename to ...
5916 (find_system_device): ... this. Update all users.
5918 2008-06-04 Robert Millan <rmh@aybabtu.com>
5920 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5921 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5922 (make_device_map): Likewise.
5924 2008-06-01 Robert Millan <rmh@aybabtu.com>
5926 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5927 before dereferencing it.
5929 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5930 union with fat12/fat16-specific ones. Add some new fields, including
5931 `num_serial' for both versions.
5932 (struct grub_fat_data): Add `uuid' member.
5933 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5934 names. Initialize `data->uuid' using `num_serial'.
5935 (grub_fat_uuid): New function.
5936 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5938 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5939 (grub_reiserfs_uuid): New function.
5940 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5943 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5944 (grub_xfs_uuid): New function.
5945 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5947 2008-06-01 Robert Millan <rmh@aybabtu.com>
5949 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5950 code that is backward compatible with pre-uuid search command.
5952 2008-05-31 Robert Millan <rmh@aybabtu.com>
5954 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5955 floppies after everything else, to ensure floppy drive isn't accessed
5956 unnecessarily (patch from Bean).
5958 2008-05-31 Robert Millan <rmh@aybabtu.com>
5960 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5961 not print device names when we were asked to set a variable.
5963 2008-05-31 Robert Millan <rmh@aybabtu.com>
5965 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5966 using "cursor-on" and "cursor-off" commands (understood at least by
5967 the Open Firmware flavour on OLPC).
5969 2008-05-31 Michael Gorven <michael@gorven.za.net>
5971 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5972 on and off sequences.
5974 2008-05-31 Robert Millan <rmh@aybabtu.com>
5976 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5977 * util/update-grub.in: Likewise.
5979 2008-05-30 Pavel Roskin <proski@gnu.org>
5981 * util/biosdisk.c (linux_find_partition): Simplify logic and
5982 make the code more universal. Keep special processing for
5983 devfs, but use a simple rule for all other devices. If the
5984 device ends with a number, append 'p' and the partition number.
5985 Otherwise, append only the partition number.
5987 2008-05-30 Robert Millan <rmh@aybabtu.com>
5989 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5990 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5991 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5992 the `root' parameter to Linux.
5994 2008-05-30 Robert Millan <rmh@aybabtu.com>
5996 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5997 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5998 --fs_uuid with --fs-uuid.
5999 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6000 all filesystems support them).
6002 2008-05-30 Robert Millan <rmh@aybabtu.com>
6004 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6005 grub_printf() flags, since we're printing in units of 2 bytes.
6007 2008-05-30 Robert Millan <rmh@aybabtu.com>
6009 * util/grub.d/00_header.in: Remove obsolete comment referencing
6010 convert_system_path_to_grub_path().
6011 * util/update-grub.in: Likewise.
6012 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6013 (convert_system_path_to_grub_path): Add a warning message explaining
6014 that this function is deprecated. Rely on is_path_readable_by_grub()
6015 for the readability checks.
6016 (font_path): Use is_path_readable_by_grub() for the readability
6017 check rather than convert_system_path_to_grub_path().
6019 2008-05-30 Robert Millan <rmh@aybabtu.com>
6021 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6022 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6023 converting it first.
6024 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6025 grub.cfg for access to font file, and afterwards call it again to set
6028 2008-05-30 Robert Millan <rmh@aybabtu.com>
6030 * commands/search.c (options): Add --fs_uuid option.
6031 (search_fs_uuid): New function.
6032 (grub_cmd_search): Fix --set argument passing.
6033 Use search_fs_uuid() when requested via --fs_uuid.
6034 (grub_search_init): Update help message.
6035 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6036 and redeclare it as an array of 16-bit words.
6037 (grub_ext2_uuid): New function.
6038 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6039 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6040 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6041 (GRUB_DEVICE_BOOT_UUID): New variables.
6042 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6043 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6045 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6046 just assume `root' variable has the right value.
6047 * util/grub.d/10_linux.in: Likewise.
6048 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6050 (main): Recognise `-t fs_uuid' argument.
6052 2008-05-30 Robert Millan <rmh@aybabtu.com>
6054 * util/biosdisk.c (map): Redefine structure to hold information
6055 about GRUB drive name.
6056 (get_drive): Reimplement without assuming (and verifying) BIOS-like
6058 (call_hook): Remove.
6059 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6060 member. Assume drive has partitions.
6061 (grub_util_biosdisk_open): Access device names via `.device' struct
6063 (open_device): Likewise.
6064 (find_drive): Likewise.
6065 (read_device_map): Adjust map[] usage to match the new struct
6066 definition. Don't check for duplicates (still possible, but not cheap
6068 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6069 (make_device_name): Remove assumption of BIOS-like drive names.
6071 2008-05-30 Pavel Roskin <proski@gnu.org>
6073 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6074 compiling execute.c doesn't need grub_script.tab.h anymore.
6075 (normal/command.c_DEPENDENCIES): Likewise.
6076 (normal/function.c_DEPENDENCIES): Likewise.
6077 * conf/i386-ieee1275.rmk: Likewise.
6078 * conf/i386-linuxbios.rmk: Likewise.
6079 * conf/i386-pc.rmk: Likewise.
6080 * conf/powerpc-ieee1275.rmk: Likewise.
6081 * conf/sparc64-ieee1275.rmk: Likewise.
6083 2008-05-29 Pavel Roskin <proski@gnu.org>
6085 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6086 when scanning metadata for volume group name.
6088 * include/grub/script.h: Don't include grub_script.tab.h. It's
6089 a generated file, which may only be included from the files with
6090 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6091 use union YYSTYPE, as the later allows forward declaration.
6092 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6094 2008-05-29 Robert Millan <rmh@aybabtu.com>
6096 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6097 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6098 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6099 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6102 2008-05-29 Robert Millan <rmh@aybabtu.com>
6104 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6105 control key combinations.
6107 2008-05-29 Robert Millan <rmh@aybabtu.com>
6109 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6110 * util/ieee1275/grub-install.in: ... to here.
6111 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6112 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6113 (grub_install_SOURCES): Likewise.
6115 2008-05-29 Robert Millan <rmh@aybabtu.com>
6117 * fs/affs.c: Update copyright year.
6118 * fs/ext2.c: Likewise.
6119 * fs/fshelp.c: Likewise.
6120 * fs/hfsplus.c: Likewise.
6121 * fs/ntfs.c: Likewise.
6122 * fs/xfs.c: Likewise.
6123 * include/grub/fshelp.h: Likewise.
6124 * util/grub-mkdevicemap.c: Likewise.
6126 2008-05-28 Robert Millan <rmh@aybabtu.com>
6128 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6129 might need to be fatfs to support some firmware implementations
6132 2008-05-28 Robert Millan <rmh@aybabtu.com>
6134 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6136 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6137 (make_device_map): Likewise.
6139 2008-05-20 Bean <bean123ch@gmail.com>
6141 * fs/fshelp.c (grub_fshelp_map_block): New function.
6142 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6143 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6145 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6146 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6147 (grub_fshelp_journal): New structure.
6148 (grub_fshelp_map_block): New function prototype.
6149 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6150 (grub_fshelp_map_block): Likewise.
6152 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6153 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6154 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6155 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6156 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6157 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6158 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6159 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6160 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6161 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6162 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6163 (grub_ext2_sblock): New members for journal support.
6164 (grub_ext3_journal_header): New structure.
6165 (grub_ext3_journal_revoke_header): Likewise.
6166 (grub_ext3_journal_block_tag): Likewise.
6167 (grub_ext3_journal_sblock): Likewise.
6168 (grub_fshelp_node): New members logfile and journal.
6169 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6170 grub_fshelp_map_block to get real block number.
6171 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6173 (grub_ext2_read_inode): Likewise.
6174 (grub_ext3_get_journal): New function.
6175 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6176 (grub_ext2_close): Release memory used by journal.
6178 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6179 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6180 (grub_reiserfs_transaction_header): Renamed to
6181 grub_reiserfs_description_block, replace field data with real_blocks.
6182 (grub_reiserfs_commit_block): New structure.
6183 (grub_reiserfs_data): New member journal.
6184 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6186 (grub_reiserfs_read_symlink): Likewise.
6187 (grub_reiserfs_iterate_dir): Likewise.
6188 (grub_reiserfs_open): Likewise.
6189 (grub_reiserfs_read): Likewise.
6190 (grub_reiserfs_get_journal): New function.
6191 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6192 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6193 using grub_reiserfs_get_journal.
6194 (grub_reiserfs_close): Release memory used by journal.
6196 * fs/affs.c (grub_affs_read_block): Change block type to
6197 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6199 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6201 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6203 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6205 * fs/udf.c (grub_udf_read_block): Change block type to
6206 grub_disk_addr_t. Use type cast to avoid warning.
6208 * fs/xfs.c (grub_xfs_read_block): Likewise.
6210 2008-05-16 Christian Franke <franke@computer.org>
6212 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6213 to ensure that break with ESC will always work.
6214 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6215 Remove ESC from keyboard queue.
6217 2008-05-16 Christian Franke <franke@computer.org>
6219 * util/biosdisk.c: [__CYGWIN__] Add includes.
6220 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6221 (get_os_disk): Move variable declarations to OS specific
6222 parts to avoid warning.
6223 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6224 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6225 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6227 * util/getroot.c: [__CYGWIN__] Add includes.
6228 (strip_extra_slashes): Fix "/" case.
6229 [__CYGWIN__] (get_win32_path): New function.
6230 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6231 [__CYGWIN__] (find_root_device): Disable.
6232 [__CYGWIN__] (get_bootsec_serial): New function.
6233 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6234 [__linux__] (grub_guess_root_device): Add early returns to simplify
6236 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6237 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6238 check for Linux only.
6240 2008-05-15 Bean <bean123ch@gmail.com>
6242 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6243 keyboard hang problem in apple's intel mac.
6245 2008-05-09 Robert Millan <rmh@aybabtu.com>
6247 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6249 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6250 (make_device_map): Likewise.
6251 Reported by Aurelien Jarno <aurel32@debian.org>
6253 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
6255 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6256 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6257 (make_device_map): Output entries for xvd type disks.
6259 2008-05-07 Robert Millan <rmh@aybabtu.com>
6261 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6263 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6264 (make_device_map): Likewise.
6265 Reported by Roland Dreier <rdreier@cisco.com>
6267 2008-05-07 Robert Millan <rmh@aybabtu.com>
6269 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6270 grub_strstr() call. Correct a few mistakes in failure path handling.
6272 2008-05-06 Robert Millan <rmh@aybabtu.com>
6274 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6275 Do not print a trailing slash (therefore, the root directory is an
6277 (convert_system_path_to_grub_path): Do not remove trailing slash
6278 from make_system_path_relative_to_its_root() output.
6280 * util/i386/pc/grub-install.in: Add trailing slash to output from
6281 make_system_path_relative_to_its_root().
6283 2008-05-06 Robert Millan <rmh@aybabtu.com>
6285 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6286 ensures that output lines aren't intermangled with those sent to
6287 stderr (via grub_util_info()).
6288 * util/grub-probe.c (grub_refresh): Likewise.
6289 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6291 2008-05-05 Christian Franke <franke@computer.org>
6293 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6294 Add Cygwin device names.
6295 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6296 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6297 (check_device): Return error instead of success on empty name.
6298 (make_device_map): Move label inside linux specific code to
6299 prevent compiler warning.
6301 2008-04-30 Robert Millan <rmh@aybabtu.com>
6303 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6304 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6306 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6308 2008-04-29 Robert Millan <rmh@aybabtu.com>
6310 * docs/grub.cfg: New file (example GRUB configuration).
6312 2008-04-26 Robert Millan <rmh@aybabtu.com>
6314 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6315 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6316 and `disk/ieee1275/nand.c'.
6318 2008-04-25 Bean <bean123ch@gmail.com>
6320 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6323 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6324 change the buffer size to 4096 for cdrom device.
6326 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6328 (_linux_mod_SOURCES): New variable.
6329 (_linux_mod_CFLAGS): Likewise.
6330 (_linux_mod_LDFLAGS): Likewise.
6331 (linux_mod_SOURCES): Likewise.
6332 (linux_mod_CFLAGS): Likewise.
6333 (linux_mod_LDFLAGS): Likewise.
6334 (nand_mod_SOURCES): Likewise.
6335 (nand_mod_CFLAGS): Likewise.
6336 (nand_mod_LDFLAGS): Likewise.
6338 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6339 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6340 type property. (nand device in olpc don't have this property)
6342 * include/grub/disk.h (grub_disk_dev_id): New macro
6343 GRUB_DISK_DEVICE_NAND_ID.
6345 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6347 (grub_rescue_cmd_initrd): Likewise.
6349 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6350 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6351 ofw_cif_handler and ofw_idt, adjust padding number.
6353 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6354 GRUB_MACHINE_IEEE1275 is defined.
6356 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6357 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6359 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6360 on nested function heap_init.
6361 (grub_upper_mem): New variable for i386-ieee1275.
6362 (grub_get_extended_memory): New function for i386-ieee1275.
6363 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6365 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6366 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6369 * loader/i386/ieee1275/linux.c: New file.
6371 * loader/i386/ieee1275/linux_normal.c: New file.
6373 * disk/ieee1275/nand.c: New file.
6375 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6377 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6379 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6381 2008-04-18 Robert Millan <rmh@aybabtu.com>
6383 Restructures early code path on ieee1275 to unify grub_main() as
6384 the first C function that is executed in every platform.
6386 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6387 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6389 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6390 * kern/ieee1275/cmain.c (cmain): Rename to ...
6391 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6392 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6395 2008-04-18 Robert Millan <rmh@aybabtu.com>
6397 * util/update-grub.in: Fix syntax error when setting
6398 `GRUB_PRELOAD_MODULES'.
6399 Reported by Stephane Chazelas <stephane@artesyncp.com>
6401 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6403 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6404 section into account, newer toolchains generate unique build ids
6405 * configure.ac: remove the test for --build-id=none acceptance,
6406 we want build ids to be preserved
6407 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6408 far from other sections don't cause the raw binary images grow
6411 2008-04-15 Robert Millan <rmh@aybabtu.com>
6413 * disk/lvm.c: Update copyright year.
6414 * kern/misc.c: Likewise.
6416 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6418 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6419 there is no memory left for physical volume name.
6421 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6423 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6424 volume name mapping to support bigger than 9 character names properly.
6426 2008-04-13 Robert Millan <rmh@aybabtu.com>
6428 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6429 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6431 2008-04-13 Christian Franke <franke@computer.org>
6433 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6434 to create a floppy emulation boot CD when non emulation mode
6436 Enable Joliet CD filesystem extension.
6438 2008-04-13 Robert Millan <rmh@aybabtu.com>
6440 * kern/misc.c (grub_strncat): Fix off-by-one error.
6441 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6443 * kern/env.c (grub_env_context_close): Clear current context, not
6445 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6447 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6449 2008-04-13 Robert Millan <rmh@aybabtu.com>
6451 Improve robustness when handling LVM.
6453 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6454 (and leave `*p' unmodified).
6455 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6457 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6458 iterating through it.
6459 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6461 (grub_lvm_scan_device): Check the return value (and fail gracefully
6462 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6463 Don't assume `vg->pvs != NULL' when iterating through it.
6465 2008-04-13 Robert Millan <rmh@aybabtu.com>
6467 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6468 * genmk.rb (partmap): New variable.
6469 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6470 (#{partmap}): New target rule.
6471 * genpartmaplist.sh: New file.
6472 * Makefile.in (pkglib_DATA): Add partmap.lst.
6473 (partmap.lst): New target rule.
6474 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6475 modules (including all partition maps), instead of preloading them.
6477 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6479 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6480 `linux-boot-prober' (if installed) to detect other operating
6481 systems which are installed on the computer and add them to
6483 * conf/common.rmk: Build and install 30_os-prober.
6485 2008-04-12 Robert Millan <rmh@aybabtu.com>
6487 * kern/powerpc/ieee1275/init.c: Move from here ...
6488 * kern/ieee1275/init.c: ... to here. Update all users.
6490 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6491 * kern/ieee1275/cmain.c: ... to here. Update all users.
6493 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6494 * kern/ieee1275/openfw.c: ... to here. Update all users.
6496 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6497 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6499 2008-04-10 Pavel Roskin <proski@gnu.org>
6501 * configure.ac: Always use "_cv_" in cache variables for
6502 compatibility with Autoconf 2.62.
6504 2008-04-07 Robert Millan <rmh@aybabtu.com>
6506 Revert grub/machine/init.h addition by Pavel (since it breaks on
6507 i386-ieee1275 and others):
6508 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6509 * util/powerpc/ieee1275/misc.c: Likewise.
6511 2008-04-07 Robert Millan <rmh@aybabtu.com>
6513 * util/grub-probe.c (probe): Improve error message.
6515 2008-04-07 Robert Millan <rmh@aybabtu.com>
6517 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6518 (this prevents the presence of a bogus entry from ruining the whole
6521 2008-04-06 Pavel Roskin <proski@gnu.org>
6523 * util/biosdisk.c: Include grub/util/biosdisk.h.
6524 * util/grub-fstest.c (execute_command): Make static.
6525 * util/grub-mkdevicemap.c (check_device): Likewise.
6526 * util/i386/pc/misc.c: Include grub/machine/init.h.
6527 * util/powerpc/ieee1275/misc.c: Likewise.
6528 * util/lvm.c: Include grub/util/lvm.h.
6529 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6531 * util/raid.c: Include grub/util/raid.h.
6532 (grub_util_getdiskname): Make static.
6534 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6535 grub_hostfs_fini(), as they are called from grub_init_all() and
6536 grub_fini_all() respectively. This fixes an infinite loop in
6537 grub-fstest due to double registration of hostfs.
6538 Reported by Christian Franke <Christian.Franke@t-online.de>
6540 2008-04-05 Pavel Roskin <proski@gnu.org>
6542 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6543 all 8 functions. Otherwise, probe function 0 only.
6545 2008-04-04 Pavel Roskin <proski@gnu.org>
6547 * commands/lspci.c (grub_lspci_iter): Print the bus number
6550 * commands/lspci.c (grub_pci_classes): Fix typos.
6551 (grub_lspci_iter): Don't print func twice. Print vendor ID
6552 before device ID, as it's normally done.
6554 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6555 Fix signedness warnings.
6556 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6558 * util/ieee1275/get_disk_name.c: Include config.h so that
6559 _GNU_SOURCE is defined and getline() is declared. Mark an
6560 unused argument as such. Fix a signedness warning.
6562 2008-04-02 Pavel Roskin <proski@gnu.org>
6564 * genkernsyms.sh.in: Use more robust assignments for CC and
6565 srcdir. Quote srcdir.
6566 * gensymlist.sh.in: Likewise. Assert at the compile time that
6567 the symbol table is not empty.
6569 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6570 * fs/cpio.c (grub_cpio_read): Likewise.
6572 2008-04-01 Pavel Roskin <proski@gnu.org>
6574 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6575 * disk/host.c (grub_host_open): Likewise.
6576 * disk/loopback.c (grub_loopback_open): Likewise.
6577 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6578 disk->id as in disk/host.c, not a multi-character constant.
6580 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6581 later is obsolete, potentially dangerous and sets a bad example.
6582 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6583 * util/misc.c (grub_util_get_image_size): Likewise.
6585 * disk/loopback.c (options): Improve help for "--partitions".
6587 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6588 options to align them with the short options, e.g. "echo -e".
6590 2008-03-31 Bean <bean123ch@gmail.com>
6592 * video/reader/png.c (grub_png_data): New member is_16bit and
6594 (grub_png_decode_image_header): Detect 16 bit png image.
6595 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6596 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6597 (grub_video_reader_png): Release memory occupied by image_data.
6599 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6601 (grub_nfs_mount): Skip the test for sector per cluster.
6603 * include/grub/ntfs.h (MAX_SPC): Removed.
6605 2008-03-31 Bean <bean123ch@gmail.com>
6607 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6608 (grub_probe_SOURCES): Add fs/afs.c.
6609 (grub_fstest_SOURCES): Likewise.
6610 (afs_mod_SOURCES): New variable.
6611 (afs_mod_CFLAGS): Likewise.
6612 (afs_mod_LDFLAGS): Likewise.
6614 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6615 (grub_emu_SOURCES): Likewise.
6617 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6619 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6621 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6623 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6625 * fs/afs.c: New file.
6627 2008-03-30 Pavel Roskin <proski@gnu.org>
6629 * disk/host.c: Include grub/misc.h to fix a warning.
6630 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6631 warnings about implicit declarations.
6633 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6635 * include/grub/i386/loader.h: Change declaration of
6636 grub_linux_boot() to match what grub_loader_set() expects.
6637 * util/getroot.c (grub_guess_root_device): Return const char* to
6639 * util/grub-probe.c (probe): Fix a warning about uninitialized
6640 abstraction_name variable.
6641 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6642 second argument as unused to fix a warning.
6644 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6645 missing grub_error() call.
6647 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6648 2.60 and newer uses it to define datadir.
6650 * commands/sleep.c: Fix warning about implicit declaration.
6651 * disk/memdisk.c: Likewise.
6652 * loader/aout.c: Likewise.
6653 * loader/i386/bsd_normal.c: Likewise.
6654 * util/grub-probe.c: Likewise.
6656 * commands/i386/cpuid.c (has_longmode): Make static.
6657 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6658 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6660 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6661 GDT. This is more robust, as %ds can change.
6662 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6663 calling real_to_prot().
6664 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6666 2008-03-28 Pavel Roskin <proski@gnu.org>
6668 * kern/i386/pc/startup.S: Assert that uncompressed functions
6669 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6670 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6671 code, as they push parts of the code (error handlers) beyond
6672 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6673 code as correctness and size.
6675 2008-03-28 Pavel Roskin <proski@gnu.org>
6677 * kern/i386/pc/startup.S
6678 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6679 data block address to the real mode, keep offset minimal. This
6680 works around a bug in AWARD BIOS on old Athlon systems, which
6681 makes CD detection hang.
6683 2008-03-26 Pavel Roskin <proski@gnu.org>
6685 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6687 * include/grub/normal.h: Add grub_parse_color_name_pair()
6690 2008-03-24 Bean <bean123ch@gmail.com>
6692 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6693 (cd_count): Removed.
6694 (cd_drive): New variable.
6695 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6696 (grub_biosdisk_call_hook): Likewise.
6697 (grub_biosdisk_iterate): Change cdrom detection method.
6698 (grub_biosdisk_open): Replace cd_start with cd_drive.
6699 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6700 detect cdrom device.
6702 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6704 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6705 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6706 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6707 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6708 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6709 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6710 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6711 (grub_biosdisk_cdrp): New structure.
6712 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6714 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6716 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6719 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6722 2008-03-20 Robert Millan <rmh@aybabtu.com>
6724 Remove 2 TiB limit in ata.mod.
6725 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6726 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6727 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6728 grub_uint64_t instead of grub_uint32_t.
6730 2008-03-05 Bean <bean123ch@gmail.com>
6732 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6733 (grub_multiboot): Set boot device.
6735 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6737 2008-03-02 Bean <bean123ch@gmail.com>
6739 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6742 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6744 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6747 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6750 * docs/fdl.texi: New file.
6752 * docs/mdate-sh: New file. Copied from gnulib.
6753 * docs/texinfo.tex: Likewise.
6755 * config.guess: Updated from gnulib.
6756 * install-sh: Likewise.
6758 2008-02-28 Robert Millan <rmh@aybabtu.com>
6760 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6761 (aout_mod_SOURCES): New variable.
6762 (aout_mod_CFLAGS): Likewise.
6763 (aout_mod_LDFLAGS): Likewise.
6765 * conf/i386-ieee1275.rmk: Likewise.
6767 2008-02-28 Robert Millan <rmh@aybabtu.com>
6769 * util/update-grub.in: Reorganise terminal validity check. Accept
6770 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6771 Based on suggestion by Franklin PIAT.
6773 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6775 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6777 * util/getroot.c (grub_util_check_block_device): New function that
6778 returns the given argument if it is a block device and returns NULL else.
6779 * util/grub-probe.c (argument_is_device): New variable.
6780 (probe): Promote device_name from a variable to an argument. Receive
6781 device_name from grub_util_check_block_device() if path is NULL and from
6782 grub_guess_root_device() else. Do not free() device_name anymore.
6783 (options): Introduce new parameter '-d, --device'.
6784 (main): Add description of the new parameter to the help screen.
6785 Rename path variable to argument. Set argument_is_device if the '-d'
6786 option is given. Pass argument to probe() depending on
6789 2008-02-24 Bean <bean123ch@gmail.com>
6791 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6792 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6793 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6794 (GRUB_ISO9660_VOLDESC_PART): Likewise.
6795 (GRUB_ISO9660_VOLDESC_END): Likewise.
6796 (grub_iso9660_primary_voldesc): New member escape.
6797 (grub_iso9660_data): New member joliet.
6798 (grub_iso9660_convert_string): New function.
6799 (grub_iso9660_mount): Detect joliet extension.
6800 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6801 (grub_iso9660_iso9660_label): Likewise.
6803 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6804 (grub_setup_SOURCES): Add fs/udf.c.
6805 (grub_fstest_SOURCES): Likewise.
6806 (udf_mod_SOURCES): New variable.
6807 (udf_mod_CFLAGS): Likewise.
6808 (udf_mod_LDFLAGS): Likewise.
6810 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6811 (grub_emu_SOURCES): Likewise.
6813 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6815 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6817 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6819 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6821 * fs/udf.c: New file.
6823 2008-02-24 Robert Millan <rmh@aybabtu.com>
6825 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6826 (normal/lexer.c_DEPENDENCIES): New variables.
6827 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6828 (normal/lexer.c_DEPENDENCIES): Likewise.
6829 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6830 (normal/lexer.c_DEPENDENCIES): Likewise.
6831 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6832 (normal/lexer.c_DEPENDENCIES): Likewise.
6833 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6834 (normal/lexer.c_DEPENDENCIES): Likewise.
6835 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6836 (normal/lexer.c_DEPENDENCIES): Likewise.
6838 2008-02-23 Robert Millan <rmh@aybabtu.com>
6840 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6841 since they were intended to be in hex. This didn't break previously
6842 because of a bug in gpt_partition_map_iterate() (see below).
6844 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6845 when checking the validity of GPT header.
6846 Remove `partno', since it always provides the same information as `i'.
6848 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
6850 * include/grub/efi/time.h: Fix a wrong comment.
6852 2008-02-19 Pavel Roskin <proski@gnu.org>
6854 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6857 2008-02-19 Bean <bean123ch@gmail.com>
6859 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6860 (aout_mod_SOURCES): New variable.
6861 (aout_mod_CFLAGS): Likewise.
6862 (aout_mod_LDFLAGS): Likewise.
6863 (_bsd_mod_SOURCES): New variable.
6864 (_bsd_mod_CFLAGS): Likewise.
6865 (_bsd_mod_LDFLAGS): Likewise.
6866 (bsd_mod_SOURCES): New variable.
6867 (bsd_mod_CFLAGS): Likewise.
6868 (bsd_mod_LDFLAGS): Likewise.
6870 * include/grub/aout.h: New file.
6872 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6874 * include/grub/i386/bsd.h: New file.
6876 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6879 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6880 function is called, so that it's possible to change it inside the hook.
6881 (grub_elf64_load): Likewise.
6882 (grub_elf_file): Don't close the file if elf header is not found.
6883 (grub_elf_close): Close the file if grub_elf_file fails (The new
6884 grub_elf_file won't close it).
6885 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6886 (grub_elf64_size): Likewise.
6888 * kern/i386/loader.S (grub_unix_real_boot): New function.
6890 * loader/aout.c: New file.
6892 * loader/i386/bsd.c: New file.
6894 * loader/i386/bsd_normal.c: New file.
6896 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6898 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
6899 can test other formats.
6901 2008-02-19 Robert Millan <rmh@aybabtu.com>
6903 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6904 (grub_gpt_partition_type_empty): Redefine with macro from
6905 `<grub/gpt_partition.h>'.
6906 (gpt_partition_map_iterate): Adjust partition type comparison.
6908 Export `entry' as partmap-specific `part.data' struct.
6909 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6911 * include/grub/gpt_partition.h (grub_gpt_header)
6912 (grub_gpt_partentry): ... to here (new file).
6914 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6916 (grub_gpt_partition_type_bios_boot): New const variable, defined
6917 with macro from `<grub/gpt_partition.h>'.
6919 (setup): Replace `first_start' with `embed_region', which keeps
6920 track of the embed region (and is partmap-agnostic).
6922 Replace find_first_partition_start() with find_usable_region(),
6923 which finds a usable region for embedding using partmap-specific
6924 knowledge (supports PC/MSDOS and GPT).
6926 Fix all assumptions that the embed region start at sector 1, using
6927 `embed_region.start' from now on. Similarly, use `embed_region.end'
6928 rather than `first_start' to calculate available size.
6930 In grub_util_info() message, replace "into after the MBR" with an
6931 indication of the specific sector our embed region starts at.
6933 2008-02-19 Robert Millan <rmh@aybabtu.com>
6935 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6936 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6937 `commands/reboot.c'.
6938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6939 (halt_mod_SOURCES): Likewise.
6940 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6941 (halt_mod_SOURCES): Likewise.
6943 2008-02-17 Christian Franke <franke@computer.org>
6945 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6947 2008-02-17 Robert Millan <rmh@aybabtu.com>
6949 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6950 set `first_start' to 0 for non-PC/MSDOS partition maps.
6952 2008-02-16 Robert Millan <rmh@aybabtu.com>
6954 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6955 do not assume partition map is PC/MSDOS before performing checks that
6956 are specific to that layout.
6958 2008-02-13 Robert Millan <rmh@aybabtu.com>
6960 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6961 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6962 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6964 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6966 * configure.ac: Only a cosmetic change on the handling of
6967 -fno-stack-protector.
6969 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
6971 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6972 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6974 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6975 (halt_mod_SOURCES): New variable.
6976 (halt_mod_CFLAGS): Likewise.
6977 (halt_mod_LDFLAGS): Likewise.
6978 (reboot_mod_SOURCES): Likewise.
6979 (reboot_mod_CFLAGS): Likewise.
6980 (reboot_mod_LDFLAGS): Likewise.
6982 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6983 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6985 (halt_mod_SOURCES): Likewise.
6986 (reboot_mod_SOURCES): Likewise.
6988 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6989 commands/i386/pc/reboot.c by commands/reboot.c.
6990 (reboot_mod_SOURCES): Likewise.
6992 * commands/i386/pc/reboot.c: merge this file ...
6994 * commands/ieee1275/reboot.c: ... and this file ...
6996 * commands/reboot.c: ... to this file.
6997 Add some precompiler directive to include the correct header for
7000 * commands/ieee1275/halt.c: move this file ...
7002 * commands/halt.c: ... to here.
7003 Add some precompiler directive to include the correct header for
7006 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7007 (grub_halt): Likewise.
7009 * kern/efi/efi.c (grub_reboot): New function.
7010 (grub_halt): Likewise.
7012 2008-02-12 Robert Millan <rmh@aybabtu.com>
7014 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7015 /dev (like it is done for /dev/mapper). This doesn't provide support
7016 for EVMS, but at least it is now easy to identify the problem when it
7019 2008-02-11 Robert Millan <rmh@aybabtu.com>
7021 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7022 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7023 comparing it with -1, not 0.
7025 2008-02-10 Robert Millan <rmh@aybabtu.com>
7027 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7029 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7030 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7032 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7033 `disk/lvm.c' to the end of the list.
7034 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7035 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7037 2008-02-10 Robert Millan <rmh@aybabtu.com>
7039 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7040 grub_print_error() instead. This will let user know why we're entering
7042 Based on suggestions from Sam Morris.
7044 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
7046 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7047 on remaining N args, instead of "--" arg N times.
7049 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7051 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7052 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7053 pattern for unknown glyphs.
7055 2008-02-09 Robert Millan <rmh@aybabtu.com>
7057 * configure.ac: Probe for `help2man'.
7058 * Makefile.in (builddir): New variable.
7059 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7060 or otherwise add a few flags/options to it.
7061 (install-local): For every executable utility or script that is
7062 installed, invoke $(HELP2MAN) to install a manpage based on --help
7065 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7066 that it doesn't prevent --help from working in build tree.
7068 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7069 with `bug-grub@gnu.org'.
7070 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7071 * util/update-grub.in (usage): New function.
7072 Implement proper argument check, with support for --help and --version
7073 (as well as existing -y).
7075 2008-02-09 Christian Franke <franke@computer.org>
7077 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7078 avoid overwriting previous output.
7079 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7081 2008-02-09 Robert Millan <rmh@aybabtu.com>
7083 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7086 2008-02-09 Robert Millan <rmh@aybabtu.com>
7088 * commands/sleep.c: New file.
7089 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7090 (sleep_mod_SOURCES): New variable.
7091 (sleep_mod_CFLAGS): Likewise.
7092 (sleep_mod_LDFLAGS): Likewise.
7094 2008-02-09 Robert Millan <rmh@aybabtu.com>
7096 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7097 situations in which we can deduce the RAID size and the superblock
7100 2008-02-09 Robert Millan <rmh@aybabtu.com>
7102 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7103 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7104 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7106 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7107 and return a grub_diskmemberlist_t composed of physical array members.
7108 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7110 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7112 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7113 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7114 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7116 * util/grub-probe.c (probe): Move partmap probing code from here ...
7117 (probe_partmap): ... to here.
7118 (probe): Use probe_partmap() once for the disk we're probing, and
7119 additionally, when such disk contains a memberlist() struct member,
7120 once for each disk that is contained in the structure returned by
7123 2008-02-09 Robert Millan <rmh@aybabtu.com>
7125 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7126 environment variable to 'all' in order to obtain debug output from
7128 * util/i386/pc/grub-setup.c (main): Likewise.
7130 2008-02-08 Robert Millan <rmh@aybabtu.com>
7132 * disk/raid.c (grub_raid_scan_device): Check for
7133 `array->device[sb.this_disk.number]' rather than for
7134 `array->device[sb.this_disk.number]->name', since the latter is not
7135 guaranteed to be accessible.
7137 2008-02-08 Robert Millan <rmh@aybabtu.com>
7139 * disk/raid.c: Update copyright.
7140 * fs/cpio.c: Likewise.
7141 * include/grub/raid.h: Likewise.
7142 * loader/i386/pc/multiboot.c: Likewise.
7143 * util/hostfs.c: Likewise.
7145 2008-02-08 Robert Millan <rmh@aybabtu.com>
7147 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7148 to a grub_disk_t array.
7149 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7151 (grub_raid_scan_device): Replace `device[x].name' accesses with
7152 `device[x]->name'. Simplify initialization of `array->device[x]'.
7154 2008-02-08 Robert Millan <rmh@aybabtu.com>
7156 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7157 grub_dprintf() calls.
7158 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7161 2008-02-07 Christian Franke <franke@computer.org>
7163 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7164 instead of fseek and ftell to support large files.
7165 (grub_hostfs_read): Likewise.
7167 2008-02-07 Robert Millan <rmh@aybabtu.com>
7169 Patch from Jeroen Dekkers.
7170 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7171 failure, since successfully reading all array members might not be
7174 2008-02-06 Robert Millan <rmh@aybabtu.com>
7176 * util/grub-probe.c (probe): Simplify partmap probing (with the
7177 assumption that the first word up to the underscore equals to
7180 2008-02-06 Christian Franke <franke@computer.org>
7182 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7183 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7184 last block of a cpio or tar stream.
7185 Check for "TRAILER!!!" instead of any empty data
7186 block to detect last block of a cpio stream.
7187 (grub_cpio_dir): Fix constness of variable np.
7188 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7189 cpio or tar trailer is detected. This fixes a crash
7190 on open of a non existing file.
7192 2008-02-05 Bean <bean123ch@gmail.com>
7194 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7196 (grub_multiboot_load_elf64): Likewise.
7197 (grub_multiboot): Initialize mbi structure.
7199 * util/grub-fstest.c: Don't include unused header file script.h.
7201 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7203 (grub_fstest_SOURCES): Likewise.
7205 2008-02-05 Robert Millan <rmh@aybabtu.com>
7207 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7208 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7209 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7210 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7212 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7213 (translation_table): Replace hardcoded values with macros
7214 provided by `<grub/term.h>'.
7216 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7217 (keyboard_map): Correct/add a few values, with macros provided
7219 (keyboard_map_shift): Zero values that don't differ from their
7220 `keyboard_map' equivalents.
7221 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7222 Discard the second scan code that is always sent by Caps lock.
7223 Only use `keyboard_map_shift' when it provides a non-zero value,
7224 otherwise fallback to `keyboard_map'.
7226 2008-02-04 Bean <bean123ch@gmail.com>
7228 * Makefile.in (enable_grub_fstest): New variable.
7230 * conf/common.rmk (grub_fstest_init.lst): New rule.
7231 (grub_fstest_init.h): Likewise.
7232 (grub_fstest_init.c): Likewise.
7233 (util/grub-fstest.c_DEPENDENCIES): New variable.
7234 (grub_fstest_SOURCES): Likewise.
7236 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7238 * util/grub-fstest.c: New file.
7240 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7242 Make grub-setup handle a separate root device.
7244 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7245 so that the root device can be compared with the destination
7247 When embedding the core image, if the root and destination devices
7248 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7250 When not embedding, set ROOT_DRIVE to 0xFF.
7252 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7254 Add support for having a grub directory in a different drive. This
7255 is still only the data handling part.
7257 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7258 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7259 (grub_root_drive): New variable.
7261 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7262 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7263 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7266 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7268 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7270 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7272 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7273 is bogus, because PXE booting does not specify any drive
7276 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7277 am not sure if this is really correct.
7279 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7280 is always identical to the boot drive when booting from a CD.
7282 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7284 (root_drive): New variable.
7285 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7286 (setup_sectors): Push %dx right after popping it, because %dh will
7288 (copy_buffer): Restore %dx.
7290 2008-02-03 Robert Millan <rmh@aybabtu.com>
7292 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7293 use `cdboot.img' for cdrom images.
7295 2008-02-03 Robert Millan <rmh@aybabtu.com>
7297 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7298 only setup gfxterm when `font' command has succeeded.
7300 2008-02-03 Robert Millan <rmh@aybabtu.com>
7302 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7303 (grub_rescue_cmd_multiboot_loader)
7304 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7306 2008-02-03 Pavel Roskin <proski@gnu.org>
7308 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7309 %edx and %esi from stack only after grub_gate_a20() is called.
7310 grub_gate_a20() clobbers %edx.
7312 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7314 * configure.ac (AC_INIT): Bumped to 1.96.
7316 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7317 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7318 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7319 video/readers/png.c.
7321 2008-02-03 Bean <bean123ch@gmail.com>
7323 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7324 (cdboot_img_SOURCES): New variable.
7325 (cdboot_img_ASFLAGS): New variable.
7326 (cdboot_img_LDFLAGS): New variable.
7328 * boot/i386/pc/cdboot.S: New file.
7330 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7331 (cd_count): Likewise.
7332 (grub_biosdisk_get_drive): Add support for cd device.
7333 (grub_biosdisk_call_hook): Likewise.
7334 (grub_biosdisk_iterate): Likewise.
7335 (grub_biosdisk_open): Likewise.
7336 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7337 (grub_biosdisk_rw): Support reading from cd device.
7338 (GRUB_MOD_INIT): Iterate cd devices.
7340 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7341 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7342 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7344 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7346 2008-02-02 Robert Millan <rmh@aybabtu.com>
7348 * commands/read.c: New file.
7349 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7350 (read_mod_SOURCES): New variable.
7351 (read_mod_CFLAGS): Likewise.
7352 (read_mod_LDFLAGS): Likewise.
7354 2008-02-02 Robert Millan <rmh@aybabtu.com>
7356 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7357 determining whether menu has to be displayed.
7359 2008-02-02 Marco Gerards <marco@gnu.org>
7361 * bus/pci.c: New file.
7363 * include/grub/pci.h: Likewise.
7365 * include/grub/i386/pc/pci.h: Likewise.
7367 * commands/lspci.c: Likewise.
7369 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7371 (pci_mod_SOURCES): New variable.
7372 (pci_mod_CFLAGS): Likewise.
7373 (pci_mod_LDFLAGS): Likewise.
7374 (lspci_mod_SOURCES): Likewise.
7375 (lspci_mod_CFLAGS): Likewise.
7376 (lspci_mod_LDFLAGS): Likewise.
7378 2008-02-02 Bean <bean123ch@gmail.com>
7380 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7381 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7383 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7384 (grub_xfs_btree_node): New structure.
7385 (grub_xfs_btree_root): New structure.
7386 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7387 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7388 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7389 (GRUB_XFS_EXTENT_SIZE): Likewise.
7390 (grub_xfs_read_block): Support btree format type.
7391 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7392 Use directory block as basic unit.
7394 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7396 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7397 __attribute__ ((__regparm__ (1))).
7399 2008-02-01 Robert Millan <rmh@aybabtu.com>
7401 Correct a mistake in previous commit.
7403 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7405 (normal/command.c_DEPENDENCIES): New variable.
7407 2008-02-01 Robert Millan <rmh@aybabtu.com>
7409 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7411 (normal/command.c_DEPENDENCIES): New variable.
7412 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7413 * conf/i386-ieee1275.rmk: Likewise.
7414 * conf/i386-linuxbios.rmk: Likewise.
7415 * conf/i386-pc.rmk: Likewise.
7416 * conf/sparc64-ieee1275.rmk: Likewise.
7417 * conf/powerpc-ieee1275.rmk: Likewise.
7418 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7420 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7422 2008-02-01 Robert Millan <rmh@aybabtu.com>
7424 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7425 call at beginning of function.
7427 2008-01-31 Pavel Roskin <proski@gnu.org>
7429 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7430 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7431 (grub_mkrescue_SOURCES): Likewise.
7432 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7434 2008-01-30 Robert Millan <rmh@aybabtu.com>
7436 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7437 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7438 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7439 (grub_probe_SOURCES): ... to here.
7441 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7442 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7443 * conf/i386-ieee1275.rmk: Likewise.
7444 * conf/i386-linuxbios.rmk: Likewise.
7445 * conf/powerpc-ieee1275.rmk: Likewise.
7447 2008-01-30 Tristan Gingold <gingold@free.fr>
7449 * kern/rescue.c: Silently accept empty lines.
7451 2008-01-29 Bean <bean123ch@gmail.com>
7453 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7454 (real_code_2): Code cleanup and change comment style.
7455 (move_memory): Avoid using 32-bit address mode.
7457 2008-01-29 Bean <bean123ch@gmail.com>
7459 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7460 (png_mod_SOURCES): New variable.
7461 (png_mod_CFLAGS): Likewise.
7462 (png_mod_LDFLAGS): Likewise.
7464 * video/readers/png.c: New file.
7466 2008-01-28 Robert Millan <rmh@aybabtu.com>
7468 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7469 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7470 `ifndef GRUB_MOD_GAP' hack.
7471 * util/elf/grub-mkimage.c (add_segments): Likewise.
7473 2008-01-27 Robert Millan <rmh@aybabtu.com>
7475 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7476 `GRUB_MOD_GAP' for platforms in which it's not defined.
7477 * util/elf/grub-mkimage.c (add_segments): Likewise.
7479 2008-01-27 Robert Millan <rmh@aybabtu.com>
7481 Get grub-emu to build again (including parallel builds).
7483 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7485 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7486 (normal/execute.c_DEPENDENCIES): ... this, ...
7487 (grub-emu_DEPENDENCIES): ... and this.
7489 * conf/i386-efi.rmk: Likewise.
7490 * conf/i386-linuxbios.rmk: Likewise.
7491 * conf/i386-ieee1275.rmk: Likewise.
7492 * conf/powerpc-ieee1275.rmk: Likewise.
7493 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7495 2008-01-27 Robert Millan <rmh@aybabtu.com>
7497 * NEWS: Add a few items.
7499 2008-01-27 Robert Millan <rmh@aybabtu.com>
7501 Fix parallel builds with grub-emu. Based on earlier commit for
7502 grub-probe and grub-setup.
7504 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7505 (util/grub-emu.c_DEPENDENCIES): ... this.
7506 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7507 (util/grub-emu.c_DEPENDENCIES): ... this.
7508 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7509 (util/grub-emu.c_DEPENDENCIES): ... this.
7510 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7511 (util/grub-emu.c_DEPENDENCIES): ... this.
7512 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7513 (util/grub-emu.c_DEPENDENCIES): ... this.
7515 2008-01-27 Pavel Roskin <proski@gnu.org>
7517 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7518 to create a gap between _end and the modules added to the image
7519 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7520 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7521 * util/elf/grub-mkimage.c (add_segments): Likewise.
7523 2008-01-26 Pavel Roskin <proski@gnu.org>
7525 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7526 just return an error.
7528 2008-01-26 Bean <bean123ch@gmail.com>
7530 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7531 (grub_reiserfs_get_item): Save offset of the next item.
7532 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7534 2008-01-25 Robert Millan <rmh@aybabtu.com>
7536 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7537 make all filesystem sources appear together (possibly fixing omissions
7539 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7540 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7541 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7542 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7544 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7546 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7547 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7548 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7549 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7551 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7552 (probe): Add a sanity check to make sure of our ability to read
7553 requested files when probing for filesystem type.
7555 * genmk.rb: Update copyright year (2007).
7557 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7558 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7559 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7560 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7561 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7562 : Remove function prototypes.
7564 2008-01-25 Robert Millan <rmh@aybabtu.com>
7566 Revert my previous commits (based on wrong assumption of how grub_errno
7569 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7570 * kern/file.c (grub_file_open): Likewise.
7572 2008-01-24 Pavel Roskin <proski@gnu.org>
7574 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7575 that hang if GRUB tries to setup colors.
7576 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7577 colors for firmwares that don't support it.
7578 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7579 Recognize Open Hack'Ware, set flags to work around its
7582 2008-01-24 Robert Millan <rmh@aybabtu.com>
7584 * kern/file.c (grub_file_open): Do not account previous failures of
7585 unrelated functions when grub_errno is checked for.
7586 Reported by Oleg Strikov.
7588 2008-01-24 Bean <bean123ch@gmail.com>
7590 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7591 (grub_ufs_sblock): New member volume name.
7592 (grub_ufs_find_file): Fix string copy bug.
7593 (grub_ufs_label): Implement this function properly.
7595 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7596 (grub_hfs_iterate_records): Use the correct file number for extents
7597 and catalog file. Fix problem in next index calculation.
7598 (grub_hfs_find_node): Replace recursive function call with loop.
7599 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7601 2008-01-23 Robert Millan <rmh@aybabtu.com>
7603 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7604 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7605 (grub_multiboot2_real_boot): New function prototype.
7607 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7608 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7610 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7611 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7613 2008-01-23 Robert Millan <rmh@aybabtu.com>
7615 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7616 #ifdef'ed out grub_printf().
7618 2008-01-23 Robert Millan <rmh@aybabtu.com>
7620 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7621 grub_dprintf calls, since they make "debug=all" mode unusable.
7622 (grub_console_checkkey): Likewise.
7624 2008-01-23 Robert Millan <rmh@aybabtu.com>
7626 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7627 `term/i386/pc/at_keyboard.c'.
7628 (pkglib_MODULES): Add `serial.mod'.
7629 (serial_mod_SOURCES): New variable.
7630 (serial_mod_CFLAGS): Likewise.
7631 (serial_mod_LDFLAGS): Likewise.
7633 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7634 `<grub/powerpc/ieee1275/console.h>'.
7635 (grub_keyboard_controller_init): New function prototype.
7636 (grub_console_checkkey): Likewise.
7637 (grub_console_getkey): Likewise.
7639 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7642 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7643 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7645 2008-01-23 Robert Millan <rmh@aybabtu.com>
7647 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7648 present, "(memdisk)/boot/grub" becomes the default prefix.
7650 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7651 a memdisk tarball with all the modules. Add --overlay=DIR option that
7652 allows users to overlay additional files into the image.
7654 2008-01-23 Robert Millan <rmh@aybabtu.com>
7656 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7657 and `machine/memory.h'.
7658 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7659 (_multiboot_mod_SOURCES): New variable.
7660 (_multiboot_mod_CFLAGS): Likewise.
7661 (_multiboot_mod_LDFLAGS): Likewise.
7662 (multiboot_mod_SOURCES): Likewise.
7663 (multiboot_mod_CFLAGS): Likewise.
7664 (multiboot_mod_LDFLAGS): Likewise.
7666 * include/grub/i386/ieee1275/loader.h: New file.
7668 * include/grub/i386/ieee1275/machine.h: Likewise.
7670 * include/grub/i386/ieee1275/memory.h: Likewise.
7672 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7673 variable declaration.
7674 (grub_os_area_size): Likewise.
7676 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7677 (grub_lower_mem, grub_upper_mem): New variables.
7678 (grub_stop_floppy): New function (just to make
7679 grub_multiboot2_real_boot() happy).
7681 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7682 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7683 (grub_stop): New function.
7684 Include `"../realmode.S"' and `"../loader.S"'.
7686 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7687 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7689 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7690 rely on grub_multiboot2_real_boot() for final boot.
7692 2008-01-22 Robert Millan <rmh@aybabtu.com>
7694 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7695 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7696 device that doesn't look like an SD card.
7697 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7698 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7699 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7700 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7703 2008-01-22 Robert Millan <rmh@aybabtu.com>
7705 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7706 avoid claiming over our own code.
7708 2008-01-22 Bean <bean123ch@gmail.com>
7710 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7711 (jpeg_mod_SOURCES): New variable.
7712 (jpeg_mod_CFLAGS): Likewise.
7713 (jpeg_mod_LDFLAGS): Likewise.
7715 * video/readers/jpeg.c : New file.
7717 2008-01-22 Bean <bean123ch@gmail.com>
7719 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7720 there are no more items.
7722 2008-01-21 Robert Millan <rmh@aybabtu.com>
7724 * kern/mm.c (grub_mm_init_region): Improve debug message.
7726 2008-01-21 Robert Millan <rmh@aybabtu.com>
7728 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7729 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7731 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7733 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7734 Indicates start of upper memory.
7735 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7736 (generate_image): Abort when image size is big enough to corrupt
7739 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7740 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7741 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7742 instead of hardcoding 0xA0000.
7743 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7744 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7745 instead of hardcoding 0xA0000.
7747 2008-01-21 Robert Millan <rmh@aybabtu.com>
7749 * disk/memdisk.c (memdisk_size): New variable.
7750 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7752 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7753 image to dynamic memory.
7754 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7755 `memdisk_size'. Free memdisk block.
7757 2008-01-21 Robert Millan <rmh@aybabtu.com>
7759 Fix detection of very small filesystems (like tar).
7761 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7762 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7763 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7764 a problem with this disk).
7766 2008-01-21 Robert Millan <rmh@aybabtu.com>
7768 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7769 on grub_biosdisk_rw_standard() error.
7771 2008-01-21 Robert Millan <rmh@aybabtu.com>
7773 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7775 * kern/elf.c: Likewise.
7776 * kern/ieee1275/ieee1275.c: Likewise.
7777 * kern/powerpc/ieee1275/openfw.c: Likewise.
7778 * term/ieee1275/ofconsole.c: Likewise.
7780 2008-01-21 Robert Millan <rmh@aybabtu.com>
7782 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7784 * include/grub/kernel.h (grub_arch_memdisk_addr)
7785 (grub_arch_memdisk_size): Moved from here ...
7787 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7788 (grub_arch_memdisk_size): ... to here.
7790 2008-01-21 Robert Millan <rmh@aybabtu.com>
7792 Mostly based on bugfix from Bean.
7794 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7795 attribute with hook() parameter.
7796 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7798 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7799 attribute with hook() parameter.
7800 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7803 2008-01-21 Robert Millan <rmh@aybabtu.com>
7805 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7806 (pkglib_MODULES): Add `memdisk.mod'.
7807 (memdisk_mod_SOURCES): New variable.
7808 (memdisk_mod_CFLAGS): Likewise.
7809 (memdisk_mod_LDFLAGS): Likewise.
7811 * disk/memdisk.c: New file.
7813 * include/grub/disk.h (grub_disk_dev_id): Add
7814 `GRUB_DISK_DEVICE_MEMDISK_ID'.
7816 * include/grub/i386/pc/kernel.h
7817 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7818 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7819 (grub_kernel_image_size): New variable declaration.
7820 (grub_total_module_size): Likewise.
7821 (grub_memdisk_image_size): Likewise.
7823 * include/grub/i386/pc/memory.h
7824 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7826 * include/grub/kernel.h: Include `<grub/symbol.h>'.
7827 (grub_arch_memdisk_addr): New variable declaration.
7828 (grub_arch_memdisk_size): Likewise.
7830 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7831 (grub_arch_memdisk_size): Likewise.
7833 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7834 (codestart): Replace hardcoded `0x100000' with
7835 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7837 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7838 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
7839 not NULL, append the contents of the file it refers to, at the end of
7840 the compressed kernel image. Initialize `grub_memdisk_image_size'
7841 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7842 (options): Add "memdisk"|'m' option.
7843 (main): Parse --memdisk|-m option, and pass user-provided path as
7844 parameter to generate_image().
7846 2008-01-20 Robert Millan <rmh@aybabtu.com>
7848 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7849 grub_dprintf() calls from here ...
7850 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7852 2008-01-20 Robert Millan <rmh@aybabtu.com>
7854 Fix detection of "real mode" when /options/real-mode? doesn't exist.
7856 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7858 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7859 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7860 `GRUB_IEEE1275_FLAG_REAL_MODE'.
7861 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
7863 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7864 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7866 2008-01-19 Robert Millan <rmh@aybabtu.com>
7868 Get rid of confusing function (superseded by
7869 `grub_ieee1275_get_integer_property')
7870 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7872 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7874 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7875 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
7876 in native endianness from grub_ieee1275_get_integer_property().
7878 2008-01-19 Robert Millan <rmh@aybabtu.com>
7880 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7881 command after "shut-down", since implementations differ on which
7882 the command for halt is.
7884 2008-01-19 Robert Millan <rmh@aybabtu.com>
7886 * include/grub/i386/linuxbios/console.h: Add header protection.
7887 (grub_keyboard_controller_init): New function prototype.
7888 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7889 (KEYBOARD_COMMAND_READ): Likewise.
7890 (KEYBOARD_COMMAND_WRITE): Likewise.
7891 (KEYBOARD_SCANCODE_SET1): Likewise.
7892 (grub_keyboard_controller_write): New function.
7893 (grub_keyboard_controller_read): Likewise.
7894 (grub_keyboard_controller_init): Likewise.
7896 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7897 (grub_console_init): On coreboot/LinuxBIOS, call
7898 grub_keyboard_controller_init().
7900 2008-01-19 Robert Millan <rmh@aybabtu.com>
7902 PowerPC changes provided by Pavel Roskin.
7904 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7905 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7906 don't rely on cmain() doing it.
7907 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7908 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7910 2008-01-16 Robert Millan <rmh@aybabtu.com>
7912 * include/grub/i386/linuxbios/memory.h
7913 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7914 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7915 receive `table_header' as argument. Instead, probe for it in the
7916 known memory ranges where it can be present.
7917 (grub_available_iterate): Do not pass a fixed `table_header' address
7918 to grub_linuxbios_table_iterate().
7920 2008-01-15 Robert Millan <rmh@aybabtu.com>
7922 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7923 * conf/i386-ieee1275.rmk: New file.
7924 * include/grub/i386/ieee1275/console.h: Likewise.
7925 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7926 * include/grub/i386/ieee1275/kernel.h: Likewise.
7927 * include/grub/i386/ieee1275/time.h: Likewise.
7928 * kern/i386/ieee1275/init.c: Likewise.
7929 * kern/i386/ieee1275/startup.S: Likewise.
7931 2008-01-15 Robert Millan <rmh@aybabtu.com>
7933 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7934 when pointers are 32-bit (but still do set it to one when they are
7937 2008-01-15 Robert Millan <rmh@aybabtu.com>
7939 * include/grub/ieee1275/ieee1275.h
7940 (grub_ieee1275_get_integer_property): New function prototype.
7942 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7943 (grub_ieee1275_get_integer_property): New function. Wraps around
7944 grub_ieee1275_get_property() to handle endianness.
7946 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7947 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
7949 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7950 (grub_map): Likewise.
7951 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7953 2008-01-15 Bean <bean123ch@gmail.com>
7955 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7956 (grub_script_execute_cmdline): Reset grub_errno.
7958 * normal/main.c (read_config_file): Reset grub_errno.
7960 * normal/parse.y (script_init): New.
7961 (script): Move function and menuentry here.
7963 (command): Add delimiter at the end of command.
7964 (commands): Adjust to match the new command.
7965 (commandblock): Remove grub_script_lexer_record_start.
7966 (menuentry): Add grub_script_lexer_record_start, use the new commands.
7967 (if): Use the new commands.
7969 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7971 2008-01-15 Robert Millan <rmh@aybabtu.com>
7973 * normal/menu.c (run_menu): Move timeout message from here ...
7974 (print_timeout): ... to here.
7975 (run_menu): Use print_timeout() once during initial draw to print
7976 the whole message, and again in every clock tick to update only
7977 the number of seconds.
7979 2008-01-15 Robert Millan <rmh@aybabtu.com>
7981 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7982 actual size of `available' from grub_ieee1275_get_property(), and
7983 restrict parsing to that bound.
7985 2008-01-15 Christian Franke <franke@computer.org>
7987 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7988 (argp_program_version): Remove variable.
7989 (argp_program_bug_address): Likewise.
7990 (options): Convert from struct argp_option to struct option.
7991 (struct arguments): Remove.
7992 (parse_opt): Remove.
7993 (usage): New function.
7994 (main): Replace struct args members by simple variables.
7995 Replace argp_parse() by getopt_long().
7996 Add switch to evaluate options.
7997 Add missing "(...)" around root_dev in prefix string.
7999 2008-01-14 Robert Millan <rmh@aybabtu.com>
8001 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8002 for grub_ieee1275_exit(), in order to improve portability.
8004 2008-01-14 Robert Millan <rmh@aybabtu.com>
8006 * util/grub.d/10_linux.in (prefix): Define.
8007 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8009 2008-01-13 Pavel Roskin <proski@gnu.org>
8011 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8012 grub_errno if no errors have been detected.
8014 2008-01-12 Robert Millan <rmh@aybabtu.com>
8016 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8017 (grub_util_get_dev_abstraction): New function prototype.
8019 * util/getroot.c: Include `<grub/util/getroot.h>'
8020 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8021 (grub_util_get_dev_abstraction): ... here (new function).
8023 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8024 `PRINT_ABSTRACTION'.
8025 (probe): Probe for abstraction type when requested.
8026 (main): Understand `--target=abstraction'.
8028 * util/i386/efi/grub-install.in: Add abstraction module to core
8029 image when it is found to be necessary.
8030 * util/i386/pc/grub-install.in: Likewise.
8031 * util/powerpc/ieee1275/grub-install.in: Likewise.
8033 * util/update-grub_lib.in (font_path): Return system path without
8034 converting to GRUB path.
8035 * util/update-grub.in: Convert system path returned by font_path()
8036 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8037 abstraction module is needed for loading fonts (if any). Export
8038 that as `GRUB_PRELOAD_MODULES'.
8039 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8042 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8044 Remove some unused code from reiserfs.
8046 * fs/reiserfs.c (struct grub_reiserfs_key)
8047 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8048 (struct grub_reiserfs_node_body): Removed.
8049 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8051 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8053 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8055 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8057 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8059 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8061 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8062 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8063 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8065 2008-01-10 Robert Millan <rmh@aybabtu.com>
8067 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8068 Determines if a file is garbage left by packaging systems, etc.
8069 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8070 for processing /etc/grub.d scripts.
8071 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8072 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8073 as a condition for processing Linux images.
8075 2008-01-10 Pavel Roskin <proski@gnu.org>
8077 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8078 to compile reiserfs.c on PowerPC.
8080 2008-01-10 Robert Millan <rmh@aybabtu.com>
8082 * kern/device.c (grub_device_iterate): Do not abort device iteration
8083 when one of the devices cannot be opened.
8084 * kern/disk.c (grub_disk_open): Do not account previous failures of
8085 unrelated functions when grub_errno is checked for.
8087 2008-01-08 Robert Millan <rmh@aybabtu.com>
8089 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8090 `! grub_linux_is_bzimage', change order of address comparison to make
8091 it more intuitive, and improve "too big zImage" error message.
8093 2008-01-08 Robert Millan <rmh@aybabtu.com>
8095 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8096 `$(update-grub_DATA)'.
8097 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8100 2008-01-07 Robert Millan <rmh@aybabtu.com>
8102 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8103 which instruction is modified by grub-setup during installation
8104 (since it wasn't obvious by only looking at this file).
8106 2008-01-07 Robert Millan <rmh@aybabtu.com>
8108 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8109 listing actual TODO items.
8111 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8113 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8115 (grub_reiserfs_get_key_offset): Likewise.
8116 (grub_reiserfs_set_key_offset): Likewise.
8117 (grub_reiserfs_set_key_type): Likewise.
8118 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8120 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8121 better to remove the bitfield version completely.
8123 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8125 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8126 allocated from the heap, due to the fshelp implementation.
8127 (grub_reiserfs_dir): Free NODE, due to the same reason.
8129 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8131 Mostly from Vincent Pelletier:
8133 * fs/reiserfs.c: New file.
8135 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8136 (reiserfs_mod_SOURCES): New variable.
8137 (reiserfs_mod_CFLAGS): Likewise.
8138 (reiserfs_mod_LDFLAGS): Likewise.
8140 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8141 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8142 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8145 2008-01-06 Robert Millan <rmh@aybabtu.com>
8147 * normal/color.c: Remove `<grub/env.h>'.
8149 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8151 * include/grub/normal.h: Include <grub/env.h>.
8153 2008-01-05 Robert Millan <rmh@aybabtu.com>
8155 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8156 usage example with `(hd0,1)'.
8157 Reported by Samuel Thibault.
8159 2008-01-05 Robert Millan <rmh@aybabtu.com>
8161 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8162 (grub_linux_boot_zimage): Rename to ...
8163 (grub_linux_boot): ... this.
8164 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8165 (grub_linux_boot_zimage): Conditionalize zImage copy.
8167 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8168 (grub_linux_boot_bzimage): Remove prototype.
8169 (grub_linux_boot_zimage): Rename to ...
8170 (grub_linux_boot): ... this.
8172 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8173 (grub_linux_boot): Remove function.
8175 2008-01-05 Robert Millan <rmh@aybabtu.com>
8177 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8178 (grub_env_write_color_highlight): Likewise.
8179 (grub_wait_after_message): Likewise.
8181 * normal/color.c: New file.
8183 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8184 (normal_mod_DEPENDENCIES): Likewise.
8186 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8187 (normal_mod_DEPENDENCIES): Likewise.
8189 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8190 (normal_mod_DEPENDENCIES): Likewise.
8192 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8193 (normal_mod_DEPENDENCIES): Likewise.
8195 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8196 for waiting after a message is printed.
8197 * normal/main.c (read_config_file): Likewise.
8198 (grub_normal_init): Register grub_env_write_color_normal() and
8199 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8200 `color_highlight' variables as global.
8202 * normal/menu.c (grub_wait_after_message): New function.
8203 (grub_color_menu_normal): New variable. Replaces ...
8204 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8205 (grub_color_menu_highlight): New variable. Replaces ...
8206 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8207 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8208 `GRUB_TERM_COLOR_STANDARD'.
8209 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8210 `normal_code' and `highlight_code' to `old_color_normal' and
8211 `old_color_highlight', respectively.
8212 (grub_menu_init_page): Update colors when drawing the menu, based on
8213 `menu_color_normal' and `menu_color_highlight' variables.
8214 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8215 a message is printed.
8217 2008-01-05 Robert Millan <rmh@aybabtu.com>
8219 * kern/env.c (grub_env_context_open): Propagate hooks for global
8220 variables to new context.
8222 * kern/main.c (grub_set_root_dev): Export `root' variable.
8224 2008-01-05 Robert Millan <rmh@aybabtu.com>
8226 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8227 discs unconditionally, since udev and others have options to provide
8230 2008-01-05 Robert Millan <rmh@aybabtu.com>
8232 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8234 2008-01-04 Christian Franke <franke@computer.org>
8236 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8239 2008-01-03 Pavel Roskin <proski@gnu.org>
8241 * kern/i386/linuxbios/init.c: Put "void" to all function
8242 declarations with no arguments.
8243 * kern/powerpc/ieee1275/init.c: Likewise.
8244 * term/i386/pc/at_keyboard.c: Likewise.
8245 * term/i386/pc/vga_text.c: Likewise.
8246 * util/grub-mkdevicemap.c: Likewise.
8248 2008-01-02 Robert Millan <rmh@aybabtu.com>
8250 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8251 message when loaded image is out of bounds.
8252 (grub_multiboot_load_elf64): Likewise.
8254 2008-01-02 Pavel Roskin <proski@gnu.org>
8256 * util/grub.d/10_linux.in: Try version without ".old" when
8257 looking for initrd. It's better to use initrd from the newer
8258 kernel of the same version than no initrd at all.
8260 2008-01-01 Robert Millan <rmh@aybabtu.com>
8262 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8264 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8266 * include/grub/video.h: Added grub_video_unmap_color and
8267 grub_video_get_active_render_target.
8268 (grub_video_adapter): Added unmap_color and get_active_render_target.
8270 * video/video.c: Added grub_video_unmap_color and
8271 grub_video_get_active_render_target.
8272 (grub_video_get_info): Changed method to accept NULL pointer as an
8273 argument to allow detection of active video adapter.
8275 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8276 grub_video_vbe_unmap_color_int.
8277 Added grub_video_vbe_unmap_color and
8278 grub_video_vbe_get_active_render_target.
8279 (grub_video_vbe_adapter): Added unmap_color and
8280 get_active_render_target.
8282 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8283 with grub_video_vbe_unmap_color_int.
8285 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8286 (DEFAULT_NORMAL_COLOR): Likewise.
8287 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8288 (DEFAULT_FG_COLOR): Removed.
8289 (DEFAULT_BG_COLOR): Likewise.
8290 (DEFAULT_CURSOR_COLOR): Changed value.
8291 (grub_virtual_screen): Added standard_color_setting,
8292 normal_color_setting, highlight_color_setting and term_color.
8293 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8294 (bitmap_width): Added.
8295 (bitmap_height): Likewise.
8297 (set_term_color): Likewise.
8298 (grub_virtual_screen_setup): Changed to use new terminal coloring
8300 (grub_gfxterm_init): Added init for bitmap.
8301 (grub_gfxterm_fini): Added destroy for bitmap.
8302 (redraw_screen_rect): Updated to use background bitmap and new
8304 (scroll_up): Added optimization for case when there is no bitmap.
8305 (grub_gfxterm_cls): Fixed to use correct background color.
8306 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8308 (grub_virtual_screen_setcolor): Likewise.
8309 (grub_virtual_screen_getcolor): Added.
8310 (grub_gfxterm_background_image_cmd): Likewise.
8311 (grub_video_term): Added setcolor and getcolor.
8312 (MOD_INIT): Added registration of background_image command.
8313 (MOD_TERM): Added unregistration for background_image command.
8315 2007-12-30 Pavel Roskin <proski@gnu.org>
8317 * loader/multiboot_loader.c: Fix multiboot command
8318 unregistration. Fix all typos in the word "multiboot".
8320 2007-12-29 Pavel Roskin <proski@gnu.org>
8322 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8323 support for initrd names used in Fedora.
8325 2007-12-26 Bean <bean123ch@gmail.com>
8327 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8328 (cpio_mod_SOURCES): New variable.
8329 (cpio_mod_CFLAGS): Likewise.
8330 (cpio_mod_LDFLAGS): Likewise.
8332 * fs/cpio.c: New file.
8334 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8336 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8338 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8340 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8342 2007-12-25 Robert Millan <rmh@aybabtu.com>
8344 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8345 (grub_getcolor): New function.
8347 * kern/term.c (grub_getcolor): New function.
8348 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8349 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8350 (print_entry): Set normal and highlight colors to
8351 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8352 respectively, before printing and restore them to old
8354 (grub_menu_init_page): Likewise. Fill an additional colored space
8355 that would otherwise be left blank.
8357 * term/efi/console.c (grub_console_getcolor): New function.
8358 (struct grub_console_term.getcolor): New variable.
8359 * term/i386/pc/console.c (grub_console_getcolor): New function.
8360 (struct grub_console_term.getcolor): New variable.
8361 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8362 (struct grub_console_term.getcolor): New variable.
8364 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8365 (struct grub_console_term.setcolor): Remove variable.
8366 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8367 (struct grub_console_term.setcolor): Remove variable.
8368 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8369 (struct grub_console_term.setcolor): Remove variable.
8370 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8371 (struct grub_console_term.setcolor): Remove variable.
8373 2007-12-25 Robert Millan <rmh@aybabtu.com>
8375 * configure.ac: Search for possible unifont.hex locations, and
8376 define UNIFONT_HEX if found.
8378 * Makefile.in (UNIFONT_HEX): Define variable.
8379 (DATA): Rename to ...
8380 (PKGLIB): ... this. Update all users.
8381 (PKGDATA): New variable.
8382 (pkgdata_IMAGES): Rename to ...
8383 (pkglib_IMAGES): ... this. Update all users.
8384 (pkgdata_MODULES): Rename to ...
8385 (pkglib_MODULES): ... this. Update all users.
8386 (pkgdata_PROGRAMS): Rename to ...
8387 (pkglib_PROGRAMS): ... this. Update all users.
8388 (pkgdata_DATA): Rename to ...
8389 (pkglib_DATA): ... this. Update all users.
8390 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8391 (unicode.pff, ascii.pff): New rules.
8392 (all-local): Add `$(PKGDATA)' dependency.
8393 (install-local): Process `$(PKGDATA)'.
8395 * util/update-grub_lib.in (font_path): Search for *.pff files in
8396 a few more locations, including `${pkgdata}'.
8398 2007-12-23 Robert Millan <rmh@aybabtu.com>
8400 Patch from Bean <bean123ch@gmail.com>:
8401 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8404 2007-12-21 Bean <bean123ch@gmail.com>
8406 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8407 (ntfscomp_mod_SOURCES): New variable.
8408 (ntfscomp_mod_CFLAGS): Likewise.
8409 (ntfscomp_mod_LDFLAGS): Likewise.
8411 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8412 (grub_probe_SOURCES): Likewise.
8413 (grub_emu_SOURCES): Likewise.
8415 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8416 (grub_emu_SOURCES): Likewise.
8418 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8419 (grub_emu_SOURCES): Likewise.
8421 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8422 (grub_emu_SOURCES): Likewise.
8424 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8425 (read_run_list): Renamed to grub_ntfs_read_run_list.
8426 (decomp_nextvcn): Moved to ntfscomp.c.
8427 (decomp_getch): Likewise.
8428 (decomp_get16): Likewise.
8429 (decomp_block): Likewise.
8430 (read_block): Likewise.
8431 (read_data): Partially moved to ntfscomp.c.
8432 (fixup): Change unsigned to grub_uint16_t.
8433 (read_mft): Change unsigned long to grub_uint32_t.
8434 (read_attr): Likewise.
8435 (read_data): Likewise.
8436 (read_run_data): Likewise.
8437 (read_run_list): Likewise.
8438 (read_mft): Likewise.
8440 * fs/ntfscomp.c: New file.
8442 * include/grub/ntfs.h: New file.
8444 2007-12-16 Robert Millan <rmh@aybabtu.com>
8446 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8447 IDE disk check, since Linux is known to support 20 IDE disks.
8448 Reported by Colin Watson.
8450 2007-12-15 Bean <bean123ch@gmail.com>
8452 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8453 (lnxboot_img_SOURCES): New variable.
8454 (lnxboot_img_ASFLAGS): Likewise.
8455 (lnxboot_img_LDFLAGS): Likewise.
8457 * boot/i386/pc/lnxboot.S: New file.
8459 2007-11-24 Pavel Roskin <proski@gnu.org>
8461 * configure.ac: Test if '--build-id=none' is supported by the
8462 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8463 objcopy to generate incorrect binary files (binutils
8464 2.17.50.0.18-1 as shipped by Fedora 8).
8465 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8466 linking, so that build ID doesn't break the test.
8468 2007-11-24 Pavel Roskin <proski@gnu.org>
8470 * include/grub/i386/time.h: use "void" in the argument list
8472 * include/grub/powerpc/time.h: Likewise.
8473 * include/grub/sparc64/time.h: Likewise.
8475 2007-11-18 Christian Franke <franke@computer.org>
8477 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8478 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8479 This fixes the problem that function keys did not work in grub-emu.
8481 2007-11-18 Christian Franke <franke@computer.org>
8483 * disk/host.c (grub_host_open): Remove attribute unused from
8484 name parameter. Add check for "host". This fixes the problem
8485 that grub-emu does not find partitions.
8487 2007-11-18 Christian Franke <franke@computer.org>
8489 * util/hostfs.c (is_dir): New function.
8490 (grub_hostfs_dir): Handle missing dirent.d_type case.
8491 (grub_hostfs_read): Add missing fseek().
8492 (grub_hostfs_label): Clear label pointer. This fixes a crash
8493 of grub-emu on "ls (host)".
8495 2007-11-18 Christian Franke <franke@computer.org>
8497 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8498 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8499 to 64 bit boundary by default.
8501 2007-11-18 Bean <bean123ch@gmail.com>
8503 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8504 (hexdump_mod_SOURCES): New variable.
8505 (hexdump_mod_CFLAGS): Likewise.
8506 (hexdump_mod_LDFLAGS): Likewise.
8508 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8510 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8512 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8514 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8516 * include/grub/hexdump.h: New file.
8518 * commands/hexdump.c: New file.
8520 2007-11-10 Robert Millan <rmh@aybabtu.com>
8522 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8523 in grub_outb() calls.
8524 (beep_on): Likewise.
8526 2007-11-10 Christian Franke <franke@computer.org>
8528 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8529 (grub_menu_run): Likewise.
8531 2007-11-10 Robert Millan <rmh@aybabtu.com>
8533 * include/grub/i386/efi/machine.h: New file.
8534 * include/grub/i386/linuxbios/machine.h: Likewise.
8535 * include/grub/i386/pc/machine.h: Likewise.
8536 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8537 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8539 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8540 (serial_hw_io_addr): New variable.
8541 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8542 instead of `(unsigned short *) 0x400'.
8544 2007-11-10 Bean <bean123ch@gmail.com>
8546 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8548 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8550 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8551 (vga_mod_SOURCES): Added.
8552 (vga_mod_CFLAGS): Likewise.
8553 (vga_mod_LDFLAGS): Likewise.
8555 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8557 (set_map_mask): Likewise.
8558 (set_read_map): Likewise.
8559 (set_read_address): Likewise.
8560 (vga_font): Removed variable.
8561 (get_vga_glyph): Removed function.
8562 (invalidate_char): Likewise.
8563 (write_char): Changed to use grub_font_get_glyph() for font
8565 (grub_vga_putchar): Likewise.
8566 (grub_vga_getcharwidth): Likewise.
8568 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8570 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8572 (pxeboot_img_LDFLAGS): Likewise.
8573 (diskboot_img_LDFLAGS): Likewise.
8574 (kernel_img_LDFLAGS): Likewise.
8576 2007-11-06 Robert Millan <rmh@aybabtu.com>
8578 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8579 in grub_outb() calls.
8580 (serial_hw_init): Likewise.
8582 2007-11-05 Robert Millan <rmh@aybabtu.com>
8584 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8585 spaces. Skip non-regular files.
8587 2007-11-05 Robert Millan <rmh@aybabtu.com>
8589 * kern/disk.c (grub_disk_firmware_fini)
8590 (grub_disk_firmware_is_tainted): New variables.
8592 * include/grub/disk.h (grub_disk_firmware_fini)
8593 (grub_disk_firmware_is_tainted): Likewise.
8595 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8596 (grub_disk_biosdisk_fini): ... to here.
8597 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8598 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8599 is set. Register grub_disk_biosdisk_fini() in
8600 `grub_disk_firmware_fini'.
8602 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8603 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8604 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8605 to finish existing firmware disk interface.
8607 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8608 (ata_mod_SOURCES): New variable.
8609 (ata_mod_CFLAGS): Likewise.
8610 (ata_mod_LDFLAGS): Likewise.
8612 2007-11-05 Robert Millan <rmh@aybabtu.com>
8614 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8615 (grub_ata_wait): Reimplement using grub_millisleep().
8617 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8618 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8620 2007-11-03 Marco Gerards <marco@gnu.org>
8622 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8623 (CRTC_ADDR_PORT): New macro.
8624 (CRTC_DATA_PORT): Likewise.
8625 (CRTC_CURSOR): Likewise.
8626 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8627 (CRTC_CURSOR_ADDR_LOW): Likewise.
8628 (update_cursor): New function.
8629 (grub_console_real_putchar): Call `update_cursor'.
8630 (grub_console_gotoxy): Likewise.
8631 (grub_console_cls): Set the default color when clearing the
8633 (grub_console_setcursor): Implemented.
8635 2007-11-03 Marco Gerards <marco@gnu.org>
8637 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8639 (grub_ata_pio_write): Likewise.
8641 (grub_atapi_identify): Wait after issuing an ATA command.
8642 (grub_atapi_packet): Likewise.
8643 (grub_ata_identify): Likewise.
8644 (grub_ata_readwrite): Likewise.
8646 2007-11-03 Marco Gerards <marco@gnu.org>
8648 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8649 (grub_ata_pio_write): Likewise.
8650 (grub_ata_readwrite): Use `grub_error', instead of
8651 returning `grub_errno'.
8653 2007-11-03 Marco Gerards <marco@gnu.org>
8655 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8656 grub_ata_pio_write once for every single sector, instead of for
8659 2007-10-31 Robert Millan <rmh@aybabtu.com>
8661 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8663 * conf/i386-linuxbios.rmk: New file.
8665 * kern/i386/pc/hardware.c: Likewise.
8666 * term/i386/pc/at_keyboard.c: Likewise.
8667 * term/i386/pc/vga_text.c: Likewise.
8669 * include/grub/i386/linuxbios/boot.h: Likewise.
8670 * include/grub/i386/linuxbios/console.h: Likewise.
8671 * include/grub/i386/linuxbios/init.h: Likewise.
8672 * include/grub/i386/linuxbios/kernel.h: Likewise.
8673 * include/grub/i386/linuxbios/loader.h: Likewise.
8674 * include/grub/i386/linuxbios/memory.h: Likewise.
8675 * include/grub/i386/linuxbios/serial.h: Likewise.
8676 * include/grub/i386/linuxbios/time.h: Likewise.
8678 * kern/i386/linuxbios/init.c: Likewise.
8679 * kern/i386/linuxbios/startup.S: Likewise.
8680 * kern/i386/linuxbios/table.c: Likewise.
8682 2007-10-31 Marco Gerards <marco@gnu.org>
8684 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8685 (ata_mod_SOURCES): New variable.
8686 (ata_mod_CFLAGS): Likewise.
8687 (ata_mod_LDFLAGS): Likewise.
8689 * disk/ata.c: New file.
8691 * include/grub/disk.h (grub_disk_dev_id): Add
8692 `GRUB_DISK_DEV_ATA_ID'.
8694 2007-10-31 Robert Millan <rmh@aybabtu.com>
8696 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8697 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8699 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8700 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8702 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8705 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8707 2007-10-27 Robert Millan <rmh@aybabtu.com>
8709 * include/grub/types.h (ULONG_MAX): Define macro.
8711 2007-10-22 Robert Millan <rmh@aybabtu.com>
8713 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8715 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8717 2007-10-22 Robert Millan <rmh@aybabtu.com>
8719 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8720 (pkgdata_MODULES): Add `biosdisk.mod'.
8721 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8724 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8725 (grub_biosdisk_init): Replace with ...
8726 (GRUB_MOD_INIT(biosdisk)): ... this.
8727 (grub_biosdisk_fini): Replace with ...
8728 (GRUB_MOD_FINI(biosdisk)): ... this.
8730 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8731 (grub_machine_init): Remove call to grub_biosdisk_init().
8732 (grub_machine_fini): Remove call to grub_machine_fini().
8734 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8736 2007-10-22 Robert Millan <rmh@aybabtu.com>
8738 * include/grub/time.h: New file.
8739 * include/grub/i386/time.h: Likewise.
8740 * include/grub/powerpc/time.h: Likewise.
8741 * include/grub/sparc64/time.h: Likewise.
8743 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8745 (KERNEL_MACHINE_TIME_HEADER): ... this.
8746 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8748 (KERNEL_MACHINE_TIME_HEADER): ... this.
8749 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8751 (KERNEL_MACHINE_TIME_HEADER): ... this.
8753 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8754 (grub_millisleep): New function.
8755 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8756 (grub_millisleep): New function.
8757 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8758 Remove `grub/machine/time.h' include.
8759 (grub_millisleep): New function.
8760 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8761 Remove `grub/machine/time.h' include.
8762 (grub_millisleep): New function.
8764 * include/grub/misc.h (grub_div_roundup): New function.
8766 * kern/misc.c: Include `<grub/time.h>'.
8767 (grub_millisleep_generic): New function.
8769 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8771 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8773 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8774 `machine/time.h'. Add `time.h'.
8775 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8777 2007-10-21 Robert Millan <rmh@aybabtu.com>
8779 * include/grub/misc.h (grub_max): New function.
8781 2007-10-21 Robert Millan <rmh@aybabtu.com>
8783 * util/misc.c (grub_util_info): Call fflush() before returning.
8785 2007-10-20 Robert Millan <rmh@aybabtu.com>
8787 * genmk.rb (Image): Copy `extra_flags' from here ...
8788 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8790 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8791 to `argc' and `args' arguments.
8793 2007-10-17 Robert Millan <rmh@aybabtu.com>
8795 * kern/i386/loader.S: New file.
8797 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8798 * kern/i386/loader.S (grub_linux_prot_size)... to here.
8799 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8800 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8801 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8802 * kern/i386/loader.S (grub_linux_real_addr)... to here.
8803 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8804 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8805 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8806 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8807 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8808 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8809 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8810 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8812 * kern/i386/realmode.S: New file.
8814 * kern/i386/pc/startup.S (protstack): Moved from here ...
8815 * kern/i386/realmode.S (protstack)... to here.
8816 * kern/i386/pc/startup.S (gdt): Moved from here ...
8817 * kern/i386/realmode.S (gdt)... to here.
8818 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8819 * kern/i386/realmode.S (prot_to_real)... to here.
8821 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8822 `kern/i386/realmode.S'.
8824 2007-10-17 Robert Millan <rmh@aybabtu.com>
8826 * include/grub/i386/loader.h: New file.
8828 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8829 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8830 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8831 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8832 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8833 * include/grub/i386/loader.h (grub_linux_prot_size)
8834 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8835 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8836 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8837 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8839 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8841 2007-10-15 Robert Millan <rmh@aybabtu.com>
8843 * normal/misc.c (grub_normal_print_device_info): Do not probe for
8844 filesystem when dev->disk is unset.
8845 Do probe for filesystem even when dev->disk->has_partitions is set.
8846 In case a filesystem is found, always report it.
8847 In case it isn't, if dev->disk->has_partitions is set, report that
8848 a partition table was found instead of reporting that no filesystem
8849 could be identified.
8851 2007-10-12 Robert Millan <rmh@aybabtu.com>
8853 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8854 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8856 * include/grub/types.h (grub_host_to_target16): New macro.
8857 (grub_host_to_target32): Likewise.
8858 (grub_host_to_target64): Likewise.
8859 (grub_target_to_host16): Likewise.
8860 (grub_target_to_host32): Likewise.
8861 (grub_target_to_host64): Likewise.
8863 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8865 (GRUB_MOD_ALIGN): ...this. Update all users.
8867 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8868 grub_host_to_target32.
8869 Replace grub_be_to_cpu32 with grub_target_to_host32.
8870 (load_modules): Likewise.
8871 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8872 Replace grub_be_to_cpu32 with grub_target_to_host32.
8873 Replace grub_cpu_to_be16 with grub_host_to_target16.
8874 Replace grub_cpu_to_be32 grub_host_to_target32.
8876 2007-10-12 Robert Millan <rmh@aybabtu.com>
8878 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8879 * util/elf/grub-mkimage.c: ... here.
8881 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8882 `util/powerpc/ieee1275/grub-mkimage.c'.
8884 2007-10-07 Robert Millan <rmh@aybabtu.com>
8886 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8887 and make it easier to figure out.
8888 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8889 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8890 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8891 leave us with less than HEAP_MIN_SIZE total heap.
8892 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
8894 2007-10-03 Robert Millan <rmh@aybabtu.com>
8896 * include/grub/i386/io.h: New file.
8897 * commands/i386/pc/play.c (inb): Removed.
8899 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8901 * term/i386/pc/serial.c (inb): Removed.
8903 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8905 * term/i386/pc/vga.c (inb): Removed.
8907 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8910 2007-10-02 Robert Millan <rmh@aybabtu.com>
8912 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8914 Reported by Marcin Kurek.
8916 2007-09-07 Robert Millan <rmh@aybabtu.com>
8918 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8919 SmartFirmware version updates (as released by Sven Luther), and avoid
8920 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8921 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8924 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8927 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8928 when merging two regions.
8930 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8932 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8933 * normal/completion.c (grub_normal_do_completion): Likewise.
8934 Reported by Hitoshi Ozeki.
8936 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8938 Do not use devices at boot in chainloading.
8940 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8941 (boot_part_addr): Likewise.
8942 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8943 with BOOT_DRIVE and BOOT_PART_ADDR.
8944 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8945 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8947 2007-08-29 Robert Millan <rmh@aybabtu.com>
8949 Patch from Simon Peter <dn.tlp@gmx.net>:
8950 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8951 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8952 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8953 util/i386/pc/grub-setup.c_DEPENDENCIES.
8954 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8955 util/grub-probe.c_DEPENDENCIES.
8956 * conf/powerpc-ieee1275.rmk: Likewise.
8958 2007-08-28 Robert Millan <rmh@aybabtu.com>
8960 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8961 to tell grub-mkdevicemap how to name devices.
8962 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8965 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8966 util/i386/get_disk_name.c.
8967 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8968 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8969 util/ieee1275/get_disk_name.c.
8971 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8973 * DISTLIST: Add util/i386/get_disk_name.c and
8974 util/ieee1275/get_disk_name.c.
8976 * util/grub-mkdevicemap.c: Replace device naming logic with
8977 grub_util_get_disk_name() calls.
8979 2007-08-20 Robert Millan <rmh@aybabtu.com>
8981 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8982 (so that it works for both plural and singular quantities).
8984 2007-08-05 Robert Millan <rmh@aybabtu.com>
8986 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8987 so that [xz] isn't taken into account when determining order.
8989 2007-08-02 Marco Gerards <marco@gnu.org>
8991 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8992 `include/multiboot2.h', `include/grub/elfload.h',
8993 `include/multiboot.h', `include/grub/multiboot.h',
8994 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8995 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8996 `kern/elf.c', `loader/multiboot_loader.c',
8997 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8998 `loader/i386/pc/multiboot2.c',
8999 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9000 `util/i386/pc/grub-mkrescue.in'. Remove
9001 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9002 `include/grub/i386/pc/util/biosdisk.h' and
9003 `include/grub/powerpc/ieee1275/multiboot.h'.
9005 2007-08-02 Bean <bean123ch@gmail.com>
9007 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9008 (ntfs_mod_SOURCES): New variable.
9009 (ntfs_mod_CFLAGS): Likewise.
9010 (ntfs_mod_LDFLAGS): Likewise.
9012 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9013 (grub_probe_SOURCES): Likewise.
9014 (grub_emu_SOURCES): Likewise.
9016 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9017 (grub_emu_SOURCES): Likewise.
9019 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9020 (grub_emu_SOURCES): Likewise.
9022 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9024 * fs/ntfs.c: New file.
9026 2007-08-02 Bean <bean123ch@gmail.com>
9028 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9030 * file.h (grub_file): Likewise.
9032 * fshelp.h (grub_fshelp_read_file): Likewise.
9034 * util/i386/pc/grub-setup.c (setup): Likewise.
9035 (save_first_sector): Likewise.
9036 (save_blocklists): Likewise.
9038 * fs/affs.c (grub_affs_read_file): Likewise.
9040 * fs/ext2.c (grub_ext2_read_file): Likewise.
9042 * fs/fat.c (grub_fat_read_data): Likewise.
9044 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9046 * fs/hfs.c (grub_hfs_read_file): Likewise.
9048 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9050 * fs/jfs.c (grub_jfs_read_file): Likewise.
9052 * fs/minix.c (grub_minix_read_file): Likewise.
9054 * fs/sfs.c (grub_sfs_read_file): Likewise.
9056 * fs/ufs.c (grub_ufs_read_file): Likewise.
9058 * fs/xfs.c (grub_xfs_read_file): Likewise.
9060 * command/blocklist.c (read_blocklist): Likewise.
9061 (print_blocklist): Likewise.
9063 2007-08-02 Marco Gerards <marco@gnu.org>
9065 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9068 * disk/host.c: New file.
9070 * util/hostfs.c: Likewise.
9072 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9073 return `GRUB_ERR_BAD_FS'.
9074 * fs/sfs.c (grub_sfs_mount): Likewise.
9075 * fs/xfs.c (grub_xfs_mount): Likewise.
9077 * include/grub/disk.h (enum grub_disk_dev_id): Add
9078 `GRUB_DISK_DEVICE_HOST_ID'.
9080 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9082 2007-07-24 Jerone Young <jerone@gmail.com>
9084 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9085 modules for compilation.
9086 * conf/powerpc-ieee1275.rmk: Likewise.
9088 * include/multiboot.h: Move multiboot definitions to one file. Rename
9089 many definitions to not get grub specific.
9090 * include/multiboot2.h: Create header with multiboot 2 definitions.
9091 * include/grub/multiboot.h: Header for grub specific function
9092 prototypes and definitions.
9093 * include/grub/multiboot2.h: Likewise.
9094 * include/grub/multiboot_loader.h: Likewise.
9095 * include/grub/i386/pc/multiboot.h: Removed.
9096 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9098 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9099 and 2 to allow for one multiboot and module commands.
9100 * loader/multiboot2.c: Add multiboot2 functionality.
9101 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9102 and definition names.
9103 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9105 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9106 ieee1275 specific multiboot2 code.
9108 * kern/i386/pc/startup.S: Change headers and definition names for
9109 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9111 2007-07-22 Robert Millan <rmh@aybabtu.com>
9113 * geninitheader.sh: Process file specified in first parameter rather
9114 than hardcoding grub_modules_init.lst.
9115 * geninit.sh: Likewise. Also, construct header name dynamically rather
9116 than hardcoding grub_modules_init.h.
9118 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9119 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9120 grub_probe_init.[ch] and grub_setup_init.[ch].
9122 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9123 grub_modules_init.h with grub_emu_init.h.
9124 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9125 grub_probe_init.[ch] files.
9126 * conf/i386-efi.rmk: Likewise.
9127 * conf/i386-pc.rmk: Likewise.
9128 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9129 grub_setup_init.[ch] files.
9131 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9132 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9133 to initialize modules rather than a list of hardcoded functions.
9134 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9135 grub_init_all() to initialize modules rather than a list of hardcoded
9138 2007-07-22 Robert Millan <rmh@aybabtu.com>
9140 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9141 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9143 2007-07-22 Robert Millan <rmh@aybabtu.com>
9145 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9146 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9147 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9148 flag when running on SmartFirmware.
9149 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9150 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9153 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9154 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9155 rather than decreasing it.
9157 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9158 there's not enough space to do it, fail in the same way as when it
9159 can't be done because there are no partitions.
9161 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9162 when nvsetenv failed.
9164 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9166 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9167 because this rule is automatically generated.
9168 (grub-mkrescue): Removed for the same reason as above.
9170 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9172 Migrate to GNU General Public License Version 3.
9174 * COPYING: Replaced with the plain text version of GPLv3.
9176 * config.guess: Updated from gnulib.
9177 * config.sub: Likewise.
9179 * geninit.sh: Output a GPLv3 copyright notice.
9180 * geninitheader.sh: Likewise.
9181 * genmodsrc.sh: Likewise.
9182 * gensymlist.sh.in: Likewise.
9184 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9185 * boot/i386/pc/diskboot.S: Likewise.
9186 * boot/i386/pc/pxeboot.S: Likewise.
9187 * commands/blocklist.c: Likewise.
9188 * commands/boot.c: Likewise.
9189 * commands/cat.c: Likewise.
9190 * commands/cmp.c: Likewise.
9191 * commands/configfile.c: Likewise.
9192 * commands/echo.c: Likewise.
9193 * commands/help.c: Likewise.
9194 * commands/ls.c: Likewise.
9195 * commands/search.c: Likewise.
9196 * commands/terminal.c: Likewise.
9197 * commands/test.c: Likewise.
9198 * commands/videotest.c: Likewise.
9199 * commands/i386/cpuid.c: Likewise.
9200 * commands/i386/pc/halt.c: Likewise.
9201 * commands/i386/pc/play.c: Likewise.
9202 * commands/i386/pc/reboot.c: Likewise.
9203 * commands/i386/pc/vbeinfo.c: Likewise.
9204 * commands/i386/pc/vbetest.c: Likewise.
9205 * commands/ieee1275/halt.c: Likewise.
9206 * commands/ieee1275/reboot.c: Likewise.
9207 * commands/ieee1275/suspend.c: Likewise.
9208 * disk/loopback.c: Likewise.
9209 * disk/lvm.c: Likewise.
9210 * disk/raid.c: Likewise.
9211 * disk/efi/efidisk.c: Likewise.
9212 * disk/i386/pc/biosdisk.c: Likewise.
9213 * disk/ieee1275/ofdisk.c: Likewise.
9214 * font/manager.c: Likewise.
9215 * fs/affs.c: Likewise.
9216 * fs/ext2.c: Likewise.
9217 * fs/fat.c: Likewise.
9218 * fs/fshelp.c: Likewise.
9219 * fs/hfs.c: Likewise.
9220 * fs/hfsplus.c: Likewise.
9221 * fs/iso9660.c: Likewise.
9222 * fs/jfs.c: Likewise.
9223 * fs/minix.c: Likewise.
9224 * fs/sfs.c: Likewise.
9225 * fs/ufs.c: Likewise.
9226 * fs/xfs.c: Likewise.
9227 * hello/hello.c: Likewise.
9228 * include/grub/acorn_filecore.h: Likewise.
9229 * include/grub/arg.h: Likewise.
9230 * include/grub/bitmap.h: Likewise.
9231 * include/grub/boot.h: Likewise.
9232 * include/grub/cache.h: Likewise.
9233 * include/grub/device.h: Likewise.
9234 * include/grub/disk.h: Likewise.
9235 * include/grub/dl.h: Likewise.
9236 * include/grub/elfload.h: Likewise.
9237 * include/grub/env.h: Likewise.
9238 * include/grub/err.h: Likewise.
9239 * include/grub/file.h: Likewise.
9240 * include/grub/font.h: Likewise.
9241 * include/grub/fs.h: Likewise.
9242 * include/grub/fshelp.h: Likewise.
9243 * include/grub/gzio.h: Likewise.
9244 * include/grub/hfs.h: Likewise.
9245 * include/grub/kernel.h: Likewise.
9246 * include/grub/loader.h: Likewise.
9247 * include/grub/lvm.h: Likewise.
9248 * include/grub/misc.h: Likewise.
9249 * include/grub/mm.h: Likewise.
9250 * include/grub/net.h: Likewise.
9251 * include/grub/normal.h: Likewise.
9252 * include/grub/parser.h: Likewise.
9253 * include/grub/partition.h: Likewise.
9254 * include/grub/pc_partition.h: Likewise.
9255 * include/grub/raid.h: Likewise.
9256 * include/grub/rescue.h: Likewise.
9257 * include/grub/script.h: Likewise.
9258 * include/grub/setjmp.h: Likewise.
9259 * include/grub/symbol.h: Likewise.
9260 * include/grub/term.h: Likewise.
9261 * include/grub/terminfo.h: Likewise.
9262 * include/grub/tparm.h: Likewise.
9263 * include/grub/types.h: Likewise.
9264 * include/grub/video.h: Likewise.
9265 * include/grub/efi/api.h: Likewise.
9266 * include/grub/efi/chainloader.h: Likewise.
9267 * include/grub/efi/console.h: Likewise.
9268 * include/grub/efi/console_control.h: Likewise.
9269 * include/grub/efi/disk.h: Likewise.
9270 * include/grub/efi/efi.h: Likewise.
9271 * include/grub/efi/pe32.h: Likewise.
9272 * include/grub/efi/time.h: Likewise.
9273 * include/grub/i386/linux.h: Likewise.
9274 * include/grub/i386/setjmp.h: Likewise.
9275 * include/grub/i386/types.h: Likewise.
9276 * include/grub/i386/efi/kernel.h: Likewise.
9277 * include/grub/i386/efi/loader.h: Likewise.
9278 * include/grub/i386/efi/time.h: Likewise.
9279 * include/grub/i386/pc/biosdisk.h: Likewise.
9280 * include/grub/i386/pc/boot.h: Likewise.
9281 * include/grub/i386/pc/chainloader.h: Likewise.
9282 * include/grub/i386/pc/console.h: Likewise.
9283 * include/grub/i386/pc/init.h: Likewise.
9284 * include/grub/i386/pc/kernel.h: Likewise.
9285 * include/grub/i386/pc/loader.h: Likewise.
9286 * include/grub/i386/pc/memory.h: Likewise.
9287 * include/grub/i386/pc/multiboot.h: Likewise.
9288 * include/grub/i386/pc/serial.h: Likewise.
9289 * include/grub/i386/pc/time.h: Likewise.
9290 * include/grub/i386/pc/vbe.h: Likewise.
9291 * include/grub/i386/pc/vbeblit.h: Likewise.
9292 * include/grub/i386/pc/vbefill.h: Likewise.
9293 * include/grub/i386/pc/vbeutil.h: Likewise.
9294 * include/grub/i386/pc/vga.h: Likewise.
9295 * include/grub/ieee1275/ieee1275.h: Likewise.
9296 * include/grub/ieee1275/ofdisk.h: Likewise.
9297 * include/grub/powerpc/libgcc.h: Likewise.
9298 * include/grub/powerpc/setjmp.h: Likewise.
9299 * include/grub/powerpc/types.h: Likewise.
9300 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9301 * include/grub/powerpc/ieee1275/console.h: Likewise.
9302 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9303 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9304 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9305 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9306 * include/grub/powerpc/ieee1275/time.h: Likewise.
9307 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9308 * include/grub/sparc64/libgcc.h: Likewise.
9309 * include/grub/sparc64/setjmp.h: Likewise.
9310 * include/grub/sparc64/types.h: Likewise.
9311 * include/grub/sparc64/ieee1275/console.h: Likewise.
9312 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9313 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9314 * include/grub/sparc64/ieee1275/time.h: Likewise.
9315 * include/grub/util/biosdisk.h: Likewise.
9316 * include/grub/util/getroot.h: Likewise.
9317 * include/grub/util/lvm.h: Likewise.
9318 * include/grub/util/misc.h: Likewise.
9319 * include/grub/util/raid.h: Likewise.
9320 * include/grub/util/resolve.h: Likewise.
9321 * io/gzio.c: Likewise.
9322 * kern/device.c: Likewise.
9323 * kern/disk.c: Likewise.
9324 * kern/dl.c: Likewise.
9325 * kern/elf.c: Likewise.
9326 * kern/env.c: Likewise.
9327 * kern/err.c: Likewise.
9328 * kern/file.c: Likewise.
9329 * kern/fs.c: Likewise.
9330 * kern/loader.c: Likewise.
9331 * kern/main.c: Likewise.
9332 * kern/misc.c: Likewise.
9333 * kern/mm.c: Likewise.
9334 * kern/parser.c: Likewise.
9335 * kern/partition.c: Likewise.
9336 * kern/rescue.c: Likewise.
9337 * kern/term.c: Likewise.
9338 * kern/efi/efi.c: Likewise.
9339 * kern/efi/init.c: Likewise.
9340 * kern/efi/mm.c: Likewise.
9341 * kern/i386/dl.c: Likewise.
9342 * kern/i386/efi/init.c: Likewise.
9343 * kern/i386/efi/startup.S: Likewise.
9344 * kern/i386/pc/init.c: Likewise.
9345 * kern/i386/pc/lzo1x.S: Likewise.
9346 * kern/i386/pc/startup.S: Likewise.
9347 * kern/ieee1275/ieee1275.c: Likewise.
9348 * kern/powerpc/cache.S: Likewise.
9349 * kern/powerpc/dl.c: Likewise.
9350 * kern/powerpc/ieee1275/cmain.c: Likewise.
9351 * kern/powerpc/ieee1275/crt0.S: Likewise.
9352 * kern/powerpc/ieee1275/init.c: Likewise.
9353 * kern/powerpc/ieee1275/openfw.c: Likewise.
9354 * kern/sparc64/cache.S: Likewise.
9355 * kern/sparc64/dl.c: Likewise.
9356 * kern/sparc64/ieee1275/init.c: Likewise.
9357 * kern/sparc64/ieee1275/openfw.c: Likewise.
9358 * loader/efi/chainloader.c: Likewise.
9359 * loader/efi/chainloader_normal.c: Likewise.
9360 * loader/i386/efi/linux.c: Likewise.
9361 * loader/i386/efi/linux_normal.c: Likewise.
9362 * loader/i386/pc/chainloader.c: Likewise.
9363 * loader/i386/pc/chainloader_normal.c: Likewise.
9364 * loader/i386/pc/linux.c: Likewise.
9365 * loader/i386/pc/linux_normal.c: Likewise.
9366 * loader/i386/pc/multiboot.c: Likewise.
9367 * loader/i386/pc/multiboot_normal.c: Likewise.
9368 * loader/powerpc/ieee1275/linux.c: Likewise.
9369 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9370 * normal/arg.c: Likewise.
9371 * normal/cmdline.c: Likewise.
9372 * normal/command.c: Likewise.
9373 * normal/completion.c: Likewise.
9374 * normal/execute.c: Likewise.
9375 * normal/function.c: Likewise.
9376 * normal/lexer.c: Likewise.
9377 * normal/main.c: Likewise.
9378 * normal/menu.c: Likewise.
9379 * normal/menu_entry.c: Likewise.
9380 * normal/misc.c: Likewise.
9381 * normal/parser.y: Likewise.
9382 * normal/script.c: Likewise.
9383 * normal/i386/setjmp.S: Likewise.
9384 * normal/powerpc/setjmp.S: Likewise.
9385 * normal/sparc64/setjmp.S: Likewise.
9386 * partmap/acorn.c: Likewise.
9387 * partmap/amiga.c: Likewise.
9388 * partmap/apple.c: Likewise.
9389 * partmap/gpt.c: Likewise.
9390 * partmap/pc.c: Likewise.
9391 * partmap/sun.c: Likewise.
9392 * term/gfxterm.c: Likewise.
9393 * term/terminfo.c: Likewise.
9394 * term/efi/console.c: Likewise.
9395 * term/i386/pc/console.c: Likewise.
9396 * term/i386/pc/serial.c: Likewise.
9397 * term/i386/pc/vesafb.c: Likewise.
9398 * term/i386/pc/vga.c: Likewise.
9399 * term/ieee1275/ofconsole.c: Likewise.
9400 * util/biosdisk.c: Likewise.
9401 * util/console.c: Likewise.
9402 * util/genmoddep.c: Likewise.
9403 * util/getroot.c: Likewise.
9404 * util/grub-emu.c: Likewise.
9405 * util/grub-mkdevicemap.c: Likewise.
9406 * util/grub-probe.c: Likewise.
9407 * util/lvm.c: Likewise.
9408 * util/misc.c: Likewise.
9409 * util/raid.c: Likewise.
9410 * util/resolve.c: Likewise.
9411 * util/update-grub.in: Likewise.
9412 * util/update-grub_lib.in: Likewise.
9413 * util/grub.d/00_header.in: Likewise.
9414 * util/grub.d/10_hurd.in: Likewise.
9415 * util/grub.d/10_linux.in: Likewise.
9416 * util/i386/efi/grub-install.in: Likewise.
9417 * util/i386/efi/grub-mkimage.c: Likewise.
9418 * util/i386/pc/grub-install.in: Likewise.
9419 * util/i386/pc/grub-mkimage.c: Likewise.
9420 * util/i386/pc/grub-mkrescue.in: Likewise.
9421 * util/i386/pc/grub-setup.c: Likewise.
9422 * util/i386/pc/misc.c: Likewise.
9423 * util/powerpc/ieee1275/grub-install.in: Likewise.
9424 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9425 * util/powerpc/ieee1275/misc.c: Likewise.
9426 * video/bitmap.c: Likewise.
9427 * video/video.c: Likewise.
9428 * video/i386/pc/vbe.c: Likewise.
9429 * video/i386/pc/vbeblit.c: Likewise.
9430 * video/i386/pc/vbefill.c: Likewise.
9431 * video/i386/pc/vbeutil.c: Likewise.
9432 * video/readers/tga.c: Likewise.
9434 2007-07-02 Robert Millan <rmh@aybabtu.com>
9436 * conf/i386-efi.rmk: Replace obsolete reference to
9437 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9438 with util/getroot.c.
9439 * conf/powerpc-ieee1275.rmk: Likewise.
9440 * conf/sparc64-ieee1275.rmk: Likewise.
9442 * util/grub-emu.c (main): Fix unchecked pointer handling.
9444 2007-07-02 Robert Millan <rmh@aybabtu.com>
9446 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9447 invocation to fail, in order to support partition-less media.
9449 * util/i386/pc/grub-install.in: Likewise.
9451 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9452 which fs or partmap modules are needed (akin to its sister scripts).
9454 Also use grub-probe to get rid of unportable /proc/mounts check.
9456 Print the same informational message that the other scripts do, before
9459 2007-06-23 Robert Millan <rmh@aybabtu.com>
9461 * util/update-grub_lib.in (font_path): New function. Determine whether
9462 a font file can be found and, if so, echo the GRUB path to it.
9464 * util/update-grub.in: Handle multiple terminals depending on user
9465 input, platform availability and font file presence. Propagate
9466 variables of our findings to /etc/grub.d/ children.
9468 * util/grub.d/00_header.in: Handle multiple terminals, based on
9469 environment setup by update-grub.
9471 2007-06-23 Robert Millan <rmh@aybabtu.com>
9473 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9475 2007-06-21 Robert Millan <rmh@aybabtu.com>
9477 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9478 indicate end of data section in kernel image.
9479 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9480 GRUB_KERNEL_MACHINE_DATA_END.
9482 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9484 * kern/i386/efi/startup.S: Likewise.
9486 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9487 during image generation. Implement --prefix option to override this
9489 * util/i386/efi/grub-mkimage.c: Likewise.
9491 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9492 code to make path relative to its root into a separate function.
9494 * util/i386/pc/grub-install.in: Use newly provided
9495 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9496 pass the result to grub-install --prefix.
9498 2007-06-13 Robert Millan <rmh@aybabtu.com>
9500 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9502 * util/grub-emu.c: Use above definitions from misc.h instead of
9504 * util/grub-mkdevicemap.c: Likewise.
9505 * util/i386/pc/grub-setup.c: Likewise.
9506 * util/grub-probe.c: Likewise.
9507 (probe): Abort with grub_util_error() when either
9508 grub_guess_root_device or grub_util_get_grub_dev fails.
9510 2007-06-12 Robert Millan <rmh@aybabtu.com>
9512 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9514 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9516 * util/grub-probe.c (probe): Likewise for "drive_name".
9518 2007-06-11 Robert Millan <rmh@aybabtu.com>
9520 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9521 not just the cdrom one.
9523 2007-06-11 Robert Millan <rmh@aybabtu.com>
9525 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9526 Add --pkglibdir=DIR option to override pkglibdir.
9527 Mention --image-type=TYPE in help output.
9528 Fix --grub-mkimage (it was a no-op).
9529 Abort gracefully when no parameter is given.
9531 2007-06-11 Robert Millan <rmh@aybabtu.com>
9533 * util/i386/pc/grub-mkrescue.in: New file.
9534 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9535 * Makefile.in: Handle bin_SCRIPTS.
9537 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9539 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9540 list of video modes.
9542 2007-06-06 Robert Millan <rmh@aybabtu.com>
9544 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9545 file doesn't exist, or if it is in a filesystem grub can't read.
9547 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9548 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9549 header comment to fit in 80 columns when the variables are resolved.
9551 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9552 could be identified by update-grub. Remove redundant check for
9553 unifont.pff existence (since convert_system_path_to_grub_path now
9556 2007-06-04 Robert Millan <rmh@aybabtu.com>
9558 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9560 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9562 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9564 2007-06-04 Robert Millan <rmh@aybabtu.com>
9566 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9568 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9569 grub_apple_partition_map_fini.
9572 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9573 to access >2 TiB disks).
9575 Print disk->total_sectors with %llu instead of %lu, since this
9576 variable is always 64-bit (prevents wrong disk size from being displayed
9577 on either >2 TiB disk or big-endian CPU).
9579 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9580 into a generic case that supports all (sane) partition maps.
9582 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9585 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9586 and grub_apple_partition_map_fini() after that.
9588 2007-06-01 Robert Millan <rmh@aybabtu.com>
9590 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9592 * util/grub.d/00_header.in: Only enable gfxterm when
9593 convert_system_path_to_grub_path() succeeds.
9595 2007-05-20 Robert Millan <rmh@aybabtu.com>
9597 * util/update-grub_lib.in: New file.
9598 * DISTLIST: Add update-grub_lib.in.
9599 * conf/common.rmk: Generate update-grub_lib and install it in
9601 * Makefile.in: Add install routine for $(lib_DATA).
9603 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9604 function provided by update-grub_lib to support arbitrary paths of
9606 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9607 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9609 2007-05-19 Robert Millan <rmh@aybabtu.com>
9611 * commands/i386/cpuid.c: New module.
9613 * conf/i386-efi.rmk: Enable cpuid.mod.
9614 * conf/i386-pc.rmk: Likewise.
9616 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9618 * kern/disk.c (grub_disk_read): Check return value of
9621 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9623 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9625 * disk/raid.c (grub_raid_open): Likewise.
9627 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9629 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9630 stack instead of on the heap.
9632 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9633 before doing a read on it.
9635 * configure.ac: Only use -fno-stack-protector for the target
9638 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9640 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9641 __attribute_ ((unused)) to mode_type argument.
9643 * util/getroot.c (grub_guess_root_device): Fix #endif.
9645 * kern/misc.c (memcmp): Fix prototype.
9647 * include/grub/partition.h [GRUB_UTIL]
9648 (grub_gpt_partition_map_init): Add prototype.
9649 (grub_gpt_partition_map_fini): Likewise.
9651 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9654 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9655 (grub_fat_read_data): Likewise.
9656 (grub_fat_find_dir): Likewise.
9658 * font/manager.c (find_glyph): Make table a const.
9659 (grub_font_get_glyph): Remove bitmap from if statement.
9661 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9663 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9664 code, first search for device in /dev/mapper, then in /dev.
9665 (grub_util_get_grub_dev): New function.
9666 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9668 * util/grub-probe.c (probe): Remove check for RAID, call
9669 grub_util_get_grub_dev() instead of
9670 grub_util_biosdisk_get_grub_dev().
9671 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9672 grub_util_biosdisk_get_grub_dev().
9673 * util/i386/pc/grub-setup.c (main): Likewise.
9675 2007-05-16 Robert Millan <rmh@aybabtu.com>
9677 * DISTLIST: Update for the latest changes.
9678 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9679 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9680 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9681 grub/util/biosdisk.h.
9682 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9683 grub/util/biosdisk.h.
9685 2007-05-16 Robert Millan <rmh@aybabtu.com>
9687 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9689 2007-05-16 Robert Millan <rmh@aybabtu.com>
9691 * util/i386/efi/grub-install.in: New.
9692 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9693 newly added grub-install.
9694 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9696 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9697 grub/util/biosdisk.h.
9698 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9699 grub/util/biosdisk.h.
9701 2007-05-16 Robert Millan <rmh@aybabtu.com>
9703 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9704 * include/grub/util/biosdisk.h: ... here.
9705 * util/i386/pc/biosdisk.c: Moved to ...
9706 * util/biosdisk.c: ... here.
9707 * util/i386/pc/getroot.c: Moved to ...
9708 * util/getroot.c: ... here.
9709 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9710 * util/grub-mkdevicemap.c: ... here.
9711 * util/i386/pc/grub-probe.c: Moved to ...
9712 * util/grub-probe.c: ... here.
9714 2007-05-15 Robert Millan <rmh@aybabtu.com>
9716 * util/update-grub.in: Remove duplicated line in grub.cfg header
9719 2007-05-13 Robert Millan <rmh@aybabtu.com>
9721 * util/update-grub.in: Fix a few assumptions about the devices holding
9722 /, /boot and /boot/grub being the same.
9723 * util/grub.d/00_header.in: Likewise.
9724 * util/grub.d/10_hurd.in: Likewise.
9725 * util/grub.d/10_linux.in: Likewise.
9727 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9728 patterns. Use that to define the `.old' suffix as older than `'.
9730 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9732 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9733 the grub.cfg header message.
9735 2007-05-11 Robert Millan <rmh@aybabtu.com>
9737 * util/update-grub.in: Create device.map if it doesn't already exist,
9738 before attempting to run grub-probe.
9739 Check for grub-probe and grub-mkdevicemap with the same code
9740 grub-install is using.
9743 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9745 * Makefile.in: Add the datarootdir autoconf variable.
9747 2007-05-09 Robert Millan <rmh@aybabtu.com>
9749 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9750 fail gracefully if dev->disk->partition == NULL.
9752 2007-05-07 Robert Millan <rmh@aybabtu.com>
9754 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9755 determine partition map module.
9756 * util/i386/pc/grub-install.in: Use this feature to decide which
9757 partition module to load, instead of hardcoding pc and gpt.
9759 2007-05-07 Robert Millan <rmh@aybabtu.com>
9761 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9762 source directory differs from build directory.
9764 2007-05-05 Robert Millan <rmh@aybabtu.com>
9766 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9769 2007-05-05 Robert Millan <rmh@aybabtu.com>
9771 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9773 2007-05-05 Robert Millan <rmh@aybabtu.com>
9775 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9776 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9778 2007-05-05 Robert Millan <rmh@aybabtu.com>
9780 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9781 (grub_probe_SOURCES): Likewise.
9782 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9783 GPT and initialize dos_part and bsd_part accordingly.
9784 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9786 (main): Activate gpt module for use during partition identification,
9787 and deactivate it afterwards.
9788 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9789 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9790 partition identification, and deactivate it afterwards.
9792 2007-05-05 Robert Millan <rmh@aybabtu.com>
9794 * term/i386/pc/console.c (grub_console_fini): Call
9795 grub_term_set_current() before grub_term_unregister().
9797 2007-05-04 Robert Millan <rmh@aybabtu.com>
9799 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9800 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9801 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
9802 and update-grub_DATA.
9803 * conf/common.rmk: Build and install update-grub components.
9804 * conf/common.mk: Regenerate.
9805 * util/update-grub.in: New. Core of update-grub.
9806 * util/grub.d/00_header.in: New. Generates grub.cfg header.
9807 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
9808 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
9809 * util/grub.d/README: New. Document grub.d directory layout.
9811 2007-05-01 Robert Millan <rmh@aybabtu.com>
9813 * util/grub-emu.c: Move initialization functions
9814 grub_util_biosdisk_init() and grub_init_all() before
9815 grub_util_biosdisk_get_grub_dev(), which relies on them.
9817 2007-04-19 Robert Millan <rmh@aybabtu.com>
9819 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9822 2007-04-18 Jerone Young <jerone@gmail.com>
9824 * kernel/elf.c: Add missing parenthesis for conditional statement
9827 2007-04-10 Jerone Young <jerone@gmail.com>
9829 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9830 continue on and look for device node with real device name.
9832 2007-04-10 Jerone Young <jerone@gmail.com>
9834 * configure.ac: Add argument for autoconf to use transformation
9836 * Makefile.in: Add autoconf package transformation code.
9837 * util/i386/pc/grub-install.in: Likewise.
9838 * util/powerpc/ieee1275/grub-install.in: Likewise.
9840 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9842 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9843 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9844 (EXT2_REVISION): Likewise.
9845 (EXT2_INODE_SIZE): Likewise.
9846 (struct grub_ext2_block_group): Added a missing member
9848 (grub_ext2_read_inode): Divide by the inode size in a superblock
9849 instead of 128 to obtain INODES_PER_BLOCK.
9850 Use the macro EXT2_INODE_SIZE instead of directly using
9853 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9855 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9856 superblock instead of the structure size to compute an
9857 offset. This fixes the problem that GRUB could not read a
9858 filesystem when inode size is different from 128-byte.
9860 2007-03-05 Marco Gerards <marco@gnu.org>
9862 * normal/main.c (read_config_file): When "menu" is not set, create
9865 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9867 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9868 (HEAP_LIMIT): New macro.
9869 (grub_claim_heap): Claim memory up to `heaplimit'.
9871 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9873 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9874 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9876 (grub_arch_modules_addr): Return address after `_end'.
9877 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9878 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9879 (add_segments): Calculate `_end' from phdr size and location.
9880 (ALIGN_UP): Moved to ...
9881 * include/grub/misc.h: here.
9882 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9884 (GRUB_IEEE1275_MODULE_BASE): Removed.
9886 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9888 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9891 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9893 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9895 (grub_elf64_load_hook_t): Likewise.
9896 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9899 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9901 * kern/mm.c: Update copyright.
9902 (grub_mm_debug): Correct syntax error.
9903 (grub_mm_dump_free): New function.
9904 (grub_debug_free): Call `grub_free'.
9905 * include/grub/mm.h: Update copyright.
9906 (grub_mm_dump_free): Add declaration.
9908 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9910 * include/grub/ieee1275/ieee1275.h: Update copyright.
9911 * kern/powerpc/ieee1275/init.c: Likewise.
9912 * kern/powerpc/ieee1275/openfw.c: Likewise.
9914 * loader/powerpc/ieee1275/linux.c: Likewise.
9915 * include/grub/elfload.h: Likewise.
9916 * kern/elf.c: Likewise.
9917 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9919 (grub_elf64_load): Likewise.
9920 (grub_elf32_load_segment): Move to a nested function.
9921 (grub_elf64_load_segment): Likewise.
9923 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9925 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9927 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9928 (grub_heap_len): Likewise.
9929 (HEAP_SIZE): New macro.
9930 (grub_claim_heap): New function.
9931 (grub_machine_init): Don't claim heap directly. Call
9933 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9934 (grub_available_iterate): New function.
9936 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9938 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9939 * configure.ac: Use it for testing the HOST and TARGET compilers.
9941 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9943 * Makefile.in (enable_grub_emu): New variable.
9944 * configure.ac (--enable-grub-emu): New option.
9945 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9946 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9947 * conf/i386-pc.rmk: Likewise.
9948 * conf/powerpc-ieee1275.rmk: Likewise.
9949 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9951 2006-12-12 Marco Gerards <marco@gnu.org>
9953 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9955 * kern/env.c (grub_env_unset): Don't free the member `value' when
9956 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9959 * normal/main.c (current_menu): Removed.
9960 (free_menu): Unset the `menu' environment variable.
9961 (grub_normal_menu_addentry): Make use of the environment variable
9962 `menu', instead of using the global `current_menu'. Allocate
9963 memory for the sourcecode of this entry.
9964 (read_config_file): New argument `nested', changed all callers.
9965 Only in the case of a new context, initialize a new menu. Set the
9966 `menu' environment variable.
9967 (grub_normal_execute): Don't set and unset the environment
9968 variable `menu' here anymore. Only free the menu when leaving the
9971 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9974 2006-12-11 Marco Gerards <marco@gnu.org>
9976 * normal/menu_entry.c (run): Fix off by one bug so the last line
9977 is executed. Move the loader check to outside the loop.
9979 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9981 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9983 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9985 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9986 the number of sectors. Reported by Andrey Shuvikov
9987 <mr_hyro@yahoo.com>.
9989 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9991 * kern/disk.c (grub_disk_read): When there is a read error, always
9992 try to read only the necessary data.
9994 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9996 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9998 [GRUB_UTIL] (grub_raid_fini): Likewise.
9999 [GRUB_UTIL] (grub_lvm_init): Likewise.
10000 [GRUB_UTIL] (grub_lvm_fini): Likewise.
10001 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10002 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10003 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10004 and grub_raid_fini().
10006 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10008 * include/grub/types.h (__unused): Rename to UNUSED.
10009 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10010 (grub_elf64_size): Likewise.
10012 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10014 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10015 grub_error_push and grub_error_pop in the error-handling path.
10016 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10019 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10021 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10022 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10023 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10024 (kernel_elf_SOURCES): Likewise.
10025 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10026 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10027 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10028 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10029 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10030 (elf_mod_SOURCES): New variable.
10031 (elf_mod_CFLAGS): Likewise.
10032 (elf_mod_LDFLAGS): Likewise.
10033 * include/grub/types.h (__unused): New macro.
10034 * include/grub/elfload.h: New file.
10035 * kern/elf.c: Likewise.
10036 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10037 (ELF32_LOADMASK): New macro.
10038 (ELF64_LOADMASK): Likewise.
10039 (vmlinux): Removed.
10040 (grub_linux_load32): New function.
10041 (grub_linux_load64): Likewise.
10042 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10043 Use grub_elf_t instead of grub_file_t.
10045 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10047 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10048 `catch_result' to struct set_color_args.
10050 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10052 * normal/menu.c: Include grub/script.h.
10053 * normal/menu_entry.c: Likewise.
10054 * include/grub/normal.h: Do not include grub/script.h.
10056 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10058 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10060 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10062 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10064 (grub_disk_close): Print debug messages when closing a disk.
10065 (grub_disk_read): Print debug messages when disk read fails.
10066 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10068 * kern/partition.c: Include misc.h.
10069 (grub_partition_iterate): Print debug messages when detecting
10072 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10074 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10076 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10078 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10080 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10081 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10083 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10085 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10086 instead of sizeof(lv). Patch by Michael Guntsche.
10088 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10090 * disk/lvm.c: Rename VGS to VG_LIST.
10091 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10092 (grub_lvm_open): Likewise.
10093 Thanks to Michael Guntsche for finding this bug.
10095 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10097 * configure.ac (AC_INIT): Bumped to 1.95.
10099 2006-10-14 Robert Millan <rmh@aybabtu.com>
10101 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10102 with "/dev/.static/dev/md".
10104 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10106 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10107 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10108 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10109 DRIVE_NAME are always freed.
10111 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10112 DOS_PART, as a DOS partition is counted from one instead of zero
10113 now. Reported by Robert Millan.
10115 2006-10-14 Robert Millan <rmh@aybabtu.com>
10117 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10118 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10119 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10120 string returned by grub_guess_root_device.
10121 * util/i386/pc/grub-setup.c: Likewise.
10122 * util/i386/pc/grub-probefs.c: Likewise.
10124 * util/i386/pc/grub-probefs.c: Rename to ...
10125 * util/i386/pc/grub-probe.c: ... this.
10126 * DISTLIST: Remove grub-probefs, add grub-probe.
10127 * conf/i386-efi.rmk: Likewise.
10128 * conf/i386-pc.rmk: Likewise.
10129 * util/i386/pc/grub-install.in: Likewise.
10131 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10132 choose which information we want to print.
10134 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10136 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10137 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10138 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10139 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10140 video/readers/tga.c and video/i386/pc/vbeutil.c.
10142 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10144 Added support for RAID and LVM.
10146 * disk/lvm.c: New file.
10147 * disk/raid.c: Likewise.
10148 * include/grub/lvm.h: Likewise.
10149 * include/grub/raid.h: Likewise.
10150 * include/grub/util/lvm.h: Likewise.
10151 * include/grub/util/raid.h: Likewise.
10152 * util/lvm.c: Likewise.
10153 * util/raid.c: Likewise.
10155 * include/grub/disk.h (grub_disk_dev_id): Add
10156 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10157 (grub_disk_get_size): New prototype.
10158 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10159 returns a partition.
10160 (grub_disk_get_size): New function.
10162 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10163 verbatim if grub_install_dos_part is -2.
10165 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10168 * util/i386/pc/grub-setup.c (setup): New argument
10169 MUST_EMBED. Force embedding of GRUB when the argument is
10170 true. Close FILE before returning.
10171 (main): Add support for RAID and LVM.
10173 * conf/common.rmk: Add RAID and LVM modules.
10174 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10176 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10178 * kern/misc.c (grub_strstr): New function.
10179 * include/grub/misc.h (grub_strstr): New prototype.
10181 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10183 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10185 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10187 * kern/misc.c (grub_strtoull): Guess the base only if not
10190 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10192 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10195 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10197 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10199 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10200 Remove `flags' argument. All callers changed.
10201 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10202 (IEEE1275_IHANDLE_INVALID): New variable.
10203 (IEEE1275_CELL_INVALID): New variable.
10204 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10205 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10206 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10207 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10208 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10209 codes from Open Firmware. All callers updated.
10210 (grub_ieee1275_next_property): Directly return Open Firmware return
10212 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10213 Standardize error checking from `grub_ieee1275_get_property'.
10214 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10215 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10217 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10219 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10220 `instance_to_package_args' to `instance_to_path_args'.
10222 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10223 `grub_ieee1275_chosen'.
10225 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10226 `grub_ieee1275_interpret'.
10228 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10230 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10232 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10234 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10235 (__cmpdi): Likewise.
10237 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10238 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10241 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10243 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10244 to type `grub_ssize_t'.
10245 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10247 2006-09-22 Marco Gerards <marco@gnu.org>
10249 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10252 2006-09-22 Marco Gerards <marco@gnu.org>
10254 * commands/echo.c: New file.
10256 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10258 * conf/common.rmk (echo_mod_SOURCES): New variable.
10259 (echo_mod_CFLAGS): Likewise.
10260 (echo_mod_LDFLAGS): Likewise.
10262 2006-09-22 Marco Gerards <marco@gnu.org>
10264 * normal/main.c (get_line): Malloc memory instead of using
10265 preallocated memory. Removed the arguments `cmdline' and
10266 `max_len'. Updated all callers.
10268 2006-09-22 Marco Gerards <marco@gnu.org>
10270 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10271 (normal_mod_DEPENDENCIES): Likewise.
10273 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10274 (normal_mod_DEPENDENCIES): Likewise.
10276 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10278 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
10280 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10282 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10283 (normal_mod_DEPENDENCIES): Likewise.
10284 * conf/i386-pc.mk: Regenerate.
10285 * conf/i386-efi.mk: Likewise
10286 * conf/common.mk: Likewise.
10287 * conf/powerpc-ieee1275.mk: Likewise.
10288 * conf/sparc64-ieee1275.mk: Likewise.
10290 2006-09-22 Robert Millan <rmh@aybabtu.com>
10292 Sync with i386 version.
10293 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10294 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10296 2006-09-21 Robert Millan <rmh@aybabtu.com>
10298 Import from GRUB Legacy (lib/device.c):
10299 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10300 (init_device_map) [__linux__]: Add support for I2O devices.
10302 2006-09-14 Marco Gerards <marco@gnu.org>
10304 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10307 2006-09-14 Robert Millan <rmh@aybabtu.com>
10309 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10312 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10314 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10315 before adding it to device.map.
10317 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
10319 * genmk.rb: Let GCC generate dependencies the first time it
10320 compiles a file; using the -MD option.
10321 * conf/common.mk: Regenerate.
10322 * conf/i386-pc.mk: Likewise.
10323 * conf/i386-efi.mk: Likewise.
10324 * conf/powerpc-ieee1275.mk: Likewise.
10325 * conf/sparc64-ieee1275.mk: Likewise.
10327 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10329 Move the prototypes of grub_setjmp and grub_longjmp to
10330 cpu/setjmp.h, so that each architecture may specify different
10333 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10334 (grub_longjmp): Likewise.
10335 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10336 (grub_longjmp): Likewise.
10337 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10338 (grub_longjmp): Likewise.
10340 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10341 [!GRUB_UTIL] (grub_longjmp): Removed.
10343 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10345 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10346 "color!" method does not return any value.
10348 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10350 * include/grub/bitmap.h: New file.
10352 * include/grub/i386/pc/vbeutil.h: Likewise.
10354 * video/bitmap.c: Likewise.
10356 * video/readers/tga.c: Likewise.
10358 * video/i386/pc/vbeutil.c: Likewise.
10360 * commands/videotest.c: Code cleanup and updated to reflect to new
10363 * term/gfxterm.c: Likewise.
10365 * video/video.c: Likewise.
10367 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10368 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10369 (bitmap_mod_SOURCES): New entry.
10370 (bitmap_mod_CFLAGS): Likewise.
10371 (bitmap_mod_LDFLAGS): Likewise.
10372 (tga_mod_SOURCES): Likewise.
10373 (tga_mod_CFLAGS): Likewise.
10374 (tga_mod_LDFLAGS): Likewise.
10376 * include/grub/video.h (grub_video_blit_operators): New enum type.
10377 (grub_video_render_target): Changed as forward declaration and moved
10378 actual definition to be video driver specific.
10379 (grub_video_adapter.blit_bitmap): Added blitting operator.
10380 (grub_video_adapter.blit_render_target): Likewise.
10381 (grub_video_blit_bitmap): Likewise.
10382 (grub_video_blit_render_target): Likewise.
10384 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10385 driver specific render target definition.
10386 (grub_video_vbe_map_rgba): Added driver internal helper.
10387 (grub_video_vbe_unmap_color): Updated to use
10388 grub_video_i386_vbeblit_info.
10389 (grub_video_vbe_get_video_ptr): Likewise.
10391 * include/grub/i386/pc/vbeblit.h
10392 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10393 grub_video_i386_vbeblit_info.
10394 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10395 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10396 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10397 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10398 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10399 (grub_video_i386_vbeblit_index_index): Likewise.
10400 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10401 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10402 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10403 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10405 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10408 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10409 include/grub/i386/pc/vbeblit.h.
10411 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10412 Updated to use grub_video_i386_vbeblit_info.
10413 (grub_video_i386_vbefill_R8G8B8): Likewise.
10414 (grub_video_i386_vbefill_index): Likewise.
10415 (grub_video_i386_vbefill): Added generic filler.
10417 * video/i386/pc/vbefill.c: Updated to reflect changes on
10418 include/grub/i386/pc/vbefill.h.
10420 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10421 grub_video_i386_vbeblit_info.
10422 (grub_video_vbe_unmap_color): Likewise.
10423 (grub_video_vbe_blit_glyph): Likewise.
10424 (grub_video_vbe_scroll): Likewise.
10425 (grub_video_vbe_draw_pixel): Removed function.
10426 (grub_video_vbe_get_pixel): Likewise.
10427 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10428 updated code to use it.
10429 (common_blitter): Added common blitter for render target and bitmap.
10430 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10431 (grub_video_vbe_blit_render_target): Likewise.
10433 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
10435 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10436 is in text mode if there is no console control protocol instance
10439 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10441 * include/grub/video.h: Code cleanup.
10443 * include/grub/i386/pc/vbe.h: Likewise.
10445 * video/i386/pc/vbe.c: Likewise.
10447 * video/i386/pc/vbeblit.c: Likewise.
10449 * video/i386/pc/vbefill.c: Likewise.
10451 * video/video.c: Likewise. Also added more comments.
10453 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10455 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10456 (struct grub_biosdisk_dap): Likewise.
10458 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10459 linkage settings for all functions.
10461 2006-07-12 Marco Gerards <marco@gnu.org>
10463 * configure.ac (--enable-mm-debug): Fix typo.
10465 * genkernsyms.sh.in: Use proper quoting for `CC'.
10467 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10469 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10470 (normal_mod_ASFLAGS): Remove "-m32".
10472 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10474 * util/misc.c: Include config.h.
10475 [!HAVE_MEMALIGN]: Do not include malloc.h.
10476 (grub_memalign): Use posix_memalign, if present. Then, use
10477 memalign, if present. Otherwise, emit an error.
10479 * util/grub-emu.c: Do not include malloc.h.
10481 * include/grub/util/misc.h: Include unistd.h. This is required for
10482 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10483 D. Eades III <hde@foobar-qux.org>.
10485 * configure.ac (AC_GNU_SOURCE): Added.
10486 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10489 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10491 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10492 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10494 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10496 * include/grub/types.h (grub_host_addr_t): Rename to
10497 grub_target_addr_t.
10498 (grub_host_off_t): Rename to grub_target_off_t.
10499 (grub_host_size_t): Rename to grub_target_size_t.
10500 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10501 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10503 * include/grub/kernel.h (struct grub_module_header): Change type
10504 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10505 (grub_module_info): Likewise.
10507 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10509 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10510 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10511 Velazquez <jesus.velazquez@gmail.com>.
10513 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10515 Count partitions from 1 instead of 0 in the string representation
10516 of partitions. Still use 0-based internally.
10518 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10519 (sun_partition_map_iterate): Use grub_partition_t instead of
10520 struct grub_partition *. Cast DESC->START_CYLINDER to
10521 grub_uint64_t after converting the endian.
10522 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10523 (sun_partition_map_get_name): Add 1 to P->INDEX.
10525 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10527 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10529 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10530 zero instead of one.
10531 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10532 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10534 * partmap/apple.c (apple_partition_map_iterate): Change the type
10535 of POS to unsigned.
10536 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10537 (apple_partition_map_get_name): Add 1 into P->INDEX.
10539 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10540 of POS to unsigned.
10541 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10542 calculate the offset of a partition.
10543 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10544 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10546 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10547 SECTOR to grub_disk_addr_t.
10548 (acorn_partition_map_iterate): Likewise.
10549 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10550 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10552 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10554 * kern/i386/pc/init.c (make_install_device): Add 1 into
10555 GRUB_INSTALL_DOS_PART.
10557 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10560 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10562 Clean up the code to support 64-bit addressing in disks and
10563 files. This change is not enough for filesystems yet.
10565 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10566 type of "start" to grub_uint64_t.
10567 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10568 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10569 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10572 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10573 to grub_disk_addr_t.
10575 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10578 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10580 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10583 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10585 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10587 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10589 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10590 to grub_off_t, to detect an error from grub_file_seek.
10591 (grub_multiboot_load_elf32): Likewise.
10593 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10594 maximum unsigned long value when an overflow is detected.
10595 (grub_strtoull): New function.
10596 (grub_divmod64): Likewise.
10597 (grub_lltoa): use grub_divmod64.
10599 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10601 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10602 the pointer to next character. Use grub_strtoull instead of
10604 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10605 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10608 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10609 return value is signed.
10610 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10611 test if OFFSET is less than zero, as OFFSET is unsigned now.
10613 * kern/disk.c (struct grub_disk_cache): Change the type of
10614 "sector" to grub_disk_addr_t.
10615 (grub_disk_cache_get_index): Change the type of SECTOR to
10616 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10617 unsigned after shifting.
10618 (grub_disk_cache_invalidate): Change the type of SECTOR to
10620 (grub_disk_cache_unlock): Likewise.
10621 (grub_disk_cache_store): Likewise.
10622 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10623 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10624 grub_disk_addr_t and grub_uint64_t, respectively.
10625 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10626 body, as the value of OFFSET is tweaked by
10627 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10628 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10630 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10631 body, as the value of OFFSET is tweaked by
10632 grub_disk_check_range. Change the types of LEN and N to
10635 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10636 and "saved_offset" to grub_off_t.
10637 (test_header): Cast BUF to char *.
10638 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10640 (grub_gzio_read): Change the types of OFFSET and SIZE to
10641 grub_off_t and grub_size_t, respectively.
10643 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10645 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10646 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10647 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10648 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10649 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10651 * include/grub/types.h (grub_off_t): Unconditionally set to
10653 (grub_disk_addr_t): Changed to grub_uint64_t.
10655 * include/grub/partition.h (struct grub_partition): Change the
10656 types of "start", "len" and "offset" to grub_disk_addr_t,
10657 grub_uint64_t and grub_disk_addr_t, respectively.
10658 (grub_partition_get_start): Return grub_disk_addr_t.
10659 (grub_partition_get_len): Return grub_uint64_t.
10661 * include/grub/misc.h (grub_strtoull): New prototype.
10662 (grub_divmod64): Likewise.
10664 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10665 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10666 grub_off_t, respectively.
10667 All callers and references changed.
10669 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10670 grub_size_t in "read".
10671 All callers and references changed.
10673 * include/grub/file.h (struct grub_file): Change the types of
10674 "offset" and "size" to grub_off_t and grub_off_t,
10675 respectively. Change the type of SECTOR to grub_disk_addr_t in
10677 (grub_file_read): Change the type of LEN to grub_size_t.
10678 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10680 (grub_file_size): Return grub_off_t.
10681 (grub_file_tell): Likewise.
10682 All callers and references changed.
10684 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10685 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10687 (struct grub_disk): Change the type of "total_sectors" to
10688 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10690 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10691 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10692 (grub_disk_write): Likewise.
10693 All callers and references changed.
10695 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10696 char * for grub_strncmp to silence gcc.
10697 (grub_iso9660_mount): Likewise.
10698 (grub_iso9660_mount): Likewise.
10699 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10701 (grub_iso9660_iterate_dir): Likewise.
10702 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10704 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10705 LEN to grub_disk_addr_t and grub_size_t, respectively.
10707 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10709 * fs/jfs.c (grub_jfs_read_file): Likewise.
10711 * fs/minix.c (grub_jfs_read_file): Likewise.
10713 * fs/sfs.c (grub_jfs_read_file): Likewise.
10715 * fs/ufs.c (grub_jfs_read_file): Likewise.
10717 * fs/xfs.c (grub_jfs_read_file): Likewise.
10719 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10720 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10723 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10724 BLKNR to -1 instead of returning GRUB_ERRNO.
10725 (grub_ext2_read_file): Change the types of SECTOR and
10726 LEN to grub_disk_addr_t and grub_size_t, respectively.
10728 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10729 LEN to grub_disk_addr_t and grub_size_t, respectively.
10731 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10734 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10735 string. Do not cast SECTOR explicitly.
10737 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10738 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10739 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10740 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10741 over 2TB and LBA mode is not supported, raise an error.
10742 (get_safe_sectors): New function.
10743 (grub_biosdisk_read): Use get_safe_sectors.
10744 (grub_biosdisk_write): Likewise.
10746 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10747 (grub_efidisk_write): Likewise.
10749 * disk/loopback.c (delete_loopback): Cosmetic changes.
10750 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10752 (grub_loopback_open): Likewise.
10753 (grub_loopback_read): Likewise. Also, change the type of POS to
10754 grub_off_t, and fix the usage of grub_memset.
10756 * commands/i386/pc/play.c: Include grub/machine/time.h.
10758 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10761 * commands/configfile.c: Include grub/env.h.
10763 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10764 GRUB_ERRNO directly instead. Change the type of POS to
10765 grub_off_t. Follow the coding standard.
10767 * commands/blocklist.c: Include grub/partition.h.
10768 (grub_cmd_blocklist): Return an error if the underlying device is
10769 not a disk. Take the starting sector of a partition into account,
10770 if a partition is used.
10772 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10774 (lba_mode): Support 64-bit addresses.
10775 (chs_mode): Likewise.
10776 (copy_buffer): Adapted to the new offsets of a length field and a
10778 (blocklist_default_start): Allocate 64-bit space.
10780 * boot/i386/pc/boot.S (force_lba): Removed.
10781 (boot_drive): Moved to under KERNEL_SECTOR.
10782 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10784 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10786 (lba_mode): Refactored to support a 64-bit address. More size
10788 (setup_sectors): Likewise.
10790 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10792 * DISTLIST: Added include/grub/i386/linux.h. Removed
10793 include/grub/i386/pc/linux.h
10795 * configure.ac (AC_INIT): Bumped to 1.94.
10797 * config.guess: Updated from gnulib.
10798 * config.sub: Likewise.
10799 * install-sh: Likewise.
10800 * mkinstalldirs: Likewise.
10802 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10804 * conf/common.rmk (grub_modules_init.lst): Depended on
10805 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10808 * genmk.rb (PModule::rule): Reverted the previous change.
10810 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10812 * conf/common.rmk (grub_modules_init.lst): Depends on
10813 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10814 that the target does not exist before producing.
10815 (grub_modules_init.h): Remove the target before generating.
10816 (grub_emu_init.c): Likewise.
10818 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10820 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
10822 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10823 for the target-specific tests. Make sure that we also have the
10824 up-to-date target variables for those tests.
10826 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10828 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10829 (PModule::rule): Likewise.
10831 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10833 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10834 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10835 target-specific flags should be prefixed.
10836 (PModule::rule): Likewise.
10838 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
10840 * configure.ac (CMP): Check if cmp is available explicitly.
10842 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
10844 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10845 (target_cpu): New variable.
10846 (pkglibdir): Use target_cpu instead of host_cpu.
10848 * util/i386/pc/grub-install.in (host_cpu): Removed.
10849 (target_cpu): New variable.
10850 (pkglibdir): Use target_cpu instead of host_cpu.
10852 * util/genmoddep.c: Removed.
10854 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10855 instead of GRUB_HOST_SIZEOF_VOID_P.
10856 * kern/dl.c: Likewise.
10858 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10860 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10861 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10862 (GRUB_TARGET_SIZEOF_LONG): ... this.
10863 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10864 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10865 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10867 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10868 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10869 (GRUB_TARGET_SIZEOF_LONG): ... this.
10870 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10871 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10872 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10874 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10875 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10876 (GRUB_TARGET_SIZEOF_LONG): ... this.
10877 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10878 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10880 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10881 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10882 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10883 instead of GRUB_HOST_SIZEOF_LONG.
10884 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10885 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10886 GRUB_CPU_WORDS_BIGENDIAN.
10887 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10888 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10891 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10892 (genmoddep_SOURCES): Likewise.
10893 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10894 (genmoddep_SOURCES): Likewise.
10895 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10896 (genmoddep_SOURCES): Likewise.
10897 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10899 (genmoddep_SOURCES): Likewise.
10901 * genmoddep.awk: New file.
10903 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10904 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10905 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10906 (PModule::rule): Likewise.
10907 (Program::rule): Likewise.
10908 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10909 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10912 * configure.ac: Rewritten intensively to use host and target
10913 instead of build and host, respectively.
10915 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10916 (host_cpu): Removed.
10917 (target_cpu): New variable.
10918 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10919 (BUILD_CC): Removed.
10920 (BUILD_CFLAGS): Likewise.
10921 (BUILD_CPPFLAGS): Likewise.
10922 (TARGET_CC): New variable.
10923 (TARGET_CFLAGS): Likewise.
10924 (TARGET_CPPFLAGS): Likewise.
10925 (TARGET_LDFLAGS): Likewise.
10927 (include): Use target_cpu instead of host_cpu.
10928 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
10930 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10932 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10934 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10935 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10936 field 'false' to 'exec_on_false'.
10937 (grub_script_create_cmdif): Renamed argument names to reflect above
10940 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10942 * normal/script.c (grub_script_create_cmdif): Likewise.
10944 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10946 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10948 (grub_hfsplus_btree_recptr): Likewise.
10949 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10950 FILEBLOCK both to pass a block number and store next block
10952 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10953 overflow file correctly. Specify errors appropriately, because
10954 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10955 grub_hfsplus_btree_recptr to get the pointer to a found key.
10956 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10959 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10961 (_linux_mod_SOURCES): New variable.
10962 (_linux_mod_CFLAGS): Likewise.
10963 (_linux_mod_LDFLAGS): Likewise.
10964 (linux_mod_SOURCES): Likewise.
10965 (linux_mod_CFLAGS): Likewise.
10966 (linux_mod_LDFLAGS): Likewise.
10968 * DISTLIST: Added loader/i386/efi/linux.c,
10969 loader/i386/efi/linux_normal.c and
10970 include/grub/i386/efi/loader.h.
10972 * loader/i386/efi/linux.c: New file.
10973 * loader/i386/efi/linux_normal.c: Likewise.
10974 * include/grub/i386/efi/loader.h: Likewise.
10976 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10978 * commands/blocklist.c: New file.
10980 * DISTLIST: Added commands/blocklist.c.
10982 * term/efi/console.c (grub_console_highlight_color): Use a lighter
10983 color for the background, and a darker color for the foreground.
10984 (grub_console_checkkey): Return READ_KEY.
10985 (grub_console_cls): Set the background to
10986 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10988 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10990 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10991 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10993 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10996 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10997 BG. The spec is wrong again.
10999 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11001 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11003 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11004 commands/blocklist.c.
11005 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11007 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11008 (blocklist_mod_SOURCES): New variable.
11009 (blocklist_mod_CFLAGS): Likewise.
11010 (blocklist_mod_LDFLAGS): Likewise.
11012 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11014 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11016 (lba_mode): Use %eax more intensively to reduce the code size.
11018 2006-05-20 Marco Gerards <marco@gnu.org>
11020 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11022 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11024 (script): Accept leading newlines.
11025 (newlines): New rule to describe 0 or more newlines.
11026 (commands): Accept `command' with trailing newline. Fixed the
11027 order in which arguments were passed to `grub_script_add_cmd'.
11028 Accept commands separated by newlines.
11029 (function): Changed to accept newlines.
11030 (menuentry) Rewritten.
11032 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11033 front of the list, instead of to the end.
11035 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11037 * util/i386/pc/grub-install.in (bindir): New variable.
11038 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11039 Shaver <lbgwjl@gmail.com>.
11041 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11043 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11044 grub/machine/linux.h
11045 * loader/i386/pc/linux.c: Likewise.
11047 * include/grub/i386/pc/linux.h: Moved to ...
11048 * include/grub/i386/linux.h: ... here.
11050 * include/grub/i386/linux.h (struct linux_kernel_params): New
11053 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11055 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11057 (grub_video_vbe_blit_glyph): Likewise.
11058 (grub_video_vbe_blit_bitmap): Likewise.
11059 (grub_video_vbe_blit_render_target): Likewise.
11061 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11063 * configure.ac (--with-platform): Properly quote the square
11066 2006-05-08 Marco Gerards <marco@gnu.org>
11068 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11070 (kernel_elf_HEADERS): ...to this. Updated all users.
11071 (grubof_symlist.c): Renamed from this...
11072 (kernel_elf_symlist.c): ...to this. Updated all users.
11073 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11074 (grubof_SOURCES): Renamed from this...
11075 (kernel_elf_SOURCES): ...to this.
11076 (grubof_HEADERS): Renamed from this...
11077 (kernel_elf_HEADERS): ...to this.
11078 (grubof_CFLAGS): Renamed from this...
11079 (kernel_elf_CFLAGS): ...to this.
11080 (grubof_ASFLAGS): Renamed from this...
11081 (kernel_elf_ASFLAGS): ...to this.
11082 (grubof_LDFLAGS): Renamed from this...
11083 (kernel_elf_LDFLAGS): ...to this.
11085 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11087 (kernel_elf_HEADERS): ...to this. Updated all users.
11088 (grubof_symlist.c): Renamed from this...
11089 (kernel_elf_symlist.c): ...to this. Updated all users.
11090 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11091 (grubof_SOURCES): Renamed from this...
11092 (kernel_elf_SOURCES): ...to this.
11093 (grubof_HEADERS): Renamed from this...
11094 (kernel_elf_HEADERS): ...to this.
11095 (grubof_CFLAGS): Renamed from this...
11096 (kernel_elf_CFLAGS): ...to this.
11097 (grubof_ASFLAGS): Renamed from this...
11098 (kernel_elf_ASFLAGS): ...to this.
11099 (grubof_LDFLAGS): Renamed from this...
11100 (kernel_elf_LDFLAGS): ...to this.
11102 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11103 `kernel.elf' instead of `grubof'.
11105 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11107 Add --with-platform to configure. Use pkglibdir instead of
11108 pkgdatadir. This is reported by Roger Leigh.
11110 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11111 (host_vendor): Likewise.
11112 (host_os): Likewise.
11113 (pkgdatadir): Likewise.
11114 (platform): New variable.
11115 (pkglibdir): Likewise.
11116 Use PKGLIBDIR instead of PKGDATADIR.
11118 * util/i386/pc/grub-install.in (datadir): Removed.
11119 (host_vendor): Likewise.
11120 (host_os): Likewise.
11121 (pkgdatadir): Likewise.
11122 (platform): New variable.
11123 (pkglibdir): Likewise.
11124 Use PKGLIBDIR instead of PKGDATADIR.
11126 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11127 instead of GRUB_DATADIR.
11129 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11131 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11134 * configure.ac (--with-platform): New option.
11135 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11137 * Makefile.in: Include a makefile based on PLATFORM instead of
11139 (pkgdatadir): Not appended by the machine type.
11140 (pkglibdir): Appended by the machine type.
11141 (host_vendor): Removed.
11142 (platform): New variable.
11143 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11144 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11145 (uninstall): Likewise.
11147 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11149 Use the environment context in the menu. Remove the commands
11150 "default" and "timeout", and use variables instead.
11152 * normal/menu.c: Include grub/env.h.
11153 (print_entry): Cast TITLE to silence gcc.
11154 (get_timeout): New function.
11155 (set_timeout): Likewise.
11156 (get_entry_number): Likewise.
11157 (run_menu): Use a default entry, a fallback entry and a timeout
11158 in the environment variables "default", "fallback" and
11159 "timeout". Also, tweak the default entry if it is not within the
11160 current menu entries.
11161 (grub_menu_run): Use a fallback entry in the environment variable
11164 * normal/main.c (read_config_file): Do not initialize
11165 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11167 (grub_normal_execute): Use a data slot to store the menu.
11169 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11170 fallback_entry and timeout.
11171 (struct grub_menu_list): Removed.
11172 (grub_menu_list_t): Likewise.
11173 (struct grub_context): Likewise.
11174 (grub_context_t): Likewise.
11175 (grub_context_get): Likewise.
11176 (grub_context_get_current_menu): Likewise.
11177 (grub_context_push_menu): Likewise.
11178 (grub_context_pop_menu): Likewise.
11179 (grub_default_init): Likewise.
11180 (grub_default_fini): Likewise.
11181 (grub_timeout_init): Likewise.
11182 (grub_timeout_fini): Likewise.
11184 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11186 (normal_mod_SOURCES): Removed normal/context.c.
11188 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11189 commands/default.c, commands/timeout.c and normal/context.c.
11190 (normal_mod_SOURCES): Removed normal/context.c.
11192 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11193 commands/timeout.c and normal/context.c.
11194 (normal_mod_SOURCES): Removed normal/context.c.
11196 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11197 commands/default.c, commands/timeout.c and normal/context.c.
11198 (normal_mod_SOURCES): Removed normal/context.c.
11200 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11202 (default_mod_SOURCES): Removed.
11203 (default_mod_CFLAGS): Likewise.
11204 (default_mod_LDFLAGS): Likewise.
11205 (timeout_mod_SOURCES): Removed.
11206 (timeout_mod_CFLAGS): Likewise.
11207 (timeout_mod_LDFLAGS): Likewise.
11209 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11212 * commands/default.c: Removed.
11213 * commands/timeout.c: Likewise.
11214 * normal/context.c: Likewise.
11216 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11218 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11220 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11222 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11223 "next" to "prev" for readability.
11224 (struct grub_env_sorted_var): New struct.
11225 (grub_env_context): Renamed to ...
11226 (initial_context): ... this.
11227 (grub_env_var_context): Renamed to ...
11228 (current_context): ... this.
11229 (grub_env_find): Look only at CURRENT_CONTEXT.
11230 (grub_env_context_open): Rewritten to copy exported variables from
11232 (grub_env_context_close): Rewritten according to the new
11233 scheme. Also, add an assertion to prevent the initial context from
11235 (grub_env_insert): Removed the code for the sorted list.
11236 (grub_env_remove): Likewise.
11237 (grub_env_export): Simply mark the variable with
11238 GRUB_ENV_VAR_GLOBAL.
11239 (grub_env_set): A cosmetic change for naming consistency.
11240 (grub_env_get): Likewise.
11241 (grub_env_unset): Likewise.
11242 (grub_env_iterate): Rewritten to sort variables within this
11244 (grub_register_variable_hook): Fixed for naming consistency. Call
11245 grub_env_find again, only if NAME is not found at the first time.
11246 (mangle_data_slot_name): New function.
11247 (grub_env_set_data_slot): Likewise.
11248 (grub_env_get_data_slot): Likewise.
11249 (grub_env_unset_data_slot): Likewise.
11251 * include/grub/env.h (grub_env_var_type): New enum.
11252 (GRUB_ENV_VAR_LOCAL): New constant.
11253 (GRUB_ENV_VAR_GLOBAL): Likewise.
11254 (GRUB_ENV_VAR_DATA): Likewise.
11255 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11257 (grub_env_set): Replace VAR with NAME for consistency.
11258 (grub_register_variable_hook): Likewise.
11259 (grub_env_export): Specify the name of the argument.
11260 (grub_env_set_data_slot): New prototype.
11261 (grub_env_get_data_slot): Likewise.
11262 (grub_env_unset_data_slot): Likewise.
11264 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11266 Extend the loader so that GRUB can accept a loader which comes
11267 back to GRUB when a loaded image exits. Also, this change adds
11268 support for a chainloader on EFI.
11270 * term/efi/console.c: Include grub/misc.h.
11271 (grub_console_checkkey): Display a scan code on the top for
11272 debugging. This will be removed once the EFI port gets stable.
11273 Correct the scan code mapping.
11275 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11276 allocate memory from larger regions, in order to reduce the number
11277 of allocated regions. Otherwise, the MacOSX loader panics.
11278 (filter_memory_map): Avoid less than 1MB for compatibility with
11280 (add_memory_regions): Allocate from the tail of a region, if
11281 possible, to avoid allocating a region near to 1MB, for the MacOSX
11284 * kern/efi/init.c (grub_efi_set_prefix): Specify
11285 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11287 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11288 argument IMAGE_HANDLE and specify it to get a loaded image.
11289 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11290 grub_efi_get_loaded_image.
11291 (grub_efi_get_filename): Divide the length by the size of
11293 (grub_efi_get_device_path): New function.
11294 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11295 the length by the size of grub_efi_char16_t for a file path device
11298 * kern/loader.c (grub_loader_noreturn): New variable.
11299 (grub_loader_set): Accept a new argument NORETURN. Set
11300 GRUB_LOADER_NORETURN to NORETURN.
11301 All callers changed.
11302 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11305 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11307 (grub_efi_get_loaded_image): Take an argument to specify an image
11310 * include/grub/loader.h (grub_loader_set): Added one more argument
11313 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11314 instead of grub_efi_open_protocol.
11315 (grub_efidisk_get_device_name): Likewise.
11316 (grub_efidisk_close): Print a newline.
11317 (grub_efidisk_get_device_handle): Fixed to use
11318 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11319 GRUB_EFI_DEVICE_PATH_TYPE.
11321 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11322 * kern/efi/efi.c (device_path_guid): ... here.
11324 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11326 (kernel_mod_HEADERS): Added efi/disk.h.
11327 (_chain_mod_SOURCES): New variable.
11328 (_chain_mod_CFLAGS): Likewise.
11329 (_chain_mod_LDFLAGS): Likewise.
11330 (chain_mod_SOURCES): Likewise.
11331 (chain_mod_CFLAGS): Likewise.
11332 (chain_mod_LDFLAGS): Likewise.
11334 * DISTLIST: Added include/grub/efi/chainloader.h,
11335 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11337 * include/grub/efi/chainloader.h: New file.
11338 * loader/efi/chainloader.c: Likewise.
11339 * loader/efi/chainloader_normal.c: Likewise.
11341 2006-04-30 Marco Gerards <marco@gnu.org>
11343 * commands/configfile.c (grub_cmd_source): New function.
11344 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11345 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11347 2006-04-30 Marco Gerards <marco@gnu.org>
11349 * normal/execute.c (grub_script_execute_cmd): Change the return
11350 type to `grub_err_t'. Correctly return the error.
11351 (grub_script_execute_cmdline): In case a command line is not a
11352 command or a function, try to interpret it as an assignment.
11354 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11356 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11357 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11358 skip a node whose name is obviously invalid as UTF-16,
11359 i.e. contains a NUL character. Stop the iteration when the last
11360 directory entry is found. Instead of using the return value of
11361 grub_hfsplus_btree_iterate_node, store the value in RET and use
11362 it, because the iterator can be stopped by the last directory
11365 2006-04-30 Marco Gerards <marco@gnu.org>
11367 * include/grub/env.h (grub_env_export): New prototype. Reported
11368 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11370 2006-04-30 Marco Gerards <marco@gnu.org>
11372 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11373 size of the extents in a catalog file record.
11375 2006-04-29 Marco Gerards <marco@gnu.org>
11377 * commands/configfile.c (grub_cmd_configfile): Execute the
11378 configfile within its own context.
11380 * include/grub/env.h (grub_env_context_open): New prototype.
11381 (grub_env_context_close): Likewise.
11383 * kern/env.c (grub_env): Removed.
11384 (grub_env_sorted): Likewise.
11385 (grub_env_context): New variable.
11386 (grub_env_var_context): Likewise.
11387 (grub_env_find): Search both the active context and the global
11389 (grub_env_context_open): New function.
11390 (grub_env_context_close): Likewise.
11391 (grub_env_insert): Likewise.
11392 (grub_env_remove): Likewise.
11393 (grub_env_export): Likewise.
11394 (grub_env_set): Changed to use helper functions to avoid code
11396 (grub_env_iterate): Rewritten so both the current context and the
11397 global context are being used.
11399 * normal/command.c (export_command): New function.
11400 (grub_command_init): Register the `export' function.
11402 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11404 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11405 explicitly to suppress gcc's warnings.
11406 * fs/fat.c (grub_fat_find_dir): Likewise.
11407 (grub_fat_label): Likewise.
11408 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11409 (grub_xfs_mount): Likewise.
11410 (grub_xfs_label): Likewise.
11411 * fs/affs.c (grub_affs_mount): Likewise.
11412 (grub_affs_label): Likewise.
11413 (grub_affs_iterate_dir): Likewise.
11414 * fs/sfs.c (grub_sfs_mount): Likewise.
11415 (grub_sfs_iterate_dir): Likewise.
11416 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11417 * fs/hfs.c (grub_hfs_mount): Likewise.
11418 (grub_hfs_cmp_catkeys): Likewise.
11419 (grub_hfs_find_dir): Likewise.
11420 (grub_hfs_dir): Likewise.
11421 (grub_hfs_label): Likewise.
11422 * fs/jfs.c (grub_jfs_mount): Likewise.
11423 (grub_jfs_opendir): Likewise.
11424 (grub_jfs_getent): Likewise.
11425 (grub_jfs_lookup_symlink): Likewise.
11426 (grub_jfs_label): Likewise.
11427 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11428 (grub_hfsplus_iterate_dir): Likewise.
11429 (grub_hfsplus_btree_iterate_node): Made static.
11431 * util/grub-emu.c (prefix): New variable.
11432 (grub_machine_set_prefix): New function.
11433 (main): Do not set the environment variable "prefix" here. Only
11434 set PREFIX, which is used later by grub_machine_set_prefix.
11436 * include/grub/video.h: Do not include grub/symbol.h.
11437 (grub_video_register): Not exported. This symbol is not defined in
11439 (grub_video_unregister): Likewise.
11440 (grub_video_iterate): Likewise.
11441 (grub_video_setup): Likewise.
11442 (grub_video_restore): Likewise.
11443 (grub_video_get_info): Likewise.
11444 (grub_video_get_blit_format): Likewise.
11445 (grub_video_set_palette): Likewise.
11446 (grub_video_get_palette): Likewise.
11447 (grub_video_set_viewport): Likewise.
11448 (grub_video_get_viewport): Likewise.
11449 (grub_video_map_color): Likewise.
11450 (grub_video_map_rgb): Likewise.
11451 (grub_video_map_rgba): Likewise.
11452 (grub_video_fill_rect): Likewise.
11453 (grub_video_blit_glyph): Likewise.
11454 (grub_video_blit_bitmap): Likewise.
11455 (grub_video_blit_render_target): Likewise.
11456 (grub_video_scroll): Likewise.
11457 (grub_video_swap_buffers): Likewise.
11458 (grub_video_create_render_target): Likewise.
11459 (grub_video_delete_render_target): Likewise.
11460 (grub_video_set_active_render_target): Likewise.
11462 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11464 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11466 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11467 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11468 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11469 instead of $(srcdir)/genkernsyms.sh.
11471 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11472 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11473 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11474 instead of $(srcdir)/genkernsyms.sh.
11476 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11477 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11478 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11479 instead of $(srcdir)/genkernsyms.sh.
11481 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11482 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11483 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11484 instead of $(srcdir)/genkernsyms.sh.
11486 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11489 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11491 (gensymlist.sh): New target.
11492 (genkernsyms.sh): Likewise.
11494 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11495 genkernsyms.sh.in and gensymlist.sh.in.
11497 * genkernsyms.sh: Removed.
11498 * gensymlist.sh: Likewise.
11500 * genkernsyms.sh.in: New file.
11501 * gensymlist.sh.in: Likewise.
11503 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11505 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11506 clobber "prefix", since we may have already set it manually.
11508 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11510 * kern/misc.c (abort): New alias for grub_abort.
11512 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11514 A new machine-specific function "grub_machine_set_prefix" is
11515 defined. This is called after loading modules, so that a prefix
11516 initialization can use modules. Also, this change adds an
11517 intensive debugging feature for the memory manager via the
11518 configure option "--enable-mm-debug".
11520 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11523 * kern/sparc64/ieee1275/init.c (abort): Removed.
11524 (grub_stop): Likewise.
11525 (grub_exit): New function.
11526 (grub_set_prefix): Renamed to ...
11527 (grub_machine_set_prefix): ... this.
11528 (grub_machine_init): Do not call grub_set_prefix.
11530 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11531 (grub_machine_set_prefix): ... this.
11532 (grub_machine_init): Do not call grub_set_prefix.
11534 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11535 (grub_machine_init): Do not set the prefix here.
11537 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11539 * kern/efi/init.c: Include grub/mm.h.
11540 (grub_efi_set_prefix): New function.
11542 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11543 (grub_efi_get_filename): New function.
11544 (grub_print_device_path): Renamed to ...
11545 (grub_efi_print_device_path): ... this.
11547 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11548 [MM_DEBUG] (grub_realloc): Likewise.
11549 [MM_DEBUG] (grub_free): Likewise.
11550 [MM_DEBUG] (grub_memalign): Likewise.
11551 [MM_DEBUG] (grub_mm_debug): New variable.
11552 [MM_DEBUG] (grub_debug_malloc): New function.
11553 [MM_DEBUG] (grub_debug_free): New function.
11554 [MM_DEBUG] (grub_debug_realloc): New function.
11555 [MM_DEBUG] (grub_debug_memalign): New function.
11557 * kern/misc.c (grub_abort): Print a newline to distinguish
11560 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11561 grub_set_root_dev after loading modules. This is necessary when
11562 setting a prefix depends on modules.
11564 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11565 (grub_efi_print_device_path): ... this.
11566 (grub_efi_get_filename): New prototype.
11567 (grub_efi_set_prefix): Likewise.
11569 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11571 (grub_efidisk_get_device_handle): New prototype.
11572 (grub_efidisk_get_device_name): Likewise.
11574 * include/grub/mm.h: Include config.h.
11575 (MM_DEBUG): Removed.
11576 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11577 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11578 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11579 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11580 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11581 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11582 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11583 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11584 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11586 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11588 * disk/efi/efidisk.c: Include grub/partition.h.
11589 (iterate_child_devices): New function.
11590 (add_device): First, compare only last device path nodes, so that
11591 devices are sorted by the types.
11592 (grub_efidisk_get_device_handle): New function.
11593 (grub_efidisk_get_device_name): Likewise.
11595 * configure.ac (--enable-mm-debug): New option to enable the
11596 memory manager debugging feature. This makes the binary much
11597 bigger, so is disabled by default.
11599 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11601 Use grub_abort instead of grub_stop, and grub_exit must be
11602 define in each architecture now. Also, this change adds support
11605 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11606 (grub_getkey): New function.
11607 (grub_term_get_current): Likewise.
11609 * util/i386/pc/grub-setup.c: Include grub/term.h.
11610 (grub_getkey): New function.
11611 (grub_term_get_current): Likewise.
11613 * util/misc.c (grub_stop): Renamed to ...
11614 (grub_exit): ... this.
11616 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11617 (grub_exit): ... this.
11618 (grub_machine_init): Use grub_abort instead of abort.
11619 (grub_stop): Removed.
11621 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11624 * kern/i386/pc/startup.S (grub_exit): New function.
11625 (cold_reboot): New label.
11627 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11628 (grub_efi_init): Call grub_efidisk_init.
11629 (grub_efi_fini): Call grub_efidisk_fini.
11631 * kern/efi/efi.c: Include grub/mm.h.
11632 (grub_efi_console_control_guid): Renamed to ...
11633 (console_control_guid): ... this.
11634 (grub_efi_loaded_image_guid): Renamed to ...
11635 (loaded_image_guid): ... this.
11636 (grub_efi_locate_handle): New function.
11637 (grub_efi_open_protocol): Likewise.
11638 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11639 GRUB_EFI_CONSOLE_CONTROL_GUID.
11640 (grub_efi_exit): Removed.
11641 (grub_stop): Likewise.
11642 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11643 (grub_exit): New function.
11644 (grub_print_device_path): Likewise.
11646 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11647 (grub_enter_rescue_mode): Register "exit".
11649 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11650 (grub_abort): New function.
11652 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11654 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11656 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11658 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11659 (grub_print_device_path): New prototype.
11660 (grub_efi_locate_handle): Likewise.
11661 (grub_efi_open_protocol): Likewise.
11663 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11664 * disk/efi/efidisk.c: Likewise.
11666 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11668 * include/grub/efi/console_control.h
11669 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11671 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11672 last 8 bytes as an array.
11673 (GRUB_EFI_DISK_IO_GUID): New macro.
11674 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11675 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11676 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11678 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11679 (struct grub_efi_device_path): Rename the member "sub_type" to
11681 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11682 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11683 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11684 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11685 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11686 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11687 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11688 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11689 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11690 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11691 (struct grub_efi_pci_device_path): New structure.
11692 (grub_efi_pci_device_path_t): New type.
11693 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11694 (struct grub_efi_pccard_device_path): New structure.
11695 (grub_efi_pccard_device_path_t): New type.
11696 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11697 (struct grub_efi_memory_mapped_device_path): New structure.
11698 (grub_efi_memory_mapped_device_path_t): New type.
11699 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11700 (struct grub_efi_vendor_device_path): New structure.
11701 (grub_efi_vendor_device_path_t): New type.
11702 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11703 (struct grub_efi_controller_device_path): New structure.
11704 (grub_efi_controller_device_path_t): New type.
11705 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11706 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11707 (struct grub_efi_acpi_device_path): New structure.
11708 (grub_efi_acpi_device_path_t): New type.
11709 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11710 (struct grub_efi_expanded_acpi_device_path): New structure.
11711 (grub_efi_expanded_acpi_device_path_t): New type.
11712 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11713 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11714 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11715 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11716 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11717 (struct grub_efi_atapi_device_path): New structure.
11718 (grub_efi_atapi_device_path_t): New type.
11719 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11720 (struct grub_efi_fibre_channel_device_path): New structure.
11721 (grub_efi_fibre_channel_device_path_t): New type.
11722 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11723 (struct grub_efi_1394_device_path): New structure.
11724 (grub_efi_1394_device_path_t): New type.
11725 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11726 (struct grub_efi_usb_device_path): New structure.
11727 (grub_efi_usb_device_path_t): New type.
11728 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11729 (struct grub_efi_usb_class_device_path): New structure.
11730 (grub_efi_usb_class_device_path_t): New type.
11731 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11732 (struct grub_efi_i2o_device_path): New structure.
11733 (grub_efi_i2o_device_path_t): New type.
11734 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11735 (struct grub_efi_mac_address_device_path): New structure.
11736 (grub_efi_mac_address_device_path_t): New type.
11737 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11738 (struct grub_efi_ipv4_device_path): New structure.
11739 (grub_efi_ipv4_device_path_t): New type.
11740 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11741 (struct grub_efi_ipv6_device_path): New structure.
11742 (grub_efi_ipv6_device_path_t): New type.
11743 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11744 (struct grub_efi_infiniband_device_path): New structure.
11745 (grub_efi_infiniband_device_path_t): New type.
11746 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11747 (struct grub_efi_uart_device_path): New structure.
11748 (grub_efi_uart_device_path_t): New type.
11749 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11750 (struct grub_efi_vendor_messaging_device_path): New structure.
11751 (grub_efi_vendor_messaging_device_path_t): New type.
11752 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11753 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11754 (struct grub_efi_hard_drive_device_path): New structure.
11755 (grub_efi_hard_drive_device_path_t): New type.
11756 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11757 (struct grub_efi_cdrom_device_path): New structure.
11758 (grub_efi_cdrom_device_path_t): New type.
11759 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11760 (struct grub_efi_vendor_media_device_path): New structure.
11761 (grub_efi_vendor_media_device_path_t): New type.
11762 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11763 (struct grub_efi_file_path_device_path): New structure.
11764 (grub_efi_file_path_device_path_t): New type.
11765 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11766 (struct grub_efi_protocol_device_path): New structure.
11767 (grub_efi_protocol_device_path_t): New type.
11768 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11769 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11770 (struct grub_efi_bios_device_path): New structure.
11771 (grub_efi_bios_device_path_t): New type.
11772 (struct grub_efi_disk_io): New structure.
11773 (grub_efi_disk_io_t): New type.
11774 (struct grub_efi_block_io_media): New structure.
11775 (grub_efi_block_io_media_t): New type.
11776 (struct grub_efi_block_io): New structure.
11777 (grub_efi_block_io_t): New type.
11779 * include/grub/misc.h (grub_stop): Removed.
11780 (grub_exit): New prototype.
11781 (grub_abort): Likewise.
11783 * include/grub/disk.h (enum grub_disk_dev_id): Added
11784 GRUB_DISK_DEVICE_EFIDISK_ID.
11786 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11787 disk/efi/efidisk.c.
11788 (kernel_syms.lst): Remove the target if an error occurs.
11790 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
11792 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11793 as it was simply too buggy.
11795 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
11797 * kern/misc.c (grub_lltoa): New function.
11798 (grub_vsprintf): Added support for the long long suffix,
11801 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
11803 * Makefile.in (LDFLAGS): Add variable.
11804 (LD): Remove variable.
11805 * configure.ac: Add -m32 to LDFLAGS.
11806 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11807 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11808 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11809 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11810 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11812 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11813 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11814 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11816 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
11818 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11819 length for unknown glyph.
11821 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11823 Add support for pre-loaded modules into the EFI port.
11825 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11826 completely. Accept one more argument DIR. The caller has changed.
11828 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11830 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11831 (grub_efi_loaded_image_guid): New variable.
11832 (grub_efi_get_loaded_image): New function.
11833 (grub_arch_modules_addr): Likewise.
11835 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11838 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11839 (struct grub_efi_loaded_image): New structure.
11840 (grub_efi_loaded_image_t): New type.
11842 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11844 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11845 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11846 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11848 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
11850 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11852 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
11854 * DISTLIST: Added include/grub/efi/console.h,
11855 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11856 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11858 * include/grub/efi/console.h: New file.
11859 * include/grub/efi/time.h: Likewise.
11860 * include/grub/i386/efi/kernel.h: Likewise.
11861 * kern/efi/init.c: Likewise.
11862 * kern/efi/mm.c: Likewise.
11863 * term/efi/console.c: Likewise.
11865 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11866 (grub_stop): Removed.
11867 (grub_get_rtc): Likewise.
11868 (grub_machine_init): Simply call grub_efi_init.
11869 (grub_machine_fini): Call grub_efi_fini.
11871 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11872 (grub_efi_output_string): Removed.
11873 (grub_efi_stall): New function.
11874 (grub_stop): Likewise.
11875 (grub_get_rtc): Likewise.
11877 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11878 (grub_efi_stall): New prototype.
11879 (grub_efi_allocate_pages): Likewise.
11880 (grub_efi_free_pages): Likewise.
11881 (grub_efi_get_memory_map): Likewise.
11882 (grub_efi_mm_init): Likewise.
11883 (grub_efi_mm_fini): Likewise.
11884 (grub_efi_init): Likewise.
11885 (grub_efi_fini): Likewise.
11887 * include/grub/i386/efi/time.h: Do not include
11888 grub/symbol.h. Include grub/efi/time.h.
11889 (GRUB_TICKS_PER_SECOND): Removed.
11890 (grub_get_rtc): Likewise.
11892 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11893 Added padding. The EFI spec is buggy.
11894 (GRUB_EFI_BLACK): New macro.
11895 (GRUB_EFI_BLUE): Likewise.
11896 (GRUB_EFI_GREEN): Likewise.
11897 (GRUB_EFI_CYAN): Likewise.
11898 (GRUB_EFI_RED): Likewise.
11899 (GRUB_EFI_MAGENTA): Likewise.
11900 (GRUB_EFI_BROWN): Likewise.
11901 (GRUB_EFI_LIGHTGRAY): Likewise.
11902 (GRUB_EFI_BRIGHT): Likewise.
11903 (GRUB_EFI_DARKGRAY): Likewise.
11904 (GRUB_EFI_LIGHTBLUE): Likewise.
11905 (GRUB_EFI_LIGHTGREEN): Likewise.
11906 (GRUB_EFI_LIGHTCYAN): Likewise.
11907 (GRUB_EFI_LIGHTRED): Likewise.
11908 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11909 (GRUB_EFI_YELLOW): Likewise.
11910 (GRUB_EFI_WHITE): Likewise.
11911 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11912 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11913 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11914 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11915 (GRUB_EFI_BACKGROUND_RED): Likewise.
11916 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11917 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11918 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11919 (GRUB_EFI_TEXT_ATTR): Likewise.
11921 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11922 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11923 (kernel_mod_HEADERS): Added efi/time.h.
11925 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11927 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11928 include/grub/efi/api.h, include/grub/efi/console_control.h,
11929 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11930 include/grub/i386/efi/time.h, kern/efi/efi.c,
11931 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11932 and util/i386/efi/grub-mkimage.c.
11934 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11936 * genmk.rb (PModule#rule): Do not export symbols if
11937 #{prefix}_EXPORTS is set to "no".
11939 * conf/i386-efi.mk: New file.
11940 * conf/i386-efi.rmk: Likewise.
11941 * include/grub/efi/api.h: Likewise.
11942 * include/grub/efi/console_control.h: Likewise.
11943 * include/grub/efi/efi.h: Likewise.
11944 * include/grub/efi/pe32.h: Likewise.
11945 * include/grub/i386/efi/time.h: Likewise.
11946 * kern/efi/efi.c: Likewise.
11947 * kern/i386/efi/init.c: Likewise.
11948 * kern/i386/efi/startup.S: Likewise.
11949 * util/i386/efi/grub-mkimage.c: Likewise.
11951 2006-04-17 Marco Gerards <marco@gnu.org>
11953 * include/grub/script.h: Include <grub/parser.h> and
11954 "grub_script.tab.h".
11955 (struct grub_lexer_param): New struct.
11956 (struct grub_parser_param): Likewise.
11957 (grub_script_create_arglist): Pass the state in an argument.
11958 (grub_script_add_arglist): Likewise.
11959 (grub_script_create_cmdline): Likewise.
11960 (grub_script_create_cmdblock): Likewise.
11961 (grub_script_create_cmdif): Likewise.
11962 (grub_script_create_cmdmenu): Likewise.
11963 (grub_script_add_cmd): Likewise.
11964 (grub_script_arg_add): Likewise.
11965 (grub_script_lexer_ref): Likewise.
11966 (grub_script_lexer_deref): Likewise.
11967 (grub_script_lexer_record_start): Likewise.
11968 (grub_script_lexer_record_stop): Likewise.
11969 (grub_script_mem_record): Likewise.
11970 (grub_script_mem_record_stop): Likewise.
11971 (grub_script_malloc): Likewise.
11972 (grub_script_yylex): Likewise.
11973 (grub_script_yyparse): Likewise.
11974 (grub_script_yyerror): Likewise.
11975 (grub_script_yylex): Likewise.
11976 (grub_script_lexer_init): Return the state.
11978 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11979 (grub_script_lexer_done): Likewise.
11980 (grub_script_lexer_getline): Likewise.
11981 (grub_script_lexer_refs): Likewise.
11982 (script): Likewise.
11983 (newscript): Likewise.
11984 (record): Likewise.
11985 (recording): Likewise.
11986 (recordpos): Likewise.
11987 (recordlen): Likewise.
11988 (grub_script_lexer_init): Return the state instead of setting
11990 (grub_script_lexer_ref): Use the newly added argument for state
11991 instead of globals.
11992 (grub_script_lexer_deref): Likewise.
11993 (grub_script_lexer_record_start): Likewise.
11994 (grub_script_lexer_record_stop): Likewise.
11995 (recordchar): Likewise.
11996 (nextchar): Likewise.
11997 (grub_script_yylex2): Likewise.
11998 (grub_script_yylex): Likewise.
11999 (grub_script_yyerror): Likewise.
12001 * normal/parser.y (func_mem): Removed variable.
12002 (menu_entry): Likewise.
12004 (%lex-param): New parser option.
12005 (%parse-param): Likewise.
12006 (script): Always return the AST.
12007 (argument): Pass the state around.
12008 (arguments): Likewise.
12009 (grubcmd): Likewise.
12010 (commands): Likewise.
12011 (function): Likewise.
12012 (menuentry): Likewise.
12013 (if_statement): Likewise.
12016 * normal/script.c (grub_script_memused): Removed variable.
12017 (grub_script_parsed): Likewise.
12018 (grub_script_malloc): Added a state argument. Use that instead of
12020 (grub_script_mem_record): Likewise.
12021 (grub_script_mem_record_stop): Likewise.
12022 (grub_script_arg_add): Likewise.
12023 (grub_script_add_arglist): Likewise.
12024 (grub_script_create_cmdline): Likewise.
12025 (grub_script_create_cmdif): Likewise.
12026 (grub_script_create_cmdmenu): Likewise.
12027 (grub_script_add_cmd): Likewise.
12028 (grub_script_parse): Setup the state before calling the parser.
12030 2006-04-16 Marco Gerards <marco@gnu.org>
12032 * normal/command.c (grub_command_init): Remove the title command.
12034 * normal/lexer.c (grub_script_yylex): Renamed from this...
12035 (grub_script_yylex2): ... to this.
12036 (grub_script_yylex): New function. Temporary
12037 introduced to filter some tokens.
12038 (grub_script_yyerror): Print a newline.
12040 * normal/main.c (read_config_file): Output information about the
12041 lines that contain errors. Wait for a key after all lines have
12042 been processed. Don't return an empty menu.
12044 * normal/parser.y (func_mem): Don't initialize.
12045 (menu_entry): Likewise.
12046 (err): New variable.
12047 (script): Don't return anything when an error was encountered.
12048 (ws, returns): Removed rules.
12049 (argument): Disabled concatenated variable support.
12050 (arguments): Remove explicit separators.
12051 (grubcmd): Likewise.
12052 (function): Likewise.
12053 (menuentry): Likewise.
12055 (commands): Likewise. Add error handling.
12057 * normal/script.c (grub_script_create_cmdline): If
12058 `grub_script_parsed' is 0, assume the parser encountered an error.
12060 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12062 * configure.ac: Add support for EFI. Fix the typo
12063 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12065 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12067 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12068 foreign multibyte characters should be shown correctly.
12070 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12072 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12074 (read_config_file): Made it to close file before returning.
12076 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12078 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12079 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12080 video/i386/pc/vbefill.c.
12082 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12083 video/i386/pc/vbefill.c.
12085 * include/grub/video.h (grub_video_blit_format): New enum.
12086 (grub_video_mode_info): Added new member blit_format.
12087 (grub_video_get_blit_format): New function prototype.
12089 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12090 function prototype.
12091 (grub_video_vbe_map_rgb): Likewise.
12092 (grub_video_vbe_unmap_color): Likewise.
12094 * include/grub/i386/pc/vbeblit.h: New file.
12096 * include/grub/i386/pc/vbefill.h: New file.
12098 * video/video.c (grub_video_get_blit_format): New function.
12099 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12100 (grub_video_vbe_map_rgb): Likewise.
12101 (grub_video_vbe_unmap_color): Likewise.
12103 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12105 (grub_video_vbe_blit_render_target): Changed to use more optimized
12107 (grub_video_vbe_setup): Added detection for optimized settings.
12108 (grub_video_vbe_create_render_target): Likewise.
12110 * video/i386/pc/vbeblit.c: New file.
12112 * video/i386/pc/vbefill.c: New file.
12114 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12116 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12119 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12120 parsing to support both hex and dec ranges. If filename was missing
12121 show usage information.
12123 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12125 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12126 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12128 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12129 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12130 (video_mod_SOURCES): Added.
12131 (video_mod_CFLAGS): Likewise.
12132 (video_mod_LDFLAGS): Likewise.
12133 (gfxterm_mod_SOURCES): Likewise.
12134 (gfxterm_mod_CFLAGS): Likewise.
12135 (gfxterm_mod_LDFLAGS): Likewise.
12136 (videotest_mod_SOURCES): Likewise.
12137 (videotest_mod_CFLAGS): Likewise.
12138 (videotest_mod_LDFLAGS): Likewise.
12139 (vesafb_mod_SOURCES): Removed.
12140 (vesafb_mod_CFLAGS): Likewise.
12141 (vesafb_mod_LDFLAGS): Likewise.
12142 (vga_mod_SOURCES): Likewise.
12143 (vga_mod_CFLAGS): Likewise.
12144 (vga_mod_LDFLAGS): Likewise.
12146 * commands/videotest.c: New file.
12148 * font/manager.c (fill_with_default_glyph): Modified to use
12150 (grub_font_get_glyph): Likewise.
12151 (fontmanager): Renamed from this...
12152 (font_manager): ... to this.
12154 * include/grub/font.h (grub_font_glyph): Added new structure.
12155 (grub_font_get_glyph): Modified to use grub_font_glyph.
12157 * include/grub/misc.h (grub_abs): Added as inline function.
12159 * include/grub/video.h: New file.
12161 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12162 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12163 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12164 (grub_vbe_get_controller_info): Renamed from this...
12165 (grub_vbe_bios_get_controller_info): ... to this.
12166 (grub_vbe_get_mode_info): Renamed from this...
12167 (grub_vbe_bios_get_mode_info): ... to this.
12168 (grub_vbe_set_mode): Renamed from this...
12169 (grub_vbe_bios_set_mode): ... to this.
12170 (grub_vbe_get_mode): Renamed from this...
12171 (grub_vbe_bios_get_mode): ... to this.
12172 (grub_vbe_set_memory_window): Renamed from this...
12173 (grub_vbe_bios_set_memory_window): ... to this.
12174 (grub_vbe_get_memory_window): Renamed from this...
12175 (grub_vbe_bios_get_memory_window): ... to this.
12176 (grub_vbe_set_scanline_length): Renamed from this...
12177 (grub_vbe_set_scanline_length): ... to this.
12178 (grub_vbe_get_scanline_length): Renamed from this...
12179 (grub_vbe_bios_get_scanline_length): ... to this.
12180 (grub_vbe_set_display_start): Renamed from this...
12181 (grub_vbe_bios_set_display_start): ... to this.
12182 (grub_vbe_get_display_start): Renamed from this...
12183 (grub_vbe_bios_get_display_start): ... to this.
12184 (grub_vbe_set_palette_data): Renamed from this...
12185 (grub_vbe_bios_set_palette_data): ... to this.
12186 (grub_vbe_set_pixel_rgb): Removed.
12187 (grub_vbe_set_pixel_index): Likewise.
12189 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12191 (grub_vbe_bios_get_controller_info): ... to this.
12192 (grub_vbe_get_mode_info): Renamed from this...
12193 (grub_vbe_bios_get_mode_info): ... to this.
12194 (grub_vbe_set_mode): Renamed from this...
12195 (grub_vbe_bios_set_mode): ... to this.
12196 (grub_vbe_get_mode): Renamed from this...
12197 (grub_vbe_bios_get_mode): ... to this.
12198 (grub_vbe_set_memory_window): Renamed from this...
12199 (grub_vbe_bios_set_memory_window): ... to this.
12200 (grub_vbe_get_memory_window): Renamed from this...
12201 (grub_vbe_bios_get_memory_window): ... to this.
12202 (grub_vbe_set_scanline_length): Renamed from this...
12203 (grub_vbe_set_scanline_length): ... to this.
12204 (grub_vbe_get_scanline_length): Renamed from this...
12205 (grub_vbe_bios_get_scanline_length): ... to this.
12206 (grub_vbe_set_display_start): Renamed from this...
12207 (grub_vbe_bios_set_display_start): ... to this.
12208 (grub_vbe_get_display_start): Renamed from this...
12209 (grub_vbe_bios_get_display_start): ... to this.
12210 (grub_vbe_set_palette_data): Renamed from this...
12211 (grub_vbe_bios_set_palette_data): ... to this.
12212 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12213 getting corrupted after calling it. Added more pushes and pops.
12214 (grub_vbe_bios_set_mode): Likewise.
12215 (grub_vbe_bios_get_mode): Likewise.
12216 (grub_vbe_bios_get_memory_window): Likewise.
12217 (grub_vbe_bios_set_scanline_length): Likewise.
12218 (grub_vbe_bios_get_scanline_length): Likewise.
12219 (grub_vbe_bios_get_display_start): Likewise.
12220 (grub_vbe_bios_set_palette_data): Likewise.
12222 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12223 (cl_insert): Likewise.
12224 (cl_delete): Likewise.
12226 * term/gfxterm.c: New file.
12228 * term/i386/pc/vesafb.c: Removed file.
12230 * video/video.c: New file.
12232 * video/i386/pc/vbe.c (real2pm): Added new function.
12233 (grub_video_vbe_draw_pixel): Likewise.
12234 (grub_video_vbe_get_video_ptr): Likewise.
12235 (grub_video_vbe_get_pixel): Likewise
12236 (grub_video_vbe_init): Likewise.
12237 (grub_video_vbe_fini): Likewise.
12238 (grub_video_vbe_setup): Likewise.
12239 (grub_video_vbe_get_info): Likewise.
12240 (grub_video_vbe_set_palette): Likewise.
12241 (grub_video_vbe_get_palette): Likewise.
12242 (grub_video_vbe_set_viewport): Likewise.
12243 (grub_video_vbe_get_viewport): Likewise.
12244 (grub_video_vbe_map_color): Likewise.
12245 (grub_video_vbe_map_rgb): Likewise.
12246 (grub_video_vbe_map_rgba): Likewise.
12247 (grub_video_vbe_unmap_color): Likewise.
12248 (grub_video_vbe_fill_rect): Likewise.
12249 (grub_video_vbe_blit_glyph): Likewise.
12250 (grub_video_vbe_blit_bitmap): Likewise.
12251 (grub_video_vbe_blit_render_target): Likewise.
12252 (grub_video_vbe_scroll): Likewise.
12253 (grub_video_vbe_swap_buffers): Likewise.
12254 (grub_video_vbe_create_render_target): Likewise.
12255 (grub_video_vbe_delete_render_target): Likewise.
12256 (grub_video_vbe_set_active_render_target): Likewise.
12257 (grub_vbe_set_pixel_rgb): Remove function.
12258 (grub_vbe_set_pixel_index): Likewise.
12259 (index_color_mode): Remove static variable.
12260 (active_mode): Likewise.
12261 (framebuffer): Likewise.
12262 (bytes_per_scan_line): Likewise.
12263 (grub_video_vbe_adapter): Added new static variable.
12264 (framebuffer): Likewise.
12265 (render_target): Likewise.
12266 (initial_mode): Likewise.
12267 (mode_in_use): Likewise.
12268 (mode_list): Likewise.
12270 2006-03-10 Marco Gerards <marco@gnu.org>
12272 * configure.ac (AC_INIT): Bumped to 1.93.
12274 * DISTLIST: Added `include/grub/hfs.h'.
12276 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12278 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12279 18H, which might help the BIOS falling back to next boot media.
12281 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12283 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12284 Poe Chen <poe.poechen@gmail.com>.
12286 2006-01-17 Marco Gerards <marco@gnu.org>
12288 * include/grub/normal.h: Include <grub/script.h>.
12289 (grub_command_list): Removed struct.
12290 (grub_command_list_t): Removed type.
12291 (grub_menu_entry): Remove members `num' and `command_list'. Add
12292 members `commands' and `sourcecode'.
12293 * include/grub/script.h: Add inclusion guards.
12294 (grub_script_cmd_menuentry): New struct.
12295 (grub_script_execute_menuentry): New prototype.
12296 (grub_script_lexer_record_start): Likewise.
12297 (grub_script_lexer_record_stop): Likewise.
12298 * normal/execute.c (grub_script_execute_menuentry): New function.
12299 * normal/lexer.c (record, recording, recordpos, recordlen): New
12301 (grub_script_lexer_record_start): New function.
12302 (grub_script_lexer_record_stop): Likewise.
12303 (recordchar): Likewise.
12304 (nextchar): Likewise.
12305 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12306 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12307 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12308 (current_menu): New variable.
12309 (free_menu): Mainly rewritten.
12310 (grub_normal_menu_addentry): New function.
12311 (read_config_file): Rewritten.
12312 * normal/menu.c (run_menu_entry): Mainly rewritten.
12313 * normal/menu_entry.c (make_screen): Rewritten the code to insert
12315 (run): Mainly rewritten.
12316 * normal/parser.y (menu_entry): New variable.
12317 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12318 (menuentry): New rule.
12319 (command): Add `menuentry'.
12320 (if_statement): Allow additional returns before `fi'.
12321 * normal/script.c (grub_script_create_cmdmenu): New function.
12323 2006-01-03 Marco Gerards <marco@gnu.org>
12325 * INSTALL: GNU Bison is required.
12326 * configure.ac: Rewritten the test to detect Bison.
12327 * Makefile.in (YACC): New variable. Reported by Xun Sun
12328 <xun.sun.cn@gmail.com>.
12330 2006-01-03 Marco Gerards <marco@gnu.org>
12332 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12333 the HFS+ filesystem to filesystem blocks.
12334 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12335 GCC warning is silenced.
12337 2006-01-03 Marco Gerards <marco@gnu.org>
12339 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12340 read from disk from big endian to host byte order.
12342 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12344 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12346 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12347 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12348 embedded HFS+ filesystem.
12349 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12350 (grub_hfs_sblock): Move from here...
12351 * include/grub/hfs.h: To here... New file.
12352 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12354 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12356 (grub_hfsplus_volheader): Change type of member `magic' to
12358 (grub_hfsplus_data): Add new member `embedded_offset'.
12359 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12361 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12362 Calculate the offset.
12364 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12366 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12368 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12370 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12372 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12373 ENV->NAME is NULL after allocating ENV->VALUE.
12375 2005-12-25 Marco Gerards <marco@gnu.org>
12377 * kern/env.c (grub_env_set): Rewritten the error handling code.
12379 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12381 * geninit.sh: Made more robust, and more portable.
12383 2005-12-25 Marco Gerards <marco@gnu.org>
12385 Add support for Apple HFS+ filesystems.
12387 * fs/hfsplus.c: New file.
12389 * DISTLIST: Added `fs/hfsplus.c'.
12391 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12392 (hfsplus_mod_SOURCES): New variable.
12393 (hfsplus_mod_CFLAGS): Likewise.
12394 (hfsplus_mod_LDFLAGS): Likewise.
12395 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12396 (grub_setup_SOURCES): Likewise.
12397 (grub_mkdevicemap_SOURCES): Likewise.
12398 (grub_emu_SOURCES): Likewise.
12399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12401 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12403 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12405 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12407 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12408 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12409 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12410 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12411 normal/lexer.c, normal/parser.y, normal/script.c, and
12413 Removed kern/sparc64/cache.c.
12415 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12416 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12419 * configure.ac (AC_INIT): Bumped to 1.92.
12421 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12423 * kern/err.c (grub_error_push): Added new function to support error
12425 (grub_error_pop): Likewise.
12426 (grub_error_stack_items): New local variable to support error stacks.
12427 (grub_error_stack_pos): Likewise.
12428 (grub_error_stack_assert): Likewise.
12429 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12431 (grub_print_error): Added support to print errors from error stack.
12433 * include/grub/err.h (grub_error_push): Added function prototype.
12434 (grub_error_pop): Likewise.
12436 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12438 * configure.ac: Accept `powerpc64' as host_cpu.
12439 (amd64): Rename to `biarch32'.
12441 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12442 non-cacheline-aligned addresses.
12444 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12445 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12446 if `size' is non-zero.
12448 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
12450 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12451 and `cd' to make sure the filename is not prefixed with a
12453 (pkgdata_MODULES): Add `gpt.mod'.
12454 (gpt_mod_SOURCES): New variable.
12455 (gpt_mod_CFLAGS): Likewise.
12456 (gpt_mod_LDFLAGS): Likewise.
12458 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12460 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12463 * partmap/gpt.c: New file.
12465 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12466 GPT partition map is detected.
12468 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12470 * commands/i386/pc/play.c: New file.
12471 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12472 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12475 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
12477 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12478 ((unused))' to silence gcc warning.
12480 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12482 * configure.ac: Correct `AC_PROG_YACC' test.
12484 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12486 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12487 check before installing files.
12489 2005-11-22 Mike Small <smallm@panix.com>
12491 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12492 number regex so multidigit numbers are recognized correctly.
12494 2005-11-22 Mike Small <smallm@panix.com>
12496 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12497 debugging message before attempting to claim memory.
12498 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12499 multiple addresses in case of failure.
12501 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12503 * term/tparm.c (get_space): Remove empty `if' statement.
12505 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12507 * kern/parser.c (check_varstate): Rename `state' to 's'.
12509 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12511 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12512 variable definitions to the beginning of each function. Sort stack
12514 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12515 `buf' argument to `char *'.
12517 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12519 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12520 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12521 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12522 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12523 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12524 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12525 configfile.mod, search.mod, gzio.mod and test.mod.
12526 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12527 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12528 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12529 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12530 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12531 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12532 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12533 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12534 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12535 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12536 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12537 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12538 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12539 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12540 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12541 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12542 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12543 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12544 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12545 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12546 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12547 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12548 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12550 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12552 (pkgdata_MODULES): Add test.mod.
12554 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12556 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12557 appending to variables with "+=".
12558 (PModule): Use full pathname to generate *.lst filenames.
12560 * Makefile.in: Fixed list rules moved from genmk.rb.
12561 (.DELETE_ON_ERROR): New special target.
12562 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12564 * conf/i386-pc.rmk: Include conf/common.mk.
12565 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12566 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12567 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12568 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12569 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12570 configfile.mod, search.mod, gzio.mod and test.mod.
12571 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12572 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12573 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12574 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12575 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12576 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12577 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12578 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12579 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12580 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12581 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12582 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12583 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12584 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12585 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12586 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12587 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12588 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12589 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12590 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12591 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12592 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12593 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12595 * conf/common.rmk: ... to here. New file.
12597 * conf/common.mk: New file.
12599 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12601 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12602 (grub_script.tab.c): ... here.
12604 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12605 (grub_script.tab.c): ... here.
12607 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12608 (grub_script.tab.c): ... here.
12610 * normal/command.c (grub_command_find): Fixed a memory leak of
12611 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12613 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12615 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12616 "@" which marks the start of a comment on ARM.
12617 (VARIABLE): Likewise.
12619 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12621 Add support for Linux/ADFS partition tables.
12623 * partmap/acorn.c: New file.
12625 * include/grub/acorn_filecore.h: Likewise.
12627 * DISTLIST: Added `partmap/acorn.c' and
12628 `include/grub/acorn_filecore.h'.
12630 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12632 (pkgdata_MODULES): Add `acorn.mod'.
12633 (acorn_mod_SOURCES): New variable.
12634 (acorn_mod_CFLAGS): Likewise.
12636 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12638 (pkgdata_MODULES): Add `acorn.mod'.
12639 (acorn_mod_SOURCES): New variable.
12640 (acorn_mod_CFLAGS): Likewise.
12642 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12643 (pkgdata_MODULES): Add `acorn.mod'.
12644 (acorn_mod_SOURCES): New variable.
12645 (acorn_mod_CFLAGS): Likewise.
12646 (acorn_mod_LDFLAGS): Likewise.
12648 * include/types.h (grub_disk_addr_t): New typedef.
12650 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
12652 * geninit.sh: New file.
12654 * geninitheader.sh: Likewise.
12656 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12657 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12658 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12659 * commands/configfile.c (grub_configfile_init)
12660 (grub_configfile_fini): Likewise.
12661 * commands/default.c (grub_default_init, grub_default_fini):
12663 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12664 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12665 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12666 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12668 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12669 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12671 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12672 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12674 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12676 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12678 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12679 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12680 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12681 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12682 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12683 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12684 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12685 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12686 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12687 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12688 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12689 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12690 * partmap/amiga.c (grub_amiga_partition_map_init)
12691 (grub_amiga_partition_map_fini): Likewise.
12692 * partmap/apple.c (grub_apple_partition_map_init)
12693 (grub_apple_partition_map_fini): Likewise.
12694 * partmap/pc.c (grub_pc_partition_map_init)
12695 (grub_pc_partition_map_fini): Likewise.
12696 * partmap/sun.c (grub_sun_partition_map_init,
12697 grub_sun_partition_map_fini): Likewise.
12698 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12701 * util/grub-emu.c: Include <grub_modules_init.h>.
12702 (main): Don't initialize and de-initialize any modules directly,
12703 use `grub_init_all' and `grub_fini_all' instead.
12705 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12706 `grub_vesafb_mod_init'.
12707 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12709 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12710 `grub_vga_mod_init'. Updated all users.
12711 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12713 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12714 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12717 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12718 Generate a function to initialize the module in utilities.
12719 Updated all callers.
12720 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12721 initialize the module in utilities. Updated all callers.
12723 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12725 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12726 escape sequence and a literal ^L to clear the screen.
12728 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12729 when returning from Open Firmware.
12731 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12733 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12734 (grub_ofconsole_height): Likewise.
12735 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12736 manually insert a '\n'.
12737 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12738 `grub_ofconsole_height'. Return early if these are already set.
12740 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12742 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12743 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12744 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12745 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12746 and `normal/script.c'.
12747 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12748 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12749 (test_mod_SOURCES): New variable.
12750 (test_mod_CFLAGS): Likewise.
12751 (test_mod_LDFLAGS): Likewise.
12752 (pkgdata_MODULES): Add `test.mod'.
12753 (grub_script.tab.c): New rule.
12754 (grub_script.tab.h): Likewise.
12756 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
12758 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12759 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12760 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12761 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12762 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12763 (test_mod_SOURCES): New variable.
12764 (test_mod_CFLAGS): Likewise.
12765 (pkgdata_MODULES): Add `test.mod'.
12766 (grub_script.tab.c): New rule.
12767 (grub_script.tab.h): Likewise.
12769 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
12771 Add initial scripting support.
12773 * commands/test.c: New file.
12774 * include/grub/script.h: Likewise.
12775 * normal/execute.c: Likewise.
12776 * normal/function.c: Likewise.
12777 * normal/lexer.c: Likewise.
12778 * normal/parser.y: Likewise.
12779 * normal/script.c: Likewise.
12781 * configure.ac: Add `AC_PROG_YACC' test.
12783 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12784 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12785 `normal/function.c' and `normal/script.c'.
12786 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12787 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12788 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12790 (pkgdata_MODULES): Add `test.mod'.
12791 (grub_script.tab.c): New rule.
12792 (grub_script.tab.h): Likewise.
12794 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12796 * include/grub/normal.h (grub_test_init): New prototype.
12797 (grub_test_fini): Likewise.
12799 * normal/command.c: Include <grub/script.h>.
12800 (grub_command_execute): Rewritten.
12802 * util/grub-emu.c (main): Call `grub_test_init' and
12805 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12807 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12809 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12810 there are no pending characters.
12812 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12814 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12815 `grub_strndup' to drop device arguments. Replace unnecessary
12816 `grub_strndup' with `grub_strdup'.
12818 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12820 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12821 `debug' environment variable has been set.
12823 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
12825 * Makefile.in (install-local): Use $(DATA).
12826 (uninstall): Likewise.
12827 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12828 (sbin_UTILITIES): ... to here.
12829 (sbin_SCRIPTS): New variable.
12830 (grub_install_SOURCES): New variable.
12831 * util/powerpc/ieee1275/grub-install.in: New file.
12832 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12834 (add_segments): Call `grub_util_get_path'.
12836 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12838 From Timothy Baldwin:
12839 * commands/ls.c (grub_ls_list_files): Close FILE with
12841 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12843 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
12845 * include/grub/parser.h: New file.
12847 * kern/parser.c: Likewise.
12849 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12850 (grub_setup_SOURCES): Likewise.
12851 (grub_probefs_SOURCES): Likewise.
12852 (grub_emu_SOURCES): Likewise.
12853 (kernel_img_HEADERS): Add `parser.h'.
12855 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12856 (grub_emu_SOURCES): Add `kern/parser.c'.
12857 (grubof_SOURCES): Likewise.
12859 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12860 (grubof_SOURCES): Add `kern/parser.c'.
12862 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12864 * kern/misc.c (grub_split_cmdline): Removed function.
12866 * kern/rescue.c: Include <grub/parser.h>.
12867 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12868 of `grub_split_cmdline'.
12870 * normal/command.c: Include <grub/parser.h>.
12871 (grub_command_execute): Use `grub_parser_split_cmdline' instead
12872 of `grub_split_cmdline'.
12874 * normal/completion.c: Include <grub/parser.h>.
12875 (cmdline_state): New variable.
12876 (iterate_dir): End the filename with a quote depending on the
12877 command line state.
12878 (get_state): new function.
12879 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12880 split the arguments and determine the current argument. When the
12881 argument string is not quoted, escape all spaces.
12883 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12885 * normal/sparc64/setjmp.S: New file.
12887 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12889 * include/grub/sparc64/libgcc.h: New file.
12890 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12891 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12892 normal/sparc64/setjmp.c.
12894 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12896 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12897 * kern/sparc64/cache.S: New file.
12898 * kern/sparc64/cache.c: Removed.
12899 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12900 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12902 (COMMON_LDFLAGS): Add -melf64_sparc.
12903 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12904 (grubof_SOURCES): Use cache.S instead of cache.c.
12905 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12906 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12907 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12909 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12910 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12911 (linux_mod_CFLAGS): Commented out.
12912 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12913 out because module isn't built.
12914 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12915 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12916 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12917 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12918 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12919 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12920 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12921 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12922 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12923 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12924 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12925 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12926 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12927 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12929 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12931 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12932 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12933 longer, because HFS should not be used on PC.
12935 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12937 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12938 consistently within the loop.
12940 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
12942 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12943 directory can not be read.
12945 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12947 * configure.ac (AC_INIT): Increase the version number to 1.91.
12949 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12950 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12951 term/i386/pc/serial.c.
12953 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12955 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12956 file size must be permitted.
12958 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12959 between %ah and %al.
12961 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12963 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12965 Call the hook with a NUL-terminated filename.
12966 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12969 * kern/term.c (cursor_state): New variable.
12970 (grub_term_set_current): Reset the cursor state on a new
12972 (grub_setcursor): Rewritten to use CURSOR_STATE.
12973 (grub_getcursor): New function.
12975 * include/grub/term.h (grub_getcursor): New prototype.
12977 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12978 integers on ARM. Reported by Timothy Baldwin
12979 <T.E.Baldwin99@members.leeds.ac.uk>.
12981 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
12983 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12985 (grub_sfs_dir): Likewise.
12987 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
12989 Add support for the SFS filesystem.
12991 * fs/sfs.c: New file.
12993 * DISTLIST: Added `fs/sfs.c'.
12995 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12996 (grub_probefs_SOURCES): Likewise.
12997 (grub_emu_SOURCES): Likewise.
12998 (pkgdata_MODULES): Add `sfs.mod'.
12999 (sfs_mod_SOURCES): New variable.
13000 (sfs_mod_CFLAGS): Likewise.
13001 (sfs_mod_LDFLAGS): Likewise.
13003 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13004 (pkgdata_MODULES): Add `sfs.mod'.
13005 (sfs_mod_SOURCES): New variable.
13006 (sfs_mod_CFLAGS): Likewise.
13008 * util/grub-emu.c (main): Call `grub_sfs_init' and
13011 * include/grub/fs.h (grub_sfs_init): New prototype.
13012 (grub_sfs_fini): Likewise.
13014 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
13016 Add support for the AFFS filesystem.
13018 * fs/affs.c: New file.
13020 * DISTLIST: Added `fs/affs.c'.
13022 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13023 (grub_probefs_SOURCES): Likewise.
13024 (grub_emu_SOURCES): Likewise.
13025 (pkgdata_MODULES): Add `affs.mod'.
13026 (affs_mod_SOURCES): New variable.
13027 (affs_mod_CFLAGS): Likewise.
13028 (affs_mod_LDFLAGS): Likewise.
13030 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13031 (pkgdata_MODULES): Add `affs.mod'.
13032 (affs_mod_SOURCES): New variable.
13033 (affs_mod_CFLAGS): Likewise.
13035 * util/grub-emu.c (main): Call `grub_affs_init' and
13038 * include/grub/fs.h (grub_affs_init): New prototype.
13039 (grub_affs_fini): Likewise.
13041 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13043 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13045 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13047 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13050 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13053 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13054 (COMMON_LDFLAGS): New variable.
13055 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13056 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13057 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13058 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13059 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13060 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13061 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13062 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13063 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13064 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13065 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13066 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13067 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13068 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13069 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13071 (normal_mod_ASFLAGS): Add `-m32'.
13073 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13074 (grub_host_size_t, grub_host_ssize_t): New types.
13075 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13076 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13077 `GRUB_HOST_SIZEOF_VOID_P'.
13079 * include/grub/kernel.h (struct grub_module_header): Type of
13080 member offset changed to `grub_host_off_t'. Type of member size
13081 changed to `grub_host_size_t'.
13082 (struct grub_module_info): Type of member offset changed to
13083 `grub_host_off_t'. Type of member size changed to
13084 `grub_host_size_t'.
13086 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13088 Make GRUB's kernel compliant to Multiboot Specification.
13090 * kern/i386/pc/startup.S (multiboot_header): New label.
13091 (multiboot_entry): Likewise.
13092 (multiboot_trampoline): Likewise.
13094 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13095 Increased to 0x4A0.
13097 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13098 put parentheses after a question mark.
13099 [!GRUB_UTIL] (my_mod): New variable.
13101 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13103 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13105 Adds support for the XFS filesystem. Btrees are not supported
13108 * fs/xfs.c: New file.
13110 * DISTLIST: Added `fs/xfs.c'.
13112 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13113 (grub_probefs_SOURCES): Likewise.
13114 (grub_emu_SOURCES): Likewise.
13115 (pkgdata_MODULES): Add `xfs.mod'.
13116 (xfs_mod_SOURCES): New variable.
13117 (xfs_mod_CFLAGS): Likewise.
13119 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13120 (pkgdata_MODULES): Add `xfs.mod'.
13121 (xfs_mod_SOURCES): New variable.
13122 (xfs_mod_CFLAGS): Likewise.
13124 * util/grub-emu.c (main): Call `grub_xfs_init' and
13127 * include/grub/fs.h (grub_xfs_init): New prototype.
13128 (grub_xfs_fini): Likewise.
13131 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13133 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13134 color modes, allow greater than 16 colors to be configured as
13137 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13139 * normal/completion.c (complete_arguments): Add the qualifier
13140 const into OPTIONS.
13142 From Omniflux <omniflux+lists@omniflux.com>:
13143 * include/grub/terminfo.h: New file.
13144 * include/grub/tparm.h: Likewise.
13145 * include/grub/i386/pc/serial.h: Likewise.
13146 * term/terminfo.c: Likewise.
13147 * term/tparm.c: Likewise.
13148 * term/i386/pc/serial.c: Likewise.
13149 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13151 (terminfo_mod_SOURCES): New variable.
13152 (terminfo_mod_CFLAGS): Likewise.
13153 (serial_mod_SOURCES): Likewise.
13154 (serial_mod_CFLAGS): Likewise.
13156 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13158 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13159 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13160 and kern/powerpc/ieee1275/cmain.c, respectively.
13162 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13163 * kern/powerpc/ieee1275/crt0.S: ... here.
13165 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13166 * kern/powerpc/ieee1275/cmain.c: ... here.
13168 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13169 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13170 instead of boot/powerpc/ieee1275/crt0.S and
13171 boot/powerpc/ieee1275/cmain.c, respectively.
13173 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13174 sectors. It was not used anyway.
13176 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13178 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13179 `unused parameter' warning.
13181 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13183 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13185 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13188 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13190 * include/grub/normal.h (enum grub_completion_type): Added
13191 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13193 * normal/cmdline.c (print_completion): Handle
13194 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13195 * normal/menu_entry.c (store_completion): Likewise.
13197 * normal/completion.c (complete_arguments): New function.
13198 (grub_normal_do_completion): Call `complete_arguments' when the
13199 current words start with a dash.
13201 2005-08-27 Marco Gerards <metgerards@student.han.nl>
13203 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13204 `gzio.mod' instead of `io.mod').
13206 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13208 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13209 (DISTDIRS): Added io and video.
13210 Rewrite the search routine to make an output consistently.
13212 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13213 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13214 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13215 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13216 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13217 util/powerpc/ieee1275/misc.c.
13219 * include/grub/gzio.h: New file.
13220 * io/gzio.c: Likewise.
13222 * kern/file.c (grub_file_close): Call grub_device_close only if
13223 FILE->DEVICE is not NULL.
13225 * include/grub/mm.h [!NULL] (NULL): New macro.
13227 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13230 (pkgdata_MODULES): Added gzio.mod.
13231 (gzio_mod_SOURCES): New variable.
13232 (gzio_mod_CFLAGS): Likewise.
13234 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13235 (pkgdata_MODULES): Added gzio.mod.
13236 (gzio_mod_SOURCES): New variable.
13237 (gzio_mod_CFLAGS): Likewise.
13239 * commands/cat.c: Include grub/gzio.h.
13240 (grub_cmd_cat): Use grub_gzfile_open instead of
13243 * commands/cmp.c: Include grub/gzio.h.
13244 (grub_cmd_cmp): Use grub_gzfile_open instead of
13247 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13248 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13250 (grub_rescue_cmd_module): Likewise.
13252 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13254 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13255 kern/sparc64/ieee1275/init.c because it contains _start.
13256 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13258 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13260 * configure.ac: Add support for sparc64 host with ieee1275
13262 * configure: Generated from configure.ac.
13263 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13265 (grub_ofdisk_read): Likewise.
13266 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13267 pointers as (void *) to remove a warning.
13268 (grub_ofdisk_close): Likewise.
13269 (grub_ofdisk_read): Likewise.
13270 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13271 returns, so make it return void to remove a warning.
13272 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13273 Corresponding prototype change.
13274 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13275 values, and cast the pointers as (void *) to remove a warning.
13276 (grub_mm_dump): Likewise.
13277 * conf/sparc64-ieee1275.mk: New file.
13278 * conf/sparc64-ieee1275.rmk: Likewise.
13279 * include/grub/sparc64/setjmp.h: Likewise.
13280 * include/grub/sparc64/types.h: Likewise.
13281 * include/grub/sparc64/ieee1275/console.h: Likewise.
13282 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13283 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13284 * include/grub/sparc64/ieee1275/time.h: Likewise.
13285 * kern/sparc64/cache.c: Likewise.
13286 * kern/sparc64/dl.c: Likewise.
13287 * kern/sparc64/ieee1275/init.c: Likewise.
13288 * kern/sparc64/ieee1275/openfw.c: Likewise.
13290 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13292 * util/console.c (grub_ncurses_putchar): If C is greater than
13293 0x7f, set C to a question mark.
13294 (grub_ncurses_getcharwidth): New function.
13295 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13298 * normal/menu.c (print_entry): Made aware of Unicode. First,
13299 convert TITLE to UCS-4, and predict the cursor position by
13302 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13304 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13306 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13308 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13309 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13312 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13313 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13314 grub_strcpy and grub_strlen. Take it into account that a space
13315 character is inserted as a delimiter.
13317 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13319 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13320 invalid magic in the error.
13322 * commands/search.c: New file.
13324 * util/grub-emu.c (main): Call grub_search_init and
13327 * kern/rescue.c (grub_rescue_print_disks): Removed.
13328 (grub_rescue_print_devices): New function.
13329 (grub_rescue_cmd_ls): Use grub_device_iterate with
13330 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13331 grub_rescue_print_disks.
13333 * kern/partition.c (grub_partition_iterate): Return the result of
13334 PARTMAP->ITERATE instead of GRUB_ERRNO.
13336 * kern/device.c: Include grub/partition.h.
13337 (grub_device_iterate): New function.
13339 * include/grub/partition.h (grub_partition_iterate): Return int
13340 instead of grub_err_t.
13342 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13344 [GRUB_UTIL] (grub_search_fini): Likewise.
13346 * include/grub/device.h (grub_device_iterate): New prototype.
13348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13350 (pkgdata_MODULES): Added search.mod.
13351 (search_mod_SOURCES): New variable.
13352 (search_mod_CFLAGS): Likewise.
13354 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13355 (pkgdata_MODULES): Added search.mod.
13356 (search_mod_SOURCES): New variable.
13357 (search_mod_CFLAGS): Likewise.
13359 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13360 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13361 All callers changed.
13363 * DISTLIST: Added commands/search.c.
13365 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13367 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13369 (grub_getcharwidth): New function.
13371 * kern/misc.c (grub_utf8_to_ucs4): New function.
13373 * include/grub/term.h (struct grub_term): Added a new member
13375 (grub_getcharwidth): New prototype.
13377 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13379 * term/i386/pc/console.c (map_char): New function. Segregated from
13380 grub_console_putchar.
13381 (grub_console_putchar): Use map_char.
13382 (grub_console_getcharwidth): New function.
13383 (grub_console_term): Specified grub_console_getcharwidth as
13386 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13387 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13389 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13391 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13392 on grub_strtoul completely.
13393 (write_char): Declare local variables in the beginning of the
13395 (grub_vesafb_getcharwidth): New function.
13396 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13399 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13401 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13402 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13403 commands/i386/pc/vbetest.c.
13405 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13406 call grub_vbe_get_controller_info again, because the returned
13407 information is volatile.
13408 (grub_vbe_set_video_mode): Mostly rewritten.
13409 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13410 grub_vbe_status_t correctly.
13411 (grub_vbe_get_video_mode_info): Likewise.
13412 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13413 several if statements.
13415 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13416 * commands/i386/pc/vbeinfo.c: ... this.
13418 * commands/i386/pc/vbe_test.c: Renamed to ...
13419 * commands/i386/pc/vbetest.c: ... this.
13421 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13423 (grub_cmd_vbeinfo): ... this. Save video modes before
13424 iterating. Skip a video mode, if it is not available, not enough
13425 information is given or it is monochrome. Show the memory
13426 model. Leave the interpretation of MODEVAR to grub_strtoul
13428 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13429 (GRUB_MOD_FINI): Likewise.
13431 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13432 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13433 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13434 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13435 grub_strtoul completely.
13436 (real2pm): Removed.
13437 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13438 (GRUB_MOD_FINI): Likewise.
13440 * normal/misc.c: Include grub/mm.h.
13442 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13443 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13444 (vbe_list_modes_mod_SOURCES): Removed.
13445 (vbe_list_modes_mod_CFLAGS): Likewise.
13446 (vbe_test_mod_SOURCES): Likewise.
13447 (vbe_test_mod_CFLAGS): Likewise.
13448 (vbeinfo_mod_SOURCES): New variable.
13449 (vbeinfo_mod_CFLAGS): Likewise.
13450 (vbetest_mod_SOURCES): Likewise.
13451 (vbetest_mod_CFLAGS): Likewise.
13453 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13455 * normal/misc.c: New file.
13457 * DISTLIST: Added normal/misc.c.
13459 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13460 DISK to HOOK. Call HOOK with DISK.
13461 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13462 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13463 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13465 * normal/menu_entry.c (struct screen): Added a new member
13466 "completion_shown".
13467 (completion_buffer): New global variable.
13468 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13469 (store_completion): New function.
13470 (complete): Likewise.
13471 (clear_completions): Likewise.
13472 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13473 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13474 a tab, call complete.
13476 * normal/completion.c (disk_dev): Removed.
13477 (print_simple_completion): Likewise.
13478 (print_partition_completion): Likewise.
13479 (print_func): New global variable.
13480 (add_completion): Do not take the arguments WHAT or PRINT any
13481 longer. Added a new argument TYPE. Instead of printing directly,
13482 call PRINT_FUNC if not NULL.
13483 All callers changed.
13484 (complete_device): Use a local variable DEV instead of
13485 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13486 (grub_normal_do_completion): Take a new argument HOOK. Do not
13487 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13488 empty string, return NULL instead.
13489 All callers changed.
13491 * normal/cmdline.c (print_completion): New function.
13493 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13495 All callers changed.
13497 * kern/disk.c (grub_print_partinfo): Removed.
13499 * include/grub/partition.h (struct grub_partition_map): Add a new
13500 argument DISK into HOOK of ITERATE.
13501 (grub_partition_iterate): Add a new argument DISK to HOOK.
13503 * include/grub/normal.h (enum grub_completion_type): New enum.
13504 (grub_completion_type_t): New type.
13505 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13506 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13507 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13508 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13509 (grub_normal_do_completion): Added a new argument HOOK.
13510 (grub_normal_print_device_info): New prototype.
13512 * include/grub/disk.h (grub_print_partinfo): Removed.
13514 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13515 (normal_mod_SOURCES): Likewise.
13516 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13517 (normal_mod_SOURCES): Likewise.
13519 * commands/ls.c (grub_ls_list_disks): Use
13520 grub_normal_print_device_info instead of grub_print_partinfo. Free
13522 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13523 duplicating the code.
13525 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13527 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13528 follow GCS more precisely.
13529 * commands/i386/pc/vbe_test.c: Likewise.
13530 * include/grub/i386/pc/vbe.h: Likewise.
13531 * term/i386/pc/vesafb.c: Likewise.
13532 * video/i386/pc/vbe.c: Likewise.
13534 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13536 * DISTLIST: Added term/i386/pc/vesafb.c
13537 DISTLIST: Added video/i386/pc/vbe.c
13538 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13539 DISTLIST: Added commands/i386/pc/vbe_test.c.
13540 * commands/i386/pc/vbe_list_modes.c: New file.
13541 * commands/i386/pc/vbe_test.c: Likewise.
13542 * term/i386/pc/vesafb.c: Likewise.
13543 * video/i386/pc/vbe.c: Likewise.
13544 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13545 (grub_vbe_probe) Added prototype.
13546 (grub_vbe_set_video_mode) Likewise.
13547 (grub_vbe_get_video_mode) Likewise.
13548 (grub_vbe_get_video_mode_info) Likewise.
13549 (grub_vbe_set_pixel_rgb) Likewise.
13550 (grub_vbe_set_pixel_index) Likewise.
13551 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13552 (pkgdata_MODULES): Added vesafb.mod.
13553 (pkgdata_MODULES): Added vbe_list_modes.mod.
13554 (pkgdata_MODULES): Added vbe_test.mod.
13555 (vbe_mod_SOURCES): Added.
13556 (vbe_mod_CFLAGS): Likewise.
13557 (vesafb_mod_SOURCES): Likewise.
13558 (vesafb_mod_CFLAGS): Likewise.
13559 (vbe_list_modes_mod_SOURCES): Likewise.
13560 (vbe_list_modes_mod_CFLAGS): Likewise.
13561 (vbe_test_mod_SOURCES): Likewise.
13562 (vbe_test_mod_CFLAGS): Likewise.
13564 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13566 * normal/command.c (grub_command_execute): If INTERACTIVE is
13567 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13568 CMDLINE. Disable the pager if INTERACTIVE is true.
13569 All callers are changed.
13571 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13572 before reading a config file.
13573 * normal/main.c (read_config_file): Even if a command is not
13574 found, register it if it is within an entry.
13576 * util/grub-emu.c: Include sys/types.h and unistd.h.
13577 (options): Added --hold.
13578 (struct arguments): Added a new member "hold".
13579 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13581 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13582 cleared by a debugger, if it is not zero.
13584 * include/grub/normal.h (grub_command_execute): Add an argument
13587 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13589 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13591 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13593 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13594 program with another one, because the old one didn't detect a bug
13595 in gcc-3.4. Always use regparm 2, because the new test is still
13596 not enough for gcc-4.0. Someone must investigate a simple test
13597 case which detects a bug in gcc-4.0.
13599 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13601 * DISTLIST: Added normal/completion.c.
13603 * normal/completion.c: New file.
13605 * term/i386/pc/console.c (grub_console_getwh): New function.
13606 (grub_console_term): Assign grub_console_getwh to getwh.
13608 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13609 function is defined in normal/completion.c as
13610 grub_normal_do_completion.
13611 (grub_cmdline_get): Use grub_normal_do_completion instead of
13614 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13615 returns non-zero, otherwise return 0.
13616 (grub_partition_iterate): First, probe the partition map. Then,
13617 call ITERATE only for this partition map.
13619 * kern/misc.c (grub_strncmp): Rewritten.
13621 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13622 returns non-zero. Otherwise return 0.
13624 * include/grub/partition.h (grub_partition_map_iterate): Return
13625 int instead of void.
13627 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13629 * include/grub/misc.h (grub_strncmp): Change the type of N to
13632 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13635 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13636 unsigned explicitly before comparing it with I.
13638 * kern/main.c (grub_env_write_root): Add the attribute unused into
13641 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13642 normal/completion.c.
13643 (normal_mod_SOURCES): Likewise.
13644 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13645 (normal_mod_SOURCES): Likewise.
13647 * normal/command.c (grub_iterate_commands): If ITERATE returns
13648 non-zero, return one immediately.
13650 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13652 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13653 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13655 (grub_vbe_get_controller_info): New function.
13656 (grub_vbe_get_mode_info): Likewise.
13657 (grub_vbe_set_mode): Likewise.
13658 (grub_vbe_get_mode): Likewise.
13659 (grub_vbe_set_memory_window): Likewise.
13660 (grub_vbe_get_memory_window): Likewise.
13661 (grub_vbe_set_scanline_length): Likewise.
13662 (grub_vbe_get_scanline_length): Likewise.
13663 (grub_vbe_set_display_start): Likewise.
13664 (grub_vbe_get_display_start): Likewise.
13665 (grub_vbe_set_palette_data): Likewise.
13666 * include/grub/i386/pc/vbe.h: New file.
13668 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13670 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13671 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13672 * DISTLIST: Likewise.
13673 * kern/ieee1275/of.c: Moved to ...
13674 * kern/ieee1275/ieee1275.c: ... here.
13676 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13678 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13679 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13680 Pass 0 as `end' parameter to grub_strtoul().
13682 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13684 * include/grub/powerpc/ieee1275/console.h: Do not include
13685 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13687 (grub_console_cur_color): Remove i386-specific prototype.
13688 (grub_console_real_putchar): Likewise.
13689 (grub_console_checkkey): Likewise.
13690 (grub_console_getkey): Likewise.
13691 (grub_console_getxy): Likewise.
13692 (grub_console_gotoxy): Likewise.
13693 (grub_console_cls): Likewise.
13694 (grub_console_setcursor): Likewise.
13695 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13696 Include <grub/machine/console.h>.
13697 * term/ieee1275/ofconsole.c: Likewise.
13699 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13701 * Makefile.in (LIBLZO): New variable.
13703 * configure.ac: Check for LZO version 2.
13705 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13706 lzo/lzo1x.h instead of lzo1x.h.
13708 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13711 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13712 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13714 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13715 copying the data from PARTITION to P.
13717 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13719 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13720 negative, unload the module.
13722 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13723 map is "pc_partition_map" but not "pc".
13724 (usage): Fix the description. The options are --boot-image and
13725 --core-image but not --boot-file or --core-file.
13726 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13727 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13730 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13731 --core-file. Specify INSTALL_DEVICE as an argument.
13733 * util/console.c: Include config.h.
13734 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13735 [HAVE_NCURSES_H]: Include ncurses.h.
13736 [HAVE_CURSES_H]: Include curses.h.
13737 [!A_NORMAL] (A_NORMAL): Defined as zero.
13738 [!A_STANDOUT] (A_STANDOUT): Likewise.
13740 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13742 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13744 * configure.ac: Check for curses libraries and headers.
13746 * Makefile.in (LIBCURSES): New variable.
13748 * genmk.rb (Script::rule): Set the executable bits.
13750 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13751 name of the PC partition map is "pc_partition_map" but not "pc".
13753 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13755 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13756 (modules): Likewise.
13757 (usage): Added descriptions for --modules and --grub-probefs.
13758 Handle --modules and --grub-probefs. Save the arguments in MODULES
13759 and GRUB_PROBEFS, respectively.
13760 Auto-detect a filesystem module against GRUBDIR. If the result is
13761 empty and modules are not specified explicitly, abort the
13762 installation. Add the result to MODULES.
13764 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13765 disk/powerpc/ieee1275/ofdisk.c,
13766 include/grub/powerpc/ieee1275/init.h and
13767 term/powerpc/ieee1275/ofconsole.c.
13768 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13769 term/ieee1275/ofconsole.c.
13771 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13773 * COPYING: Upgraded to the latest version. Only the address of the
13774 FSF office has changed.
13776 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13778 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13779 kern/ieee1275.c with kern/ieee1275/of.c.
13781 * kern/ieee1275.c: Moved to ...
13782 * kern/ieee1275/of.c: ... here.
13784 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13786 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
13789 * config.guess: Updated to the latest version from gnulib.
13790 * config.sub: Likewise.
13791 * install.sh: Likewise.
13792 * mkinstalldirs: Likewise.
13794 * include/grub/console.h: Removed. This file is arch-specific. Do
13795 not put this in include/grub.
13797 * include/grub/i386/pc/console.h: Resurrected.
13799 * util/console.c: Include grub/machine/console.h instead of
13801 * util/grub-emu.c: Likewise.
13803 2005-08-04 Marco Gerards <metgerards@student.han.nl>
13805 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13808 From Vincent Pelletier <subdino2004@yahoo.fr>
13809 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13810 Redefined to use grub_getwh.
13811 (grub_term): New member named getwh.
13812 (grub_getwh): New prototype.
13813 * kern/term.c (grub_getwh): New function.
13814 * term/i386/pc/console.c (grub_console_getwh): New function.
13815 (grub_console_term): New member `getwh'.
13816 * term/i386/pc/vga.c (grub_vga_getwh): New function.
13817 (grub_vga_term): New member `getwh'.
13818 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
13820 (grub_ofconsole_getw): New function.
13821 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13822 (grub_ofconsole_term): New field named getwh and new initial
13825 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
13827 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13828 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
13829 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13830 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13831 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13832 of <grub/machine/ieee1275.h>.
13833 * commands/ieee1275/reboot.c: Likewise.
13834 * boot/powerpc/ieee1275/ieee1275.c: Move ...
13835 * kern/ieee1275.c: ... to here. All users updated. Change all
13836 parameter structs to use new type `grub_ieee1275_cell_t'.
13837 * term/powerpc/ieee1275/ofconsole.c: Move ...
13838 * term/ieee1275/ofconsole.c: ... to here. All users updated.
13839 * disk/powerpc/ieee1275/ofdisk.c: Move ...
13840 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
13841 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13843 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13844 Remove unused prototypes. All users updated.
13845 * include/grub/powerpc/ieee1275/console.h: Removed.
13846 * include/grub/powerpc/ieee1275/ieee1275.h: Define
13847 `grub_ieee1275_cell_t'.
13848 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13849 Cast comparisons with -1 to the correct type.
13850 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13851 type to match `grub_ieee1275_entry_fn'.
13853 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
13855 * DISTLIST: Added util/i386/pc/grub-probefs.c.
13857 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13858 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13860 (grub_probefs_SOURCES): New variable.
13862 * util/i386/pc/grub-probefs.c: New file.
13864 * util/i386/pc/grub-setup.c (main): Call
13865 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13866 grub_hfs_init and grub_jfs_init to initialize the system. Call
13867 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13868 grub_pc_partition_map_fini to finish the system.
13870 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
13872 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13874 (grub_multiboot_load_elf32): Likewise.
13875 (grub_multiboot_is_elf64): Likewise.
13876 (grub_multiboot_load_elf64): Likewise.
13877 (grub_multiboot_load_elf): Likewise.
13878 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13879 an ELF32 or ELF64 file.
13880 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13882 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13883 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13884 NULL before calling FS->LABEL.
13885 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13886 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13887 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13888 before calling FS->LABEL.
13890 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13892 * util/i386/pc/grub-install.in (datadir): New variable.
13894 (pkgdatadir): New variable.
13895 (pkglibdir): Removed.
13897 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13899 * DISTLIST: Added util/i386/pc/grub-install.in.
13901 * util/i386/pc/grub-install.in: New file.
13903 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13904 (grub_install_SOURCES): Likewise.
13906 * genmk.rb: Added support for scripts.
13907 (Script): New class.
13908 (scripts): New variable.
13910 * Makefile.in (install-local): Install sbin_SCRIPTS by
13912 (uninstall): Remove sbin_SCRIPTS.
13914 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13915 device, try to get a GRUB device by
13916 grub_util_biosdisk_get_grub_dev.
13919 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13920 description for --device-map.
13922 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13924 Change the semantics of variable hooks. They now return strings
13925 instead of error values.
13927 * util/i386/pc/grub-setup.c: Include grub/env.h.
13928 (setup): Use grub_device_set_root instead of grub_env_set.
13930 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13931 grub_env_get instead of grub_device_set_root and
13932 grub_device_get_root, respectively.
13934 * kern/main.c (grub_env_write_root): New function.
13935 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13936 grub_env_set instead of grub_device_set_root.
13938 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13940 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13941 rather than calling ENV->WRITE_HOOK afterwards.
13942 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13943 passing a pointer of a pointer.
13944 (grub_register_variable_hook): Change the types of "read_hook" and
13945 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13947 Allocate the default empty string on the heap, because this string
13948 may be freed later.
13950 * kern/device.c: Include grub/env.h.
13951 (grub_device_set_root): Removed.
13952 (grub_device_get_root): Likewise.
13953 (grub_device_open): Use grub_env_get instead of
13954 grub_device_get_root.
13956 * include/grub/env.h (grub_env_read_hook_t): New type.
13957 (grub_env_write_hook_t): Likewise.
13958 (grub_env_var): Change the types of "read_hook" and "write_hook"
13959 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13960 (grub_register_variable_hook): Likewise.
13962 * include/grub/device.h (grub_device_set_root): Removed.
13963 (grub_device_set_root): Likewise.
13965 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13966 make sure that DIRNAME terminates with '/', so that
13967 grub_fat_find_dir will fail if PATH is not a directory.
13969 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13971 Use the qualifier auto for print_files and print_files_long.
13972 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13974 Put a newline only if there is no error.
13975 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13978 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13980 * kern/partition.c (grub_partition_probe): Initialize PART to
13981 NULL. Otherwise, when no partition map is registered, this returns
13984 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13986 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13987 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13990 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13992 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13993 information on each device, if it does not have partitions. Print
13994 "Device" instead of "Disk", because this function is not specific
13997 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13998 static to ensure that it is put on the memory rather than a
14001 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14003 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14004 (grub_cat_init): Likewise.
14005 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14006 (options): Likewise.
14007 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14008 (grub_configfile_init): Likewise.
14009 * font/manager.c (GRUB_MOD_INIT): Likewise.
14010 * commands/help.c (GRUB_MOD_INIT): Likewise.
14011 (grub_help_init): Likewise.
14012 * normal/command.c (grub_command_init): Likewise.
14013 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14014 * disk/loopback.c (grub_loop_init): Likewise.
14015 (GRUB_MOD_INIT): Likewise.
14016 * commands/ls.c (grub_ls_init): Likewise.
14017 (GRUB_MOD_INIT): Likewise.
14018 (options): Likewise.
14019 * commands/boot.c (grub_boot_init): Likewise.
14020 (GRUB_MOD_INIT): Likewise.
14021 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14022 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14023 (GRUB_MOD_INIT): Likewise.
14024 * commands/cmp.c (grub_cmp_init): Likewise.
14025 (GRUB_MOD_INIT): Likewise.
14027 * normal/arg.c: Use <> instead of "" to include header files.
14028 (SHORT_ARG_HELP): New macro.
14029 (SHORT_ARG_USAGE): Likewise.
14030 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14031 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14033 (find_short): Check if C is 'h' or 'u' explicitly.
14034 (grub_arg_show_help): Use space characters instead of tabs. Treat
14035 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14036 are shown with --help and --usage only if they are not used for
14037 the command itself.
14038 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14041 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14042 const into "longarg". Change the type of "shortarg" to int.
14044 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14046 * boot/i386/pc/boot.S (boot_drive_check): New label.
14048 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14051 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14052 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14054 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14056 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14057 When turning off Gate A20, skip the check and return immediately,
14058 because this is not fatal usually.
14060 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14062 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14063 be 0x7C00 instead of 0x8000.
14065 * boot/i386/pc/pxeboot.S: Rewritten.
14067 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14069 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14072 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14074 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14075 robustness. This routine now supports a BIOS call and System
14076 Control Port A to modify the gate A20.
14078 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14079 Increased to 0x440.
14081 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14083 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14084 device path and resulting ihandle.
14085 (grub_ofdisk_close): dprintf the ihandle being closed.
14086 (grub_ofdisk_read): dprintf function parameters.
14087 * kern/mm.c (grub_mm_init_region): Likewise.
14088 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14089 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14090 size, and boot arguments.
14091 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14092 before loading into memory.
14093 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14094 before loading into memory.
14096 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14098 * kern/mm.c: Added much documentation.
14099 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14100 8, set to 5 instead of 8.
14102 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14104 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14106 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14107 (grub_mkdevicemap_SOURCES): New variable.
14109 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14110 lib/device.c of GRUB Legacy.
14112 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14114 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14115 instead of PATH is NULL.
14117 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14119 * commands/cmp.c (BUFFER_SIZE): New macro.
14120 (grub_cmd_cmp): Close the right file at the right time. Compare
14121 only data just read. Don't report files of different size as
14122 identical. Dynamically allocate buffers. Move variable
14123 declarations at the beginning of function.
14125 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14127 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14130 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14132 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14133 when backspace is pressed at beginning of line.
14135 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14137 * DISTLIST: Added genfslist.sh.
14139 * normal/main.c (fs_module_list): New variable.
14140 (autoload_fs_module): New function.
14141 (read_fs_list): Likewise.
14142 (grub_normal_execute): Call read_fs_list.
14144 * kern/fs.c (grub_fs_autoload_hook): New variable.
14145 (grub_fs_probe): Added support for auto-loading.
14147 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14148 (grub_fs_module_list_t): New type.
14150 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14151 (grub_fs_autoload_hook): New prototype.
14153 * genfslist.sh: New file.
14155 * genmk.rb: Added a rule to generate a filesystem list.
14157 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14159 * configure.ac: Fix the test for cross-compiling.
14161 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14162 define GRUB_UTIL anymore.
14164 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14165 so this function works on other systems than just big endian.
14166 (load_modules): Likewise.
14167 (add_segments): Likewise.
14169 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14171 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14172 contains `l' modifier, get a long from va_arg().
14174 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14176 * kern/mm.c (grub_free): If the next free block which is being
14177 merged is the first free block, set the first block to the block
14179 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14181 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14183 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14184 `grub_ieee1275_chosen'.
14186 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14188 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14189 (grub_ieee1275_chosen): New variable.
14190 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14192 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14193 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14194 Rename first argument to `phandle' for consistency.
14195 (grub_ieee1275_get_property_length): Likewise.
14196 (grub_ieee1275_next_property): Likewise. Change type of first argument
14197 to grub_ieee1275_phandle_t.
14198 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14199 Move export next to declaration.
14200 (grub_ieee1275_chosen): New variable.
14201 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14202 Correct cosmetic typo.
14203 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14204 `grub_ieee1275_chosen'.
14205 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14206 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14207 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14208 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14209 `grub_ieee1275_chosen'.
14211 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14213 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14215 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14216 /chosen/bootargs as "variable=value" pairs.
14218 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14220 * include/grub/misc.h (grub_dprintf): New macro.
14221 (grub_real_dprintf): New prototype.
14222 (grub_strword): Likewise.
14223 (grub_iswordseparator): Likewise.
14224 * kern/misc.c (grub_real_dprintf): New function.
14225 (grub_strword): Likewise.
14226 (grub_iswordseparator): Likewise.
14228 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14230 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14231 (roundup): Remove macro.
14232 (grub_ieee1275_flags): Make static.
14233 (grub_ieee1275_realmode): Remove.
14234 (grub_ieee1275_test_flag): New function.
14235 (grub_ieee1275_set_flag): Likewise.
14236 (find_options): Rename to `grub_ieee1275_find_options'; update
14237 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14238 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14239 (cmain): New prototype.
14240 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14241 `grub_ieee1275_flags' directly.
14242 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14243 machine/biosdisk.h.
14244 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14245 Don't include grub/machine/init.h.
14246 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14247 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14249 (grub_ieee1275_realmode): Likewise.
14250 (grub_ieee1275_flag): New enum.
14251 (grub_ieee1275_test_flag): New prototype.
14252 (grub_ieee1275_set_flag): New prototype.
14253 * include/grub/powerpc/ieee1275/init.h: Remove file.
14254 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14255 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14256 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14257 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14259 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14260 `grub_ieee1275_test_flag'.
14261 (grub_ieee1275_encode_devname): Likewise.
14263 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14265 * include/grub/powerpc/ieee1275/ieee1275.h
14266 (grub_ieee1275_encode_devname): New prototype.
14267 (grub_ieee1275_get_filename): Likewise.
14268 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14270 (grub_set_prefix): Likewise.
14271 (grub_machine_init): Call grub_set_prefix.
14272 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14273 (grub_parse_type): New enum.
14274 (grub_ieee1275_get_devargs): New function.
14275 (grub_ieee1275_get_devname): Likewise.
14276 (grub_ieee1275_parse_args): Likewise.
14277 (grub_ieee1275_get_filename): Likewise.
14278 (grub_ieee1275_encode_devname): Likewise.
14280 2005-03-30 Marco Gerards <metgerards@student.han.nl>
14282 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14283 `grub_loader_unset'.
14285 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14287 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14288 instead of grub_ieee1275_interpret.
14289 (grub_halt_init): New function.
14290 (grub_halt_fini): Likewise.
14291 (GRUB_MOD_INIT): Correct message grammar.
14292 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14293 instead of grub_ieee1275_interpret.
14294 (grub_reboot_init): New function.
14295 (grub_reboot_fini): Likewise.
14296 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14297 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14298 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14299 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14300 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14302 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14304 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14306 (grub_halt): Likewise.
14307 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14308 (cmain): Remove __attribute__((unused)).
14309 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14310 (grub_heap_len): Likewise.
14311 (grub_machine_fini): New function.
14312 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14313 (grub_halt): Likewise.
14314 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14316 * util/powerpc/ieee1275/misc.c: New file.
14318 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14320 * DISTLIST: New file.
14321 * gendistlist.sh: Likewise.
14323 * Makefile.in (COMMON_DISTFILES): Removed.
14324 (BOOT_DISTFILES): Likewise.
14325 (CONF_DISTFILES): Likewise.
14326 (DISK_DISTFILES): Likewise.
14327 (FS_DISTFILES): Likewise.
14328 (INCLUDE_DISTFILES): Likewise.
14329 (KERN_DISTFILES): Likewise.
14330 (LOADER_DISTFILES): Likewise.
14331 (TERM_DISTFILES): Likewise.
14332 (UTIL_DISTFILES): Likewise.
14333 (DISTFILES): Likewise.
14334 (uninstall): Uninstall files in $(pkgdata_DATA).
14335 (DISTLIST): New target.
14336 (distdir): Use the contents of the file DISTLIST to get a list of
14339 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14341 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14342 descriptor. This is ported from GRUB Legacy.
14344 * gencmdlist.sh: Added an extra semicolon to make it work with
14345 old sed versions. Reported by Robert Bihlmeyer
14346 <robbe@orcus.priv.at>.
14348 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
14350 Automatic loading of commands is supported.
14352 * normal/main.c (read_command_list): New function.
14353 (grub_normal_execute): Call read_command_list.
14355 * normal/command.c (grub_register_command): Return zero or CMD.
14356 Allocate CMD->NAME from the heap.
14357 Initialize CMD->MODULE_NAME to zero.
14358 Find the same name as well. If the same command is found and it is
14359 a dummy command, overwrite members. If it is not a dummy command,
14361 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14362 (grub_command_find): If a dummy command is found, load a module
14363 and retry to find a command only once.
14365 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14366 make sure that each command is loaded.
14368 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14370 (struct grub_command): Remove const from the member `name'.
14371 Add a new member `module_name'.
14372 (grub_register_command): Return grub_command_t.
14374 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14375 sure that each command is loaded.
14377 * genmk.rb (PModule::rule): Specify a module name without the
14378 suffix ".mod" to gencmdlist.sh.
14380 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14382 * gencmdlist.sh: New file.
14384 * genmk.rb (PModule::rule): Generate a rule for a command list.
14386 Generate command.lst from $(COMMANDFILES).
14388 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14389 (DATA): Added $(pkgdata_DATA).
14390 (install-local): Install files in $(pkgdata_DATA).
14392 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14394 * term/i386/pc/vga.c (debug_command): Removed.
14395 (GRUB_MOD_INIT): Do not register the command "debug".
14397 From Hollis Blanchard:
14398 * commands/configfile.c: New file.
14399 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14400 commands/configfile.c.
14401 (pkgdata_MODULES): Added configfile.mod.
14402 (configfile_mod_SOURCES): New variable.
14403 (configfile_mod_CFLAGS): Likewise.
14404 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14405 commands/configfile.c.
14406 (pkgdata_MODULES): Added configfile.mod.
14407 (configfile_mod_SOURCES): New variable.
14408 (configfile_mod_CFLAGS): Likewise.
14409 * util/grub-emu.c (main): Call grub_configfile_init and
14410 grub_configfile_fini.
14411 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14413 [GRUB_UTIL] (grub_configfile_fini): Likewise.
14415 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14417 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14420 * commands/help.c (grub_cmd_help): Do not print newlines after
14421 the last command in print_command_help.
14423 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14425 * commands/default.h: New file.
14426 * commands/timeout.h: Likewise.
14427 * normal/context.c: Likewise.
14429 * util/misc.c: Do not include sys/times.h.
14430 Include sys/time.h and grub/machine/time.h.
14431 (grub_get_rtc): Rewritten with gettimeofday.
14433 * util/grub-emu.c (main): Call grub_default_init and
14434 grub_timeout_init before grub_normal_init, and call
14435 grub_timeout_fini and grub_default_fini after grub_main.
14437 * util/console.c (grub_ncurses_checkkey): Return the read
14440 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14443 * normal/main.c (read_config_file): Push MENU. If this fails,
14444 print an error and wait for a user input.
14445 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14446 If a menu is empty or an error occurs, pop MENU.
14447 (grub_normal_execute): Pop and free MENU after grub_menu_run
14450 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14452 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14454 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14456 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14458 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14461 * include/grub/normal.h (struct grub_menu_list): New struct.
14462 (grub_menu_list_t): New type.
14463 (struct grub_context): New struct.
14464 (grub_context_t): New type.
14465 (grub_register_command): Got rid of EXPORT_FUNC.
14466 (grub_unregister_command): Likewise.
14467 (grub_context_get): New prototype.
14468 (grub_context_get_current_menu): Likewise.
14469 (grub_context_push_menu): Likewise.
14470 (grub_context_pop_menu): Likewise.
14471 [GRUB_UTIL] (grub_default_init): Likewise.
14472 [GRUB_UTIL] (grub_default_fini): Likewise.
14473 [GRUB_UTIL] (grub_timeout_init): Likewise.
14474 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14476 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14477 commands/timeout.c and normal/context.c.
14478 (pkgdata_MODULES): Added default.mod and timeout.mod.
14479 (normal_mod_SOURCES): Added normal/context.c.
14480 (default_mod_SOURCES): New variable.
14481 (default_mod_CFLAGS): Likewise.
14482 (timeout_mod_SOURCES): Likewise.
14483 (timeout_mod_CFLAGS): Likewise.
14484 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14486 (pkgdata_MODULES): Added default.mod and timeout.mod.
14487 (normal_mod_SOURCES): Added normal/context.c.
14488 (default_mod_SOURCES): New variable.
14489 (default_mod_CFLAGS): Likewise.
14490 (timeout_mod_SOURCES): Likewise.
14491 (timeout_mod_CFLAGS): Likewise.
14493 * Makefile.in (all-local): Added $(MKFILES).
14495 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14497 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14498 (grub_emu_SOURCES): Likewise.
14499 (pkgdata_MODULES): Add `sun.mod'.
14500 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14501 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14503 (pkgdata_MODULES): Add `sun.mod'.
14504 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14505 * include/grub/partition.h (grub_sun_partition_map_init): New
14507 (grub_sun_partition_map_fini): Likewise.
14508 * partmap/sun.c: New file.
14509 * util/grub-emu.c (main): Initialize and de-initialize the sun
14510 partitionmap support.
14512 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14514 This implements an Emacs-like menu entry editor.
14516 * normal/menu_entry.c: New file.
14518 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14519 characters to ASCII.
14520 (saved_char): New variable.
14521 (grub_ncurses_checkkey): Rewritten completely.
14522 (grub_ncurses_getkey): Likewise.
14523 (grub_ncurses_init): Call raw instead of cbreak.
14525 * normal/menu.c (print_entry): Do not put a space.
14526 (init_page): Renamed to ...
14527 (grub_menu_init_page): ... this. All callers changed.
14528 (edit_menu_entry): Removed.
14529 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14531 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14533 * kern/misc.c (grub_vprintf): Call grub_refresh.
14535 * normal/menu.c (DISP_LEFT): Renamed to ...
14536 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14537 * normal/menu.c (DISP_UP): Renamed to ...
14538 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14539 * normal/menu.c (DISP_RIGHT): Renamed to ...
14540 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14541 * normal/menu.c (DISP_DOWN): Renamed to ...
14542 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14543 * normal/menu.c (DISP_HLINE): Renamed to ...
14544 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14545 * normal/menu.c (DISP_VLINE): Renamed to ...
14546 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14547 * normal/menu.c (DISP_UL): Renamed to ...
14548 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14549 * normal/menu.c (DISP_UR): Renamed to ...
14550 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14551 * normal/menu.c (DISP_LL): Renamed to ...
14552 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14553 * normal/menu.c (DISP_LR): Renamed to ...
14554 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14555 * normal/menu.c (TERM_WIDTH): Renamed to ...
14556 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14557 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14558 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14559 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14560 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14561 * normal/menu.c (TERM_MARGIN): Renamed to ...
14562 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14563 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14564 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14565 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14566 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14567 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14568 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14569 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14570 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14571 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14572 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14573 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14574 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14575 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14576 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14577 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14578 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14579 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14580 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14581 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14582 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14583 All callers changed.
14585 * include/grub/normal.h: New prototype.
14587 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14588 normal/menu_entry.c.
14589 (normal_mod_SOURCES): Likewise.
14590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14591 (normal_mod_SOURCES): Likewise.
14593 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14595 * include/grub/normal.h (grub_halt_init): New prototype.
14596 (grub_halt_fini): Likewise.
14597 (grub_reboot_init): Likewise.
14598 (grub_reboot_fini): Likewise.
14600 * util/grub-emu.c: Include signal.h.
14601 (main_env): New global variable.
14602 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14604 (grub_machine_fini): New function.
14605 (main): Call grub_halt_init and grub_reboot_init before
14606 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14607 Call setjmp with MAIN_ENV to go back afterwards.
14608 Call grub_machine_fini right before return.
14610 * include/grub/util/misc.h: Include setjmp.h.
14611 (main_env): New prototype.
14613 * include/grub/kernel.h (grub_machine_fini): New prototype.
14614 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14615 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14617 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14618 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14619 * term/i386/pc/console.c (grub_console_fini): Likewise.
14621 * util/i386/pc/misc.c: New file.
14623 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14624 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14625 commands/i386/pc/reboot.c.
14627 2005-02-14 Guillem Jover <guillem@hadrons.org>
14629 * include/grub/dl.h (grub_dl_check_header): New prototype.
14630 (grub_arch_dl_check_header): Change return type to grub_err_t,
14631 remove size parameter and export function. Update all callers.
14632 * kern/dl.c (grub_dl_check_header): New function.
14633 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14634 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14635 are inside the core.
14636 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14637 independent ELF header checks.
14638 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14639 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14640 `grub_dl_check_header' instead of explicit checks. Check for the
14642 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14643 `grub_dl_check_header' instead of explicit checks. Remove arch
14644 specific ELF header checks.
14646 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14649 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14651 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14652 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14654 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14656 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14657 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14658 (part_map_iterate): Clear `grub_errno' and return 0 if
14659 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14660 * partmap/amiga.c (amiga_partition_map_iterate): Return
14661 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14662 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14664 2005-02-01 Guillem Jover <guillem@hadrons.org>
14666 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14669 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14671 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14673 (grub_rescue_cmd_linux): New prototype.
14674 (grub_rescue_cmd_initrd): Likewise.
14675 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14677 (grub_linux_release_mem): Release the memory for the initrd.
14678 (grub_load_linux): Renamed from this...
14679 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14680 Changed `entry' not to be static. Loop over memory regions to
14681 find another one when the default fails.
14682 (grub_rescue_cmd_initrd): New function.
14683 (grub_linux_init): Remove function.
14684 (grub_linux_fini): Likewise.
14685 (GRUB_MOD_INIT): Register `initrd'.
14686 (GRUB_MOD_FINI): Unregister `initrd'.
14687 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14689 (grub_linux_normal_fini): Likewise.
14690 (GRUB_MOD_INIT): Register `initrd'.
14691 (GRUB_MOD_FINI): Unregister `initrd'.
14693 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14695 * commands/help.c: New file.
14696 * normal/arg.c (show_help): Renamed to...
14697 (grub_arg_show_help): ... this.
14698 * commands/i386/pc/halt.c: New file.
14699 * commands/i386/pc/reboot.c: Likewise.
14700 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14701 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14702 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14703 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14705 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14707 (pkgdata_MODULES): Add `help.mod'.
14708 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14709 * grub/i386/pc/init.h (grub_reboot): New prototype.
14710 (grub_halt): Likewise.
14711 * include/grub/normal.h (grub_arg_show_help): New prototype.
14712 (grub_help_init): Likewise.
14713 (grub_help_fini): Likewise.
14714 * util/grub-emu.c (main): Initialize and deinitialize the help
14717 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14719 * normal/command.c (grub_command_init): Fixed the description of
14720 the `set' and `unset' commands.
14722 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14724 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14726 * commands/ieee1275/halt.c: New file.
14727 * commands/ieee1275/reboot.c: Likewise.
14728 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14729 `__attribute__ ((unused))'. Some GCS related fixed.
14730 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14731 (grub_suspend_fini): Likewise.
14732 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14734 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14735 (halt_mod_CFLAGS): New variables.
14736 * include/grub/powerpc/ieee1275/ieee1275.h
14737 (grub_ieee1275_interpret): New prototype.
14739 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14741 * include/grub/misc.h (memmove): New prototype.
14742 (memcpy): Likewise.
14744 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14746 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14747 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14749 2005-01-22 Marco Gerards <metgerards@student.han.nl>
14751 * kern/misc.c (grub_strndup): Function rewritten.
14753 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14755 * normal/menu.c (TERM_WIDTH): Macro redefined.
14756 (TERM_TOP_BORDER_Y): Likewise.
14757 (draw_border): Replaced while-loop by a for-loop. Make the number
14758 of lines consistent with the number of lines displayed in
14759 print_entries. Added a margin below the rectangle.
14760 (print_entry): Make the entry fit in the rectangle.
14761 (print_entries): Display the scroll arrows next to the right
14764 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14766 * fs/minix.c (grub_minix_find_file): Reserve more space for
14767 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14768 `grub_strncpy' to copy `path' into it.
14770 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14772 Add the loopback device, a device via which files can be accessed
14775 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14776 (pkgdata_MODULES): Add loopback.mod.
14777 (loopback_mod_SOURCES): New variable.
14778 (loopback_mod_CFLAGS): Likewise.
14779 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14781 (pkgdata_MODULES): Add loopback.mod.
14782 (loopback_mod_SOURCES): New variable.
14783 (loopback_mod_CFLAGS): Likewise.
14784 * disk/loopback.c: new file.
14785 * include/grub/normal.h (grub_loop_init): New prototype.
14786 (grub_loop_fini): New prototype.
14787 * util/grub-emu.c (main): Initialize and de-initialize loopback
14789 * include/grub/disk.h (grub_disk_dev_id): Add
14790 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14792 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
14794 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14796 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14797 (suspend_mod_SOURCES): New variable.
14798 (suspend_mod_CFLAGS): Likewise.
14799 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14801 * commands/ieee1275/suspend.c: New file.
14803 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14805 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
14806 ((unused))' to `__attribute__ ((used))'.
14807 (GRUB_MOD_FINI): Likewise.
14808 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14809 * genmk.rb (PModule): Assign space to common symbols when linking
14812 2005-01-20 Marco Gerards <metgerards@student.han.nl>
14814 * include/grub/mm.h (grub_mm_init_region): Change the type of the
14815 `unsigned' arguments to `grub_size_t'.
14816 (grub_malloc): Likewise.
14817 (grub_realloc): Likewise.
14818 (grub_memalign): Likewise.
14819 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14820 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14821 * util/misc.c (grub_malloc): Likewise.
14822 (grub_realloc): Likewise.
14823 * kern/mm.c (get_header_from_pointer): Change the casts to
14824 `unsigned' into a cast to `grub_size_t'.
14826 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14827 point to `currnode' when `currnode' is changed.
14829 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
14830 Schottelius <nico-linux@schottelius.org>.
14832 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
14834 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14835 (note_path): Remove variable.
14836 (GRUB_IEEE1275_NOTE_NAME): New macro.
14837 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14838 (grub_ieee1275_note_hdr): New structure.
14839 (grub_ieee1275_note_desc): Likewise.
14840 (grub_ieee1275_note): Likewise.
14841 (load_note): Remove `dir' argument. All callers updated. Remove
14842 `note_img' and `path'. Do not load a file from `note_path'.
14843 Initialize a struct grub_ieee1275_note and write that to `out'.
14844 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14846 2005-01-05 Marco Gerards <metgerards@student.han.nl>
14848 * util/misc.c (grub_util_read_image): Revert last change. It
14849 called `grub_util_read_at', which seeks from the beginning of the
14852 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
14854 * TODO: Add note about endianness in grub-mkimage.
14855 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14857 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14858 (grub_mkimage_SOURCES): New target.
14859 * include/grub/kernel.h (grub_start_addr): Remove variable.
14860 (grub_end_addr): Likewise.
14861 (grub_total_module_size): Likewise.
14862 (grub_kernel_image_size): Likewise.
14863 (GRUB_MODULE_MAGIC): New constant.
14864 (grub_module_info): New structure.
14865 (grub_arch_modules_addr): New prototype.
14866 (grub_get_end_addr): Remove prototype.
14867 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14868 * include/grub/powerpc/ieee1275/kernel.h: New file.
14869 * include/grub/util/misc.h (grub_util_get_fp_size): New
14871 (grub_util_read_at): Likewise.
14872 (grub_util_write_image_at): Likewise.
14873 * kern/main.c (grub_get_end_addr): Remove function.
14874 (grub_load_modules): Call grub_arch_modules_addr instead of using
14875 grub_end_addr. Look for a grub_module_info struct in memory. Use
14876 the grub_module_info fields instead of calling grub_get_end_addr
14877 as loop conditions. Move grub_add_unused_region code here.
14878 (grub_add_unused_region): Remove function.
14879 * kern/i386/pc/init.c: Include grub/cache.h.
14880 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14881 one call to add_mem_region.
14882 (grub_arch_modules_addr): New function.
14883 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14884 (grub_total_module_size): Likewise.
14885 Include grub/machine/kernel.h.
14886 (grub_arch_modules_addr): New function.
14887 * util/grub-emu.c (grub_end_addr): Remove variable.
14888 (grub_total_module_size): Likewise.
14889 (grub_arch_modules_addr): New function.
14890 * util/misc.c: Include unistd.h.
14891 (grub_util_get_fp_size): New function.
14892 (grub_util_read_at): Likewise.
14893 (grub_util_write_image_at): Likewise.
14894 (grub_util_read_image): Call grub_util_read_at.
14895 (grub_util_write_image): Call grub_util_write_image_at.
14896 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14897 additional memory in kernel_img for a struct grub_module_info.
14898 Fill in that grub_module_info.
14899 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14901 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14903 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14905 * include/grub/powerpc/ieee1275/ieee1275.h
14906 (grub_ieee1275_milliseconds): New prototype.
14907 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14909 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14910 grub_ieee1275_milliseconds.
14912 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14914 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14916 (find_options): New function.
14917 (cmain): Call find_options.
14918 * include/grub/powerpc/ieee1275/ieee1275.h
14919 (grub_ieee1275_realmode): New extern variable.
14920 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14921 grub_map if grub_ieee1275_realmode is false.
14923 2004-12-29 Marco Gerards <metgerards@student.han.nl>
14925 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14926 lines are inserted and make it work like readline. Reported by
14927 Vincent Pelletier <subdino2004@yahoo.fr>.
14929 2004-12-28 Marco Gerards <metgerards@student.han.nl>
14931 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14933 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14934 `kern/powerpc/cache.S'.
14936 2004-12-27 Marco Gerards <metgerards@student.han.nl>
14938 * genmk.rb: Handle the `Program' class in the main loop. Written
14939 by Johan Rydberg <jrydberg@gnu.org>.
14940 (Program): New class.
14941 (programs): New variable.
14942 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14943 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14944 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14945 (help_arch): Function removed.
14946 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14947 `powerpc/libgcc.h' and `loader.h'.
14948 (pkgdata_PROGRAMS): New variable.
14949 (sbin_UTILITIES): Variable removed.
14950 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14951 (grubof_SOURCES): Variable re-defined so it only includes the
14952 core functionality.
14953 (grubof_CFLAGS): Remove `-DGRUBOF'.
14954 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14955 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14956 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14957 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14958 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14959 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14960 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14961 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14962 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14963 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14964 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14965 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14966 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14967 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14968 (pc_mod_CFLAGS): New variables.
14969 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14970 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14971 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14972 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14974 * include/grub/i386/pc/init.h (grub_os_area_addr)
14975 (rub_os_area_size): ... to here.
14976 * include/grub/powerpc/ieee1275/ieee1275.h
14977 (grub_ieee1275_entry_fn): Export symbol.
14978 * include/grub/powerpc/ieee1275/init.h: New file.
14979 * include/grub/powerpc/libgcc.h: Likewise.
14980 * include/grub/cache.h: Likewise.
14981 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14982 <hollis@penguinppc.org>.
14983 * kern/dl.c: Include <grub/cache.h>.
14984 (grub_dl_flush_cache): New function.
14985 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14987 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14988 (grub_console_init): Removed prototypes.
14989 (grub_machine_init): Don't initialize the modules anymore.
14990 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14992 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14993 Macro undef removed.
14994 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14995 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14996 relocation `R_PPC_REL32'. Return an error when the relocation is
14998 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14999 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15000 * util/misc.c (grub_arch_sync_caches): Likewise.
15002 2004-12-19 Marco Gerards <metgerards@student.han.nl>
15004 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15005 `symlist.c', add `grubof_symlist.c'.
15006 (symlist.c): Variable removed.
15007 (grubof_HEADERS): Variable added.
15008 (grubof_symlist.c): New target.
15009 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15010 `kernel_img_HEADERS'.
15011 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15012 * kern/powerpc/dl.c: New file.
15013 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15015 (grub_arch_dl_relocate_symbols): Likewise.
15016 (grub_register_exported_symbols): Likewise.
15018 2004-12-13 Marco Gerards <metgerards@student.han.nl>
15020 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15021 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15022 to fail instead. Reported by Vincent Pelletier
15023 <subdino2004@yahoo.fr>.
15025 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15026 it is not allocated. Reported by Vincent Pelletier
15027 <subdino2004@yahoo.fr>.
15029 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15030 output so the output looks better.
15032 2004-12-04 Marco Gerards <metgerards@student.han.nl>
15034 Modulize the partition map support and add support for the amiga
15037 * commands/ls.c: Include <grub/partition.h> instead of
15038 <grub/machine/partition.h>.
15039 * kern/disk.c: Likewise.
15040 * kern/rescue.c: Likewise.
15041 * loader/i386/pc/chainloader.c: Likewise.
15042 * normal/cmdline.c: Likewise.
15043 * kern/powerpc/ieee1275/init.c: Likewise.
15044 (grub_machine_init): Call `grub_pc_partition_map_init',
15045 `grub_amiga_partition_map_init' and
15046 `grub_apple_partition_map_init'.
15047 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15048 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15049 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15050 `partition.h' and `pc_partition.h'.
15051 (grub_setup_SOURCES): Remove
15052 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15053 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15054 (grub_emu_SOURCES): Likewise.
15055 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15056 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15057 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15058 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15059 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15060 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15061 (grubof_SOURCES): Likewise.
15062 * disk/i386/pc/partition.c: File removed.
15063 * disk/powerpc/ieee1275/partition.c: Likewise.
15064 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15065 * include/grub/i386/pc/partition.h: Likewise.
15066 * kern/partition.c: New file.
15067 * partmap/amiga.c: Likewise.
15068 * partmap/apple.c: Likewise.
15069 * partmap/pc.c: Likewise.
15070 * include/grub/partition.h: Likewise..
15071 * include/grub/pc_partition.h: Likewise.
15072 * util/grub-emu.c: Include <grub/partition.h> instead of
15073 <grub/machine/partition.h>.
15074 (main): Call `grub_pc_partition_map_init',
15075 `grub_amiga_partition_map_init' and
15076 `grub_apple_partition_map_init' and deinitialize afterwards.
15077 * util/i386/pc/biosdisk.c: Include `#include
15078 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15079 `<grub/machine/partition.h>'.
15080 * util/i386/pc/grub-setup.c: Likewise.
15081 * util/i386/pc/biosdisk.c: Likewise.
15082 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15083 partition information in case of a PC partition.
15084 * util/i386/pc/grub-setup.c: Include `#include
15085 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15086 `<grub/machine/partition.h>'.
15087 (setup): Only access the PC specific partition information in case
15090 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15092 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15093 (grub_longjmp): Likewise.
15094 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15096 * normal/powerpc/setjmp.S: New file.
15097 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15098 `normal/powerpc/setjmp.S'.
15099 (grubof_CFLAGS): Add `-DGRUBOF'.
15100 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15101 [GRUB_UTIL && !GRUBOF].
15103 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15105 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15106 property named `name'. Correctly handle the error returned by
15107 `grub_ieee1275_finddevice' if a device can not be opened.
15109 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15111 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15112 `actual' for negativity.
15113 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15116 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15118 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15119 (PAGE_OFFSET): New macro.
15120 (CRTC_ADDR_PORT): Likewise.
15121 (CRTC_DATA_PORT): Likewise.
15122 (START_ADDR_HIGH_REGISTER): Likewise.
15123 (START_ADDR_LOW_REGISTER): Likewise.
15124 (GRAPHICS_ADDR_PORT): Likewise.
15125 (GRAPHICS_DATA_PORT): Likewise.
15126 (READ_MAP_REGISTER): Likewise.
15127 (INPUT_STATUS1_REGISTER): Likewise.
15128 (INPUT_STATUS1_VERTR_BIT): Likewise.
15129 (page): New variable.
15130 (wait_vretrace): New function.
15131 (set_read_map): Likewise.
15132 (set_start_address): Likewise.
15133 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15135 (check_vga_mem): Take the page into account.
15136 (write_char): Likewise.
15137 (write_cursor): Likewise.
15138 (scroll_up): Likewise. Copy the page to the page that is not
15139 shown and switch between both pages.
15140 (grub_vga_putchar): Fix off by one error.
15141 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15144 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15146 Add support for iso9660 (including rockridge).
15148 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15149 (iso9660_mod_SOURCES): New variable.
15150 (iso9660_mod_CFLAGS): Likewise.
15151 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15152 * include/grub/fs.h (grub_iso9660_init): New prototype.
15153 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15154 * fs/iso9660.c: New file.
15156 * include/grub/misc.h (grub_strncat): New prototype.
15157 * kern/misc.c (grub_strncat): New function.
15159 * fs/hfs.c (grub_hfs_mount): Translate the error
15160 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15161 * fs/jfs.c (grub_jfs_mount): Likewise.
15162 * fs/ufs.c (grub_ufs_mount): Likewise.
15164 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15166 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15167 which initialized BAT registers.
15168 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15169 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15171 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15172 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15174 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15175 (grub_mapclaim): Likewise.
15176 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15177 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15180 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15182 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15183 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15184 -ffreestanding and -msoft-float.
15186 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15188 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15189 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15190 set in grub_ieee1275_flags.
15192 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15194 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15196 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15197 grub_console_init first.
15198 Change the memory range used for grub_ieee1275_claim and
15199 grub_mm_init_region.
15200 Print an error message if the claim fails.
15201 Include <grub/misc.h>.
15203 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15205 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15206 Call grub_children_iterate for device nodes of type `scsi',
15208 (grub_ofdisk_open): Remove manual device alias resolution.
15209 Fix memory leak when device cannot be opened.
15210 * include/grub/powerpc/ieee1275/ieee1275.h
15211 (grub_children_iterate): New prototype.
15212 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15214 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15215 Return -1 if args.size was -1.
15217 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15219 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15220 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15221 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15222 Open Firmware's memory for it; claim memory from _start to _end.
15223 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15224 (_end): New extern.
15225 (_start): Zero BSS from __bss_start to _end.
15226 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15228 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15230 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15232 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15233 -1 if args.base was -1.
15235 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15237 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15238 escape sequence instead of a literal ^L. Also call
15239 grub_ofconsole_gotoxy.
15241 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15243 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15244 void * arguments to grub_addr_t. All callers updated. Also make
15245 the `result' argument optional.
15246 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15247 All callers updated.
15249 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15251 * commands/ls.c (grub_ls_list_files): Use the string following the
15252 initial ')', if present, as the filesystem path.
15253 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15255 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15257 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15259 Make the source code of the menu interface more readable.
15261 * normal/menu.c: Include grub/mm.h.
15262 (TERM_WIDTH): New macro.
15263 (TERM_HEIGHT): Likewise.
15264 (TERM_INFO_HEIGHT): Likewise.
15265 (TERM_MARGIN): Likewise.
15266 (TERM_SCROLL_WIDTH): Likewise.
15267 (TERM_TOP_BORDER_Y): Likewise.
15268 (TERM_LEFT_BORDER_X): Likewise.
15269 (TERM_BORDER_WIDTH): Likewise.
15270 (TERM_MESSAGE_HEIGHT): Likewise.
15271 (TERM_BORDER_HEIGHT): Likewise.
15272 (TERM_NUM_ENTRIES): Likewise.
15273 (TERM_FIRST_ENTRY_Y): Likewise.
15274 (TERM_ENTRY_WIDTH): Likewise.
15275 (TERM_CURSOR_X): Likewise.
15276 (draw_border): Use macros instead of magic numbers.
15277 (print_entry): Likewise.
15278 (print_entries): Likewise.
15279 (run_menu): Likewise. Also, handle the key 'e'.
15280 (run_menu_entry): Ignore empty command lines.
15281 (print_message): Added a new argument EDIT. If EDIT is true,
15282 print a different message.
15283 (init_page): Likewise.
15284 (edit_menu_entry): New function. Not implemented yet.
15286 2004-09-17 Marco Gerards <metgerards@student.han.nl>
15288 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15289 can be loaded from normal mode.
15291 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15293 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15294 (multiboot_mod_CFLAGS): New variables.
15295 * loader/i386/pc/linux_normal.c: New file.
15296 * loader/i386/pc/multiboot_normal.c: Likewise.
15298 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15299 attribute `unused'.
15301 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15302 `fdiro' to read the mode information from instead of `diro'.
15304 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15305 looking up a symlink.
15307 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15309 * normal/command.c (grub_command_execute): Don't parse the
15310 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15311 flags of the command.
15313 * normal/menu.c (grub_menu_run): Fix typo.
15315 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15317 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15319 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15320 `y + 1' instead of `y - 1'.
15322 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15324 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15326 From Hollis Blanchard <hollis@penguinppc.org>:
15327 * kern/misc.c (memmove): New alias for grub_memmove.
15328 (memcmp): New alias for grub_memcmp.
15329 (memset): New alias for grub_memset.
15330 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15331 Change "int handle" to "grub_ieee1275_phandle_t handle".
15332 * include/grub/powerpc/ieee1275/ieee1275.h
15333 (grub_ieee1275_get_property): Likewise.
15335 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15337 Added normal mode command `chainloader' as module chain.mod, which
15338 depends on normal.mod and _chain.mod.
15340 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15341 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15342 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15344 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15345 but arguments parsing moved to ...
15346 (grub_chainloader_cmd): ... here. New function.
15347 * include/grub/i386/pc/chainloader.h: New file.
15348 * loader/i386/pc/chainloader_normal.c: Likewise.
15350 2004-09-11 Marco Gerards <metgerards@student.han.nl>
15352 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15353 (grub_mkimage_LDFLAGS): Likewise.
15354 (grub_emu_SOURCES): Likewise.
15355 (kernel_img_HEADERS): Added fshelp.h.
15356 * fs/ext2.c: Include <grub/fshelp.h>.
15357 (FILETYPE_REG): New macro.
15358 (FILETYPE_INO_REG): Likewise.
15359 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15361 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15363 (grub_fshelp_node): New struct.
15364 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15366 (grub_ext2_get_file_block): Removed function.
15367 (grub_ext2_read_block): New function.
15368 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15369 This function was written.
15370 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15371 (grub_ext2_find_file): Removed function.
15372 (grub_ext2_read_symlink): New function.
15373 (grub_ext2_iterate_dir): Likewise.
15374 (grub_ext2_open): Rewritten.
15375 (grub_ext2_dir): Rewritten.
15376 * include/grub/fshelp.h: New file.
15377 * fs/fshelp.c: Likewise.
15379 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15381 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15382 (print_message): Add a missing newline.
15383 (run_menu): Added timeout support.
15384 (run_menu_entry): New local function.
15385 (grub_menu_run): Added support for booting.
15387 * kern/loader.c (grub_loader_is_loaded): New function.
15389 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15390 (grub_get_rtc): Exported.
15392 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15393 (grub_get_rtc): Exported.
15395 * include/grub/normal.h (struct grub_command_list): Remove
15396 constant from the member `command'.
15398 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15400 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15402 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15404 2004-08-28 Marco Gerards <metgerards@student.han.nl>
15406 Add support for the JFS filesystem.
15408 * fs/jfs.c: New file.
15409 * include/grub/fs.h (grub_jfs_init): New prototype.
15410 (grub_jfs_fini): New prototype.
15411 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15412 (grub_emu_SOURCES): Likewise.
15413 (pkgdata_MODULES): Add jfs.mod.
15414 (jfs_mod_SOURCES): New variable.
15415 (jfs_mod_CFLAGS): Likewise.
15416 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15417 (grubof_SOURCES): Likewise.
15418 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15420 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15421 endian to the host endian.
15422 (grub_fat_utf16_to_utf8): Move function from there...
15423 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
15424 the endianness of the source string anymore.
15425 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15427 2004-08-24 Marco Gerards <metgerards@student.han.nl>
15429 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15430 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15431 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15432 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15434 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15435 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15436 for `node_found' and `it_dir'.
15437 (grub_hfs_dir): Add prototype for `dir_hook'.
15439 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15440 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15441 and `indir32' to silence a gcc warning.
15443 * include/grub/fs.h (grub_hfs_init): New prototype.
15444 (grub_hfs_fini): Likewise.
15447 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15449 Each disk device has its own id now. This is useful to make use
15450 of multiple disk devices.
15452 * include/grub/disk.h (grub_disk_dev_id): New enum.
15453 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15454 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15456 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15457 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15459 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15460 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15462 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15463 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15465 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15466 "id" which is used by the cache manager.
15468 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15471 2004-08-18 Marco Gerards <metgerards@student.han.nl>
15473 * fs/hfs.c: New file.
15474 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15475 (grub_emu_SOURCES): Likewise.
15476 (pkgdata_MODULES): Add hfs.mod.
15477 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15478 (grubof_SOURCES): Likewise.
15479 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15481 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15482 * kern/misc.c (grub_strncasecmp): Add function.
15484 2004-08-14 Marco Gerards <metgerards@student.han.nl>
15486 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15489 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15490 (grub_ext2_dir): In case the directory entry type is unknown, read
15493 2004-08-02 Peter Bruin <pjbruin@dds.nl>
15495 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15496 grub_load_linux instead of grub_rescue_cmd_linux as second
15497 argument of grub_rescue_register_command.
15499 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15501 2004-07-27 Marco Gerards <metgerards@student.han.nl>
15503 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15505 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15506 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15507 `loader/powerpc/ieee1275/linux.c',
15508 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15509 * include/grub/powerpc/ieee1275/ieee1275.h
15510 (grub_ieee1275_release): New prototype.
15511 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15512 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15513 normal, boot, linux and linux_normal.
15514 * loader/powerpc/ieee1275/linux.c: New file.
15515 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15517 2004-07-12 Marco Gerards <metgerards@student.han.nl>
15519 * normal/arg.c (grub_arg_parse): Correct error handling after
15520 reallocating the argumentlist (check if `argl' is not null instead
15521 of checking if `args' is not null).
15522 * kern/mm.c (grub_realloc): Return the same pointer when using the
15523 same region, instead of returning the header address.
15525 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15527 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15528 one block instead of two when looking for the initial partition.
15529 (grub_partition_probe): Initialize the local variable `p' with 0.
15530 Use base 10 for the grub_strtoul call.
15531 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15532 need for one local variable.
15533 (grub_strtoul): Don't add the new value to `num', instead of that
15536 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15538 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15539 (pxeboot_img_SOURCES): New variable.
15540 (pxeboot_img_ASFLAGS): Likewise.
15541 (pxeboot_img_LDFLAGS): Likewise.
15542 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15543 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15544 <lode_leroy@hotmail.com>.
15546 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15548 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15549 there was no input.
15551 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15553 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15554 the history buffer logic.
15556 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15558 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15559 (FILETYPE_INO_SYMLINK): New macros.
15560 (grub_ext2_find_file): Check if the node is a directory using the
15561 inode stat information instead of using the filetype in the
15562 dirent. Exclude the first character of an absolute symlink.
15563 (grub_ext2_dir): Mask out the filetype part of the mode member of
15566 2004-05-24 Marco Gerards <metgerards@student.han.nl>
15568 Add support for UFS version 1 and 2. Add support for the minix
15569 filesystem version 1 and 2, both the variants with 14 and 30 long
15572 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15574 (grub_emu_SOURCES): Likewise.
15575 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15576 (ufs_mod_SOURCES): New variable.
15577 (ufs_mod_CFLAGS): Likewise.
15578 (minix_mod_SOURCES): Likewise.
15579 (minix_mod_CFLAGS): Likewise.
15580 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15582 (grubof_SOURCES): Likewise.
15583 * fs/ufs.c: New file.
15584 * fs/minix.c: New file.
15585 * include/grub/fs.h (grub_ufs_init): New prototype.
15586 (grub_ufs_fini): Likewise.
15587 (grub_minix_init): Likewise.
15588 (grub_minix_fini): Likewise.
15589 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15592 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15594 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15595 commands/ls.c, commands/terminal.c, commands/boot.c,
15596 commands/cmp.c and commands/cat.c.
15597 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15599 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15602 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15604 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15605 and grub_, respectively. Because the conversion is trivial and
15606 mechanical, I omit the details here. Please refer to the CVS
15607 if you need more information.
15609 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15611 * include/pupa: Renamed to ...
15612 * include/grub: ... this.
15613 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15614 * util/i386/pc/grub-mkimage.c: ... this.
15615 * util/i386/pc/pupa-setup.c: Renamed to ...
15616 * util/i386/pc/grub-setup.c: ... this.
15617 * util/pupa-emu.c: Renamed to ...
15618 * util/grub-emu.c: ... this.
15620 2004-03-29 Marco Gerards <metgerards@student.han.nl>
15622 Add support for the newworld apple macintosh (PPC). This has been
15623 tested on the powerbook 2000 only. It only adds support for
15624 generic ieee1275 functions, console and disk support. This should
15625 be easy to port to other architectures with support for Open
15628 * configure.ac: Accept the powerpc as host_cpu. In the case of
15629 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15630 specific tests are only executed while building for the i386.
15631 Inverse test for crosscompile.
15632 * genmk.rb (Utility): Allow assembler files.
15633 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15634 * conf/powerpc-ieee1275.rmk: New file.
15635 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15636 * disk/powerpc/ieee1275/partition.c: Likewise.
15637 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15638 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15639 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15640 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15641 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15642 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15643 * include/pupa/powerpc/ieee1275/loader.h
15644 * include/pupa/powerpc/setjmp.h: Likewise.
15645 * include/pupa/powerpc/types.h: Likewise.
15646 * kern/powerpc/ieee1275/init.c: Likewise.
15647 * kern/powerpc/ieee1275/openfw.c: Likewise.
15648 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15650 These files were written by Johan Rydberg
15651 (jrydberg@night.trouble.net) and I only modified them slightly.
15653 * boot/powerpc/ieee1275/cmain.c: New file.
15654 * boot/powerpc/ieee1275/crt0.S: Likewise.
15655 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15656 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15658 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15660 * Makefile.in: Update copyright.
15661 * genmodsrc.sh: Likewise.
15662 * gensymlist.sh: Likewise.
15663 * term/i386/pc/vga.c: Indent correctly.
15665 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15666 bugreporting address.
15667 * util/i386/pc/pupa-setup.c (usage): Likewise,
15668 (main): Call pupa_ext2_init and pupa_ext2_fini.
15670 * fs/fat.c (log2): Renamed to ...
15671 (fat_log2): ... this.
15672 All callers changed.
15673 * kern/misc.c (memcpy): Alias to pupa_memmove.
15674 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15676 * util/console.c (pupa_ncurses_fini): Return 0.
15678 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15679 Move fail label here.
15680 [__GNU__]: Don't warn when using stat.
15681 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15682 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15683 long int. Use strtol instead of strtoul.
15685 2004-03-14 Marco Gerards <metgerards@student.han.nl>
15687 * commands/boot.c: New file.
15688 * commands/cat.c: Likewise.
15689 * commands/cmp.c: Likewise.
15690 * commands/ls.c: Likewise.
15691 * commands/terminal.c: Likewise.
15692 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15693 (pupa_register_command): Changed interface to match the new
15695 (pupa_command_execute): Changed (almost rewritten) so it uses
15696 pupa_split_command. Added support for setting variables using the
15698 (rescue_command): Changed to work with the new argument parser.
15699 (terminal_command): Moved from here to commands/terminal.c.
15700 (set_command): New function.
15701 (unset_command): New function.
15702 (insmod_command): New function.
15703 (rmmod_command): New function.
15704 (lsmod_command): New function.
15705 (pupa_command_init): Don't initialize the command terminal
15706 anymore. Initialize the commands set, unset, insmod, rmmod and
15708 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15709 (kernel_img_HEADERS): Add arg.h and env.h.
15710 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15711 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15712 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15714 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15716 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15717 (boot_mod_SOURCES): New variable.
15718 (terminal_mod_SOURCES): Likewise.
15719 (ls_mod_SOURCES): Likewise.
15720 (cmp_mod_SOURCES): Likewise.
15721 (cat_mod_SOURCES): Likewise.
15723 * normal/arg.c: New file.
15724 * kern/env.c: Likewise.
15725 * include/pupa/arg.h: Likewise.
15726 * include/pupa/env.h: Likewise.
15727 * font/manager.c (font_command): Changed to match argument parsing
15729 (PUPA_MOD_INIT): Likewise.
15730 * hello/hello.c (pupa_cmd_hello): Likewise.
15731 (PUPA_MOD_INIT): Likewise.
15732 * include/pupa/disk.h: Include <pupa/device.h>.
15733 (pupa_print_partinfo): New prototype.
15734 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15735 (pupa_dl_get_prefix): Likewise.
15736 * include/pupa/misc.h: Include <pupa/err.h>.
15737 (pupa_isgraph): New prototype.
15738 (pupa_isdigit): Likewise.
15739 (pupa_split_cmdline): Likewise.
15740 * include/pupa/normal.h: Include <pupa/arg.h>.
15741 (pupa_command): Changed the prototype of the member `func' to
15742 match the argument parsing interface. Added member `options'.
15743 (pupa_register_command): Updated to match function.
15744 (pupa_arg_parse): New prototype.
15745 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15746 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15747 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15748 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15749 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15750 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15751 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15752 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15753 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15754 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15755 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15756 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15757 * kern/disk.c: Include <pupa/file.h>.
15758 (pupa_print_partinfo): New function.
15759 * kern/dl.c: Include <pupa/env.h>.
15760 (pupa_dl_dir): Variable removed.
15761 (pupa_dl_load): Use the environment variable `prefix' instead of
15762 the variable pupa_dl_dir.
15763 (pupa_dl_set_prefix): Function removed.
15764 (pupa_dl_get_prefix): Likewise.
15765 * kern/i386/pc/init.c: Include <pupa/env.h>.
15766 (pupa_machine_init): Use the environment variable `prefix' instead of
15767 using pupa_dl_set_prefix to set the prefix.
15768 * kern/main.c: Include <pupa/env.h>.
15769 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15770 using pupa_dl_get_prefix to get the prefix.
15771 * kern/misc.c: Include <pupa/env.h>.
15772 (pupa_isdigit): New function.
15773 (pupa_isgraph): Likewise.
15774 (pupa_ftoa): Likewise.
15775 (pupa_vsprintf): Added support for printing values of the type
15776 `double'. Make it possible to format variable output when using
15777 formatting like `%1.2%f'.
15778 (pupa_split_cmdline): New function.
15779 * kern/rescue.c: Include <pupa/env.h>.
15780 (next_word): Removed function.
15781 (pupa_rescue_cmd_prefix): Likewise.
15782 (pupa_rescue_cmd_set): New function.
15783 (pupa_rescue_cmd_unset): New function.
15784 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15785 split the command line instead of splitting it here. Added
15786 support for setting variables using the syntax `foo=bar'. Don't
15787 initialize the prefix command anymore. Initialized the set and
15789 * normal/cmdline.c: Include <pupa/env.h>.
15790 (pupa_tab_complete): Added prototypes for print_simple_completion,
15791 print_partition_completion, add_completion, iterate_commands,
15792 iterate_dev, iterate_part and iterate_dir. Moved code to print
15793 partition information from here to kern/disk.c.
15794 (pupa_cmdline_run): Don't check if the function exists anymore.
15795 * normal/main.c: Include <pupa/env.h>.
15796 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15797 instead of using pupa_dl_get_prefix to get the prefix.
15798 * term/i386/pc/vga.c: Include <pupa/arg.h>.
15799 (check_vga_mem): Cast pointers to `void *' to silence a gcc
15801 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15802 (pupa_vga_setcolor): Declare unused variables with `__attribute__
15803 ((unused))' to silence a gcc warning.
15804 (pupa_vga_setcolor): Likewise.
15805 (debug_command): Changed to match argument parsing
15807 * util/pupa-emu.c: Include <pupa/env.h>.
15808 (options): Added 0's for unused fields to silence a gcc warning.
15810 (main): Use the environment variable `prefix' instead of using
15811 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
15812 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
15815 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15816 * util/misc.c: Include <malloc.h>.
15817 (pupa_malloc): Rewritten so errors are correctly reported.
15818 (pupa_realloc): Likewise.
15819 (pupa_memalign): Likewise.
15820 (pupa_mm_init_region): Declare unused variables with
15821 `__attribute__ ((unused))' to silence a gcc warning.
15822 * normal/i386/setjmp.S: Remove tab at the end of the file to
15823 silence a gcc warning.
15824 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15825 variables with `__attribute__ ((unused))' to silence a gcc
15827 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15828 local variable i unsigned to silence a gcc warning.
15830 * kern/term.c: Include <pupa/misc.h>.
15831 (pupa_more_lines): New variable.
15832 (pupa_more): Likewise.
15833 (pupa_putcode): When the pager is active pause at the end of every
15835 (pupa_set_more): New function.
15836 * include/pupa/term.h (pupa_set_more): New prototype.
15839 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
15841 Now this project is GRUB 2 rather than PUPA. The location of
15842 the CVS repository was moved to GRUB's.
15844 * configure.ac: Use bug-grub as the reporting address.
15845 Use GRUB instead of PUPA.
15846 Change the version number to 1.90.
15848 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
15850 * genkernsyms.sh: Updated copyright information.
15851 * genmk.rb: Likewise.
15852 * genmodsrc.sh: Likewise.
15853 * gensymlist.sh: Likewise.
15854 * boot/i386/pc/boot.S: Likewise.
15855 * boot/i386/pc/diskboot.S: Likewise.
15856 * disk/i386/pc/biosdisk.c: Likewise.
15857 * disk/i386/pc/partition.c: Likewise.
15858 * font/manager.c: Likewise.
15859 * fs/ext2.c: Likewise.
15860 * fs/fat.c: Likewise.
15861 * include/pupa/boot.h: Likewise.
15862 * include/pupa/device.h: Likewise.
15863 * include/pupa/disk.h: Likewise.
15864 * include/pupa/dl.h: Likewise.
15865 * include/pupa/elf.h: Likewise.
15866 * include/pupa/err.h: Likewise.
15867 * include/pupa/file.h: Likewise.
15868 * include/pupa/font.h: Likewise.
15869 * include/pupa/fs.h: Likewise.
15870 * include/pupa/kernel.h: Likewise.
15871 * include/pupa/loader.h: Likewise.
15872 * include/pupa/misc.h: Likewise.
15873 * include/pupa/mm.h: Likewise.
15874 * include/pupa/net.h: Likewise.
15875 * include/pupa/normal.h: Likewise.
15876 * include/pupa/rescue.h: Likewise.
15877 * include/pupa/setjmp.h: Likewise.
15878 * include/pupa/symbol.h: Likewise.
15879 * include/pupa/term.h: Likewise.
15880 * include/pupa/types.h: Likewise.
15881 * include/pupa/i386/setjmp.h: Likewise.
15882 * include/pupa/i386/types.h: Likewise.
15883 * include/pupa/i386/pc/biosdisk.h: Likewise.
15884 * include/pupa/i386/pc/boot.h: Likewise.
15885 * include/pupa/i386/pc/console.h: Likewise.
15886 * include/pupa/i386/pc/init.h: Likewise.
15887 * include/pupa/i386/pc/kernel.h: Likewise.
15888 * include/pupa/i386/pc/linux.h: Likewise.
15889 * include/pupa/i386/pc/loader.h: Likewise.
15890 * include/pupa/i386/pc/memory.h: Likewise.
15891 * include/pupa/i386/pc/multiboot.h: Likewise.
15892 * include/pupa/i386/pc/partition.h: Likewise.
15893 * include/pupa/i386/pc/time.h: Likewise.
15894 * include/pupa/i386/pc/vga.h: Likewise.
15895 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15896 * include/pupa/util/getroot.h: Likewise.
15897 * include/pupa/util/misc.h: Likewise.
15898 * include/pupa/util/resolve.h: Likewise.
15899 * kern/device.c: Likewise.
15900 * kern/disk.c: Likewise.
15901 * kern/dl.c: Likewise.
15902 * kern/err.c: Likewise.
15903 * kern/file.c: Likewise.
15904 * kern/fs.c: Likewise.
15905 * kern/loader.c: Likewise.
15906 * kern/main.c: Likewise.
15907 * kern/misc.c: Likewise.
15908 * kern/mm.c: Likewise.
15909 * kern/rescue.c: Likewise.
15910 * kern/term.c: Likewise.
15911 * kern/i386/dl.c: Likewise.
15912 * kern/i386/pc/init.c: Likewise.
15913 * kern/i386/pc/lzo1x.S: Likewise.
15914 * kern/i386/pc/startup.S: Likewise.
15915 * loader/i386/pc/chainloader.c: Likewise.
15916 * loader/i386/pc/linux.c: Likewise.
15917 * loader/i386/pc/multiboot.c: Likewise.
15918 * normal/cmdline.c: Likewise.
15919 * normal/command.c: Likewise.
15920 * normal/main.c: Likewise.
15921 * normal/menu.c: Likewise.
15922 * normal/i386/setjmp.S: Likewise.
15923 * term/i386/pc/console.c: Likewise.
15924 * term/i386/pc/vga.c: Likewise.
15925 * util/console.c: Likewise.
15926 * util/genmoddep.c: Likewise.
15927 * util/misc.c: Likewise.
15928 * util/pupa-emu.c: Likewise.
15929 * util/resolve.c: Likewise.
15930 * util/unifont2pff.rb: Likewise.
15931 * util/i386/pc/biosdisk.c: Likewise.
15932 * util/i386/pc/getroot.c: Likewise.
15933 * util/i386/pc/pupa-mkimage.c: Likewise.
15934 * util/i386/pc/pupa-setup.c: Likewise.
15936 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15938 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15939 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15940 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15941 reading and reset it after reading.
15942 (pupa_ext2_close): Return PUPA_ERR_NONE.
15944 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15946 (struct linux_kernel_header): Add kernel_version and
15948 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15949 pupa_file_read succeeds.
15950 (pupa_rescue_cmd_initrd): Implement.
15952 2003-12-03 Marco Gerards <metgerards@student.han.nl>
15954 * fs/ext2.c (pupa_ext2_label): New function.
15955 (pupa_ext2_fs): Added label.
15956 * fs/fat.c (pupa_fat_label): New function.
15957 (pupa_fat_fs): Added label.
15958 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15960 * kern/misc.c (pupa_strndup): New function.
15961 * include/pupa/misc.h (pupa_strndup): New prototype.
15963 * include/pupa/normal.h: Include <pupa/err.h>.
15964 (pupa_set_history): New prototype.
15965 (pupa_iterate_commands): New prototype.
15966 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15967 <pupa/disk.h>, <pupa/file.h>.
15968 (hist_size): New variable.
15969 (hist_lines): Likewise.
15970 (hist_end): Likewise.
15971 (hist_used): Likewise.
15972 (pupa_set_history): New function.
15973 (pupa_history_get): Likewise.
15974 (pupa_history_add): Likewise.
15975 (pupa_history_replace): Likewise.
15976 (pupa_tab_complete): Likewise.
15977 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15978 completion shows partitionnames while completing partitions, this
15979 feature was suggested by Jeff Bailey.
15980 * normal/command.c (pupa_iterate_commands): New function.
15981 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15982 (pupa_normal_init): Initialize history buffer.
15983 (PUPA_MOD_INIT): Likewise.
15984 (pupa_normal_fini): Free the history buffer.
15985 (PUPA_MOD_FINI): Likewise.
15987 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15990 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15991 * configure.ac [i386]: Check for regparam bug.
15992 (NESTED_FUNC_ATTR) [! i386]: Defined.
15994 2003-11-17 Marco Gerards <metgerards@student.han.nl>
15996 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15997 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15998 (pupa_emu_SOURCES): New variable.
15999 (pupa_emu_LDFLAGS): Likewise.
16000 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16001 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16002 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16003 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16004 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16005 (pupa_jmp_buf): New typedef.
16006 (pupa_setjmp) [PUPA_UTIL]: New macro.
16007 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16008 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16009 (pupa_refresh): New prototype.
16010 * include/pupa/util/getroot.h: New file.
16011 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16013 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16014 (pupa_rescue_cmd_cat): Likewise.
16015 (pupa_rescue_cmd_ls): Likewise.
16016 (pupa_rescue_cmd_testload): Likewise.
16017 (pupa_rescue_cmd_lsmod): Likewise.
16018 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16019 * normal/menu.c (run_menu): Likewise.
16020 * kern/term.c (pupa_cls): Likewise.
16021 (pupa_refresh): New function.
16022 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16023 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16024 * util/console.c: New file.
16026 * util/i386/pc/getroot.c: New file.
16027 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16028 (pupa_putchar): New function.
16029 (pupa_refresh): Likewise.
16030 (xgetcwd): Function moved to ...
16031 (strip_extra_slashes): Likewise.
16032 (get_prefix): Likewise.
16033 * util/i386/pc/getroot.c: ... here.
16034 (find_root_device): Function moved and renamed to...
16035 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16036 Changed all callers.
16037 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16039 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16040 Changed all callers.
16041 * util/misc.c (pupa_memalign): New function.
16042 (pupa_mm_init_region): Likewise.
16043 (pupa_register_exported_symbols): Likewise.
16044 (pupa_putchar): Function removed.
16045 * util/pupa-emu.c: New file.
16047 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16049 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16050 (_multiboot_mod_SOURCES): New variable.
16051 (_multiboot_mod_CFLAGS): Likewise.
16052 * loader/i386/pc/multiboot.c: New file.
16053 * include/pupa/i386/pc/multiboot.h: Likewise.
16054 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16055 (pupa_multiboot_real_boot): New function.
16056 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16057 (pupa_multiboot_real_boot): New prototype.
16058 (pupa_rescue_cmd_multiboot): Likewise
16059 (pupa_rescue_cmd_module): Likewise.
16061 * kern/loader.c (pupa_loader_set): Continue when
16062 pupa_loader_unload_func() fails.
16063 (pupa_loader_unset): New function.
16064 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16066 * kern/misc.c (pupa_stpcpy): New function.
16067 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16069 2003-11-12 Marco Gerards <metgerards@student.han.nl>
16071 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16072 for available extensions.
16074 * include/pupa/i386/pc/time.h: New file.
16075 * kern/disk.c: Include <pupa/machine/time.h>.
16076 (PUPA_CACHE_TIMEOUT): New macro.
16077 (pupa_last_time): New variable.
16078 (pupa_disk_open): Flush the cache when there was a timeout.
16079 (pupa_disk_close): Reset the timer.
16080 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16082 * util/misc.c: Include <sys/times.h>
16083 (pupa_get_rtc): New function.
16085 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16087 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16089 (pupa_ext2_get_file_block): Use blocks member.
16091 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16092 first block. Return -1 instead of pupa_errno on error.
16094 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16096 * README: In the pupa-mkimage example use _chain instead of chain
16097 and ext2 instead of fat.
16098 * TODO: Replace ext2fs with jfs as an example. Add an item for
16099 adding journal playback for ext2fs.
16100 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16101 (pkgdata_MODULES): Added ext2.mod.
16102 (ext2_mod_SOURCES): New variable.
16103 (ext2_mod_CFLAGS): Likewise.
16104 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16105 * include/pupa/misc.h (pupa_strncpy): New prototype.
16106 (pupa_strcat): Likewise.
16107 (pupa_strncmp): Likewise.
16108 * kern/misc.c (pupa_strcat): Enable function.
16109 (pupa_strncpy): New function.
16110 (pupa_strncmp): Likewise.
16111 * fs/ext2.c: New file.
16113 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16114 when the read failed before retrying.
16115 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16116 (_FILE_OFFSET_BITS): Likewise.
16117 * configure.ac: Added AC_SYS_LARGEFILE.
16119 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16121 * genmk.rb (PModule#rule): Make sure to get only symbol names
16122 from the output of nm.
16123 Reported by Robert Millan <zeratul2@wanadoo.es>.
16125 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16127 I forgot to check in these changes for a long time. This adds
16128 incomplete support for VGA console, and this is still very
16129 buggy. Also, a lot of consideration is required for I18N,
16130 UNICODE, and VGA font issues. Therefore, assume that this is
16131 such that "better than nothing".
16133 * font/manager.c: New file.
16134 * include/pupa/font.h: Likewise.
16135 * include/pupa/i386/pc/vga.h: Likewise.
16136 * term/i386/pc/vga.c: Likewise.
16137 * util/unifont2pff.rb: Likewise.
16139 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16140 (pkgdata_MODULES): Added vga.mod and font.mod.
16141 (vga_mod_SOURCES): New variables.
16142 (vga_mod_CFLAGS): Likewise.
16143 (font_mod_SOURCES): Likewise.
16144 (font_mod_CFLAGS): Likewise.
16146 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16148 * include/pupa/term.h: Include pupa/err.h.
16149 (struct pupa_term): Added init and fini.
16150 Changed the argument of putchar to pupa_uint32_t.
16152 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16153 (pupa_console_real_putchar): New prototype.
16154 (pupa_console_putchar): Removed.
16155 (pupa_console_checkkey): Exported.
16156 (pupa_console_getkey): Likewise.
16158 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16161 * kern/term.c (pupa_term_set_current): Rewritten.
16162 (pupa_putchar): Likewise.
16163 (pupa_putcode): New function.
16165 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16166 (pupa_console_real_putchar): ... this.
16167 (pupa_vga_set_mode): New function.
16168 (pupa_vga_get_font): Likewise.
16170 * normal/command.c: Include pupa/term.h.
16171 (terminal_command): New function.
16172 (pupa_command_init): Register the command "terminal".
16174 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16175 (DISP_UP): Likewise.
16176 (DISP_RIGHT): Likewise.
16177 (DISP_DOWN): Likewise.
16178 (DISP_HLINE): Likewise.
16179 (DISP_VLINE): Likewise.
16180 (DISP_UL): Likewise.
16181 (DISP_UR): Likewise.
16182 (DISP_LL): Likewise.
16183 (DISP_LR): Likewise.
16185 * term/i386/pc/console.c (pupa_console_putchar): New function.
16187 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16189 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16190 FIX. Reverse the path_list.
16192 * include/pupa/normal.h: Export pupa_register_command and
16193 pupa_unregister_command.
16195 * hello/hello.c (pupa_cmd_hello): New module.
16196 * conf/i386-pc.rmk: Added hello.mod.
16198 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16200 * kern/i386/pc/lzo1x.S: New file.
16202 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16203 (compress_kernel): New variable.
16204 (generate_image): Heavily modified to support compressing a
16205 large part of the core image.
16207 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16209 (pupa_util_load_image): New function.
16211 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16212 (pupa_compressed_size): New variable.
16213 (codestart): Enable Gate A20 here.
16214 Decompress the compressed part of the core image.
16215 Rearrange the code to put functions and variables which are
16216 required for initialization in the non-compressed part.
16219 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16222 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16224 * include/pupa/i386/pc/kernel.h
16225 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16226 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16227 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16228 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16229 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16231 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16233 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16234 (Utility#rule): Likewise.
16236 * configure.ac: Check if LZO is available.
16238 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16240 * include/pupa/normal.h: New file.
16241 * include/pupa/setjmp.h: Likewise.
16242 * include/pupa/i386/setjmp.h: Likewise.
16243 * normal/cmdline.c: Likewise.
16244 * normal/command.c: Likewise.
16245 * normal/main.c: Likewise.
16246 * normal/menu.c: Likewise.
16247 * normal/i386/setjmp.S: Likewise.
16249 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16250 (pupa_rescue_cmd_initrd): Likewise.
16252 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16255 * kern/i386/pc/startup.S (translation_table): New variable.
16256 (translate_keycode): New function.
16257 (pupa_console_getkey): Call translate_keycode.
16259 * kern/rescue.c (attempt_normal_mode): New function.
16260 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16261 it failed, print a message.
16263 * kern/mm.c (pupa_real_malloc): Print more information when a
16264 free magic is broken.
16265 (pupa_free): If the first free header is not free actually, set
16268 * kern/main.c (pupa_load_normal_mode): Just load the module
16270 (pupa_main): Don't print the message
16271 "Entering into rescue mode..." here.
16273 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16275 (pupa_rescue_cmd_initrd): Likewise.
16276 (pupa_rescue_cmd_initrd): Likewise.
16278 * include/pupa/symbol.h (FUNCTION): Specify the type.
16279 (VARIABLE): Likewise.
16281 * include/pupa/err.h (pupa_err_t): Added
16282 PUPA_ERR_UNKNOWN_COMMAND.
16284 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16285 (pupa_dl_get_prefix): Likewise.
16287 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16288 Added _chain.mod and _linux.mod instead of chain.mod and
16290 (chain_mod_SOURCES): Renamed to ...
16291 (_chain_mod_SOURCES): ... this.
16292 (chain_mod_CFLAGS): Renamed to ...
16293 (_chain_mod_CFLAGS): ... this.
16294 (linux_mod_SOURCES): Renamed to ...
16295 (_linux_mod_SOURCES): ... this.
16296 (linux_mod_CFLAGS): Renamed to ...
16297 (_linux_mod_CFLAGS): ... this.
16298 (normal_mod_SOURCES): New variable.
16299 (normal_mod_CFLAGS): Likewise.
16300 (normal_mod_ASFLAGS): Likewise.
16302 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16304 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16307 * kern/dl.c (pupa_dl_ref): Refer depending modules
16309 (pupa_dl_unref): Unrefer depending modules recursively.
16310 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16311 a module is unloaded before one depending on that module is
16313 (pupa_dl_unload): Unload depending modules explicitly,
16316 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16318 * include/pupa/i386/pc/linux.h: New file.
16319 * loader/i386/pc/linux.c: Likewise.
16321 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16323 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16324 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16325 of PUPA_CHAINLOADER_BOOT_SECTOR.
16327 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16328 (pupa_linux_prot_size): New variable.
16329 (pupa_linux_tmp_addr): Likewise.
16330 (pupa_linux_real_addr): Likewise.
16331 (pupa_linux_boot_zimage): New function.
16332 (pupa_linux_boot_bzimage): Likewise.
16334 * kern/i386/pc/init.c (struct mem_region): New structure.
16335 (MAX_REGIONS): New macro.
16336 (mem_regions): New variable.
16337 (num_regions): Likewise.
16338 (pupa_os_area_addr): Likewise.
16339 (pupa_os_area_size): Likewise.
16340 (pupa_lower_mem): Likewise.
16341 (pupa_upper_mem): Likewise.
16342 (add_mem_region): New function.
16343 (compact_mem_regions): Likewise.
16344 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16345 the size of the conventional memory and that of so-called upper
16346 memory (before the first memory hole).
16347 Instead of adding each found region to free memory, use
16348 add_mem_region and add them after removing overlaps.
16349 Also, add only 1/4 of the upper memory to free memory. The rest
16350 is used for loading OS images. Maybe this is ad hoc, but this
16351 makes it much easier to relocate OS images when booting.
16353 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16354 (pupa_enter_rescue_mode): Don't register initrd and module.
16356 * kern/mm.c: Include pupa/dl.h.
16358 * kern/main.c: Include pupa/file.h and pupa/device.h.
16360 * kern/loader.c (pupa_loader_load_module_func): Removed.
16361 (pupa_loader_load_module): Likewise.
16363 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16366 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16367 (pupa_linux_tmp_addr): Likewise.
16368 (pupa_linux_real_addr): Likewise.
16369 (pupa_linux_boot_zimage): Likewise.
16370 (pupa_linux_boot_bzimage): Likewise.
16372 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16373 (pupa_upper_mem): Likewise.
16374 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16375 module is too dangerous.
16377 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16378 (pupa_os_area_size): Likewise.
16379 (pupa_loader_set): Remove the first argument. Loader doesn't
16380 manage modules or initrd any longer.
16381 (pupa_loader_load_module): Removed.
16383 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16384 (linux_mod_SOURCES): New variable.
16385 (linux_mod_CFLAGS): Likewise.
16387 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16389 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16390 the length of a blocklist correctly.
16392 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16393 Use ioctl only if the OS file is a block device.
16394 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16395 not very useful for normal files.
16397 * kern/main.c (pupa_set_root_dev): New function.
16398 (pupa_load_normal_mode): Likewise.
16399 (pupa_main): Call those above.
16401 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16404 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16406 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16408 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16409 (setup): Configure the installed partition information and the
16412 * loader/i386/pc/chainloader.c (my_mod): New variable.
16413 (pupa_chainloader_unload): New function.
16414 (pupa_rescue_cmd_chainloader): Refer itself.
16415 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16417 * kern/i386/pc/startup.S (install_partition): Removed.
16418 (version_string): Likewise.
16419 (config_file): Likewise.
16420 (pupa_install_dos_part): New variable.
16421 (pupa_install_bsd_part): Likewise.
16422 (pupa_prefix): Likewise.
16423 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16425 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16427 (make_install_device): New function.
16428 (pupa_machine_init): Set the dl prefix.
16430 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16431 (buf): Renamed to ...
16432 (linebuf): ... this.
16433 (pupa_rescue_cmd_prefix): New function.
16434 (pupa_rescue_cmd_insmod): Likewise.
16435 (pupa_rescue_cmd_rmmod): Likewise.
16436 (pupa_rescue_cmd_lsmod): Likewise.
16437 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16440 * kern/mm.c (pupa_memalign): If failed even after invalidating
16441 disk caches, unload unneeded modules and retry.
16443 * kern/misc.c (pupa_memmove): New function.
16444 (pupa_memcpy): Removed.
16445 (pupa_strcpy): New function.
16446 (pupa_itoa): Made static.
16448 * kern/dl.c (pupa_dl_iterate): New function.
16449 (pupa_dl_ref): Likewise.
16450 (pupa_dl_unref): Likewise.
16451 (pupa_dl_unload): Return if succeeded or not.
16452 (pupa_dl_unload_unneeded): New function.
16453 (pupa_dl_unload_all): Likewise.
16454 (pupa_dl_init): Renamed to ...
16455 (pupa_dl_set_prefix): ... this.
16456 (pupa_dl_get_prefix): New function.
16458 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16459 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16460 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16461 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16462 (pupa_install_dos_part): Declared.
16463 (pupa_install_bsd_part): Likewise.
16464 (pupa_prefix): Likewise.
16465 (pupa_boot_drive): Likewise.
16467 * include/pupa/types.h: Fix a typo.
16469 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16471 (pupa_memmove): Declared.
16472 (pupa_strcpy): Likewise.
16474 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16475 pupa_mod_init takes one argument, its own module.
16476 (pupa_dl_unload_unneeded): Declared.
16477 (pupa_dl_unload_all): Likewise.
16478 (pupa_dl_ref): Likewise.
16479 (pupa_dl_unref): Likewise.
16480 (pupa_dl_iterate): Likewise.
16481 (pupa_dl_init): Renamed to ...
16482 (pupa_dl_set_prefix): ... this.
16483 (pupa_dl_get_prefix): Declared.
16485 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16486 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16488 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16489 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16491 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16492 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16494 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16496 * util/i386/pc/pupa-setup.c (setup): Define the internal
16497 function find_first_partition_start at the top level, because GCC
16498 3.0.x cannot compile internal functions in deeper scopes
16500 (find_root_device): Use lstat instead of stat.
16501 Don't follow symbolic links.
16502 Fix the path-constructing code.
16504 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16505 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16506 by a BLKGETSIZE ioctl first, because block devices don't fill
16507 the member st_mode of the structure stat on Linux.
16508 [__linux__] (linux_find_partition): Use a temporary buffer
16509 REAL_DEV for the working space. Copy it to DEV before returning.
16510 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16511 buffer cache consistent.
16512 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16513 strncmp. The previous value was merely wrong.
16514 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16516 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16517 FAT size is 12. The previous value was merely wrong.
16519 * kern/main.c (pupa_main): Don't split the starting message from
16522 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16523 LF, because BIOS goes crazy about character attributes in this
16526 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16528 * include/i386/pc/util/biosdisk.h: New file.
16529 * util/i386/pc/biosdisk.c: Likewise.
16530 * util/i386/pc/pupa-setup.c: Likewise.
16532 * Makefile.in (INCLUDE_DISTFILES): Added
16533 include/pupa/i386/pc/util/biosdisk.h.
16534 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16535 directory util/i386/pc.
16536 (install-local): Added a rule for sbin_UTILITIES.
16537 (uninstall): Likewise.
16539 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16541 * util/misc.c (xrealloc): New function.
16542 (pupa_malloc): Likewise.
16543 (pupa_free): Likewise.
16544 (pupa_realloc): Likewise.
16545 (pupa_stop): Likewise.
16546 (pupa_putchar): Likewise.
16548 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16550 * include/pupa/util/misc.h (xrealloc): Declared.
16552 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16554 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16555 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16557 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16558 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16560 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16561 way should be implemented.
16562 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16564 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16565 the size of NAME for safety.
16566 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16569 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16570 (pupa_setup_SOURCES): Likewise.
16572 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16574 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16576 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16577 bunch of pushl's from pusha, because this destroys the return
16580 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16582 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16583 This means that any missing prototypes could be fatal. Also, you
16584 must take care when writing assembly code. See the comments at
16585 the beginning of startup.S, for more details.
16587 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16588 compilation mechanism.
16589 (pupa_chainloader_real_boot): Likewise.
16590 (pupa_biosdisk_rw_int13_extensions): Likewise.
16591 (pupa_biosdisk_rw_standard): Likewise.
16592 (pupa_biosdisk_check_int13_extensions): Likewise.
16593 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16594 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16595 (pupa_get_memsize): Likewise.
16596 (pupa_get_mmap_entry): Likewise.
16597 (pupa_console_putchar): Likewise.
16598 (pupa_console_setcursor): Likewise.
16599 (pupa_getrtsecs): Use pushl instead of push.
16601 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16602 memory instead of the stack for a mmap entry, because some
16603 BIOSes may ignore the maximum size and overflow.
16605 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16607 * genmk.rb (PModule#rule): Compile automatically generated
16608 sources with module-specific CFLAGS as well as other sources.
16610 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16612 * configure.ac: Check ld.
16613 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16614 respectively, before checking endianness and sizes.
16616 * Makefile.in (LD): New variable.
16618 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16620 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16622 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16624 * Changelog: New file.