1 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
3 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
4 it easier to understand / work with.
6 2009-05-13 Pavel Roskin <proski@gnu.org>
8 * loader/i386/pc/multiboot2.c: Add necessary includes for
9 grub_multiboot2_real_boot().
11 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
12 PX record is always little-endian. We only need the lower 2
15 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
16 facilitate code reuse.
17 (grub_cpio_mount): Use "struct head", not a char buffer. This
18 fixes a warning reported by gcc 4.4.
20 * kernel/disk.c (grub_disk_read): Use void pointer for the
22 (grub_disk_write): Use const void pointer for the buffer.
23 Adjust all callers. Remove unnecessary casts.
25 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
27 * util/i386/pc/grub-install.in: Update copyright year.
29 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
33 * commands/gptsync.c: new file
34 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
35 (gptsync_mod_SOURCES): new variable
36 (gptsync_mod_CFLAGS): likewise
37 (gptsync_mod_LDFLAGS): likewise
38 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
40 (GRUB_PC_PARTITION_TYPE_HFS): likewise
41 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
42 * conf/i386-ieee1275.rmk: likewise
43 * conf/i386-pc.rmk: likewise
44 * conf/powerpc-ieee1275.rmk: likewise
46 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
50 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
51 (grub_dl_ref): likewise
53 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
55 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
56 split in two functions (one for msdos and one for gpt).
58 2009-05-08 Pavel Roskin <proski@gnu.org>
60 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
63 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
64 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
65 Initialize them with -1. Add sanity check for bad1. Eliminate
68 2009-05-08 David S. Miller <davem@davemloft.net>
70 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
72 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
74 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
77 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
79 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
80 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
82 2009-05-05 David S. Miller <davem@davemloft.net>
84 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
86 2009-05-05 Pavel Roskin <proski@gnu.org>
88 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
89 of grub_dl_ref() and grub_dl_unref().
90 * commands/parttool.c: Remove preprocessor conditionals around
91 grub_dl_ref() and grub_dl_unref().
92 * fs/affs.c: Likewise.
94 * fs/cpio.c: Likewise.
95 * fs/ext2.c: Likewise.
98 * fs/hfsplus.c: Likewise.
99 * fs/iso9660.c: Likewise.
100 * fs/jfs.c: Likewise.
101 * fs/minix.c: Likewise.
102 * fs/ntfs.c: Likewise.
103 * fs/reiserfs.c: Likewise.
104 * fs/sfs.c: Likewise.
105 * fs/udf.c: Likewise.
106 * fs/ufs.c: Likewise.
107 * fs/xfs.c: Likewise.
108 * include/grub/dl.h: Likewise.
109 * loader/xnu.c: Likewise.
111 2009-05-04 Pavel Roskin <proski@gnu.org>
113 * commands/acpi.c: Remove unused variable my_mod.
114 * partmap/amiga.c: Likewise.
115 * partmap/apple.c: Likewise.
116 * partmap/gpt.c: Likewise.
117 * partmap/pc.c: Likewise.
118 * partmap/sun.c: Likewise.
119 * term/gfxterm.c: Likewise.
120 * term/i386/pc/vesafb.c: Likewise.
121 * term/i386/pc/vga.c: Likewise.
123 2009-05-04 David S. Miller <davem@davemloft.net>
125 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
126 pointer args to grub_ieee1275_get_property().
128 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
130 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
131 devices, and do not traverse down under controller nodes.
133 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
134 (grub_ofdisk_open): Use it to un-escape "," characters.
135 * kern/disk.c (find_part_sep): New.
136 (grub_disk_open): Use it to find the first non-escaped ','
137 character in the disk name.
138 * util/ieee1275/devicemap.c (escape_of_path): New.
139 (grub_util_emit_devicemap_entry): Use it.
140 * util/sparc64/ieee1275/grub-install.in: Update script to
141 strip partition specifiers properly by not triggering on
142 '\' escaped ',' characters.
144 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
146 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
148 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
150 (linux_vesafb_modes): Add a lot of additional modes to the list (based
151 on documentation from Wikipedia).
153 2009-05-04 Pavel Roskin <proski@gnu.org>
155 * disk/ata.c: Spelling fixes.
156 * disk/raid.c: Likewise.
157 * disk/usbms.c: Likewise.
158 * disk/dmraid_nvidia.c: Likewise.
159 * kern/ieee1275/openfw.c: Likewise.
160 * kern/ieee1275/init.c: Likewise.
161 * kern/ieee1275/cmain.c: Likewise.
162 * boot/i386/pc/cdboot.S: Likewise.
163 * video/readers/png.c: Likewise.
164 * video/i386/pc/vbe.c: Likewise.
165 * fs/udf.c: Likewise.
166 * fs/hfs.c: Likewise.
167 * fs/reiserfs.c: Likewise.
168 * efiemu/runtime/efiemu.c: Likewise.
169 * efiemu/main.c: Likewise.
170 * efiemu/mm.c: Likewise.
171 * include/grub/elf.h: Likewise.
172 * include/grub/xnu.h: Likewise.
173 * include/grub/usbdesc.h: Likewise.
174 * include/grub/usb.h: Likewise.
175 * include/grub/script_sh.h: Likewise.
176 * include/grub/lib/LzmaEnc.h: Likewise.
177 * include/grub/efiemu/efiemu.h: Likewise.
178 * include/grub/command.h: Likewise.
179 * normal/menu.c: Likewise.
180 * normal/main.c: Likewise.
181 * normal/datetime.c: Likewise.
182 * bus/usb/uhci.c: Likewise.
183 * mmap/i386/uppermem.c: Likewise.
184 * mmap/mmap.c: Likewise.
185 * commands/acpi.c: Likewise.
186 * commands/test.c: Likewise.
187 * partmap/apple.c: Likewise.
188 * font/font.c: Likewise.
189 * loader/sparc64/ieee1275/linux.c: Likewise.
190 * loader/macho.c: Likewise.
191 * loader/i386/bsd_trampoline.S: Likewise.
192 * loader/i386/bsd.c: Likewise.
193 * loader/xnu.c: Likewise.
194 * term/i386/pc/vesafb.c: Likewise.
195 * term/usb_keyboard.c: Likewise.
196 * util/resolve.c: Likewise.
197 * util/getroot.c: Likewise.
199 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
201 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
203 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
205 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
208 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
210 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
211 parameter only available on BIOS.
213 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
215 Removed wrong semicolon in declaration
217 * grub/misc.h (grub_dprintf): remove semicolon
219 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
221 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
222 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
223 is done by grub_cmd_linux() now).
224 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
225 restore video to text mode.
226 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
227 indicates lack of "vga=" parameter. "vga=0" is mapped to
228 `GRUB_LINUX_VID_MODE_NORMAL'.
230 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
232 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
233 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
234 and `normal/script.c'. Add `kern/rescue_reader.c',
235 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
236 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
239 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
240 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
241 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
242 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
243 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
245 * Makefile.in: Remove duplicated 2008 in Copyright line.
247 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
249 * util/misc.c (grub_util_warn): New function. Emmits a warning
251 * include/grub/util/misc.h (grub_util_warn): New declaration.
253 * util/i386/pc/grub-install.in: Understand --force and pass it down
256 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
258 (setup): Improve error messages and add warnings when requested to
259 install in odd layouts. Refuse to install using blocklists unless
262 2009-05-04 martin f. krafft <madduck@madduck.net>
264 * disk/raid.c (grub_raid_scan_device): Improve debug message.
266 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
268 Updated copyright year
270 * fs/hfsplus.c: updated copyright year
272 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
276 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
277 in the space previously used by unused3
278 (grub_hfsplus_uuid): new function
279 (grub_hfsplus_fs): added uuid field
281 2009-05-03 Pavel Roskin <proski@gnu.org>
283 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
284 suppress warnings. It's no longer needed.
285 * disk/host.c: Likewise.
286 * disk/ata_pthru.c: Likewise.
287 * disk/loopback.c: Likewise.
288 * hook/datehook.c: Likewise.
289 * parttool/pcpart.c: Likewise.
290 * fs/i386/pc/pxe.c: Likewise.
291 * fs/ntfscomp.c: Likewise.
292 * efiemu/main.c: Likewise.
293 * mmap/mmap.c: Likewise.
294 * commands/crc.c: Likewise.
295 * commands/hexdump.c: Likewise.
296 * commands/hdparm.c: Likewise.
297 * commands/acpi.c: Likewise.
298 * commands/echo.c: Likewise.
299 * commands/minicmd.c: Likewise.
300 * commands/blocklist.c: Likewise.
301 * commands/memrw.c: Likewise.
302 * commands/loadenv.c: Likewise.
303 * commands/usbtest.c: Likewise.
304 * commands/lsmmap.c: Likewise.
305 * commands/boot.c: Likewise.
306 * commands/parttool.c: Likewise.
307 * commands/configfile.c: Likewise.
308 * commands/search.c: Likewise.
309 * commands/ieee1275/suspend.c: Likewise.
310 * commands/cat.c: Likewise.
311 * commands/i386/pc/pxecmd.c: Likewise.
312 * commands/i386/pc/play.c: Likewise.
313 * commands/i386/pc/halt.c: Likewise.
314 * commands/i386/pc/vbeinfo.c: Likewise.
315 * commands/i386/pc/vbetest.c: Likewise.
316 * commands/lspci.c: Likewise.
317 * commands/date.c: Likewise.
318 * commands/handler.c: Likewise.
319 * commands/ls.c: Likewise.
320 * commands/test.c: Likewise.
321 * commands/cmp.c: Likewise.
322 * commands/efi/loadbios.c: Likewise.
323 * commands/efi/fixvideo.c: Likewise.
324 * commands/halt.c: Likewise.
325 * commands/help.c: Likewise.
326 * commands/reboot.c: Likewise.
327 * hello/hello.c: Likewise.
328 * script/sh/main.c: Likewise.
329 * loader/xnu.c: Likewise.
330 * term/terminfo.c: Likewise.
331 * term/i386/pc/serial.c: Likewise.
332 * term/usb_keyboard.c: Likewise.
334 2009-05-03 David S. Miller <davem@davemloft.net>
336 * normal/menu.c: Include grub/parser.h
338 2009-05-03 Pavel Roskin <proski@gnu.org>
340 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
342 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
343 Suggested by Javier MartÃn <lordhabbit@gmail.com>
345 * util/i386/pc/grub-mkrescue.in: Allow for the case when
346 efiemu??.o doesn't exist.
347 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
350 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
352 FreeBSD 64-bit support
354 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
355 and loader/i386/bsd_trampoline.S
356 (bsd_mod_ASFLAGS): new variable
357 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
358 (FREEBSD_MODTYPE_KERNEL64): likewise
359 (grub_bsd64_trampoline_start): likewise
360 (grub_bsd64_trampoline_end): likewise
361 (grub_bsd64_trampoline_selfjump): likewise
362 (grub_bsd64_trampoline_gdt): likewise
363 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
364 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
365 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
366 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
367 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
369 * loader/i386/bsd_pagetable.c: new file
370 * loader/i386/bsd_trampoline.S: likewise
371 * loader/i386/bsd.c (ALIGN_QWORD): new macro
372 (ALIGN_VAR): likewise
373 (entry_hi): new variable
374 (kern_end_mdofs): likewise
376 (grub_freebsd_add_meta): use ALIGN_VAR
377 (grub_e820_mmap): new declaration
378 (grub_freebsd_add_mmap): new function
379 (grub_freebsd_add_meta_module): support 64 bit kernels
380 (grub_freebsd_list_modules): use ALIGN_VAR
381 (gdt_descriptor): new declaration
382 (grub_freebsd_boot): support 64 bit kernels
383 (grub_bsd_elf64_hook): new function
384 (grub_bsd_load_elf): support elf64
386 2009-05-03 Bean <bean123ch@gmail.com>
388 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
389 after we get the result of if statement.
391 2009-05-03 Bean <bean123ch@gmail.com>
393 * Makefile.in (enable_efiemu): New variable.
395 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
397 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
399 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
400 path, add -mno-red-zone option.
401 (efiemu64_s.o): Likewise.
402 (efiemu64.o): Use macro $^ for source file.
404 * configure.ac (--enable-efiemu): New option.
406 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
410 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
411 (pkglib_MODULES): add xnu.mod
412 (xnu_mod_SOURCES): new variable
413 (xnu_mod_CFLAGS): likewise
414 (xnu_mod_LDFLAGS): likewise
415 (xnu_mod_ASFLAGS): likewise
416 * conf/i386-pc.rmk: likewise
417 * conf/x86_64-efi.rmk: likewise
418 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
420 * include/grub/i386/macho.h: new file
421 * include/grub/i386/xnu.h: likewise
422 * include/grub/macho.h: likewise
423 * include/grub/machoload.h: likewise
424 * include/grub/x86_64/macho.h: likewise
425 * include/grub/x86_64/xnu.h: likewise
426 * include/grub/xnu.h: likewise
427 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
428 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
429 * loader/i386/efi/xnu.c: new file
430 * loader/i386/pc/xnu.c: likewise
431 * loader/i386/xnu.c: likewise
432 * loader/i386/xnu_helper.S: likewise
433 * loader/macho.c: likewise
434 * loader/xnu.c: likewise
435 * loader/xnu_resume.c: likewise
436 * util/grub-dumpdevtree: likewise
437 * include/grub/i386/pit.h: include grub/err.h
438 (grub_pit_wait): export
439 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
441 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
445 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
446 _linux_efi, linux_efi.
447 new files in grub-emu
448 new targets efiemu32.o and efiemu64.o
449 * loader/linux_normal_efiemu.c: likewise
450 * loader/i386/efi/linux.c: added preliminary efiemu support
451 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
453 * include/grub/autoefi.h: new file
454 * include/grub/i386/efiemu.h: likewise
455 * include/grub/i386/pc/efiemu.h: likewise
456 * include/grub/efi/api.h: add LL suffix when necessary
457 new definitions relating to tables
458 * include/grub/efiemu/efiemu.h: new file
459 * include/grub/efiemu/runtime.h: likewise
460 * efiemu/prepare.c: likewise
461 * efiemu/loadcore_common.c: likewise
462 * efiemu/loadcore64.c: likewise
463 * efiemu/runtime/efiemu.sh: likewise
464 * efiemu/runtime/efiemu.S: likewise
465 * efiemu/runtime/efiemu.c: likewise
466 * efiemu/runtime/config.h: likewise
467 * efiemu/prepare32.c: likewise
468 * efiemu/main.c: likewise
469 * efiemu/modules/pnvram.c: likewise
470 * efiemu/modules/i386: likewise
471 * efiemu/modules/i386/pc: likewise
472 * efiemu/modules/acpi.c: likewise
473 * efiemu/i386/pc/cfgtables.c: likewise
474 * efiemu/i386/loadcore64.c: likewise
475 * efiemu/i386/loadcore32.c: likewise
476 * efiemu/prepare64.c: likewise
477 * efiemu/loadcore.c: likewise
478 * efiemu/symbols.c: likewise
479 * efiemu/mm.c: likewise
480 * efiemu/loadcore32.c: likewise
482 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
486 * commands/acpi.c: new file
487 * commands/i386/pc/acpi.c: likewise
488 * commands/efi/acpi.c: likewise
489 * include/grub/acpi.h: likewise
490 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
491 (acpi_mod_SOURCES): new variable
492 (acpi_mod_CFLAGS): likewise
493 (acpi_mod_LDFLAGS): likewise
494 * conf/i386-efi.rmk: likewise
495 * conf/x86_64-efi.rmk: likewise
497 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
499 Missing part from mmap patch
501 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
502 (grub_mmap_unregister)
503 (grub_mmap_free_and_unregister): use grub_mmap_register
505 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
509 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
510 * loader/i386/linux.c (find_mmap_size): likewise
511 (allocate_pages): likewise
512 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
513 (grub_fill_multiboot_mmap): likewise
514 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
515 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
516 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
517 (OPENBSD_MMAP_RESERVED): likewise
518 * include/grub/i386/pc/memory.h: include grub/memory.h
519 (grub_lower_mem): removed
520 (grub_upper_mem): likewise
521 (GRUB_MACHINE_MEMORY_ACPI): new definition
522 (GRUB_MACHINE_MEMORY_NVS): likewise
523 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
524 (GRUB_MACHINE_MEMORY_HOLE): likewise
525 (grub_machine_mmap_register): likewise
526 (grub_machine_mmap_unregister): likewise
527 (grub_machine_get_upper): likewise
528 (grub_machine_get_lower): likewise
529 (grub_machine_get_post64): likewise
530 * include/grub/i386/efi/memory.h: new file
531 * include/grub/x86_64/efi/memory.h: likewise
532 * include/grub/efi/memory.h: likewise
533 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
534 (mmap_mod_SOURCES): new variable
535 (mmap_mod_LDFLAGS): likewise
536 (mmap_mod_ASFLAGS): likewise
537 * conf/i386-coreboot.rmk: likewise
538 * conf/i386-ieee1275.rmk: likewise
539 * conf/i386-efi.rmk: likewise
540 * conf/x86_64-efi.rmk: likewise
541 * include/grub/types.h (UINT_TO_PTR): new macro
542 (PTR_TO_UINT32): likewise
543 (PTR_TO_UINT64): likewise
544 * include/grub/memory.h: new file
545 * mmap/i386/pc/mmap.c: likewise
546 * mmap/i386/pc/mmap_helper.S: likewise
547 * mmap/i386/uppermem.c: likewise
548 * mmap/mmap.c: likewise
549 * mmap/efi/mmap.c: likewise
550 * kern/i386/coreboot/init.c (grub_machine_init): don't use
552 * kern/i386/pc/init.c (grub_lower_mem): removed variable
553 (grub_upper_mem): likewise
554 (grub_machine_init): don't use grub_upper_mem,
555 make grub_lower_mem local
556 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
557 grub_mmap_iterate and grub_mmap_get_upper
558 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
560 2009-05-02 Bean <bean123ch@gmail.com>
562 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
564 (pkglib_MODULES): Add normal.mod and sh.mod.
565 (normal_SOURCES): New variable.
566 (normal_mod_CFLAGS): Likewise.
567 (normal_mod_LDFLAGS): Likewise.
568 (sh_mod_SOURCES): Likewise.
569 (sh_mod_CFLAGS): Likewise.
570 (sh_mod_LDFLAGS): Likewise.
572 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
573 script/sh/lexer.c_DEPENDENCIES.
574 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
575 kern/rescue_reader.c and kern/rescue_parser.c.
576 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
577 (grub_emu_SOURCES): Change source files.
578 (pkglib_MODULES): Remove normal.mod.
579 (normal_SOURCES): Removed.
580 (normal_mod_CFLAGS): Likewise.
581 (normal_mod_LDFLAGS): Likewise.
582 * conf/i386-coreboot.rmk: Likewise.
583 * conf/i386-efi.rmk: Likewise.
584 * conf/i386-ieee1276.rmk: Likewise.
585 * conf/powerpc-ieee1275.rmk: Likewise.
586 * conf/sparc64-ieee1275.rmk: Likewise.
587 * conf/x86_64-efi.rmk: Likewise.
589 * include/grub/command.h (grub_command_execute): New inline function.
591 * include/grub/menu.h (grub_menu_entry): Removed commands field.
593 * include/grub/normal.h: Remove <grub/setjmp.h>.
594 (grub_fs_module_list): Moved to normal/autofs.c.
595 (grub_exit_env): Removed.
596 (grub_command_execute): Likewise.
597 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
599 (read_command_list): New function declaration.
600 (read_fs_list): Likewise.
602 * include/parser.h: Include <grub/reader.h>.
603 (grub_parser_split_cmdline): Change type of getline parameter.
604 (grub_parser): New structure.
605 (grub_parser_class): New variable.
606 (grub_parser_execute): New function declaration.
607 (grub_register_rescue_parser): Likewise.
608 (grub_parser_register): New inline function.
609 (grub_parser_unregister): Likewise.
610 (grub_parser_get_current): Likewise.
611 (grub_parser_set_current): Likewise.
613 * include/grub/reader.h: New file.
614 * kern/reader.c: Likewise.
615 * kern/rescue_parser.c: Likewise.
616 * kern/rescue_reader.c: Likewise.
617 * normal/autofs.c: Likewise.
618 * normal/dyncmd.c: Likewise.
620 * include/grub/rescue.h: Removed.
621 * normal/command.h: Likewise.
623 * include/grub/script.h: Moved to ...
624 * include/grub/script_sh.h: ... Moved here.
625 * normal/execute.c: Moved to ...
626 * script/sh/execute.c: ... Moved here.
627 * normal/function.c: Moved to ...
628 * script/sh/function.c: ... Moved here.
629 * normal/lexer.c: Moved to ...
630 * script/sh/lexer.c: ... Moved here.
631 * normal/parser.y: Moved to ...
632 * script/sh/parser.y: ... Moved here.
633 * normal/script.c: Moved to ...
634 * script/sh/script.c: ... Moved here.
636 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
638 (grub_exit_env): Removed.
639 (fs_module_list): Moved to normal/autofs.c.
640 (grub_file_getline): Don't handle comment here.
641 (free_menu): Skip removed field entry->commands.
642 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
644 (read_config_file): Removed nested parameter, change getline function.
645 (grub_enter_normal_mode): Removed.
646 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
647 (read_command_list): Likewise.
648 (autoload_fs_module): Moved to normal/autofs.c.
649 (read_fs_list): Likewise.
650 (reader_nested): New variable.
651 (grub_normal_execute): Run parser.sh to switch to sh parser.
652 (grub_cmd_rescue): Removed.
653 (cmd_normal): Removed.
654 (grub_cmd_normal): Unregister itself at the beginning. Don't register
656 (grub_cmdline_run): New function.
657 (grub_normal_reader_init): Likewise.
658 (grub_normal_read_line): Likewise.
659 (grub_env_write_pager): Likewise.
660 (cmdline): New variable.
661 (grub_normal_reader): Likewise.
662 (GRUB_MOD_INIT): Register normal reader and set as current, register
663 pager hook, register normal command with grub_register_command_prio,
664 so that it won't show up in command.lst.
665 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
666 grub_fs_autoload_hook.
668 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
669 (grub_menu_execute_entry): Replace grub_script_execute with
670 grub_parser_execute, change parameter to grub_command_execute.
672 * normal/menu_text.c: Remove <grub/script.h>.
674 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
676 (run): Change editor_getline to use new parser interface. Change
677 parameter to grub_command_execute.
679 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
680 <grub/reader.h> and <grub/parser.h>.
681 (grub_load_normal_mode): Execute normal command.
682 (grub_main): Call grub_register_core_commands,
683 grub_register_rescue_parser and grub_register_rescue_reader, use
684 grub_reader_loop to enter input loop.
686 * kern/parser.c (grub_parser_split_cmdline): Change type of
688 (grub_parser_class): New variable.
689 (grub_parser_execute): New function.
691 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
692 * loader/multiboot2.c: Likewise.
693 * loader/sparc64/ieee1275/linux.c: Likewise.
695 * util/grub-emu.c (read_command_list): New dummy function.
697 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
699 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
700 count to 16 for CCISS and IDA.
702 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
704 * normal/menu_text.c (grub_wait_after_message): Print a newline
705 after waiting for user input.
707 * loader/i386/linux.c: Include `<grub/normal.h>'.
708 (grub_cmd_linux): Improve the error message about `ask' mode, by
709 waiting for user input so it's not missed (we can do this, since
710 user requested interaction).
712 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
714 Added missing lst to grub-mkrescue
716 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
717 and ${input_dir}/parttool.lst
719 2009-04-30 David S. Miller <davem@davemloft.net>
721 * util/hostdisk.c (device_is_wholedisk): New function.
722 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
723 zero only if device_is_wholedisk() returns true.
725 * util/hostdisk.c (convert_system_partition_to_system_disk):
726 Handle virtual disk devices named /dev/vdiskX as found on sparc
729 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
730 lettered partition specifier is found, convert to numbered.
732 2009-04-29 David S. Miller <davem@davemloft.net>
734 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
735 * include/grub/sparc64/ieee1275/memory.h: Likewise.
737 * normal/command.c: Add missing newline at end of file.
739 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
741 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
742 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
743 grub_ofdisk_read): Likewise, and deal similarly with the fact that
744 ihandles have a 32-bit type but need to be stored in a "void *".
746 2009-04-28 Pavel Roskin <proski@gnu.org>
748 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
749 not disk. Adjust all dependencies.
750 (grub_fs_uuid_close): Use grub_device_close(), not
753 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
754 parent's partition, don't copy it by reference, as it gets freed
757 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
759 Preboot hooks support
761 * commands/boot.c (struct grub_preboot_t): new declaration
762 (preboots_head): new variable
763 (preboots_tail): likewise
764 (grub_loader_register_preboot_hook): new function
765 (grub_loader_unregister_preboot_hook): likewise
766 (grub_loader_set): launch preboot hooks
767 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
768 (grub_loader_register_preboot_hook): new declaration
769 (grub_loader_unregister_preboot_hook): likewise
771 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
775 * disk/scsi.c (grub_scsi_open): added missing cast when
778 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
780 Bug and warning fixes
782 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
784 * commands/test.c (test_parse): fixed bug with file tests and corrected
785 declaration of find_file
787 2009-04-26 Pavel Roskin <proski@gnu.org>
789 * Makefile.in: Don't install empty manual pages if help2man is
790 missing. Use help2man option for output, not shell redirection.
792 2009-04-26 David S. Miller <davem@davemloft.net>
794 * util/grub-mkdevicemap.c (make_device_map): Add missing
795 NESTED_FUNC_ATTR to process_device().
797 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
801 * commands/test.c: rewritten to use bash-like test
803 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
805 Parttool autoloading and improvements
807 * Makefile.in (pkglib_DATA): add parttool.lst
808 (parttool.lst): new target
809 * genmk.rb: generate parttool-*
810 (CLEANFILES): add #{parttool}
811 (PARTTOOLFILES): new variable
812 * genparttoollist.sh: new file
813 * parttool/pcpart.c (grub_pcpart_boot): more feedback
814 (grub_pcpart_type): likewise
815 * commands/parttool.c (helpmsg): new variable
816 (grub_cmd_parttool): output help if not enough arguments are supplied
818 (GRUB_MOD_INIT(parttool)): use helpmsg
820 2009-04-24 David S. Miller <davem@davemloft.net>
822 Avoiding opening same device multiple times in device iterator.
824 * kern/device.c: (grub_device_iterate): Define struct part_ent,
825 and use it to build a list of partitions in iterate_disk() and
828 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
831 * disk/ieee1275/nand.c (grub_nand_iterate): Return
832 grub_devalias_iterate() result instead of unconditional 0.
833 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
834 Also, capture hook return value, either directly or via
835 grub_children_iterate(), and propagate to caller.
836 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
837 grub_children_iterate): Return value is now 'int' instead of
839 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
840 like a proper iterator, stopping when hooks return non-zero.
841 (grub_devalias_iterate): Likewise.
843 2009-04-23 David S. Miller <davem@davemloft.net>
845 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
847 2009-04-22 David S. Miller <davem@davemloft.net>
849 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
850 is larger than address_cells, use that value for address_cells too.
852 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
853 IEEE1275_MAX_PATH_LEN): Define.
854 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
855 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
856 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
857 'devtype'. Explicitly NULL terminate devalias expansion.
859 * util/sparc64/ieee1275/misc.c: New file.
860 * util/sparc64/ieee1275/grub-setup.c: New file.
861 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
862 * util/sparc64/ieee1275/grub-mkimage.c: New file.
863 * util/sparc64/ieee1275/grub-install.in: New file.
864 * util/ieee1275/ofpath.c: New file.
865 * util/ieee1275/devicemap.c: New file.
866 * util/devicemap.c: New file.
867 * util/deviceiter.c: New file.
868 * kern/sparc64/ieee1275/init.c: New file.
869 * include/grub/util/ofpath.h: New file.
870 * include/grub/util/deviceiter.h: New file.
871 * util/grub-mkdevicemap.c: Include deviceiter.h.
872 Implement using grub_util_emit_devicemap_entry and
873 grub_util_iterate_devices.
874 * conf/i386-corebook.rmk: Build util/deviceiter.c and
875 util/devicemap.c into grub-mkdevicemap
876 * conf/i386-efi.rmk: Likewise.
877 * conf/i386-ieee1275.rmk: Likewise.
878 * conf/i386-pc.rmk: Likewise.
879 * conf/powerpc-ieee1275.rmk: Likewise.
880 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
881 images and installation utilities. Build kernel as image
882 instead of as elf binary. Use common rules as much as possible.
884 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
886 Correct GPT definition
888 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
891 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
893 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
895 2009-04-19 David S. Miller <davem@davemloft.net>
897 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
898 (grub_rescue_cmd_linux): Rename to...
899 (grub_cmd_linux): and fix prototype.
900 (grub_rescue_cmd_initrd): Rename to...
901 (grub_cmd_initrd): and fix prototype.
902 (cmd_linux, cmd_initrd): New.
903 (GRUB_MOD_INIT(linux)): Use grub_register_command().
904 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
906 2009-04-17 Pavel Roskin <proski@gnu.org>
908 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
910 (grub_ohci_transfer): Likewise.
912 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
914 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
915 return without a value. Fix inconsistent indentation.
917 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
918 match struct grub_fs.
920 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
921 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
922 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
923 * commands/lspci.c (grub_lspci_iter): Likewise.
925 2009-04-16 Bean <bean123ch@gmail.com>
927 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
930 2009-04-15 Pavel Roskin <proski@gnu.org>
932 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
933 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
934 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
937 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
939 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
940 that no multiple data or metadata areas are supported and `Unknown
943 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
945 Move loader out of the kernel
947 * kern/loader.c: moved to ...
948 * commands/boot.c: ... moved here
949 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
950 * commands/boot.c (grub_cmd_boot): moved here. All users updated
951 * include/grub/kernel.h (grub_machine_fini): export
952 * include/grub/loader.h (grub_loader_is_loaded): update declaration
953 (grub_loader_set): likewise
954 (grub_loader_unset): likewise
955 (grub_loader_boot): likewise
956 * conf/common.rmk: new module boot.mod
957 (pkglib_MODULES): add boot.mod
958 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
959 (grub_emu_SOURCES): likewise
960 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
961 (grub_emu_SOURCES): likewise
962 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
963 (grub_emu_SOURCES): likewise
964 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
965 (grub_emu_SOURCES): likewise
966 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
967 (grub_emu_SOURCES): likewise
968 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
969 (grub_emu_SOURCES): likewise
970 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
971 (grub_emu_SOURCES): likewise
973 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
975 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
977 * kern/misc.c (grub_itoa): Removed function
978 (grub_ltoa): likewise
979 (grub_vsprintf): use grub_lltoa
981 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
985 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
986 * conf/i386-coreboot.rmk: likewise
987 * conf/i386-ieee1275.rmk: likewise
988 * conf/powerpc-ieee1275.rmk: likewise
990 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
992 * INSTALL: Add that `./autogen.sh' needs to be run before
995 2009-04-14 Bean <bean123ch@gmail.com>
997 * Makefile.in (pkglib_DATA): Add handler.lst.
998 (handler.lst): New rule.
1000 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1001 * conf/i386-coreboot.rmk: Likewise.
1002 * conf/i386-ieee1275.rmk: Likewise.
1003 * conf/i386-efi.rmk: Likewise.
1004 * conf/x86_64-efi.rmk: Likewise.
1005 * conf/powerpc-ieee1275.rmk: Likewise.
1006 * conf/sparc64-ieee1275.rmk: Likewise.
1008 * genhandlerlist.sh: New file.
1010 * genmk.rb: Add rules to generate handler.lst.
1012 * include/grub/normal.h (grub_file_getline): New function definition.
1013 (read_handler_list): Likewise.
1014 (free_handler_list): Likewise.
1016 * include/grub/term.h (grub_term_register_input): Add name parameter
1017 for auto generation of handler.lst.
1018 (grub_term_register_output): Likewise.
1020 * normal/handler.c: New file.
1022 * normal/main.c (get_line): Renamed to grub_file_getline.
1023 (read_config_file): Use the newly renamed grub_file_getline.
1024 (read_command_list): Likewise.
1025 (read_fs_list): Likewise.
1026 (grub_normal_execute): Call read_handler_list to parse handler.lst.
1027 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1029 * term/efi/console.c (grub_console_init): Add name parameter for auto
1030 generation of handler.lst.
1031 * term/gfxterm.c: Likewise.
1032 * term/i386/pc/at_keyboard.c: Likewise.
1033 * term/i386/pc/console.c: Likewise.
1034 * term/i386/pc/serial.c: Likewise.
1035 * term/i386/pc/vesafb.c: Likewise.
1036 * term/i386/pc/vga.c: Likewise.
1037 * term/i386/pc/vga_text.c: Likewise.
1038 * term/ieee1275/ofconsole.c: Likewise.
1039 * term/usb_keyboard.c: Likewise.
1041 2009-04-14 Bean <bean123ch@gmail.com>
1043 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1044 properly with null character.
1046 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1048 * configure: Remove.
1049 * config.h.in: Likewise.
1050 * stamp-h.in: Likewise.
1051 * DISTLIST: Likewise.
1052 * conf/common.mk: Likewise.
1053 * conf/i386-coreboot.mk: Likewise.
1054 * conf/i386-efi.mk: Likewise.
1055 * conf/i386-ieee1275.mk: Likewise.
1056 * conf/i386.mk: Likewise.
1057 * conf/i386-pc.mk: Likewise.
1058 * conf/powerpc-ieee1275.mk: Likewise.
1059 * conf/sparc64-ieee1275.mk: Likewise.
1060 * conf/x86_64-efi.mk: Likewise.
1062 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1065 2009-04-14 John Stanley <jpsinthemix@verizon.net>
1066 David S. Miller <davem@davemloft.net>
1068 * util/hostdisk.c (make_device_name): Fix buffer length
1071 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
1073 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1074 <sys/param.h> and <sys/sysctl.h>.
1075 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1076 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1077 opening the device and reset them afterwards.
1079 2009-04-13 Pavel Roskin <proski@gnu.org>
1081 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1082 Reported by John Stanley <jpsinthemix@verizon.net>
1084 2009-04-13 Robert Millan <rmh@aybabtu.com>
1086 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1087 that name for menuentries when appropriate.
1089 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1091 * util/grub.d/10_freebsd.in: Add a missing `fi'.
1093 2009-04-13 Robert Millan <rmh@aybabtu.com>
1095 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1096 to Linux, simply abort telling the user it's no longer supported.
1098 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1100 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1101 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
1102 `freebsd_loadenv' only when devices.hints exist.
1104 2009-04-13 Pavel Roskin <proski@gnu.org>
1106 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1108 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
1110 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1112 (grub_drive): Likewise.
1114 2009-04-13 David S. Miller <davem@davemloft.net>
1116 * kern/sparc64/ieee1275/ieee1275.c: New file.
1117 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1118 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1119 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1120 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1121 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1122 grub_ieee1275_alloc_physmem): Declare new exported functions.
1124 * include/grub/sparc64/ieee1275/loader.h: New file.
1125 * include/grub/sparc64/ieee1275/memory.h: Likewise.
1126 * include/grub/sparc64/kernel.h: Likewise.
1127 * loader/sparc64/ieee1275/linux.c: Likewise.
1129 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1130 (grub_fstest_SOURCES): Likewise.
1132 * util/hostdisk.c (make_device_name): Do not make any assumptions
1133 about the length of drive names.
1135 * kern/dl.c (grub_dl_load_file): Close file immediately when
1136 we are done using it.
1138 2009-04-12 David S. Miller <davem@davemloft.net>
1140 * kern/misc.c (grub_ltoa): Fix cast when handling negative
1141 values. Noticed by Pavel Roskin.
1143 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1146 * genmk.rb: Add more flexible image type specification, also
1147 pass --strip-unneeded to objcopy.
1148 * conf/i386-pc.rmk: Use *_FORMAT.
1149 * conf/i386-pc.mk: Rebuilt.
1151 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1152 (OFDISK_HASH_SZ): Define.
1153 (ofdisk_hash): New hash table.
1154 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1155 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1156 instead of device phandle which is not unique.
1158 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1159 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1160 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1161 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1162 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1163 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1164 GRUB_KERNEL_MACHINE_DATA_END): Define.
1165 (grub_kernel_image_size, grub_total_module_size): Declare.
1167 2009-04-12 Pavel Roskin <proski@gnu.org>
1169 * configure.ac: Change the logic when we check for target tools.
1170 Do it when the target is specified and it's different from the
1171 specified value of the host.
1173 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1175 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1176 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1177 GNU/kFreeBSD. Check if a device is a character device. Use
1178 DIOCGMEDIASIZE to get the size.
1179 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1180 support for GNU/kFreeBSD.
1181 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1182 is a character device instead of a block device. Add support for
1183 FreeBSD device names.
1185 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1186 is a character device instead of a block device.
1188 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1189 is a character device instead of a block device.
1191 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1193 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1194 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1195 FreeBSD. Check if a device is a character device. Use
1196 DIOCGMEDIASIZE to get the size.
1197 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1198 support for FreeBSD.
1199 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1200 is a character device instead of a block device. Add support for
1201 FreeBSD device names.
1203 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1204 a character device instead of a block device.
1205 (grub_util_check_char_device): New function.
1207 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1208 a character device instead of a block device.
1210 * include/grub/util/getroot.h (grub_util_check_char_device): New
1213 2009-04-11 David S. Miller <davem@davemloft.net>
1215 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1217 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1218 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1219 function, if present.
1220 (__bswapdi2): Likewise.
1222 * include/grub/sparc64/ieee1275/boot.h: New file.
1223 * boot/sparc64/ieee1275/boot.S: Likewise.
1224 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1226 * kern/misc.c (grub_ltoa): New function.
1227 (grub_vsprintf): Use it to format 'long' integers.
1229 2009-04-10 David S. Miller <davem@davemloft.net>
1231 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1232 slots are of type grub_ieee1275_cell_t.
1233 (grub_nand_read): Likewise.
1234 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1235 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1236 macros are used to compare values in arg/ret block of the call.
1237 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1238 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1239 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1240 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1241 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1242 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1243 grub_ieee1275_close, grub_ieee1275_set_property,
1244 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1245 grub_ieee1275_cell_t.
1246 * kern/ieee1275/openfw.c (grub_map): Likewise.
1247 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1248 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1250 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1251 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1252 (grub_devalias_iterate): Likewise.
1254 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
1258 * fs/ufs.c (INODE_NBLOCKS): new definition
1259 (struct grub_ufs_dirent): added fields for non-BSD dirents
1260 (grub_ufs_get_file_block): fixed double indirect handling
1261 (grub_ufs_lookup_symlink): use more robust way to determine whether
1263 (grub_ufs_find_file): support for non-BSD dirents
1264 (grub_ufs_dir): support for non-BSD dirents
1266 2009-04-10 Bean <bean123ch@gnail.com>
1268 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1269 attribute, otherwise the size would be wrong for i386 platform.
1271 * include/grub/pci.h (grub_pci_read_word): New inline function.
1272 (grub_pci_read_byte): Likewise.
1273 (grub_pci_write): Likewise.
1274 (grub_pci_write_word): Likewise.
1275 (grub_pci_write_byte): Likewise.
1277 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1279 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1280 (find_framebuf): Scan pci to locate the frame buffer address.
1282 * commands/efi/fixvideo.c: New file.
1284 * commands/efi/loadbios.c: Likewise.
1286 * commands/memrw.c: Likewise.
1288 * util/grub-dumpbios.in: Likewise.
1290 * conf/common.rmk (grub-dumpbios): New utility.
1291 (pkglib_MODULES): New module memrw.mod.
1292 (memrw_mod_SOURCE): New macro.
1293 (memrw_mod_CFLAGS): Likewise.
1294 (memrw_mod_LDFLAGS): Likewise.
1296 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1298 (loadbios_mod_SOURCE): New macro.
1299 (loadbios_mod_CFLAGS): Likewise.
1300 (loadbios_mod_LDFLAGS): Likewise.
1301 (fixvideo_mod_SOURCE): Likewise.
1302 (fixvideo_mod_CFLAGS): Likewise.
1303 (fixvideo_mod_LDFLAGS): Likewise.
1305 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1307 (loadbios_mod_SOURCE): New macro.
1308 (loadbios_mod_CFLAGS): Likewise.
1309 (loadbios_mod_LDFLAGS): Likewise.
1310 (fixvideo_mod_SOURCE): Likewise.
1311 (fixvideo_mod_CFLAGS): Likewise.
1312 (fixvideo_mod_LDFLAGS): Likewise.
1314 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
1316 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1318 2009-04-07 David S. Miller <davem@davemloft.net>
1320 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1321 support for R_SPARC_OLO10 relocations. Fix compile warning for
1322 R_SPARC_WDISP30 case.
1323 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1325 2009-04-06 Pavel Roskin <proski@gnu.org>
1327 * include/grub/misc.h (ARRAY_SIZE): New macro.
1328 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1330 * loader/i386/linux.c (allocate_pages): Use free_pages().
1331 (grub_linux_unload): Don't use free_pages().
1332 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1333 wrong index. Treat all other modes as text modes.
1334 (grub_cmd_linux): Initialize vid_mode unconditionally to
1335 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1337 * commands/help.c (print_command_help): Use cmd->prio, not
1338 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1340 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
1344 * parttool/pcpart.c: new file
1345 * commands/parttool.c: likewise
1346 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1347 (parttool_mod_SOURCES): new variable
1348 (parttool_mod_CFLAGS): likewise
1349 (parttool_mod_LDFLAGS): likewise
1350 (pcpart_mod_SOURCES): likewise
1351 (pcpart_mod_CFLAGS): likewise
1352 (pcpart_mod_LDFLAGS): likewise
1353 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1354 and parttool/pcpart.c
1355 * conf/i386-efi.rmk: likewise
1356 * conf/i386-ieee1275.rmk: likewise
1357 * conf/i386-pc.rmk: likewise
1358 * conf/powerpc-ieee1275.rmk: likewise
1359 * conf/sparc64-ieee1275.rmk: likewise
1360 * conf/x86_64-ieee1275.rmk: likewise
1362 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1364 Support for mtime and further expandability of dir command
1366 * include/grub/lib/datetime.h: moved to ...
1367 * include/grub/datetime.h: ... moved here and added
1368 declaration of grub_unixtime2datetime. All users updated
1369 * include/grub/fs.h: new syntax for dir and mtime functions in
1371 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1372 and GRUB_FSHELP_FLAGS_MASK
1373 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1374 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1375 (grub_ext2_mtime): new function
1376 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1377 (grub_hfsplus_mtime): new function
1378 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1379 (GRUB_UFS_ATTR_FILE): likewise
1380 (GRUB_UFS_ATTR_LNK): likewise
1381 (struct grub_ufs_sblock): new fields mtime
1382 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1384 (grub_ufs_dir): mtime support
1385 (grub_ufs_mtime): new function
1386 * fs/affs.c (grub_affs_dir): use new dir syntax
1387 * fs/afs.c (grub_afs_dir): likewise
1388 * fs/cpio.c (grub_cpio_dir): likewise
1389 * fs/fat.c (grub_fat_find_dir): likewise
1390 * fs/hfs.c (grub_hfs_dir): likewise
1391 * fs/iso9660.c (grub_iso9660_dir): likewise
1392 * fs/jfs.c (grub_jfs_dir): likewise
1393 * fs/minix.c (grub_minix_dir): likewise
1394 * fs/ntfs.c (grub_ntfs_dir): likewise
1395 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1396 * fs/sfs.c (grub_sfs_dir): likewise
1397 * fs/xfs.c (grub_xfs_dir): likewise
1398 * util/hostfs.c (grub_hostfs_dir): likewise
1399 * lib/datetime.c: moved to ...
1400 * normal/datetime.c: ... moved here
1401 (grub_unixtime2datetime): new function
1402 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1403 * normal/completion.c (iterate_dir): use new dir syntax
1404 * normal/misc.c (grub_normal_print_device_info): tell the
1405 last modification time of a volume
1406 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1407 * conf/common.rmk: added lib/datetime.c to ls.mod
1408 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1409 (normal_mod_SOURCES): likewise
1410 (datetime_mod_SOURCES): Removed lib/datetime.c
1411 * conf/i386-efi.rmk: likewise
1412 * conf/i386-ieee1275.rmk: likewise
1413 * conf/i386-pc.rmk: likewise
1414 * conf/powerpc-ieee1275.rmk: likewise
1415 * conf/sparc64-ieee1275.rmk: likewise
1416 * conf/x86_64-efi.rmk: likewise
1418 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1420 Trim trailing spaces in FAT label and support mtools-like labels
1422 * fs/fat.c (grub_fat_iterate_dir): New function based
1423 on grub_fat_find_dir
1424 (grub_fat_find_dir): use grub_fat_iterate_dir
1425 (grub_fat_label): likewise
1427 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1429 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1431 remove extraneous kernel_elf_HEADERS
1433 2009-04-04 Bean <bean123ch@gnail.com>
1435 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1437 * util/misc.c: Likewise.
1439 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1441 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1442 instead of grub_printf.
1444 2009-04-03 Robert Millan <rmh@aybabtu.com>
1446 * loader/i386/linux.c (grub_linux_setup_video): Fill
1447 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1448 values from `mode info' structure instead of hardcoded
1451 2009-04-01 Pavel Roskin <proski@gnu.org>
1453 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1455 * genmk.rb: Likewise.
1456 * configure.ac: Likewise.
1458 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1460 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1461 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1463 2009-04-01 David S. Miller <davem@davemloft.net>
1465 * normal/sparc64/setjmp.S: Fix setjmp implementation.
1466 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1467 (grub_setjmp): Mark with 'returns_twice' attribute.
1468 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1469 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1470 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1472 2009-04-01 Robert Millan <rmh@aybabtu.com>
1474 Reapply fix from 2008-07-28 which was accidentally reverted; also
1475 perform the same fix to a similar check in same function.
1477 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1478 with the same number are found, just use issue a warning with
1479 grub_dprintf(), as this error has been reported to be non-fatal.
1481 2009-03-31 Pavel Roskin <proski@gnu.org>
1483 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1484 for cross-compilation.
1486 2009-03-30 Robert Millan <rmh@aybabtu.com>
1488 Fix i386-ieee1275 build.
1490 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1493 2009-03-30 Pavel Roskin <proski@gnu.org>
1495 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1496 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1497 zero-terminated, rely only on the strlen value. Fix comparison
1498 of strings differing in length.
1500 2009-03-30 Robert Millan <rmh@aybabtu.com>
1502 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1503 checking for abi version. Improve error messages on BIOS to notify
1504 user about `linux16' command.
1506 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1510 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1511 in case of collision
1512 * disk/scsi.c (grub_scsi_open): free scsi in case of error
1514 2009-03-29 Robert Millan <rmh@aybabtu.com>
1516 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1517 set `vid_mode' accordingly.
1518 (grub_linux_boot): Process `vid_mode' and set video mode.
1520 2009-03-29 Robert Millan <rmh@aybabtu.com>
1522 * util/grub.d/10_linux.in (linux_entry): New function.
1523 Factorize generation of Linux boot entries.
1525 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1527 Make the format of Environment Block plain text. The boot loader
1528 part is not tested well yet.
1530 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1533 (usage): Remove "info" and "clear". Add "unset". Update the
1534 description of "set", as this does not delete variables any
1536 (create_envblk_file): Complete rewrite.
1537 (open_envblk_file): Likewise.
1538 (cmd_info): Removed.
1539 (cmd_list): Likewise.
1540 (cmd_set): Likewise.
1541 (cmd_clear): Likewise.
1542 (list_variables): New function.
1543 (write_envblk): Likewise.
1544 (set_variables): Likewise.
1545 (unset_variables): Likewise.
1546 (main): Complete rewrite.
1548 * commands/loadenv.c (buffer): Removed.
1550 (open_envblk_file): New function.
1551 (read_envblk_file): Complete rewrite.
1552 (grub_cmd_load_env): Likewise.
1553 (grub_cmd_list_env): Likewise.
1554 (struct blocklist): New struct.
1555 (free_blocklists): New function.
1556 (check_blocklists): Likewise.
1557 (write_blocklists): Likewise.
1558 (grub_cmd_save_env): Complete rewrite.
1560 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1561 a plain text signature.
1562 (GRUB_ENVBLK_MAXLEN): Removed.
1563 (struct grub_envblk): Complete rewrite.
1564 (grub_envblk_find): Removed.
1565 (grub_envblk_insert): Likewise.
1566 (grub_envblk_open): New prototype.
1567 (grub_envblk_set): Likewise.
1568 (grub_envblk_delete): Put const to VALUE.
1569 (grub_envblk_iterate): Put const to NAME and VALUE.
1570 (grub_envblk_close): New prototype.
1571 (grub_envblk_buffer): New inline function.
1572 (grub_envblk_size): Likewise.
1574 * lib/envblk.c: Include grub/mm.h.
1575 (grub_env_find): Removed.
1576 (grub_envblk_open): New function.
1577 (grub_envblk_close): Likewise.
1578 (escaped_value_len): Likewise.
1579 (find_next_line): Likewise.
1580 (grub_envblk_insert): Removed.
1581 (grub_envblk_set): New function.
1582 (grub_envblk_delete): Complete rewrite.
1583 (grub_envblk_iterate): Likewise.
1585 2009-03-28 Robert Millan <rmh@aybabtu.com>
1587 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1588 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1589 variables. Use 16-bit loader.
1590 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1592 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1593 (grub_linux16_boot): ... this. Update all users.
1594 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1595 (grub_linux_boot): ... this. Update all users.
1597 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1598 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1599 commands to `linux16' and `initrd16'.
1600 (GRUB_MOD_FINI(linux)): Rename to ...
1601 (GRUB_MOD_FINI(linux16)): ... this.
1603 2009-03-24 Pavel Roskin <proski@gnu.org>
1605 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1606 not just for compilation.
1608 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1610 Move multiboot helper out of kernel
1612 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1613 `loader/i386/multiboot_helper.S'.
1614 * conf/i386-coreboot.rmk: Likewise
1615 * conf/i386-ieee1275.rmk: Likewise
1617 * kern/i386/loader.S: Move multiboot helpers from here...
1618 * loader/i386/multiboot_helper.S: ...moved here
1619 * include/grub/i386/loader.h: Move declarations of multiboot
1620 helpers from here...
1621 * include/grub/i386/multiboot.h: ...moved here
1622 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1624 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1626 * kern/env.c (grub_env_context_open): Added an argument to specify
1627 whether a new context inherits exported variables from current
1628 one. This is useful when making a sandbox to interpret a config
1630 All callers updated.
1632 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1634 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1636 * kern/env.c (grub_env_context_close): Fix memory leaks.
1638 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1640 * normal/main.c (grub_normal_execute): Added an argument
1641 BATCH to specify if an interactive interface should be provided
1642 after reading a config file.
1643 All callers updated.
1644 (read_command_list): Prevent being executed twice.
1645 (read_fs_list): Likewise.
1647 * include/grub/normal.h (grub_normal_execute): Updated the
1650 2009-03-22 Pavel Roskin <proski@gno.org>
1652 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1654 * kern/i386/pc/startup.S: Likewise.
1655 * kern/i386/efi/startup.S: Likewise.
1656 * kern/i386/ieee1275/startup.S: Likewise.
1657 * kern/i386/coreboot/startup.S: Likewise.
1658 * kern/x86_64/efi/startup.S: Likewise.
1660 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1661 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1662 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1664 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1666 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1668 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1670 Use vaddr of correct segment for entry_point.
1672 2009-03-21 Bean <bean123ch@gmail.com>
1674 * commands/blocklist.c: Add include file <grub/command.h>, remove
1675 <grub/normal.h> and <grub/arg.h>.
1676 (grub_cmd_blocklist): Use the new command interface.
1677 (GRUB_MOD_INIT): Likewise.
1678 (GRUB_MOD_FINI): Likewise.
1679 * commands/boot.c: Likewise.
1680 * commands/cat.c: Likewise.
1681 * commands/cmp.c: Likewise.
1682 * commands/configfile.c: Likewise.
1683 * commands/crc.c: Likewise.
1684 * commands/echo.c: Likewise.
1685 * commands/halt.c: Likewise.
1686 * commands/handler.c: Likewise.
1687 * commands/hdparm.c: Likewise.
1688 * commands/help.c: Likewise.
1689 * commands/hexdump.c: Likewise.
1690 * commands/loadenv.c: Likewise.
1691 * commands/ls.c: Likewise.
1692 * commands/lsmmap.c: Likewise.
1693 * commands/lspci.c: Likewise.
1694 * commands/loadenv.c: Likewise.
1695 * commands/read.c: Likewise.
1696 * commands/reboot.c: Likewise.
1697 * commands/search.c: Likewise.
1698 * commands/sleep.c: Likewise.
1699 * commands/test.c: Likewise.
1700 * commands/usbtest.c: Likewise.
1701 * commands/videotest.c: Likewise.
1702 * commands/i386/cpuid.c: Likewise.
1703 * commands/i386/pc/halt.c: Likewise.
1704 * commands/i386/pc/play.c: Likewise.
1705 * commands/i386/pc/pxecmd.c: Likewise.
1706 * commands/i386/pc/vbeinfo.c: Likewise.
1707 * commands/i386/pc/vbetest.c: Likewise.
1708 * commands/ieee1275/suspend.c: Likewise.
1709 * disk/loopback.c: Likewise.
1710 * font/font_cmd.c: Likewise.
1711 * hello/hello.c: Likewise.
1712 * loader/efi/appleloader.c: Likewise.
1713 * loader/efi/chainloader.c: Likewise.
1714 * loader/i386/bsd.c: Likewise.
1715 * loader/i386/efi/linux.c: Likewise.
1716 * loader/i386/ieee1275/linux.c: Likewise.
1717 * loader/i386/linux.c: Likewise.
1718 * loader/i386/pc/chainloader.c: Likewise.
1719 * loader/i386/pc/linux.c: Likewise.
1720 * loader/powerpc/ieee1275/linux.c: Likewise.
1721 * loader/multiboot_loader.c: Likewise.
1722 * term/gfxterm.c: Likewise.
1723 * term/i386/pc/serial.c: Likewise.
1724 * term/terminfo.c: Likewise.
1726 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1727 * term/i386/pc/vga.c: Likewise.
1728 * video/readers/jpeg.c: Likewise.
1729 * video/readers/png.c: Likewise.
1730 * video/readers/tga.c: Likewise.
1732 * util/grub-fstest (cmd_loopback): Removed.
1733 (cmd_blocklist): Likewise.
1735 (grub_register_command): Likewise.
1736 (grub_unregister_command): Likewise.
1737 (execute_command): Use grub_command_find to locate command and execute
1740 * include/grub/efi/chainloader.h: Removed.
1741 * loader/efi/chainloader_normal.c: Likewise.
1742 * loader/i386/bsd_normal.c: Likewise.
1743 * loader/i386/pc/chainloader_normal.c: Likewise.
1744 * loader/i386/pc/multiboot_normal.c: Likewise.
1745 * loader/linux_normal.c: Likewise.
1746 * loader/multiboot_loader_normal.c: Likewise.
1747 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1749 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1750 and grub_register_command_p1.
1752 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1753 kern/command.c, lib/arg.c and commands/extcmd.c.
1754 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1755 (minicmd_mod_SOURCES): New variable.
1756 (minicmd_mod_CFLAGS): Likewise.
1757 (minicmd_mod_LDFLAGS): Likewise.
1758 (extcmd_mod_SOURCES): Likewise.
1759 (extcmd_mod_CFLAGS): Likewise.
1760 (extcmd_mod_LDFLAGS): Likewise.
1761 (boot_mod_SOURCES): Removed.
1762 (boot_mod_CFLAGS): Likewise.
1763 (boot_mod_LDFLAGS): Likewise.
1765 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1767 (kernel_img_HEADERS): Add command.h.
1768 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1769 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1771 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1772 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1773 remove the corresponding normal mode command.
1774 (normal_mod_SOURCES): Remove normal/arg.c.
1775 * conf/i386-coreboot.rmk: Likewise.
1776 * conf/i386-efi.rmk: Likewise.
1777 * conf/i386-ieee1275.rmk: Likewise.
1778 * conf/powerpc-ieee1275.rmk: Likewise.
1779 * conf/x86_64-efi.rmk: Likewise.
1781 * include/grub/arg.h: Move from here ...
1782 * include/grub/lib/arg.h: ... to here.
1784 * normal/arg.c: Move from here ...
1785 * lib/arg.c: ... to here.
1787 * commands/extcmd.c: New file.
1788 * commands/minicmd.c: Likewise.
1789 * include/grub/command.h: Likewise.
1790 * include/grub/extcmd.h: Likewise.
1791 * kern/command.c: Likewise.
1792 * kern/corecmd.c: Likewise.
1794 * kern/list.c (grub_list_iterate): Return int instead of void.
1795 (grub_list_insert): New function.
1796 (grub_prio_list_insert): Likewise.
1798 * kern/rescue.c (grub_rescue_command): Removed.
1799 (grub_rescue_command_list): Likewise.
1800 (grub_rescue_register_command): Likewise.
1801 (grub_rescue_unregister_command): Likewise.
1802 (grub_rescue_cmd_boot): Move to minicmd.c
1803 (grub_rescue_cmd_help): Likewise.
1804 (grub_rescue_cmd_info): Likewise.
1805 (grub_rescue_cmd_boot): Likewise.
1806 (grub_rescue_cmd_testload): Likewise.
1807 (grub_rescue_cmd_dump): Likewise.
1808 (grub_rescue_cmd_rmmod): Likewise.
1809 (grub_rescue_cmd_lsmod): Likewise.
1810 (grub_rescue_cmd_exit): Likewise.
1811 (grub_rescue_print_devices): Moved to corecmd.c.
1812 (grub_rescue_print_files): Likewise.
1813 (grub_rescue_cmd_ls): Likewise.
1814 (grub_rescue_cmd_insmod): Likewise.
1815 (grub_rescue_cmd_set): Likewise.
1816 (grub_rescue_cmd_unset): Likewise.
1817 (attempt_normal_mode): Use grub_command_find to get normal module.
1818 (grub_enter_rescue_mode): Use grub_register_core_commands to register
1819 commands, remove grub_rescue_register_command calls.
1821 * normal/command.c (grub_register_command): Removed.
1822 (grub_unregister_command): Likewise.
1823 (grub_command_find): Likewise.
1824 (grub_iterate_commands): Likewise.
1825 (rescue_command): Likewise.
1826 (export_command): Moved to corecmd.c.
1827 (set_command): Removed.
1828 (unset_command): Likewise.
1829 (insmod_command): Likewise.
1830 (rmmod_command): Likewise.
1831 (lsmod_command): Likewise.
1832 (grub_command_init): Likewise.
1834 * normal/completion.c (iterate_command): Use cmd->prio to check for
1836 (complete_arguments): Use grub_extcmd_t structure to find options.
1837 (grub_normal_do_completion): Change function grub_iterate_commands to
1838 grub_command_iterate.
1840 * normal/execute.c (grub_script_execute_cmd): No need to parse
1843 * normal/main.c (grub_dyncmd_dispatcher): New function.
1844 (read_command_list): Register unload commands as dyncmd.
1845 (grub_cmd_normal): Use new command interface, register rescue,
1846 unregister normal at entry, register normal, unregister rescue at exit.
1848 * include/grub/list.h (grub_list_test_t): New type.
1849 (grub_list_iterate): Return int instead of void.
1850 (grub_list_insert): New function.
1851 (GRUB_AS_NAMED_LIST_P): New macro.
1852 (GRUB_AS_PRIO_LIST): Likewise.
1853 (GRUB_AS_PRIO_LIST_P): Likewise.
1854 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1855 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1856 (grub_prio_list): New structure.
1857 (grub_prio_list_insert): New function.
1858 (grub_prio_list_remove): New inline function.
1860 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1861 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1862 (GRUB_COMMAND_FLAG_MENU): Likewise.
1863 (GRUB_COMMAND_FLAG_BOTH): Likewise.
1864 (GRUB_COMMAND_FLAG_TITLE): Likewise.
1865 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1866 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1867 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1868 (grub_command): Likewise.
1869 (grub_register_command): Likewise.
1870 (grub_command_find): Likewise.
1871 (grub_iterate_commands): Likewise.
1872 (grub_command_init): Likewise.
1873 (grub_arg_parse): Likewise.
1874 (grub_arg_show_help): Likewise.
1876 * include/grub/rescue.h (grub_rescue_register_command): Removed.
1877 (grub_rescue_unregister_command): Likewise.
1879 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1880 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1881 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1883 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1884 grub_rescue_cmd_initrd.
1885 * include/grub/i386/loader.h: Likewise.
1886 * include/grub/x86_64/loader.h: Likewise.
1888 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1890 2009-03-21 Bean <bean123ch@gmail.com>
1892 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1893 instead of stat in mingw environment.
1895 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1897 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1899 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1902 2009-03-21 Bean <bean123ch@gmail.com>
1904 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1907 2009-03-18 Michel Dänzer <michel@daenzer.net>
1909 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1910 checking inode flags for EXT4_EXTENTS_FLAG.
1912 2009-03-18 Robert Millan <rmh@aybabtu.com>
1914 * loader/i386/linux.c: Include `<grub/video.h>' and
1915 `<grub/i386/pc/vbe.h>'..
1916 (grub_linux_setup_video): New function. Loosely based on the EFI one.
1917 (grub_linux32_boot): Attempt to configure video settings with
1918 grub_linux_setup_video().
1919 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1920 to avoid grub_console_fini() which would step out of graphical mode
1923 2009-03-14 Robert Millan <rmh@aybabtu.com>
1925 Fix build on powerpc.
1926 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1928 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
1930 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1931 background image command.
1933 2009-03-12 Colin D Bennett <colin@gibibit.com>
1935 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1936 (grub_gfxterm_putchar): Extract pairs of identical calls to
1937 draw_cursor out of conditional blocks.
1939 2009-03-11 Pavel Roskin <proski@gnu.org>
1941 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1942 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1944 2009-03-11 Robert Millan <rmh@aybabtu.com>
1946 * loader/i386/multiboot_elfxx.c
1947 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1949 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
1951 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1954 2009-03-11 Robert Millan <rmh@aybabtu.com>
1956 * loader/i386/multiboot.c (code_size): New variable.
1957 (grub_multiboot): Define offsets by adding to `code_size' rather
1958 than subtracting from `grub_multiboot_payload_size'. Provide
1959 4-byte alignment to MBI and others by increasing
1960 `boot_loader_name_length' appropriately.
1962 * loader/i386/multiboot_elfxx.c
1963 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1965 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
1967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1970 2009-03-08 Robert Millan <rmh@aybabtu.com>
1972 Make loader/i386/linux.c usable on i386-pc again.
1974 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1976 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1979 2009-03-07 Bean <bean123ch@gmail.com>
1981 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1984 2009-03-06 Robert Millan <rmh@aybabtu.com>
1986 Fix display issue on terminals with screen size other than 80x25
1987 (e.g. gfxterm with resolution higher than 640x480).
1989 * normal/main.c (grub_normal_init_page): Display title text in a
1990 position relative to the center of the terminal instead of relying
1991 on a hardcoded offset.
1993 2009-03-04 Robert Millan <rmh@aybabtu.com>
1995 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1998 * Makefile.in (host_kernel): New variable.
1999 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2000 scripts instead of just the windows one.
2001 * configure.ac: Initialize and AC_SUBST `host_kernel'.
2003 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2005 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2007 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2008 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2009 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2010 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2011 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2012 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2014 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2016 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2017 or if there's no space for the disk label and print the partition number on a
2020 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
2022 * util/misc.c: Include <time.h>.
2023 (grub_millisleep): New function.
2025 2009-03-04 Bean <bean123ch@gmail.com>
2027 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2028 another option -mno-red-zone.
2030 * commands/handler.c: Change module description.
2032 * kern/handler.c: Add missing space at the end of description line.
2034 * kern/list.c: Likewise.
2036 2009-03-03 Robert Millan <rmh@aybabtu.com>
2038 Move more components to the relocation area, and fix mbi pointer
2039 handling to use the destination rather than the origin (thanks to
2040 Vladimir Serbinenko for spotting).
2042 * loader/i386/multiboot.c (mbi_dest): New variable.
2043 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2044 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2047 2009-03-01 Bean <bean123ch@gmail.com>
2049 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2050 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2051 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2052 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2054 * loader/i386/efi/linux.c (acpi_guid): New variable.
2055 (acpi_guid): Likewise.
2056 (EBDA_SEG_ADDR): New constant.
2057 (LOW_MEM_ADDR): Likewise.
2058 (FAKE_EBDA_SEG): Likewise.
2059 (fake_bios_data): New function.
2060 (grub_linux_boot): Call fake_bios_data.
2062 2009-03-01 Bean <bean123ch@gmail.com>
2064 * commands/terminal.c: Removed.
2066 * commands/handler.c: New file.
2068 * include/grub/list.h: Likewise.
2070 * include/grub/handler.h: Likewise.
2072 * kern/list.c: Likewise.
2074 * kern/handler.c: Likewise.
2076 * kern/term.h: Include header file <grub/handler.h>.
2077 (grub_term_input): Move next field to the beginning.
2078 (grub_term_output): Likewise.
2079 (grub_term_input_class): New variable.
2080 (grub_term_output_class): Likewise.
2081 (grub_term_register_input): Changed to inline function.
2082 (grub_term_register_output): Likewise.
2083 (grub_term_unregister_input): Likewise.
2084 (grub_term_unregister_output): Likewise.
2085 (grub_term_set_current_input): Likewise.
2086 (grub_term_set_current_output): Likewise.
2087 (grub_term_get_current_input): Likewise.
2088 (grub_term_get_current_output): Likewise.
2089 (grub_term_iterate_input): Removed.
2090 (grub_term_iterate_output): Likewise.
2092 * kern/term.c (grub_term_list_input): Removed.
2093 (grub_term_list_output): Likewise.
2094 (grub_term_input_class): New variable.
2095 (grub_term_output_class): Likewise.
2096 (grub_cur_term_input): Change variable as macro.
2097 (grub_cur_term_output): Likewise.
2098 (grub_term_register_input): Removed.
2099 (grub_term_register_output): Likewise.
2100 (grub_term_unregister_input): Likewise.
2101 (grub_term_unregister_output): Likewise.
2102 (grub_term_set_current_input): Likewise.
2103 (grub_term_set_current_output): Likewise.
2104 (grub_term_iterate_input): Likewise.
2105 (grub_term_iterate_output): Likewise.
2106 (grub_term_get_current_input): Likewise.
2107 (grub_term_get_current_output): Likewise.
2109 * util/grub-editenv.c: Include header file <grub/handler.h>.
2110 (grub_term_get_current_input): Removed.
2111 (grub_term_get_current_output): Likewise.
2112 (grub_term_input_class): New variable.
2113 (grub_term_output_class): Likewise.
2115 * util/grub-fstest.c (grub_term_get_current_input): Removed.
2116 (grub_term_get_current_output): Likewise.
2117 (grub_term_input_class): New variable.
2118 (grub_term_output_class): Likewise.
2120 * util/grub-probe.c (grub_term_get_current_input): Removed.
2121 (grub_term_get_current_output): Likewise.
2122 (grub_term_input_class): New variable.
2123 (grub_term_output_class): Likewise.
2125 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2126 (grub_term_get_current_output): Likewise.
2127 (grub_term_input_class): New variable.
2128 (grub_term_output_class): Likewise.
2130 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2131 (terminal_mod_SOURCES): Likewise.
2132 (terminal_mod_CFLAGS): Likewise.
2133 (terminal_mod_LDFLAGS): Likewise.
2135 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2137 (kernel_img_SOURCES): Add list.c and handler.c.
2138 (kernel_img_HEADERS): Add list.h and handler.h.
2140 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2142 (kernel_mod_SOURCES): Add list.c and handler.c.
2143 (kernel_mod_HEADERS): Add list.h and handler.h.
2145 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2147 (kernel_elf_SOURCES): Add list.c and handler.c.
2148 (kernel_elf_HEADERS): Add list.h and handler.h.
2150 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2152 (kernel_elf_SOURCES): Add list.c and handler.c.
2153 (kernel_elf_HEADERS): Add list.h and handler.h.
2155 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2157 (kernel_mod_SOURCES): Add list.c and handler.c.
2158 (kernel_mod_HEADERS): Add list.h and handler.h.
2160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2162 (kernel_elf_SOURCES): Add list.c and handler.c.
2163 (kernel_elf_HEADERS): Add list.h and handler.h.
2165 2009-02-27 Robert Millan <rmh@aybabtu.com>
2167 Factorize elf32 / elf64 code in Multiboot loader. This will
2168 prevent it from getting out of sync again.
2170 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2171 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2172 grub_multiboot_load_elf64): Move from here ...
2173 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2174 grub_multiboot_load_elf): ... to here (new file).
2176 2009-02-27 Robert Millan <rmh@aybabtu.com>
2178 * util/grub.d/10_linux.in: Rename "single-user mode" to
2181 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2183 Don't leak in SCSI code.
2184 * disk/scsi.c (grub_scsi_close): free `scsi'.
2186 2009-02-27 Robert Millan <rmh@aybabtu.com>
2188 * loader/i386/pc/multiboot.c: Move from here ...
2189 * loader/i386/multiboot.c: ... to here. Update all users.
2191 2009-02-27 Robert Millan <rmh@aybabtu.com>
2193 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2194 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2196 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2198 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2201 2009-02-27 Robert Millan <rmh@aybabtu.com>
2203 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2204 `0x' qualifier as 0 when base is specified as parameter).
2206 2009-02-24 Bean <bean123ch@gmail.com>
2208 * configure.ac: Check for -mcmodel=large in x86_64 target.
2210 * include/grub/efi/api.h (efi_call_10): New macro.
2211 (efi_wrap_10): New function.
2213 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2214 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2215 (GRUB_PE32_REL_BASED_LOW): Likewise.
2216 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2217 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2218 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2219 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2220 (GRUB_PE32_REL_BASED_REL): Likewise.
2221 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2222 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2223 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2225 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2228 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2229 (efi_wrap_10): New function.
2231 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2233 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2234 MB/MBP model (NV chipset).
2235 (devdata_devs): Add devpath_5 to the list.
2237 * load/i386/efi/linux.c (video_base): Remove variable.
2238 (RGB_MASK): New macro.
2239 (RGB_MAGIC): Likewise.
2240 (LINE_MIN): Likewise.
2241 (LINE_MAX): Likewise.
2242 (FBTEST_STEP): Likewise.
2243 (FBTEST_COUNT): Likewise.
2244 (fb_list): New variable.
2245 (grub_find_video_card): Remove function.
2246 (find_framebuf): New function.
2247 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2250 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2253 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2255 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2257 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2260 2009-02-22 Robert Millan <rmh@aybabtu.com>
2262 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2263 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2264 in our relocation, instead of using it directly from heap. Also
2265 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2267 2009-02-21 Robert Millan <rmh@aybabtu.com>
2269 Implement USB keyboard support (based on patch by Marco Gerards)
2271 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2272 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2273 (usb_keyboard_mod_LDFLAGS): New variables.
2275 * term/usb_keyboard.c: New file.
2277 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2279 Corrected wrong declaration
2281 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2283 2009-02-14 Christian Franke <franke@computer.org>
2285 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2286 (grub_lspci_iter): Print class code and programming interface byte.
2288 2009-02-14 Christian Franke <franke@computer.org>
2290 * gendistlist.sh: Ignore `.svn' directories.
2292 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
2294 * fs/fat.c: Add 2009 to Copyright line.
2296 2009-02-14 Christian Franke <franke@computer.org>
2298 * commands/hdparm.c: New file. Provides `hdparm' command
2299 which sends ATA commands via grub_disk_ata_pass_through ().
2301 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2303 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2304 and <grub/cpu/io.h> to include/grub/ata.h.
2305 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2306 (GRUB_CDROM_SECTOR_SIZE): Remove.
2307 (GRUB_ATA_*): Move to include/grub/ata.h.
2308 (GRUB_ATAPI_*): Likewise.
2309 (enum grub_ata_commands): Likewise.
2310 (enum grub_ata_timeout_milliseconds): Likewise.
2311 (struct grub_ata_device): Likewise.
2312 (grub_ata_regset): Likewise.
2313 (grub_ata_regget): Likewise.
2314 (grub_ata_regset2): Likewise.
2315 (grub_ata_regget2): Likewise.
2316 (grub_ata_check_ready): Likewise.
2317 (grub_ata_wait_not_busy): Remove static, exported in
2319 (grub_ata_wait_drq): Likewise.
2320 (grub_ata_pio_read): Likewise.
2322 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2323 function for hdparm.mod.
2325 * include/grub/ata.h: New file, contains declarations from
2327 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2329 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2330 (grub_disk_ata_pass_through): New exported variable.
2332 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2334 2009-02-13 Colin D Bennett <colin@gibibit.com>
2336 Support multiple fallback entries, and provide an API to support
2337 executing default+fallback menu entries. Renamed the `terminal' menu
2340 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2341 variable declaration.
2342 (grub_menu_execute_callback): New structure declaration.
2343 (grub_menu_execute_callback_t): New typedef.
2344 (grub_menu_execute_with_fallback): New function declaration.
2345 (grub_menu_get_entry): Likewise.
2346 (grub_menu_get_timeout): Likewise.
2347 (grub_menu_set_timeout): Likewise.
2349 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2351 * normal/menu.c (grub_wait_after_message): Moved to
2352 `normal/menu_text.c'.
2353 (draw_border): Likewise.
2354 (print_message): Likewise.
2355 (print_entry): Likewise.
2356 (print_entries): Likewise.
2357 (grub_menu_init_page): Likewise.
2358 (get_entry_number): Likewise.
2359 (print_timeout): Likewise.
2360 (run_menu): Likewise.
2361 (grub_menu_execute_entry): Likewise.
2362 (show_text_menu): Likewise.
2363 (get_and_remove_first_entry_number): New function.
2364 (grub_menu_execute_with_fallback): Likewise.
2365 (get_entry): Renamed to ...
2366 (grub_menu_get_entry): .. this and made it global.
2367 (get_timeout): Renamed to ...
2368 (grub_menu_get_timeout): ... this and made it global.
2369 (set_timeout): Renamed to ...
2370 (grub_menu_set_timeout): ... this and made it global.
2371 (grub_normal_terminal_menu_viewer): Renamed to ...
2372 (grub_normal_text_menu_viewer): ... this.
2374 * normal/menu_text.c: New file. Extracted text-menu-specific code
2377 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2378 (normal_mod_SOURCES): Likewise.
2380 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2381 (normal_mod_SOURCES): Likewise.
2383 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2384 (normal_mod_SOURCES): Likewise.
2386 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2387 (normal_mod_SOURCES): Likewise.
2389 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2390 (normal_mod_SOURCES): Likewise.
2392 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2393 (normal_mod_SOURCES): Likewise.
2395 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2396 (normal_mod_SOURCES): Likewise.
2398 2009-02-11 Robert Millan <rmh@aybabtu.com>
2400 * util/grub.d/00_header.in: Update old reference to `font' command.
2402 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
2404 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2406 Based on patch from Javier MartÃn.
2408 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2410 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2411 to avoid false positives with FAT.
2412 (grub_fstest_SOURCES): Likewise.
2413 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2414 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2415 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2416 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2417 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2418 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2420 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2422 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2423 bpb.version_specific.fat12_or_fat16.fstype and
2424 bpb.version_specific.fat32.fstype.
2426 2009-02-08 Robert Millan <rmh@aybabtu.com>
2428 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2430 2009-02-08 Robert Millan <rmh@aybabtu.com>
2432 * Makefile.in (host_os, host_cpu): New variables.
2433 (target_os): Remove. Update all users.
2435 2009-02-08 Marco Gerards <marco@gnu.org>
2437 * Makefile.in (enable_grub_emu_usb): New variable.
2438 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2439 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2440 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2441 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2442 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2443 `usbtest.mod' and `usbms.mod'.
2444 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2445 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2446 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2447 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2448 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2451 * disk/usbms.c: New file.
2453 * include/grub/usb.h: Likewise.
2455 * include/grub/usbtrans.h: Likewise.
2457 * include/grub/usbdesc.h: Likewise.
2459 * bus/usb/usbtrans.c: Likewise.
2461 * bus/usb/ohci.c: Likewise.
2463 * bus/usb/uhci.c: Likewise.
2465 * bus/usb/usbhub.c: Likewise.
2467 * bus/usb/usb.c: Likewise.
2469 * commands/usbtest.c: Likewise.
2471 * util/usb.c: Likewise.
2473 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2475 * configure.ac: Test for libusb presence.
2477 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2479 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2481 * kern/mm.c: Add more comments.
2483 2009-02-08 Robert Millan <rmh@aybabtu.com>
2485 Patch from Javier MartÃn.
2486 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2487 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2489 2009-02-08 Robert Millan <rmh@aybabtu.com>
2491 * fs/cpio.c: Split tar functionality to ...
2492 * fs/tar.c: ... here (new file). Update all users.
2494 2009-02-07 Robert Millan <rmh@aybabtu.com>
2496 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2497 backward-incompatible features.
2499 Based on patch from Javier MartÃn, with some adjustments.
2501 2009-02-07 Michael Scherer <misc@mandriva.org>
2503 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2505 2009-02-07 Robert Millan <rmh@aybabtu.com>
2507 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2508 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2509 after the RAID stuff.
2511 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2513 Fixes problem when running vbetest command as reported by
2514 Vladimir Serbinenko <phcoder@gmail.com>.
2516 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2518 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
2520 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2521 /dev/md/NpN style mdraid devices.
2523 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2525 * util/unifont2pff.rb: Remove.
2527 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2529 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2532 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2534 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2535 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2536 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2537 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2538 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2539 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2540 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2542 2009-02-02 Christian Franke <franke@computer.org>
2544 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2546 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
2548 * INSTALL: Note that we now require at least autoconf 2.59 and
2549 that LZO is optional.
2551 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2553 Base on patch on bug #24154 created by Tomas Tintera
2556 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2558 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2560 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2561 <bero@arklinux.org>.
2563 * normal/parser.y (script_init): Add missing semicolon.
2565 2009-01-31 Colin D Bennett <colin@gibibit.com>
2567 * normal/main.c: Add include to grub/menu_viewer.h.
2568 (free_menu_entry_classes): Added.
2569 (grub_normal_menu_addentry): Added class property handling.
2570 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2571 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2573 * normal/menu_viewer.c: New file.
2575 * normal/menu.c (run_menu_entry): Renamed to ...
2576 (grub_menu_execute_entry): ... this and made it as global.
2577 (grub_menu_run): Renamed to ...
2578 (show_text_menu): ... this and made it local.
2579 (show_text_menu): Adapt to new function names.
2580 (grub_normal_terminal_menu_viewer): New global variable.
2582 * include/grub/menu.h: New file.
2584 * include/grub/menu_viewer.h: New file.
2586 * include/grub/normal.h: Added include to grub/menu.h.
2587 (grub_menu_entry): Moved to include/grub/menu.h.
2588 (grub_menu_entry_t): Likewise.
2589 (grub_menu): Likewise.
2590 (grub_menu_t): Likewise.
2591 (grub_normal_terminal_menu_viewer): Added.
2592 (grub_menu_execute_entry): Likewise.
2593 (grub_menu_run): Removed.
2595 * DISTLIST: Added include/grub/menu.h.
2596 Added include/grub/menu_viewer.h.
2597 Added normal/menu_viewer.c.
2599 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2601 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2602 arglist for menutitle arguments.
2604 * normal/main.c (grub_normal_menu_addentry): Likewise.
2606 * normal/parser.y (menuentry): Likewise.
2608 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2610 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2611 (grub_script_create_cmdmenu): Likewise.
2613 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2615 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2618 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2620 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2622 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2624 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2626 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2628 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2630 2009-01-30 Christian Franke <franke@computer.org>
2632 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2633 in option help text.
2635 2009-01-27 Pavel Roskin <proski@gnu.org>
2637 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2639 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2641 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2643 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2645 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2646 unregister function.
2648 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2650 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2652 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2654 * util/grub-mkfont.c (usage): Fix typo.
2656 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2658 2009-01-26 Daniel Mierswa <impulze@impulze.org>
2660 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2662 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2664 * kern/misc.c (grub_strcasecmp): New function.
2665 (grub_strcasecmp): Use grub_size_t instead of int for length.
2667 * include/grub/misc.h: Update function prototypes.
2669 2009-01-26 Robert Millan <rmh@aybabtu.com>
2671 * configure.ac: Fix cross-compilation check.
2673 2009-01-22 Christian Franke <franke@computer.org>
2675 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2676 (precision) digit string. Allow `.format2' without `format1' (width).
2677 Limit input chars for `%s' output to `format2' if specified. This is
2678 compatible with standard printf ().
2680 2009-01-22 Christian Franke <franke@computer.org>
2682 * disk/ata.c (grub_ata_wait_status): Replace by ...
2683 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2684 other status bits may be invalid while BSY is asserted.
2685 (grub_ata_check_ready): New function.
2686 (grub_ata_cmd): Removed.
2687 (grub_ata_wait_drq): New function.
2688 (grub_ata_strncpy): Remove inline.
2689 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2690 and error check now done by grub_ata_wait_drq ().
2691 (grub_ata_pio_write): Likewise.
2692 (grub_atapi_identify): Set DEV before check for !BSY. Use
2693 grub_ata_wait_drq () to wait for data.
2694 (grub_ata_device_initialize): Add status register check to
2695 detect missing SATA slave devices. Add debug messages.
2696 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2697 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2698 transfer loop by grub_ata_pio_write ().
2699 (grub_ata_identify): Set DEV before check for !BSY. Use
2700 grub_ata_wait_drq () to wait for data.
2701 (grub_ata_setaddress): Set DEV before check for !BSY.
2702 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2703 read/write in one loop. Fix invalid command on write. Fix incomplete
2704 command on (size % batch) == 0. Add missing error check after write of
2705 last block. Add debug messages.
2706 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2708 2009-01-19 Christian Franke <franke@computer.org>
2710 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2711 (GRUB_ATAPI_IREASON_*): Likewise.
2712 (grub_ata_pio_write): Fix timeout error return.
2713 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2714 (grub_atapi_wait_drq): New function.
2715 (grub_atapi_packet): New parameter `size'.
2716 Use grub_atapi_wait_drq () and direct write instead of
2717 grub_ata_pio_write ().
2718 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2719 reads the number of bytes requested by the device for each DRQ
2721 (grub_atapi_write): Remove old implementation, return not
2722 implemented instead.
2724 2009-01-19 Christian Franke <franke@computer.org>
2726 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2727 of 512 to calculate data size.
2728 (grub_scsi_read12): Likewise.
2729 (grub_scsi_write10): Likewise.
2730 (grub_scsi_write12): Likewise.
2731 (grub_scsi_read): Adjust size according to blocksize.
2732 Add checks for invalid blocksize and unaligned transfer.
2734 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2736 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2738 * term/gfxterm.c (write_char): Fix background rendering for wide
2741 2009-01-19 Robert Millan <rmh@aybabtu.com>
2743 * config.guess: Update to latest version from config git.
2744 * config.sub: Likewise.
2746 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
2748 * Makefile.in: Change font compilation to use new grub-mkfont instead
2751 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2752 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2753 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2754 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2755 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2756 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2757 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2758 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2759 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2761 2009-01-16 Christian Franke <franke@computer.org>
2763 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2764 (enum grub_ata_timeout_milliseconds): New enum.
2765 (grub_ata_wait_status): Add parameter milliseconds.
2766 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2767 recovery from timed-out commands.
2768 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2769 return grub_errno instead of REG_ERROR.
2770 (grub_ata_pio_write): Add parameter milliseconds.
2771 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2772 Pass milliseconds to grub_ata_wait_status () and
2773 grub_ata_pio_read ().
2774 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2775 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2776 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2777 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2778 It is not suitable for device detection, because DEV bit is ignored,
2779 the command may run too long, and not all devices set the signature
2781 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2782 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2783 Fix device selection, DEV bit must be set first to address the registers
2784 of the correct device.
2785 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2786 grub_ata_pio_read/write ().
2787 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2788 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2790 2009-01-13 Carles Pina i Estany <carles@pina.cat>
2792 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2794 2009-01-13 Bean <bean123ch@gmail.com>
2796 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2798 2009-01-13 Bean <bean123ch@gmail.com>
2800 * Makefile.in: (enable_grub_mkfont): New variable.
2801 (freetype_cflags): Likewise.
2802 (freetype_libs): Likewise.
2804 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2805 (grub_mkfont_SOURCES): New variable.
2806 (grub_mkfont_CFLAGS): Likewise.
2807 (grub_mkfont_LDFLAGS): Likewise.
2809 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2810 library if `--enable-grub-mkfont' is requested.
2811 (enable_grub_mkfont): New variable.
2812 (freetype_cflags): Likewise.
2813 (freetype_libs): Likewise.
2815 * util/grub-mkfont.c: New file.
2817 2009-01-12 Christian Franke <franke@computer.org>
2819 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2820 mode check. Fix setting of compat_use[].
2822 2009-01-10 Robert Millan <rmh@aybabtu.com>
2824 Update a few copyright years which we forgot to do in 2008 (only for
2825 files whose changes made in 2008 were copyright-significant)
2827 * Makefile.in: Add 2008 to Copyright line.
2828 * disk/ieee1275/ofdisk.c: Likewise.
2829 * disk/efi/efidisk.c: Likewise.
2830 * kern/dl.c: Likewise.
2831 * kern/sparc64/ieee1275/init.c: Likewise.
2832 * kern/mm.c: Likewise.
2833 * kern/efi/mm.c: Likewise.
2834 * boot/i386/pc/boot.S: Likewise.
2835 * genfslist.sh: Likewise.
2836 * fs/iso9660.c: Likewise.
2837 * fs/hfs.c: Likewise.
2838 * fs/jfs.c: Likewise.
2839 * fs/minix.c: Likewise.
2840 * fs/ufs.c: Likewise.
2841 * gensymlist.sh.in: Likewise.
2842 * genkernsyms.sh.in: Likewise.
2843 * include/grub/misc.h: Likewise.
2844 * include/grub/types.h: Likewise.
2845 * include/grub/symbol.h: Likewise.
2846 * include/grub/elf.h: Likewise.
2847 * include/grub/kernel.h: Likewise.
2848 * include/grub/disk.h: Likewise.
2849 * include/grub/dl.h: Likewise.
2850 * include/grub/i386/linux.h: Likewise.
2851 * include/grub/i386/pc/biosdisk.h: Likewise.
2852 * include/grub/efi/api.h: Likewise.
2853 * include/grub/efi/pe32.h: Likewise.
2854 * include/grub/util/misc.h: Likewise.
2855 * normal/execute.c: Likewise.
2856 * normal/arg.c: Likewise.
2857 * normal/completion.c: Likewise.
2858 * normal/lexer.c: Likewise.
2859 * normal/parser.y: Likewise.
2860 * normal/misc.c: Likewise.
2861 * commands/i386/pc/vbeinfo.c: Likewise.
2862 * commands/hexdump.c: Likewise.
2863 * commands/terminal.c: Likewise.
2864 * commands/ls.c: Likewise.
2865 * commands/help.c: Likewise.
2866 * partmap/pc.c: Likewise.
2867 * loader/efi/chainloader.c: Likewise.
2868 * loader/multiboot_loader.c: Likewise.
2869 * loader/i386/pc/multiboot2.c: Likewise.
2870 * term/efi/console.c: Likewise.
2871 * term/i386/pc/serial.c: Likewise.
2872 * util/lvm.c: Likewise.
2873 * util/console.c: Likewise.
2874 * util/i386/efi/grub-mkimage.c: Likewise.
2875 * util/raid.c: Likewise.
2877 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
2879 * commands/videotest.c: Removed include to grub/machine/memory.h.
2881 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2882 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2883 (video_mod_SOURCES): Removed.
2884 (video_mod_CFLAGS): Likewise.
2885 (video_mod_LDFLAGS): Likewise.
2886 (gfxterm_mod_SOURCES): Likewise.
2887 (gfxterm_mod_CFLAGS): Likewise.
2888 (gfxterm_mod_LDFLAGS): Likewise.
2889 (videotest_mod_SOURCES): Likewise.
2890 (videotest_mod_CFLAGS): Likewise.
2891 (videotest_mod_LDFLAGS): Likewise.
2892 (bitmap_mod_SOURCES): Likewise.
2893 (bitmap_mod_CFLAGS): Likewise.
2894 (bitmap_mod_LDFLAGS): Likewise.
2895 (tga_mod_SOURCES): Likewise.
2896 (tga_mod_CFLAGS): Likewise.
2897 (tga_mod_LDFLAGS): Likewise.
2898 (jpeg_mod_SOURCES): Likewise.
2899 (jpeg_mod_CFLAGS): Likewise.
2900 (jpeg_mod_LDFLAGS): Likewise.
2901 (png_mod_SOURCES): Likewise.
2902 (png_mod_CFLAGS): Likewise.
2903 (png_mod_LDFLAGS): Likewise.
2905 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2906 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2907 (video_mod_SOURCES): Added.
2908 (video_mod_CFLAGS): Likewise.
2909 (video_mod_LDFLAGS): Likewise.
2910 (videotest_mod_SOURCES): Likewise.
2911 (videotest_mod_CFLAGS): Likewise.
2912 (videotest_mod_LDFLAGS): Likewise.
2913 (bitmap_mod_SOURCES): Likewise.
2914 (bitmap_mod_CFLAGS): Likewise.
2915 (bitmap_mod_LDFLAGS): Likewise.
2916 (tga_mod_SOURCES): Likewise.
2917 (tga_mod_CFLAGS): Likewise.
2918 (tga_mod_LDFLAGS): Likewise.
2919 (jpeg_mod_SOURCES): Likewise.
2920 (jpeg_mod_CFLAGS): Likewise.
2921 (jpeg_mod_LDFLAGS): Likewise.
2922 (png_mod_SOURCES): Likewise.
2923 (png_mod_CFLAGS): Likewise.
2924 (png_mod_LDFLAGS): Likewise.
2925 (gfxterm_mod_SOURCES): Likewise.
2926 (gfxterm_mod_CFLAGS): Likewise.
2927 (gfxterm_mod_LDFLAGS): Likewise.
2929 * term/gfxterm.c: Removed include to grub/machine/memory.h,
2930 grub/machine/console.h.
2932 2009-01-04 Jerone Young <jerone@gmail.com>
2934 Make on screen instructions clearer
2936 Based on patch created by Jidanni <jidanni@jidanni.org>
2938 * normal/menu.c: print clearer instructions on the screen
2940 2009-01-02 Colin D Bennett <colin@gibibit.com>
2944 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2945 build system and fixed gfxterm.c to work with different sized fonts.
2947 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
2949 * configure: Re-generated.
2951 * DISTLIST: Removed font/manager.c.
2953 Added font/font_cmd.c.
2955 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2958 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
2960 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
2962 * kern/term.c: Changed users of grub_utf8_to_ucs4.
2964 * normal/menu.c: Likewise.
2966 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2967 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
2969 * include/grub/font.h: Replaced with new file.
2971 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2972 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2973 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2974 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2975 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
2976 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
2977 fg_red, fg_green, fg_blue, fg_alpha.
2978 (grub_video_adapter): Removed blit_glyph.
2979 (grub_video_blit_glyph): Removed.
2981 * font/manager.c: Removed file.
2983 * font/font.c: New file.
2985 * font/font_cmd.c: Likewise.
2987 * video/video.c (grub_video_blit_glyph): Removed.
2989 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2990 (grub_video_vbe_map_rgba): Likewise.
2991 (grub_video_vbe_unmap_color_int): Likewise.
2992 (grub_video_vbe_blit_glyph): Removed.
2993 (grub_video_vbe_adapter): Removed blit_glyph.
2995 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2996 (get_pixel): Likewise.
2997 (set_pixel): Likewise.
2999 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3001 * term/gfxterm.c: Adapted to new font engine.
3003 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
3005 * term/i386/pc/vga.c: Likewise.
3007 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3009 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3011 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3013 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3015 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3017 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3019 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3021 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3023 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3025 * util/grub.d/00_header.in: Changed to use new loadfont command.
3027 * util/grub-mkconfig_lib.in: Changed font extension.
3029 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
3031 * util/getroot.c (grub_util_get_grub_dev): Add support for
3032 /dev/md/dNNpNN style partitionable mdraid devices.
3034 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
3036 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3037 at a time limit of the PXE TFTP API correctly.
3038 (grub_pxefs_close): Likewise.
3040 2008-11-29 Robert Millan <rmh@aybabtu.com>
3042 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3043 grub_ata_device_initialize() calls.
3045 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
3047 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3049 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3051 2008-11-28 Robert Millan <rmh@aybabtu.com>
3053 Fix build on powerpc-ieee1275. Based on patch created by
3054 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3055 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3056 `kern/ieee1275/mmap.c'.
3057 * include/grub/powerpc/ieee1275/memory.h: New file.
3059 Provide grub-install on coreboot.
3060 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3061 (grub_install_SOURCES): New variable.
3062 * util/i386/pc/grub-install.in: Add a few condition checks to make it
3065 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
3067 * util/grub-fstest.c (grub_term_get_current_input): Change return type
3068 to `grub_term_input_t'.
3069 (grub_term_get_current_output): Change return type to
3070 `grub_term_output_t'.
3072 2008-11-22 Robert Millan <rmh@aybabtu.com>
3074 Fix breakage on coreboot due to declaration mismatch.
3075 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3076 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3077 grub_vga_text_cls().
3079 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3080 comments. Avoid copying one more byte than necessary (just in case).
3082 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3083 to 0x200000 (avoids trouble with some OFW implementations, and matches
3084 with the one in Yaboot).
3085 Reported by Manoel Abranches
3087 2008-11-20 Robert Millan <rmh@aybabtu.com>
3089 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3090 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3092 * util/grub-mkconfig_lib.in (grub_warn): New function.
3093 (convert_system_path_to_grub_path): Use grub_warn() when issuing
3094 warnings, to obtain consistent formatting.
3095 * util/grub.d/00_header.in: Likewise.
3096 * util/update-grub_lib.in: Likewise.
3098 * loader/i386/linux.c (allocate_pages): Fix a warning.
3099 Move comment text to `#error' stanza.
3101 Harmonize ieee1275's grub_available_iterate() with the generic
3102 grub_machine_mmap_iterate() interface (fixes a recently-introduced
3103 build problem on i386-ieee1275):
3104 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3105 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
3106 parameter `type'. Update all users of this function.
3107 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3108 `kern/ieee1275/mmap.c'.
3109 * kern/ieee1275/init.c
3110 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3112 (grub_machine_mmap_iterate): ... this.
3113 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3114 return type to `grub_err_t'. Update all implementations of this
3116 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3119 Add `lsmmap' command (lists firmware-provided memory map):
3120 * commands/lsmmap.c: New file.
3121 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3122 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3124 * conf/powerpc-ieee1275.rmk: Likewise.
3125 * conf/i386-coreboot.rmk: Likewise.
3126 * conf/i386-ieee1275.rmk: Likewise.
3128 2008-11-19 Robert Millan <rmh@aybabtu.com>
3130 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3131 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3132 constraints to initrd allocation (based on code from
3133 loader/i386/pc/linux.c). Without them, initrd was allocated too high
3134 for Linux to find it.
3136 2008-11-14 Robert Millan <rmh@aybabtu.com>
3138 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3139 order to cope with duplicate slashes.
3141 2008-11-14 Robert Millan <rmh@aybabtu.com>
3143 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3144 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3145 don't want to mess with lower memory, because it is used in the Linux
3148 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3149 an appropriate place in lower memory, between 0x10000 and 0x90000,
3150 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3151 is in our heap (probably as a result of it being corrupted during
3152 decompression). Add #error instance with comment to explain why this
3153 loader isn't currently usable on PC/BIOS.
3155 2008-11-14 Robert Millan <rmh@aybabtu.com>
3157 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3158 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3160 2008-11-12 Robert Millan <rmh@aybabtu.com>
3162 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3164 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3165 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3167 * include/grub/i386/pc/memory.h: ... to here.
3169 2008-11-12 Robert Millan <rmh@aybabtu.com>
3171 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3174 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3175 (grub_console_cur_color, grub_console_real_putchar)
3176 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3177 (grub_console_setcolorstate, grub_console_setcolor)
3178 (grub_console_getcolor): Move from here ...
3179 * include/grub/i386/vga_common.h: ... to here (new file).
3181 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3182 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3184 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3185 `<grub/i386/vga_common.h>'.
3187 2008-11-12 Robert Millan <rmh@aybabtu.com>
3189 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3190 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3191 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3193 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3194 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3196 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3197 grub_console_init() with call to grub_vga_text_init().
3198 (grub_machine_fini): Replace call to
3199 grub_console_fini() with call to grub_vga_text_fini() and
3200 grub_at_keyboard_fini().
3202 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3203 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3204 (grub_console_setcolorstate, grub_console_setcolor)
3205 (grub_console_getcolor): New function prototypes.
3207 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3208 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3209 (grub_vga_text_setcursor): Static-ize.
3210 (grub_vga_text_term): New structure.
3211 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3213 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3214 (grub_console_cur_color, grub_console_standard_color)
3215 (grub_console_normal_color, grub_console_highlight_color)
3216 (map_char, grub_console_putchar, grub_console_getcharwidth)
3217 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3218 (grub_console_getcolor): Move from here ...
3219 * term/i386/vga_common.c: ... to here (same function names).
3221 2008-11-12 Robert Millan <rmh@aybabtu.com>
3223 Use newly-added Multiboot support in coreboot.
3225 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3226 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3228 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3229 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3230 (codestart): Store the MBI in `startup_multiboot_info' when we're
3231 being loaded using Multiboot.
3233 * kern/i386/coreboot/init.c (grub_machine_init): Move
3234 grub_at_keyboard_init() call to beginning of function (useful for
3235 debugging). Call grub_machine_mmap_init() before attempting to use
3236 grub_machine_mmap_iterate().
3237 (grub_lower_mem, grub_upper_mem): Move from here ...
3238 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3241 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3244 2008-11-12 Robert Millan <rmh@aybabtu.com>
3246 Fix a regression introduced by the at_keyboard.mod split. Because
3247 some terminals are default on some platforms and non-default on
3248 others, the first terminal being registered determines which is
3249 going to be default.
3251 * kern/term.c (grub_term_register_input): If this is the first
3252 terminal being registered, set it as the current one.
3253 (grub_term_register_output): Likewise.
3255 * term/efi/console.c (grub_console_init): Do not call
3256 grub_term_set_current_output() or grub_term_set_current_input().
3257 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3258 * term/i386/pc/console.c (grub_console_init): Likewise.
3259 (grub_console_fini): Do not call grub_term_set_current_input()
3260 (but leave grub_term_set_current_output() to restore text mode).
3262 2008-11-10 Robert Millan <rmh@aybabtu.com>
3264 * util/grub.d/00_header.in: Add backward compatibility check for
3265 versions of terminal.mod that don't understand `terminal_input' or
3268 2008-11-09 Robert Millan <rmh@aybabtu.com>
3270 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3271 `terminal_input' / `terminal_output', not `terminal'.
3273 2008-11-08 Robert Millan <rmh@aybabtu.com>
3275 * Makefile.in (include_DATA): Fix srcdir=. assumption.
3276 (DISTCLEANFILES): Add `build_env.mk'.
3278 2008-11-08 Robert Millan <rmh@aybabtu.com>
3280 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3281 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3282 members. Update all users.
3283 * util/console.c (grub_ncurses_term): Split in ...
3284 (grub_ncurses_term_input): ... this, and ...
3285 (grub_ncurses_term_output): ... this. Update all users.
3286 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3288 2008-11-08 Robert Millan <rmh@aybabtu.com>
3290 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3291 (PKGDATA): Add $(pkgdata_SRCDIR).
3292 (pkglib_BUILDDIR): New variable.
3293 (pkgdata_SRCDIR): New variable.
3294 (build_env.mk): New target.
3295 (include_DATA): New variable.
3296 (install-local): Install $(include_DATA) files in $(includedir).
3298 2008-11-07 Pavel Roskin <proski@gnu.org>
3300 * gendistlist.sh: Use C locale for sorting to ensure consistent
3301 output on all systems.
3303 * util/grub.d/00_header.in: Remove incorrect space before
3306 2008-11-07 Robert Millan <rmh@aybabtu.com>
3308 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3310 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3311 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3312 (based on find_multi_boot1_header).
3313 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3314 using find_multi_boot2_header(), and abort if neither Multiboot or
3315 Multiboot headers were found.
3317 2008-11-07 Robert Millan <rmh@aybabtu.com>
3319 Modularize at_keyboard.mod:
3321 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3322 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3323 (at_keyboard_mod_LDFLAGS): New variables.
3325 Actual terminal split:
3327 * include/grub/term.h (struct grub_term): Split in ...
3328 (struct grub_term_input): ... this, and ...
3329 (struct grub_term_output): ... this. Update all users.
3330 (grub_term_set_current): Split in ...
3331 (grub_term_set_current_input): ... this, and ...
3332 (grub_term_set_current_output): ... this.
3333 (grub_term_get_current): Split in ...
3334 (grub_term_get_current_input): ... this, and ...
3335 (grub_term_get_current_output): ... this.
3336 (grub_term_register): Split in ...
3337 (grub_term_register_input): ... this, and ...
3338 (grub_term_register_output): ... this.
3339 (grub_term_unregister): Split in ...
3340 (grub_term_unregister_input): ... this, and ...
3341 (grub_term_unregister_output): ... this.
3342 (grub_term_iterate): Split in ...
3343 (grub_term_iterate_input): ... this, and ...
3344 (grub_term_iterate_output): ... this.
3346 * kern/term.c (grub_term_list): Split in ...
3347 (grub_term_list_input): ... this, and ...
3348 (grub_term_list_output): ... this. Update all users.
3349 (grub_cur_term): Split in ...
3350 (grub_cur_term_input): ... this, and ...
3351 (grub_cur_term_output): ... this. Update all users.
3352 (grub_term_set_current): Split in ...
3353 (grub_term_set_current_input): ... this, and ...
3354 (grub_term_set_current_output): ... this.
3355 (grub_term_get_current): Split in ...
3356 (grub_term_get_current_input): ... this, and ...
3357 (grub_term_get_current_output): ... this.
3358 (grub_term_register): Split in ...
3359 (grub_term_register_input): ... this, and ...
3360 (grub_term_register_output): ... this.
3361 (grub_term_unregister): Split in ...
3362 (grub_term_unregister_input): ... this, and ...
3363 (grub_term_unregister_output): ... this.
3364 (grub_term_iterate): Split in ...
3365 (grub_term_iterate_input): ... this, and ...
3366 (grub_term_iterate_output): ... this.
3368 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3369 a check for input and one for output (and only attempt to get keys
3370 from user when input works).
3372 * util/grub-probe.c (grub_term_get_current): Split in ...
3373 (grub_term_get_current_input): ... this, and ...
3374 (grub_term_get_current_output): ... this.
3375 * util/grub-fstest.c: Likewise.
3376 * util/i386/pc/grub-setup.c: Likewise.
3377 * util/grub-editenv.c: Likewise.
3379 Portability adjustments:
3381 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3382 `term/i386/pc/at_keyboard.c'.
3383 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3384 grub_keyboard_controller_init() (now handled by terminal .init).
3385 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3386 grub_at_keyboard_init().
3387 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3388 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3389 at_keyboard.mod via input terminal interface).
3390 * include/grub/i386/coreboot/console.h: Convert into a stub for
3391 `<grub/i386/pc/console.h>'.
3393 Migrate full terminals to new API:
3395 * term/efi/console.c (grub_console_term): Split into ...
3396 (grub_console_term_input): ... this, and ...
3397 (grub_console_term_output): ... this. Update all users.
3398 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3399 (grub_ofconsole_init): Split into ...
3400 (grub_ofconsole_init_input): ... this, and ...
3401 (grub_ofconsole_init_output): ... this.
3402 (grub_ofconsole_term): Split into ...
3403 (grub_ofconsole_term_input): ... this, and ...
3404 (grub_ofconsole_term_output): ... this. Update all users.
3405 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3406 (grub_serial_term_input): ... this, and ...
3407 (grub_serial_term_output): ... this. Update all users.
3408 * term/i386/pc/console.c (grub_console_term): Split into ...
3409 (grub_console_term_input): ... this, and ...
3410 (grub_console_term_output): ... this. Update all users.
3411 (grub_console_term_input): Only enable it on PC/BIOS platform.
3412 (grub_console_init): Remove grub_keyboard_controller_init() call.
3414 Migrate input terminals to new API:
3416 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3417 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3418 i386-specific anyway).
3419 (grub_console_checkkey): Rename to ...
3420 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3422 (grub_keyboard_controller_orig): New variable.
3423 (grub_console_getkey): Rename to ...
3424 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3426 (grub_keyboard_controller_init): Static-ize. Save original
3427 controller value so that it can be restored ...
3428 (grub_keyboard_controller_fini): ... here (new function).
3429 (grub_at_keyboard_term): New structure.
3430 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3433 Migrate output terminals to new API:
3435 * term/i386/pc/vga.c (grub_vga_term): Change type to
3436 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3437 members. Update all users.
3438 * term/gfxterm.c (grub_video_term): Change type to
3439 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3440 members. Update all users.
3441 * include/grub/i386/pc/console.h (grub_console_checkkey)
3442 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3445 Migrate `terminal' command and userland tools to new API:
3447 * commands/terminal.c (grub_cmd_terminal): Split into ...
3448 (grub_cmd_terminal_input): ... this, and ...
3449 (grub_cmd_terminal_output): ... this.
3450 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3451 `terminal_input' and `terminal_output'.
3452 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3453 `terminal_input' / `terminal_output' API.
3454 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3455 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3456 provided ${GRUB_TERMINAL}, convert it).
3458 2008-11-04 Robert Millan <rmh@aybabtu.com>
3460 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3462 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3464 2008-11-03 Bean <bean123ch@gmail.com>
3466 * kern/elf.c (grub_elf32_load): Revert to previous code.
3467 (grub_elf64_load): Likewise.
3469 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3471 2008-11-01 Robert Millan <rmh@aybabtu.com>
3473 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3474 (TARGET_CPPFLAGS): Likewise.
3475 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3477 2008-11-01 Carles Pina i Estany <carles@pina.cat>
3479 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3481 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3483 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3484 addition of objects until the code is not going to be able to fail.
3486 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3488 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3489 (add a missing NULL check, and correct them by moving the pointer
3490 operations after the actual check).
3492 2008-10-29 Robert Millan <rmh@aybabtu.com>
3494 * util/i386/pc/grub-install.in: Handle empty string as output from
3495 make_system_path_relative_to_its_root().
3497 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3499 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3500 circular metadata worst case scenario. If the metadata is circular
3501 then copy the wrap in place.
3502 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3503 project lib/format_text/layout.h
3504 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3506 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3508 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3510 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3512 * util/update-grub_lib.in: Mention filename in warning message.
3514 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3516 * NEWS: Update for rename of update-grub to grub-mkconfig.
3518 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3520 * util/update-grub_lib.in: Copy to ...
3521 * util/grub-mkconfig_lib.in: ... this. Update all users.
3522 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3523 * util/update-grub.in: Rename to ...
3524 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3525 option. Add `--output' option to allow users to specify the generated
3526 configuration file. Default to stdout.
3527 (update_grub_dir): Rename to ...
3528 (grub_mkconfig_dir): ... this.
3529 (grub_cfg): Default to an empty string.
3530 * conf/common.rmk (update-grub): Rename to ...
3531 (grub-mkconfig): ... this.
3532 (update-grub_lib): Copy to ...
3533 (grub-mkconfig_lib): ... this.
3534 (update-grub_SCRIPTS): Copy to ...
3535 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3536 (update-grub_DATA): Rename to ...
3537 (grub-mkconfig_DATA): ... this.
3539 2008-09-28 Robert Millan <rmh@aybabtu.com>
3541 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3542 to `modified'. Add the real `created' field.
3543 (grub_iso9660_uuid): Use `modified' rather than `created' for
3544 constructing the UUID.
3546 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
3548 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3549 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3551 2008-09-28 Bean <bean123ch@gmail.com>
3553 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3554 Thanks to Christian Franke for finding this bug.
3556 2008-09-25 Robert Millan <rmh@aybabtu.com>
3558 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3559 instances of grub_util_get_disk_name() (see previous commit).
3561 2008-09-25 Robert Millan <rmh@aybabtu.com>
3563 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3564 `util/i386/get_disk_name.c'.
3565 * conf/i386-efi.rmk: Likewise.
3566 * conf/x86_64-efi.rmk: Likewise.
3567 * conf/i386-coreboot.rmk: Likewise.
3568 * conf/i386-ieee1275.rmk: Likewise.
3569 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3570 `util/ieee1275/get_disk_name.c'.
3571 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3572 * util/ieee1275/get_disk_name.c: Remove file.
3573 * util/i386/get_disk_name.c: Remove file.
3574 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3575 "hd%d" for device.map entries, rather than using
3576 grub_util_get_disk_name().
3578 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3580 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3582 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3584 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3586 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3588 (GRUB_TERM_PPAGE): Changed to 0x4900.
3590 2008-09-24 Robert Millan <rmh@aybabtu.com>
3592 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3593 macros (they were i386-pc specific).
3594 * include/grub/sparc64/ieee1275/console.h: Likewise.
3595 * include/grub/efi/console.h: Likewise.
3597 2008-09-22 Bean <bean123ch@gmail.com>
3599 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3600 resident and in attribute list.
3602 * include/grub/ntfs.h (BMP_LEN): Removed.
3604 2008-09-22 Bean <bean123ch@gmail.com>
3606 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3607 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3609 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3610 error occurs, as grub_disk_open will call grub_disk_close, which will
3611 call p->close (scsi).
3613 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3615 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3616 (AC_PREREQ): Bumped to 2.59.
3617 (AC_TRY_COMPILE): Replace obsolete macro with ...
3618 (AC_COMPILE_IFELSE): ... this.
3619 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3620 (AC_LINK_IFELSE): ... this.
3622 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3624 * autogen.sh: Add a call to `gendistlist.sh'.
3626 2008-09-19 Christian Franke <franke@computer.org>
3628 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3629 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3630 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3631 Export __enable_execute_stack() to modules.
3632 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3635 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3637 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3640 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3642 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3643 #include <grub/util/hostdisk.h>.
3645 2008-09-08 Robert Millan <rmh@aybabtu.com>
3647 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3648 segments when their filesz is zero (grub_file_read() interprets
3649 zero-size as "read until EOF", which results in memory corruption).
3650 Use `lowest_segment' rather than 0 for calculating the current
3651 segment load address.
3653 2008-09-08 Robert Millan <rmh@aybabtu.com>
3655 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3656 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3657 clobbered useful information.
3659 2008-09-08 Robert Millan <rmh@aybabtu.com>
3661 * include/grub/util/biosdisk.h: Move to ...
3662 * include/grub/util/hostdisk.h: ... here. Update all users.
3663 * util/biosdisk.c: Move to ...
3664 * util/hostdisk.c: ... here. Update all users.
3666 2008-09-07 Robert Millan <rmh@aybabtu.com>
3668 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3670 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3671 and length can be stored directly in the `mbi->mmap_addr' and
3672 `mbi->mmap_length' struct fields.
3674 2008-09-07 Robert Millan <rmh@aybabtu.com>
3676 * conf/i386.rmk: New file. Provides declaration for building
3678 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3679 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3681 Include `conf/i386.mk'.
3682 * conf/i386-efi.rmk: Likewise.
3683 * conf/x86_64-efi.rmk: Likewise.
3684 * conf/i386-coreboot.rmk: Likewise.
3685 * conf/i386-ieee1275.rmk: Likewise.
3687 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3689 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3690 Adds optimization support for BGR based modes.
3692 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3693 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3694 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3695 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3696 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3697 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3698 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3699 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3700 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3701 (grub_video_i386_vbeblit_index_index): Likewise.
3702 (grub_video_i386_vbeblit_replace_directN): Added.
3703 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3704 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3705 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3706 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3707 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3708 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3709 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3710 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3711 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3712 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3713 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3714 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3715 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3717 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3718 (grub_video_i386_vbefill_R8G8B8): Likewise.
3719 (grub_video_i386_vbefill_index): Likewise.
3720 (grub_video_i386_vbefill_direct32): Added.
3721 (grub_video_i386_vbefill_direct24): Likewise.
3722 (grub_video_i386_vbefill_direct16): Likewise.
3723 (grub_video_i386_vbefill_direct8): Likewise.
3725 * include/grub/video.h (grub_video_blit_format): Removed
3726 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3727 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3728 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3729 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3730 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3732 * video/video.c (grub_video_get_blit_format): Updated to use new
3733 blit formats. Added handling for 16 bit color modes.
3735 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3737 (common_blitter): Updated to use new blitters.
3739 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3741 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3742 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3743 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3744 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3745 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3746 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3747 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3748 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3749 (grub_video_i386_vbeblit_index_index): Likewise.
3750 (grub_video_i386_vbeblit_replace_directN): Added.
3751 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3752 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3753 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3754 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3755 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3756 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3757 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3758 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3759 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3760 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3761 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3762 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3763 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3765 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3766 (grub_video_i386_vbefill_R8G8B8): Likewise.
3767 (grub_video_i386_vbefill_index): Likewise.
3768 (grub_video_i386_vbefill_direct32): Added.
3769 (grub_video_i386_vbefill_direct24): Likewise.
3770 (grub_video_i386_vbefill_direct16): Likewise.
3771 (grub_video_i386_vbefill_direct8): Likewise.
3773 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3776 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3779 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3782 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3785 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3787 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3790 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3792 * fs/iso9660.c (grub_iso9660_date): New structure.
3793 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3794 (grub_iso9660_uuid): New function.
3796 2008-09-05 Bean <bean123ch@gmail.com>
3798 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3800 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3801 insensitive bit for names in Win32 and Win32 & DOS namespace.
3803 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3805 * include/grub/types.h (LONG_MAX): Likewise.
3807 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3809 * util/getroot.c: Include <config.h>.
3810 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3811 add support for /dev/md/N devices and handle LVM double dash escaping.
3813 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3815 * config.guess: Update to latest version from config git.
3816 * config.sub: Likewise.
3818 2008-09-03 Robert Millan <rmh@aybabtu.com>
3820 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3821 `disk->total_sectors'.
3823 2008-09-01 Colin D Bennett <colin@gibibit.com>
3825 * include/grub/normal.h: Fixed incorrect comment for
3826 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3828 2008-09-01 Colin D Bennett <colin@gibibit.com>
3830 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3831 values with defines.
3833 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3834 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3835 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3836 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3837 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3838 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3839 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3840 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3841 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3842 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3843 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3844 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3845 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3846 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3847 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3848 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3849 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3850 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3851 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3853 2008-08-31 Robert Millan <rmh@aybabtu.com>
3855 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3857 (grub_multiboot): Fix a few warnings.
3859 2008-08-31 Robert Millan <rmh@aybabtu.com>
3861 * loader/i386/pc/multiboot.c: Update comment not to say that
3862 boot_device support is unimplemented.
3864 2008-08-31 Robert Millan <rmh@aybabtu.com>
3866 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3867 or memory map support are unimplemented.
3869 2008-08-31 Colin D Bennett <colin@gibibit.com>
3871 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3873 2008-08-31 Colin D Bennett <colin@gibibit.com>
3875 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3876 total video memory in 'vbeinfo' output; show color format details for
3879 2008-08-30 Pavel Roskin <proski@gnu.org>
3881 * util/genmoddep.c: Remove for real this time.
3882 * DISTLIST: Remove util/genmoddep.c.
3884 2008-08-30 Robert Millan <rmh@aybabtu.com>
3886 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3887 as required by Multiboot spec (it was already 4-byte aligned, but
3890 2008-08-29 Pavel Roskin <proski@gnu.org>
3892 * kern/powerpc/ieee1275/crt0.S: Rename to ...
3893 * kern/powerpc/ieee1275/startup.S: ... this.
3894 * conf/powerpc-ieee1275.rmk: Adjust for the above.
3895 * DISTLIST: Likewise.
3897 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3898 grub/cpu/kernel.h. Add start label for consistency with other
3899 platforms. Add grub_prefix immediately after start. Add jump
3900 to the code after grub_prefix.
3901 * include/grub/powerpc/kernel.h: Provide valid values for
3902 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3904 2008-08-29 Bean <bean123ch@gmail.com>
3906 * configure.ac: Change host_os to cygwin for mingw.
3907 (asprintf): New check for function.
3909 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3910 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3912 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
3913 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
3914 sync, sleep and grub_util_get_disk_size for mingw.
3916 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3917 to get size in mingw.
3918 (open_device): Use flag O_BINARY if it's defined.
3919 (find_root_device): Add dummy code for mingw.
3921 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3922 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3923 (get_scsi_disk_name): Return 0 for mingw.
3925 * util/hostfs.c: #include <grub/util/misc.h>.
3926 (grub_hostfs_open): Use "rb" flag to open file, use
3927 grub_util_get_disk_size to get disk size for mingw.
3929 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3930 (asprintf): New function if HAVE_ASPRINTF is not set.
3931 (sync): New function for mingw.
3933 (grub_util_get_disk_size): Likewise.
3935 2008-08-28 Pavel Roskin <proski@gnu.org>
3937 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3940 2008-08-28 Robert Millan <rmh@aybabtu.com>
3942 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3944 2008-08-28 Robert Millan <rmh@aybabtu.com>
3946 Change find_grub_drive() syntax so it doesn't prevent it from
3947 detecting NULL names as errors.
3949 * util/biosdisk.c (find_grub_drive): Move free slot search code
3951 (find_free_slot): ... to here.
3952 (read_device_map): Use find_free_slot() to search for free slots.
3954 2008-08-27 Marco Gerards <marco@gnu.org>
3956 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3957 (scsi_mod_SOURCES): New variable.
3958 (scsi_mod_CFLAGS): Likewise
3959 (scsi_mod_LDFLAGS): Likewise.
3961 * disk/scsi.c: New file.
3963 * include/grub/scsi.h: Likewise.
3965 * include/grub/scsicmd.h: Likewise.
3967 * disk/ata.c: Include <grub/scsi.h>.
3968 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3970 (grub_ata_iterate): Skip ATAPI devices.
3971 (grub_ata_open): Only handle ATAPI devices.
3972 (struct grub_atapi_read): Removed.
3973 (grub_atapi_readsector): Likewise.
3974 (grub_ata_read): No longer handle ATAPI devices.
3975 (grub_ata_write): Likewise.
3976 (grub_atapi_iterate): New function.
3977 (grub_atapi_read): Likewise.
3978 (grub_atapi_write): Likewise.
3979 (grub_atapi_open): Likewise.
3980 (grub_atapi_close): Likewise.
3981 (grub_atapi_dev): New variable.
3982 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3983 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3985 * include/grub/disk.h (enum grub_disk_dev_id): Add
3986 `GRUB_DISK_DEVICE_SCSI_ID'.
3988 2008-08-26 Robert Millan <rmh@aybabtu.com>
3990 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3991 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3994 2008-08-23 Bean <bean123ch@gmail.com>
3996 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3997 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3998 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3999 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4001 (raid5rec_mod_SOURCES): New macro.
4002 (raid5rec_mod_CFLAGS): Likewise.
4003 (raid5rec_mod_LDFLAGS): Likewise.
4004 (raid6rec_mod_SOURCES): Likewise.
4005 (raid6rec_mod_CFLAGS): Likewise.
4006 (raid6rec_mod_LDFLAGS): Likewise.
4007 (mdraid_mod_SOURCES): Likewise.
4008 (mdraid_mod_CFLAGS): Likewise.
4009 (mdraid_mod_LDFLAGS): Likewise.
4010 (dm_nv_mod_SOURCES): Likewise.
4011 (dm_nv_mod_CFLAGS): Likewise.
4012 (dm_nv_mod_LDFLAGS): Likewise.
4014 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4015 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4016 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4018 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4019 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4021 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4023 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4025 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4027 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4029 * disk/raid5_recover.c: New file.
4031 * disk/raid6_recover.c: Likewise.
4033 * disk/mdraid_linux.c: Likewise.
4035 * disk/dmraid_nvidia.c: Likewise.
4037 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4040 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4041 calculate the size of raid device.
4042 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4043 different layout of raid5.
4044 (grub_raid_scan_device): Remove code specific to mdraid.
4045 (grub_raid_list): New variable.
4046 (free_array): New function.
4047 (grub_raid_register): Likewise.
4048 (grub_raid_unregister): Likewise.
4049 (grub_raid_rescan): Likewise.
4050 (GRUB_MOD_INIT): Don't iterate device here.
4051 (GRUB_MOD_FINI): Use free_array to release resource.
4053 * include/grub/raid.h: Remove macro and structure specific to mdraid.
4054 (grub_raid5_recover_func_t): New function variable type.
4055 (grub_raid6_recover_func_t): Likewise.
4056 (grub_raid5_recover_func): New variable.
4057 (grub_raid6_recover_func): Likewise.
4058 (grub_raid_register): New function.
4059 (grub_raid_unregister): Likewise.
4060 (grub_raid_rescan): Likewise.
4061 (grub_raid_block_xor): Likewise.
4063 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4064 (CMD_CRC): New macro.
4066 (read_file): Handle device as well as file.
4067 (cmd_crc): New function.
4068 (fstest): Handle multiple disks.
4069 (options): Remove part, raw and long, add root and diskcount.
4070 (usage): Add crc, remove -p, -r, -l, add -r and -c.
4071 (main): Find the first non option entry and ignore subsequent options,
4072 add handling for the new options, support multiple disks.
4074 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4076 2008-08-23 Bean <bean123ch@gmail.com>
4078 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4080 * genfslist.sh: Ignore kernel.mod.
4082 * genpartmaplist.sh: Likewise.
4084 2008-08-23 Robert Millan <rmh@aybabtu.com>
4086 * util/getroot.c (find_root_device): Skip anything that starts with
4087 a dot, not just directories. This avoids things like /dev/.tmp.md0.
4089 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
4091 * util/update-grub.in (GRUB_GFXMODE): Export variable.
4092 * util/grub.d/00_header.in: Allow the administrator to change default
4093 gfxmode via ${GRUB_GFXMODE}.
4095 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
4097 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4099 2008-08-21 Robert Millan <rmh@aybabtu.com>
4101 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
4103 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4104 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4106 2008-08-20 Carles Pina i Estany <carles@pina.cat>
4108 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4109 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4111 2008-08-19 Robert Millan <rmh@aybabtu.com>
4113 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4114 (struct grub_virtual_screen): Remove `cursor_color'.
4115 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4117 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4119 2008-08-18 Robert Millan <rmh@aybabtu.com>
4121 Unify (identical) linux_normal.c files.
4122 * loader/i386/efi/linux_normal.c: Move from here ...
4123 * loader/linux_normal.c: ... to here. Update all users.
4124 * loader/i386/pc/linux_normal.c: Delete. Update all users.
4125 * loader/i386/ieee1275/linux_normal.c: Likewise.
4127 2008-08-18 Robert Millan <rmh@aybabtu.com>
4129 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4130 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4131 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4132 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4133 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4135 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4136 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4137 (GRUB_LINUX_CL_END_OFFSET): ... to here.
4138 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4139 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
4140 (GRUB_EFI_CL_END_OFFSET): Rename to ...
4141 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
4142 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4143 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4144 portably using grub_getxy().
4145 Replace `-EFI' with `-bzImage' in boot message.
4147 2008-08-17 Robert Millan <rmh@aybabtu.com>
4149 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4151 2008-08-17 Robert Millan <rmh@aybabtu.com>
4153 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4155 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4156 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4157 (grub_machine_mmap_iterate): New function declaration.
4158 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4160 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4163 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4164 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4165 Move e820 parsing from here ...
4166 * kern/i386/pc/mmap.c: New file.
4167 (grub_machine_mmap_iterate): ... to here.
4169 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4170 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4171 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4172 (grub_available_iterate): Redeclare to return `void', and redeclare
4173 its hook to use grub_uint64_t as addr and size parameters, and rename
4175 (grub_machine_mmap_iterate): ... this. Update all users.
4177 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4178 to make it more readable. Rename to ...
4179 (grub_machine_mmap_iterate): ... this.
4181 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4182 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4183 (grub_multiboot): Allocate an extra region after the payload, and fill
4184 it with a Multiboot memory map. Adjust a.out loader to calculate size
4185 with the extra space.
4186 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4187 with the extra space.
4189 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4191 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4193 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4195 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4196 mdate-sh to the list `find' searches for.
4197 * DISTLIST: Regenerated.
4199 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4201 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4202 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4203 genmoddep.awk, gensymlist.sh.in.
4204 (DISTDIRS): Add bus, docs, hook, lib.
4205 * DISTLIST: Regenerated.
4206 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4208 2008-08-16 Robert Millan <rmh@aybabtu.com>
4210 * disk/raid.c (grub_raid_init): Handle/report errors set by
4211 grub_device_iterate().
4212 * disk/lvm.c (grub_lvm_init): Likewise.
4214 2008-08-15 Bean <bean123ch@gmail.com>
4216 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4218 (datetime_mod_SOURCES): New macro.
4219 (datetime_mod_CFLAGS): Likewise.
4220 (datetime_mod_LDFLAGS): Likewise.
4221 (date_mod_SOURCES): Likewise.
4222 (date_mod_CFLAGS): Likewise.
4223 (date_mod_LDFLAGS): Likewise.
4224 (datehook_mod_SOURCES): Likewise.
4225 (datehook_mod_CFLAGS): Likewise.
4226 (datehook_mod_LDFLAGS): Likewise.
4228 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4230 (datetime_mod_SOURCES): New macro.
4231 (datetime_mod_CFLAGS): Likewise.
4232 (datetime_mod_LDFLAGS): Likewise.
4233 (date_mod_SOURCES): Likewise.
4234 (date_mod_CFLAGS): Likewise.
4235 (date_mod_LDFLAGS): Likewise.
4236 (datehook_mod_SOURCES): Likewise.
4237 (datehook_mod_CFLAGS): Likewise.
4238 (datehook_mod_LDFLAGS): Likewise.
4240 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4242 (datetime_mod_SOURCES): New macro.
4243 (datetime_mod_CFLAGS): Likewise.
4244 (datetime_mod_LDFLAGS): Likewise.
4245 (date_mod_SOURCES): Likewise.
4246 (date_mod_CFLAGS): Likewise.
4247 (date_mod_LDFLAGS): Likewise.
4248 (datehook_mod_SOURCES): Likewise.
4249 (datehook_mod_CFLAGS): Likewise.
4250 (datehook_mod_LDFLAGS): Likewise.
4252 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4254 (datetime_mod_SOURCES): New macro.
4255 (datetime_mod_CFLAGS): Likewise.
4256 (datetime_mod_LDFLAGS): Likewise.
4257 (date_mod_SOURCES): Likewise.
4258 (date_mod_CFLAGS): Likewise.
4259 (date_mod_LDFLAGS): Likewise.
4260 (datehook_mod_SOURCES): Likewise.
4261 (datehook_mod_CFLAGS): Likewise.
4262 (datehook_mod_LDFLAGS): Likewise.
4264 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4266 (datetime_mod_SOURCES): New macro.
4267 (datetime_mod_CFLAGS): Likewise.
4268 (datetime_mod_LDFLAGS): Likewise.
4269 (date_mod_SOURCES): Likewise.
4270 (date_mod_CFLAGS): Likewise.
4271 (date_mod_LDFLAGS): Likewise.
4272 (datehook_mod_SOURCES): Likewise.
4273 (datehook_mod_CFLAGS): Likewise.
4274 (datehook_mod_LDFLAGS): Likewise.
4276 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4278 * commands/date.c: New file.
4280 * hook/datehook.c: Likewise.
4282 * include/grub/lib/datetime.h: Likewise.
4284 * include/grub/i386/cmos.h: Likewise.
4286 * lib/datetime.c: Likewise.
4288 * lib/i386/datetime.c: Likewise.
4290 * lib/efi/datetime.c: Likewise.
4292 2008-08-14 Robert Millan <rmh@aybabtu.com>
4294 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4295 (grub_mkelfimage_SOURCES): New variable.
4296 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4298 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4299 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4300 * conf/powerpc-ieee1275.rmk: Likewise.
4301 * conf/i386-ieee1275.rmk: Likewise.
4303 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4304 * kern/i386/coreboot/init.c: Likewise.
4306 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4307 with `<grub/cpu/kernel.h>'.
4308 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4310 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4311 * kern/i386/coreboot/startup.S: Likewise.
4313 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4314 (GRUB_MOD_GAP): Remove.
4315 * include/grub/powerpc/kernel.h: New file.
4316 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4317 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4318 * include/grub/i386/kernel.h: New file.
4319 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4320 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4321 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4323 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4325 Use --directory when invoking grub_mkimage.
4327 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4328 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4329 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4330 and GRUB_KERNEL_CPU_PREFIX.
4332 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
4334 * include/grub/err.h (grub_err_printf): New function prototype.
4335 * util/misc.c (grub_err_printf): New function.
4336 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4338 * kern/err.c (grub_print_error): Use grub_err_printf.
4340 2008-08-13 Robert Millan <rmh@aybabtu.com>
4342 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4344 2008-08-13 Robert Millan <rmh@aybabtu.com>
4346 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4349 2008-08-12 Robert Millan <rmh@aybabtu.com>
4351 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4352 of the relocation code from here ...
4353 (grub_multiboot): ... to here.
4354 (forward_relocator, backward_relocator): Move from here ...
4355 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4356 (grub_multiboot_backward_relocator): ... to here.
4357 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4358 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4359 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4360 (grub_multiboot_forward_relocator_end)
4361 (grub_multiboot_backward_relocator)
4362 (grub_multiboot_backward_relocator_end): New variables.
4364 2008-08-12 Bean <bean123ch@gmail.com>
4366 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4368 2008-08-11 Robert Millan <rmh@aybabtu.com>
4370 * kern/i386/linuxbios/startup.S: Move from here ...
4371 * kern/i386/coreboot/startup.S: ... to here.
4373 * kern/i386/linuxbios/init.c: Move from here ...
4374 * kern/i386/coreboot/init.c: ... to here.
4376 * kern/i386/linuxbios/table.c: Move from here ...
4377 * kern/i386/coreboot/mmap.c: ... to here.
4379 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4381 2008-08-11 Robert Millan <rmh@aybabtu.com>
4383 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4384 errors. Leave it to the upper layer to handle them.
4386 2008-08-09 Christian Franke <franke@computer.org>
4388 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4389 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4390 Install `grub.d/10_windows' only on Cygwin.
4391 * configure.ac: Add subst of `target_os'.
4392 Check `target_os' also before setting TARGET_OBJ2ELF.
4393 Add `--enable-grub-pe2elf'.
4395 2008-08-08 Robert Millan <rmh@aybabtu.com>
4397 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4398 (grub_last_time): Change type to grub_uint64_t.
4399 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4400 (grub_disk_close): Likewise.
4402 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4403 (run_menu): Migrate code from to using grub_get_time_ms().
4405 * util/misc.c (grub_get_time_ms): New function.
4407 2008-08-08 Marco Gerards <marco@gnu.org>
4409 * disk/ata.c (grub_ata_regget): Change return type to
4411 (grub_ata_regget2): Likewise.
4412 (grub_ata_wait_status): New function.
4413 (grub_ata_wait_busy): Removed function, updated all users to use
4414 `grub_ata_wait_status'.
4415 (grub_ata_wait_drq): Likewise.
4416 (grub_ata_cmd): New function.
4417 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4419 (grub_ata_pio_write): Add error handling.
4420 (grub_atapi_identify): Likewise.
4421 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4423 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4424 handling. Actually use the detected registers. Reorder the
4425 detection logic such that it is easier to read.
4426 (grub_ata_pciinit): Do not assign the same ID to each controller.
4427 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4429 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4431 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4433 2008-08-08 Marco Gerards <marco@gnu.org>
4437 2008-08-07 Bean <bean123ch@gmail.com>
4439 * include/grub/x86_64/pci.h: New file.
4441 2008-08-07 Christian Franke <franke@computer.org>
4443 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4444 (TIMER2_GATE): Likewise.
4445 (grub_pit_wait): Add enable/disable of the timer2 gate
4446 bit of port 0x61. This fixes a possible infinite loop.
4448 2008-08-07 Bean <bean123ch@gmail.com>
4450 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4451 kern/i386/tsc.c and kern/i386/pit.c.
4453 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4456 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4459 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4461 2008-08-07 Bean <bean123ch@gmail.com>
4463 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4465 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4467 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4468 multiple inclusion. Add #include <grub/types.h>.
4470 2008-08-06 Christian Franke <franke@computer.org>
4472 * conf/common.rmk: Build and install `10_windows'.
4473 * util/grub.d/10_windows.in: New script.
4475 2008-08-06 Pavel Roskin <proski@gnu.org>
4477 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4479 2008-08-06 Robert Millan <rmh@aybabtu.com>
4481 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4482 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4484 2008-08-06 Bean <bean123ch@gmail.com>
4486 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4487 (grub_pxefs_fs_int): Remove dummy definition.
4488 (grub_pxefs_open): Use data->block_size to store the current block
4490 (grub_pxefs_read): Use block size stored in data->block_size. As the
4491 value of grub_pxe_blksize can be changed after the file is opened.
4493 2008-08-06 Bean <bean123ch@gmail.com>
4495 * fs/i386/pc/pxe.c (curr_file): new variable.
4496 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4497 require the dummy internal file system anymore.
4498 (grub_pxefs_read): Removed.
4499 (grub_pxefs_close): Likewise.
4500 (grub_pxefs_fs_int): Likewise.
4501 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4502 connection when we switch file.
4503 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4505 2008-08-06 Robert Millan <rmh@aybabtu.com>
4507 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4509 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4510 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4512 * kern/i386/halt.c: New file.
4513 * kern/i386/reboot.c: Likewise.
4514 * include/grub/i386/reboot.h: Likewise.
4515 * include/grub/i386/halt.h: Likewise.
4517 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4518 Include `<grub/cpu/halt.h>'.
4519 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4520 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4522 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4523 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4524 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4525 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4526 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4527 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4529 * include/grub/i386/at_keyboard.h: ... to here.
4531 2008-08-05 Robert Millan <rmh@aybabtu.com>
4533 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4534 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4535 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4536 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4537 `kern/generic/millisleep.c'.
4539 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4540 instead of grub_get_rtc().
4541 (grub_tsc_init): Initialize `tsc_boot_time'.
4543 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4544 (grub_machine_init): Use grub_tsc_init() rather than
4545 installing an RTC-based handler via grub_install_get_time_ms().
4547 * kern/i386/pit.c: New file.
4548 * include/grub/i386/pit.h: Likewise.
4550 2008-08-05 Bean <bean123ch@gmail.com>
4552 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4554 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4555 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4556 (pxe_mod_SOURCES): New macro.
4557 (pxe_mod_CFLAGS): Likewise.
4558 (pxe_mod_LDFLAGS): Likewise.
4559 (pxecmd_mod_SOURCES): Likewise.
4560 (pxecmd_mod_CFLAGS): Likewise.
4561 (pxecmd_mod_LDFLAGS): Likewise.
4563 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4564 (grub_pxe_call): Likewise.
4566 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4568 * commands/i386/pc/pxecmd.c: New file.
4570 * fs/i386/pc/pxe.c: Likewise.
4572 * include/grub/i386/pc/pxe.h: Likewise.
4574 2008-08-05 Bean <bean123ch@gmail.com>
4576 * util/console.c (grub_console_cur_color): New variable.
4577 (grub_console_standard_color): Likewise.
4578 (grub_console_normal_color): Likewise.
4579 (grub_console_highlight_color): Likewise.
4580 (color_map): Likewise.
4581 (use_color): Likewise.
4582 (NUM_COLORS): New macro.
4583 (grub_ncurses_setcolorstate): Handle color properly.
4584 (grub_ncurses_setcolor): Don't change color here, just remember the
4585 settings, color will be set in grub_ncurses_setcolorstate.
4586 (grub_ncurses_getcolor): New function.
4587 (grub_ncurses_init): Initialize color pairs.
4588 (grub_ncurses_term): New member grub_ncurses_getcolor.
4590 2008-08-05 Colin D Bennett <colin@gibibit.com>
4592 High resolution timer support. Implemented for x86 CPUs using TSC.
4593 Extracted generic grub_millisleep() so it's linked in only as needed.
4594 This requires a Pentium compatible CPU; if the RDTSC instruction is
4595 not supported, then it falls back on the generic grub_get_time_ms()
4596 implementation that uses the machine's RTC.
4598 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4599 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4600 `kern/generic/millisleep.c'.
4602 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4603 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4605 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4606 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4608 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4610 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4611 `kern/generic/millisleep.c'.
4613 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4615 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4617 * kern/generic/rtc_get_time_ms.c: New file.
4619 * kern/generic/millisleep.c: New file.
4621 * kern/misc.c: Don't include
4622 <kern/time.h> anymore.
4623 (grub_millisleep_generic): Removed.
4625 * commands/sleep.c (grub_interruptible_millisleep): Uses
4626 grub_get_time_ms() instead of grub_get_rtc().
4628 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4630 (grub_cpu_is_cpuid_supported): New inline function.
4631 (grub_cpu_is_tsc_supported): New inline function.
4632 (grub_tsc_init): New function prototype.
4633 (grub_tsc_get_time_ms): New function prototype.
4635 * kern/i386/tsc.c (grub_get_time_ms): New file.
4637 * include/grub/time.h: Include <grub/types.h.
4638 (grub_millisleep_generic): Removed.
4639 (grub_get_time_ms): New prototype.
4640 (grub_install_get_time_ms): New prototype.
4641 (grub_rtc_get_time_ms): New prototype.
4643 * kern/time.c (grub_get_time_ms): New function.
4644 (grub_install_get_time_ms): New function.
4646 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4647 <grub/time.h> anymore.
4648 (grub_millisleep): Removed.
4649 (grub_machine_init): Call grub_tsc_init.
4651 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4652 get_time_ms() implementation.
4654 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4655 (ieee1275_get_time_ms): New function.
4656 (grub_machine_init): Install get_time_ms() implementation.
4658 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4659 (grub_machine_init): Call grub_tsc_init().
4660 (grub_millisleep): Removed.
4662 * kern/ieee1275/init.c (grub_millisleep): Removed.
4663 (grub_machine_init): Install ieee1275_get_time_ms()
4665 (ieee1275_get_time_ms): New function.
4666 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4669 2008-08-05 Marco Gerards <marco@gnu.org>
4671 * disk/ata.c: Include <grub/pci.h>.
4672 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4673 (grub_ata_initialize): Rewritten.
4674 (grub_ata_device_initialize): New function.
4676 2008-08-04 Pavel Roskin <proski@gnu.org>
4678 * kern/main.c: Include grub/mm.h.
4680 2008-08-04 Robert Millan <rmh@aybabtu.com>
4682 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4683 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4684 corruption problem).
4686 2008-08-04 Robert Millan <rmh@aybabtu.com>
4688 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4689 warnings introduced in my last commit.
4691 2008-08-03 Robert Millan <rmh@aybabtu.com>
4693 Make PCI available on all i386 architectures.
4695 * include/grub/i386/pc/pci.h: Move from here ...
4696 * include/grub/i386/pci.h: ... to here.
4698 * include/grub/i386/pc/pci.h: Remove.
4699 * include/grub/i386/efi/pci.h: Remove.
4700 * include/grub/x86_64/efi/pci.h: Remove.
4702 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4705 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4706 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4707 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4709 * conf/i386-ieee1275.rmk: Likewise.
4711 2008-08-03 Robert Millan <rmh@aybabtu.com>
4713 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4714 (grub_console_setcursor): Make it possible to set cursor off.
4716 2008-08-03 Robert Millan <rmh@aybabtu.com>
4718 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4719 of modules instead of assuming which platform provides what.
4720 * util/update-grub.in: Likewise.
4722 2008-08-03 Robert Millan <rmh@aybabtu.com>
4724 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4725 instead of `grub_install_dos_part' to determine whether a drive needs
4726 to be prepended to prefix (`grub_install_dos_part' is not reliable,
4727 because it can be overridden when loading GRUB via Multiboot).
4729 2008-08-02 Robert Millan <rmh@aybabtu.com>
4731 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4733 2008-08-02 Robert Millan <rmh@aybabtu.com>
4735 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4736 of informational grub_dprintf() calls.
4738 2008-08-02 Robert Millan <rmh@aybabtu.com>
4740 * disk/memdisk.c (memdisk_size): Don't initialize.
4741 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4743 * include/grub/i386/pc/kernel.h
4744 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4745 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4746 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4747 (grub_arch_memdisk_size): Remove.
4749 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4750 field (was only used to transfer a constant). Add `type' field to
4751 support multiple module types.
4752 (grub_module_iterate): New function.
4754 * kern/device.c (grub_device_open): Do not hide error messages
4755 when grub_disk_open() fails. Use grub_print_error() instead.
4757 * kern/i386/pc/init.c (grub_arch_modules_addr)
4758 (grub_arch_memdisk_size): Remove functions.
4759 (grub_arch_modules_addr): Return the module address in high memory
4760 (now that it isn't copied anymore).
4762 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4763 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4764 decompression routine (grub_total_module_size already includes that
4765 now). Don't copy modules back to low memory.
4767 * kern/main.c: Include `<grub/mm.h>'.
4768 (grub_load_modules): Split out (and use) ...
4769 (grub_module_iterate): ... this function, which iterates through
4770 module objects and runs a hook.
4771 Comment out grub_mm_init_region() call, as it would cause non-ELF
4772 modules to be overwritten.
4774 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4775 the memdisk image in its own region, make it part of the module list.
4776 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4777 (main): Parse --memdisk|-m option, and pass user-provided path as
4778 parameter to generate_image().
4779 (add_segments): Pass `memdisk_path' down to load_modules().
4780 (load_modules): Embed memdisk image in module section when requested.
4781 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4782 `header.type' instead of `header.offset'.
4784 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4785 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4786 (memdisk_mod_LDFLAGS): New variables.
4787 * conf/i386-coreboot.rmk: Likewise.
4788 * conf/i386-ieee1275.rmk: Likewise.
4790 2008-08-02 Robert Millan <rmh@aybabtu.com>
4792 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4793 (backward_relocator): New variables. Used to allocate and relocate
4794 the payload, respectively.
4795 (grub_multiboot_load_elf32): Load into heap instead of requested
4796 address, install the appropriate relocator code in each bound of
4797 the payload, and set the entry point such that
4798 grub_multiboot_real_boot() will jump to one of them.
4800 * kern/i386/loader.S (grub_multiboot_payload_size)
4801 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4802 (grub_multiboot_payload_entry_offset): New variables.
4803 (grub_multiboot_real_boot): Set cpu context to what the relocator
4804 expects, and jump to the relocator instead of the payload.
4806 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4807 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4808 (grub_multiboot_payload_entry_offset): Export.
4810 2008-08-01 Bean <bean123ch@gmail.com>
4812 * normal/menu_entry.c (editor_getline): Don't return the original
4813 string as result, as it will be released by lexer once it has done
4816 2008-08-01 Robert Millan <rmh@aybabtu.com>
4818 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4819 within menuentries, not before them.
4820 util/grub.d/10_hurd.in: Likewise.
4822 2008-08-01 Bean <bean123ch@gmail.com>
4824 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4825 (bufio_mod_SOURCES): New macro.
4826 (bufio_mod_CFLAGS): Likewise.
4827 (bufio_mod_LDFLAGS): Likewise.
4829 * include/grub/bufio.h: New file.
4831 * io/bufio.c: Likewise.
4833 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4834 (grub_video_reader_png): Use grub_buffile_open to open file.
4836 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4837 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4839 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4840 (grub_video_reader_tga): Use grub_buffile_open to open file.
4842 * font/manager.c: Include <grub/bufio.h>.
4843 (add_font): Use grub_buffile_open to open file.
4845 2008-07-31 Robert Millan <rmh@aybabtu.com>
4847 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4848 ELF segments, use a macro for arbitrarily accessing any of them instead
4849 of preparing a pointer that allows access to one at a time.
4850 (grub_multiboot_load_elf64): Likewise.
4852 2008-07-31 Bean <bean123ch@gmail.com>
4854 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4855 GRUB_KERNEL_MACHINE_DATA_END.
4857 2008-07-30 Robert Millan <rmh@aybabtu.com>
4859 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4860 Increase from 0x50 to 0x60.
4861 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4862 use UUIDs to identify the root drive for them. If that's not
4864 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4865 check, for cross-disk installs.
4867 2008-07-30 Robert Millan <rmh@aybabtu.com>
4869 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4870 is non-empty, use it to set the `prefix' environment variable instead
4871 of the usual approach.
4872 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4873 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4874 environment variable instead of dummy make_install_device().
4876 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4877 (start): Insert a data section, with `grub_prefix' variable.
4878 * kern/i386/linuxbios/startup.S: Likewise.
4880 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4881 New variable reference.
4882 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4883 New macro. Defines offset of `grub_prefix' within startup.S (relative
4885 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
4886 section within startup.S (relative to `start').
4887 * include/grub/i386/coreboot/kernel.h: Likewise.
4889 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4890 Overwrite grub_prefix with its contents, at the beginning of the
4892 (main): Understand -p|--prefix.
4894 2008-07-30 Robert Millan <rmh@aybabtu.com>
4896 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4898 2008-07-30 Robert Millan <rmh@aybabtu.com>
4900 * term/i386/pc/vga_text.c (grub_console_cls): Use
4901 grub_console_gotoxy() to go back to beginning of the screen.
4902 Found by Patrick Georgi <patrick.georgi@coresystems.de>
4904 2008-07-29 Christian Franke <franke@computer.org>
4906 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4907 Add conversion of emulated mount points on Cygwin.
4909 2008-07-29 Christian Franke <franke@computer.org>
4911 * util/update-grub.in: Add a check for admin
4913 Remove old `grub.cfg.new' before creation.
4914 Add `-f' to `mv' to handle the different filesystem
4915 semantics of Windows.
4917 2008-07-29 Bean <bean123ch@gmail.com>
4919 * normal/main.c (get_line): Fix buffer overflow bug.
4921 2008-07-28 Robert Millan <rmh@aybabtu.com>
4923 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4924 (struct grub_apple_header): New struct. Describes the layout of
4926 (apple_partition_map_iterate): Check the header magic as well as the
4927 partition magic (which was already being checked).
4929 2008-07-28 Pavel Roskin <proski@gnu.org>
4931 * genmk.rb: Add a warning to the beginning of the output that
4932 it's a generated file and should not be edited.
4934 2008-07-28 Robert Millan <rmh@aybabtu.com>
4936 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4937 with the same number are found, just use issue a warning with
4938 grub_dprintf(), as this error has been reported to be non-fatal.
4940 2008-07-27 Robert Millan <rmh@aybabtu.com>
4942 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4945 2008-07-27 Bean <bean123ch@gmail.com>
4947 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4948 (grub_fat_find_dir): Ignore case when comparing filename.
4950 2008-07-27 Bean <bean123ch@gmail.com>
4952 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4953 smallino, as it's more descriptive, and i8count can be confused with
4954 the other field count.
4955 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4958 2008-07-27 Bean <bean123ch@gmail.com>
4960 * commands/crc.c: New file.
4962 * lib/crc.c: Likewise.
4964 * include/grub/lib/crc.h: Likewise.
4966 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4968 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4969 (hexdump): Move this function to ...
4971 * lib/hexdump.c: ... here.
4973 * include/grub/hexdump.h: Renamed to ...
4975 * include/grub/lib/hexdump.h: ... this.
4977 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4979 * util/grub-editenv.c: Likewise.
4981 * include/envblk.h: Renamed to ...
4983 * include/lib/envblk.h: ... this.
4985 * util/envblk.c: Renamed to ...
4987 * lib/envblk.c: ... this.
4989 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4991 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4992 (pkglib_MODULES): Add crc.mod.
4993 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4994 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4995 (crc_mod_SOURCES): New macro.
4996 (crc_mod_CFLAGS): Likewise.
4997 (crc_mod_LDFLAGS): Likewise.
4999 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5001 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5003 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5005 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5007 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5009 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
5011 * commands/help.c: Include <grub/term.h>.
5012 (TERM_WIDTH): Removed. Updated all users.
5014 2008-07-27 Pavel Roskin <proski@gnu.org>
5016 * util/getroot.c (find_root_device): Rephrase a comment to avoid
5017 spurious warnings about a comment within a comment.
5019 2008-07-25 Robert Millan <rmh@aybabtu.com>
5021 * util/getroot.c (find_root_device): Skip devices that match
5022 /dev/dm-[0-9]. This lets the real device be found for any type of
5023 abstraction (LVM, EVMS, RAID..).
5024 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5025 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
5026 device is found first, find_root_device() will now skip it.
5028 2008-07-24 Pavel Roskin <proski@gnu.org>
5030 * include/grub/types.h: Use __builtin_bswap32() and
5031 __builtin_bswap64() with gcc 4.3 and newer.
5033 2008-07-24 Christian Franke <franke@computer.org>
5035 * util/i386/pc/grub-install.in: If `--debug' is specified,
5036 pass `--verbose' to grub-setup.
5037 Abort script if make_system_path_relative_to_its_root() fails.
5039 2008-07-24 Bean <bean123ch@gmail.com>
5041 * configure.ac: Fixed a bug caused by the previous cygwin patch,
5042 variable `target_platform' should be `platform'.
5044 2008-07-24 Bean <bean123ch@gmail.com>
5046 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5047 (grub_png_init_fixed_block): New function.
5048 (grub_png_decode_image_data): Handle fixed huffman code compression.
5050 2008-07-24 Bean <bean123ch@gmail.com>
5052 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5053 (grub_pe2elf_SOURCES): New macro.
5054 (CLEANFILES): Add grub-pe2elf.
5056 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5057 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5058 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5059 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5060 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5061 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5062 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5063 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5064 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5065 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5066 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5067 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5068 (GRUB_PE32_DT_FUNCTION): Likewise.
5069 (GRUB_PE32_REL_I386_DIR32): Likewise.
5070 (GRUB_PE32_REL_I386_REL32): Likewise.
5071 (grub_pe32_symbol): New structure.
5072 (grub_pe32_reloc): Likewise.
5074 * util/grub-pe2elf.c: New file.
5076 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5077 start symbol in non pc platform.
5079 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5081 The following patches are from Christian Franke.
5083 * include/grub/dl.h: Remove .previous, gas supports this only
5086 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5087 Remove .type, gas supports this only for ELF format.
5089 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5090 nullbytes in symbol table. This fixes an infinite loop if table is
5093 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5094 TARGET_IMG_LDFLAGS and EXEEXT.
5096 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5097 TARGET_IMG_LDFLAGS_AC.
5098 (grub_CHECK_STACK_ARG_PROBE): New function.
5100 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5102 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5104 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5105 to set TARGET_IMG_LD* accordingly.
5106 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5107 Add call to grub_CHECK_STACK_ARG_PROBE.
5108 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5110 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5112 * genmk.rb: Add EXEEXT to CLEANFILES.
5114 2008-07-23 Robert Millan <rmh@aybabtu.com>
5116 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5117 define the codes for arrows and lines used for the menu).
5118 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5121 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5122 fonts, because the latter are too slow.
5124 2008-07-21 Bean <bean123ch@gmail.com>
5126 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5127 a20. Run keyboard test last, as it will cause macbook to halt.
5129 2008-07-18 Pavel Roskin <proski@gnu.org>
5131 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
5132 load foreign architecture modules correctly anyway. Keep
5133 support for loading host architecture modules, whether we
5134 compile them or not.
5136 2008-07-17 Pavel Roskin <proski@gnu.org>
5138 * configure.ac: Use -m32 or -m64 regardless of whether we had to
5139 change target_cpu. The compiler default can mismatch target_cpu
5142 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5143 * kern/efi/efi.c: Likewise.
5145 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5146 target compiler is functional.
5147 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5150 * configure.ac: Default to efi platform for x86_64-apple. Allow
5151 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5152 adjustments from the rest, only do them if target is not
5153 explicitly given. Merge other adjustments with the final sanity
5154 check. Remove an extraneous check for supported CPU. Be
5155 specific which CPU and which platform is not supported.
5157 * configure.ac: Default to pc platform for x86_64.
5159 2008-07-17 Robert Millan <rmh@aybabtu.com>
5161 Partial LinuxBIOS -> Coreboot rename.
5163 * conf/i386-linuxbios.rmk: Renamed to ...
5164 * conf/i386-coreboot.rmk: ... this.
5165 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5166 * configure.ac: Accept "coreboot" as input platform (but maintain
5167 compatibility with "linuxbios").
5168 * include/grub/i386/linuxbios: Renamed to ...
5169 * include/grub/i386/coreboot: ... this.
5171 2008-07-17 Bean <bean123ch@gmail.com>
5173 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5174 (appleldr_mod_SOURCE): New variable.
5175 (appleldr_mod_CFLAGS): Likewise.
5176 (appleldr_mod_LDFLAGS): Likewise.
5177 (pci_mod_SOURCES): Likewise.
5178 (pci_mod_CFLAGS): Likewise.
5179 (pci_mod_LDFLAGS): Likewise.
5180 (lspci_mod_SOURCES): Likewise.
5181 (lspci_mod_CFLAGS): Likewise.
5182 (lspci_mod_LDFLAGS): Likewise.
5184 * conf/x86_64-efi.rmk: New file.
5186 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5188 (grub_efidisk_write): Likewise.
5190 * include/efi/api.h (efi_call_0): New macro.
5191 (efi_call_1): Likewise.
5192 (efi_call_2): Likewise.
5193 (efi_call_3): Likewise.
5194 (efi_call_4): Likewise.
5195 (efi_call_5): Likewise.
5196 (efi_call_6): Likewise.
5198 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5199 grub_rescue_cmd_chainloader.
5201 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5202 (grub_pe32_optional_header): Change some fields based on i386 or
5204 (GRUB_PE32_PE32_MAGIC): Likewise.
5206 * include/grub/efi/uga_draw.h: New file.
5208 * include/grub/elf.h (STN_ABS): New constant.
5209 (R_X86_64_NONE): Relocation constant for x86_64.
5210 (R_X86_64_64): Likewise.
5211 (R_X86_64_PC32): Likewise.
5212 (R_X86_64_GOT32): Likewise.
5213 (R_X86_64_PLT32): Likewise.
5214 (R_X86_64_COPY): Likewise.
5215 (R_X86_64_GLOB_DAT): Likewise.
5216 (R_X86_64_JUMP_SLOT): Likewise.
5217 (R_X86_64_RELATIVE): Likewise.
5218 (R_X86_64_GOTPCREL): Likewise.
5219 (R_X86_64_32): Likewise.
5220 (R_X86_64_32S): Likewise.
5221 (R_X86_64_16): Likewise.
5222 (R_X86_64_PC16): Likewise.
5223 (R_X86_64_8): Likewise.
5224 (R_X86_64_PC8): Likewise.
5226 * include/grub/i386/efi/pci.h: New file.
5228 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5229 Change it value based on platform.
5230 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5231 (GRUB_E820_RAM): Likewise.
5232 (GRUB_E820_RESERVED): Likewise.
5233 (GRUB_E820_ACPI): Likewise.
5234 (GRUB_E820_NVS): Likewise.
5235 (GRUB_E820_EXEC_CODE): Likewise.
5236 (GRUB_E820_MAX_ENTRY): Likewise.
5237 (grub_e820_mmap): New structure.
5238 (linux_kernel_header): Change the efi field according to different
5239 kernel version, also field from linux_kernel_header.
5241 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5243 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5244 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5245 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5246 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5247 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5248 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5249 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5250 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5251 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5252 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5254 * include/grub/x86_64/efi/kernel.h: New file.
5256 * include/grub/x86_64/efi/loader.h: Likewise.
5258 * include/grub/x86_64/efi/machine.h: Likewise.
5260 * include/grub/x86_64/efi/pci.h: Likewise.
5262 * include/grub/x86_64/efi/time.h: Likewise.
5264 * include/grub/x86_64/linux.h: Likewise.
5266 * include/grub/x86_64/setjmp.h: Likewise.
5268 * include/grub/x86_64/time.h: Likewise.
5270 * include/grub/x86_64/types.h: Likewise.
5272 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5273 GRUB_TARGET_SIZEOF_VOID_P.
5275 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5276 (grub_efi_locate_handle): Likewise.
5277 (grub_efi_open_protocol): Likewise.
5278 (grub_efi_set_text_mode): Likewise.
5279 (grub_efi_stall): Likewise.
5280 (grub_exit): Likewise.
5281 (grub_reboot): Likewise.
5282 (grub_halt): Likewise.
5283 (grub_efi_exit_boot_services): Likewise.
5284 (grub_get_rtc): Likewise.
5286 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5287 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5288 (grub_efi_allocate_pages): Wrap efi calls.
5289 (grub_efi_free_pages): Wrap efi calls.
5290 (grub_efi_get_memory_map): Wrap efi calls.
5292 * kern/x86_64/dl.c: New file.
5294 * kern/x86_64/efi/callwrap.S: Likewise.
5296 * kern/x86_64/efi/startup.S: Likewise.
5298 * loader/efi/appleloader.c: Likewise.
5300 * loader/efi/chainloader.c (cmdline): New variable.
5301 (grub_chainloader_unload): Wrap efi calls.
5302 (grub_chainloader_boot): Likewise.
5303 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5306 * loader/efi/chainloader_normal.c (chainloader_command):
5307 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5310 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5312 (grub_e820_add_region): New function.
5313 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5315 (grub_find_video_card): New function.
5316 (grub_linux_setup_video): New function.
5317 (grub_rescue_cmd_linux): Probe for video information.
5319 * normal/x86_64/setjmp.S: New file.
5321 * term/efi/console.c (map_char): New function.
5322 (grub_console_putchar): Map unicode char.
5323 (grub_console_checkkey): Wrap efi calls.
5324 (grub_console_getkey): Likewise.
5325 (grub_console_getwh): Likewise.
5326 (grub_console_gotoxy): Likewise.
5327 (grub_console_cls): Likewise.
5328 (grub_console_setcolorstate): Likewise.
5329 (grub_console_setcursor): Likewise.
5331 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5333 2008-07-16 Pavel Roskin <proski@gnu.org>
5335 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5338 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5339 pointer, not an integer. This fixes a warning and prevents
5340 precision loss on 64-bit systems.
5341 (relocate_addresses): Remove unneeded cast.
5343 2008-07-15 Pavel Roskin <proski@gnu.org>
5345 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5347 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5349 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5350 Fix comparison between signed and unsigned.
5352 * include/grub/i386/ieee1275/console.h: Declare
5353 grub_console_init() and grub_console_fini().
5355 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5356 It's empty and unused.
5358 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5359 beginning to avoid warnings with some compilers.
5361 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5362 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5364 2008-07-14 Pavel Roskin <proski@gnu.org>
5366 * kern/env.c (grub_register_variable_hook): Don't copy empty
5367 string, it leaks memory. Pass "" to grub_env_set(), it should
5368 handle constant strings.
5370 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5371 * commands/cmp.c (grub_cmd_cmp): Likewise.
5372 * kern/dl.c (grub_dl_flush_cache): Likewise.
5373 (grub_dl_load_core): Likewise.
5374 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5375 (grub_elf64_load_phdrs): Likewise.
5377 2008-07-13 Pavel Roskin <proski@gnu.org>
5379 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5380 between signed and unsigned.
5381 (LzmaEnc_Finish): Fix warning about an unused parameter.
5383 2008-07-13 Bean <bean123ch@gmail.com>
5385 * Makefile.in (enable_lzo): New rule.
5387 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5389 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5391 * boot/i386/pc/lnxboot.S: #include <config.h>.
5393 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5394 its value according to the compression algorithm used, lzo or lzma.
5396 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5397 compression algorithm according to configure macro.
5399 * kern/i386/pc/startup.S (codestart): Likewise.
5401 * kern/i386/pc/lzma_decode.S: New file.
5403 * include/grub/lib/LzFind.h: Likewise.
5405 * include/grub/lib/LzHash.h: Likewise.
5407 * include/grub/lib/LzmaDec.h: Likewise.
5409 * include/grub/lib/LzmaEnc.h: Likewise.
5411 * include/grub/lib/LzmaTypes.h: Likewise.
5413 * lib/LzFind.c: Likewise.
5415 * lib/LzmaDec.c: Likewise.
5417 * lib/LzmaEnc.c: Likewise.
5419 2008-07-13 Bean <bean123ch@gmail.com>
5421 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5422 (grub_ext4_extent_header): New structure.
5423 (grub_ext4_extent): Likewise.
5424 (grub_ext4_extent_idx): Likewise.
5425 (grub_ext4_find_leaf): New function.
5426 (grub_ext2_read_block): Handle extents.
5428 2008-07-12 Robert Millan <rmh@aybabtu.com>
5430 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5432 2008-07-11 Robert Millan <rmh@aybabtu.com>
5434 * util/grub.d/40_custom.in: New file. Example on how to add custom
5435 entries to /etc/grub.d.
5436 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5437 40_custom (implicitly, by merging all the grub.d rules).
5439 2008-07-11 Pavel Roskin <proski@gnu.org>
5441 * commands/read.c (grub_getline): Fix invalid memory access.
5442 Don't add newline to the variable value.
5444 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5445 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5446 (serial_hw_get_port): Check validity of the port number.
5447 (grub_cmd_serial): Check return value of serial_hw_get_port().
5449 2008-07-07 Pavel Roskin <proski@gnu.org>
5451 * boot/i386/pc/diskboot.S (notification_string): Replace
5452 "Loading kernel" with just "loading". This is shorter, less
5453 confusing and saves a few bytes for possible future changes.
5455 2008-07-05 Pavel Roskin <proski@gnu.org>
5457 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5458 size for ATAPI devices, they are undefined. Output sector
5459 number in decimal form.
5461 * disk/ata.c: Use named constants for status bits.
5463 2008-07-04 Pavel Roskin <proski@gnu.org>
5465 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5466 grub_addr_t before casting it to the void pointer to fix a
5467 warning. Non-addressable regions are discarded earlier.
5468 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5469 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5470 (check_signature): Don't shadow table_header.
5471 (grub_linuxbios_table_iterate): Cast numeric constants to
5472 grub_linuxbios_table_header_t.
5473 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5476 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5479 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5480 pointer, which can cause warnings. Support 64-bit addresses.
5482 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5483 of sizeof(long). This fixes PowerPC image generation on x86_64.
5485 2008-07-04 Robert Millan <rmh@aybabtu.com>
5487 This fixes a performance issue when pc & gpt partmap iterators
5488 didn't abort iteration even after our hook found what it was
5489 looking for (often causing expensive probes of non-existent drives).
5491 Some callers relied on previous buggy behaviour, since they would
5492 raise an error when their own hooks caused early abortion of its
5495 * kern/device.c (grub_device_open): Improve error message.
5496 * disk/lvm.c (grub_lvm_open): Likewise.
5497 * disk/raid.c (grub_raid_open): Likewise.
5499 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5500 when hook requests it, independently of grub_errno.
5501 (pc_partition_map_probe): Do not fail when find_func() caused
5502 early abortion of pc_partition_map_iterate().
5504 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5505 when hook requests it, independently of grub_errno.
5506 (gpt_partition_map_probe): Do not fail when find_func() caused
5507 early abortion of gpt_partition_map_iterate().
5509 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5510 when hook requests it, independently of grub_errno. Do not fail when
5511 part_map_iterate_hook() caused early abortion of p->iterate().
5513 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5514 when grub_partition_iterate() returned with non-zero.
5516 2008-07-03 Pavel Roskin <proski@gnu.org>
5518 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5519 like we do in grub_ata_pio_read().
5520 (grub_ata_readwrite): Always write individual sectors. Fix the
5521 sector count for the remainder.
5522 (grub_ata_write): Enable writing to ATA devices. Correctly
5523 report error for ATAPI devices.
5525 2008-07-02 Pavel Roskin <proski@gnu.org>
5527 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5530 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5531 for every read sector, we already increment it for the whole
5532 batch. This fixes reading more than 256 sectors at once.
5534 * util/grub-editenv.c (cmd_info): Cast argument to long
5535 explicitly. ptrdiff_t reduces to int on i386.
5537 * util/grub-editenv.c (main): Be specific which parameter is
5540 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5541 (memdisk): Make memdisk_orig_addr a pointer.
5543 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5544 for file offsets, use grub_off_t instead. Fix printf format
5547 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5548 there. Real unexpected warnings should not drown in the noise
5549 about known problems.
5551 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5552 grub_disk_addr_t for memory addresses.
5554 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5555 explicitly to fix a warning.
5557 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5559 * Makefile.in (MODULE_LDFLAGS): New variable.
5560 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5561 the linker accepts --build-id=none.
5562 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5564 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5566 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5567 those in Linux XFS code. Provide a way to access 64-bit parent
5569 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5570 the end of struct grub_xfs_dir_header.
5572 2008-07-02 Bean <bean123ch@gmail.com>
5574 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5575 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5576 and GRUB_IEEE1275_FLAG_NO_ANSI.
5578 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5579 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5580 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5582 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5583 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5585 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5586 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5588 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5589 esc sequence on non ANSI terminal.
5590 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5592 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5595 2008-07-02 Bean <bean123ch@gmail.com>
5597 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5598 (grub_editenv_SOURCES): New variable.
5599 (pkglib_MODULES): Add loadenv.mod.
5600 (loadenv_mod_SOURCES): New variable.
5601 (loadenv_mod_CFLAGS): Likewise.
5602 (loadenv_mod_LDFLAGS): Likewise.
5604 * include/grub/envblk.h: New file.
5606 * util/envblk.c: New file.
5608 * util/grub-editenv.c: New file.
5610 * commands/loadenv.c: New file.
5612 2008-07-01 Pavel Roskin <proski@gnu.org>
5614 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5615 not unsigned char. This fixes warnings and is consistent with
5618 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5620 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5622 * term/tparm.c (analyze): Always set *popcount.
5624 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5625 cast to fix a warning.
5627 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5628 cast to suppress a warning.
5630 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5631 grub_fshelp_read_file() expects.
5633 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5634 write uuid as a 32-bit value in CPU byte order, so declare and
5637 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5638 long if the format specifier expects it.
5639 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5640 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5641 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5642 long to fix a warning.
5643 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5644 grub_dprintf() arguments to fix warnings.
5646 2008-06-30 Pavel Roskin <proski@gnu.org>
5648 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5649 install_bsd_part immediately before core.img is embedded or
5650 modified on disk. This fixes core.img verification if core.img
5653 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5654 core_path to calculate the blocklist.
5655 Patch from Javier MartÃn <lordhabbit@gmail.com>
5657 2008-06-29 Robert Millan <rmh@aybabtu.com>
5659 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5660 block to disk block.
5661 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5662 Patch from Niels Böhm <bitbucket@arcor.de>
5664 2008-06-29 Robert Millan <rmh@aybabtu.com>
5666 * util/update-grub_lib.in (font_path): Search for fonts in
5667 /boot/grub first, which is more likely to be readable (we aren't
5668 deciding where fonts live, just looking for them).
5670 2008-06-26 Pavel Roskin <proski@gnu.org>
5672 * util/biosdisk.c (read_device_map): Don't leave dead map
5673 entries for devices failing stat() check.
5675 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5676 core_path_dev for the core.img path on the target device.
5678 2008-06-26 Robert Millan <rmh@aybabtu.com>
5680 * disk/fs_uuid.c: New file.
5681 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5682 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5683 (fs_uuid_mod_LDFLAGS): New variables.
5684 * include/grub/disk.h (grub_disk_dev_id): Add
5685 `GRUB_DISK_DEVICE_UUID_ID'.
5686 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5687 implement iterate().
5689 2008-06-26 Robert Millan <rmh@aybabtu.com>
5691 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5692 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5693 Linux image includes no initrd.
5695 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
5697 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5698 call to resolve the core image location that effectively appended the
5701 2008-06-21 Robert Millan <rmh@aybabtu.com>
5703 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5706 * util/grub.d/10_hurd.in: ... to here ...
5707 * util/grub.d/10_linux.in: ... and here.
5709 2008-06-19 Robert Millan <rmh@aybabtu.com>
5711 * kern/main.c (grub_main): Export `prefix' variable immediately
5712 after it has been set by grub_machine_set_prefix().
5714 2008-06-19 Robert Millan <rmh@aybabtu.com>
5716 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5717 search result when not saving to variable, not the other way around.
5718 When saving to variable, abort iteration as soon as a match is found.
5720 2008-06-19 Robert Millan <rmh@aybabtu.com>
5722 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5723 check for partition that provides /boot/grub. Its logic is flawed,
5724 as it prevents prepare_grub_to_access_device() from being called
5727 2008-06-19 Robert Millan <rmh@aybabtu.com>
5729 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5730 "insmod" command directly when abstraction modules are needed,
5731 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5732 since it had already been processed).
5734 2008-06-19 Pavel Roskin <proski@gnu.org>
5736 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5737 changed. This is needed in case GRUB_LIBDIR changes.
5738 * conf/i386-ieee1275.rmk: Likewise.
5739 * conf/i386-linuxbios.rmk: Likewise.
5740 * conf/i386-pc.rmk: Likewise.
5741 * conf/powerpc-ieee1275.rmk: Likewise.
5743 2008-06-18 Pavel Roskin <proski@gnu.org>
5745 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5746 kernel_elf_symlist.c to symlist.c for consistency with other
5747 architectures. Update all users.
5748 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5750 2008-06-18 Robert Millan <rmh@aybabtu.com>
5752 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5755 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5756 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5757 a RAID device, run setup() for all members independently on whether
5758 LVM abstraction is being used.
5759 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5760 If grub-mkimage has set `*install_dos_part == -2', don't override this
5762 Perform *install_dos_part adjustments independently on whether
5763 we're embedding or not.
5764 Clarify error message when image is too big for embedding.
5765 Remove duplicate *install_dos_part stanza.
5767 2008-06-17 Robert Millan <rmh@aybabtu.com>
5769 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5770 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5772 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5773 values in grub_ofconsole_normal_color and
5774 grub_ofconsole_highlight_color (they're not directly related to
5775 background and foreground).
5776 (grub_ofconsole_setcolorstate): Extract background and foreground
5777 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5779 2008-06-17 Robert Millan <rmh@aybabtu.com>
5781 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5782 /boot/grub for the check in last commit, not /boot (they could be
5783 different partitions).
5785 2008-06-16 Robert Millan <rmh@aybabtu.com>
5787 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5788 asked to setup access for the same partition that provides /boot,
5789 don't bother using UUIDs since our root already has the value we
5792 2008-06-16 Robert Millan <rmh@aybabtu.com>
5794 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5796 Patch from Sven Mueller <sven@debian.org>.
5798 2008-06-16 Robert Millan <rmh@aybabtu.com>
5800 * util/update-grub.in: Check for $EUID instead of $UID.
5801 Reported by Vincent Zweije.
5803 2008-06-16 Bean <bean123ch@gmail.com>
5805 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5806 (grub_ext2_read_block): Likewise.
5807 (grub_ext2_read_inode): Likewise.
5808 (grub_ext2_mount): Likewise.
5809 (grub_ext2_close): Likewise.
5810 (grub_ext3_get_journal): Removed.
5812 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5813 (grub_reiserfs_read_symlink): Likewise.
5814 (grub_reiserfs_mount): Likewise.
5815 (grub_reiserfs_open): Likewise.
5816 (grub_reiserfs_read): Likewise.
5817 (grub_reiserfs_close): Likewise.
5818 (grub_reiserfs_get_journal): Removed.
5820 * fs/fshelp.c (grub_fshelp_read): Removed.
5821 (grub_fshelp_map_block): Likewise.
5823 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5824 (grub_fshelp_journal): Likewise.
5825 (grub_fshelp_read): Likewise.
5826 (grub_fshelp_map_block): Likewise.
5828 2008-06-16 Pavel Roskin <proski@gnu.org>
5830 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5831 floating point anymore.
5832 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5834 2008-06-15 Pavel Roskin <proski@gnu.org>
5836 * commands/ls.c (grub_ls_list_files): Use integer calculations
5837 for human readable format, avoid floating point use.
5838 * kern/misc.c (grub_ftoa): Remove.
5839 (grub_vsprintf): Remove floating point support.
5841 2008-06-15 Robert Millan <rmh@aybabtu.com>
5843 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5845 Reported by Max Vozeler.
5847 2008-06-15 Robert Millan <rmh@aybabtu.com>
5849 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5850 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5852 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5853 the beginning of the prefix.
5855 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5856 It is assumed that if we have a memdisk, grub-mkimage has set
5857 grub_prefix to include the "(memdisk)" drive in it.
5859 2008-06-15 Robert Millan <rmh@aybabtu.com>
5861 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5862 Initialize keyboard controller after registering the terminal, so that
5863 grub_printf() can be called from grub_keyboard_controller_init().
5865 2008-06-15 Robert Millan <rmh@aybabtu.com>
5867 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5868 extent-btree which is written as big endian on disk.
5869 Reported by Alain Greppin <al@chilibi.org>.
5871 2008-06-14 Robert Millan <rmh@aybabtu.com>
5873 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5874 * util/i386/pc/grub-install.in (modules): Likewise.
5876 2008-06-13 Pavel Roskin <proski@gnu.org>
5878 * commands/ls.c (grub_ls_list_files): Fix format warnings.
5880 2008-06-13 Bean <bean123ch@gmail.com>
5882 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5884 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5886 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5887 to indicate sparse block.
5889 2008-06-12 Pavel Roskin <proski@gnu.org>
5891 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5892 number, grub_fshelp_read() does it for us.
5894 * fs/fshelp.c (grub_fshelp_read): New function. Implement
5895 linear disk read with journal translation.
5896 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5897 * include/grub/fshelp.h: Declare grub_fshelp_read().
5899 2008-06-09 Pavel Roskin <proski@gnu.org>
5901 * fs/minix.c (grub_minix_mount): Handle error reading
5904 2008-06-08 Robert Millan <rmh@aybabtu.com>
5906 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5907 don't append the RAID prefix afterwards.
5908 Reported by Clint Adams.
5910 2008-06-08 Robert Millan <rmh@aybabtu.com>
5912 Based on description from Pavel:
5913 * kern/disk.c (grub_disk_check_range): Rename to ...
5914 (grub_disk_adjust_range): ... this. Add a comment explaining the
5915 tasks performed by this function.
5917 2008-06-08 Robert Millan <rmh@aybabtu.com>
5919 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5920 `num_serial' (for consistency with other variables).
5921 (struct grub_ntfs_data): Add `uuid' member.
5922 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5923 (grub_ntfs_uuid): New function.
5924 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5926 2008-06-07 Pavel Roskin <proski@gnu.org>
5928 * util/biosdisk.c (open_device): Revert last change to the
5929 function, it broke installation. The sector needs to be
5930 different dependent on which device is opened.
5932 2008-06-06 Robert Millan <rmh@aybabtu.com>
5934 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5935 rest of GRUB, and breakage doesn't happen if its value were modified.
5937 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5938 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5939 a constant (same value).
5940 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5941 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5943 2008-06-06 Robert Millan <rmh@aybabtu.com>
5945 * util/biosdisk.c (open_device): Do not modify sector offset when
5946 accessing a partition. kern/disk.c already handles this for us.
5948 2008-06-06 Robert Millan <rmh@aybabtu.com>
5950 * util/grub-emu.c (grub_machine_init): Move code in this function from
5952 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5953 segfault in case grub_printf() is called).
5955 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5956 grub_probe. Update all users not to explicitly add it again.
5957 (grub_device): New variable; contains corresponding device for grubdir.
5958 (fs_module, partmap_module, devabstraction_module): Pass
5959 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5962 2008-06-05 Robert Millan <rmh@aybabtu.com>
5964 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5965 is found, print it (same layout as with labels).
5967 2008-06-04 Robert Millan <rmh@aybabtu.com>
5969 * util/biosdisk.c (get_drive): Rename to ...
5970 (find_grub_drive): ... this. Update all users.
5972 (get_os_disk): Rename to ...
5973 (convert_system_partition_to_system_disk): ... this. Update all users.
5975 (find_drive): Rename to ...
5976 (find_system_device): ... this. Update all users.
5978 2008-06-04 Robert Millan <rmh@aybabtu.com>
5980 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5981 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5982 (make_device_map): Likewise.
5984 2008-06-01 Robert Millan <rmh@aybabtu.com>
5986 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5987 before dereferencing it.
5989 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5990 union with fat12/fat16-specific ones. Add some new fields, including
5991 `num_serial' for both versions.
5992 (struct grub_fat_data): Add `uuid' member.
5993 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5994 names. Initialize `data->uuid' using `num_serial'.
5995 (grub_fat_uuid): New function.
5996 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5998 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5999 (grub_reiserfs_uuid): New function.
6000 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6003 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6004 (grub_xfs_uuid): New function.
6005 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6007 2008-06-01 Robert Millan <rmh@aybabtu.com>
6009 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6010 code that is backward compatible with pre-uuid search command.
6012 2008-05-31 Robert Millan <rmh@aybabtu.com>
6014 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6015 floppies after everything else, to ensure floppy drive isn't accessed
6016 unnecessarily (patch from Bean).
6018 2008-05-31 Robert Millan <rmh@aybabtu.com>
6020 * commands/search.c (search_label, search_fs_uuid, search_file): Do
6021 not print device names when we were asked to set a variable.
6023 2008-05-31 Robert Millan <rmh@aybabtu.com>
6025 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6026 using "cursor-on" and "cursor-off" commands (understood at least by
6027 the Open Firmware flavour on OLPC).
6029 2008-05-31 Michael Gorven <michael@gorven.za.net>
6031 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6032 on and off sequences.
6034 2008-05-31 Robert Millan <rmh@aybabtu.com>
6036 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6037 * util/update-grub.in: Likewise.
6039 2008-05-30 Pavel Roskin <proski@gnu.org>
6041 * util/biosdisk.c (linux_find_partition): Simplify logic and
6042 make the code more universal. Keep special processing for
6043 devfs, but use a simple rule for all other devices. If the
6044 device ends with a number, append 'p' and the partition number.
6045 Otherwise, append only the partition number.
6047 2008-05-30 Robert Millan <rmh@aybabtu.com>
6049 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6050 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6051 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6052 the `root' parameter to Linux.
6054 2008-05-30 Robert Millan <rmh@aybabtu.com>
6056 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6057 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6058 --fs_uuid with --fs-uuid.
6059 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6060 all filesystems support them).
6062 2008-05-30 Robert Millan <rmh@aybabtu.com>
6064 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6065 grub_printf() flags, since we're printing in units of 2 bytes.
6067 2008-05-30 Robert Millan <rmh@aybabtu.com>
6069 * util/grub.d/00_header.in: Remove obsolete comment referencing
6070 convert_system_path_to_grub_path().
6071 * util/update-grub.in: Likewise.
6072 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6073 (convert_system_path_to_grub_path): Add a warning message explaining
6074 that this function is deprecated. Rely on is_path_readable_by_grub()
6075 for the readability checks.
6076 (font_path): Use is_path_readable_by_grub() for the readability
6077 check rather than convert_system_path_to_grub_path().
6079 2008-05-30 Robert Millan <rmh@aybabtu.com>
6081 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6082 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6083 converting it first.
6084 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6085 grub.cfg for access to font file, and afterwards call it again to set
6088 2008-05-30 Robert Millan <rmh@aybabtu.com>
6090 * commands/search.c (options): Add --fs_uuid option.
6091 (search_fs_uuid): New function.
6092 (grub_cmd_search): Fix --set argument passing.
6093 Use search_fs_uuid() when requested via --fs_uuid.
6094 (grub_search_init): Update help message.
6095 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6096 and redeclare it as an array of 16-bit words.
6097 (grub_ext2_uuid): New function.
6098 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6099 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6100 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6101 (GRUB_DEVICE_BOOT_UUID): New variables.
6102 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6103 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6105 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
6106 just assume `root' variable has the right value.
6107 * util/grub.d/10_linux.in: Likewise.
6108 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6110 (main): Recognise `-t fs_uuid' argument.
6112 2008-05-30 Robert Millan <rmh@aybabtu.com>
6114 * util/biosdisk.c (map): Redefine structure to hold information
6115 about GRUB drive name.
6116 (get_drive): Reimplement without assuming (and verifying) BIOS-like
6118 (call_hook): Remove.
6119 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6120 member. Assume drive has partitions.
6121 (grub_util_biosdisk_open): Access device names via `.device' struct
6123 (open_device): Likewise.
6124 (find_drive): Likewise.
6125 (read_device_map): Adjust map[] usage to match the new struct
6126 definition. Don't check for duplicates (still possible, but not cheap
6128 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6129 (make_device_name): Remove assumption of BIOS-like drive names.
6131 2008-05-30 Pavel Roskin <proski@gnu.org>
6133 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6134 compiling execute.c doesn't need grub_script.tab.h anymore.
6135 (normal/command.c_DEPENDENCIES): Likewise.
6136 (normal/function.c_DEPENDENCIES): Likewise.
6137 * conf/i386-ieee1275.rmk: Likewise.
6138 * conf/i386-linuxbios.rmk: Likewise.
6139 * conf/i386-pc.rmk: Likewise.
6140 * conf/powerpc-ieee1275.rmk: Likewise.
6141 * conf/sparc64-ieee1275.rmk: Likewise.
6143 2008-05-29 Pavel Roskin <proski@gnu.org>
6145 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6146 when scanning metadata for volume group name.
6148 * include/grub/script.h: Don't include grub_script.tab.h. It's
6149 a generated file, which may only be included from the files with
6150 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6151 use union YYSTYPE, as the later allows forward declaration.
6152 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6154 2008-05-29 Robert Millan <rmh@aybabtu.com>
6156 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6157 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6158 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6159 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6162 2008-05-29 Robert Millan <rmh@aybabtu.com>
6164 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6165 control key combinations.
6167 2008-05-29 Robert Millan <rmh@aybabtu.com>
6169 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6170 * util/ieee1275/grub-install.in: ... to here.
6171 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6172 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6173 (grub_install_SOURCES): Likewise.
6175 2008-05-29 Robert Millan <rmh@aybabtu.com>
6177 * fs/affs.c: Update copyright year.
6178 * fs/ext2.c: Likewise.
6179 * fs/fshelp.c: Likewise.
6180 * fs/hfsplus.c: Likewise.
6181 * fs/ntfs.c: Likewise.
6182 * fs/xfs.c: Likewise.
6183 * include/grub/fshelp.h: Likewise.
6184 * util/grub-mkdevicemap.c: Likewise.
6186 2008-05-28 Robert Millan <rmh@aybabtu.com>
6188 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6189 might need to be fatfs to support some firmware implementations
6192 2008-05-28 Robert Millan <rmh@aybabtu.com>
6194 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6196 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6197 (make_device_map): Likewise.
6199 2008-05-20 Bean <bean123ch@gmail.com>
6201 * fs/fshelp.c (grub_fshelp_map_block): New function.
6202 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6203 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6205 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6206 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6207 (grub_fshelp_journal): New structure.
6208 (grub_fshelp_map_block): New function prototype.
6209 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6210 (grub_fshelp_map_block): Likewise.
6212 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6213 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6214 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6215 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6216 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6217 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6218 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6219 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6220 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6221 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6222 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6223 (grub_ext2_sblock): New members for journal support.
6224 (grub_ext3_journal_header): New structure.
6225 (grub_ext3_journal_revoke_header): Likewise.
6226 (grub_ext3_journal_block_tag): Likewise.
6227 (grub_ext3_journal_sblock): Likewise.
6228 (grub_fshelp_node): New members logfile and journal.
6229 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6230 grub_fshelp_map_block to get real block number.
6231 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6233 (grub_ext2_read_inode): Likewise.
6234 (grub_ext3_get_journal): New function.
6235 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6236 (grub_ext2_close): Release memory used by journal.
6238 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6239 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6240 (grub_reiserfs_transaction_header): Renamed to
6241 grub_reiserfs_description_block, replace field data with real_blocks.
6242 (grub_reiserfs_commit_block): New structure.
6243 (grub_reiserfs_data): New member journal.
6244 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6246 (grub_reiserfs_read_symlink): Likewise.
6247 (grub_reiserfs_iterate_dir): Likewise.
6248 (grub_reiserfs_open): Likewise.
6249 (grub_reiserfs_read): Likewise.
6250 (grub_reiserfs_get_journal): New function.
6251 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6252 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6253 using grub_reiserfs_get_journal.
6254 (grub_reiserfs_close): Release memory used by journal.
6256 * fs/affs.c (grub_affs_read_block): Change block type to
6257 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6259 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6261 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6263 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6265 * fs/udf.c (grub_udf_read_block): Change block type to
6266 grub_disk_addr_t. Use type cast to avoid warning.
6268 * fs/xfs.c (grub_xfs_read_block): Likewise.
6270 2008-05-16 Christian Franke <franke@computer.org>
6272 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6273 to ensure that break with ESC will always work.
6274 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6275 Remove ESC from keyboard queue.
6277 2008-05-16 Christian Franke <franke@computer.org>
6279 * util/biosdisk.c: [__CYGWIN__] Add includes.
6280 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6281 (get_os_disk): Move variable declarations to OS specific
6282 parts to avoid warning.
6283 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6284 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6285 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6287 * util/getroot.c: [__CYGWIN__] Add includes.
6288 (strip_extra_slashes): Fix "/" case.
6289 [__CYGWIN__] (get_win32_path): New function.
6290 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6291 [__CYGWIN__] (find_root_device): Disable.
6292 [__CYGWIN__] (get_bootsec_serial): New function.
6293 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6294 [__linux__] (grub_guess_root_device): Add early returns to simplify
6296 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6297 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6298 check for Linux only.
6300 2008-05-15 Bean <bean123ch@gmail.com>
6302 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6303 keyboard hang problem in apple's intel mac.
6305 2008-05-09 Robert Millan <rmh@aybabtu.com>
6307 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6309 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6310 (make_device_map): Likewise.
6311 Reported by Aurelien Jarno <aurel32@debian.org>
6313 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
6315 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6316 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6317 (make_device_map): Output entries for xvd type disks.
6319 2008-05-07 Robert Millan <rmh@aybabtu.com>
6321 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6323 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6324 (make_device_map): Likewise.
6325 Reported by Roland Dreier <rdreier@cisco.com>
6327 2008-05-07 Robert Millan <rmh@aybabtu.com>
6329 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6330 grub_strstr() call. Correct a few mistakes in failure path handling.
6332 2008-05-06 Robert Millan <rmh@aybabtu.com>
6334 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6335 Do not print a trailing slash (therefore, the root directory is an
6337 (convert_system_path_to_grub_path): Do not remove trailing slash
6338 from make_system_path_relative_to_its_root() output.
6340 * util/i386/pc/grub-install.in: Add trailing slash to output from
6341 make_system_path_relative_to_its_root().
6343 2008-05-06 Robert Millan <rmh@aybabtu.com>
6345 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6346 ensures that output lines aren't intermangled with those sent to
6347 stderr (via grub_util_info()).
6348 * util/grub-probe.c (grub_refresh): Likewise.
6349 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6351 2008-05-05 Christian Franke <franke@computer.org>
6353 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6354 Add Cygwin device names.
6355 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6356 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6357 (check_device): Return error instead of success on empty name.
6358 (make_device_map): Move label inside linux specific code to
6359 prevent compiler warning.
6361 2008-04-30 Robert Millan <rmh@aybabtu.com>
6363 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6364 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6366 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6368 2008-04-29 Robert Millan <rmh@aybabtu.com>
6370 * docs/grub.cfg: New file (example GRUB configuration).
6372 2008-04-26 Robert Millan <rmh@aybabtu.com>
6374 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6375 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6376 and `disk/ieee1275/nand.c'.
6378 2008-04-25 Bean <bean123ch@gmail.com>
6380 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6383 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6384 change the buffer size to 4096 for cdrom device.
6386 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6388 (_linux_mod_SOURCES): New variable.
6389 (_linux_mod_CFLAGS): Likewise.
6390 (_linux_mod_LDFLAGS): Likewise.
6391 (linux_mod_SOURCES): Likewise.
6392 (linux_mod_CFLAGS): Likewise.
6393 (linux_mod_LDFLAGS): Likewise.
6394 (nand_mod_SOURCES): Likewise.
6395 (nand_mod_CFLAGS): Likewise.
6396 (nand_mod_LDFLAGS): Likewise.
6398 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6399 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6400 type property. (nand device in olpc don't have this property)
6402 * include/grub/disk.h (grub_disk_dev_id): New macro
6403 GRUB_DISK_DEVICE_NAND_ID.
6405 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6407 (grub_rescue_cmd_initrd): Likewise.
6409 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6410 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6411 ofw_cif_handler and ofw_idt, adjust padding number.
6413 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6414 GRUB_MACHINE_IEEE1275 is defined.
6416 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6417 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6419 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6420 on nested function heap_init.
6421 (grub_upper_mem): New variable for i386-ieee1275.
6422 (grub_get_extended_memory): New function for i386-ieee1275.
6423 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6425 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6426 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6429 * loader/i386/ieee1275/linux.c: New file.
6431 * loader/i386/ieee1275/linux_normal.c: New file.
6433 * disk/ieee1275/nand.c: New file.
6435 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6437 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6439 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6441 2008-04-18 Robert Millan <rmh@aybabtu.com>
6443 Restructures early code path on ieee1275 to unify grub_main() as
6444 the first C function that is executed in every platform.
6446 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6447 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6449 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6450 * kern/ieee1275/cmain.c (cmain): Rename to ...
6451 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6452 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6455 2008-04-18 Robert Millan <rmh@aybabtu.com>
6457 * util/update-grub.in: Fix syntax error when setting
6458 `GRUB_PRELOAD_MODULES'.
6459 Reported by Stephane Chazelas <stephane@artesyncp.com>
6461 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6463 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6464 section into account, newer toolchains generate unique build ids
6465 * configure.ac: remove the test for --build-id=none acceptance,
6466 we want build ids to be preserved
6467 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6468 far from other sections don't cause the raw binary images grow
6471 2008-04-15 Robert Millan <rmh@aybabtu.com>
6473 * disk/lvm.c: Update copyright year.
6474 * kern/misc.c: Likewise.
6476 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6478 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6479 there is no memory left for physical volume name.
6481 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6483 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6484 volume name mapping to support bigger than 9 character names properly.
6486 2008-04-13 Robert Millan <rmh@aybabtu.com>
6488 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6489 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6491 2008-04-13 Christian Franke <franke@computer.org>
6493 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6494 to create a floppy emulation boot CD when non emulation mode
6496 Enable Joliet CD filesystem extension.
6498 2008-04-13 Robert Millan <rmh@aybabtu.com>
6500 * kern/misc.c (grub_strncat): Fix off-by-one error.
6501 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6503 * kern/env.c (grub_env_context_close): Clear current context, not
6505 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6507 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6509 2008-04-13 Robert Millan <rmh@aybabtu.com>
6511 Improve robustness when handling LVM.
6513 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6514 (and leave `*p' unmodified).
6515 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6517 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6518 iterating through it.
6519 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6521 (grub_lvm_scan_device): Check the return value (and fail gracefully
6522 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6523 Don't assume `vg->pvs != NULL' when iterating through it.
6525 2008-04-13 Robert Millan <rmh@aybabtu.com>
6527 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6528 * genmk.rb (partmap): New variable.
6529 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6530 (#{partmap}): New target rule.
6531 * genpartmaplist.sh: New file.
6532 * Makefile.in (pkglib_DATA): Add partmap.lst.
6533 (partmap.lst): New target rule.
6534 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6535 modules (including all partition maps), instead of preloading them.
6537 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6539 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6540 `linux-boot-prober' (if installed) to detect other operating
6541 systems which are installed on the computer and add them to
6543 * conf/common.rmk: Build and install 30_os-prober.
6545 2008-04-12 Robert Millan <rmh@aybabtu.com>
6547 * kern/powerpc/ieee1275/init.c: Move from here ...
6548 * kern/ieee1275/init.c: ... to here. Update all users.
6550 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6551 * kern/ieee1275/cmain.c: ... to here. Update all users.
6553 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6554 * kern/ieee1275/openfw.c: ... to here. Update all users.
6556 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6557 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6559 2008-04-10 Pavel Roskin <proski@gnu.org>
6561 * configure.ac: Always use "_cv_" in cache variables for
6562 compatibility with Autoconf 2.62.
6564 2008-04-07 Robert Millan <rmh@aybabtu.com>
6566 Revert grub/machine/init.h addition by Pavel (since it breaks on
6567 i386-ieee1275 and others):
6568 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6569 * util/powerpc/ieee1275/misc.c: Likewise.
6571 2008-04-07 Robert Millan <rmh@aybabtu.com>
6573 * util/grub-probe.c (probe): Improve error message.
6575 2008-04-07 Robert Millan <rmh@aybabtu.com>
6577 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6578 (this prevents the presence of a bogus entry from ruining the whole
6581 2008-04-06 Pavel Roskin <proski@gnu.org>
6583 * util/biosdisk.c: Include grub/util/biosdisk.h.
6584 * util/grub-fstest.c (execute_command): Make static.
6585 * util/grub-mkdevicemap.c (check_device): Likewise.
6586 * util/i386/pc/misc.c: Include grub/machine/init.h.
6587 * util/powerpc/ieee1275/misc.c: Likewise.
6588 * util/lvm.c: Include grub/util/lvm.h.
6589 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6591 * util/raid.c: Include grub/util/raid.h.
6592 (grub_util_getdiskname): Make static.
6594 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6595 grub_hostfs_fini(), as they are called from grub_init_all() and
6596 grub_fini_all() respectively. This fixes an infinite loop in
6597 grub-fstest due to double registration of hostfs.
6598 Reported by Christian Franke <Christian.Franke@t-online.de>
6600 2008-04-05 Pavel Roskin <proski@gnu.org>
6602 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6603 all 8 functions. Otherwise, probe function 0 only.
6605 2008-04-04 Pavel Roskin <proski@gnu.org>
6607 * commands/lspci.c (grub_lspci_iter): Print the bus number
6610 * commands/lspci.c (grub_pci_classes): Fix typos.
6611 (grub_lspci_iter): Don't print func twice. Print vendor ID
6612 before device ID, as it's normally done.
6614 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6615 Fix signedness warnings.
6616 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6618 * util/ieee1275/get_disk_name.c: Include config.h so that
6619 _GNU_SOURCE is defined and getline() is declared. Mark an
6620 unused argument as such. Fix a signedness warning.
6622 2008-04-02 Pavel Roskin <proski@gnu.org>
6624 * genkernsyms.sh.in: Use more robust assignments for CC and
6625 srcdir. Quote srcdir.
6626 * gensymlist.sh.in: Likewise. Assert at the compile time that
6627 the symbol table is not empty.
6629 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6630 * fs/cpio.c (grub_cpio_read): Likewise.
6632 2008-04-01 Pavel Roskin <proski@gnu.org>
6634 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6635 * disk/host.c (grub_host_open): Likewise.
6636 * disk/loopback.c (grub_loopback_open): Likewise.
6637 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6638 disk->id as in disk/host.c, not a multi-character constant.
6640 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6641 later is obsolete, potentially dangerous and sets a bad example.
6642 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6643 * util/misc.c (grub_util_get_image_size): Likewise.
6645 * disk/loopback.c (options): Improve help for "--partitions".
6647 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6648 options to align them with the short options, e.g. "echo -e".
6650 2008-03-31 Bean <bean123ch@gmail.com>
6652 * video/reader/png.c (grub_png_data): New member is_16bit and
6654 (grub_png_decode_image_header): Detect 16 bit png image.
6655 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6656 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6657 (grub_video_reader_png): Release memory occupied by image_data.
6659 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6661 (grub_nfs_mount): Skip the test for sector per cluster.
6663 * include/grub/ntfs.h (MAX_SPC): Removed.
6665 2008-03-31 Bean <bean123ch@gmail.com>
6667 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6668 (grub_probe_SOURCES): Add fs/afs.c.
6669 (grub_fstest_SOURCES): Likewise.
6670 (afs_mod_SOURCES): New variable.
6671 (afs_mod_CFLAGS): Likewise.
6672 (afs_mod_LDFLAGS): Likewise.
6674 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6675 (grub_emu_SOURCES): Likewise.
6677 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6679 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6681 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6683 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6685 * fs/afs.c: New file.
6687 2008-03-30 Pavel Roskin <proski@gnu.org>
6689 * disk/host.c: Include grub/misc.h to fix a warning.
6690 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6691 warnings about implicit declarations.
6693 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6695 * include/grub/i386/loader.h: Change declaration of
6696 grub_linux_boot() to match what grub_loader_set() expects.
6697 * util/getroot.c (grub_guess_root_device): Return const char* to
6699 * util/grub-probe.c (probe): Fix a warning about uninitialized
6700 abstraction_name variable.
6701 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6702 second argument as unused to fix a warning.
6704 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6705 missing grub_error() call.
6707 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6708 2.60 and newer uses it to define datadir.
6710 * commands/sleep.c: Fix warning about implicit declaration.
6711 * disk/memdisk.c: Likewise.
6712 * loader/aout.c: Likewise.
6713 * loader/i386/bsd_normal.c: Likewise.
6714 * util/grub-probe.c: Likewise.
6716 * commands/i386/cpuid.c (has_longmode): Make static.
6717 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6718 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6720 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6721 GDT. This is more robust, as %ds can change.
6722 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6723 calling real_to_prot().
6724 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6726 2008-03-28 Pavel Roskin <proski@gnu.org>
6728 * kern/i386/pc/startup.S: Assert that uncompressed functions
6729 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6730 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6731 code, as they push parts of the code (error handlers) beyond
6732 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6733 code as correctness and size.
6735 2008-03-28 Pavel Roskin <proski@gnu.org>
6737 * kern/i386/pc/startup.S
6738 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6739 data block address to the real mode, keep offset minimal. This
6740 works around a bug in AWARD BIOS on old Athlon systems, which
6741 makes CD detection hang.
6743 2008-03-26 Pavel Roskin <proski@gnu.org>
6745 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6747 * include/grub/normal.h: Add grub_parse_color_name_pair()
6750 2008-03-24 Bean <bean123ch@gmail.com>
6752 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6753 (cd_count): Removed.
6754 (cd_drive): New variable.
6755 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6756 (grub_biosdisk_call_hook): Likewise.
6757 (grub_biosdisk_iterate): Change cdrom detection method.
6758 (grub_biosdisk_open): Replace cd_start with cd_drive.
6759 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6760 detect cdrom device.
6762 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6764 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6765 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6766 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6767 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6768 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6769 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6770 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6771 (grub_biosdisk_cdrp): New structure.
6772 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6774 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6776 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6779 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6782 2008-03-20 Robert Millan <rmh@aybabtu.com>
6784 Remove 2 TiB limit in ata.mod.
6785 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6786 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6787 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6788 grub_uint64_t instead of grub_uint32_t.
6790 2008-03-05 Bean <bean123ch@gmail.com>
6792 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6793 (grub_multiboot): Set boot device.
6795 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6797 2008-03-02 Bean <bean123ch@gmail.com>
6799 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6802 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6804 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6807 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6810 * docs/fdl.texi: New file.
6812 * docs/mdate-sh: New file. Copied from gnulib.
6813 * docs/texinfo.tex: Likewise.
6815 * config.guess: Updated from gnulib.
6816 * install-sh: Likewise.
6818 2008-02-28 Robert Millan <rmh@aybabtu.com>
6820 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6821 (aout_mod_SOURCES): New variable.
6822 (aout_mod_CFLAGS): Likewise.
6823 (aout_mod_LDFLAGS): Likewise.
6825 * conf/i386-ieee1275.rmk: Likewise.
6827 2008-02-28 Robert Millan <rmh@aybabtu.com>
6829 * util/update-grub.in: Reorganise terminal validity check. Accept
6830 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6831 Based on suggestion by Franklin PIAT.
6833 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6835 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6837 * util/getroot.c (grub_util_check_block_device): New function that
6838 returns the given argument if it is a block device and returns NULL else.
6839 * util/grub-probe.c (argument_is_device): New variable.
6840 (probe): Promote device_name from a variable to an argument. Receive
6841 device_name from grub_util_check_block_device() if path is NULL and from
6842 grub_guess_root_device() else. Do not free() device_name anymore.
6843 (options): Introduce new parameter '-d, --device'.
6844 (main): Add description of the new parameter to the help screen.
6845 Rename path variable to argument. Set argument_is_device if the '-d'
6846 option is given. Pass argument to probe() depending on
6849 2008-02-24 Bean <bean123ch@gmail.com>
6851 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6852 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6853 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6854 (GRUB_ISO9660_VOLDESC_PART): Likewise.
6855 (GRUB_ISO9660_VOLDESC_END): Likewise.
6856 (grub_iso9660_primary_voldesc): New member escape.
6857 (grub_iso9660_data): New member joliet.
6858 (grub_iso9660_convert_string): New function.
6859 (grub_iso9660_mount): Detect joliet extension.
6860 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6861 (grub_iso9660_iso9660_label): Likewise.
6863 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6864 (grub_setup_SOURCES): Add fs/udf.c.
6865 (grub_fstest_SOURCES): Likewise.
6866 (udf_mod_SOURCES): New variable.
6867 (udf_mod_CFLAGS): Likewise.
6868 (udf_mod_LDFLAGS): Likewise.
6870 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6871 (grub_emu_SOURCES): Likewise.
6873 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6875 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6877 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6879 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6881 * fs/udf.c: New file.
6883 2008-02-24 Robert Millan <rmh@aybabtu.com>
6885 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6886 (normal/lexer.c_DEPENDENCIES): New variables.
6887 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6888 (normal/lexer.c_DEPENDENCIES): Likewise.
6889 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6890 (normal/lexer.c_DEPENDENCIES): Likewise.
6891 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6892 (normal/lexer.c_DEPENDENCIES): Likewise.
6893 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6894 (normal/lexer.c_DEPENDENCIES): Likewise.
6895 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6896 (normal/lexer.c_DEPENDENCIES): Likewise.
6898 2008-02-23 Robert Millan <rmh@aybabtu.com>
6900 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6901 since they were intended to be in hex. This didn't break previously
6902 because of a bug in gpt_partition_map_iterate() (see below).
6904 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6905 when checking the validity of GPT header.
6906 Remove `partno', since it always provides the same information as `i'.
6908 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
6910 * include/grub/efi/time.h: Fix a wrong comment.
6912 2008-02-19 Pavel Roskin <proski@gnu.org>
6914 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6917 2008-02-19 Bean <bean123ch@gmail.com>
6919 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6920 (aout_mod_SOURCES): New variable.
6921 (aout_mod_CFLAGS): Likewise.
6922 (aout_mod_LDFLAGS): Likewise.
6923 (_bsd_mod_SOURCES): New variable.
6924 (_bsd_mod_CFLAGS): Likewise.
6925 (_bsd_mod_LDFLAGS): Likewise.
6926 (bsd_mod_SOURCES): New variable.
6927 (bsd_mod_CFLAGS): Likewise.
6928 (bsd_mod_LDFLAGS): Likewise.
6930 * include/grub/aout.h: New file.
6932 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6934 * include/grub/i386/bsd.h: New file.
6936 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6939 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6940 function is called, so that it's possible to change it inside the hook.
6941 (grub_elf64_load): Likewise.
6942 (grub_elf_file): Don't close the file if elf header is not found.
6943 (grub_elf_close): Close the file if grub_elf_file fails (The new
6944 grub_elf_file won't close it).
6945 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6946 (grub_elf64_size): Likewise.
6948 * kern/i386/loader.S (grub_unix_real_boot): New function.
6950 * loader/aout.c: New file.
6952 * loader/i386/bsd.c: New file.
6954 * loader/i386/bsd_normal.c: New file.
6956 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6958 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
6959 can test other formats.
6961 2008-02-19 Robert Millan <rmh@aybabtu.com>
6963 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6964 (grub_gpt_partition_type_empty): Redefine with macro from
6965 `<grub/gpt_partition.h>'.
6966 (gpt_partition_map_iterate): Adjust partition type comparison.
6968 Export `entry' as partmap-specific `part.data' struct.
6969 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6971 * include/grub/gpt_partition.h (grub_gpt_header)
6972 (grub_gpt_partentry): ... to here (new file).
6974 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6976 (grub_gpt_partition_type_bios_boot): New const variable, defined
6977 with macro from `<grub/gpt_partition.h>'.
6979 (setup): Replace `first_start' with `embed_region', which keeps
6980 track of the embed region (and is partmap-agnostic).
6982 Replace find_first_partition_start() with find_usable_region(),
6983 which finds a usable region for embedding using partmap-specific
6984 knowledge (supports PC/MSDOS and GPT).
6986 Fix all assumptions that the embed region start at sector 1, using
6987 `embed_region.start' from now on. Similarly, use `embed_region.end'
6988 rather than `first_start' to calculate available size.
6990 In grub_util_info() message, replace "into after the MBR" with an
6991 indication of the specific sector our embed region starts at.
6993 2008-02-19 Robert Millan <rmh@aybabtu.com>
6995 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6996 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6997 `commands/reboot.c'.
6998 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6999 (halt_mod_SOURCES): Likewise.
7000 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7001 (halt_mod_SOURCES): Likewise.
7003 2008-02-17 Christian Franke <franke@computer.org>
7005 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7007 2008-02-17 Robert Millan <rmh@aybabtu.com>
7009 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7010 set `first_start' to 0 for non-PC/MSDOS partition maps.
7012 2008-02-16 Robert Millan <rmh@aybabtu.com>
7014 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7015 do not assume partition map is PC/MSDOS before performing checks that
7016 are specific to that layout.
7018 2008-02-13 Robert Millan <rmh@aybabtu.com>
7020 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7021 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7022 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7024 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
7026 * configure.ac: Only a cosmetic change on the handling of
7027 -fno-stack-protector.
7029 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
7031 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7032 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7034 (grub_install_SOURCES): Add halt.mod and reboot.mod.
7035 (halt_mod_SOURCES): New variable.
7036 (halt_mod_CFLAGS): Likewise.
7037 (halt_mod_LDFLAGS): Likewise.
7038 (reboot_mod_SOURCES): Likewise.
7039 (reboot_mod_CFLAGS): Likewise.
7040 (reboot_mod_LDFLAGS): Likewise.
7042 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7043 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7045 (halt_mod_SOURCES): Likewise.
7046 (reboot_mod_SOURCES): Likewise.
7048 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7049 commands/i386/pc/reboot.c by commands/reboot.c.
7050 (reboot_mod_SOURCES): Likewise.
7052 * commands/i386/pc/reboot.c: merge this file ...
7054 * commands/ieee1275/reboot.c: ... and this file ...
7056 * commands/reboot.c: ... to this file.
7057 Add some precompiler directive to include the correct header for
7060 * commands/ieee1275/halt.c: move this file ...
7062 * commands/halt.c: ... to here.
7063 Add some precompiler directive to include the correct header for
7066 * include/grub/efi/efi.h (grub_reboot): New function declaration.
7067 (grub_halt): Likewise.
7069 * kern/efi/efi.c (grub_reboot): New function.
7070 (grub_halt): Likewise.
7072 2008-02-12 Robert Millan <rmh@aybabtu.com>
7074 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7075 /dev (like it is done for /dev/mapper). This doesn't provide support
7076 for EVMS, but at least it is now easy to identify the problem when it
7079 2008-02-11 Robert Millan <rmh@aybabtu.com>
7081 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7082 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7083 comparing it with -1, not 0.
7085 2008-02-10 Robert Millan <rmh@aybabtu.com>
7087 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7089 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7090 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7092 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7093 `disk/lvm.c' to the end of the list.
7094 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7095 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7097 2008-02-10 Robert Millan <rmh@aybabtu.com>
7099 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
7100 grub_print_error() instead. This will let user know why we're entering
7102 Based on suggestions from Sam Morris.
7104 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
7106 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7107 on remaining N args, instead of "--" arg N times.
7109 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
7111 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7112 (fill_with_default_glyph): Changed to use unknown_glyph for fill
7113 pattern for unknown glyphs.
7115 2008-02-09 Robert Millan <rmh@aybabtu.com>
7117 * configure.ac: Probe for `help2man'.
7118 * Makefile.in (builddir): New variable.
7119 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
7120 or otherwise add a few flags/options to it.
7121 (install-local): For every executable utility or script that is
7122 installed, invoke $(HELP2MAN) to install a manpage based on --help
7125 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7126 that it doesn't prevent --help from working in build tree.
7128 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7129 with `bug-grub@gnu.org'.
7130 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7131 * util/update-grub.in (usage): New function.
7132 Implement proper argument check, with support for --help and --version
7133 (as well as existing -y).
7135 2008-02-09 Christian Franke <franke@computer.org>
7137 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7138 avoid overwriting previous output.
7139 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7141 2008-02-09 Robert Millan <rmh@aybabtu.com>
7143 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7146 2008-02-09 Robert Millan <rmh@aybabtu.com>
7148 * commands/sleep.c: New file.
7149 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7150 (sleep_mod_SOURCES): New variable.
7151 (sleep_mod_CFLAGS): Likewise.
7152 (sleep_mod_LDFLAGS): Likewise.
7154 2008-02-09 Robert Millan <rmh@aybabtu.com>
7156 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7157 situations in which we can deduce the RAID size and the superblock
7160 2008-02-09 Robert Millan <rmh@aybabtu.com>
7162 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7163 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7164 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7166 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7167 and return a grub_diskmemberlist_t composed of physical array members.
7168 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7170 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7172 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7173 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7174 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7176 * util/grub-probe.c (probe): Move partmap probing code from here ...
7177 (probe_partmap): ... to here.
7178 (probe): Use probe_partmap() once for the disk we're probing, and
7179 additionally, when such disk contains a memberlist() struct member,
7180 once for each disk that is contained in the structure returned by
7183 2008-02-09 Robert Millan <rmh@aybabtu.com>
7185 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7186 environment variable to 'all' in order to obtain debug output from
7188 * util/i386/pc/grub-setup.c (main): Likewise.
7190 2008-02-08 Robert Millan <rmh@aybabtu.com>
7192 * disk/raid.c (grub_raid_scan_device): Check for
7193 `array->device[sb.this_disk.number]' rather than for
7194 `array->device[sb.this_disk.number]->name', since the latter is not
7195 guaranteed to be accessible.
7197 2008-02-08 Robert Millan <rmh@aybabtu.com>
7199 * disk/raid.c: Update copyright.
7200 * fs/cpio.c: Likewise.
7201 * include/grub/raid.h: Likewise.
7202 * loader/i386/pc/multiboot.c: Likewise.
7203 * util/hostfs.c: Likewise.
7205 2008-02-08 Robert Millan <rmh@aybabtu.com>
7207 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7208 to a grub_disk_t array.
7209 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7211 (grub_raid_scan_device): Replace `device[x].name' accesses with
7212 `device[x]->name'. Simplify initialization of `array->device[x]'.
7214 2008-02-08 Robert Millan <rmh@aybabtu.com>
7216 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7217 grub_dprintf() calls.
7218 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7221 2008-02-07 Christian Franke <franke@computer.org>
7223 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7224 instead of fseek and ftell to support large files.
7225 (grub_hostfs_read): Likewise.
7227 2008-02-07 Robert Millan <rmh@aybabtu.com>
7229 Patch from Jeroen Dekkers.
7230 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7231 failure, since successfully reading all array members might not be
7234 2008-02-06 Robert Millan <rmh@aybabtu.com>
7236 * util/grub-probe.c (probe): Simplify partmap probing (with the
7237 assumption that the first word up to the underscore equals to
7240 2008-02-06 Christian Franke <franke@computer.org>
7242 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7243 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7244 last block of a cpio or tar stream.
7245 Check for "TRAILER!!!" instead of any empty data
7246 block to detect last block of a cpio stream.
7247 (grub_cpio_dir): Fix constness of variable np.
7248 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7249 cpio or tar trailer is detected. This fixes a crash
7250 on open of a non existing file.
7252 2008-02-05 Bean <bean123ch@gmail.com>
7254 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7256 (grub_multiboot_load_elf64): Likewise.
7257 (grub_multiboot): Initialize mbi structure.
7259 * util/grub-fstest.c: Don't include unused header file script.h.
7261 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7263 (grub_fstest_SOURCES): Likewise.
7265 2008-02-05 Robert Millan <rmh@aybabtu.com>
7267 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7268 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7269 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7270 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7272 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7273 (translation_table): Replace hardcoded values with macros
7274 provided by `<grub/term.h>'.
7276 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7277 (keyboard_map): Correct/add a few values, with macros provided
7279 (keyboard_map_shift): Zero values that don't differ from their
7280 `keyboard_map' equivalents.
7281 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7282 Discard the second scan code that is always sent by Caps lock.
7283 Only use `keyboard_map_shift' when it provides a non-zero value,
7284 otherwise fallback to `keyboard_map'.
7286 2008-02-04 Bean <bean123ch@gmail.com>
7288 * Makefile.in (enable_grub_fstest): New variable.
7290 * conf/common.rmk (grub_fstest_init.lst): New rule.
7291 (grub_fstest_init.h): Likewise.
7292 (grub_fstest_init.c): Likewise.
7293 (util/grub-fstest.c_DEPENDENCIES): New variable.
7294 (grub_fstest_SOURCES): Likewise.
7296 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7298 * util/grub-fstest.c: New file.
7300 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7302 Make grub-setup handle a separate root device.
7304 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7305 so that the root device can be compared with the destination
7307 When embedding the core image, if the root and destination devices
7308 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7310 When not embedding, set ROOT_DRIVE to 0xFF.
7312 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7314 Add support for having a grub directory in a different drive. This
7315 is still only the data handling part.
7317 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7318 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7319 (grub_root_drive): New variable.
7321 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7322 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7323 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7326 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7328 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7330 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7332 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7333 is bogus, because PXE booting does not specify any drive
7336 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7337 am not sure if this is really correct.
7339 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7340 is always identical to the boot drive when booting from a CD.
7342 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7344 (root_drive): New variable.
7345 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7346 (setup_sectors): Push %dx right after popping it, because %dh will
7348 (copy_buffer): Restore %dx.
7350 2008-02-03 Robert Millan <rmh@aybabtu.com>
7352 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7353 use `cdboot.img' for cdrom images.
7355 2008-02-03 Robert Millan <rmh@aybabtu.com>
7357 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7358 only setup gfxterm when `font' command has succeeded.
7360 2008-02-03 Robert Millan <rmh@aybabtu.com>
7362 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7363 (grub_rescue_cmd_multiboot_loader)
7364 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7366 2008-02-03 Pavel Roskin <proski@gnu.org>
7368 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7369 %edx and %esi from stack only after grub_gate_a20() is called.
7370 grub_gate_a20() clobbers %edx.
7372 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7374 * configure.ac (AC_INIT): Bumped to 1.96.
7376 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7377 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7378 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7379 video/readers/png.c.
7381 2008-02-03 Bean <bean123ch@gmail.com>
7383 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7384 (cdboot_img_SOURCES): New variable.
7385 (cdboot_img_ASFLAGS): New variable.
7386 (cdboot_img_LDFLAGS): New variable.
7388 * boot/i386/pc/cdboot.S: New file.
7390 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7391 (cd_count): Likewise.
7392 (grub_biosdisk_get_drive): Add support for cd device.
7393 (grub_biosdisk_call_hook): Likewise.
7394 (grub_biosdisk_iterate): Likewise.
7395 (grub_biosdisk_open): Likewise.
7396 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7397 (grub_biosdisk_rw): Support reading from cd device.
7398 (GRUB_MOD_INIT): Iterate cd devices.
7400 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7401 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7402 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7404 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7406 2008-02-02 Robert Millan <rmh@aybabtu.com>
7408 * commands/read.c: New file.
7409 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7410 (read_mod_SOURCES): New variable.
7411 (read_mod_CFLAGS): Likewise.
7412 (read_mod_LDFLAGS): Likewise.
7414 2008-02-02 Robert Millan <rmh@aybabtu.com>
7416 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7417 determining whether menu has to be displayed.
7419 2008-02-02 Marco Gerards <marco@gnu.org>
7421 * bus/pci.c: New file.
7423 * include/grub/pci.h: Likewise.
7425 * include/grub/i386/pc/pci.h: Likewise.
7427 * commands/lspci.c: Likewise.
7429 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7431 (pci_mod_SOURCES): New variable.
7432 (pci_mod_CFLAGS): Likewise.
7433 (pci_mod_LDFLAGS): Likewise.
7434 (lspci_mod_SOURCES): Likewise.
7435 (lspci_mod_CFLAGS): Likewise.
7436 (lspci_mod_LDFLAGS): Likewise.
7438 2008-02-02 Bean <bean123ch@gmail.com>
7440 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7441 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7443 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7444 (grub_xfs_btree_node): New structure.
7445 (grub_xfs_btree_root): New structure.
7446 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7447 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7448 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7449 (GRUB_XFS_EXTENT_SIZE): Likewise.
7450 (grub_xfs_read_block): Support btree format type.
7451 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7452 Use directory block as basic unit.
7454 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7456 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7457 __attribute__ ((__regparm__ (1))).
7459 2008-02-01 Robert Millan <rmh@aybabtu.com>
7461 Correct a mistake in previous commit.
7463 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7465 (normal/command.c_DEPENDENCIES): New variable.
7467 2008-02-01 Robert Millan <rmh@aybabtu.com>
7469 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7471 (normal/command.c_DEPENDENCIES): New variable.
7472 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7473 * conf/i386-ieee1275.rmk: Likewise.
7474 * conf/i386-linuxbios.rmk: Likewise.
7475 * conf/i386-pc.rmk: Likewise.
7476 * conf/sparc64-ieee1275.rmk: Likewise.
7477 * conf/powerpc-ieee1275.rmk: Likewise.
7478 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7480 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7482 2008-02-01 Robert Millan <rmh@aybabtu.com>
7484 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7485 call at beginning of function.
7487 2008-01-31 Pavel Roskin <proski@gnu.org>
7489 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7490 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7491 (grub_mkrescue_SOURCES): Likewise.
7492 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7494 2008-01-30 Robert Millan <rmh@aybabtu.com>
7496 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7497 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7498 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7499 (grub_probe_SOURCES): ... to here.
7501 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7502 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7503 * conf/i386-ieee1275.rmk: Likewise.
7504 * conf/i386-linuxbios.rmk: Likewise.
7505 * conf/powerpc-ieee1275.rmk: Likewise.
7507 2008-01-30 Tristan Gingold <gingold@free.fr>
7509 * kern/rescue.c: Silently accept empty lines.
7511 2008-01-29 Bean <bean123ch@gmail.com>
7513 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7514 (real_code_2): Code cleanup and change comment style.
7515 (move_memory): Avoid using 32-bit address mode.
7517 2008-01-29 Bean <bean123ch@gmail.com>
7519 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7520 (png_mod_SOURCES): New variable.
7521 (png_mod_CFLAGS): Likewise.
7522 (png_mod_LDFLAGS): Likewise.
7524 * video/readers/png.c: New file.
7526 2008-01-28 Robert Millan <rmh@aybabtu.com>
7528 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7529 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7530 `ifndef GRUB_MOD_GAP' hack.
7531 * util/elf/grub-mkimage.c (add_segments): Likewise.
7533 2008-01-27 Robert Millan <rmh@aybabtu.com>
7535 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7536 `GRUB_MOD_GAP' for platforms in which it's not defined.
7537 * util/elf/grub-mkimage.c (add_segments): Likewise.
7539 2008-01-27 Robert Millan <rmh@aybabtu.com>
7541 Get grub-emu to build again (including parallel builds).
7543 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7545 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7546 (normal/execute.c_DEPENDENCIES): ... this, ...
7547 (grub-emu_DEPENDENCIES): ... and this.
7549 * conf/i386-efi.rmk: Likewise.
7550 * conf/i386-linuxbios.rmk: Likewise.
7551 * conf/i386-ieee1275.rmk: Likewise.
7552 * conf/powerpc-ieee1275.rmk: Likewise.
7553 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7555 2008-01-27 Robert Millan <rmh@aybabtu.com>
7557 * NEWS: Add a few items.
7559 2008-01-27 Robert Millan <rmh@aybabtu.com>
7561 Fix parallel builds with grub-emu. Based on earlier commit for
7562 grub-probe and grub-setup.
7564 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7565 (util/grub-emu.c_DEPENDENCIES): ... this.
7566 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7567 (util/grub-emu.c_DEPENDENCIES): ... this.
7568 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7569 (util/grub-emu.c_DEPENDENCIES): ... this.
7570 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7571 (util/grub-emu.c_DEPENDENCIES): ... this.
7572 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7573 (util/grub-emu.c_DEPENDENCIES): ... this.
7575 2008-01-27 Pavel Roskin <proski@gnu.org>
7577 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7578 to create a gap between _end and the modules added to the image
7579 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7580 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7581 * util/elf/grub-mkimage.c (add_segments): Likewise.
7583 2008-01-26 Pavel Roskin <proski@gnu.org>
7585 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7586 just return an error.
7588 2008-01-26 Bean <bean123ch@gmail.com>
7590 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7591 (grub_reiserfs_get_item): Save offset of the next item.
7592 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7594 2008-01-25 Robert Millan <rmh@aybabtu.com>
7596 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7597 make all filesystem sources appear together (possibly fixing omissions
7599 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7600 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7601 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7602 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7604 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7606 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7607 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7608 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7609 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7611 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7612 (probe): Add a sanity check to make sure of our ability to read
7613 requested files when probing for filesystem type.
7615 * genmk.rb: Update copyright year (2007).
7617 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7618 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7619 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7620 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7621 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7622 : Remove function prototypes.
7624 2008-01-25 Robert Millan <rmh@aybabtu.com>
7626 Revert my previous commits (based on wrong assumption of how grub_errno
7629 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7630 * kern/file.c (grub_file_open): Likewise.
7632 2008-01-24 Pavel Roskin <proski@gnu.org>
7634 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7635 that hang if GRUB tries to setup colors.
7636 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7637 colors for firmwares that don't support it.
7638 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7639 Recognize Open Hack'Ware, set flags to work around its
7642 2008-01-24 Robert Millan <rmh@aybabtu.com>
7644 * kern/file.c (grub_file_open): Do not account previous failures of
7645 unrelated functions when grub_errno is checked for.
7646 Reported by Oleg Strikov.
7648 2008-01-24 Bean <bean123ch@gmail.com>
7650 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7651 (grub_ufs_sblock): New member volume name.
7652 (grub_ufs_find_file): Fix string copy bug.
7653 (grub_ufs_label): Implement this function properly.
7655 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7656 (grub_hfs_iterate_records): Use the correct file number for extents
7657 and catalog file. Fix problem in next index calculation.
7658 (grub_hfs_find_node): Replace recursive function call with loop.
7659 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7661 2008-01-23 Robert Millan <rmh@aybabtu.com>
7663 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7664 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7665 (grub_multiboot2_real_boot): New function prototype.
7667 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7668 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7670 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7671 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7673 2008-01-23 Robert Millan <rmh@aybabtu.com>
7675 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7676 #ifdef'ed out grub_printf().
7678 2008-01-23 Robert Millan <rmh@aybabtu.com>
7680 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7681 grub_dprintf calls, since they make "debug=all" mode unusable.
7682 (grub_console_checkkey): Likewise.
7684 2008-01-23 Robert Millan <rmh@aybabtu.com>
7686 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7687 `term/i386/pc/at_keyboard.c'.
7688 (pkglib_MODULES): Add `serial.mod'.
7689 (serial_mod_SOURCES): New variable.
7690 (serial_mod_CFLAGS): Likewise.
7691 (serial_mod_LDFLAGS): Likewise.
7693 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7694 `<grub/powerpc/ieee1275/console.h>'.
7695 (grub_keyboard_controller_init): New function prototype.
7696 (grub_console_checkkey): Likewise.
7697 (grub_console_getkey): Likewise.
7699 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7702 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7703 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7705 2008-01-23 Robert Millan <rmh@aybabtu.com>
7707 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7708 present, "(memdisk)/boot/grub" becomes the default prefix.
7710 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7711 a memdisk tarball with all the modules. Add --overlay=DIR option that
7712 allows users to overlay additional files into the image.
7714 2008-01-23 Robert Millan <rmh@aybabtu.com>
7716 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7717 and `machine/memory.h'.
7718 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7719 (_multiboot_mod_SOURCES): New variable.
7720 (_multiboot_mod_CFLAGS): Likewise.
7721 (_multiboot_mod_LDFLAGS): Likewise.
7722 (multiboot_mod_SOURCES): Likewise.
7723 (multiboot_mod_CFLAGS): Likewise.
7724 (multiboot_mod_LDFLAGS): Likewise.
7726 * include/grub/i386/ieee1275/loader.h: New file.
7728 * include/grub/i386/ieee1275/machine.h: Likewise.
7730 * include/grub/i386/ieee1275/memory.h: Likewise.
7732 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7733 variable declaration.
7734 (grub_os_area_size): Likewise.
7736 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7737 (grub_lower_mem, grub_upper_mem): New variables.
7738 (grub_stop_floppy): New function (just to make
7739 grub_multiboot2_real_boot() happy).
7741 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7742 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7743 (grub_stop): New function.
7744 Include `"../realmode.S"' and `"../loader.S"'.
7746 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7747 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7749 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7750 rely on grub_multiboot2_real_boot() for final boot.
7752 2008-01-22 Robert Millan <rmh@aybabtu.com>
7754 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7755 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7756 device that doesn't look like an SD card.
7757 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7758 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7759 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7760 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7763 2008-01-22 Robert Millan <rmh@aybabtu.com>
7765 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7766 avoid claiming over our own code.
7768 2008-01-22 Bean <bean123ch@gmail.com>
7770 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7771 (jpeg_mod_SOURCES): New variable.
7772 (jpeg_mod_CFLAGS): Likewise.
7773 (jpeg_mod_LDFLAGS): Likewise.
7775 * video/readers/jpeg.c : New file.
7777 2008-01-22 Bean <bean123ch@gmail.com>
7779 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7780 there are no more items.
7782 2008-01-21 Robert Millan <rmh@aybabtu.com>
7784 * kern/mm.c (grub_mm_init_region): Improve debug message.
7786 2008-01-21 Robert Millan <rmh@aybabtu.com>
7788 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7789 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7791 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7793 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7794 Indicates start of upper memory.
7795 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7796 (generate_image): Abort when image size is big enough to corrupt
7799 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7800 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7801 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7802 instead of hardcoding 0xA0000.
7803 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7804 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7805 instead of hardcoding 0xA0000.
7807 2008-01-21 Robert Millan <rmh@aybabtu.com>
7809 * disk/memdisk.c (memdisk_size): New variable.
7810 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7812 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7813 image to dynamic memory.
7814 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7815 `memdisk_size'. Free memdisk block.
7817 2008-01-21 Robert Millan <rmh@aybabtu.com>
7819 Fix detection of very small filesystems (like tar).
7821 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7822 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7823 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7824 a problem with this disk).
7826 2008-01-21 Robert Millan <rmh@aybabtu.com>
7828 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7829 on grub_biosdisk_rw_standard() error.
7831 2008-01-21 Robert Millan <rmh@aybabtu.com>
7833 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7835 * kern/elf.c: Likewise.
7836 * kern/ieee1275/ieee1275.c: Likewise.
7837 * kern/powerpc/ieee1275/openfw.c: Likewise.
7838 * term/ieee1275/ofconsole.c: Likewise.
7840 2008-01-21 Robert Millan <rmh@aybabtu.com>
7842 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7844 * include/grub/kernel.h (grub_arch_memdisk_addr)
7845 (grub_arch_memdisk_size): Moved from here ...
7847 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7848 (grub_arch_memdisk_size): ... to here.
7850 2008-01-21 Robert Millan <rmh@aybabtu.com>
7852 Mostly based on bugfix from Bean.
7854 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7855 attribute with hook() parameter.
7856 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7858 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7859 attribute with hook() parameter.
7860 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7863 2008-01-21 Robert Millan <rmh@aybabtu.com>
7865 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7866 (pkglib_MODULES): Add `memdisk.mod'.
7867 (memdisk_mod_SOURCES): New variable.
7868 (memdisk_mod_CFLAGS): Likewise.
7869 (memdisk_mod_LDFLAGS): Likewise.
7871 * disk/memdisk.c: New file.
7873 * include/grub/disk.h (grub_disk_dev_id): Add
7874 `GRUB_DISK_DEVICE_MEMDISK_ID'.
7876 * include/grub/i386/pc/kernel.h
7877 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7878 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7879 (grub_kernel_image_size): New variable declaration.
7880 (grub_total_module_size): Likewise.
7881 (grub_memdisk_image_size): Likewise.
7883 * include/grub/i386/pc/memory.h
7884 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7886 * include/grub/kernel.h: Include `<grub/symbol.h>'.
7887 (grub_arch_memdisk_addr): New variable declaration.
7888 (grub_arch_memdisk_size): Likewise.
7890 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7891 (grub_arch_memdisk_size): Likewise.
7893 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7894 (codestart): Replace hardcoded `0x100000' with
7895 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7897 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7898 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
7899 not NULL, append the contents of the file it refers to, at the end of
7900 the compressed kernel image. Initialize `grub_memdisk_image_size'
7901 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7902 (options): Add "memdisk"|'m' option.
7903 (main): Parse --memdisk|-m option, and pass user-provided path as
7904 parameter to generate_image().
7906 2008-01-20 Robert Millan <rmh@aybabtu.com>
7908 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7909 grub_dprintf() calls from here ...
7910 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7912 2008-01-20 Robert Millan <rmh@aybabtu.com>
7914 Fix detection of "real mode" when /options/real-mode? doesn't exist.
7916 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7918 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7919 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7920 `GRUB_IEEE1275_FLAG_REAL_MODE'.
7921 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
7923 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7924 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7926 2008-01-19 Robert Millan <rmh@aybabtu.com>
7928 Get rid of confusing function (superseded by
7929 `grub_ieee1275_get_integer_property')
7930 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7932 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7934 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7935 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
7936 in native endianness from grub_ieee1275_get_integer_property().
7938 2008-01-19 Robert Millan <rmh@aybabtu.com>
7940 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7941 command after "shut-down", since implementations differ on which
7942 the command for halt is.
7944 2008-01-19 Robert Millan <rmh@aybabtu.com>
7946 * include/grub/i386/linuxbios/console.h: Add header protection.
7947 (grub_keyboard_controller_init): New function prototype.
7948 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7949 (KEYBOARD_COMMAND_READ): Likewise.
7950 (KEYBOARD_COMMAND_WRITE): Likewise.
7951 (KEYBOARD_SCANCODE_SET1): Likewise.
7952 (grub_keyboard_controller_write): New function.
7953 (grub_keyboard_controller_read): Likewise.
7954 (grub_keyboard_controller_init): Likewise.
7956 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7957 (grub_console_init): On coreboot/LinuxBIOS, call
7958 grub_keyboard_controller_init().
7960 2008-01-19 Robert Millan <rmh@aybabtu.com>
7962 PowerPC changes provided by Pavel Roskin.
7964 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7965 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7966 don't rely on cmain() doing it.
7967 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7968 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7970 2008-01-16 Robert Millan <rmh@aybabtu.com>
7972 * include/grub/i386/linuxbios/memory.h
7973 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7974 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7975 receive `table_header' as argument. Instead, probe for it in the
7976 known memory ranges where it can be present.
7977 (grub_available_iterate): Do not pass a fixed `table_header' address
7978 to grub_linuxbios_table_iterate().
7980 2008-01-15 Robert Millan <rmh@aybabtu.com>
7982 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7983 * conf/i386-ieee1275.rmk: New file.
7984 * include/grub/i386/ieee1275/console.h: Likewise.
7985 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7986 * include/grub/i386/ieee1275/kernel.h: Likewise.
7987 * include/grub/i386/ieee1275/time.h: Likewise.
7988 * kern/i386/ieee1275/init.c: Likewise.
7989 * kern/i386/ieee1275/startup.S: Likewise.
7991 2008-01-15 Robert Millan <rmh@aybabtu.com>
7993 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7994 when pointers are 32-bit (but still do set it to one when they are
7997 2008-01-15 Robert Millan <rmh@aybabtu.com>
7999 * include/grub/ieee1275/ieee1275.h
8000 (grub_ieee1275_get_integer_property): New function prototype.
8002 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8003 (grub_ieee1275_get_integer_property): New function. Wraps around
8004 grub_ieee1275_get_property() to handle endianness.
8006 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8007 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8009 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8010 (grub_map): Likewise.
8011 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8013 2008-01-15 Bean <bean123ch@gmail.com>
8015 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8016 (grub_script_execute_cmdline): Reset grub_errno.
8018 * normal/main.c (read_config_file): Reset grub_errno.
8020 * normal/parse.y (script_init): New.
8021 (script): Move function and menuentry here.
8023 (command): Add delimiter at the end of command.
8024 (commands): Adjust to match the new command.
8025 (commandblock): Remove grub_script_lexer_record_start.
8026 (menuentry): Add grub_script_lexer_record_start, use the new commands.
8027 (if): Use the new commands.
8029 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8031 2008-01-15 Robert Millan <rmh@aybabtu.com>
8033 * normal/menu.c (run_menu): Move timeout message from here ...
8034 (print_timeout): ... to here.
8035 (run_menu): Use print_timeout() once during initial draw to print
8036 the whole message, and again in every clock tick to update only
8037 the number of seconds.
8039 2008-01-15 Robert Millan <rmh@aybabtu.com>
8041 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8042 actual size of `available' from grub_ieee1275_get_property(), and
8043 restrict parsing to that bound.
8045 2008-01-15 Christian Franke <franke@computer.org>
8047 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8048 (argp_program_version): Remove variable.
8049 (argp_program_bug_address): Likewise.
8050 (options): Convert from struct argp_option to struct option.
8051 (struct arguments): Remove.
8052 (parse_opt): Remove.
8053 (usage): New function.
8054 (main): Replace struct args members by simple variables.
8055 Replace argp_parse() by getopt_long().
8056 Add switch to evaluate options.
8057 Add missing "(...)" around root_dev in prefix string.
8059 2008-01-14 Robert Millan <rmh@aybabtu.com>
8061 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8062 for grub_ieee1275_exit(), in order to improve portability.
8064 2008-01-14 Robert Millan <rmh@aybabtu.com>
8066 * util/grub.d/10_linux.in (prefix): Define.
8067 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
8069 2008-01-13 Pavel Roskin <proski@gnu.org>
8071 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8072 grub_errno if no errors have been detected.
8074 2008-01-12 Robert Millan <rmh@aybabtu.com>
8076 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8077 (grub_util_get_dev_abstraction): New function prototype.
8079 * util/getroot.c: Include `<grub/util/getroot.h>'
8080 (grub_util_get_grub_dev): Move detection of abstraction type to ...
8081 (grub_util_get_dev_abstraction): ... here (new function).
8083 * util/grub-probe.c: Convert PRINT_* to an enum. Add
8084 `PRINT_ABSTRACTION'.
8085 (probe): Probe for abstraction type when requested.
8086 (main): Understand `--target=abstraction'.
8088 * util/i386/efi/grub-install.in: Add abstraction module to core
8089 image when it is found to be necessary.
8090 * util/i386/pc/grub-install.in: Likewise.
8091 * util/powerpc/ieee1275/grub-install.in: Likewise.
8093 * util/update-grub_lib.in (font_path): Return system path without
8094 converting to GRUB path.
8095 * util/update-grub.in: Convert system path returned by font_path()
8096 to a GRUB path. Use `grub-probe -t abstraction' to determine what
8097 abstraction module is needed for loading fonts (if any). Export
8098 that as `GRUB_PRELOAD_MODULES'.
8099 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8102 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
8104 Remove some unused code from reiserfs.
8106 * fs/reiserfs.c (struct grub_reiserfs_key)
8107 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8108 (struct grub_reiserfs_node_body): Removed.
8109 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8111 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8113 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8115 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8117 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8119 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8121 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8122 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8123 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8125 2008-01-10 Robert Millan <rmh@aybabtu.com>
8127 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8128 Determines if a file is garbage left by packaging systems, etc.
8129 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8130 for processing /etc/grub.d scripts.
8131 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8132 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
8133 as a condition for processing Linux images.
8135 2008-01-10 Pavel Roskin <proski@gnu.org>
8137 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
8138 to compile reiserfs.c on PowerPC.
8140 2008-01-10 Robert Millan <rmh@aybabtu.com>
8142 * kern/device.c (grub_device_iterate): Do not abort device iteration
8143 when one of the devices cannot be opened.
8144 * kern/disk.c (grub_disk_open): Do not account previous failures of
8145 unrelated functions when grub_errno is checked for.
8147 2008-01-08 Robert Millan <rmh@aybabtu.com>
8149 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8150 `! grub_linux_is_bzimage', change order of address comparison to make
8151 it more intuitive, and improve "too big zImage" error message.
8153 2008-01-08 Robert Millan <rmh@aybabtu.com>
8155 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8156 `$(update-grub_DATA)'.
8157 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8160 2008-01-07 Robert Millan <rmh@aybabtu.com>
8162 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8163 which instruction is modified by grub-setup during installation
8164 (since it wasn't obvious by only looking at this file).
8166 2008-01-07 Robert Millan <rmh@aybabtu.com>
8168 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8169 listing actual TODO items.
8171 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8173 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8175 (grub_reiserfs_get_key_offset): Likewise.
8176 (grub_reiserfs_set_key_offset): Likewise.
8177 (grub_reiserfs_set_key_type): Likewise.
8178 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8180 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8181 better to remove the bitfield version completely.
8183 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8185 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8186 allocated from the heap, due to the fshelp implementation.
8187 (grub_reiserfs_dir): Free NODE, due to the same reason.
8189 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8191 Mostly from Vincent Pelletier:
8193 * fs/reiserfs.c: New file.
8195 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8196 (reiserfs_mod_SOURCES): New variable.
8197 (reiserfs_mod_CFLAGS): Likewise.
8198 (reiserfs_mod_LDFLAGS): Likewise.
8200 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8201 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8202 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8205 2008-01-06 Robert Millan <rmh@aybabtu.com>
8207 * normal/color.c: Remove `<grub/env.h>'.
8209 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8211 * include/grub/normal.h: Include <grub/env.h>.
8213 2008-01-05 Robert Millan <rmh@aybabtu.com>
8215 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8216 usage example with `(hd0,1)'.
8217 Reported by Samuel Thibault.
8219 2008-01-05 Robert Millan <rmh@aybabtu.com>
8221 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8222 (grub_linux_boot_zimage): Rename to ...
8223 (grub_linux_boot): ... this.
8224 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8225 (grub_linux_boot_zimage): Conditionalize zImage copy.
8227 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8228 (grub_linux_boot_bzimage): Remove prototype.
8229 (grub_linux_boot_zimage): Rename to ...
8230 (grub_linux_boot): ... this.
8232 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8233 (grub_linux_boot): Remove function.
8235 2008-01-05 Robert Millan <rmh@aybabtu.com>
8237 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8238 (grub_env_write_color_highlight): Likewise.
8239 (grub_wait_after_message): Likewise.
8241 * normal/color.c: New file.
8243 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8244 (normal_mod_DEPENDENCIES): Likewise.
8246 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8247 (normal_mod_DEPENDENCIES): Likewise.
8249 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8250 (normal_mod_DEPENDENCIES): Likewise.
8252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8253 (normal_mod_DEPENDENCIES): Likewise.
8255 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8256 for waiting after a message is printed.
8257 * normal/main.c (read_config_file): Likewise.
8258 (grub_normal_init): Register grub_env_write_color_normal() and
8259 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8260 `color_highlight' variables as global.
8262 * normal/menu.c (grub_wait_after_message): New function.
8263 (grub_color_menu_normal): New variable. Replaces ...
8264 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8265 (grub_color_menu_highlight): New variable. Replaces ...
8266 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8267 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8268 `GRUB_TERM_COLOR_STANDARD'.
8269 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8270 `normal_code' and `highlight_code' to `old_color_normal' and
8271 `old_color_highlight', respectively.
8272 (grub_menu_init_page): Update colors when drawing the menu, based on
8273 `menu_color_normal' and `menu_color_highlight' variables.
8274 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8275 a message is printed.
8277 2008-01-05 Robert Millan <rmh@aybabtu.com>
8279 * kern/env.c (grub_env_context_open): Propagate hooks for global
8280 variables to new context.
8282 * kern/main.c (grub_set_root_dev): Export `root' variable.
8284 2008-01-05 Robert Millan <rmh@aybabtu.com>
8286 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8287 discs unconditionally, since udev and others have options to provide
8290 2008-01-05 Robert Millan <rmh@aybabtu.com>
8292 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8294 2008-01-04 Christian Franke <franke@computer.org>
8296 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8299 2008-01-03 Pavel Roskin <proski@gnu.org>
8301 * kern/i386/linuxbios/init.c: Put "void" to all function
8302 declarations with no arguments.
8303 * kern/powerpc/ieee1275/init.c: Likewise.
8304 * term/i386/pc/at_keyboard.c: Likewise.
8305 * term/i386/pc/vga_text.c: Likewise.
8306 * util/grub-mkdevicemap.c: Likewise.
8308 2008-01-02 Robert Millan <rmh@aybabtu.com>
8310 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8311 message when loaded image is out of bounds.
8312 (grub_multiboot_load_elf64): Likewise.
8314 2008-01-02 Pavel Roskin <proski@gnu.org>
8316 * util/grub.d/10_linux.in: Try version without ".old" when
8317 looking for initrd. It's better to use initrd from the newer
8318 kernel of the same version than no initrd at all.
8320 2008-01-01 Robert Millan <rmh@aybabtu.com>
8322 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8324 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8326 * include/grub/video.h: Added grub_video_unmap_color and
8327 grub_video_get_active_render_target.
8328 (grub_video_adapter): Added unmap_color and get_active_render_target.
8330 * video/video.c: Added grub_video_unmap_color and
8331 grub_video_get_active_render_target.
8332 (grub_video_get_info): Changed method to accept NULL pointer as an
8333 argument to allow detection of active video adapter.
8335 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8336 grub_video_vbe_unmap_color_int.
8337 Added grub_video_vbe_unmap_color and
8338 grub_video_vbe_get_active_render_target.
8339 (grub_video_vbe_adapter): Added unmap_color and
8340 get_active_render_target.
8342 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8343 with grub_video_vbe_unmap_color_int.
8345 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8346 (DEFAULT_NORMAL_COLOR): Likewise.
8347 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8348 (DEFAULT_FG_COLOR): Removed.
8349 (DEFAULT_BG_COLOR): Likewise.
8350 (DEFAULT_CURSOR_COLOR): Changed value.
8351 (grub_virtual_screen): Added standard_color_setting,
8352 normal_color_setting, highlight_color_setting and term_color.
8353 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8354 (bitmap_width): Added.
8355 (bitmap_height): Likewise.
8357 (set_term_color): Likewise.
8358 (grub_virtual_screen_setup): Changed to use new terminal coloring
8360 (grub_gfxterm_init): Added init for bitmap.
8361 (grub_gfxterm_fini): Added destroy for bitmap.
8362 (redraw_screen_rect): Updated to use background bitmap and new
8364 (scroll_up): Added optimization for case when there is no bitmap.
8365 (grub_gfxterm_cls): Fixed to use correct background color.
8366 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8368 (grub_virtual_screen_setcolor): Likewise.
8369 (grub_virtual_screen_getcolor): Added.
8370 (grub_gfxterm_background_image_cmd): Likewise.
8371 (grub_video_term): Added setcolor and getcolor.
8372 (MOD_INIT): Added registration of background_image command.
8373 (MOD_TERM): Added unregistration for background_image command.
8375 2007-12-30 Pavel Roskin <proski@gnu.org>
8377 * loader/multiboot_loader.c: Fix multiboot command
8378 unregistration. Fix all typos in the word "multiboot".
8380 2007-12-29 Pavel Roskin <proski@gnu.org>
8382 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8383 support for initrd names used in Fedora.
8385 2007-12-26 Bean <bean123ch@gmail.com>
8387 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8388 (cpio_mod_SOURCES): New variable.
8389 (cpio_mod_CFLAGS): Likewise.
8390 (cpio_mod_LDFLAGS): Likewise.
8392 * fs/cpio.c: New file.
8394 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8396 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8398 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8400 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8402 2007-12-25 Robert Millan <rmh@aybabtu.com>
8404 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8405 (grub_getcolor): New function.
8407 * kern/term.c (grub_getcolor): New function.
8408 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8409 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8410 (print_entry): Set normal and highlight colors to
8411 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8412 respectively, before printing and restore them to old
8414 (grub_menu_init_page): Likewise. Fill an additional colored space
8415 that would otherwise be left blank.
8417 * term/efi/console.c (grub_console_getcolor): New function.
8418 (struct grub_console_term.getcolor): New variable.
8419 * term/i386/pc/console.c (grub_console_getcolor): New function.
8420 (struct grub_console_term.getcolor): New variable.
8421 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8422 (struct grub_console_term.getcolor): New variable.
8424 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8425 (struct grub_console_term.setcolor): Remove variable.
8426 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8427 (struct grub_console_term.setcolor): Remove variable.
8428 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8429 (struct grub_console_term.setcolor): Remove variable.
8430 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8431 (struct grub_console_term.setcolor): Remove variable.
8433 2007-12-25 Robert Millan <rmh@aybabtu.com>
8435 * configure.ac: Search for possible unifont.hex locations, and
8436 define UNIFONT_HEX if found.
8438 * Makefile.in (UNIFONT_HEX): Define variable.
8439 (DATA): Rename to ...
8440 (PKGLIB): ... this. Update all users.
8441 (PKGDATA): New variable.
8442 (pkgdata_IMAGES): Rename to ...
8443 (pkglib_IMAGES): ... this. Update all users.
8444 (pkgdata_MODULES): Rename to ...
8445 (pkglib_MODULES): ... this. Update all users.
8446 (pkgdata_PROGRAMS): Rename to ...
8447 (pkglib_PROGRAMS): ... this. Update all users.
8448 (pkgdata_DATA): Rename to ...
8449 (pkglib_DATA): ... this. Update all users.
8450 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8451 (unicode.pff, ascii.pff): New rules.
8452 (all-local): Add `$(PKGDATA)' dependency.
8453 (install-local): Process `$(PKGDATA)'.
8455 * util/update-grub_lib.in (font_path): Search for *.pff files in
8456 a few more locations, including `${pkgdata}'.
8458 2007-12-23 Robert Millan <rmh@aybabtu.com>
8460 Patch from Bean <bean123ch@gmail.com>:
8461 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8464 2007-12-21 Bean <bean123ch@gmail.com>
8466 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8467 (ntfscomp_mod_SOURCES): New variable.
8468 (ntfscomp_mod_CFLAGS): Likewise.
8469 (ntfscomp_mod_LDFLAGS): Likewise.
8471 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8472 (grub_probe_SOURCES): Likewise.
8473 (grub_emu_SOURCES): Likewise.
8475 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8476 (grub_emu_SOURCES): Likewise.
8478 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8479 (grub_emu_SOURCES): Likewise.
8481 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8482 (grub_emu_SOURCES): Likewise.
8484 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8485 (read_run_list): Renamed to grub_ntfs_read_run_list.
8486 (decomp_nextvcn): Moved to ntfscomp.c.
8487 (decomp_getch): Likewise.
8488 (decomp_get16): Likewise.
8489 (decomp_block): Likewise.
8490 (read_block): Likewise.
8491 (read_data): Partially moved to ntfscomp.c.
8492 (fixup): Change unsigned to grub_uint16_t.
8493 (read_mft): Change unsigned long to grub_uint32_t.
8494 (read_attr): Likewise.
8495 (read_data): Likewise.
8496 (read_run_data): Likewise.
8497 (read_run_list): Likewise.
8498 (read_mft): Likewise.
8500 * fs/ntfscomp.c: New file.
8502 * include/grub/ntfs.h: New file.
8504 2007-12-16 Robert Millan <rmh@aybabtu.com>
8506 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8507 IDE disk check, since Linux is known to support 20 IDE disks.
8508 Reported by Colin Watson.
8510 2007-12-15 Bean <bean123ch@gmail.com>
8512 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8513 (lnxboot_img_SOURCES): New variable.
8514 (lnxboot_img_ASFLAGS): Likewise.
8515 (lnxboot_img_LDFLAGS): Likewise.
8517 * boot/i386/pc/lnxboot.S: New file.
8519 2007-11-24 Pavel Roskin <proski@gnu.org>
8521 * configure.ac: Test if '--build-id=none' is supported by the
8522 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8523 objcopy to generate incorrect binary files (binutils
8524 2.17.50.0.18-1 as shipped by Fedora 8).
8525 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8526 linking, so that build ID doesn't break the test.
8528 2007-11-24 Pavel Roskin <proski@gnu.org>
8530 * include/grub/i386/time.h: use "void" in the argument list
8532 * include/grub/powerpc/time.h: Likewise.
8533 * include/grub/sparc64/time.h: Likewise.
8535 2007-11-18 Christian Franke <franke@computer.org>
8537 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8538 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8539 This fixes the problem that function keys did not work in grub-emu.
8541 2007-11-18 Christian Franke <franke@computer.org>
8543 * disk/host.c (grub_host_open): Remove attribute unused from
8544 name parameter. Add check for "host". This fixes the problem
8545 that grub-emu does not find partitions.
8547 2007-11-18 Christian Franke <franke@computer.org>
8549 * util/hostfs.c (is_dir): New function.
8550 (grub_hostfs_dir): Handle missing dirent.d_type case.
8551 (grub_hostfs_read): Add missing fseek().
8552 (grub_hostfs_label): Clear label pointer. This fixes a crash
8553 of grub-emu on "ls (host)".
8555 2007-11-18 Christian Franke <franke@computer.org>
8557 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8558 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8559 to 64 bit boundary by default.
8561 2007-11-18 Bean <bean123ch@gmail.com>
8563 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8564 (hexdump_mod_SOURCES): New variable.
8565 (hexdump_mod_CFLAGS): Likewise.
8566 (hexdump_mod_LDFLAGS): Likewise.
8568 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8570 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8572 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8574 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8576 * include/grub/hexdump.h: New file.
8578 * commands/hexdump.c: New file.
8580 2007-11-10 Robert Millan <rmh@aybabtu.com>
8582 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8583 in grub_outb() calls.
8584 (beep_on): Likewise.
8586 2007-11-10 Christian Franke <franke@computer.org>
8588 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8589 (grub_menu_run): Likewise.
8591 2007-11-10 Robert Millan <rmh@aybabtu.com>
8593 * include/grub/i386/efi/machine.h: New file.
8594 * include/grub/i386/linuxbios/machine.h: Likewise.
8595 * include/grub/i386/pc/machine.h: Likewise.
8596 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8597 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8599 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8600 (serial_hw_io_addr): New variable.
8601 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8602 instead of `(unsigned short *) 0x400'.
8604 2007-11-10 Bean <bean123ch@gmail.com>
8606 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8608 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8610 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8611 (vga_mod_SOURCES): Added.
8612 (vga_mod_CFLAGS): Likewise.
8613 (vga_mod_LDFLAGS): Likewise.
8615 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8617 (set_map_mask): Likewise.
8618 (set_read_map): Likewise.
8619 (set_read_address): Likewise.
8620 (vga_font): Removed variable.
8621 (get_vga_glyph): Removed function.
8622 (invalidate_char): Likewise.
8623 (write_char): Changed to use grub_font_get_glyph() for font
8625 (grub_vga_putchar): Likewise.
8626 (grub_vga_getcharwidth): Likewise.
8628 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8630 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8632 (pxeboot_img_LDFLAGS): Likewise.
8633 (diskboot_img_LDFLAGS): Likewise.
8634 (kernel_img_LDFLAGS): Likewise.
8636 2007-11-06 Robert Millan <rmh@aybabtu.com>
8638 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8639 in grub_outb() calls.
8640 (serial_hw_init): Likewise.
8642 2007-11-05 Robert Millan <rmh@aybabtu.com>
8644 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8645 spaces. Skip non-regular files.
8647 2007-11-05 Robert Millan <rmh@aybabtu.com>
8649 * kern/disk.c (grub_disk_firmware_fini)
8650 (grub_disk_firmware_is_tainted): New variables.
8652 * include/grub/disk.h (grub_disk_firmware_fini)
8653 (grub_disk_firmware_is_tainted): Likewise.
8655 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8656 (grub_disk_biosdisk_fini): ... to here.
8657 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8658 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8659 is set. Register grub_disk_biosdisk_fini() in
8660 `grub_disk_firmware_fini'.
8662 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8663 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8664 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8665 to finish existing firmware disk interface.
8667 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8668 (ata_mod_SOURCES): New variable.
8669 (ata_mod_CFLAGS): Likewise.
8670 (ata_mod_LDFLAGS): Likewise.
8672 2007-11-05 Robert Millan <rmh@aybabtu.com>
8674 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8675 (grub_ata_wait): Reimplement using grub_millisleep().
8677 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8678 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8680 2007-11-03 Marco Gerards <marco@gnu.org>
8682 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8683 (CRTC_ADDR_PORT): New macro.
8684 (CRTC_DATA_PORT): Likewise.
8685 (CRTC_CURSOR): Likewise.
8686 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8687 (CRTC_CURSOR_ADDR_LOW): Likewise.
8688 (update_cursor): New function.
8689 (grub_console_real_putchar): Call `update_cursor'.
8690 (grub_console_gotoxy): Likewise.
8691 (grub_console_cls): Set the default color when clearing the
8693 (grub_console_setcursor): Implemented.
8695 2007-11-03 Marco Gerards <marco@gnu.org>
8697 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8699 (grub_ata_pio_write): Likewise.
8701 (grub_atapi_identify): Wait after issuing an ATA command.
8702 (grub_atapi_packet): Likewise.
8703 (grub_ata_identify): Likewise.
8704 (grub_ata_readwrite): Likewise.
8706 2007-11-03 Marco Gerards <marco@gnu.org>
8708 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8709 (grub_ata_pio_write): Likewise.
8710 (grub_ata_readwrite): Use `grub_error', instead of
8711 returning `grub_errno'.
8713 2007-11-03 Marco Gerards <marco@gnu.org>
8715 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8716 grub_ata_pio_write once for every single sector, instead of for
8719 2007-10-31 Robert Millan <rmh@aybabtu.com>
8721 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8723 * conf/i386-linuxbios.rmk: New file.
8725 * kern/i386/pc/hardware.c: Likewise.
8726 * term/i386/pc/at_keyboard.c: Likewise.
8727 * term/i386/pc/vga_text.c: Likewise.
8729 * include/grub/i386/linuxbios/boot.h: Likewise.
8730 * include/grub/i386/linuxbios/console.h: Likewise.
8731 * include/grub/i386/linuxbios/init.h: Likewise.
8732 * include/grub/i386/linuxbios/kernel.h: Likewise.
8733 * include/grub/i386/linuxbios/loader.h: Likewise.
8734 * include/grub/i386/linuxbios/memory.h: Likewise.
8735 * include/grub/i386/linuxbios/serial.h: Likewise.
8736 * include/grub/i386/linuxbios/time.h: Likewise.
8738 * kern/i386/linuxbios/init.c: Likewise.
8739 * kern/i386/linuxbios/startup.S: Likewise.
8740 * kern/i386/linuxbios/table.c: Likewise.
8742 2007-10-31 Marco Gerards <marco@gnu.org>
8744 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8745 (ata_mod_SOURCES): New variable.
8746 (ata_mod_CFLAGS): Likewise.
8747 (ata_mod_LDFLAGS): Likewise.
8749 * disk/ata.c: New file.
8751 * include/grub/disk.h (grub_disk_dev_id): Add
8752 `GRUB_DISK_DEV_ATA_ID'.
8754 2007-10-31 Robert Millan <rmh@aybabtu.com>
8756 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8757 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8759 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8760 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8762 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8765 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8767 2007-10-27 Robert Millan <rmh@aybabtu.com>
8769 * include/grub/types.h (ULONG_MAX): Define macro.
8771 2007-10-22 Robert Millan <rmh@aybabtu.com>
8773 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8775 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8777 2007-10-22 Robert Millan <rmh@aybabtu.com>
8779 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8780 (pkgdata_MODULES): Add `biosdisk.mod'.
8781 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8784 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8785 (grub_biosdisk_init): Replace with ...
8786 (GRUB_MOD_INIT(biosdisk)): ... this.
8787 (grub_biosdisk_fini): Replace with ...
8788 (GRUB_MOD_FINI(biosdisk)): ... this.
8790 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8791 (grub_machine_init): Remove call to grub_biosdisk_init().
8792 (grub_machine_fini): Remove call to grub_machine_fini().
8794 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8796 2007-10-22 Robert Millan <rmh@aybabtu.com>
8798 * include/grub/time.h: New file.
8799 * include/grub/i386/time.h: Likewise.
8800 * include/grub/powerpc/time.h: Likewise.
8801 * include/grub/sparc64/time.h: Likewise.
8803 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8805 (KERNEL_MACHINE_TIME_HEADER): ... this.
8806 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8808 (KERNEL_MACHINE_TIME_HEADER): ... this.
8809 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8811 (KERNEL_MACHINE_TIME_HEADER): ... this.
8813 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8814 (grub_millisleep): New function.
8815 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8816 (grub_millisleep): New function.
8817 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8818 Remove `grub/machine/time.h' include.
8819 (grub_millisleep): New function.
8820 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8821 Remove `grub/machine/time.h' include.
8822 (grub_millisleep): New function.
8824 * include/grub/misc.h (grub_div_roundup): New function.
8826 * kern/misc.c: Include `<grub/time.h>'.
8827 (grub_millisleep_generic): New function.
8829 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8831 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8833 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8834 `machine/time.h'. Add `time.h'.
8835 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8837 2007-10-21 Robert Millan <rmh@aybabtu.com>
8839 * include/grub/misc.h (grub_max): New function.
8841 2007-10-21 Robert Millan <rmh@aybabtu.com>
8843 * util/misc.c (grub_util_info): Call fflush() before returning.
8845 2007-10-20 Robert Millan <rmh@aybabtu.com>
8847 * genmk.rb (Image): Copy `extra_flags' from here ...
8848 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8850 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8851 to `argc' and `args' arguments.
8853 2007-10-17 Robert Millan <rmh@aybabtu.com>
8855 * kern/i386/loader.S: New file.
8857 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8858 * kern/i386/loader.S (grub_linux_prot_size)... to here.
8859 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8860 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8861 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8862 * kern/i386/loader.S (grub_linux_real_addr)... to here.
8863 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8864 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8865 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8866 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8867 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8868 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8869 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8870 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8872 * kern/i386/realmode.S: New file.
8874 * kern/i386/pc/startup.S (protstack): Moved from here ...
8875 * kern/i386/realmode.S (protstack)... to here.
8876 * kern/i386/pc/startup.S (gdt): Moved from here ...
8877 * kern/i386/realmode.S (gdt)... to here.
8878 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8879 * kern/i386/realmode.S (prot_to_real)... to here.
8881 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8882 `kern/i386/realmode.S'.
8884 2007-10-17 Robert Millan <rmh@aybabtu.com>
8886 * include/grub/i386/loader.h: New file.
8888 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8889 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8890 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8891 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8892 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8893 * include/grub/i386/loader.h (grub_linux_prot_size)
8894 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8895 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8896 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8897 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8899 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8901 2007-10-15 Robert Millan <rmh@aybabtu.com>
8903 * normal/misc.c (grub_normal_print_device_info): Do not probe for
8904 filesystem when dev->disk is unset.
8905 Do probe for filesystem even when dev->disk->has_partitions is set.
8906 In case a filesystem is found, always report it.
8907 In case it isn't, if dev->disk->has_partitions is set, report that
8908 a partition table was found instead of reporting that no filesystem
8909 could be identified.
8911 2007-10-12 Robert Millan <rmh@aybabtu.com>
8913 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8914 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8916 * include/grub/types.h (grub_host_to_target16): New macro.
8917 (grub_host_to_target32): Likewise.
8918 (grub_host_to_target64): Likewise.
8919 (grub_target_to_host16): Likewise.
8920 (grub_target_to_host32): Likewise.
8921 (grub_target_to_host64): Likewise.
8923 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8925 (GRUB_MOD_ALIGN): ...this. Update all users.
8927 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8928 grub_host_to_target32.
8929 Replace grub_be_to_cpu32 with grub_target_to_host32.
8930 (load_modules): Likewise.
8931 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8932 Replace grub_be_to_cpu32 with grub_target_to_host32.
8933 Replace grub_cpu_to_be16 with grub_host_to_target16.
8934 Replace grub_cpu_to_be32 grub_host_to_target32.
8936 2007-10-12 Robert Millan <rmh@aybabtu.com>
8938 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8939 * util/elf/grub-mkimage.c: ... here.
8941 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8942 `util/powerpc/ieee1275/grub-mkimage.c'.
8944 2007-10-07 Robert Millan <rmh@aybabtu.com>
8946 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8947 and make it easier to figure out.
8948 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8949 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8950 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8951 leave us with less than HEAP_MIN_SIZE total heap.
8952 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
8954 2007-10-03 Robert Millan <rmh@aybabtu.com>
8956 * include/grub/i386/io.h: New file.
8957 * commands/i386/pc/play.c (inb): Removed.
8959 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8961 * term/i386/pc/serial.c (inb): Removed.
8963 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8965 * term/i386/pc/vga.c (inb): Removed.
8967 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8970 2007-10-02 Robert Millan <rmh@aybabtu.com>
8972 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8973 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8974 Reported by Marcin Kurek.
8976 2007-09-07 Robert Millan <rmh@aybabtu.com>
8978 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8979 SmartFirmware version updates (as released by Sven Luther), and avoid
8980 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8981 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8984 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8987 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8988 when merging two regions.
8990 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8992 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8993 * normal/completion.c (grub_normal_do_completion): Likewise.
8994 Reported by Hitoshi Ozeki.
8996 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8998 Do not use devices at boot in chainloading.
9000 * loader/i386/pc/chainloader.c (boot_drive): New variable.
9001 (boot_part_addr): Likewise.
9002 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9003 with BOOT_DRIVE and BOOT_PART_ADDR.
9004 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9005 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9007 2007-08-29 Robert Millan <rmh@aybabtu.com>
9009 Patch from Simon Peter <dn.tlp@gmx.net>:
9010 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9011 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9012 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
9013 util/i386/pc/grub-setup.c_DEPENDENCIES.
9014 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9015 util/grub-probe.c_DEPENDENCIES.
9016 * conf/powerpc-ieee1275.rmk: Likewise.
9018 2007-08-28 Robert Millan <rmh@aybabtu.com>
9020 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
9021 to tell grub-mkdevicemap how to name devices.
9022 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9025 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9026 util/i386/get_disk_name.c.
9027 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9028 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9029 util/ieee1275/get_disk_name.c.
9031 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9033 * DISTLIST: Add util/i386/get_disk_name.c and
9034 util/ieee1275/get_disk_name.c.
9036 * util/grub-mkdevicemap.c: Replace device naming logic with
9037 grub_util_get_disk_name() calls.
9039 2007-08-20 Robert Millan <rmh@aybabtu.com>
9041 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9042 (so that it works for both plural and singular quantities).
9044 2007-08-05 Robert Millan <rmh@aybabtu.com>
9046 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9047 so that [xz] isn't taken into account when determining order.
9049 2007-08-02 Marco Gerards <marco@gnu.org>
9051 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9052 `include/multiboot2.h', `include/grub/elfload.h',
9053 `include/multiboot.h', `include/grub/multiboot.h',
9054 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9055 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9056 `kern/elf.c', `loader/multiboot_loader.c',
9057 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9058 `loader/i386/pc/multiboot2.c',
9059 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9060 `util/i386/pc/grub-mkrescue.in'. Remove
9061 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9062 `include/grub/i386/pc/util/biosdisk.h' and
9063 `include/grub/powerpc/ieee1275/multiboot.h'.
9065 2007-08-02 Bean <bean123ch@gmail.com>
9067 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9068 (ntfs_mod_SOURCES): New variable.
9069 (ntfs_mod_CFLAGS): Likewise.
9070 (ntfs_mod_LDFLAGS): Likewise.
9072 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9073 (grub_probe_SOURCES): Likewise.
9074 (grub_emu_SOURCES): Likewise.
9076 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9077 (grub_emu_SOURCES): Likewise.
9079 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9080 (grub_emu_SOURCES): Likewise.
9082 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9084 * fs/ntfs.c: New file.
9086 2007-08-02 Bean <bean123ch@gmail.com>
9088 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9090 * file.h (grub_file): Likewise.
9092 * fshelp.h (grub_fshelp_read_file): Likewise.
9094 * util/i386/pc/grub-setup.c (setup): Likewise.
9095 (save_first_sector): Likewise.
9096 (save_blocklists): Likewise.
9098 * fs/affs.c (grub_affs_read_file): Likewise.
9100 * fs/ext2.c (grub_ext2_read_file): Likewise.
9102 * fs/fat.c (grub_fat_read_data): Likewise.
9104 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9106 * fs/hfs.c (grub_hfs_read_file): Likewise.
9108 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9110 * fs/jfs.c (grub_jfs_read_file): Likewise.
9112 * fs/minix.c (grub_minix_read_file): Likewise.
9114 * fs/sfs.c (grub_sfs_read_file): Likewise.
9116 * fs/ufs.c (grub_ufs_read_file): Likewise.
9118 * fs/xfs.c (grub_xfs_read_file): Likewise.
9120 * command/blocklist.c (read_blocklist): Likewise.
9121 (print_blocklist): Likewise.
9123 2007-08-02 Marco Gerards <marco@gnu.org>
9125 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9128 * disk/host.c: New file.
9130 * util/hostfs.c: Likewise.
9132 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9133 return `GRUB_ERR_BAD_FS'.
9134 * fs/sfs.c (grub_sfs_mount): Likewise.
9135 * fs/xfs.c (grub_xfs_mount): Likewise.
9137 * include/grub/disk.h (enum grub_disk_dev_id): Add
9138 `GRUB_DISK_DEVICE_HOST_ID'.
9140 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9142 2007-07-24 Jerone Young <jerone@gmail.com>
9144 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9145 modules for compilation.
9146 * conf/powerpc-ieee1275.rmk: Likewise.
9148 * include/multiboot.h: Move multiboot definitions to one file. Rename
9149 many definitions to not get grub specific.
9150 * include/multiboot2.h: Create header with multiboot 2 definitions.
9151 * include/grub/multiboot.h: Header for grub specific function
9152 prototypes and definitions.
9153 * include/grub/multiboot2.h: Likewise.
9154 * include/grub/multiboot_loader.h: Likewise.
9155 * include/grub/i386/pc/multiboot.h: Removed.
9156 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9158 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9159 and 2 to allow for one multiboot and module commands.
9160 * loader/multiboot2.c: Add multiboot2 functionality.
9161 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9162 and definition names.
9163 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9165 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9166 ieee1275 specific multiboot2 code.
9168 * kern/i386/pc/startup.S: Change headers and definition names for
9169 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9171 2007-07-22 Robert Millan <rmh@aybabtu.com>
9173 * geninitheader.sh: Process file specified in first parameter rather
9174 than hardcoding grub_modules_init.lst.
9175 * geninit.sh: Likewise. Also, construct header name dynamically rather
9176 than hardcoding grub_modules_init.h.
9178 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9179 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9180 grub_probe_init.[ch] and grub_setup_init.[ch].
9182 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9183 grub_modules_init.h with grub_emu_init.h.
9184 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9185 grub_probe_init.[ch] files.
9186 * conf/i386-efi.rmk: Likewise.
9187 * conf/i386-pc.rmk: Likewise.
9188 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9189 grub_setup_init.[ch] files.
9191 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9192 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9193 to initialize modules rather than a list of hardcoded functions.
9194 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9195 grub_init_all() to initialize modules rather than a list of hardcoded
9198 2007-07-22 Robert Millan <rmh@aybabtu.com>
9200 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9201 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9203 2007-07-22 Robert Millan <rmh@aybabtu.com>
9205 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9206 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9207 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9208 flag when running on SmartFirmware.
9209 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9210 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9213 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9214 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9215 rather than decreasing it.
9217 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9218 there's not enough space to do it, fail in the same way as when it
9219 can't be done because there are no partitions.
9221 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9222 when nvsetenv failed.
9224 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9226 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9227 because this rule is automatically generated.
9228 (grub-mkrescue): Removed for the same reason as above.
9230 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9232 Migrate to GNU General Public License Version 3.
9234 * COPYING: Replaced with the plain text version of GPLv3.
9236 * config.guess: Updated from gnulib.
9237 * config.sub: Likewise.
9239 * geninit.sh: Output a GPLv3 copyright notice.
9240 * geninitheader.sh: Likewise.
9241 * genmodsrc.sh: Likewise.
9242 * gensymlist.sh.in: Likewise.
9244 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9245 * boot/i386/pc/diskboot.S: Likewise.
9246 * boot/i386/pc/pxeboot.S: Likewise.
9247 * commands/blocklist.c: Likewise.
9248 * commands/boot.c: Likewise.
9249 * commands/cat.c: Likewise.
9250 * commands/cmp.c: Likewise.
9251 * commands/configfile.c: Likewise.
9252 * commands/echo.c: Likewise.
9253 * commands/help.c: Likewise.
9254 * commands/ls.c: Likewise.
9255 * commands/search.c: Likewise.
9256 * commands/terminal.c: Likewise.
9257 * commands/test.c: Likewise.
9258 * commands/videotest.c: Likewise.
9259 * commands/i386/cpuid.c: Likewise.
9260 * commands/i386/pc/halt.c: Likewise.
9261 * commands/i386/pc/play.c: Likewise.
9262 * commands/i386/pc/reboot.c: Likewise.
9263 * commands/i386/pc/vbeinfo.c: Likewise.
9264 * commands/i386/pc/vbetest.c: Likewise.
9265 * commands/ieee1275/halt.c: Likewise.
9266 * commands/ieee1275/reboot.c: Likewise.
9267 * commands/ieee1275/suspend.c: Likewise.
9268 * disk/loopback.c: Likewise.
9269 * disk/lvm.c: Likewise.
9270 * disk/raid.c: Likewise.
9271 * disk/efi/efidisk.c: Likewise.
9272 * disk/i386/pc/biosdisk.c: Likewise.
9273 * disk/ieee1275/ofdisk.c: Likewise.
9274 * font/manager.c: Likewise.
9275 * fs/affs.c: Likewise.
9276 * fs/ext2.c: Likewise.
9277 * fs/fat.c: Likewise.
9278 * fs/fshelp.c: Likewise.
9279 * fs/hfs.c: Likewise.
9280 * fs/hfsplus.c: Likewise.
9281 * fs/iso9660.c: Likewise.
9282 * fs/jfs.c: Likewise.
9283 * fs/minix.c: Likewise.
9284 * fs/sfs.c: Likewise.
9285 * fs/ufs.c: Likewise.
9286 * fs/xfs.c: Likewise.
9287 * hello/hello.c: Likewise.
9288 * include/grub/acorn_filecore.h: Likewise.
9289 * include/grub/arg.h: Likewise.
9290 * include/grub/bitmap.h: Likewise.
9291 * include/grub/boot.h: Likewise.
9292 * include/grub/cache.h: Likewise.
9293 * include/grub/device.h: Likewise.
9294 * include/grub/disk.h: Likewise.
9295 * include/grub/dl.h: Likewise.
9296 * include/grub/elfload.h: Likewise.
9297 * include/grub/env.h: Likewise.
9298 * include/grub/err.h: Likewise.
9299 * include/grub/file.h: Likewise.
9300 * include/grub/font.h: Likewise.
9301 * include/grub/fs.h: Likewise.
9302 * include/grub/fshelp.h: Likewise.
9303 * include/grub/gzio.h: Likewise.
9304 * include/grub/hfs.h: Likewise.
9305 * include/grub/kernel.h: Likewise.
9306 * include/grub/loader.h: Likewise.
9307 * include/grub/lvm.h: Likewise.
9308 * include/grub/misc.h: Likewise.
9309 * include/grub/mm.h: Likewise.
9310 * include/grub/net.h: Likewise.
9311 * include/grub/normal.h: Likewise.
9312 * include/grub/parser.h: Likewise.
9313 * include/grub/partition.h: Likewise.
9314 * include/grub/pc_partition.h: Likewise.
9315 * include/grub/raid.h: Likewise.
9316 * include/grub/rescue.h: Likewise.
9317 * include/grub/script.h: Likewise.
9318 * include/grub/setjmp.h: Likewise.
9319 * include/grub/symbol.h: Likewise.
9320 * include/grub/term.h: Likewise.
9321 * include/grub/terminfo.h: Likewise.
9322 * include/grub/tparm.h: Likewise.
9323 * include/grub/types.h: Likewise.
9324 * include/grub/video.h: Likewise.
9325 * include/grub/efi/api.h: Likewise.
9326 * include/grub/efi/chainloader.h: Likewise.
9327 * include/grub/efi/console.h: Likewise.
9328 * include/grub/efi/console_control.h: Likewise.
9329 * include/grub/efi/disk.h: Likewise.
9330 * include/grub/efi/efi.h: Likewise.
9331 * include/grub/efi/pe32.h: Likewise.
9332 * include/grub/efi/time.h: Likewise.
9333 * include/grub/i386/linux.h: Likewise.
9334 * include/grub/i386/setjmp.h: Likewise.
9335 * include/grub/i386/types.h: Likewise.
9336 * include/grub/i386/efi/kernel.h: Likewise.
9337 * include/grub/i386/efi/loader.h: Likewise.
9338 * include/grub/i386/efi/time.h: Likewise.
9339 * include/grub/i386/pc/biosdisk.h: Likewise.
9340 * include/grub/i386/pc/boot.h: Likewise.
9341 * include/grub/i386/pc/chainloader.h: Likewise.
9342 * include/grub/i386/pc/console.h: Likewise.
9343 * include/grub/i386/pc/init.h: Likewise.
9344 * include/grub/i386/pc/kernel.h: Likewise.
9345 * include/grub/i386/pc/loader.h: Likewise.
9346 * include/grub/i386/pc/memory.h: Likewise.
9347 * include/grub/i386/pc/multiboot.h: Likewise.
9348 * include/grub/i386/pc/serial.h: Likewise.
9349 * include/grub/i386/pc/time.h: Likewise.
9350 * include/grub/i386/pc/vbe.h: Likewise.
9351 * include/grub/i386/pc/vbeblit.h: Likewise.
9352 * include/grub/i386/pc/vbefill.h: Likewise.
9353 * include/grub/i386/pc/vbeutil.h: Likewise.
9354 * include/grub/i386/pc/vga.h: Likewise.
9355 * include/grub/ieee1275/ieee1275.h: Likewise.
9356 * include/grub/ieee1275/ofdisk.h: Likewise.
9357 * include/grub/powerpc/libgcc.h: Likewise.
9358 * include/grub/powerpc/setjmp.h: Likewise.
9359 * include/grub/powerpc/types.h: Likewise.
9360 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9361 * include/grub/powerpc/ieee1275/console.h: Likewise.
9362 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9363 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9364 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9365 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9366 * include/grub/powerpc/ieee1275/time.h: Likewise.
9367 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9368 * include/grub/sparc64/libgcc.h: Likewise.
9369 * include/grub/sparc64/setjmp.h: Likewise.
9370 * include/grub/sparc64/types.h: Likewise.
9371 * include/grub/sparc64/ieee1275/console.h: Likewise.
9372 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9373 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9374 * include/grub/sparc64/ieee1275/time.h: Likewise.
9375 * include/grub/util/biosdisk.h: Likewise.
9376 * include/grub/util/getroot.h: Likewise.
9377 * include/grub/util/lvm.h: Likewise.
9378 * include/grub/util/misc.h: Likewise.
9379 * include/grub/util/raid.h: Likewise.
9380 * include/grub/util/resolve.h: Likewise.
9381 * io/gzio.c: Likewise.
9382 * kern/device.c: Likewise.
9383 * kern/disk.c: Likewise.
9384 * kern/dl.c: Likewise.
9385 * kern/elf.c: Likewise.
9386 * kern/env.c: Likewise.
9387 * kern/err.c: Likewise.
9388 * kern/file.c: Likewise.
9389 * kern/fs.c: Likewise.
9390 * kern/loader.c: Likewise.
9391 * kern/main.c: Likewise.
9392 * kern/misc.c: Likewise.
9393 * kern/mm.c: Likewise.
9394 * kern/parser.c: Likewise.
9395 * kern/partition.c: Likewise.
9396 * kern/rescue.c: Likewise.
9397 * kern/term.c: Likewise.
9398 * kern/efi/efi.c: Likewise.
9399 * kern/efi/init.c: Likewise.
9400 * kern/efi/mm.c: Likewise.
9401 * kern/i386/dl.c: Likewise.
9402 * kern/i386/efi/init.c: Likewise.
9403 * kern/i386/efi/startup.S: Likewise.
9404 * kern/i386/pc/init.c: Likewise.
9405 * kern/i386/pc/lzo1x.S: Likewise.
9406 * kern/i386/pc/startup.S: Likewise.
9407 * kern/ieee1275/ieee1275.c: Likewise.
9408 * kern/powerpc/cache.S: Likewise.
9409 * kern/powerpc/dl.c: Likewise.
9410 * kern/powerpc/ieee1275/cmain.c: Likewise.
9411 * kern/powerpc/ieee1275/crt0.S: Likewise.
9412 * kern/powerpc/ieee1275/init.c: Likewise.
9413 * kern/powerpc/ieee1275/openfw.c: Likewise.
9414 * kern/sparc64/cache.S: Likewise.
9415 * kern/sparc64/dl.c: Likewise.
9416 * kern/sparc64/ieee1275/init.c: Likewise.
9417 * kern/sparc64/ieee1275/openfw.c: Likewise.
9418 * loader/efi/chainloader.c: Likewise.
9419 * loader/efi/chainloader_normal.c: Likewise.
9420 * loader/i386/efi/linux.c: Likewise.
9421 * loader/i386/efi/linux_normal.c: Likewise.
9422 * loader/i386/pc/chainloader.c: Likewise.
9423 * loader/i386/pc/chainloader_normal.c: Likewise.
9424 * loader/i386/pc/linux.c: Likewise.
9425 * loader/i386/pc/linux_normal.c: Likewise.
9426 * loader/i386/pc/multiboot.c: Likewise.
9427 * loader/i386/pc/multiboot_normal.c: Likewise.
9428 * loader/powerpc/ieee1275/linux.c: Likewise.
9429 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9430 * normal/arg.c: Likewise.
9431 * normal/cmdline.c: Likewise.
9432 * normal/command.c: Likewise.
9433 * normal/completion.c: Likewise.
9434 * normal/execute.c: Likewise.
9435 * normal/function.c: Likewise.
9436 * normal/lexer.c: Likewise.
9437 * normal/main.c: Likewise.
9438 * normal/menu.c: Likewise.
9439 * normal/menu_entry.c: Likewise.
9440 * normal/misc.c: Likewise.
9441 * normal/parser.y: Likewise.
9442 * normal/script.c: Likewise.
9443 * normal/i386/setjmp.S: Likewise.
9444 * normal/powerpc/setjmp.S: Likewise.
9445 * normal/sparc64/setjmp.S: Likewise.
9446 * partmap/acorn.c: Likewise.
9447 * partmap/amiga.c: Likewise.
9448 * partmap/apple.c: Likewise.
9449 * partmap/gpt.c: Likewise.
9450 * partmap/pc.c: Likewise.
9451 * partmap/sun.c: Likewise.
9452 * term/gfxterm.c: Likewise.
9453 * term/terminfo.c: Likewise.
9454 * term/efi/console.c: Likewise.
9455 * term/i386/pc/console.c: Likewise.
9456 * term/i386/pc/serial.c: Likewise.
9457 * term/i386/pc/vesafb.c: Likewise.
9458 * term/i386/pc/vga.c: Likewise.
9459 * term/ieee1275/ofconsole.c: Likewise.
9460 * util/biosdisk.c: Likewise.
9461 * util/console.c: Likewise.
9462 * util/genmoddep.c: Likewise.
9463 * util/getroot.c: Likewise.
9464 * util/grub-emu.c: Likewise.
9465 * util/grub-mkdevicemap.c: Likewise.
9466 * util/grub-probe.c: Likewise.
9467 * util/lvm.c: Likewise.
9468 * util/misc.c: Likewise.
9469 * util/raid.c: Likewise.
9470 * util/resolve.c: Likewise.
9471 * util/update-grub.in: Likewise.
9472 * util/update-grub_lib.in: Likewise.
9473 * util/grub.d/00_header.in: Likewise.
9474 * util/grub.d/10_hurd.in: Likewise.
9475 * util/grub.d/10_linux.in: Likewise.
9476 * util/i386/efi/grub-install.in: Likewise.
9477 * util/i386/efi/grub-mkimage.c: Likewise.
9478 * util/i386/pc/grub-install.in: Likewise.
9479 * util/i386/pc/grub-mkimage.c: Likewise.
9480 * util/i386/pc/grub-mkrescue.in: Likewise.
9481 * util/i386/pc/grub-setup.c: Likewise.
9482 * util/i386/pc/misc.c: Likewise.
9483 * util/powerpc/ieee1275/grub-install.in: Likewise.
9484 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9485 * util/powerpc/ieee1275/misc.c: Likewise.
9486 * video/bitmap.c: Likewise.
9487 * video/video.c: Likewise.
9488 * video/i386/pc/vbe.c: Likewise.
9489 * video/i386/pc/vbeblit.c: Likewise.
9490 * video/i386/pc/vbefill.c: Likewise.
9491 * video/i386/pc/vbeutil.c: Likewise.
9492 * video/readers/tga.c: Likewise.
9494 2007-07-02 Robert Millan <rmh@aybabtu.com>
9496 * conf/i386-efi.rmk: Replace obsolete reference to
9497 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9498 with util/getroot.c.
9499 * conf/powerpc-ieee1275.rmk: Likewise.
9500 * conf/sparc64-ieee1275.rmk: Likewise.
9502 * util/grub-emu.c (main): Fix unchecked pointer handling.
9504 2007-07-02 Robert Millan <rmh@aybabtu.com>
9506 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9507 invocation to fail, in order to support partition-less media.
9509 * util/i386/pc/grub-install.in: Likewise.
9511 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9512 which fs or partmap modules are needed (akin to its sister scripts).
9514 Also use grub-probe to get rid of unportable /proc/mounts check.
9516 Print the same informational message that the other scripts do, before
9519 2007-06-23 Robert Millan <rmh@aybabtu.com>
9521 * util/update-grub_lib.in (font_path): New function. Determine whether
9522 a font file can be found and, if so, echo the GRUB path to it.
9524 * util/update-grub.in: Handle multiple terminals depending on user
9525 input, platform availability and font file presence. Propagate
9526 variables of our findings to /etc/grub.d/ children.
9528 * util/grub.d/00_header.in: Handle multiple terminals, based on
9529 environment setup by update-grub.
9531 2007-06-23 Robert Millan <rmh@aybabtu.com>
9533 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9535 2007-06-21 Robert Millan <rmh@aybabtu.com>
9537 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9538 indicate end of data section in kernel image.
9539 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9540 GRUB_KERNEL_MACHINE_DATA_END.
9542 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9544 * kern/i386/efi/startup.S: Likewise.
9546 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9547 during image generation. Implement --prefix option to override this
9549 * util/i386/efi/grub-mkimage.c: Likewise.
9551 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9552 code to make path relative to its root into a separate function.
9554 * util/i386/pc/grub-install.in: Use newly provided
9555 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9556 pass the result to grub-install --prefix.
9558 2007-06-13 Robert Millan <rmh@aybabtu.com>
9560 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9562 * util/grub-emu.c: Use above definitions from misc.h instead of
9564 * util/grub-mkdevicemap.c: Likewise.
9565 * util/i386/pc/grub-setup.c: Likewise.
9566 * util/grub-probe.c: Likewise.
9567 (probe): Abort with grub_util_error() when either
9568 grub_guess_root_device or grub_util_get_grub_dev fails.
9570 2007-06-12 Robert Millan <rmh@aybabtu.com>
9572 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9574 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9576 * util/grub-probe.c (probe): Likewise for "drive_name".
9578 2007-06-11 Robert Millan <rmh@aybabtu.com>
9580 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9581 not just the cdrom one.
9583 2007-06-11 Robert Millan <rmh@aybabtu.com>
9585 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9586 Add --pkglibdir=DIR option to override pkglibdir.
9587 Mention --image-type=TYPE in help output.
9588 Fix --grub-mkimage (it was a no-op).
9589 Abort gracefully when no parameter is given.
9591 2007-06-11 Robert Millan <rmh@aybabtu.com>
9593 * util/i386/pc/grub-mkrescue.in: New file.
9594 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9595 * Makefile.in: Handle bin_SCRIPTS.
9597 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9599 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9600 list of video modes.
9602 2007-06-06 Robert Millan <rmh@aybabtu.com>
9604 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9605 file doesn't exist, or if it is in a filesystem grub can't read.
9607 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9608 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9609 header comment to fit in 80 columns when the variables are resolved.
9611 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9612 could be identified by update-grub. Remove redundant check for
9613 unifont.pff existence (since convert_system_path_to_grub_path now
9616 2007-06-04 Robert Millan <rmh@aybabtu.com>
9618 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9620 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9622 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9624 2007-06-04 Robert Millan <rmh@aybabtu.com>
9626 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9628 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9629 grub_apple_partition_map_fini.
9632 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9633 to access >2 TiB disks).
9635 Print disk->total_sectors with %llu instead of %lu, since this
9636 variable is always 64-bit (prevents wrong disk size from being displayed
9637 on either >2 TiB disk or big-endian CPU).
9639 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9640 into a generic case that supports all (sane) partition maps.
9642 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9645 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9646 and grub_apple_partition_map_fini() after that.
9648 2007-06-01 Robert Millan <rmh@aybabtu.com>
9650 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9652 * util/grub.d/00_header.in: Only enable gfxterm when
9653 convert_system_path_to_grub_path() succeeds.
9655 2007-05-20 Robert Millan <rmh@aybabtu.com>
9657 * util/update-grub_lib.in: New file.
9658 * DISTLIST: Add update-grub_lib.in.
9659 * conf/common.rmk: Generate update-grub_lib and install it in
9661 * Makefile.in: Add install routine for $(lib_DATA).
9663 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9664 function provided by update-grub_lib to support arbitrary paths of
9666 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9667 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9669 2007-05-19 Robert Millan <rmh@aybabtu.com>
9671 * commands/i386/cpuid.c: New module.
9673 * conf/i386-efi.rmk: Enable cpuid.mod.
9674 * conf/i386-pc.rmk: Likewise.
9676 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9678 * kern/disk.c (grub_disk_read): Check return value of
9681 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9683 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9685 * disk/raid.c (grub_raid_open): Likewise.
9687 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9689 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9690 stack instead of on the heap.
9692 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9693 before doing a read on it.
9695 * configure.ac: Only use -fno-stack-protector for the target
9698 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9700 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9701 __attribute_ ((unused)) to mode_type argument.
9703 * util/getroot.c (grub_guess_root_device): Fix #endif.
9705 * kern/misc.c (memcmp): Fix prototype.
9707 * include/grub/partition.h [GRUB_UTIL]
9708 (grub_gpt_partition_map_init): Add prototype.
9709 (grub_gpt_partition_map_fini): Likewise.
9711 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9714 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9715 (grub_fat_read_data): Likewise.
9716 (grub_fat_find_dir): Likewise.
9718 * font/manager.c (find_glyph): Make table a const.
9719 (grub_font_get_glyph): Remove bitmap from if statement.
9721 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9723 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9724 code, first search for device in /dev/mapper, then in /dev.
9725 (grub_util_get_grub_dev): New function.
9726 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9728 * util/grub-probe.c (probe): Remove check for RAID, call
9729 grub_util_get_grub_dev() instead of
9730 grub_util_biosdisk_get_grub_dev().
9731 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9732 grub_util_biosdisk_get_grub_dev().
9733 * util/i386/pc/grub-setup.c (main): Likewise.
9735 2007-05-16 Robert Millan <rmh@aybabtu.com>
9737 * DISTLIST: Update for the latest changes.
9738 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9739 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9740 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9741 grub/util/biosdisk.h.
9742 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9743 grub/util/biosdisk.h.
9745 2007-05-16 Robert Millan <rmh@aybabtu.com>
9747 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9749 2007-05-16 Robert Millan <rmh@aybabtu.com>
9751 * util/i386/efi/grub-install.in: New.
9752 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9753 newly added grub-install.
9754 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9756 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9757 grub/util/biosdisk.h.
9758 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9759 grub/util/biosdisk.h.
9761 2007-05-16 Robert Millan <rmh@aybabtu.com>
9763 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9764 * include/grub/util/biosdisk.h: ... here.
9765 * util/i386/pc/biosdisk.c: Moved to ...
9766 * util/biosdisk.c: ... here.
9767 * util/i386/pc/getroot.c: Moved to ...
9768 * util/getroot.c: ... here.
9769 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9770 * util/grub-mkdevicemap.c: ... here.
9771 * util/i386/pc/grub-probe.c: Moved to ...
9772 * util/grub-probe.c: ... here.
9774 2007-05-15 Robert Millan <rmh@aybabtu.com>
9776 * util/update-grub.in: Remove duplicated line in grub.cfg header
9779 2007-05-13 Robert Millan <rmh@aybabtu.com>
9781 * util/update-grub.in: Fix a few assumptions about the devices holding
9782 /, /boot and /boot/grub being the same.
9783 * util/grub.d/00_header.in: Likewise.
9784 * util/grub.d/10_hurd.in: Likewise.
9785 * util/grub.d/10_linux.in: Likewise.
9787 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9788 patterns. Use that to define the `.old' suffix as older than `'.
9790 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9792 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9793 the grub.cfg header message.
9795 2007-05-11 Robert Millan <rmh@aybabtu.com>
9797 * util/update-grub.in: Create device.map if it doesn't already exist,
9798 before attempting to run grub-probe.
9799 Check for grub-probe and grub-mkdevicemap with the same code
9800 grub-install is using.
9803 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9805 * Makefile.in: Add the datarootdir autoconf variable.
9807 2007-05-09 Robert Millan <rmh@aybabtu.com>
9809 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9810 fail gracefully if dev->disk->partition == NULL.
9812 2007-05-07 Robert Millan <rmh@aybabtu.com>
9814 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9815 determine partition map module.
9816 * util/i386/pc/grub-install.in: Use this feature to decide which
9817 partition module to load, instead of hardcoding pc and gpt.
9819 2007-05-07 Robert Millan <rmh@aybabtu.com>
9821 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9822 source directory differs from build directory.
9824 2007-05-05 Robert Millan <rmh@aybabtu.com>
9826 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9829 2007-05-05 Robert Millan <rmh@aybabtu.com>
9831 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9833 2007-05-05 Robert Millan <rmh@aybabtu.com>
9835 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9836 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9838 2007-05-05 Robert Millan <rmh@aybabtu.com>
9840 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9841 (grub_probe_SOURCES): Likewise.
9842 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9843 GPT and initialize dos_part and bsd_part accordingly.
9844 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9846 (main): Activate gpt module for use during partition identification,
9847 and deactivate it afterwards.
9848 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9849 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9850 partition identification, and deactivate it afterwards.
9852 2007-05-05 Robert Millan <rmh@aybabtu.com>
9854 * term/i386/pc/console.c (grub_console_fini): Call
9855 grub_term_set_current() before grub_term_unregister().
9857 2007-05-04 Robert Millan <rmh@aybabtu.com>
9859 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9860 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9861 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
9862 and update-grub_DATA.
9863 * conf/common.rmk: Build and install update-grub components.
9864 * conf/common.mk: Regenerate.
9865 * util/update-grub.in: New. Core of update-grub.
9866 * util/grub.d/00_header.in: New. Generates grub.cfg header.
9867 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
9868 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
9869 * util/grub.d/README: New. Document grub.d directory layout.
9871 2007-05-01 Robert Millan <rmh@aybabtu.com>
9873 * util/grub-emu.c: Move initialization functions
9874 grub_util_biosdisk_init() and grub_init_all() before
9875 grub_util_biosdisk_get_grub_dev(), which relies on them.
9877 2007-04-19 Robert Millan <rmh@aybabtu.com>
9879 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9882 2007-04-18 Jerone Young <jerone@gmail.com>
9884 * kernel/elf.c: Add missing parenthesis for conditional statement
9887 2007-04-10 Jerone Young <jerone@gmail.com>
9889 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9890 continue on and look for device node with real device name.
9892 2007-04-10 Jerone Young <jerone@gmail.com>
9894 * configure.ac: Add argument for autoconf to use transformation
9896 * Makefile.in: Add autoconf package transformation code.
9897 * util/i386/pc/grub-install.in: Likewise.
9898 * util/powerpc/ieee1275/grub-install.in: Likewise.
9900 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9902 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9903 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9904 (EXT2_REVISION): Likewise.
9905 (EXT2_INODE_SIZE): Likewise.
9906 (struct grub_ext2_block_group): Added a missing member
9908 (grub_ext2_read_inode): Divide by the inode size in a superblock
9909 instead of 128 to obtain INODES_PER_BLOCK.
9910 Use the macro EXT2_INODE_SIZE instead of directly using
9913 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9915 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9916 superblock instead of the structure size to compute an
9917 offset. This fixes the problem that GRUB could not read a
9918 filesystem when inode size is different from 128-byte.
9920 2007-03-05 Marco Gerards <marco@gnu.org>
9922 * normal/main.c (read_config_file): When "menu" is not set, create
9925 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9927 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9928 (HEAP_LIMIT): New macro.
9929 (grub_claim_heap): Claim memory up to `heaplimit'.
9931 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9933 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9934 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9936 (grub_arch_modules_addr): Return address after `_end'.
9937 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9938 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9939 (add_segments): Calculate `_end' from phdr size and location.
9940 (ALIGN_UP): Moved to ...
9941 * include/grub/misc.h: here.
9942 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9944 (GRUB_IEEE1275_MODULE_BASE): Removed.
9946 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9948 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9951 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9953 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9955 (grub_elf64_load_hook_t): Likewise.
9956 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9959 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9961 * kern/mm.c: Update copyright.
9962 (grub_mm_debug): Correct syntax error.
9963 (grub_mm_dump_free): New function.
9964 (grub_debug_free): Call `grub_free'.
9965 * include/grub/mm.h: Update copyright.
9966 (grub_mm_dump_free): Add declaration.
9968 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9970 * include/grub/ieee1275/ieee1275.h: Update copyright.
9971 * kern/powerpc/ieee1275/init.c: Likewise.
9972 * kern/powerpc/ieee1275/openfw.c: Likewise.
9974 * loader/powerpc/ieee1275/linux.c: Likewise.
9975 * include/grub/elfload.h: Likewise.
9976 * kern/elf.c: Likewise.
9977 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9979 (grub_elf64_load): Likewise.
9980 (grub_elf32_load_segment): Move to a nested function.
9981 (grub_elf64_load_segment): Likewise.
9983 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9985 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9987 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9988 (grub_heap_len): Likewise.
9989 (HEAP_SIZE): New macro.
9990 (grub_claim_heap): New function.
9991 (grub_machine_init): Don't claim heap directly. Call
9993 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9994 (grub_available_iterate): New function.
9996 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9998 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9999 * configure.ac: Use it for testing the HOST and TARGET compilers.
10001 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
10003 * Makefile.in (enable_grub_emu): New variable.
10004 * configure.ac (--enable-grub-emu): New option.
10005 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10006 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10007 * conf/i386-pc.rmk: Likewise.
10008 * conf/powerpc-ieee1275.rmk: Likewise.
10009 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10011 2006-12-12 Marco Gerards <marco@gnu.org>
10013 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10015 * kern/env.c (grub_env_unset): Don't free the member `value' when
10016 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10019 * normal/main.c (current_menu): Removed.
10020 (free_menu): Unset the `menu' environment variable.
10021 (grub_normal_menu_addentry): Make use of the environment variable
10022 `menu', instead of using the global `current_menu'. Allocate
10023 memory for the sourcecode of this entry.
10024 (read_config_file): New argument `nested', changed all callers.
10025 Only in the case of a new context, initialize a new menu. Set the
10026 `menu' environment variable.
10027 (grub_normal_execute): Don't set and unset the environment
10028 variable `menu' here anymore. Only free the menu when leaving the
10031 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10034 2006-12-11 Marco Gerards <marco@gnu.org>
10036 * normal/menu_entry.c (run): Fix off by one bug so the last line
10037 is executed. Move the loader check to outside the loop.
10039 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
10041 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10043 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
10045 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10046 the number of sectors. Reported by Andrey Shuvikov
10047 <mr_hyro@yahoo.com>.
10049 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
10051 * kern/disk.c (grub_disk_read): When there is a read error, always
10052 try to read only the necessary data.
10054 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10056 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10058 [GRUB_UTIL] (grub_raid_fini): Likewise.
10059 [GRUB_UTIL] (grub_lvm_init): Likewise.
10060 [GRUB_UTIL] (grub_lvm_fini): Likewise.
10061 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10062 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10063 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10064 and grub_raid_fini().
10066 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
10068 * include/grub/types.h (__unused): Rename to UNUSED.
10069 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10070 (grub_elf64_size): Likewise.
10072 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10074 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10075 grub_error_push and grub_error_pop in the error-handling path.
10076 (grub_elf32_load_segment): Only call grub_file_read with non-zero
10079 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
10081 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10082 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10083 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10084 (kernel_elf_SOURCES): Likewise.
10085 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10086 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10087 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10088 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10089 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10090 (elf_mod_SOURCES): New variable.
10091 (elf_mod_CFLAGS): Likewise.
10092 (elf_mod_LDFLAGS): Likewise.
10093 * include/grub/types.h (__unused): New macro.
10094 * include/grub/elfload.h: New file.
10095 * kern/elf.c: Likewise.
10096 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10097 (ELF32_LOADMASK): New macro.
10098 (ELF64_LOADMASK): Likewise.
10099 (vmlinux): Removed.
10100 (grub_linux_load32): New function.
10101 (grub_linux_load64): Likewise.
10102 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10103 Use grub_elf_t instead of grub_file_t.
10105 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
10107 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10108 `catch_result' to struct set_color_args.
10110 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10112 * normal/menu.c: Include grub/script.h.
10113 * normal/menu_entry.c: Likewise.
10114 * include/grub/normal.h: Do not include grub/script.h.
10116 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10118 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10120 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10122 * kern/disk.c (grub_disk_open): Print debug messages when opening a
10124 (grub_disk_close): Print debug messages when closing a disk.
10125 (grub_disk_read): Print debug messages when disk read fails.
10126 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10128 * kern/partition.c: Include misc.h.
10129 (grub_partition_iterate): Print debug messages when detecting
10132 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
10134 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10136 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10138 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
10140 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10141 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10143 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10145 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10146 instead of sizeof(lv). Patch by Michael Guntsche.
10148 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10150 * disk/lvm.c: Rename VGS to VG_LIST.
10151 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10152 (grub_lvm_open): Likewise.
10153 Thanks to Michael Guntsche for finding this bug.
10155 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10157 * configure.ac (AC_INIT): Bumped to 1.95.
10159 2006-10-14 Robert Millan <rmh@aybabtu.com>
10161 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10162 with "/dev/.static/dev/md".
10164 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10166 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10167 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10168 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10169 DRIVE_NAME are always freed.
10171 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10172 DOS_PART, as a DOS partition is counted from one instead of zero
10173 now. Reported by Robert Millan.
10175 2006-10-14 Robert Millan <rmh@aybabtu.com>
10177 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10178 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10179 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10180 string returned by grub_guess_root_device.
10181 * util/i386/pc/grub-setup.c: Likewise.
10182 * util/i386/pc/grub-probefs.c: Likewise.
10184 * util/i386/pc/grub-probefs.c: Rename to ...
10185 * util/i386/pc/grub-probe.c: ... this.
10186 * DISTLIST: Remove grub-probefs, add grub-probe.
10187 * conf/i386-efi.rmk: Likewise.
10188 * conf/i386-pc.rmk: Likewise.
10189 * util/i386/pc/grub-install.in: Likewise.
10191 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10192 choose which information we want to print.
10194 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10196 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10197 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10198 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10199 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10200 video/readers/tga.c and video/i386/pc/vbeutil.c.
10202 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10204 Added support for RAID and LVM.
10206 * disk/lvm.c: New file.
10207 * disk/raid.c: Likewise.
10208 * include/grub/lvm.h: Likewise.
10209 * include/grub/raid.h: Likewise.
10210 * include/grub/util/lvm.h: Likewise.
10211 * include/grub/util/raid.h: Likewise.
10212 * util/lvm.c: Likewise.
10213 * util/raid.c: Likewise.
10215 * include/grub/disk.h (grub_disk_dev_id): Add
10216 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10217 (grub_disk_get_size): New prototype.
10218 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10219 returns a partition.
10220 (grub_disk_get_size): New function.
10222 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10223 verbatim if grub_install_dos_part is -2.
10225 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10228 * util/i386/pc/grub-setup.c (setup): New argument
10229 MUST_EMBED. Force embedding of GRUB when the argument is
10230 true. Close FILE before returning.
10231 (main): Add support for RAID and LVM.
10233 * conf/common.rmk: Add RAID and LVM modules.
10234 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10236 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10238 * kern/misc.c (grub_strstr): New function.
10239 * include/grub/misc.h (grub_strstr): New prototype.
10241 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10243 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10245 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10247 * kern/misc.c (grub_strtoull): Guess the base only if not
10250 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10252 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10255 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10257 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10259 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10260 Remove `flags' argument. All callers changed.
10261 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10262 (IEEE1275_IHANDLE_INVALID): New variable.
10263 (IEEE1275_CELL_INVALID): New variable.
10264 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10265 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10266 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10267 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10268 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10269 codes from Open Firmware. All callers updated.
10270 (grub_ieee1275_next_property): Directly return Open Firmware return
10272 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10273 Standardize error checking from `grub_ieee1275_get_property'.
10274 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10275 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10277 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10279 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10280 `instance_to_package_args' to `instance_to_path_args'.
10282 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10283 `grub_ieee1275_chosen'.
10285 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10286 `grub_ieee1275_interpret'.
10288 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10290 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10292 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10294 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10295 (__cmpdi): Likewise.
10297 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10298 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10301 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10303 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10304 to type `grub_ssize_t'.
10305 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10307 2006-09-22 Marco Gerards <marco@gnu.org>
10309 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10312 2006-09-22 Marco Gerards <marco@gnu.org>
10314 * commands/echo.c: New file.
10316 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10318 * conf/common.rmk (echo_mod_SOURCES): New variable.
10319 (echo_mod_CFLAGS): Likewise.
10320 (echo_mod_LDFLAGS): Likewise.
10322 2006-09-22 Marco Gerards <marco@gnu.org>
10324 * normal/main.c (get_line): Malloc memory instead of using
10325 preallocated memory. Removed the arguments `cmdline' and
10326 `max_len'. Updated all callers.
10328 2006-09-22 Marco Gerards <marco@gnu.org>
10330 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10331 (normal_mod_DEPENDENCIES): Likewise.
10333 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10334 (normal_mod_DEPENDENCIES): Likewise.
10336 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10338 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
10340 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10342 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10343 (normal_mod_DEPENDENCIES): Likewise.
10344 * conf/i386-pc.mk: Regenerate.
10345 * conf/i386-efi.mk: Likewise
10346 * conf/common.mk: Likewise.
10347 * conf/powerpc-ieee1275.mk: Likewise.
10348 * conf/sparc64-ieee1275.mk: Likewise.
10350 2006-09-22 Robert Millan <rmh@aybabtu.com>
10352 Sync with i386 version.
10353 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10354 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10356 2006-09-21 Robert Millan <rmh@aybabtu.com>
10358 Import from GRUB Legacy (lib/device.c):
10359 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10360 (init_device_map) [__linux__]: Add support for I2O devices.
10362 2006-09-14 Marco Gerards <marco@gnu.org>
10364 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10367 2006-09-14 Robert Millan <rmh@aybabtu.com>
10369 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10372 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10374 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10375 before adding it to device.map.
10377 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
10379 * genmk.rb: Let GCC generate dependencies the first time it
10380 compiles a file; using the -MD option.
10381 * conf/common.mk: Regenerate.
10382 * conf/i386-pc.mk: Likewise.
10383 * conf/i386-efi.mk: Likewise.
10384 * conf/powerpc-ieee1275.mk: Likewise.
10385 * conf/sparc64-ieee1275.mk: Likewise.
10387 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10389 Move the prototypes of grub_setjmp and grub_longjmp to
10390 cpu/setjmp.h, so that each architecture may specify different
10393 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10394 (grub_longjmp): Likewise.
10395 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10396 (grub_longjmp): Likewise.
10397 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10398 (grub_longjmp): Likewise.
10400 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10401 [!GRUB_UTIL] (grub_longjmp): Removed.
10403 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10405 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10406 "color!" method does not return any value.
10408 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10410 * include/grub/bitmap.h: New file.
10412 * include/grub/i386/pc/vbeutil.h: Likewise.
10414 * video/bitmap.c: Likewise.
10416 * video/readers/tga.c: Likewise.
10418 * video/i386/pc/vbeutil.c: Likewise.
10420 * commands/videotest.c: Code cleanup and updated to reflect to new
10423 * term/gfxterm.c: Likewise.
10425 * video/video.c: Likewise.
10427 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10428 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10429 (bitmap_mod_SOURCES): New entry.
10430 (bitmap_mod_CFLAGS): Likewise.
10431 (bitmap_mod_LDFLAGS): Likewise.
10432 (tga_mod_SOURCES): Likewise.
10433 (tga_mod_CFLAGS): Likewise.
10434 (tga_mod_LDFLAGS): Likewise.
10436 * include/grub/video.h (grub_video_blit_operators): New enum type.
10437 (grub_video_render_target): Changed as forward declaration and moved
10438 actual definition to be video driver specific.
10439 (grub_video_adapter.blit_bitmap): Added blitting operator.
10440 (grub_video_adapter.blit_render_target): Likewise.
10441 (grub_video_blit_bitmap): Likewise.
10442 (grub_video_blit_render_target): Likewise.
10444 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10445 driver specific render target definition.
10446 (grub_video_vbe_map_rgba): Added driver internal helper.
10447 (grub_video_vbe_unmap_color): Updated to use
10448 grub_video_i386_vbeblit_info.
10449 (grub_video_vbe_get_video_ptr): Likewise.
10451 * include/grub/i386/pc/vbeblit.h
10452 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10453 grub_video_i386_vbeblit_info.
10454 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10455 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10456 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10457 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10458 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10459 (grub_video_i386_vbeblit_index_index): Likewise.
10460 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10461 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10462 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10463 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10465 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10468 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10469 include/grub/i386/pc/vbeblit.h.
10471 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10472 Updated to use grub_video_i386_vbeblit_info.
10473 (grub_video_i386_vbefill_R8G8B8): Likewise.
10474 (grub_video_i386_vbefill_index): Likewise.
10475 (grub_video_i386_vbefill): Added generic filler.
10477 * video/i386/pc/vbefill.c: Updated to reflect changes on
10478 include/grub/i386/pc/vbefill.h.
10480 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10481 grub_video_i386_vbeblit_info.
10482 (grub_video_vbe_unmap_color): Likewise.
10483 (grub_video_vbe_blit_glyph): Likewise.
10484 (grub_video_vbe_scroll): Likewise.
10485 (grub_video_vbe_draw_pixel): Removed function.
10486 (grub_video_vbe_get_pixel): Likewise.
10487 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10488 updated code to use it.
10489 (common_blitter): Added common blitter for render target and bitmap.
10490 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10491 (grub_video_vbe_blit_render_target): Likewise.
10493 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
10495 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10496 is in text mode if there is no console control protocol instance
10499 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10501 * include/grub/video.h: Code cleanup.
10503 * include/grub/i386/pc/vbe.h: Likewise.
10505 * video/i386/pc/vbe.c: Likewise.
10507 * video/i386/pc/vbeblit.c: Likewise.
10509 * video/i386/pc/vbefill.c: Likewise.
10511 * video/video.c: Likewise. Also added more comments.
10513 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10515 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10516 (struct grub_biosdisk_dap): Likewise.
10518 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10519 linkage settings for all functions.
10521 2006-07-12 Marco Gerards <marco@gnu.org>
10523 * configure.ac (--enable-mm-debug): Fix typo.
10525 * genkernsyms.sh.in: Use proper quoting for `CC'.
10527 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10529 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10530 (normal_mod_ASFLAGS): Remove "-m32".
10532 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10534 * util/misc.c: Include config.h.
10535 [!HAVE_MEMALIGN]: Do not include malloc.h.
10536 (grub_memalign): Use posix_memalign, if present. Then, use
10537 memalign, if present. Otherwise, emit an error.
10539 * util/grub-emu.c: Do not include malloc.h.
10541 * include/grub/util/misc.h: Include unistd.h. This is required for
10542 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10543 D. Eades III <hde@foobar-qux.org>.
10545 * configure.ac (AC_GNU_SOURCE): Added.
10546 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10549 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10551 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10552 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10554 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10556 * include/grub/types.h (grub_host_addr_t): Rename to
10557 grub_target_addr_t.
10558 (grub_host_off_t): Rename to grub_target_off_t.
10559 (grub_host_size_t): Rename to grub_target_size_t.
10560 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10561 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10563 * include/grub/kernel.h (struct grub_module_header): Change type
10564 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10565 (grub_module_info): Likewise.
10567 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10569 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10570 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10571 Velazquez <jesus.velazquez@gmail.com>.
10573 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10575 Count partitions from 1 instead of 0 in the string representation
10576 of partitions. Still use 0-based internally.
10578 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10579 (sun_partition_map_iterate): Use grub_partition_t instead of
10580 struct grub_partition *. Cast DESC->START_CYLINDER to
10581 grub_uint64_t after converting the endian.
10582 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10583 (sun_partition_map_get_name): Add 1 to P->INDEX.
10585 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10587 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10589 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10590 zero instead of one.
10591 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10592 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10594 * partmap/apple.c (apple_partition_map_iterate): Change the type
10595 of POS to unsigned.
10596 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10597 (apple_partition_map_get_name): Add 1 into P->INDEX.
10599 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10600 of POS to unsigned.
10601 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10602 calculate the offset of a partition.
10603 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10604 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10606 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10607 SECTOR to grub_disk_addr_t.
10608 (acorn_partition_map_iterate): Likewise.
10609 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10610 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10612 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10614 * kern/i386/pc/init.c (make_install_device): Add 1 into
10615 GRUB_INSTALL_DOS_PART.
10617 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10620 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10622 Clean up the code to support 64-bit addressing in disks and
10623 files. This change is not enough for filesystems yet.
10625 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10626 type of "start" to grub_uint64_t.
10627 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10628 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10629 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10632 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10633 to grub_disk_addr_t.
10635 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10638 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10640 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10643 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10645 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10647 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10649 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10650 to grub_off_t, to detect an error from grub_file_seek.
10651 (grub_multiboot_load_elf32): Likewise.
10653 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10654 maximum unsigned long value when an overflow is detected.
10655 (grub_strtoull): New function.
10656 (grub_divmod64): Likewise.
10657 (grub_lltoa): use grub_divmod64.
10659 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10661 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10662 the pointer to next character. Use grub_strtoull instead of
10664 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10665 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10668 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10669 return value is signed.
10670 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10671 test if OFFSET is less than zero, as OFFSET is unsigned now.
10673 * kern/disk.c (struct grub_disk_cache): Change the type of
10674 "sector" to grub_disk_addr_t.
10675 (grub_disk_cache_get_index): Change the type of SECTOR to
10676 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10677 unsigned after shifting.
10678 (grub_disk_cache_invalidate): Change the type of SECTOR to
10680 (grub_disk_cache_unlock): Likewise.
10681 (grub_disk_cache_store): Likewise.
10682 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10683 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10684 grub_disk_addr_t and grub_uint64_t, respectively.
10685 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10686 body, as the value of OFFSET is tweaked by
10687 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10688 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10690 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10691 body, as the value of OFFSET is tweaked by
10692 grub_disk_check_range. Change the types of LEN and N to
10695 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10696 and "saved_offset" to grub_off_t.
10697 (test_header): Cast BUF to char *.
10698 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10700 (grub_gzio_read): Change the types of OFFSET and SIZE to
10701 grub_off_t and grub_size_t, respectively.
10703 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10705 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10706 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10707 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10708 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10709 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10711 * include/grub/types.h (grub_off_t): Unconditionally set to
10713 (grub_disk_addr_t): Changed to grub_uint64_t.
10715 * include/grub/partition.h (struct grub_partition): Change the
10716 types of "start", "len" and "offset" to grub_disk_addr_t,
10717 grub_uint64_t and grub_disk_addr_t, respectively.
10718 (grub_partition_get_start): Return grub_disk_addr_t.
10719 (grub_partition_get_len): Return grub_uint64_t.
10721 * include/grub/misc.h (grub_strtoull): New prototype.
10722 (grub_divmod64): Likewise.
10724 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10725 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10726 grub_off_t, respectively.
10727 All callers and references changed.
10729 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10730 grub_size_t in "read".
10731 All callers and references changed.
10733 * include/grub/file.h (struct grub_file): Change the types of
10734 "offset" and "size" to grub_off_t and grub_off_t,
10735 respectively. Change the type of SECTOR to grub_disk_addr_t in
10737 (grub_file_read): Change the type of LEN to grub_size_t.
10738 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10740 (grub_file_size): Return grub_off_t.
10741 (grub_file_tell): Likewise.
10742 All callers and references changed.
10744 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10745 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10747 (struct grub_disk): Change the type of "total_sectors" to
10748 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10750 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10751 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10752 (grub_disk_write): Likewise.
10753 All callers and references changed.
10755 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10756 char * for grub_strncmp to silence gcc.
10757 (grub_iso9660_mount): Likewise.
10758 (grub_iso9660_mount): Likewise.
10759 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10761 (grub_iso9660_iterate_dir): Likewise.
10762 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10764 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10765 LEN to grub_disk_addr_t and grub_size_t, respectively.
10767 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10769 * fs/jfs.c (grub_jfs_read_file): Likewise.
10771 * fs/minix.c (grub_jfs_read_file): Likewise.
10773 * fs/sfs.c (grub_jfs_read_file): Likewise.
10775 * fs/ufs.c (grub_jfs_read_file): Likewise.
10777 * fs/xfs.c (grub_jfs_read_file): Likewise.
10779 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10780 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10783 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10784 BLKNR to -1 instead of returning GRUB_ERRNO.
10785 (grub_ext2_read_file): Change the types of SECTOR and
10786 LEN to grub_disk_addr_t and grub_size_t, respectively.
10788 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10789 LEN to grub_disk_addr_t and grub_size_t, respectively.
10791 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10794 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10795 string. Do not cast SECTOR explicitly.
10797 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10798 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10799 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10800 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10801 over 2TB and LBA mode is not supported, raise an error.
10802 (get_safe_sectors): New function.
10803 (grub_biosdisk_read): Use get_safe_sectors.
10804 (grub_biosdisk_write): Likewise.
10806 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10807 (grub_efidisk_write): Likewise.
10809 * disk/loopback.c (delete_loopback): Cosmetic changes.
10810 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10812 (grub_loopback_open): Likewise.
10813 (grub_loopback_read): Likewise. Also, change the type of POS to
10814 grub_off_t, and fix the usage of grub_memset.
10816 * commands/i386/pc/play.c: Include grub/machine/time.h.
10818 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10821 * commands/configfile.c: Include grub/env.h.
10823 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10824 GRUB_ERRNO directly instead. Change the type of POS to
10825 grub_off_t. Follow the coding standard.
10827 * commands/blocklist.c: Include grub/partition.h.
10828 (grub_cmd_blocklist): Return an error if the underlying device is
10829 not a disk. Take the starting sector of a partition into account,
10830 if a partition is used.
10832 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10834 (lba_mode): Support 64-bit addresses.
10835 (chs_mode): Likewise.
10836 (copy_buffer): Adapted to the new offsets of a length field and a
10838 (blocklist_default_start): Allocate 64-bit space.
10840 * boot/i386/pc/boot.S (force_lba): Removed.
10841 (boot_drive): Moved to under KERNEL_SECTOR.
10842 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10844 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10846 (lba_mode): Refactored to support a 64-bit address. More size
10848 (setup_sectors): Likewise.
10850 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10852 * DISTLIST: Added include/grub/i386/linux.h. Removed
10853 include/grub/i386/pc/linux.h
10855 * configure.ac (AC_INIT): Bumped to 1.94.
10857 * config.guess: Updated from gnulib.
10858 * config.sub: Likewise.
10859 * install-sh: Likewise.
10860 * mkinstalldirs: Likewise.
10862 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10864 * conf/common.rmk (grub_modules_init.lst): Depended on
10865 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10868 * genmk.rb (PModule::rule): Reverted the previous change.
10870 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10872 * conf/common.rmk (grub_modules_init.lst): Depends on
10873 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10874 that the target does not exist before producing.
10875 (grub_modules_init.h): Remove the target before generating.
10876 (grub_emu_init.c): Likewise.
10878 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10880 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
10882 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10883 for the target-specific tests. Make sure that we also have the
10884 up-to-date target variables for those tests.
10886 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10888 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10889 (PModule::rule): Likewise.
10891 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10893 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10894 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10895 target-specific flags should be prefixed.
10896 (PModule::rule): Likewise.
10898 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
10900 * configure.ac (CMP): Check if cmp is available explicitly.
10902 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
10904 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10905 (target_cpu): New variable.
10906 (pkglibdir): Use target_cpu instead of host_cpu.
10908 * util/i386/pc/grub-install.in (host_cpu): Removed.
10909 (target_cpu): New variable.
10910 (pkglibdir): Use target_cpu instead of host_cpu.
10912 * util/genmoddep.c: Removed.
10914 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10915 instead of GRUB_HOST_SIZEOF_VOID_P.
10916 * kern/dl.c: Likewise.
10918 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10920 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10921 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10922 (GRUB_TARGET_SIZEOF_LONG): ... this.
10923 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10924 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10925 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10927 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10928 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10929 (GRUB_TARGET_SIZEOF_LONG): ... this.
10930 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10931 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10932 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10934 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10935 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10936 (GRUB_TARGET_SIZEOF_LONG): ... this.
10937 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10938 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10940 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10941 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10942 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10943 instead of GRUB_HOST_SIZEOF_LONG.
10944 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10945 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10946 GRUB_CPU_WORDS_BIGENDIAN.
10947 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10948 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10951 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10952 (genmoddep_SOURCES): Likewise.
10953 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10954 (genmoddep_SOURCES): Likewise.
10955 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10956 (genmoddep_SOURCES): Likewise.
10957 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10959 (genmoddep_SOURCES): Likewise.
10961 * genmoddep.awk: New file.
10963 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10964 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10965 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10966 (PModule::rule): Likewise.
10967 (Program::rule): Likewise.
10968 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10969 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10972 * configure.ac: Rewritten intensively to use host and target
10973 instead of build and host, respectively.
10975 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10976 (host_cpu): Removed.
10977 (target_cpu): New variable.
10978 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10979 (BUILD_CC): Removed.
10980 (BUILD_CFLAGS): Likewise.
10981 (BUILD_CPPFLAGS): Likewise.
10982 (TARGET_CC): New variable.
10983 (TARGET_CFLAGS): Likewise.
10984 (TARGET_CPPFLAGS): Likewise.
10985 (TARGET_LDFLAGS): Likewise.
10987 (include): Use target_cpu instead of host_cpu.
10988 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
10990 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10992 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10994 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10995 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10996 field 'false' to 'exec_on_false'.
10997 (grub_script_create_cmdif): Renamed argument names to reflect above
11000 * normal/execute.c (grub_script_execute_cmdif): Likewise.
11002 * normal/script.c (grub_script_create_cmdif): Likewise.
11004 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
11006 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11008 (grub_hfsplus_btree_recptr): Likewise.
11009 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11010 FILEBLOCK both to pass a block number and store next block
11012 (grub_hfsplus_read_block): Rewritten heavily to support an extent
11013 overflow file correctly. Specify errors appropriately, because
11014 fshelp expects that GRUB_ERRNO is set when fails. Reuse
11015 grub_hfsplus_btree_recptr to get the pointer to a found key.
11016 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11019 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11021 (_linux_mod_SOURCES): New variable.
11022 (_linux_mod_CFLAGS): Likewise.
11023 (_linux_mod_LDFLAGS): Likewise.
11024 (linux_mod_SOURCES): Likewise.
11025 (linux_mod_CFLAGS): Likewise.
11026 (linux_mod_LDFLAGS): Likewise.
11028 * DISTLIST: Added loader/i386/efi/linux.c,
11029 loader/i386/efi/linux_normal.c and
11030 include/grub/i386/efi/loader.h.
11032 * loader/i386/efi/linux.c: New file.
11033 * loader/i386/efi/linux_normal.c: Likewise.
11034 * include/grub/i386/efi/loader.h: Likewise.
11036 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
11038 * commands/blocklist.c: New file.
11040 * DISTLIST: Added commands/blocklist.c.
11042 * term/efi/console.c (grub_console_highlight_color): Use a lighter
11043 color for the background, and a darker color for the foreground.
11044 (grub_console_checkkey): Return READ_KEY.
11045 (grub_console_cls): Set the background to
11046 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11048 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11050 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11051 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11053 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11056 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11057 BG. The spec is wrong again.
11059 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11061 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11063 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11064 commands/blocklist.c.
11065 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11067 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11068 (blocklist_mod_SOURCES): New variable.
11069 (blocklist_mod_CFLAGS): Likewise.
11070 (blocklist_mod_LDFLAGS): Likewise.
11072 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
11074 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11076 (lba_mode): Use %eax more intensively to reduce the code size.
11078 2006-05-20 Marco Gerards <marco@gnu.org>
11080 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11082 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
11084 (script): Accept leading newlines.
11085 (newlines): New rule to describe 0 or more newlines.
11086 (commands): Accept `command' with trailing newline. Fixed the
11087 order in which arguments were passed to `grub_script_add_cmd'.
11088 Accept commands separated by newlines.
11089 (function): Changed to accept newlines.
11090 (menuentry) Rewritten.
11092 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11093 front of the list, instead of to the end.
11095 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
11097 * util/i386/pc/grub-install.in (bindir): New variable.
11098 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11099 Shaver <lbgwjl@gmail.com>.
11101 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
11103 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11104 grub/machine/linux.h
11105 * loader/i386/pc/linux.c: Likewise.
11107 * include/grub/i386/pc/linux.h: Moved to ...
11108 * include/grub/i386/linux.h: ... here.
11110 * include/grub/i386/linux.h (struct linux_kernel_params): New
11113 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
11115 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11117 (grub_video_vbe_blit_glyph): Likewise.
11118 (grub_video_vbe_blit_bitmap): Likewise.
11119 (grub_video_vbe_blit_render_target): Likewise.
11121 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
11123 * configure.ac (--with-platform): Properly quote the square
11126 2006-05-08 Marco Gerards <marco@gnu.org>
11128 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11130 (kernel_elf_HEADERS): ...to this. Updated all users.
11131 (grubof_symlist.c): Renamed from this...
11132 (kernel_elf_symlist.c): ...to this. Updated all users.
11133 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11134 (grubof_SOURCES): Renamed from this...
11135 (kernel_elf_SOURCES): ...to this.
11136 (grubof_HEADERS): Renamed from this...
11137 (kernel_elf_HEADERS): ...to this.
11138 (grubof_CFLAGS): Renamed from this...
11139 (kernel_elf_CFLAGS): ...to this.
11140 (grubof_ASFLAGS): Renamed from this...
11141 (kernel_elf_ASFLAGS): ...to this.
11142 (grubof_LDFLAGS): Renamed from this...
11143 (kernel_elf_LDFLAGS): ...to this.
11145 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11147 (kernel_elf_HEADERS): ...to this. Updated all users.
11148 (grubof_symlist.c): Renamed from this...
11149 (kernel_elf_symlist.c): ...to this. Updated all users.
11150 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11151 (grubof_SOURCES): Renamed from this...
11152 (kernel_elf_SOURCES): ...to this.
11153 (grubof_HEADERS): Renamed from this...
11154 (kernel_elf_HEADERS): ...to this.
11155 (grubof_CFLAGS): Renamed from this...
11156 (kernel_elf_CFLAGS): ...to this.
11157 (grubof_ASFLAGS): Renamed from this...
11158 (kernel_elf_ASFLAGS): ...to this.
11159 (grubof_LDFLAGS): Renamed from this...
11160 (kernel_elf_LDFLAGS): ...to this.
11162 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11163 `kernel.elf' instead of `grubof'.
11165 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11167 Add --with-platform to configure. Use pkglibdir instead of
11168 pkgdatadir. This is reported by Roger Leigh.
11170 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11171 (host_vendor): Likewise.
11172 (host_os): Likewise.
11173 (pkgdatadir): Likewise.
11174 (platform): New variable.
11175 (pkglibdir): Likewise.
11176 Use PKGLIBDIR instead of PKGDATADIR.
11178 * util/i386/pc/grub-install.in (datadir): Removed.
11179 (host_vendor): Likewise.
11180 (host_os): Likewise.
11181 (pkgdatadir): Likewise.
11182 (platform): New variable.
11183 (pkglibdir): Likewise.
11184 Use PKGLIBDIR instead of PKGDATADIR.
11186 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11187 instead of GRUB_DATADIR.
11189 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11191 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11194 * configure.ac (--with-platform): New option.
11195 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11197 * Makefile.in: Include a makefile based on PLATFORM instead of
11199 (pkgdatadir): Not appended by the machine type.
11200 (pkglibdir): Appended by the machine type.
11201 (host_vendor): Removed.
11202 (platform): New variable.
11203 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11204 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11205 (uninstall): Likewise.
11207 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11209 Use the environment context in the menu. Remove the commands
11210 "default" and "timeout", and use variables instead.
11212 * normal/menu.c: Include grub/env.h.
11213 (print_entry): Cast TITLE to silence gcc.
11214 (get_timeout): New function.
11215 (set_timeout): Likewise.
11216 (get_entry_number): Likewise.
11217 (run_menu): Use a default entry, a fallback entry and a timeout
11218 in the environment variables "default", "fallback" and
11219 "timeout". Also, tweak the default entry if it is not within the
11220 current menu entries.
11221 (grub_menu_run): Use a fallback entry in the environment variable
11224 * normal/main.c (read_config_file): Do not initialize
11225 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11227 (grub_normal_execute): Use a data slot to store the menu.
11229 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11230 fallback_entry and timeout.
11231 (struct grub_menu_list): Removed.
11232 (grub_menu_list_t): Likewise.
11233 (struct grub_context): Likewise.
11234 (grub_context_t): Likewise.
11235 (grub_context_get): Likewise.
11236 (grub_context_get_current_menu): Likewise.
11237 (grub_context_push_menu): Likewise.
11238 (grub_context_pop_menu): Likewise.
11239 (grub_default_init): Likewise.
11240 (grub_default_fini): Likewise.
11241 (grub_timeout_init): Likewise.
11242 (grub_timeout_fini): Likewise.
11244 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11246 (normal_mod_SOURCES): Removed normal/context.c.
11248 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11249 commands/default.c, commands/timeout.c and normal/context.c.
11250 (normal_mod_SOURCES): Removed normal/context.c.
11252 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11253 commands/timeout.c and normal/context.c.
11254 (normal_mod_SOURCES): Removed normal/context.c.
11256 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11257 commands/default.c, commands/timeout.c and normal/context.c.
11258 (normal_mod_SOURCES): Removed normal/context.c.
11260 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11262 (default_mod_SOURCES): Removed.
11263 (default_mod_CFLAGS): Likewise.
11264 (default_mod_LDFLAGS): Likewise.
11265 (timeout_mod_SOURCES): Removed.
11266 (timeout_mod_CFLAGS): Likewise.
11267 (timeout_mod_LDFLAGS): Likewise.
11269 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11272 * commands/default.c: Removed.
11273 * commands/timeout.c: Likewise.
11274 * normal/context.c: Likewise.
11276 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11278 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11280 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11282 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11283 "next" to "prev" for readability.
11284 (struct grub_env_sorted_var): New struct.
11285 (grub_env_context): Renamed to ...
11286 (initial_context): ... this.
11287 (grub_env_var_context): Renamed to ...
11288 (current_context): ... this.
11289 (grub_env_find): Look only at CURRENT_CONTEXT.
11290 (grub_env_context_open): Rewritten to copy exported variables from
11292 (grub_env_context_close): Rewritten according to the new
11293 scheme. Also, add an assertion to prevent the initial context from
11295 (grub_env_insert): Removed the code for the sorted list.
11296 (grub_env_remove): Likewise.
11297 (grub_env_export): Simply mark the variable with
11298 GRUB_ENV_VAR_GLOBAL.
11299 (grub_env_set): A cosmetic change for naming consistency.
11300 (grub_env_get): Likewise.
11301 (grub_env_unset): Likewise.
11302 (grub_env_iterate): Rewritten to sort variables within this
11304 (grub_register_variable_hook): Fixed for naming consistency. Call
11305 grub_env_find again, only if NAME is not found at the first time.
11306 (mangle_data_slot_name): New function.
11307 (grub_env_set_data_slot): Likewise.
11308 (grub_env_get_data_slot): Likewise.
11309 (grub_env_unset_data_slot): Likewise.
11311 * include/grub/env.h (grub_env_var_type): New enum.
11312 (GRUB_ENV_VAR_LOCAL): New constant.
11313 (GRUB_ENV_VAR_GLOBAL): Likewise.
11314 (GRUB_ENV_VAR_DATA): Likewise.
11315 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11317 (grub_env_set): Replace VAR with NAME for consistency.
11318 (grub_register_variable_hook): Likewise.
11319 (grub_env_export): Specify the name of the argument.
11320 (grub_env_set_data_slot): New prototype.
11321 (grub_env_get_data_slot): Likewise.
11322 (grub_env_unset_data_slot): Likewise.
11324 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11326 Extend the loader so that GRUB can accept a loader which comes
11327 back to GRUB when a loaded image exits. Also, this change adds
11328 support for a chainloader on EFI.
11330 * term/efi/console.c: Include grub/misc.h.
11331 (grub_console_checkkey): Display a scan code on the top for
11332 debugging. This will be removed once the EFI port gets stable.
11333 Correct the scan code mapping.
11335 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11336 allocate memory from larger regions, in order to reduce the number
11337 of allocated regions. Otherwise, the MacOSX loader panics.
11338 (filter_memory_map): Avoid less than 1MB for compatibility with
11340 (add_memory_regions): Allocate from the tail of a region, if
11341 possible, to avoid allocating a region near to 1MB, for the MacOSX
11344 * kern/efi/init.c (grub_efi_set_prefix): Specify
11345 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11347 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11348 argument IMAGE_HANDLE and specify it to get a loaded image.
11349 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11350 grub_efi_get_loaded_image.
11351 (grub_efi_get_filename): Divide the length by the size of
11353 (grub_efi_get_device_path): New function.
11354 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11355 the length by the size of grub_efi_char16_t for a file path device
11358 * kern/loader.c (grub_loader_noreturn): New variable.
11359 (grub_loader_set): Accept a new argument NORETURN. Set
11360 GRUB_LOADER_NORETURN to NORETURN.
11361 All callers changed.
11362 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11365 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11367 (grub_efi_get_loaded_image): Take an argument to specify an image
11370 * include/grub/loader.h (grub_loader_set): Added one more argument
11373 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11374 instead of grub_efi_open_protocol.
11375 (grub_efidisk_get_device_name): Likewise.
11376 (grub_efidisk_close): Print a newline.
11377 (grub_efidisk_get_device_handle): Fixed to use
11378 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11379 GRUB_EFI_DEVICE_PATH_TYPE.
11381 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11382 * kern/efi/efi.c (device_path_guid): ... here.
11384 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11386 (kernel_mod_HEADERS): Added efi/disk.h.
11387 (_chain_mod_SOURCES): New variable.
11388 (_chain_mod_CFLAGS): Likewise.
11389 (_chain_mod_LDFLAGS): Likewise.
11390 (chain_mod_SOURCES): Likewise.
11391 (chain_mod_CFLAGS): Likewise.
11392 (chain_mod_LDFLAGS): Likewise.
11394 * DISTLIST: Added include/grub/efi/chainloader.h,
11395 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11397 * include/grub/efi/chainloader.h: New file.
11398 * loader/efi/chainloader.c: Likewise.
11399 * loader/efi/chainloader_normal.c: Likewise.
11401 2006-04-30 Marco Gerards <marco@gnu.org>
11403 * commands/configfile.c (grub_cmd_source): New function.
11404 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11405 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11407 2006-04-30 Marco Gerards <marco@gnu.org>
11409 * normal/execute.c (grub_script_execute_cmd): Change the return
11410 type to `grub_err_t'. Correctly return the error.
11411 (grub_script_execute_cmdline): In case a command line is not a
11412 command or a function, try to interpret it as an assignment.
11414 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11416 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11417 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11418 skip a node whose name is obviously invalid as UTF-16,
11419 i.e. contains a NUL character. Stop the iteration when the last
11420 directory entry is found. Instead of using the return value of
11421 grub_hfsplus_btree_iterate_node, store the value in RET and use
11422 it, because the iterator can be stopped by the last directory
11425 2006-04-30 Marco Gerards <marco@gnu.org>
11427 * include/grub/env.h (grub_env_export): New prototype. Reported
11428 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11430 2006-04-30 Marco Gerards <marco@gnu.org>
11432 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11433 size of the extents in a catalog file record.
11435 2006-04-29 Marco Gerards <marco@gnu.org>
11437 * commands/configfile.c (grub_cmd_configfile): Execute the
11438 configfile within its own context.
11440 * include/grub/env.h (grub_env_context_open): New prototype.
11441 (grub_env_context_close): Likewise.
11443 * kern/env.c (grub_env): Removed.
11444 (grub_env_sorted): Likewise.
11445 (grub_env_context): New variable.
11446 (grub_env_var_context): Likewise.
11447 (grub_env_find): Search both the active context and the global
11449 (grub_env_context_open): New function.
11450 (grub_env_context_close): Likewise.
11451 (grub_env_insert): Likewise.
11452 (grub_env_remove): Likewise.
11453 (grub_env_export): Likewise.
11454 (grub_env_set): Changed to use helper functions to avoid code
11456 (grub_env_iterate): Rewritten so both the current context and the
11457 global context are being used.
11459 * normal/command.c (export_command): New function.
11460 (grub_command_init): Register the `export' function.
11462 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11464 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11465 explicitly to suppress gcc's warnings.
11466 * fs/fat.c (grub_fat_find_dir): Likewise.
11467 (grub_fat_label): Likewise.
11468 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11469 (grub_xfs_mount): Likewise.
11470 (grub_xfs_label): Likewise.
11471 * fs/affs.c (grub_affs_mount): Likewise.
11472 (grub_affs_label): Likewise.
11473 (grub_affs_iterate_dir): Likewise.
11474 * fs/sfs.c (grub_sfs_mount): Likewise.
11475 (grub_sfs_iterate_dir): Likewise.
11476 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11477 * fs/hfs.c (grub_hfs_mount): Likewise.
11478 (grub_hfs_cmp_catkeys): Likewise.
11479 (grub_hfs_find_dir): Likewise.
11480 (grub_hfs_dir): Likewise.
11481 (grub_hfs_label): Likewise.
11482 * fs/jfs.c (grub_jfs_mount): Likewise.
11483 (grub_jfs_opendir): Likewise.
11484 (grub_jfs_getent): Likewise.
11485 (grub_jfs_lookup_symlink): Likewise.
11486 (grub_jfs_label): Likewise.
11487 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11488 (grub_hfsplus_iterate_dir): Likewise.
11489 (grub_hfsplus_btree_iterate_node): Made static.
11491 * util/grub-emu.c (prefix): New variable.
11492 (grub_machine_set_prefix): New function.
11493 (main): Do not set the environment variable "prefix" here. Only
11494 set PREFIX, which is used later by grub_machine_set_prefix.
11496 * include/grub/video.h: Do not include grub/symbol.h.
11497 (grub_video_register): Not exported. This symbol is not defined in
11499 (grub_video_unregister): Likewise.
11500 (grub_video_iterate): Likewise.
11501 (grub_video_setup): Likewise.
11502 (grub_video_restore): Likewise.
11503 (grub_video_get_info): Likewise.
11504 (grub_video_get_blit_format): Likewise.
11505 (grub_video_set_palette): Likewise.
11506 (grub_video_get_palette): Likewise.
11507 (grub_video_set_viewport): Likewise.
11508 (grub_video_get_viewport): Likewise.
11509 (grub_video_map_color): Likewise.
11510 (grub_video_map_rgb): Likewise.
11511 (grub_video_map_rgba): Likewise.
11512 (grub_video_fill_rect): Likewise.
11513 (grub_video_blit_glyph): Likewise.
11514 (grub_video_blit_bitmap): Likewise.
11515 (grub_video_blit_render_target): Likewise.
11516 (grub_video_scroll): Likewise.
11517 (grub_video_swap_buffers): Likewise.
11518 (grub_video_create_render_target): Likewise.
11519 (grub_video_delete_render_target): Likewise.
11520 (grub_video_set_active_render_target): Likewise.
11522 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11524 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11526 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11527 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11528 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11529 instead of $(srcdir)/genkernsyms.sh.
11531 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11532 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11533 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11534 instead of $(srcdir)/genkernsyms.sh.
11536 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11537 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11538 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11539 instead of $(srcdir)/genkernsyms.sh.
11541 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11542 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11543 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11544 instead of $(srcdir)/genkernsyms.sh.
11546 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11549 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11551 (gensymlist.sh): New target.
11552 (genkernsyms.sh): Likewise.
11554 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11555 genkernsyms.sh.in and gensymlist.sh.in.
11557 * genkernsyms.sh: Removed.
11558 * gensymlist.sh: Likewise.
11560 * genkernsyms.sh.in: New file.
11561 * gensymlist.sh.in: Likewise.
11563 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11565 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11566 clobber "prefix", since we may have already set it manually.
11568 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11570 * kern/misc.c (abort): New alias for grub_abort.
11572 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11574 A new machine-specific function "grub_machine_set_prefix" is
11575 defined. This is called after loading modules, so that a prefix
11576 initialization can use modules. Also, this change adds an
11577 intensive debugging feature for the memory manager via the
11578 configure option "--enable-mm-debug".
11580 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11583 * kern/sparc64/ieee1275/init.c (abort): Removed.
11584 (grub_stop): Likewise.
11585 (grub_exit): New function.
11586 (grub_set_prefix): Renamed to ...
11587 (grub_machine_set_prefix): ... this.
11588 (grub_machine_init): Do not call grub_set_prefix.
11590 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11591 (grub_machine_set_prefix): ... this.
11592 (grub_machine_init): Do not call grub_set_prefix.
11594 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11595 (grub_machine_init): Do not set the prefix here.
11597 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11599 * kern/efi/init.c: Include grub/mm.h.
11600 (grub_efi_set_prefix): New function.
11602 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11603 (grub_efi_get_filename): New function.
11604 (grub_print_device_path): Renamed to ...
11605 (grub_efi_print_device_path): ... this.
11607 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11608 [MM_DEBUG] (grub_realloc): Likewise.
11609 [MM_DEBUG] (grub_free): Likewise.
11610 [MM_DEBUG] (grub_memalign): Likewise.
11611 [MM_DEBUG] (grub_mm_debug): New variable.
11612 [MM_DEBUG] (grub_debug_malloc): New function.
11613 [MM_DEBUG] (grub_debug_free): New function.
11614 [MM_DEBUG] (grub_debug_realloc): New function.
11615 [MM_DEBUG] (grub_debug_memalign): New function.
11617 * kern/misc.c (grub_abort): Print a newline to distinguish
11620 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11621 grub_set_root_dev after loading modules. This is necessary when
11622 setting a prefix depends on modules.
11624 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11625 (grub_efi_print_device_path): ... this.
11626 (grub_efi_get_filename): New prototype.
11627 (grub_efi_set_prefix): Likewise.
11629 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11631 (grub_efidisk_get_device_handle): New prototype.
11632 (grub_efidisk_get_device_name): Likewise.
11634 * include/grub/mm.h: Include config.h.
11635 (MM_DEBUG): Removed.
11636 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11637 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11638 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11639 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11640 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11641 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11642 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11643 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11644 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11646 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11648 * disk/efi/efidisk.c: Include grub/partition.h.
11649 (iterate_child_devices): New function.
11650 (add_device): First, compare only last device path nodes, so that
11651 devices are sorted by the types.
11652 (grub_efidisk_get_device_handle): New function.
11653 (grub_efidisk_get_device_name): Likewise.
11655 * configure.ac (--enable-mm-debug): New option to enable the
11656 memory manager debugging feature. This makes the binary much
11657 bigger, so is disabled by default.
11659 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11661 Use grub_abort instead of grub_stop, and grub_exit must be
11662 define in each architecture now. Also, this change adds support
11665 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11666 (grub_getkey): New function.
11667 (grub_term_get_current): Likewise.
11669 * util/i386/pc/grub-setup.c: Include grub/term.h.
11670 (grub_getkey): New function.
11671 (grub_term_get_current): Likewise.
11673 * util/misc.c (grub_stop): Renamed to ...
11674 (grub_exit): ... this.
11676 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11677 (grub_exit): ... this.
11678 (grub_machine_init): Use grub_abort instead of abort.
11679 (grub_stop): Removed.
11681 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11684 * kern/i386/pc/startup.S (grub_exit): New function.
11685 (cold_reboot): New label.
11687 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11688 (grub_efi_init): Call grub_efidisk_init.
11689 (grub_efi_fini): Call grub_efidisk_fini.
11691 * kern/efi/efi.c: Include grub/mm.h.
11692 (grub_efi_console_control_guid): Renamed to ...
11693 (console_control_guid): ... this.
11694 (grub_efi_loaded_image_guid): Renamed to ...
11695 (loaded_image_guid): ... this.
11696 (grub_efi_locate_handle): New function.
11697 (grub_efi_open_protocol): Likewise.
11698 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11699 GRUB_EFI_CONSOLE_CONTROL_GUID.
11700 (grub_efi_exit): Removed.
11701 (grub_stop): Likewise.
11702 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11703 (grub_exit): New function.
11704 (grub_print_device_path): Likewise.
11706 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11707 (grub_enter_rescue_mode): Register "exit".
11709 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11710 (grub_abort): New function.
11712 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11714 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11716 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11718 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11719 (grub_print_device_path): New prototype.
11720 (grub_efi_locate_handle): Likewise.
11721 (grub_efi_open_protocol): Likewise.
11723 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11724 * disk/efi/efidisk.c: Likewise.
11726 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11728 * include/grub/efi/console_control.h
11729 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11731 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11732 last 8 bytes as an array.
11733 (GRUB_EFI_DISK_IO_GUID): New macro.
11734 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11735 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11736 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11738 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11739 (struct grub_efi_device_path): Rename the member "sub_type" to
11741 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11742 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11743 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11744 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11745 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11746 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11747 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11748 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11749 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11750 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11751 (struct grub_efi_pci_device_path): New structure.
11752 (grub_efi_pci_device_path_t): New type.
11753 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11754 (struct grub_efi_pccard_device_path): New structure.
11755 (grub_efi_pccard_device_path_t): New type.
11756 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11757 (struct grub_efi_memory_mapped_device_path): New structure.
11758 (grub_efi_memory_mapped_device_path_t): New type.
11759 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11760 (struct grub_efi_vendor_device_path): New structure.
11761 (grub_efi_vendor_device_path_t): New type.
11762 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11763 (struct grub_efi_controller_device_path): New structure.
11764 (grub_efi_controller_device_path_t): New type.
11765 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11766 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11767 (struct grub_efi_acpi_device_path): New structure.
11768 (grub_efi_acpi_device_path_t): New type.
11769 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11770 (struct grub_efi_expanded_acpi_device_path): New structure.
11771 (grub_efi_expanded_acpi_device_path_t): New type.
11772 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11773 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11774 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11775 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11776 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11777 (struct grub_efi_atapi_device_path): New structure.
11778 (grub_efi_atapi_device_path_t): New type.
11779 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11780 (struct grub_efi_fibre_channel_device_path): New structure.
11781 (grub_efi_fibre_channel_device_path_t): New type.
11782 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11783 (struct grub_efi_1394_device_path): New structure.
11784 (grub_efi_1394_device_path_t): New type.
11785 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11786 (struct grub_efi_usb_device_path): New structure.
11787 (grub_efi_usb_device_path_t): New type.
11788 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11789 (struct grub_efi_usb_class_device_path): New structure.
11790 (grub_efi_usb_class_device_path_t): New type.
11791 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11792 (struct grub_efi_i2o_device_path): New structure.
11793 (grub_efi_i2o_device_path_t): New type.
11794 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11795 (struct grub_efi_mac_address_device_path): New structure.
11796 (grub_efi_mac_address_device_path_t): New type.
11797 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11798 (struct grub_efi_ipv4_device_path): New structure.
11799 (grub_efi_ipv4_device_path_t): New type.
11800 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11801 (struct grub_efi_ipv6_device_path): New structure.
11802 (grub_efi_ipv6_device_path_t): New type.
11803 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11804 (struct grub_efi_infiniband_device_path): New structure.
11805 (grub_efi_infiniband_device_path_t): New type.
11806 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11807 (struct grub_efi_uart_device_path): New structure.
11808 (grub_efi_uart_device_path_t): New type.
11809 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11810 (struct grub_efi_vendor_messaging_device_path): New structure.
11811 (grub_efi_vendor_messaging_device_path_t): New type.
11812 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11813 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11814 (struct grub_efi_hard_drive_device_path): New structure.
11815 (grub_efi_hard_drive_device_path_t): New type.
11816 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11817 (struct grub_efi_cdrom_device_path): New structure.
11818 (grub_efi_cdrom_device_path_t): New type.
11819 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11820 (struct grub_efi_vendor_media_device_path): New structure.
11821 (grub_efi_vendor_media_device_path_t): New type.
11822 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11823 (struct grub_efi_file_path_device_path): New structure.
11824 (grub_efi_file_path_device_path_t): New type.
11825 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11826 (struct grub_efi_protocol_device_path): New structure.
11827 (grub_efi_protocol_device_path_t): New type.
11828 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11829 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11830 (struct grub_efi_bios_device_path): New structure.
11831 (grub_efi_bios_device_path_t): New type.
11832 (struct grub_efi_disk_io): New structure.
11833 (grub_efi_disk_io_t): New type.
11834 (struct grub_efi_block_io_media): New structure.
11835 (grub_efi_block_io_media_t): New type.
11836 (struct grub_efi_block_io): New structure.
11837 (grub_efi_block_io_t): New type.
11839 * include/grub/misc.h (grub_stop): Removed.
11840 (grub_exit): New prototype.
11841 (grub_abort): Likewise.
11843 * include/grub/disk.h (enum grub_disk_dev_id): Added
11844 GRUB_DISK_DEVICE_EFIDISK_ID.
11846 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11847 disk/efi/efidisk.c.
11848 (kernel_syms.lst): Remove the target if an error occurs.
11850 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
11852 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11853 as it was simply too buggy.
11855 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
11857 * kern/misc.c (grub_lltoa): New function.
11858 (grub_vsprintf): Added support for the long long suffix,
11861 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
11863 * Makefile.in (LDFLAGS): Add variable.
11864 (LD): Remove variable.
11865 * configure.ac: Add -m32 to LDFLAGS.
11866 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11867 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11868 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11869 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11870 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11872 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11873 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11874 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11876 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
11878 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11879 length for unknown glyph.
11881 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11883 Add support for pre-loaded modules into the EFI port.
11885 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11886 completely. Accept one more argument DIR. The caller has changed.
11888 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11890 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11891 (grub_efi_loaded_image_guid): New variable.
11892 (grub_efi_get_loaded_image): New function.
11893 (grub_arch_modules_addr): Likewise.
11895 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11898 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11899 (struct grub_efi_loaded_image): New structure.
11900 (grub_efi_loaded_image_t): New type.
11902 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11904 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11905 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11906 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11908 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
11910 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11912 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
11914 * DISTLIST: Added include/grub/efi/console.h,
11915 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11916 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11918 * include/grub/efi/console.h: New file.
11919 * include/grub/efi/time.h: Likewise.
11920 * include/grub/i386/efi/kernel.h: Likewise.
11921 * kern/efi/init.c: Likewise.
11922 * kern/efi/mm.c: Likewise.
11923 * term/efi/console.c: Likewise.
11925 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11926 (grub_stop): Removed.
11927 (grub_get_rtc): Likewise.
11928 (grub_machine_init): Simply call grub_efi_init.
11929 (grub_machine_fini): Call grub_efi_fini.
11931 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11932 (grub_efi_output_string): Removed.
11933 (grub_efi_stall): New function.
11934 (grub_stop): Likewise.
11935 (grub_get_rtc): Likewise.
11937 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11938 (grub_efi_stall): New prototype.
11939 (grub_efi_allocate_pages): Likewise.
11940 (grub_efi_free_pages): Likewise.
11941 (grub_efi_get_memory_map): Likewise.
11942 (grub_efi_mm_init): Likewise.
11943 (grub_efi_mm_fini): Likewise.
11944 (grub_efi_init): Likewise.
11945 (grub_efi_fini): Likewise.
11947 * include/grub/i386/efi/time.h: Do not include
11948 grub/symbol.h. Include grub/efi/time.h.
11949 (GRUB_TICKS_PER_SECOND): Removed.
11950 (grub_get_rtc): Likewise.
11952 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11953 Added padding. The EFI spec is buggy.
11954 (GRUB_EFI_BLACK): New macro.
11955 (GRUB_EFI_BLUE): Likewise.
11956 (GRUB_EFI_GREEN): Likewise.
11957 (GRUB_EFI_CYAN): Likewise.
11958 (GRUB_EFI_RED): Likewise.
11959 (GRUB_EFI_MAGENTA): Likewise.
11960 (GRUB_EFI_BROWN): Likewise.
11961 (GRUB_EFI_LIGHTGRAY): Likewise.
11962 (GRUB_EFI_BRIGHT): Likewise.
11963 (GRUB_EFI_DARKGRAY): Likewise.
11964 (GRUB_EFI_LIGHTBLUE): Likewise.
11965 (GRUB_EFI_LIGHTGREEN): Likewise.
11966 (GRUB_EFI_LIGHTCYAN): Likewise.
11967 (GRUB_EFI_LIGHTRED): Likewise.
11968 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11969 (GRUB_EFI_YELLOW): Likewise.
11970 (GRUB_EFI_WHITE): Likewise.
11971 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11972 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11973 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11974 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11975 (GRUB_EFI_BACKGROUND_RED): Likewise.
11976 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11977 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11978 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11979 (GRUB_EFI_TEXT_ATTR): Likewise.
11981 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11982 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11983 (kernel_mod_HEADERS): Added efi/time.h.
11985 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11987 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11988 include/grub/efi/api.h, include/grub/efi/console_control.h,
11989 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11990 include/grub/i386/efi/time.h, kern/efi/efi.c,
11991 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11992 and util/i386/efi/grub-mkimage.c.
11994 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11996 * genmk.rb (PModule#rule): Do not export symbols if
11997 #{prefix}_EXPORTS is set to "no".
11999 * conf/i386-efi.mk: New file.
12000 * conf/i386-efi.rmk: Likewise.
12001 * include/grub/efi/api.h: Likewise.
12002 * include/grub/efi/console_control.h: Likewise.
12003 * include/grub/efi/efi.h: Likewise.
12004 * include/grub/efi/pe32.h: Likewise.
12005 * include/grub/i386/efi/time.h: Likewise.
12006 * kern/efi/efi.c: Likewise.
12007 * kern/i386/efi/init.c: Likewise.
12008 * kern/i386/efi/startup.S: Likewise.
12009 * util/i386/efi/grub-mkimage.c: Likewise.
12011 2006-04-17 Marco Gerards <marco@gnu.org>
12013 * include/grub/script.h: Include <grub/parser.h> and
12014 "grub_script.tab.h".
12015 (struct grub_lexer_param): New struct.
12016 (struct grub_parser_param): Likewise.
12017 (grub_script_create_arglist): Pass the state in an argument.
12018 (grub_script_add_arglist): Likewise.
12019 (grub_script_create_cmdline): Likewise.
12020 (grub_script_create_cmdblock): Likewise.
12021 (grub_script_create_cmdif): Likewise.
12022 (grub_script_create_cmdmenu): Likewise.
12023 (grub_script_add_cmd): Likewise.
12024 (grub_script_arg_add): Likewise.
12025 (grub_script_lexer_ref): Likewise.
12026 (grub_script_lexer_deref): Likewise.
12027 (grub_script_lexer_record_start): Likewise.
12028 (grub_script_lexer_record_stop): Likewise.
12029 (grub_script_mem_record): Likewise.
12030 (grub_script_mem_record_stop): Likewise.
12031 (grub_script_malloc): Likewise.
12032 (grub_script_yylex): Likewise.
12033 (grub_script_yyparse): Likewise.
12034 (grub_script_yyerror): Likewise.
12035 (grub_script_yylex): Likewise.
12036 (grub_script_lexer_init): Return the state.
12038 * normal/lexer.c (grub_script_lexer_state): Removed variable.
12039 (grub_script_lexer_done): Likewise.
12040 (grub_script_lexer_getline): Likewise.
12041 (grub_script_lexer_refs): Likewise.
12042 (script): Likewise.
12043 (newscript): Likewise.
12044 (record): Likewise.
12045 (recording): Likewise.
12046 (recordpos): Likewise.
12047 (recordlen): Likewise.
12048 (grub_script_lexer_init): Return the state instead of setting
12050 (grub_script_lexer_ref): Use the newly added argument for state
12051 instead of globals.
12052 (grub_script_lexer_deref): Likewise.
12053 (grub_script_lexer_record_start): Likewise.
12054 (grub_script_lexer_record_stop): Likewise.
12055 (recordchar): Likewise.
12056 (nextchar): Likewise.
12057 (grub_script_yylex2): Likewise.
12058 (grub_script_yylex): Likewise.
12059 (grub_script_yyerror): Likewise.
12061 * normal/parser.y (func_mem): Removed variable.
12062 (menu_entry): Likewise.
12064 (%lex-param): New parser option.
12065 (%parse-param): Likewise.
12066 (script): Always return the AST.
12067 (argument): Pass the state around.
12068 (arguments): Likewise.
12069 (grubcmd): Likewise.
12070 (commands): Likewise.
12071 (function): Likewise.
12072 (menuentry): Likewise.
12073 (if_statement): Likewise.
12076 * normal/script.c (grub_script_memused): Removed variable.
12077 (grub_script_parsed): Likewise.
12078 (grub_script_malloc): Added a state argument. Use that instead of
12080 (grub_script_mem_record): Likewise.
12081 (grub_script_mem_record_stop): Likewise.
12082 (grub_script_arg_add): Likewise.
12083 (grub_script_add_arglist): Likewise.
12084 (grub_script_create_cmdline): Likewise.
12085 (grub_script_create_cmdif): Likewise.
12086 (grub_script_create_cmdmenu): Likewise.
12087 (grub_script_add_cmd): Likewise.
12088 (grub_script_parse): Setup the state before calling the parser.
12090 2006-04-16 Marco Gerards <marco@gnu.org>
12092 * normal/command.c (grub_command_init): Remove the title command.
12094 * normal/lexer.c (grub_script_yylex): Renamed from this...
12095 (grub_script_yylex2): ... to this.
12096 (grub_script_yylex): New function. Temporary
12097 introduced to filter some tokens.
12098 (grub_script_yyerror): Print a newline.
12100 * normal/main.c (read_config_file): Output information about the
12101 lines that contain errors. Wait for a key after all lines have
12102 been processed. Don't return an empty menu.
12104 * normal/parser.y (func_mem): Don't initialize.
12105 (menu_entry): Likewise.
12106 (err): New variable.
12107 (script): Don't return anything when an error was encountered.
12108 (ws, returns): Removed rules.
12109 (argument): Disabled concatenated variable support.
12110 (arguments): Remove explicit separators.
12111 (grubcmd): Likewise.
12112 (function): Likewise.
12113 (menuentry): Likewise.
12115 (commands): Likewise. Add error handling.
12117 * normal/script.c (grub_script_create_cmdline): If
12118 `grub_script_parsed' is 0, assume the parser encountered an error.
12120 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
12122 * configure.ac: Add support for EFI. Fix the typo
12123 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12125 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12127 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
12128 foreign multibyte characters should be shown correctly.
12130 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
12132 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12134 (read_config_file): Made it to close file before returning.
12136 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
12138 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12139 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12140 video/i386/pc/vbefill.c.
12142 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12143 video/i386/pc/vbefill.c.
12145 * include/grub/video.h (grub_video_blit_format): New enum.
12146 (grub_video_mode_info): Added new member blit_format.
12147 (grub_video_get_blit_format): New function prototype.
12149 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12150 function prototype.
12151 (grub_video_vbe_map_rgb): Likewise.
12152 (grub_video_vbe_unmap_color): Likewise.
12154 * include/grub/i386/pc/vbeblit.h: New file.
12156 * include/grub/i386/pc/vbefill.h: New file.
12158 * video/video.c (grub_video_get_blit_format): New function.
12159 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12160 (grub_video_vbe_map_rgb): Likewise.
12161 (grub_video_vbe_unmap_color): Likewise.
12163 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12165 (grub_video_vbe_blit_render_target): Changed to use more optimized
12167 (grub_video_vbe_setup): Added detection for optimized settings.
12168 (grub_video_vbe_create_render_target): Likewise.
12170 * video/i386/pc/vbeblit.c: New file.
12172 * video/i386/pc/vbefill.c: New file.
12174 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12176 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12179 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12180 parsing to support both hex and dec ranges. If filename was missing
12181 show usage information.
12183 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12185 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12186 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12188 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12189 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12190 (video_mod_SOURCES): Added.
12191 (video_mod_CFLAGS): Likewise.
12192 (video_mod_LDFLAGS): Likewise.
12193 (gfxterm_mod_SOURCES): Likewise.
12194 (gfxterm_mod_CFLAGS): Likewise.
12195 (gfxterm_mod_LDFLAGS): Likewise.
12196 (videotest_mod_SOURCES): Likewise.
12197 (videotest_mod_CFLAGS): Likewise.
12198 (videotest_mod_LDFLAGS): Likewise.
12199 (vesafb_mod_SOURCES): Removed.
12200 (vesafb_mod_CFLAGS): Likewise.
12201 (vesafb_mod_LDFLAGS): Likewise.
12202 (vga_mod_SOURCES): Likewise.
12203 (vga_mod_CFLAGS): Likewise.
12204 (vga_mod_LDFLAGS): Likewise.
12206 * commands/videotest.c: New file.
12208 * font/manager.c (fill_with_default_glyph): Modified to use
12210 (grub_font_get_glyph): Likewise.
12211 (fontmanager): Renamed from this...
12212 (font_manager): ... to this.
12214 * include/grub/font.h (grub_font_glyph): Added new structure.
12215 (grub_font_get_glyph): Modified to use grub_font_glyph.
12217 * include/grub/misc.h (grub_abs): Added as inline function.
12219 * include/grub/video.h: New file.
12221 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12222 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12223 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12224 (grub_vbe_get_controller_info): Renamed from this...
12225 (grub_vbe_bios_get_controller_info): ... to this.
12226 (grub_vbe_get_mode_info): Renamed from this...
12227 (grub_vbe_bios_get_mode_info): ... to this.
12228 (grub_vbe_set_mode): Renamed from this...
12229 (grub_vbe_bios_set_mode): ... to this.
12230 (grub_vbe_get_mode): Renamed from this...
12231 (grub_vbe_bios_get_mode): ... to this.
12232 (grub_vbe_set_memory_window): Renamed from this...
12233 (grub_vbe_bios_set_memory_window): ... to this.
12234 (grub_vbe_get_memory_window): Renamed from this...
12235 (grub_vbe_bios_get_memory_window): ... to this.
12236 (grub_vbe_set_scanline_length): Renamed from this...
12237 (grub_vbe_set_scanline_length): ... to this.
12238 (grub_vbe_get_scanline_length): Renamed from this...
12239 (grub_vbe_bios_get_scanline_length): ... to this.
12240 (grub_vbe_set_display_start): Renamed from this...
12241 (grub_vbe_bios_set_display_start): ... to this.
12242 (grub_vbe_get_display_start): Renamed from this...
12243 (grub_vbe_bios_get_display_start): ... to this.
12244 (grub_vbe_set_palette_data): Renamed from this...
12245 (grub_vbe_bios_set_palette_data): ... to this.
12246 (grub_vbe_set_pixel_rgb): Removed.
12247 (grub_vbe_set_pixel_index): Likewise.
12249 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12251 (grub_vbe_bios_get_controller_info): ... to this.
12252 (grub_vbe_get_mode_info): Renamed from this...
12253 (grub_vbe_bios_get_mode_info): ... to this.
12254 (grub_vbe_set_mode): Renamed from this...
12255 (grub_vbe_bios_set_mode): ... to this.
12256 (grub_vbe_get_mode): Renamed from this...
12257 (grub_vbe_bios_get_mode): ... to this.
12258 (grub_vbe_set_memory_window): Renamed from this...
12259 (grub_vbe_bios_set_memory_window): ... to this.
12260 (grub_vbe_get_memory_window): Renamed from this...
12261 (grub_vbe_bios_get_memory_window): ... to this.
12262 (grub_vbe_set_scanline_length): Renamed from this...
12263 (grub_vbe_set_scanline_length): ... to this.
12264 (grub_vbe_get_scanline_length): Renamed from this...
12265 (grub_vbe_bios_get_scanline_length): ... to this.
12266 (grub_vbe_set_display_start): Renamed from this...
12267 (grub_vbe_bios_set_display_start): ... to this.
12268 (grub_vbe_get_display_start): Renamed from this...
12269 (grub_vbe_bios_get_display_start): ... to this.
12270 (grub_vbe_set_palette_data): Renamed from this...
12271 (grub_vbe_bios_set_palette_data): ... to this.
12272 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12273 getting corrupted after calling it. Added more pushes and pops.
12274 (grub_vbe_bios_set_mode): Likewise.
12275 (grub_vbe_bios_get_mode): Likewise.
12276 (grub_vbe_bios_get_memory_window): Likewise.
12277 (grub_vbe_bios_set_scanline_length): Likewise.
12278 (grub_vbe_bios_get_scanline_length): Likewise.
12279 (grub_vbe_bios_get_display_start): Likewise.
12280 (grub_vbe_bios_set_palette_data): Likewise.
12282 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12283 (cl_insert): Likewise.
12284 (cl_delete): Likewise.
12286 * term/gfxterm.c: New file.
12288 * term/i386/pc/vesafb.c: Removed file.
12290 * video/video.c: New file.
12292 * video/i386/pc/vbe.c (real2pm): Added new function.
12293 (grub_video_vbe_draw_pixel): Likewise.
12294 (grub_video_vbe_get_video_ptr): Likewise.
12295 (grub_video_vbe_get_pixel): Likewise
12296 (grub_video_vbe_init): Likewise.
12297 (grub_video_vbe_fini): Likewise.
12298 (grub_video_vbe_setup): Likewise.
12299 (grub_video_vbe_get_info): Likewise.
12300 (grub_video_vbe_set_palette): Likewise.
12301 (grub_video_vbe_get_palette): Likewise.
12302 (grub_video_vbe_set_viewport): Likewise.
12303 (grub_video_vbe_get_viewport): Likewise.
12304 (grub_video_vbe_map_color): Likewise.
12305 (grub_video_vbe_map_rgb): Likewise.
12306 (grub_video_vbe_map_rgba): Likewise.
12307 (grub_video_vbe_unmap_color): Likewise.
12308 (grub_video_vbe_fill_rect): Likewise.
12309 (grub_video_vbe_blit_glyph): Likewise.
12310 (grub_video_vbe_blit_bitmap): Likewise.
12311 (grub_video_vbe_blit_render_target): Likewise.
12312 (grub_video_vbe_scroll): Likewise.
12313 (grub_video_vbe_swap_buffers): Likewise.
12314 (grub_video_vbe_create_render_target): Likewise.
12315 (grub_video_vbe_delete_render_target): Likewise.
12316 (grub_video_vbe_set_active_render_target): Likewise.
12317 (grub_vbe_set_pixel_rgb): Remove function.
12318 (grub_vbe_set_pixel_index): Likewise.
12319 (index_color_mode): Remove static variable.
12320 (active_mode): Likewise.
12321 (framebuffer): Likewise.
12322 (bytes_per_scan_line): Likewise.
12323 (grub_video_vbe_adapter): Added new static variable.
12324 (framebuffer): Likewise.
12325 (render_target): Likewise.
12326 (initial_mode): Likewise.
12327 (mode_in_use): Likewise.
12328 (mode_list): Likewise.
12330 2006-03-10 Marco Gerards <marco@gnu.org>
12332 * configure.ac (AC_INIT): Bumped to 1.93.
12334 * DISTLIST: Added `include/grub/hfs.h'.
12336 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12338 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12339 18H, which might help the BIOS falling back to next boot media.
12341 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12343 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12344 Poe Chen <poe.poechen@gmail.com>.
12346 2006-01-17 Marco Gerards <marco@gnu.org>
12348 * include/grub/normal.h: Include <grub/script.h>.
12349 (grub_command_list): Removed struct.
12350 (grub_command_list_t): Removed type.
12351 (grub_menu_entry): Remove members `num' and `command_list'. Add
12352 members `commands' and `sourcecode'.
12353 * include/grub/script.h: Add inclusion guards.
12354 (grub_script_cmd_menuentry): New struct.
12355 (grub_script_execute_menuentry): New prototype.
12356 (grub_script_lexer_record_start): Likewise.
12357 (grub_script_lexer_record_stop): Likewise.
12358 * normal/execute.c (grub_script_execute_menuentry): New function.
12359 * normal/lexer.c (record, recording, recordpos, recordlen): New
12361 (grub_script_lexer_record_start): New function.
12362 (grub_script_lexer_record_stop): Likewise.
12363 (recordchar): Likewise.
12364 (nextchar): Likewise.
12365 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12366 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12367 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12368 (current_menu): New variable.
12369 (free_menu): Mainly rewritten.
12370 (grub_normal_menu_addentry): New function.
12371 (read_config_file): Rewritten.
12372 * normal/menu.c (run_menu_entry): Mainly rewritten.
12373 * normal/menu_entry.c (make_screen): Rewritten the code to insert
12375 (run): Mainly rewritten.
12376 * normal/parser.y (menu_entry): New variable.
12377 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12378 (menuentry): New rule.
12379 (command): Add `menuentry'.
12380 (if_statement): Allow additional returns before `fi'.
12381 * normal/script.c (grub_script_create_cmdmenu): New function.
12383 2006-01-03 Marco Gerards <marco@gnu.org>
12385 * INSTALL: GNU Bison is required.
12386 * configure.ac: Rewritten the test to detect Bison.
12387 * Makefile.in (YACC): New variable. Reported by Xun Sun
12388 <xun.sun.cn@gmail.com>.
12390 2006-01-03 Marco Gerards <marco@gnu.org>
12392 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12393 the HFS+ filesystem to filesystem blocks.
12394 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12395 GCC warning is silenced.
12397 2006-01-03 Marco Gerards <marco@gnu.org>
12399 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12400 read from disk from big endian to host byte order.
12402 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12404 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12406 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12407 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12408 embedded HFS+ filesystem.
12409 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12410 (grub_hfs_sblock): Move from here...
12411 * include/grub/hfs.h: To here... New file.
12412 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12414 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12416 (grub_hfsplus_volheader): Change type of member `magic' to
12418 (grub_hfsplus_data): Add new member `embedded_offset'.
12419 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12421 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12422 Calculate the offset.
12424 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12426 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12428 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12430 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12432 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12433 ENV->NAME is NULL after allocating ENV->VALUE.
12435 2005-12-25 Marco Gerards <marco@gnu.org>
12437 * kern/env.c (grub_env_set): Rewritten the error handling code.
12439 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12441 * geninit.sh: Made more robust, and more portable.
12443 2005-12-25 Marco Gerards <marco@gnu.org>
12445 Add support for Apple HFS+ filesystems.
12447 * fs/hfsplus.c: New file.
12449 * DISTLIST: Added `fs/hfsplus.c'.
12451 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12452 (hfsplus_mod_SOURCES): New variable.
12453 (hfsplus_mod_CFLAGS): Likewise.
12454 (hfsplus_mod_LDFLAGS): Likewise.
12455 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12456 (grub_setup_SOURCES): Likewise.
12457 (grub_mkdevicemap_SOURCES): Likewise.
12458 (grub_emu_SOURCES): Likewise.
12459 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12461 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12463 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12465 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12467 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12468 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12469 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12470 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12471 normal/lexer.c, normal/parser.y, normal/script.c, and
12473 Removed kern/sparc64/cache.c.
12475 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12476 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12479 * configure.ac (AC_INIT): Bumped to 1.92.
12481 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12483 * kern/err.c (grub_error_push): Added new function to support error
12485 (grub_error_pop): Likewise.
12486 (grub_error_stack_items): New local variable to support error stacks.
12487 (grub_error_stack_pos): Likewise.
12488 (grub_error_stack_assert): Likewise.
12489 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12491 (grub_print_error): Added support to print errors from error stack.
12493 * include/grub/err.h (grub_error_push): Added function prototype.
12494 (grub_error_pop): Likewise.
12496 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12498 * configure.ac: Accept `powerpc64' as host_cpu.
12499 (amd64): Rename to `biarch32'.
12501 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12502 non-cacheline-aligned addresses.
12504 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12505 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12506 if `size' is non-zero.
12508 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
12510 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12511 and `cd' to make sure the filename is not prefixed with a
12513 (pkgdata_MODULES): Add `gpt.mod'.
12514 (gpt_mod_SOURCES): New variable.
12515 (gpt_mod_CFLAGS): Likewise.
12516 (gpt_mod_LDFLAGS): Likewise.
12518 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12520 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12523 * partmap/gpt.c: New file.
12525 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12526 GPT partition map is detected.
12528 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12530 * commands/i386/pc/play.c: New file.
12531 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12532 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12535 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
12537 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12538 ((unused))' to silence gcc warning.
12540 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12542 * configure.ac: Correct `AC_PROG_YACC' test.
12544 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12546 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12547 check before installing files.
12549 2005-11-22 Mike Small <smallm@panix.com>
12551 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12552 number regex so multidigit numbers are recognized correctly.
12554 2005-11-22 Mike Small <smallm@panix.com>
12556 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12557 debugging message before attempting to claim memory.
12558 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12559 multiple addresses in case of failure.
12561 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12563 * term/tparm.c (get_space): Remove empty `if' statement.
12565 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12567 * kern/parser.c (check_varstate): Rename `state' to 's'.
12569 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12571 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12572 variable definitions to the beginning of each function. Sort stack
12574 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12575 `buf' argument to `char *'.
12577 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12579 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12580 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12581 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12582 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12583 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12584 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12585 configfile.mod, search.mod, gzio.mod and test.mod.
12586 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12587 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12588 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12589 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12590 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12591 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12592 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12593 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12594 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12595 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12596 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12597 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12598 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12599 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12600 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12601 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12602 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12603 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12604 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12605 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12606 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12607 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12608 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12610 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12612 (pkgdata_MODULES): Add test.mod.
12614 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12616 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12617 appending to variables with "+=".
12618 (PModule): Use full pathname to generate *.lst filenames.
12620 * Makefile.in: Fixed list rules moved from genmk.rb.
12621 (.DELETE_ON_ERROR): New special target.
12622 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12624 * conf/i386-pc.rmk: Include conf/common.mk.
12625 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12626 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12627 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12628 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12629 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12630 configfile.mod, search.mod, gzio.mod and test.mod.
12631 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12632 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12633 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12634 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12635 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12636 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12637 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12638 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12639 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12640 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12641 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12642 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12643 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12644 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12645 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12646 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12647 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12648 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12649 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12650 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12651 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12652 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12653 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12655 * conf/common.rmk: ... to here. New file.
12657 * conf/common.mk: New file.
12659 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12661 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12662 (grub_script.tab.c): ... here.
12664 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12665 (grub_script.tab.c): ... here.
12667 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12668 (grub_script.tab.c): ... here.
12670 * normal/command.c (grub_command_find): Fixed a memory leak of
12671 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12673 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12675 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12676 "@" which marks the start of a comment on ARM.
12677 (VARIABLE): Likewise.
12679 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12681 Add support for Linux/ADFS partition tables.
12683 * partmap/acorn.c: New file.
12685 * include/grub/acorn_filecore.h: Likewise.
12687 * DISTLIST: Added `partmap/acorn.c' and
12688 `include/grub/acorn_filecore.h'.
12690 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12692 (pkgdata_MODULES): Add `acorn.mod'.
12693 (acorn_mod_SOURCES): New variable.
12694 (acorn_mod_CFLAGS): Likewise.
12696 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12698 (pkgdata_MODULES): Add `acorn.mod'.
12699 (acorn_mod_SOURCES): New variable.
12700 (acorn_mod_CFLAGS): Likewise.
12702 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12703 (pkgdata_MODULES): Add `acorn.mod'.
12704 (acorn_mod_SOURCES): New variable.
12705 (acorn_mod_CFLAGS): Likewise.
12706 (acorn_mod_LDFLAGS): Likewise.
12708 * include/types.h (grub_disk_addr_t): New typedef.
12710 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
12712 * geninit.sh: New file.
12714 * geninitheader.sh: Likewise.
12716 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12717 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12718 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12719 * commands/configfile.c (grub_configfile_init)
12720 (grub_configfile_fini): Likewise.
12721 * commands/default.c (grub_default_init, grub_default_fini):
12723 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12724 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12725 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12726 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12728 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12729 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12731 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12732 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12734 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12736 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12738 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12739 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12740 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12741 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12742 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12743 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12744 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12745 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12746 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12747 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12748 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12749 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12750 * partmap/amiga.c (grub_amiga_partition_map_init)
12751 (grub_amiga_partition_map_fini): Likewise.
12752 * partmap/apple.c (grub_apple_partition_map_init)
12753 (grub_apple_partition_map_fini): Likewise.
12754 * partmap/pc.c (grub_pc_partition_map_init)
12755 (grub_pc_partition_map_fini): Likewise.
12756 * partmap/sun.c (grub_sun_partition_map_init,
12757 grub_sun_partition_map_fini): Likewise.
12758 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12761 * util/grub-emu.c: Include <grub_modules_init.h>.
12762 (main): Don't initialize and de-initialize any modules directly,
12763 use `grub_init_all' and `grub_fini_all' instead.
12765 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12766 `grub_vesafb_mod_init'.
12767 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12769 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12770 `grub_vga_mod_init'. Updated all users.
12771 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12773 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12774 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12777 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12778 Generate a function to initialize the module in utilities.
12779 Updated all callers.
12780 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12781 initialize the module in utilities. Updated all callers.
12783 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12785 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12786 escape sequence and a literal ^L to clear the screen.
12788 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12789 when returning from Open Firmware.
12791 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12793 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12794 (grub_ofconsole_height): Likewise.
12795 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12796 manually insert a '\n'.
12797 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12798 `grub_ofconsole_height'. Return early if these are already set.
12800 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12802 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12803 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12804 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12805 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12806 and `normal/script.c'.
12807 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12808 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12809 (test_mod_SOURCES): New variable.
12810 (test_mod_CFLAGS): Likewise.
12811 (test_mod_LDFLAGS): Likewise.
12812 (pkgdata_MODULES): Add `test.mod'.
12813 (grub_script.tab.c): New rule.
12814 (grub_script.tab.h): Likewise.
12816 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
12818 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12819 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12820 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12821 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12822 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12823 (test_mod_SOURCES): New variable.
12824 (test_mod_CFLAGS): Likewise.
12825 (pkgdata_MODULES): Add `test.mod'.
12826 (grub_script.tab.c): New rule.
12827 (grub_script.tab.h): Likewise.
12829 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
12831 Add initial scripting support.
12833 * commands/test.c: New file.
12834 * include/grub/script.h: Likewise.
12835 * normal/execute.c: Likewise.
12836 * normal/function.c: Likewise.
12837 * normal/lexer.c: Likewise.
12838 * normal/parser.y: Likewise.
12839 * normal/script.c: Likewise.
12841 * configure.ac: Add `AC_PROG_YACC' test.
12843 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12844 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12845 `normal/function.c' and `normal/script.c'.
12846 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12847 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12848 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12850 (pkgdata_MODULES): Add `test.mod'.
12851 (grub_script.tab.c): New rule.
12852 (grub_script.tab.h): Likewise.
12854 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12856 * include/grub/normal.h (grub_test_init): New prototype.
12857 (grub_test_fini): Likewise.
12859 * normal/command.c: Include <grub/script.h>.
12860 (grub_command_execute): Rewritten.
12862 * util/grub-emu.c (main): Call `grub_test_init' and
12865 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12867 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12869 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12870 there are no pending characters.
12872 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12874 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12875 `grub_strndup' to drop device arguments. Replace unnecessary
12876 `grub_strndup' with `grub_strdup'.
12878 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12880 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12881 `debug' environment variable has been set.
12883 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
12885 * Makefile.in (install-local): Use $(DATA).
12886 (uninstall): Likewise.
12887 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12888 (sbin_UTILITIES): ... to here.
12889 (sbin_SCRIPTS): New variable.
12890 (grub_install_SOURCES): New variable.
12891 * util/powerpc/ieee1275/grub-install.in: New file.
12892 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12894 (add_segments): Call `grub_util_get_path'.
12896 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12898 From Timothy Baldwin:
12899 * commands/ls.c (grub_ls_list_files): Close FILE with
12901 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12903 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
12905 * include/grub/parser.h: New file.
12907 * kern/parser.c: Likewise.
12909 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12910 (grub_setup_SOURCES): Likewise.
12911 (grub_probefs_SOURCES): Likewise.
12912 (grub_emu_SOURCES): Likewise.
12913 (kernel_img_HEADERS): Add `parser.h'.
12915 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12916 (grub_emu_SOURCES): Add `kern/parser.c'.
12917 (grubof_SOURCES): Likewise.
12919 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12920 (grubof_SOURCES): Add `kern/parser.c'.
12922 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12924 * kern/misc.c (grub_split_cmdline): Removed function.
12926 * kern/rescue.c: Include <grub/parser.h>.
12927 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12928 of `grub_split_cmdline'.
12930 * normal/command.c: Include <grub/parser.h>.
12931 (grub_command_execute): Use `grub_parser_split_cmdline' instead
12932 of `grub_split_cmdline'.
12934 * normal/completion.c: Include <grub/parser.h>.
12935 (cmdline_state): New variable.
12936 (iterate_dir): End the filename with a quote depending on the
12937 command line state.
12938 (get_state): new function.
12939 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12940 split the arguments and determine the current argument. When the
12941 argument string is not quoted, escape all spaces.
12943 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12945 * normal/sparc64/setjmp.S: New file.
12947 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12949 * include/grub/sparc64/libgcc.h: New file.
12950 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12951 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12952 normal/sparc64/setjmp.c.
12954 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12956 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12957 * kern/sparc64/cache.S: New file.
12958 * kern/sparc64/cache.c: Removed.
12959 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12960 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12962 (COMMON_LDFLAGS): Add -melf64_sparc.
12963 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12964 (grubof_SOURCES): Use cache.S instead of cache.c.
12965 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12966 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12967 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12969 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12970 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12971 (linux_mod_CFLAGS): Commented out.
12972 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12973 out because module isn't built.
12974 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12975 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12976 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12977 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12978 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12979 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12980 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12981 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12982 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12983 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12984 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12985 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12986 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12987 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12989 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12991 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12992 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12993 longer, because HFS should not be used on PC.
12995 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12997 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12998 consistently within the loop.
13000 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
13002 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13003 directory can not be read.
13005 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13007 * configure.ac (AC_INIT): Increase the version number to 1.91.
13009 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13010 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13011 term/i386/pc/serial.c.
13013 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13015 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13016 file size must be permitted.
13018 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13019 between %ah and %al.
13021 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
13023 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13025 Call the hook with a NUL-terminated filename.
13026 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13029 * kern/term.c (cursor_state): New variable.
13030 (grub_term_set_current): Reset the cursor state on a new
13032 (grub_setcursor): Rewritten to use CURSOR_STATE.
13033 (grub_getcursor): New function.
13035 * include/grub/term.h (grub_getcursor): New prototype.
13037 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13038 integers on ARM. Reported by Timothy Baldwin
13039 <T.E.Baldwin99@members.leeds.ac.uk>.
13041 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
13043 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13045 (grub_sfs_dir): Likewise.
13047 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
13049 Add support for the SFS filesystem.
13051 * fs/sfs.c: New file.
13053 * DISTLIST: Added `fs/sfs.c'.
13055 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13056 (grub_probefs_SOURCES): Likewise.
13057 (grub_emu_SOURCES): Likewise.
13058 (pkgdata_MODULES): Add `sfs.mod'.
13059 (sfs_mod_SOURCES): New variable.
13060 (sfs_mod_CFLAGS): Likewise.
13061 (sfs_mod_LDFLAGS): Likewise.
13063 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13064 (pkgdata_MODULES): Add `sfs.mod'.
13065 (sfs_mod_SOURCES): New variable.
13066 (sfs_mod_CFLAGS): Likewise.
13068 * util/grub-emu.c (main): Call `grub_sfs_init' and
13071 * include/grub/fs.h (grub_sfs_init): New prototype.
13072 (grub_sfs_fini): Likewise.
13074 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
13076 Add support for the AFFS filesystem.
13078 * fs/affs.c: New file.
13080 * DISTLIST: Added `fs/affs.c'.
13082 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13083 (grub_probefs_SOURCES): Likewise.
13084 (grub_emu_SOURCES): Likewise.
13085 (pkgdata_MODULES): Add `affs.mod'.
13086 (affs_mod_SOURCES): New variable.
13087 (affs_mod_CFLAGS): Likewise.
13088 (affs_mod_LDFLAGS): Likewise.
13090 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13091 (pkgdata_MODULES): Add `affs.mod'.
13092 (affs_mod_SOURCES): New variable.
13093 (affs_mod_CFLAGS): Likewise.
13095 * util/grub-emu.c (main): Call `grub_affs_init' and
13098 * include/grub/fs.h (grub_affs_init): New prototype.
13099 (grub_affs_fini): Likewise.
13101 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13103 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13105 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
13107 * configure.ac: Accept `x86_64' as host_cpu. In that case add
13110 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13113 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13114 (COMMON_LDFLAGS): New variable.
13115 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13116 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13117 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13118 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13119 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13120 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13121 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13122 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13123 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13124 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13125 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13126 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13127 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13128 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13129 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13131 (normal_mod_ASFLAGS): Add `-m32'.
13133 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13134 (grub_host_size_t, grub_host_ssize_t): New types.
13135 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13136 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13137 `GRUB_HOST_SIZEOF_VOID_P'.
13139 * include/grub/kernel.h (struct grub_module_header): Type of
13140 member offset changed to `grub_host_off_t'. Type of member size
13141 changed to `grub_host_size_t'.
13142 (struct grub_module_info): Type of member offset changed to
13143 `grub_host_off_t'. Type of member size changed to
13144 `grub_host_size_t'.
13146 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13148 Make GRUB's kernel compliant to Multiboot Specification.
13150 * kern/i386/pc/startup.S (multiboot_header): New label.
13151 (multiboot_entry): Likewise.
13152 (multiboot_trampoline): Likewise.
13154 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13155 Increased to 0x4A0.
13157 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13158 put parentheses after a question mark.
13159 [!GRUB_UTIL] (my_mod): New variable.
13161 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13163 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13165 Adds support for the XFS filesystem. Btrees are not supported
13168 * fs/xfs.c: New file.
13170 * DISTLIST: Added `fs/xfs.c'.
13172 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13173 (grub_probefs_SOURCES): Likewise.
13174 (grub_emu_SOURCES): Likewise.
13175 (pkgdata_MODULES): Add `xfs.mod'.
13176 (xfs_mod_SOURCES): New variable.
13177 (xfs_mod_CFLAGS): Likewise.
13179 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13180 (pkgdata_MODULES): Add `xfs.mod'.
13181 (xfs_mod_SOURCES): New variable.
13182 (xfs_mod_CFLAGS): Likewise.
13184 * util/grub-emu.c (main): Call `grub_xfs_init' and
13187 * include/grub/fs.h (grub_xfs_init): New prototype.
13188 (grub_xfs_fini): Likewise.
13191 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13193 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13194 color modes, allow greater than 16 colors to be configured as
13197 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13199 * normal/completion.c (complete_arguments): Add the qualifier
13200 const into OPTIONS.
13202 From Omniflux <omniflux+lists@omniflux.com>:
13203 * include/grub/terminfo.h: New file.
13204 * include/grub/tparm.h: Likewise.
13205 * include/grub/i386/pc/serial.h: Likewise.
13206 * term/terminfo.c: Likewise.
13207 * term/tparm.c: Likewise.
13208 * term/i386/pc/serial.c: Likewise.
13209 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13211 (terminfo_mod_SOURCES): New variable.
13212 (terminfo_mod_CFLAGS): Likewise.
13213 (serial_mod_SOURCES): Likewise.
13214 (serial_mod_CFLAGS): Likewise.
13216 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13218 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13219 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13220 and kern/powerpc/ieee1275/cmain.c, respectively.
13222 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13223 * kern/powerpc/ieee1275/crt0.S: ... here.
13225 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13226 * kern/powerpc/ieee1275/cmain.c: ... here.
13228 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13229 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13230 instead of boot/powerpc/ieee1275/crt0.S and
13231 boot/powerpc/ieee1275/cmain.c, respectively.
13233 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13234 sectors. It was not used anyway.
13236 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13238 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13239 `unused parameter' warning.
13241 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13243 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13245 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13248 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13250 * include/grub/normal.h (enum grub_completion_type): Added
13251 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13253 * normal/cmdline.c (print_completion): Handle
13254 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13255 * normal/menu_entry.c (store_completion): Likewise.
13257 * normal/completion.c (complete_arguments): New function.
13258 (grub_normal_do_completion): Call `complete_arguments' when the
13259 current words start with a dash.
13261 2005-08-27 Marco Gerards <metgerards@student.han.nl>
13263 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13264 `gzio.mod' instead of `io.mod').
13266 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13268 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13269 (DISTDIRS): Added io and video.
13270 Rewrite the search routine to make an output consistently.
13272 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13273 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13274 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13275 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13276 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13277 util/powerpc/ieee1275/misc.c.
13279 * include/grub/gzio.h: New file.
13280 * io/gzio.c: Likewise.
13282 * kern/file.c (grub_file_close): Call grub_device_close only if
13283 FILE->DEVICE is not NULL.
13285 * include/grub/mm.h [!NULL] (NULL): New macro.
13287 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13290 (pkgdata_MODULES): Added gzio.mod.
13291 (gzio_mod_SOURCES): New variable.
13292 (gzio_mod_CFLAGS): Likewise.
13294 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13295 (pkgdata_MODULES): Added gzio.mod.
13296 (gzio_mod_SOURCES): New variable.
13297 (gzio_mod_CFLAGS): Likewise.
13299 * commands/cat.c: Include grub/gzio.h.
13300 (grub_cmd_cat): Use grub_gzfile_open instead of
13303 * commands/cmp.c: Include grub/gzio.h.
13304 (grub_cmd_cmp): Use grub_gzfile_open instead of
13307 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13308 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13310 (grub_rescue_cmd_module): Likewise.
13312 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13314 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13315 kern/sparc64/ieee1275/init.c because it contains _start.
13316 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13318 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13320 * configure.ac: Add support for sparc64 host with ieee1275
13322 * configure: Generated from configure.ac.
13323 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13325 (grub_ofdisk_read): Likewise.
13326 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13327 pointers as (void *) to remove a warning.
13328 (grub_ofdisk_close): Likewise.
13329 (grub_ofdisk_read): Likewise.
13330 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13331 returns, so make it return void to remove a warning.
13332 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13333 Corresponding prototype change.
13334 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13335 values, and cast the pointers as (void *) to remove a warning.
13336 (grub_mm_dump): Likewise.
13337 * conf/sparc64-ieee1275.mk: New file.
13338 * conf/sparc64-ieee1275.rmk: Likewise.
13339 * include/grub/sparc64/setjmp.h: Likewise.
13340 * include/grub/sparc64/types.h: Likewise.
13341 * include/grub/sparc64/ieee1275/console.h: Likewise.
13342 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13343 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13344 * include/grub/sparc64/ieee1275/time.h: Likewise.
13345 * kern/sparc64/cache.c: Likewise.
13346 * kern/sparc64/dl.c: Likewise.
13347 * kern/sparc64/ieee1275/init.c: Likewise.
13348 * kern/sparc64/ieee1275/openfw.c: Likewise.
13350 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13352 * util/console.c (grub_ncurses_putchar): If C is greater than
13353 0x7f, set C to a question mark.
13354 (grub_ncurses_getcharwidth): New function.
13355 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13358 * normal/menu.c (print_entry): Made aware of Unicode. First,
13359 convert TITLE to UCS-4, and predict the cursor position by
13362 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13364 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13366 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13368 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13369 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13372 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13373 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13374 grub_strcpy and grub_strlen. Take it into account that a space
13375 character is inserted as a delimiter.
13377 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13379 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13380 invalid magic in the error.
13382 * commands/search.c: New file.
13384 * util/grub-emu.c (main): Call grub_search_init and
13387 * kern/rescue.c (grub_rescue_print_disks): Removed.
13388 (grub_rescue_print_devices): New function.
13389 (grub_rescue_cmd_ls): Use grub_device_iterate with
13390 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13391 grub_rescue_print_disks.
13393 * kern/partition.c (grub_partition_iterate): Return the result of
13394 PARTMAP->ITERATE instead of GRUB_ERRNO.
13396 * kern/device.c: Include grub/partition.h.
13397 (grub_device_iterate): New function.
13399 * include/grub/partition.h (grub_partition_iterate): Return int
13400 instead of grub_err_t.
13402 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13404 [GRUB_UTIL] (grub_search_fini): Likewise.
13406 * include/grub/device.h (grub_device_iterate): New prototype.
13408 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13410 (pkgdata_MODULES): Added search.mod.
13411 (search_mod_SOURCES): New variable.
13412 (search_mod_CFLAGS): Likewise.
13414 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13415 (pkgdata_MODULES): Added search.mod.
13416 (search_mod_SOURCES): New variable.
13417 (search_mod_CFLAGS): Likewise.
13419 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13420 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13421 All callers changed.
13423 * DISTLIST: Added commands/search.c.
13425 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13427 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13429 (grub_getcharwidth): New function.
13431 * kern/misc.c (grub_utf8_to_ucs4): New function.
13433 * include/grub/term.h (struct grub_term): Added a new member
13435 (grub_getcharwidth): New prototype.
13437 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13439 * term/i386/pc/console.c (map_char): New function. Segregated from
13440 grub_console_putchar.
13441 (grub_console_putchar): Use map_char.
13442 (grub_console_getcharwidth): New function.
13443 (grub_console_term): Specified grub_console_getcharwidth as
13446 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13447 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13449 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13451 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13452 on grub_strtoul completely.
13453 (write_char): Declare local variables in the beginning of the
13455 (grub_vesafb_getcharwidth): New function.
13456 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13459 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13461 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13462 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13463 commands/i386/pc/vbetest.c.
13465 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13466 call grub_vbe_get_controller_info again, because the returned
13467 information is volatile.
13468 (grub_vbe_set_video_mode): Mostly rewritten.
13469 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13470 grub_vbe_status_t correctly.
13471 (grub_vbe_get_video_mode_info): Likewise.
13472 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13473 several if statements.
13475 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13476 * commands/i386/pc/vbeinfo.c: ... this.
13478 * commands/i386/pc/vbe_test.c: Renamed to ...
13479 * commands/i386/pc/vbetest.c: ... this.
13481 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13483 (grub_cmd_vbeinfo): ... this. Save video modes before
13484 iterating. Skip a video mode, if it is not available, not enough
13485 information is given or it is monochrome. Show the memory
13486 model. Leave the interpretation of MODEVAR to grub_strtoul
13488 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13489 (GRUB_MOD_FINI): Likewise.
13491 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13492 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13493 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13494 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13495 grub_strtoul completely.
13496 (real2pm): Removed.
13497 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13498 (GRUB_MOD_FINI): Likewise.
13500 * normal/misc.c: Include grub/mm.h.
13502 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13503 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13504 (vbe_list_modes_mod_SOURCES): Removed.
13505 (vbe_list_modes_mod_CFLAGS): Likewise.
13506 (vbe_test_mod_SOURCES): Likewise.
13507 (vbe_test_mod_CFLAGS): Likewise.
13508 (vbeinfo_mod_SOURCES): New variable.
13509 (vbeinfo_mod_CFLAGS): Likewise.
13510 (vbetest_mod_SOURCES): Likewise.
13511 (vbetest_mod_CFLAGS): Likewise.
13513 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13515 * normal/misc.c: New file.
13517 * DISTLIST: Added normal/misc.c.
13519 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13520 DISK to HOOK. Call HOOK with DISK.
13521 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13522 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13523 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13525 * normal/menu_entry.c (struct screen): Added a new member
13526 "completion_shown".
13527 (completion_buffer): New global variable.
13528 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13529 (store_completion): New function.
13530 (complete): Likewise.
13531 (clear_completions): Likewise.
13532 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13533 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13534 a tab, call complete.
13536 * normal/completion.c (disk_dev): Removed.
13537 (print_simple_completion): Likewise.
13538 (print_partition_completion): Likewise.
13539 (print_func): New global variable.
13540 (add_completion): Do not take the arguments WHAT or PRINT any
13541 longer. Added a new argument TYPE. Instead of printing directly,
13542 call PRINT_FUNC if not NULL.
13543 All callers changed.
13544 (complete_device): Use a local variable DEV instead of
13545 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13546 (grub_normal_do_completion): Take a new argument HOOK. Do not
13547 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13548 empty string, return NULL instead.
13549 All callers changed.
13551 * normal/cmdline.c (print_completion): New function.
13553 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13555 All callers changed.
13557 * kern/disk.c (grub_print_partinfo): Removed.
13559 * include/grub/partition.h (struct grub_partition_map): Add a new
13560 argument DISK into HOOK of ITERATE.
13561 (grub_partition_iterate): Add a new argument DISK to HOOK.
13563 * include/grub/normal.h (enum grub_completion_type): New enum.
13564 (grub_completion_type_t): New type.
13565 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13566 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13567 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13568 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13569 (grub_normal_do_completion): Added a new argument HOOK.
13570 (grub_normal_print_device_info): New prototype.
13572 * include/grub/disk.h (grub_print_partinfo): Removed.
13574 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13575 (normal_mod_SOURCES): Likewise.
13576 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13577 (normal_mod_SOURCES): Likewise.
13579 * commands/ls.c (grub_ls_list_disks): Use
13580 grub_normal_print_device_info instead of grub_print_partinfo. Free
13582 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13583 duplicating the code.
13585 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13587 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13588 follow GCS more precisely.
13589 * commands/i386/pc/vbe_test.c: Likewise.
13590 * include/grub/i386/pc/vbe.h: Likewise.
13591 * term/i386/pc/vesafb.c: Likewise.
13592 * video/i386/pc/vbe.c: Likewise.
13594 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13596 * DISTLIST: Added term/i386/pc/vesafb.c
13597 DISTLIST: Added video/i386/pc/vbe.c
13598 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13599 DISTLIST: Added commands/i386/pc/vbe_test.c.
13600 * commands/i386/pc/vbe_list_modes.c: New file.
13601 * commands/i386/pc/vbe_test.c: Likewise.
13602 * term/i386/pc/vesafb.c: Likewise.
13603 * video/i386/pc/vbe.c: Likewise.
13604 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13605 (grub_vbe_probe) Added prototype.
13606 (grub_vbe_set_video_mode) Likewise.
13607 (grub_vbe_get_video_mode) Likewise.
13608 (grub_vbe_get_video_mode_info) Likewise.
13609 (grub_vbe_set_pixel_rgb) Likewise.
13610 (grub_vbe_set_pixel_index) Likewise.
13611 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13612 (pkgdata_MODULES): Added vesafb.mod.
13613 (pkgdata_MODULES): Added vbe_list_modes.mod.
13614 (pkgdata_MODULES): Added vbe_test.mod.
13615 (vbe_mod_SOURCES): Added.
13616 (vbe_mod_CFLAGS): Likewise.
13617 (vesafb_mod_SOURCES): Likewise.
13618 (vesafb_mod_CFLAGS): Likewise.
13619 (vbe_list_modes_mod_SOURCES): Likewise.
13620 (vbe_list_modes_mod_CFLAGS): Likewise.
13621 (vbe_test_mod_SOURCES): Likewise.
13622 (vbe_test_mod_CFLAGS): Likewise.
13624 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13626 * normal/command.c (grub_command_execute): If INTERACTIVE is
13627 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13628 CMDLINE. Disable the pager if INTERACTIVE is true.
13629 All callers are changed.
13631 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13632 before reading a config file.
13633 * normal/main.c (read_config_file): Even if a command is not
13634 found, register it if it is within an entry.
13636 * util/grub-emu.c: Include sys/types.h and unistd.h.
13637 (options): Added --hold.
13638 (struct arguments): Added a new member "hold".
13639 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13641 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13642 cleared by a debugger, if it is not zero.
13644 * include/grub/normal.h (grub_command_execute): Add an argument
13647 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13649 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13651 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13653 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13654 program with another one, because the old one didn't detect a bug
13655 in gcc-3.4. Always use regparm 2, because the new test is still
13656 not enough for gcc-4.0. Someone must investigate a simple test
13657 case which detects a bug in gcc-4.0.
13659 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13661 * DISTLIST: Added normal/completion.c.
13663 * normal/completion.c: New file.
13665 * term/i386/pc/console.c (grub_console_getwh): New function.
13666 (grub_console_term): Assign grub_console_getwh to getwh.
13668 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13669 function is defined in normal/completion.c as
13670 grub_normal_do_completion.
13671 (grub_cmdline_get): Use grub_normal_do_completion instead of
13674 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13675 returns non-zero, otherwise return 0.
13676 (grub_partition_iterate): First, probe the partition map. Then,
13677 call ITERATE only for this partition map.
13679 * kern/misc.c (grub_strncmp): Rewritten.
13681 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13682 returns non-zero. Otherwise return 0.
13684 * include/grub/partition.h (grub_partition_map_iterate): Return
13685 int instead of void.
13687 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13689 * include/grub/misc.h (grub_strncmp): Change the type of N to
13692 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13695 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13696 unsigned explicitly before comparing it with I.
13698 * kern/main.c (grub_env_write_root): Add the attribute unused into
13701 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13702 normal/completion.c.
13703 (normal_mod_SOURCES): Likewise.
13704 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13705 (normal_mod_SOURCES): Likewise.
13707 * normal/command.c (grub_iterate_commands): If ITERATE returns
13708 non-zero, return one immediately.
13710 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13712 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13713 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13715 (grub_vbe_get_controller_info): New function.
13716 (grub_vbe_get_mode_info): Likewise.
13717 (grub_vbe_set_mode): Likewise.
13718 (grub_vbe_get_mode): Likewise.
13719 (grub_vbe_set_memory_window): Likewise.
13720 (grub_vbe_get_memory_window): Likewise.
13721 (grub_vbe_set_scanline_length): Likewise.
13722 (grub_vbe_get_scanline_length): Likewise.
13723 (grub_vbe_set_display_start): Likewise.
13724 (grub_vbe_get_display_start): Likewise.
13725 (grub_vbe_set_palette_data): Likewise.
13726 * include/grub/i386/pc/vbe.h: New file.
13728 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13730 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13731 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13732 * DISTLIST: Likewise.
13733 * kern/ieee1275/of.c: Moved to ...
13734 * kern/ieee1275/ieee1275.c: ... here.
13736 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13738 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13739 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13740 Pass 0 as `end' parameter to grub_strtoul().
13742 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13744 * include/grub/powerpc/ieee1275/console.h: Do not include
13745 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13747 (grub_console_cur_color): Remove i386-specific prototype.
13748 (grub_console_real_putchar): Likewise.
13749 (grub_console_checkkey): Likewise.
13750 (grub_console_getkey): Likewise.
13751 (grub_console_getxy): Likewise.
13752 (grub_console_gotoxy): Likewise.
13753 (grub_console_cls): Likewise.
13754 (grub_console_setcursor): Likewise.
13755 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13756 Include <grub/machine/console.h>.
13757 * term/ieee1275/ofconsole.c: Likewise.
13759 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13761 * Makefile.in (LIBLZO): New variable.
13763 * configure.ac: Check for LZO version 2.
13765 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13766 lzo/lzo1x.h instead of lzo1x.h.
13768 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13771 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13772 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13774 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13775 copying the data from PARTITION to P.
13777 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13779 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13780 negative, unload the module.
13782 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13783 map is "pc_partition_map" but not "pc".
13784 (usage): Fix the description. The options are --boot-image and
13785 --core-image but not --boot-file or --core-file.
13786 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13787 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13790 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13791 --core-file. Specify INSTALL_DEVICE as an argument.
13793 * util/console.c: Include config.h.
13794 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13795 [HAVE_NCURSES_H]: Include ncurses.h.
13796 [HAVE_CURSES_H]: Include curses.h.
13797 [!A_NORMAL] (A_NORMAL): Defined as zero.
13798 [!A_STANDOUT] (A_STANDOUT): Likewise.
13800 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13802 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13804 * configure.ac: Check for curses libraries and headers.
13806 * Makefile.in (LIBCURSES): New variable.
13808 * genmk.rb (Script::rule): Set the executable bits.
13810 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13811 name of the PC partition map is "pc_partition_map" but not "pc".
13813 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13815 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13816 (modules): Likewise.
13817 (usage): Added descriptions for --modules and --grub-probefs.
13818 Handle --modules and --grub-probefs. Save the arguments in MODULES
13819 and GRUB_PROBEFS, respectively.
13820 Auto-detect a filesystem module against GRUBDIR. If the result is
13821 empty and modules are not specified explicitly, abort the
13822 installation. Add the result to MODULES.
13824 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13825 disk/powerpc/ieee1275/ofdisk.c,
13826 include/grub/powerpc/ieee1275/init.h and
13827 term/powerpc/ieee1275/ofconsole.c.
13828 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13829 term/ieee1275/ofconsole.c.
13831 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13833 * COPYING: Upgraded to the latest version. Only the address of the
13834 FSF office has changed.
13836 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13838 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13839 kern/ieee1275.c with kern/ieee1275/of.c.
13841 * kern/ieee1275.c: Moved to ...
13842 * kern/ieee1275/of.c: ... here.
13844 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13846 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
13849 * config.guess: Updated to the latest version from gnulib.
13850 * config.sub: Likewise.
13851 * install.sh: Likewise.
13852 * mkinstalldirs: Likewise.
13854 * include/grub/console.h: Removed. This file is arch-specific. Do
13855 not put this in include/grub.
13857 * include/grub/i386/pc/console.h: Resurrected.
13859 * util/console.c: Include grub/machine/console.h instead of
13861 * util/grub-emu.c: Likewise.
13863 2005-08-04 Marco Gerards <metgerards@student.han.nl>
13865 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13868 From Vincent Pelletier <subdino2004@yahoo.fr>
13869 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13870 Redefined to use grub_getwh.
13871 (grub_term): New member named getwh.
13872 (grub_getwh): New prototype.
13873 * kern/term.c (grub_getwh): New function.
13874 * term/i386/pc/console.c (grub_console_getwh): New function.
13875 (grub_console_term): New member `getwh'.
13876 * term/i386/pc/vga.c (grub_vga_getwh): New function.
13877 (grub_vga_term): New member `getwh'.
13878 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
13880 (grub_ofconsole_getw): New function.
13881 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13882 (grub_ofconsole_term): New field named getwh and new initial
13885 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
13887 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13888 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
13889 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13890 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13891 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13892 of <grub/machine/ieee1275.h>.
13893 * commands/ieee1275/reboot.c: Likewise.
13894 * boot/powerpc/ieee1275/ieee1275.c: Move ...
13895 * kern/ieee1275.c: ... to here. All users updated. Change all
13896 parameter structs to use new type `grub_ieee1275_cell_t'.
13897 * term/powerpc/ieee1275/ofconsole.c: Move ...
13898 * term/ieee1275/ofconsole.c: ... to here. All users updated.
13899 * disk/powerpc/ieee1275/ofdisk.c: Move ...
13900 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
13901 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13903 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13904 Remove unused prototypes. All users updated.
13905 * include/grub/powerpc/ieee1275/console.h: Removed.
13906 * include/grub/powerpc/ieee1275/ieee1275.h: Define
13907 `grub_ieee1275_cell_t'.
13908 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13909 Cast comparisons with -1 to the correct type.
13910 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13911 type to match `grub_ieee1275_entry_fn'.
13913 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
13915 * DISTLIST: Added util/i386/pc/grub-probefs.c.
13917 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13918 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13920 (grub_probefs_SOURCES): New variable.
13922 * util/i386/pc/grub-probefs.c: New file.
13924 * util/i386/pc/grub-setup.c (main): Call
13925 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13926 grub_hfs_init and grub_jfs_init to initialize the system. Call
13927 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13928 grub_pc_partition_map_fini to finish the system.
13930 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
13932 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13934 (grub_multiboot_load_elf32): Likewise.
13935 (grub_multiboot_is_elf64): Likewise.
13936 (grub_multiboot_load_elf64): Likewise.
13937 (grub_multiboot_load_elf): Likewise.
13938 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13939 an ELF32 or ELF64 file.
13940 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13942 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13943 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13944 NULL before calling FS->LABEL.
13945 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13946 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13947 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13948 before calling FS->LABEL.
13950 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13952 * util/i386/pc/grub-install.in (datadir): New variable.
13954 (pkgdatadir): New variable.
13955 (pkglibdir): Removed.
13957 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13959 * DISTLIST: Added util/i386/pc/grub-install.in.
13961 * util/i386/pc/grub-install.in: New file.
13963 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13964 (grub_install_SOURCES): Likewise.
13966 * genmk.rb: Added support for scripts.
13967 (Script): New class.
13968 (scripts): New variable.
13970 * Makefile.in (install-local): Install sbin_SCRIPTS by
13972 (uninstall): Remove sbin_SCRIPTS.
13974 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13975 device, try to get a GRUB device by
13976 grub_util_biosdisk_get_grub_dev.
13979 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13980 description for --device-map.
13982 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13984 Change the semantics of variable hooks. They now return strings
13985 instead of error values.
13987 * util/i386/pc/grub-setup.c: Include grub/env.h.
13988 (setup): Use grub_device_set_root instead of grub_env_set.
13990 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13991 grub_env_get instead of grub_device_set_root and
13992 grub_device_get_root, respectively.
13994 * kern/main.c (grub_env_write_root): New function.
13995 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13996 grub_env_set instead of grub_device_set_root.
13998 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14000 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14001 rather than calling ENV->WRITE_HOOK afterwards.
14002 (grub_env_get): Return the result of ENV->READ_HOOK rather than
14003 passing a pointer of a pointer.
14004 (grub_register_variable_hook): Change the types of "read_hook" and
14005 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14007 Allocate the default empty string on the heap, because this string
14008 may be freed later.
14010 * kern/device.c: Include grub/env.h.
14011 (grub_device_set_root): Removed.
14012 (grub_device_get_root): Likewise.
14013 (grub_device_open): Use grub_env_get instead of
14014 grub_device_get_root.
14016 * include/grub/env.h (grub_env_read_hook_t): New type.
14017 (grub_env_write_hook_t): Likewise.
14018 (grub_env_var): Change the types of "read_hook" and "write_hook"
14019 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14020 (grub_register_variable_hook): Likewise.
14022 * include/grub/device.h (grub_device_set_root): Removed.
14023 (grub_device_set_root): Likewise.
14025 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14026 make sure that DIRNAME terminates with '/', so that
14027 grub_fat_find_dir will fail if PATH is not a directory.
14029 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14031 Use the qualifier auto for print_files and print_files_long.
14032 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14034 Put a newline only if there is no error.
14035 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14038 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
14040 * kern/partition.c (grub_partition_probe): Initialize PART to
14041 NULL. Otherwise, when no partition map is registered, this returns
14044 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
14046 * partmap/apple.c (apple_partition_map_iterate): Check if POS
14047 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14050 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
14052 * commands/ls.c (grub_ls_list_disks): Print the filesystem
14053 information on each device, if it does not have partitions. Print
14054 "Device" instead of "Disk", because this function is not specific
14057 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14058 static to ensure that it is put on the memory rather than a
14061 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14063 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14064 (grub_cat_init): Likewise.
14065 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14066 (options): Likewise.
14067 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14068 (grub_configfile_init): Likewise.
14069 * font/manager.c (GRUB_MOD_INIT): Likewise.
14070 * commands/help.c (GRUB_MOD_INIT): Likewise.
14071 (grub_help_init): Likewise.
14072 * normal/command.c (grub_command_init): Likewise.
14073 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14074 * disk/loopback.c (grub_loop_init): Likewise.
14075 (GRUB_MOD_INIT): Likewise.
14076 * commands/ls.c (grub_ls_init): Likewise.
14077 (GRUB_MOD_INIT): Likewise.
14078 (options): Likewise.
14079 * commands/boot.c (grub_boot_init): Likewise.
14080 (GRUB_MOD_INIT): Likewise.
14081 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14082 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14083 (GRUB_MOD_INIT): Likewise.
14084 * commands/cmp.c (grub_cmp_init): Likewise.
14085 (GRUB_MOD_INIT): Likewise.
14087 * normal/arg.c: Use <> instead of "" to include header files.
14088 (SHORT_ARG_HELP): New macro.
14089 (SHORT_ARG_USAGE): Likewise.
14090 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14091 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14093 (find_short): Check if C is 'h' or 'u' explicitly.
14094 (grub_arg_show_help): Use space characters instead of tabs. Treat
14095 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14096 are shown with --help and --usage only if they are not used for
14097 the command itself.
14098 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14101 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14102 const into "longarg". Change the type of "shortarg" to int.
14104 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14106 * boot/i386/pc/boot.S (boot_drive_check): New label.
14108 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14111 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14112 which do not pass a boot drive correctly. Copied from GRUB Legacy.
14114 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14116 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14117 When turning off Gate A20, skip the check and return immediately,
14118 because this is not fatal usually.
14120 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
14122 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14123 be 0x7C00 instead of 0x8000.
14125 * boot/i386/pc/pxeboot.S: Rewritten.
14127 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14129 (gate_a20_check_state): Read a byte from 0x108000. Invert the
14132 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
14134 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14135 robustness. This routine now supports a BIOS call and System
14136 Control Port A to modify the gate A20.
14138 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14139 Increased to 0x440.
14141 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14143 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14144 device path and resulting ihandle.
14145 (grub_ofdisk_close): dprintf the ihandle being closed.
14146 (grub_ofdisk_read): dprintf function parameters.
14147 * kern/mm.c (grub_mm_init_region): Likewise.
14148 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14149 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14150 size, and boot arguments.
14151 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14152 before loading into memory.
14153 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14154 before loading into memory.
14156 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14158 * kern/mm.c: Added much documentation.
14159 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14160 8, set to 5 instead of 8.
14162 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14164 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14166 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14167 (grub_mkdevicemap_SOURCES): New variable.
14169 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14170 lib/device.c of GRUB Legacy.
14172 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14174 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14175 instead of PATH is NULL.
14177 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14179 * commands/cmp.c (BUFFER_SIZE): New macro.
14180 (grub_cmd_cmp): Close the right file at the right time. Compare
14181 only data just read. Don't report files of different size as
14182 identical. Dynamically allocate buffers. Move variable
14183 declarations at the beginning of function.
14185 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14187 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14190 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14192 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14193 when backspace is pressed at beginning of line.
14195 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14197 * DISTLIST: Added genfslist.sh.
14199 * normal/main.c (fs_module_list): New variable.
14200 (autoload_fs_module): New function.
14201 (read_fs_list): Likewise.
14202 (grub_normal_execute): Call read_fs_list.
14204 * kern/fs.c (grub_fs_autoload_hook): New variable.
14205 (grub_fs_probe): Added support for auto-loading.
14207 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14208 (grub_fs_module_list_t): New type.
14210 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14211 (grub_fs_autoload_hook): New prototype.
14213 * genfslist.sh: New file.
14215 * genmk.rb: Added a rule to generate a filesystem list.
14217 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14219 * configure.ac: Fix the test for cross-compiling.
14221 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14222 define GRUB_UTIL anymore.
14224 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14225 so this function works on other systems than just big endian.
14226 (load_modules): Likewise.
14227 (add_segments): Likewise.
14229 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14231 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14232 contains `l' modifier, get a long from va_arg().
14234 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14236 * kern/mm.c (grub_free): If the next free block which is being
14237 merged is the first free block, set the first block to the block
14239 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14241 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14243 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14244 `grub_ieee1275_chosen'.
14246 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14248 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14249 (grub_ieee1275_chosen): New variable.
14250 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14252 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14253 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14254 Rename first argument to `phandle' for consistency.
14255 (grub_ieee1275_get_property_length): Likewise.
14256 (grub_ieee1275_next_property): Likewise. Change type of first argument
14257 to grub_ieee1275_phandle_t.
14258 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14259 Move export next to declaration.
14260 (grub_ieee1275_chosen): New variable.
14261 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14262 Correct cosmetic typo.
14263 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14264 `grub_ieee1275_chosen'.
14265 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14266 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14267 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14268 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14269 `grub_ieee1275_chosen'.
14271 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14273 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14275 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14276 /chosen/bootargs as "variable=value" pairs.
14278 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14280 * include/grub/misc.h (grub_dprintf): New macro.
14281 (grub_real_dprintf): New prototype.
14282 (grub_strword): Likewise.
14283 (grub_iswordseparator): Likewise.
14284 * kern/misc.c (grub_real_dprintf): New function.
14285 (grub_strword): Likewise.
14286 (grub_iswordseparator): Likewise.
14288 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14290 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14291 (roundup): Remove macro.
14292 (grub_ieee1275_flags): Make static.
14293 (grub_ieee1275_realmode): Remove.
14294 (grub_ieee1275_test_flag): New function.
14295 (grub_ieee1275_set_flag): Likewise.
14296 (find_options): Rename to `grub_ieee1275_find_options'; update
14297 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14298 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14299 (cmain): New prototype.
14300 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14301 `grub_ieee1275_flags' directly.
14302 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14303 machine/biosdisk.h.
14304 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14305 Don't include grub/machine/init.h.
14306 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14307 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14309 (grub_ieee1275_realmode): Likewise.
14310 (grub_ieee1275_flag): New enum.
14311 (grub_ieee1275_test_flag): New prototype.
14312 (grub_ieee1275_set_flag): New prototype.
14313 * include/grub/powerpc/ieee1275/init.h: Remove file.
14314 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14315 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14316 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14317 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14319 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14320 `grub_ieee1275_test_flag'.
14321 (grub_ieee1275_encode_devname): Likewise.
14323 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14325 * include/grub/powerpc/ieee1275/ieee1275.h
14326 (grub_ieee1275_encode_devname): New prototype.
14327 (grub_ieee1275_get_filename): Likewise.
14328 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14330 (grub_set_prefix): Likewise.
14331 (grub_machine_init): Call grub_set_prefix.
14332 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14333 (grub_parse_type): New enum.
14334 (grub_ieee1275_get_devargs): New function.
14335 (grub_ieee1275_get_devname): Likewise.
14336 (grub_ieee1275_parse_args): Likewise.
14337 (grub_ieee1275_get_filename): Likewise.
14338 (grub_ieee1275_encode_devname): Likewise.
14340 2005-03-30 Marco Gerards <metgerards@student.han.nl>
14342 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14343 `grub_loader_unset'.
14345 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14347 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14348 instead of grub_ieee1275_interpret.
14349 (grub_halt_init): New function.
14350 (grub_halt_fini): Likewise.
14351 (GRUB_MOD_INIT): Correct message grammar.
14352 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14353 instead of grub_ieee1275_interpret.
14354 (grub_reboot_init): New function.
14355 (grub_reboot_fini): Likewise.
14356 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14357 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14358 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14359 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14360 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14362 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14364 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14366 (grub_halt): Likewise.
14367 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14368 (cmain): Remove __attribute__((unused)).
14369 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14370 (grub_heap_len): Likewise.
14371 (grub_machine_fini): New function.
14372 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14373 (grub_halt): Likewise.
14374 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14376 * util/powerpc/ieee1275/misc.c: New file.
14378 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14380 * DISTLIST: New file.
14381 * gendistlist.sh: Likewise.
14383 * Makefile.in (COMMON_DISTFILES): Removed.
14384 (BOOT_DISTFILES): Likewise.
14385 (CONF_DISTFILES): Likewise.
14386 (DISK_DISTFILES): Likewise.
14387 (FS_DISTFILES): Likewise.
14388 (INCLUDE_DISTFILES): Likewise.
14389 (KERN_DISTFILES): Likewise.
14390 (LOADER_DISTFILES): Likewise.
14391 (TERM_DISTFILES): Likewise.
14392 (UTIL_DISTFILES): Likewise.
14393 (DISTFILES): Likewise.
14394 (uninstall): Uninstall files in $(pkgdata_DATA).
14395 (DISTLIST): New target.
14396 (distdir): Use the contents of the file DISTLIST to get a list of
14399 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14401 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14402 descriptor. This is ported from GRUB Legacy.
14404 * gencmdlist.sh: Added an extra semicolon to make it work with
14405 old sed versions. Reported by Robert Bihlmeyer
14406 <robbe@orcus.priv.at>.
14408 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
14410 Automatic loading of commands is supported.
14412 * normal/main.c (read_command_list): New function.
14413 (grub_normal_execute): Call read_command_list.
14415 * normal/command.c (grub_register_command): Return zero or CMD.
14416 Allocate CMD->NAME from the heap.
14417 Initialize CMD->MODULE_NAME to zero.
14418 Find the same name as well. If the same command is found and it is
14419 a dummy command, overwrite members. If it is not a dummy command,
14421 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14422 (grub_command_find): If a dummy command is found, load a module
14423 and retry to find a command only once.
14425 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14426 make sure that each command is loaded.
14428 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14430 (struct grub_command): Remove const from the member `name'.
14431 Add a new member `module_name'.
14432 (grub_register_command): Return grub_command_t.
14434 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14435 sure that each command is loaded.
14437 * genmk.rb (PModule::rule): Specify a module name without the
14438 suffix ".mod" to gencmdlist.sh.
14440 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14442 * gencmdlist.sh: New file.
14444 * genmk.rb (PModule::rule): Generate a rule for a command list.
14446 Generate command.lst from $(COMMANDFILES).
14448 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14449 (DATA): Added $(pkgdata_DATA).
14450 (install-local): Install files in $(pkgdata_DATA).
14452 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14454 * term/i386/pc/vga.c (debug_command): Removed.
14455 (GRUB_MOD_INIT): Do not register the command "debug".
14457 From Hollis Blanchard:
14458 * commands/configfile.c: New file.
14459 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14460 commands/configfile.c.
14461 (pkgdata_MODULES): Added configfile.mod.
14462 (configfile_mod_SOURCES): New variable.
14463 (configfile_mod_CFLAGS): Likewise.
14464 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14465 commands/configfile.c.
14466 (pkgdata_MODULES): Added configfile.mod.
14467 (configfile_mod_SOURCES): New variable.
14468 (configfile_mod_CFLAGS): Likewise.
14469 * util/grub-emu.c (main): Call grub_configfile_init and
14470 grub_configfile_fini.
14471 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14473 [GRUB_UTIL] (grub_configfile_fini): Likewise.
14475 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14477 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14480 * commands/help.c (grub_cmd_help): Do not print newlines after
14481 the last command in print_command_help.
14483 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14485 * commands/default.h: New file.
14486 * commands/timeout.h: Likewise.
14487 * normal/context.c: Likewise.
14489 * util/misc.c: Do not include sys/times.h.
14490 Include sys/time.h and grub/machine/time.h.
14491 (grub_get_rtc): Rewritten with gettimeofday.
14493 * util/grub-emu.c (main): Call grub_default_init and
14494 grub_timeout_init before grub_normal_init, and call
14495 grub_timeout_fini and grub_default_fini after grub_main.
14497 * util/console.c (grub_ncurses_checkkey): Return the read
14500 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14503 * normal/main.c (read_config_file): Push MENU. If this fails,
14504 print an error and wait for a user input.
14505 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14506 If a menu is empty or an error occurs, pop MENU.
14507 (grub_normal_execute): Pop and free MENU after grub_menu_run
14510 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14512 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14514 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14516 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14518 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14521 * include/grub/normal.h (struct grub_menu_list): New struct.
14522 (grub_menu_list_t): New type.
14523 (struct grub_context): New struct.
14524 (grub_context_t): New type.
14525 (grub_register_command): Got rid of EXPORT_FUNC.
14526 (grub_unregister_command): Likewise.
14527 (grub_context_get): New prototype.
14528 (grub_context_get_current_menu): Likewise.
14529 (grub_context_push_menu): Likewise.
14530 (grub_context_pop_menu): Likewise.
14531 [GRUB_UTIL] (grub_default_init): Likewise.
14532 [GRUB_UTIL] (grub_default_fini): Likewise.
14533 [GRUB_UTIL] (grub_timeout_init): Likewise.
14534 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14536 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14537 commands/timeout.c and normal/context.c.
14538 (pkgdata_MODULES): Added default.mod and timeout.mod.
14539 (normal_mod_SOURCES): Added normal/context.c.
14540 (default_mod_SOURCES): New variable.
14541 (default_mod_CFLAGS): Likewise.
14542 (timeout_mod_SOURCES): Likewise.
14543 (timeout_mod_CFLAGS): Likewise.
14544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14546 (pkgdata_MODULES): Added default.mod and timeout.mod.
14547 (normal_mod_SOURCES): Added normal/context.c.
14548 (default_mod_SOURCES): New variable.
14549 (default_mod_CFLAGS): Likewise.
14550 (timeout_mod_SOURCES): Likewise.
14551 (timeout_mod_CFLAGS): Likewise.
14553 * Makefile.in (all-local): Added $(MKFILES).
14555 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14557 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14558 (grub_emu_SOURCES): Likewise.
14559 (pkgdata_MODULES): Add `sun.mod'.
14560 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14561 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14563 (pkgdata_MODULES): Add `sun.mod'.
14564 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14565 * include/grub/partition.h (grub_sun_partition_map_init): New
14567 (grub_sun_partition_map_fini): Likewise.
14568 * partmap/sun.c: New file.
14569 * util/grub-emu.c (main): Initialize and de-initialize the sun
14570 partitionmap support.
14572 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14574 This implements an Emacs-like menu entry editor.
14576 * normal/menu_entry.c: New file.
14578 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14579 characters to ASCII.
14580 (saved_char): New variable.
14581 (grub_ncurses_checkkey): Rewritten completely.
14582 (grub_ncurses_getkey): Likewise.
14583 (grub_ncurses_init): Call raw instead of cbreak.
14585 * normal/menu.c (print_entry): Do not put a space.
14586 (init_page): Renamed to ...
14587 (grub_menu_init_page): ... this. All callers changed.
14588 (edit_menu_entry): Removed.
14589 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14591 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14593 * kern/misc.c (grub_vprintf): Call grub_refresh.
14595 * normal/menu.c (DISP_LEFT): Renamed to ...
14596 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14597 * normal/menu.c (DISP_UP): Renamed to ...
14598 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14599 * normal/menu.c (DISP_RIGHT): Renamed to ...
14600 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14601 * normal/menu.c (DISP_DOWN): Renamed to ...
14602 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14603 * normal/menu.c (DISP_HLINE): Renamed to ...
14604 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14605 * normal/menu.c (DISP_VLINE): Renamed to ...
14606 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14607 * normal/menu.c (DISP_UL): Renamed to ...
14608 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14609 * normal/menu.c (DISP_UR): Renamed to ...
14610 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14611 * normal/menu.c (DISP_LL): Renamed to ...
14612 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14613 * normal/menu.c (DISP_LR): Renamed to ...
14614 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14615 * normal/menu.c (TERM_WIDTH): Renamed to ...
14616 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14617 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14618 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14619 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14620 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14621 * normal/menu.c (TERM_MARGIN): Renamed to ...
14622 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14623 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14624 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14625 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14626 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14627 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14628 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14629 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14630 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14631 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14632 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14633 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14634 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14635 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14636 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14637 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14638 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14639 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14640 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14641 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14642 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14643 All callers changed.
14645 * include/grub/normal.h: New prototype.
14647 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14648 normal/menu_entry.c.
14649 (normal_mod_SOURCES): Likewise.
14650 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14651 (normal_mod_SOURCES): Likewise.
14653 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14655 * include/grub/normal.h (grub_halt_init): New prototype.
14656 (grub_halt_fini): Likewise.
14657 (grub_reboot_init): Likewise.
14658 (grub_reboot_fini): Likewise.
14660 * util/grub-emu.c: Include signal.h.
14661 (main_env): New global variable.
14662 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14664 (grub_machine_fini): New function.
14665 (main): Call grub_halt_init and grub_reboot_init before
14666 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14667 Call setjmp with MAIN_ENV to go back afterwards.
14668 Call grub_machine_fini right before return.
14670 * include/grub/util/misc.h: Include setjmp.h.
14671 (main_env): New prototype.
14673 * include/grub/kernel.h (grub_machine_fini): New prototype.
14674 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14675 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14677 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14678 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14679 * term/i386/pc/console.c (grub_console_fini): Likewise.
14681 * util/i386/pc/misc.c: New file.
14683 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14684 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14685 commands/i386/pc/reboot.c.
14687 2005-02-14 Guillem Jover <guillem@hadrons.org>
14689 * include/grub/dl.h (grub_dl_check_header): New prototype.
14690 (grub_arch_dl_check_header): Change return type to grub_err_t,
14691 remove size parameter and export function. Update all callers.
14692 * kern/dl.c (grub_dl_check_header): New function.
14693 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14694 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14695 are inside the core.
14696 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14697 independent ELF header checks.
14698 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14699 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14700 `grub_dl_check_header' instead of explicit checks. Check for the
14702 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14703 `grub_dl_check_header' instead of explicit checks. Remove arch
14704 specific ELF header checks.
14706 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14709 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14711 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14712 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14714 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14716 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14717 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14718 (part_map_iterate): Clear `grub_errno' and return 0 if
14719 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14720 * partmap/amiga.c (amiga_partition_map_iterate): Return
14721 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14722 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14724 2005-02-01 Guillem Jover <guillem@hadrons.org>
14726 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14729 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14731 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14733 (grub_rescue_cmd_linux): New prototype.
14734 (grub_rescue_cmd_initrd): Likewise.
14735 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14737 (grub_linux_release_mem): Release the memory for the initrd.
14738 (grub_load_linux): Renamed from this...
14739 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14740 Changed `entry' not to be static. Loop over memory regions to
14741 find another one when the default fails.
14742 (grub_rescue_cmd_initrd): New function.
14743 (grub_linux_init): Remove function.
14744 (grub_linux_fini): Likewise.
14745 (GRUB_MOD_INIT): Register `initrd'.
14746 (GRUB_MOD_FINI): Unregister `initrd'.
14747 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14749 (grub_linux_normal_fini): Likewise.
14750 (GRUB_MOD_INIT): Register `initrd'.
14751 (GRUB_MOD_FINI): Unregister `initrd'.
14753 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14755 * commands/help.c: New file.
14756 * normal/arg.c (show_help): Renamed to...
14757 (grub_arg_show_help): ... this.
14758 * commands/i386/pc/halt.c: New file.
14759 * commands/i386/pc/reboot.c: Likewise.
14760 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14761 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14762 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14763 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14765 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14767 (pkgdata_MODULES): Add `help.mod'.
14768 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14769 * grub/i386/pc/init.h (grub_reboot): New prototype.
14770 (grub_halt): Likewise.
14771 * include/grub/normal.h (grub_arg_show_help): New prototype.
14772 (grub_help_init): Likewise.
14773 (grub_help_fini): Likewise.
14774 * util/grub-emu.c (main): Initialize and deinitialize the help
14777 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14779 * normal/command.c (grub_command_init): Fixed the description of
14780 the `set' and `unset' commands.
14782 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14784 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14786 * commands/ieee1275/halt.c: New file.
14787 * commands/ieee1275/reboot.c: Likewise.
14788 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14789 `__attribute__ ((unused))'. Some GCS related fixed.
14790 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14791 (grub_suspend_fini): Likewise.
14792 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14794 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14795 (halt_mod_CFLAGS): New variables.
14796 * include/grub/powerpc/ieee1275/ieee1275.h
14797 (grub_ieee1275_interpret): New prototype.
14799 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14801 * include/grub/misc.h (memmove): New prototype.
14802 (memcpy): Likewise.
14804 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14806 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14807 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14809 2005-01-22 Marco Gerards <metgerards@student.han.nl>
14811 * kern/misc.c (grub_strndup): Function rewritten.
14813 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14815 * normal/menu.c (TERM_WIDTH): Macro redefined.
14816 (TERM_TOP_BORDER_Y): Likewise.
14817 (draw_border): Replaced while-loop by a for-loop. Make the number
14818 of lines consistent with the number of lines displayed in
14819 print_entries. Added a margin below the rectangle.
14820 (print_entry): Make the entry fit in the rectangle.
14821 (print_entries): Display the scroll arrows next to the right
14824 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14826 * fs/minix.c (grub_minix_find_file): Reserve more space for
14827 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14828 `grub_strncpy' to copy `path' into it.
14830 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14832 Add the loopback device, a device via which files can be accessed
14835 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14836 (pkgdata_MODULES): Add loopback.mod.
14837 (loopback_mod_SOURCES): New variable.
14838 (loopback_mod_CFLAGS): Likewise.
14839 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14841 (pkgdata_MODULES): Add loopback.mod.
14842 (loopback_mod_SOURCES): New variable.
14843 (loopback_mod_CFLAGS): Likewise.
14844 * disk/loopback.c: new file.
14845 * include/grub/normal.h (grub_loop_init): New prototype.
14846 (grub_loop_fini): New prototype.
14847 * util/grub-emu.c (main): Initialize and de-initialize loopback
14849 * include/grub/disk.h (grub_disk_dev_id): Add
14850 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14852 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
14854 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14856 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14857 (suspend_mod_SOURCES): New variable.
14858 (suspend_mod_CFLAGS): Likewise.
14859 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14861 * commands/ieee1275/suspend.c: New file.
14863 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14865 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
14866 ((unused))' to `__attribute__ ((used))'.
14867 (GRUB_MOD_FINI): Likewise.
14868 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14869 * genmk.rb (PModule): Assign space to common symbols when linking
14872 2005-01-20 Marco Gerards <metgerards@student.han.nl>
14874 * include/grub/mm.h (grub_mm_init_region): Change the type of the
14875 `unsigned' arguments to `grub_size_t'.
14876 (grub_malloc): Likewise.
14877 (grub_realloc): Likewise.
14878 (grub_memalign): Likewise.
14879 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14880 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14881 * util/misc.c (grub_malloc): Likewise.
14882 (grub_realloc): Likewise.
14883 * kern/mm.c (get_header_from_pointer): Change the casts to
14884 `unsigned' into a cast to `grub_size_t'.
14886 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14887 point to `currnode' when `currnode' is changed.
14889 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
14890 Schottelius <nico-linux@schottelius.org>.
14892 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
14894 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14895 (note_path): Remove variable.
14896 (GRUB_IEEE1275_NOTE_NAME): New macro.
14897 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14898 (grub_ieee1275_note_hdr): New structure.
14899 (grub_ieee1275_note_desc): Likewise.
14900 (grub_ieee1275_note): Likewise.
14901 (load_note): Remove `dir' argument. All callers updated. Remove
14902 `note_img' and `path'. Do not load a file from `note_path'.
14903 Initialize a struct grub_ieee1275_note and write that to `out'.
14904 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14906 2005-01-05 Marco Gerards <metgerards@student.han.nl>
14908 * util/misc.c (grub_util_read_image): Revert last change. It
14909 called `grub_util_read_at', which seeks from the beginning of the
14912 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
14914 * TODO: Add note about endianness in grub-mkimage.
14915 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14917 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14918 (grub_mkimage_SOURCES): New target.
14919 * include/grub/kernel.h (grub_start_addr): Remove variable.
14920 (grub_end_addr): Likewise.
14921 (grub_total_module_size): Likewise.
14922 (grub_kernel_image_size): Likewise.
14923 (GRUB_MODULE_MAGIC): New constant.
14924 (grub_module_info): New structure.
14925 (grub_arch_modules_addr): New prototype.
14926 (grub_get_end_addr): Remove prototype.
14927 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14928 * include/grub/powerpc/ieee1275/kernel.h: New file.
14929 * include/grub/util/misc.h (grub_util_get_fp_size): New
14931 (grub_util_read_at): Likewise.
14932 (grub_util_write_image_at): Likewise.
14933 * kern/main.c (grub_get_end_addr): Remove function.
14934 (grub_load_modules): Call grub_arch_modules_addr instead of using
14935 grub_end_addr. Look for a grub_module_info struct in memory. Use
14936 the grub_module_info fields instead of calling grub_get_end_addr
14937 as loop conditions. Move grub_add_unused_region code here.
14938 (grub_add_unused_region): Remove function.
14939 * kern/i386/pc/init.c: Include grub/cache.h.
14940 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14941 one call to add_mem_region.
14942 (grub_arch_modules_addr): New function.
14943 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14944 (grub_total_module_size): Likewise.
14945 Include grub/machine/kernel.h.
14946 (grub_arch_modules_addr): New function.
14947 * util/grub-emu.c (grub_end_addr): Remove variable.
14948 (grub_total_module_size): Likewise.
14949 (grub_arch_modules_addr): New function.
14950 * util/misc.c: Include unistd.h.
14951 (grub_util_get_fp_size): New function.
14952 (grub_util_read_at): Likewise.
14953 (grub_util_write_image_at): Likewise.
14954 (grub_util_read_image): Call grub_util_read_at.
14955 (grub_util_write_image): Call grub_util_write_image_at.
14956 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14957 additional memory in kernel_img for a struct grub_module_info.
14958 Fill in that grub_module_info.
14959 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14961 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14963 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14965 * include/grub/powerpc/ieee1275/ieee1275.h
14966 (grub_ieee1275_milliseconds): New prototype.
14967 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14969 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14970 grub_ieee1275_milliseconds.
14972 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14974 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14976 (find_options): New function.
14977 (cmain): Call find_options.
14978 * include/grub/powerpc/ieee1275/ieee1275.h
14979 (grub_ieee1275_realmode): New extern variable.
14980 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14981 grub_map if grub_ieee1275_realmode is false.
14983 2004-12-29 Marco Gerards <metgerards@student.han.nl>
14985 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14986 lines are inserted and make it work like readline. Reported by
14987 Vincent Pelletier <subdino2004@yahoo.fr>.
14989 2004-12-28 Marco Gerards <metgerards@student.han.nl>
14991 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14993 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14994 `kern/powerpc/cache.S'.
14996 2004-12-27 Marco Gerards <metgerards@student.han.nl>
14998 * genmk.rb: Handle the `Program' class in the main loop. Written
14999 by Johan Rydberg <jrydberg@gnu.org>.
15000 (Program): New class.
15001 (programs): New variable.
15002 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15003 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
15004 instead of "grub/kernel.h". Include <grub/machine/init.h>.
15005 (help_arch): Function removed.
15006 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15007 `powerpc/libgcc.h' and `loader.h'.
15008 (pkgdata_PROGRAMS): New variable.
15009 (sbin_UTILITIES): Variable removed.
15010 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15011 (grubof_SOURCES): Variable re-defined so it only includes the
15012 core functionality.
15013 (grubof_CFLAGS): Remove `-DGRUBOF'.
15014 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15015 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15016 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15017 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15018 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15019 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15020 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15021 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15022 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15023 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15024 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15025 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15026 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15027 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15028 (pc_mod_CFLAGS): New variables.
15029 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15030 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15031 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15032 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15034 * include/grub/i386/pc/init.h (grub_os_area_addr)
15035 (rub_os_area_size): ... to here.
15036 * include/grub/powerpc/ieee1275/ieee1275.h
15037 (grub_ieee1275_entry_fn): Export symbol.
15038 * include/grub/powerpc/ieee1275/init.h: New file.
15039 * include/grub/powerpc/libgcc.h: Likewise.
15040 * include/grub/cache.h: Likewise.
15041 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
15042 <hollis@penguinppc.org>.
15043 * kern/dl.c: Include <grub/cache.h>.
15044 (grub_dl_flush_cache): New function.
15045 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15047 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15048 (grub_console_init): Removed prototypes.
15049 (grub_machine_init): Don't initialize the modules anymore.
15050 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15052 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15053 Macro undef removed.
15054 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15055 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15056 relocation `R_PPC_REL32'. Return an error when the relocation is
15058 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15059 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15060 * util/misc.c (grub_arch_sync_caches): Likewise.
15062 2004-12-19 Marco Gerards <metgerards@student.han.nl>
15064 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15065 `symlist.c', add `grubof_symlist.c'.
15066 (symlist.c): Variable removed.
15067 (grubof_HEADERS): Variable added.
15068 (grubof_symlist.c): New target.
15069 (kernel_syms.lst): Use `grubof_HEADERS' instead of
15070 `kernel_img_HEADERS'.
15071 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15072 * kern/powerpc/dl.c: New file.
15073 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15075 (grub_arch_dl_relocate_symbols): Likewise.
15076 (grub_register_exported_symbols): Likewise.
15078 2004-12-13 Marco Gerards <metgerards@student.han.nl>
15080 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15081 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
15082 to fail instead. Reported by Vincent Pelletier
15083 <subdino2004@yahoo.fr>.
15085 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15086 it is not allocated. Reported by Vincent Pelletier
15087 <subdino2004@yahoo.fr>.
15089 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15090 output so the output looks better.
15092 2004-12-04 Marco Gerards <metgerards@student.han.nl>
15094 Modulize the partition map support and add support for the amiga
15097 * commands/ls.c: Include <grub/partition.h> instead of
15098 <grub/machine/partition.h>.
15099 * kern/disk.c: Likewise.
15100 * kern/rescue.c: Likewise.
15101 * loader/i386/pc/chainloader.c: Likewise.
15102 * normal/cmdline.c: Likewise.
15103 * kern/powerpc/ieee1275/init.c: Likewise.
15104 (grub_machine_init): Call `grub_pc_partition_map_init',
15105 `grub_amiga_partition_map_init' and
15106 `grub_apple_partition_map_init'.
15107 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15108 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
15109 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
15110 `partition.h' and `pc_partition.h'.
15111 (grub_setup_SOURCES): Remove
15112 `disk/i386/pc/partition.c'. Add `kern/partition.c',
15113 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15114 (grub_emu_SOURCES): Likewise.
15115 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15116 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15117 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15118 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15119 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
15120 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15121 (grubof_SOURCES): Likewise.
15122 * disk/i386/pc/partition.c: File removed.
15123 * disk/powerpc/ieee1275/partition.c: Likewise.
15124 * include/grub/powerpc/ieee1275/partition.h: Likewise.
15125 * include/grub/i386/pc/partition.h: Likewise.
15126 * kern/partition.c: New file.
15127 * partmap/amiga.c: Likewise.
15128 * partmap/apple.c: Likewise.
15129 * partmap/pc.c: Likewise.
15130 * include/grub/partition.h: Likewise..
15131 * include/grub/pc_partition.h: Likewise.
15132 * util/grub-emu.c: Include <grub/partition.h> instead of
15133 <grub/machine/partition.h>.
15134 (main): Call `grub_pc_partition_map_init',
15135 `grub_amiga_partition_map_init' and
15136 `grub_apple_partition_map_init' and deinitialize afterwards.
15137 * util/i386/pc/biosdisk.c: Include `#include
15138 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15139 `<grub/machine/partition.h>'.
15140 * util/i386/pc/grub-setup.c: Likewise.
15141 * util/i386/pc/biosdisk.c: Likewise.
15142 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15143 partition information in case of a PC partition.
15144 * util/i386/pc/grub-setup.c: Include `#include
15145 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15146 `<grub/machine/partition.h>'.
15147 (setup): Only access the PC specific partition information in case
15150 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15152 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15153 (grub_longjmp): Likewise.
15154 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15156 * normal/powerpc/setjmp.S: New file.
15157 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15158 `normal/powerpc/setjmp.S'.
15159 (grubof_CFLAGS): Add `-DGRUBOF'.
15160 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15161 [GRUB_UTIL && !GRUBOF].
15163 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15165 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15166 property named `name'. Correctly handle the error returned by
15167 `grub_ieee1275_finddevice' if a device can not be opened.
15169 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15171 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15172 `actual' for negativity.
15173 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15176 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15178 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15179 (PAGE_OFFSET): New macro.
15180 (CRTC_ADDR_PORT): Likewise.
15181 (CRTC_DATA_PORT): Likewise.
15182 (START_ADDR_HIGH_REGISTER): Likewise.
15183 (START_ADDR_LOW_REGISTER): Likewise.
15184 (GRAPHICS_ADDR_PORT): Likewise.
15185 (GRAPHICS_DATA_PORT): Likewise.
15186 (READ_MAP_REGISTER): Likewise.
15187 (INPUT_STATUS1_REGISTER): Likewise.
15188 (INPUT_STATUS1_VERTR_BIT): Likewise.
15189 (page): New variable.
15190 (wait_vretrace): New function.
15191 (set_read_map): Likewise.
15192 (set_start_address): Likewise.
15193 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15195 (check_vga_mem): Take the page into account.
15196 (write_char): Likewise.
15197 (write_cursor): Likewise.
15198 (scroll_up): Likewise. Copy the page to the page that is not
15199 shown and switch between both pages.
15200 (grub_vga_putchar): Fix off by one error.
15201 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15204 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15206 Add support for iso9660 (including rockridge).
15208 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15209 (iso9660_mod_SOURCES): New variable.
15210 (iso9660_mod_CFLAGS): Likewise.
15211 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15212 * include/grub/fs.h (grub_iso9660_init): New prototype.
15213 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15214 * fs/iso9660.c: New file.
15216 * include/grub/misc.h (grub_strncat): New prototype.
15217 * kern/misc.c (grub_strncat): New function.
15219 * fs/hfs.c (grub_hfs_mount): Translate the error
15220 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15221 * fs/jfs.c (grub_jfs_mount): Likewise.
15222 * fs/ufs.c (grub_ufs_mount): Likewise.
15224 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15226 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15227 which initialized BAT registers.
15228 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15229 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15231 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15232 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15234 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15235 (grub_mapclaim): Likewise.
15236 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15237 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15240 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15242 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15243 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15244 -ffreestanding and -msoft-float.
15246 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15248 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15249 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15250 set in grub_ieee1275_flags.
15252 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15254 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15256 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15257 grub_console_init first.
15258 Change the memory range used for grub_ieee1275_claim and
15259 grub_mm_init_region.
15260 Print an error message if the claim fails.
15261 Include <grub/misc.h>.
15263 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15265 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15266 Call grub_children_iterate for device nodes of type `scsi',
15268 (grub_ofdisk_open): Remove manual device alias resolution.
15269 Fix memory leak when device cannot be opened.
15270 * include/grub/powerpc/ieee1275/ieee1275.h
15271 (grub_children_iterate): New prototype.
15272 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15274 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15275 Return -1 if args.size was -1.
15277 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15279 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15280 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15281 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15282 Open Firmware's memory for it; claim memory from _start to _end.
15283 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15284 (_end): New extern.
15285 (_start): Zero BSS from __bss_start to _end.
15286 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15288 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15290 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15292 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15293 -1 if args.base was -1.
15295 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15297 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15298 escape sequence instead of a literal ^L. Also call
15299 grub_ofconsole_gotoxy.
15301 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15303 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15304 void * arguments to grub_addr_t. All callers updated. Also make
15305 the `result' argument optional.
15306 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15307 All callers updated.
15309 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15311 * commands/ls.c (grub_ls_list_files): Use the string following the
15312 initial ')', if present, as the filesystem path.
15313 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15315 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15317 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15319 Make the source code of the menu interface more readable.
15321 * normal/menu.c: Include grub/mm.h.
15322 (TERM_WIDTH): New macro.
15323 (TERM_HEIGHT): Likewise.
15324 (TERM_INFO_HEIGHT): Likewise.
15325 (TERM_MARGIN): Likewise.
15326 (TERM_SCROLL_WIDTH): Likewise.
15327 (TERM_TOP_BORDER_Y): Likewise.
15328 (TERM_LEFT_BORDER_X): Likewise.
15329 (TERM_BORDER_WIDTH): Likewise.
15330 (TERM_MESSAGE_HEIGHT): Likewise.
15331 (TERM_BORDER_HEIGHT): Likewise.
15332 (TERM_NUM_ENTRIES): Likewise.
15333 (TERM_FIRST_ENTRY_Y): Likewise.
15334 (TERM_ENTRY_WIDTH): Likewise.
15335 (TERM_CURSOR_X): Likewise.
15336 (draw_border): Use macros instead of magic numbers.
15337 (print_entry): Likewise.
15338 (print_entries): Likewise.
15339 (run_menu): Likewise. Also, handle the key 'e'.
15340 (run_menu_entry): Ignore empty command lines.
15341 (print_message): Added a new argument EDIT. If EDIT is true,
15342 print a different message.
15343 (init_page): Likewise.
15344 (edit_menu_entry): New function. Not implemented yet.
15346 2004-09-17 Marco Gerards <metgerards@student.han.nl>
15348 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15349 can be loaded from normal mode.
15351 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15353 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15354 (multiboot_mod_CFLAGS): New variables.
15355 * loader/i386/pc/linux_normal.c: New file.
15356 * loader/i386/pc/multiboot_normal.c: Likewise.
15358 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15359 attribute `unused'.
15361 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15362 `fdiro' to read the mode information from instead of `diro'.
15364 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15365 looking up a symlink.
15367 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15369 * normal/command.c (grub_command_execute): Don't parse the
15370 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15371 flags of the command.
15373 * normal/menu.c (grub_menu_run): Fix typo.
15375 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15377 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15379 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15380 `y + 1' instead of `y - 1'.
15382 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15384 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15386 From Hollis Blanchard <hollis@penguinppc.org>:
15387 * kern/misc.c (memmove): New alias for grub_memmove.
15388 (memcmp): New alias for grub_memcmp.
15389 (memset): New alias for grub_memset.
15390 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15391 Change "int handle" to "grub_ieee1275_phandle_t handle".
15392 * include/grub/powerpc/ieee1275/ieee1275.h
15393 (grub_ieee1275_get_property): Likewise.
15395 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15397 Added normal mode command `chainloader' as module chain.mod, which
15398 depends on normal.mod and _chain.mod.
15400 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15401 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15402 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15404 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15405 but arguments parsing moved to ...
15406 (grub_chainloader_cmd): ... here. New function.
15407 * include/grub/i386/pc/chainloader.h: New file.
15408 * loader/i386/pc/chainloader_normal.c: Likewise.
15410 2004-09-11 Marco Gerards <metgerards@student.han.nl>
15412 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15413 (grub_mkimage_LDFLAGS): Likewise.
15414 (grub_emu_SOURCES): Likewise.
15415 (kernel_img_HEADERS): Added fshelp.h.
15416 * fs/ext2.c: Include <grub/fshelp.h>.
15417 (FILETYPE_REG): New macro.
15418 (FILETYPE_INO_REG): Likewise.
15419 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15421 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15423 (grub_fshelp_node): New struct.
15424 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15426 (grub_ext2_get_file_block): Removed function.
15427 (grub_ext2_read_block): New function.
15428 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15429 This function was written.
15430 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15431 (grub_ext2_find_file): Removed function.
15432 (grub_ext2_read_symlink): New function.
15433 (grub_ext2_iterate_dir): Likewise.
15434 (grub_ext2_open): Rewritten.
15435 (grub_ext2_dir): Rewritten.
15436 * include/grub/fshelp.h: New file.
15437 * fs/fshelp.c: Likewise.
15439 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15441 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15442 (print_message): Add a missing newline.
15443 (run_menu): Added timeout support.
15444 (run_menu_entry): New local function.
15445 (grub_menu_run): Added support for booting.
15447 * kern/loader.c (grub_loader_is_loaded): New function.
15449 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15450 (grub_get_rtc): Exported.
15452 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15453 (grub_get_rtc): Exported.
15455 * include/grub/normal.h (struct grub_command_list): Remove
15456 constant from the member `command'.
15458 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15460 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15462 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15464 2004-08-28 Marco Gerards <metgerards@student.han.nl>
15466 Add support for the JFS filesystem.
15468 * fs/jfs.c: New file.
15469 * include/grub/fs.h (grub_jfs_init): New prototype.
15470 (grub_jfs_fini): New prototype.
15471 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15472 (grub_emu_SOURCES): Likewise.
15473 (pkgdata_MODULES): Add jfs.mod.
15474 (jfs_mod_SOURCES): New variable.
15475 (jfs_mod_CFLAGS): Likewise.
15476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15477 (grubof_SOURCES): Likewise.
15478 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15480 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15481 endian to the host endian.
15482 (grub_fat_utf16_to_utf8): Move function from there...
15483 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
15484 the endianness of the source string anymore.
15485 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15487 2004-08-24 Marco Gerards <metgerards@student.han.nl>
15489 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15490 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15491 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15492 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15494 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15495 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15496 for `node_found' and `it_dir'.
15497 (grub_hfs_dir): Add prototype for `dir_hook'.
15499 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15500 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15501 and `indir32' to silence a gcc warning.
15503 * include/grub/fs.h (grub_hfs_init): New prototype.
15504 (grub_hfs_fini): Likewise.
15507 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15509 Each disk device has its own id now. This is useful to make use
15510 of multiple disk devices.
15512 * include/grub/disk.h (grub_disk_dev_id): New enum.
15513 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15514 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15516 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15517 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15519 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15520 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15522 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15523 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15525 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15526 "id" which is used by the cache manager.
15528 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15531 2004-08-18 Marco Gerards <metgerards@student.han.nl>
15533 * fs/hfs.c: New file.
15534 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15535 (grub_emu_SOURCES): Likewise.
15536 (pkgdata_MODULES): Add hfs.mod.
15537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15538 (grubof_SOURCES): Likewise.
15539 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15541 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15542 * kern/misc.c (grub_strncasecmp): Add function.
15544 2004-08-14 Marco Gerards <metgerards@student.han.nl>
15546 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15549 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15550 (grub_ext2_dir): In case the directory entry type is unknown, read
15553 2004-08-02 Peter Bruin <pjbruin@dds.nl>
15555 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15556 grub_load_linux instead of grub_rescue_cmd_linux as second
15557 argument of grub_rescue_register_command.
15559 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15561 2004-07-27 Marco Gerards <metgerards@student.han.nl>
15563 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15565 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15566 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15567 `loader/powerpc/ieee1275/linux.c',
15568 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15569 * include/grub/powerpc/ieee1275/ieee1275.h
15570 (grub_ieee1275_release): New prototype.
15571 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15572 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15573 normal, boot, linux and linux_normal.
15574 * loader/powerpc/ieee1275/linux.c: New file.
15575 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15577 2004-07-12 Marco Gerards <metgerards@student.han.nl>
15579 * normal/arg.c (grub_arg_parse): Correct error handling after
15580 reallocating the argumentlist (check if `argl' is not null instead
15581 of checking if `args' is not null).
15582 * kern/mm.c (grub_realloc): Return the same pointer when using the
15583 same region, instead of returning the header address.
15585 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15587 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15588 one block instead of two when looking for the initial partition.
15589 (grub_partition_probe): Initialize the local variable `p' with 0.
15590 Use base 10 for the grub_strtoul call.
15591 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15592 need for one local variable.
15593 (grub_strtoul): Don't add the new value to `num', instead of that
15596 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15598 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15599 (pxeboot_img_SOURCES): New variable.
15600 (pxeboot_img_ASFLAGS): Likewise.
15601 (pxeboot_img_LDFLAGS): Likewise.
15602 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15603 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15604 <lode_leroy@hotmail.com>.
15606 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15608 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15609 there was no input.
15611 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15613 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15614 the history buffer logic.
15616 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15618 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15619 (FILETYPE_INO_SYMLINK): New macros.
15620 (grub_ext2_find_file): Check if the node is a directory using the
15621 inode stat information instead of using the filetype in the
15622 dirent. Exclude the first character of an absolute symlink.
15623 (grub_ext2_dir): Mask out the filetype part of the mode member of
15626 2004-05-24 Marco Gerards <metgerards@student.han.nl>
15628 Add support for UFS version 1 and 2. Add support for the minix
15629 filesystem version 1 and 2, both the variants with 14 and 30 long
15632 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15634 (grub_emu_SOURCES): Likewise.
15635 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15636 (ufs_mod_SOURCES): New variable.
15637 (ufs_mod_CFLAGS): Likewise.
15638 (minix_mod_SOURCES): Likewise.
15639 (minix_mod_CFLAGS): Likewise.
15640 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15642 (grubof_SOURCES): Likewise.
15643 * fs/ufs.c: New file.
15644 * fs/minix.c: New file.
15645 * include/grub/fs.h (grub_ufs_init): New prototype.
15646 (grub_ufs_fini): Likewise.
15647 (grub_minix_init): Likewise.
15648 (grub_minix_fini): Likewise.
15649 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15652 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15654 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15655 commands/ls.c, commands/terminal.c, commands/boot.c,
15656 commands/cmp.c and commands/cat.c.
15657 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15659 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15662 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15664 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15665 and grub_, respectively. Because the conversion is trivial and
15666 mechanical, I omit the details here. Please refer to the CVS
15667 if you need more information.
15669 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15671 * include/pupa: Renamed to ...
15672 * include/grub: ... this.
15673 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15674 * util/i386/pc/grub-mkimage.c: ... this.
15675 * util/i386/pc/pupa-setup.c: Renamed to ...
15676 * util/i386/pc/grub-setup.c: ... this.
15677 * util/pupa-emu.c: Renamed to ...
15678 * util/grub-emu.c: ... this.
15680 2004-03-29 Marco Gerards <metgerards@student.han.nl>
15682 Add support for the newworld apple macintosh (PPC). This has been
15683 tested on the powerbook 2000 only. It only adds support for
15684 generic ieee1275 functions, console and disk support. This should
15685 be easy to port to other architectures with support for Open
15688 * configure.ac: Accept the powerpc as host_cpu. In the case of
15689 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15690 specific tests are only executed while building for the i386.
15691 Inverse test for crosscompile.
15692 * genmk.rb (Utility): Allow assembler files.
15693 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15694 * conf/powerpc-ieee1275.rmk: New file.
15695 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15696 * disk/powerpc/ieee1275/partition.c: Likewise.
15697 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15698 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15699 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15700 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15701 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15702 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15703 * include/pupa/powerpc/ieee1275/loader.h
15704 * include/pupa/powerpc/setjmp.h: Likewise.
15705 * include/pupa/powerpc/types.h: Likewise.
15706 * kern/powerpc/ieee1275/init.c: Likewise.
15707 * kern/powerpc/ieee1275/openfw.c: Likewise.
15708 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15710 These files were written by Johan Rydberg
15711 (jrydberg@night.trouble.net) and I only modified them slightly.
15713 * boot/powerpc/ieee1275/cmain.c: New file.
15714 * boot/powerpc/ieee1275/crt0.S: Likewise.
15715 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15716 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15718 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15720 * Makefile.in: Update copyright.
15721 * genmodsrc.sh: Likewise.
15722 * gensymlist.sh: Likewise.
15723 * term/i386/pc/vga.c: Indent correctly.
15725 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15726 bugreporting address.
15727 * util/i386/pc/pupa-setup.c (usage): Likewise,
15728 (main): Call pupa_ext2_init and pupa_ext2_fini.
15730 * fs/fat.c (log2): Renamed to ...
15731 (fat_log2): ... this.
15732 All callers changed.
15733 * kern/misc.c (memcpy): Alias to pupa_memmove.
15734 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15736 * util/console.c (pupa_ncurses_fini): Return 0.
15738 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15739 Move fail label here.
15740 [__GNU__]: Don't warn when using stat.
15741 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15742 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15743 long int. Use strtol instead of strtoul.
15745 2004-03-14 Marco Gerards <metgerards@student.han.nl>
15747 * commands/boot.c: New file.
15748 * commands/cat.c: Likewise.
15749 * commands/cmp.c: Likewise.
15750 * commands/ls.c: Likewise.
15751 * commands/terminal.c: Likewise.
15752 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15753 (pupa_register_command): Changed interface to match the new
15755 (pupa_command_execute): Changed (almost rewritten) so it uses
15756 pupa_split_command. Added support for setting variables using the
15758 (rescue_command): Changed to work with the new argument parser.
15759 (terminal_command): Moved from here to commands/terminal.c.
15760 (set_command): New function.
15761 (unset_command): New function.
15762 (insmod_command): New function.
15763 (rmmod_command): New function.
15764 (lsmod_command): New function.
15765 (pupa_command_init): Don't initialize the command terminal
15766 anymore. Initialize the commands set, unset, insmod, rmmod and
15768 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15769 (kernel_img_HEADERS): Add arg.h and env.h.
15770 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15771 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15772 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15774 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15776 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15777 (boot_mod_SOURCES): New variable.
15778 (terminal_mod_SOURCES): Likewise.
15779 (ls_mod_SOURCES): Likewise.
15780 (cmp_mod_SOURCES): Likewise.
15781 (cat_mod_SOURCES): Likewise.
15783 * normal/arg.c: New file.
15784 * kern/env.c: Likewise.
15785 * include/pupa/arg.h: Likewise.
15786 * include/pupa/env.h: Likewise.
15787 * font/manager.c (font_command): Changed to match argument parsing
15789 (PUPA_MOD_INIT): Likewise.
15790 * hello/hello.c (pupa_cmd_hello): Likewise.
15791 (PUPA_MOD_INIT): Likewise.
15792 * include/pupa/disk.h: Include <pupa/device.h>.
15793 (pupa_print_partinfo): New prototype.
15794 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15795 (pupa_dl_get_prefix): Likewise.
15796 * include/pupa/misc.h: Include <pupa/err.h>.
15797 (pupa_isgraph): New prototype.
15798 (pupa_isdigit): Likewise.
15799 (pupa_split_cmdline): Likewise.
15800 * include/pupa/normal.h: Include <pupa/arg.h>.
15801 (pupa_command): Changed the prototype of the member `func' to
15802 match the argument parsing interface. Added member `options'.
15803 (pupa_register_command): Updated to match function.
15804 (pupa_arg_parse): New prototype.
15805 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15806 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15807 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15808 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15809 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15810 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15811 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15812 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15813 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15814 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15815 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15816 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15817 * kern/disk.c: Include <pupa/file.h>.
15818 (pupa_print_partinfo): New function.
15819 * kern/dl.c: Include <pupa/env.h>.
15820 (pupa_dl_dir): Variable removed.
15821 (pupa_dl_load): Use the environment variable `prefix' instead of
15822 the variable pupa_dl_dir.
15823 (pupa_dl_set_prefix): Function removed.
15824 (pupa_dl_get_prefix): Likewise.
15825 * kern/i386/pc/init.c: Include <pupa/env.h>.
15826 (pupa_machine_init): Use the environment variable `prefix' instead of
15827 using pupa_dl_set_prefix to set the prefix.
15828 * kern/main.c: Include <pupa/env.h>.
15829 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15830 using pupa_dl_get_prefix to get the prefix.
15831 * kern/misc.c: Include <pupa/env.h>.
15832 (pupa_isdigit): New function.
15833 (pupa_isgraph): Likewise.
15834 (pupa_ftoa): Likewise.
15835 (pupa_vsprintf): Added support for printing values of the type
15836 `double'. Make it possible to format variable output when using
15837 formatting like `%1.2%f'.
15838 (pupa_split_cmdline): New function.
15839 * kern/rescue.c: Include <pupa/env.h>.
15840 (next_word): Removed function.
15841 (pupa_rescue_cmd_prefix): Likewise.
15842 (pupa_rescue_cmd_set): New function.
15843 (pupa_rescue_cmd_unset): New function.
15844 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15845 split the command line instead of splitting it here. Added
15846 support for setting variables using the syntax `foo=bar'. Don't
15847 initialize the prefix command anymore. Initialized the set and
15849 * normal/cmdline.c: Include <pupa/env.h>.
15850 (pupa_tab_complete): Added prototypes for print_simple_completion,
15851 print_partition_completion, add_completion, iterate_commands,
15852 iterate_dev, iterate_part and iterate_dir. Moved code to print
15853 partition information from here to kern/disk.c.
15854 (pupa_cmdline_run): Don't check if the function exists anymore.
15855 * normal/main.c: Include <pupa/env.h>.
15856 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15857 instead of using pupa_dl_get_prefix to get the prefix.
15858 * term/i386/pc/vga.c: Include <pupa/arg.h>.
15859 (check_vga_mem): Cast pointers to `void *' to silence a gcc
15861 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15862 (pupa_vga_setcolor): Declare unused variables with `__attribute__
15863 ((unused))' to silence a gcc warning.
15864 (pupa_vga_setcolor): Likewise.
15865 (debug_command): Changed to match argument parsing
15867 * util/pupa-emu.c: Include <pupa/env.h>.
15868 (options): Added 0's for unused fields to silence a gcc warning.
15870 (main): Use the environment variable `prefix' instead of using
15871 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
15872 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
15875 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15876 * util/misc.c: Include <malloc.h>.
15877 (pupa_malloc): Rewritten so errors are correctly reported.
15878 (pupa_realloc): Likewise.
15879 (pupa_memalign): Likewise.
15880 (pupa_mm_init_region): Declare unused variables with
15881 `__attribute__ ((unused))' to silence a gcc warning.
15882 * normal/i386/setjmp.S: Remove tab at the end of the file to
15883 silence a gcc warning.
15884 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15885 variables with `__attribute__ ((unused))' to silence a gcc
15887 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15888 local variable i unsigned to silence a gcc warning.
15890 * kern/term.c: Include <pupa/misc.h>.
15891 (pupa_more_lines): New variable.
15892 (pupa_more): Likewise.
15893 (pupa_putcode): When the pager is active pause at the end of every
15895 (pupa_set_more): New function.
15896 * include/pupa/term.h (pupa_set_more): New prototype.
15899 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
15901 Now this project is GRUB 2 rather than PUPA. The location of
15902 the CVS repository was moved to GRUB's.
15904 * configure.ac: Use bug-grub as the reporting address.
15905 Use GRUB instead of PUPA.
15906 Change the version number to 1.90.
15908 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
15910 * genkernsyms.sh: Updated copyright information.
15911 * genmk.rb: Likewise.
15912 * genmodsrc.sh: Likewise.
15913 * gensymlist.sh: Likewise.
15914 * boot/i386/pc/boot.S: Likewise.
15915 * boot/i386/pc/diskboot.S: Likewise.
15916 * disk/i386/pc/biosdisk.c: Likewise.
15917 * disk/i386/pc/partition.c: Likewise.
15918 * font/manager.c: Likewise.
15919 * fs/ext2.c: Likewise.
15920 * fs/fat.c: Likewise.
15921 * include/pupa/boot.h: Likewise.
15922 * include/pupa/device.h: Likewise.
15923 * include/pupa/disk.h: Likewise.
15924 * include/pupa/dl.h: Likewise.
15925 * include/pupa/elf.h: Likewise.
15926 * include/pupa/err.h: Likewise.
15927 * include/pupa/file.h: Likewise.
15928 * include/pupa/font.h: Likewise.
15929 * include/pupa/fs.h: Likewise.
15930 * include/pupa/kernel.h: Likewise.
15931 * include/pupa/loader.h: Likewise.
15932 * include/pupa/misc.h: Likewise.
15933 * include/pupa/mm.h: Likewise.
15934 * include/pupa/net.h: Likewise.
15935 * include/pupa/normal.h: Likewise.
15936 * include/pupa/rescue.h: Likewise.
15937 * include/pupa/setjmp.h: Likewise.
15938 * include/pupa/symbol.h: Likewise.
15939 * include/pupa/term.h: Likewise.
15940 * include/pupa/types.h: Likewise.
15941 * include/pupa/i386/setjmp.h: Likewise.
15942 * include/pupa/i386/types.h: Likewise.
15943 * include/pupa/i386/pc/biosdisk.h: Likewise.
15944 * include/pupa/i386/pc/boot.h: Likewise.
15945 * include/pupa/i386/pc/console.h: Likewise.
15946 * include/pupa/i386/pc/init.h: Likewise.
15947 * include/pupa/i386/pc/kernel.h: Likewise.
15948 * include/pupa/i386/pc/linux.h: Likewise.
15949 * include/pupa/i386/pc/loader.h: Likewise.
15950 * include/pupa/i386/pc/memory.h: Likewise.
15951 * include/pupa/i386/pc/multiboot.h: Likewise.
15952 * include/pupa/i386/pc/partition.h: Likewise.
15953 * include/pupa/i386/pc/time.h: Likewise.
15954 * include/pupa/i386/pc/vga.h: Likewise.
15955 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15956 * include/pupa/util/getroot.h: Likewise.
15957 * include/pupa/util/misc.h: Likewise.
15958 * include/pupa/util/resolve.h: Likewise.
15959 * kern/device.c: Likewise.
15960 * kern/disk.c: Likewise.
15961 * kern/dl.c: Likewise.
15962 * kern/err.c: Likewise.
15963 * kern/file.c: Likewise.
15964 * kern/fs.c: Likewise.
15965 * kern/loader.c: Likewise.
15966 * kern/main.c: Likewise.
15967 * kern/misc.c: Likewise.
15968 * kern/mm.c: Likewise.
15969 * kern/rescue.c: Likewise.
15970 * kern/term.c: Likewise.
15971 * kern/i386/dl.c: Likewise.
15972 * kern/i386/pc/init.c: Likewise.
15973 * kern/i386/pc/lzo1x.S: Likewise.
15974 * kern/i386/pc/startup.S: Likewise.
15975 * loader/i386/pc/chainloader.c: Likewise.
15976 * loader/i386/pc/linux.c: Likewise.
15977 * loader/i386/pc/multiboot.c: Likewise.
15978 * normal/cmdline.c: Likewise.
15979 * normal/command.c: Likewise.
15980 * normal/main.c: Likewise.
15981 * normal/menu.c: Likewise.
15982 * normal/i386/setjmp.S: Likewise.
15983 * term/i386/pc/console.c: Likewise.
15984 * term/i386/pc/vga.c: Likewise.
15985 * util/console.c: Likewise.
15986 * util/genmoddep.c: Likewise.
15987 * util/misc.c: Likewise.
15988 * util/pupa-emu.c: Likewise.
15989 * util/resolve.c: Likewise.
15990 * util/unifont2pff.rb: Likewise.
15991 * util/i386/pc/biosdisk.c: Likewise.
15992 * util/i386/pc/getroot.c: Likewise.
15993 * util/i386/pc/pupa-mkimage.c: Likewise.
15994 * util/i386/pc/pupa-setup.c: Likewise.
15996 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15998 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15999 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
16000 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
16001 reading and reset it after reading.
16002 (pupa_ext2_close): Return PUPA_ERR_NONE.
16004 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16006 (struct linux_kernel_header): Add kernel_version and
16008 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16009 pupa_file_read succeeds.
16010 (pupa_rescue_cmd_initrd): Implement.
16012 2003-12-03 Marco Gerards <metgerards@student.han.nl>
16014 * fs/ext2.c (pupa_ext2_label): New function.
16015 (pupa_ext2_fs): Added label.
16016 * fs/fat.c (pupa_fat_label): New function.
16017 (pupa_fat_fs): Added label.
16018 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16020 * kern/misc.c (pupa_strndup): New function.
16021 * include/pupa/misc.h (pupa_strndup): New prototype.
16023 * include/pupa/normal.h: Include <pupa/err.h>.
16024 (pupa_set_history): New prototype.
16025 (pupa_iterate_commands): New prototype.
16026 * normal/cmdline.c: Include <pupa/machine/partition.h>,
16027 <pupa/disk.h>, <pupa/file.h>.
16028 (hist_size): New variable.
16029 (hist_lines): Likewise.
16030 (hist_end): Likewise.
16031 (hist_used): Likewise.
16032 (pupa_set_history): New function.
16033 (pupa_history_get): Likewise.
16034 (pupa_history_add): Likewise.
16035 (pupa_history_replace): Likewise.
16036 (pupa_tab_complete): Likewise.
16037 (pupa_cmdline_run): Added tab completion and history buffer. Tab
16038 completion shows partitionnames while completing partitions, this
16039 feature was suggested by Jeff Bailey.
16040 * normal/command.c (pupa_iterate_commands): New function.
16041 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16042 (pupa_normal_init): Initialize history buffer.
16043 (PUPA_MOD_INIT): Likewise.
16044 (pupa_normal_fini): Free the history buffer.
16045 (PUPA_MOD_FINI): Likewise.
16047 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16050 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16051 * configure.ac [i386]: Check for regparam bug.
16052 (NESTED_FUNC_ATTR) [! i386]: Defined.
16054 2003-11-17 Marco Gerards <metgerards@student.han.nl>
16056 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16057 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16058 (pupa_emu_SOURCES): New variable.
16059 (pupa_emu_LDFLAGS): Likewise.
16060 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16061 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16062 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16063 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16064 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16065 (pupa_jmp_buf): New typedef.
16066 (pupa_setjmp) [PUPA_UTIL]: New macro.
16067 (pupa_longjmp) [PUPA_UTIL]: Likewise.
16068 * include/pupa/term.h (struct pupa_term): New member `refresh'.
16069 (pupa_refresh): New prototype.
16070 * include/pupa/util/getroot.h: New file.
16071 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16073 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16074 (pupa_rescue_cmd_cat): Likewise.
16075 (pupa_rescue_cmd_ls): Likewise.
16076 (pupa_rescue_cmd_testload): Likewise.
16077 (pupa_rescue_cmd_lsmod): Likewise.
16078 * normal/cmdline.c (pupa_cmdline_get): Likewise.
16079 * normal/menu.c (run_menu): Likewise.
16080 * kern/term.c (pupa_cls): Likewise.
16081 (pupa_refresh): New function.
16082 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16083 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16084 * util/console.c: New file.
16086 * util/i386/pc/getroot.c: New file.
16087 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16088 (pupa_putchar): New function.
16089 (pupa_refresh): Likewise.
16090 (xgetcwd): Function moved to ...
16091 (strip_extra_slashes): Likewise.
16092 (get_prefix): Likewise.
16093 * util/i386/pc/getroot.c: ... here.
16094 (find_root_device): Function moved and renamed to...
16095 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16096 Changed all callers.
16097 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16099 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16100 Changed all callers.
16101 * util/misc.c (pupa_memalign): New function.
16102 (pupa_mm_init_region): Likewise.
16103 (pupa_register_exported_symbols): Likewise.
16104 (pupa_putchar): Function removed.
16105 * util/pupa-emu.c: New file.
16107 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
16109 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16110 (_multiboot_mod_SOURCES): New variable.
16111 (_multiboot_mod_CFLAGS): Likewise.
16112 * loader/i386/pc/multiboot.c: New file.
16113 * include/pupa/i386/pc/multiboot.h: Likewise.
16114 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16115 (pupa_multiboot_real_boot): New function.
16116 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16117 (pupa_multiboot_real_boot): New prototype.
16118 (pupa_rescue_cmd_multiboot): Likewise
16119 (pupa_rescue_cmd_module): Likewise.
16121 * kern/loader.c (pupa_loader_set): Continue when
16122 pupa_loader_unload_func() fails.
16123 (pupa_loader_unset): New function.
16124 * include/pupa/loader.h (pupa_loader_unset): New prototype.
16126 * kern/misc.c (pupa_stpcpy): New function.
16127 * include/pupa/misc.h (pupa_stpcpy): New prototype.
16129 2003-11-12 Marco Gerards <metgerards@student.han.nl>
16131 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16132 for available extensions.
16134 * include/pupa/i386/pc/time.h: New file.
16135 * kern/disk.c: Include <pupa/machine/time.h>.
16136 (PUPA_CACHE_TIMEOUT): New macro.
16137 (pupa_last_time): New variable.
16138 (pupa_disk_open): Flush the cache when there was a timeout.
16139 (pupa_disk_close): Reset the timer.
16140 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16142 * util/misc.c: Include <sys/times.h>
16143 (pupa_get_rtc): New function.
16145 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16147 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16149 (pupa_ext2_get_file_block): Use blocks member.
16151 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16152 first block. Return -1 instead of pupa_errno on error.
16154 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16156 * README: In the pupa-mkimage example use _chain instead of chain
16157 and ext2 instead of fat.
16158 * TODO: Replace ext2fs with jfs as an example. Add an item for
16159 adding journal playback for ext2fs.
16160 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16161 (pkgdata_MODULES): Added ext2.mod.
16162 (ext2_mod_SOURCES): New variable.
16163 (ext2_mod_CFLAGS): Likewise.
16164 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16165 * include/pupa/misc.h (pupa_strncpy): New prototype.
16166 (pupa_strcat): Likewise.
16167 (pupa_strncmp): Likewise.
16168 * kern/misc.c (pupa_strcat): Enable function.
16169 (pupa_strncpy): New function.
16170 (pupa_strncmp): Likewise.
16171 * fs/ext2.c: New file.
16173 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16174 when the read failed before retrying.
16175 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16176 (_FILE_OFFSET_BITS): Likewise.
16177 * configure.ac: Added AC_SYS_LARGEFILE.
16179 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16181 * genmk.rb (PModule#rule): Make sure to get only symbol names
16182 from the output of nm.
16183 Reported by Robert Millan <zeratul2@wanadoo.es>.
16185 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16187 I forgot to check in these changes for a long time. This adds
16188 incomplete support for VGA console, and this is still very
16189 buggy. Also, a lot of consideration is required for I18N,
16190 UNICODE, and VGA font issues. Therefore, assume that this is
16191 such that "better than nothing".
16193 * font/manager.c: New file.
16194 * include/pupa/font.h: Likewise.
16195 * include/pupa/i386/pc/vga.h: Likewise.
16196 * term/i386/pc/vga.c: Likewise.
16197 * util/unifont2pff.rb: Likewise.
16199 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16200 (pkgdata_MODULES): Added vga.mod and font.mod.
16201 (vga_mod_SOURCES): New variables.
16202 (vga_mod_CFLAGS): Likewise.
16203 (font_mod_SOURCES): Likewise.
16204 (font_mod_CFLAGS): Likewise.
16206 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16208 * include/pupa/term.h: Include pupa/err.h.
16209 (struct pupa_term): Added init and fini.
16210 Changed the argument of putchar to pupa_uint32_t.
16212 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16213 (pupa_console_real_putchar): New prototype.
16214 (pupa_console_putchar): Removed.
16215 (pupa_console_checkkey): Exported.
16216 (pupa_console_getkey): Likewise.
16218 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16221 * kern/term.c (pupa_term_set_current): Rewritten.
16222 (pupa_putchar): Likewise.
16223 (pupa_putcode): New function.
16225 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16226 (pupa_console_real_putchar): ... this.
16227 (pupa_vga_set_mode): New function.
16228 (pupa_vga_get_font): Likewise.
16230 * normal/command.c: Include pupa/term.h.
16231 (terminal_command): New function.
16232 (pupa_command_init): Register the command "terminal".
16234 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16235 (DISP_UP): Likewise.
16236 (DISP_RIGHT): Likewise.
16237 (DISP_DOWN): Likewise.
16238 (DISP_HLINE): Likewise.
16239 (DISP_VLINE): Likewise.
16240 (DISP_UL): Likewise.
16241 (DISP_UR): Likewise.
16242 (DISP_LL): Likewise.
16243 (DISP_LR): Likewise.
16245 * term/i386/pc/console.c (pupa_console_putchar): New function.
16247 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16249 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16250 FIX. Reverse the path_list.
16252 * include/pupa/normal.h: Export pupa_register_command and
16253 pupa_unregister_command.
16255 * hello/hello.c (pupa_cmd_hello): New module.
16256 * conf/i386-pc.rmk: Added hello.mod.
16258 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16260 * kern/i386/pc/lzo1x.S: New file.
16262 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16263 (compress_kernel): New variable.
16264 (generate_image): Heavily modified to support compressing a
16265 large part of the core image.
16267 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16269 (pupa_util_load_image): New function.
16271 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16272 (pupa_compressed_size): New variable.
16273 (codestart): Enable Gate A20 here.
16274 Decompress the compressed part of the core image.
16275 Rearrange the code to put functions and variables which are
16276 required for initialization in the non-compressed part.
16279 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16282 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16284 * include/pupa/i386/pc/kernel.h
16285 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16286 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16287 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16288 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16289 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16291 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16293 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16294 (Utility#rule): Likewise.
16296 * configure.ac: Check if LZO is available.
16298 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16300 * include/pupa/normal.h: New file.
16301 * include/pupa/setjmp.h: Likewise.
16302 * include/pupa/i386/setjmp.h: Likewise.
16303 * normal/cmdline.c: Likewise.
16304 * normal/command.c: Likewise.
16305 * normal/main.c: Likewise.
16306 * normal/menu.c: Likewise.
16307 * normal/i386/setjmp.S: Likewise.
16309 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16310 (pupa_rescue_cmd_initrd): Likewise.
16312 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16315 * kern/i386/pc/startup.S (translation_table): New variable.
16316 (translate_keycode): New function.
16317 (pupa_console_getkey): Call translate_keycode.
16319 * kern/rescue.c (attempt_normal_mode): New function.
16320 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16321 it failed, print a message.
16323 * kern/mm.c (pupa_real_malloc): Print more information when a
16324 free magic is broken.
16325 (pupa_free): If the first free header is not free actually, set
16328 * kern/main.c (pupa_load_normal_mode): Just load the module
16330 (pupa_main): Don't print the message
16331 "Entering into rescue mode..." here.
16333 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16335 (pupa_rescue_cmd_initrd): Likewise.
16336 (pupa_rescue_cmd_initrd): Likewise.
16338 * include/pupa/symbol.h (FUNCTION): Specify the type.
16339 (VARIABLE): Likewise.
16341 * include/pupa/err.h (pupa_err_t): Added
16342 PUPA_ERR_UNKNOWN_COMMAND.
16344 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16345 (pupa_dl_get_prefix): Likewise.
16347 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16348 Added _chain.mod and _linux.mod instead of chain.mod and
16350 (chain_mod_SOURCES): Renamed to ...
16351 (_chain_mod_SOURCES): ... this.
16352 (chain_mod_CFLAGS): Renamed to ...
16353 (_chain_mod_CFLAGS): ... this.
16354 (linux_mod_SOURCES): Renamed to ...
16355 (_linux_mod_SOURCES): ... this.
16356 (linux_mod_CFLAGS): Renamed to ...
16357 (_linux_mod_CFLAGS): ... this.
16358 (normal_mod_SOURCES): New variable.
16359 (normal_mod_CFLAGS): Likewise.
16360 (normal_mod_ASFLAGS): Likewise.
16362 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16364 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16367 * kern/dl.c (pupa_dl_ref): Refer depending modules
16369 (pupa_dl_unref): Unrefer depending modules recursively.
16370 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16371 a module is unloaded before one depending on that module is
16373 (pupa_dl_unload): Unload depending modules explicitly,
16376 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16378 * include/pupa/i386/pc/linux.h: New file.
16379 * loader/i386/pc/linux.c: Likewise.
16381 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16383 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16384 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16385 of PUPA_CHAINLOADER_BOOT_SECTOR.
16387 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16388 (pupa_linux_prot_size): New variable.
16389 (pupa_linux_tmp_addr): Likewise.
16390 (pupa_linux_real_addr): Likewise.
16391 (pupa_linux_boot_zimage): New function.
16392 (pupa_linux_boot_bzimage): Likewise.
16394 * kern/i386/pc/init.c (struct mem_region): New structure.
16395 (MAX_REGIONS): New macro.
16396 (mem_regions): New variable.
16397 (num_regions): Likewise.
16398 (pupa_os_area_addr): Likewise.
16399 (pupa_os_area_size): Likewise.
16400 (pupa_lower_mem): Likewise.
16401 (pupa_upper_mem): Likewise.
16402 (add_mem_region): New function.
16403 (compact_mem_regions): Likewise.
16404 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16405 the size of the conventional memory and that of so-called upper
16406 memory (before the first memory hole).
16407 Instead of adding each found region to free memory, use
16408 add_mem_region and add them after removing overlaps.
16409 Also, add only 1/4 of the upper memory to free memory. The rest
16410 is used for loading OS images. Maybe this is ad hoc, but this
16411 makes it much easier to relocate OS images when booting.
16413 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16414 (pupa_enter_rescue_mode): Don't register initrd and module.
16416 * kern/mm.c: Include pupa/dl.h.
16418 * kern/main.c: Include pupa/file.h and pupa/device.h.
16420 * kern/loader.c (pupa_loader_load_module_func): Removed.
16421 (pupa_loader_load_module): Likewise.
16423 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16426 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16427 (pupa_linux_tmp_addr): Likewise.
16428 (pupa_linux_real_addr): Likewise.
16429 (pupa_linux_boot_zimage): Likewise.
16430 (pupa_linux_boot_bzimage): Likewise.
16432 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16433 (pupa_upper_mem): Likewise.
16434 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16435 module is too dangerous.
16437 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16438 (pupa_os_area_size): Likewise.
16439 (pupa_loader_set): Remove the first argument. Loader doesn't
16440 manage modules or initrd any longer.
16441 (pupa_loader_load_module): Removed.
16443 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16444 (linux_mod_SOURCES): New variable.
16445 (linux_mod_CFLAGS): Likewise.
16447 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16449 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16450 the length of a blocklist correctly.
16452 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16453 Use ioctl only if the OS file is a block device.
16454 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16455 not very useful for normal files.
16457 * kern/main.c (pupa_set_root_dev): New function.
16458 (pupa_load_normal_mode): Likewise.
16459 (pupa_main): Call those above.
16461 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16464 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16466 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16468 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16469 (setup): Configure the installed partition information and the
16472 * loader/i386/pc/chainloader.c (my_mod): New variable.
16473 (pupa_chainloader_unload): New function.
16474 (pupa_rescue_cmd_chainloader): Refer itself.
16475 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16477 * kern/i386/pc/startup.S (install_partition): Removed.
16478 (version_string): Likewise.
16479 (config_file): Likewise.
16480 (pupa_install_dos_part): New variable.
16481 (pupa_install_bsd_part): Likewise.
16482 (pupa_prefix): Likewise.
16483 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16485 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16487 (make_install_device): New function.
16488 (pupa_machine_init): Set the dl prefix.
16490 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16491 (buf): Renamed to ...
16492 (linebuf): ... this.
16493 (pupa_rescue_cmd_prefix): New function.
16494 (pupa_rescue_cmd_insmod): Likewise.
16495 (pupa_rescue_cmd_rmmod): Likewise.
16496 (pupa_rescue_cmd_lsmod): Likewise.
16497 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16500 * kern/mm.c (pupa_memalign): If failed even after invalidating
16501 disk caches, unload unneeded modules and retry.
16503 * kern/misc.c (pupa_memmove): New function.
16504 (pupa_memcpy): Removed.
16505 (pupa_strcpy): New function.
16506 (pupa_itoa): Made static.
16508 * kern/dl.c (pupa_dl_iterate): New function.
16509 (pupa_dl_ref): Likewise.
16510 (pupa_dl_unref): Likewise.
16511 (pupa_dl_unload): Return if succeeded or not.
16512 (pupa_dl_unload_unneeded): New function.
16513 (pupa_dl_unload_all): Likewise.
16514 (pupa_dl_init): Renamed to ...
16515 (pupa_dl_set_prefix): ... this.
16516 (pupa_dl_get_prefix): New function.
16518 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16519 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16520 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16521 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16522 (pupa_install_dos_part): Declared.
16523 (pupa_install_bsd_part): Likewise.
16524 (pupa_prefix): Likewise.
16525 (pupa_boot_drive): Likewise.
16527 * include/pupa/types.h: Fix a typo.
16529 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16531 (pupa_memmove): Declared.
16532 (pupa_strcpy): Likewise.
16534 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16535 pupa_mod_init takes one argument, its own module.
16536 (pupa_dl_unload_unneeded): Declared.
16537 (pupa_dl_unload_all): Likewise.
16538 (pupa_dl_ref): Likewise.
16539 (pupa_dl_unref): Likewise.
16540 (pupa_dl_iterate): Likewise.
16541 (pupa_dl_init): Renamed to ...
16542 (pupa_dl_set_prefix): ... this.
16543 (pupa_dl_get_prefix): Declared.
16545 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16546 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16548 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16549 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16551 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16552 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16554 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16556 * util/i386/pc/pupa-setup.c (setup): Define the internal
16557 function find_first_partition_start at the top level, because GCC
16558 3.0.x cannot compile internal functions in deeper scopes
16560 (find_root_device): Use lstat instead of stat.
16561 Don't follow symbolic links.
16562 Fix the path-constructing code.
16564 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16565 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16566 by a BLKGETSIZE ioctl first, because block devices don't fill
16567 the member st_mode of the structure stat on Linux.
16568 [__linux__] (linux_find_partition): Use a temporary buffer
16569 REAL_DEV for the working space. Copy it to DEV before returning.
16570 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16571 buffer cache consistent.
16572 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16573 strncmp. The previous value was merely wrong.
16574 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16576 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16577 FAT size is 12. The previous value was merely wrong.
16579 * kern/main.c (pupa_main): Don't split the starting message from
16582 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16583 LF, because BIOS goes crazy about character attributes in this
16586 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16588 * include/i386/pc/util/biosdisk.h: New file.
16589 * util/i386/pc/biosdisk.c: Likewise.
16590 * util/i386/pc/pupa-setup.c: Likewise.
16592 * Makefile.in (INCLUDE_DISTFILES): Added
16593 include/pupa/i386/pc/util/biosdisk.h.
16594 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16595 directory util/i386/pc.
16596 (install-local): Added a rule for sbin_UTILITIES.
16597 (uninstall): Likewise.
16599 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16601 * util/misc.c (xrealloc): New function.
16602 (pupa_malloc): Likewise.
16603 (pupa_free): Likewise.
16604 (pupa_realloc): Likewise.
16605 (pupa_stop): Likewise.
16606 (pupa_putchar): Likewise.
16608 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16610 * include/pupa/util/misc.h (xrealloc): Declared.
16612 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16614 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16615 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16617 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16618 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16620 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16621 way should be implemented.
16622 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16624 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16625 the size of NAME for safety.
16626 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16629 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16630 (pupa_setup_SOURCES): Likewise.
16632 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16634 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16636 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16637 bunch of pushl's from pusha, because this destroys the return
16640 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16642 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16643 This means that any missing prototypes could be fatal. Also, you
16644 must take care when writing assembly code. See the comments at
16645 the beginning of startup.S, for more details.
16647 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16648 compilation mechanism.
16649 (pupa_chainloader_real_boot): Likewise.
16650 (pupa_biosdisk_rw_int13_extensions): Likewise.
16651 (pupa_biosdisk_rw_standard): Likewise.
16652 (pupa_biosdisk_check_int13_extensions): Likewise.
16653 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16654 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16655 (pupa_get_memsize): Likewise.
16656 (pupa_get_mmap_entry): Likewise.
16657 (pupa_console_putchar): Likewise.
16658 (pupa_console_setcursor): Likewise.
16659 (pupa_getrtsecs): Use pushl instead of push.
16661 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16662 memory instead of the stack for a mmap entry, because some
16663 BIOSes may ignore the maximum size and overflow.
16665 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16667 * genmk.rb (PModule#rule): Compile automatically generated
16668 sources with module-specific CFLAGS as well as other sources.
16670 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16672 * configure.ac: Check ld.
16673 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16674 respectively, before checking endianness and sizes.
16676 * Makefile.in (LD): New variable.
16678 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16680 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16682 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16684 * Changelog: New file.