1 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
4 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
5 FreeBSD. Check if a device is a character device. Use
6 DIOCGMEDIASIZE to get the size.
7 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
9 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
10 is a character device instead of a block device. Add support for
13 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
14 a character device instead of a block device.
15 (grub_util_check_char_device): New function.
17 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
18 a character device instead of a block device.
20 * include/grub/util/getroot.h (grub_util_check_char_device): New
23 2009-04-11 David S. Miller <davem@davemloft.net>
25 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
27 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
28 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
30 (__bswapdi2): Likewise.
32 * include/grub/sparc64/ieee1275/boot.h: New file.
33 * boot/sparc64/ieee1275/boot.S: Likewise.
34 * boot/sparc64/ieee1275/diskboot.S: Likewise.
36 2009-04-10 David S. Miller <davem@davemloft.net>
38 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
39 slots are of type grub_ieee1275_cell_t.
40 (grub_nand_read): Likewise.
41 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
42 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
43 macros are used to compare values in arg/ret block of the call.
44 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
45 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
46 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
47 grub_ieee1275_instance_to_path, grub_ieee1275_write,
48 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
49 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
50 grub_ieee1275_close, grub_ieee1275_set_property,
51 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
53 * kern/ieee1275/openfw.c (grub_map): Likewise.
54 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
55 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
57 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
58 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
59 (grub_devalias_iterate): Likewise.
61 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
65 * fs/ufs.c (INODE_NBLOCKS): new definition
66 (struct grub_ufs_dirent): added fields for non-BSD dirents
67 (grub_ufs_get_file_block): fixed double indirect handling
68 (grub_ufs_lookup_symlink): use more robust way to determine whether
70 (grub_ufs_find_file): support for non-BSD dirents
71 (grub_ufs_dir): support for non-BSD dirents
73 2009-04-10 Bean <bean123ch@gnail.com>
75 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
76 attribute, otherwise the size would be wrong for i386 platform.
78 * include/grub/pci.h (grub_pci_read_word): New inline function.
79 (grub_pci_read_byte): Likewise.
80 (grub_pci_write): Likewise.
81 (grub_pci_write_word): Likewise.
82 (grub_pci_write_byte): Likewise.
84 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
86 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
87 (find_framebuf): Scan pci to locate the frame buffer address.
89 * commands/efi/fixvideo.c: New file.
91 * commands/efi/loadbios.c: Likewise.
93 * commands/memrw.c: Likewise.
95 * util/grub-dumpbios.in: Likewise.
97 * conf/common.rmk (grub-dumpbios): New utility.
98 (pkglib_MODULES): New module memrw.mod.
99 (memrw_mod_SOURCE): New macro.
100 (memrw_mod_CFLAGS): Likewise.
101 (memrw_mod_LDFLAGS): Likewise.
103 * conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
105 (loadbios_mod_SOURCE): New macro.
106 (loadbios_mod_CFLAGS): Likewise.
107 (loadbios_mod_LDFLAGS): Likewise.
108 (fixvideo_mod_SOURCE): Likewise.
109 (fixvideo_mod_CFLAGS): Likewise.
110 (fixvideo_mod_LDFLAGS): Likewise.
112 * conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
114 (loadbios_mod_SOURCE): New macro.
115 (loadbios_mod_CFLAGS): Likewise.
116 (loadbios_mod_LDFLAGS): Likewise.
117 (fixvideo_mod_SOURCE): Likewise.
118 (fixvideo_mod_CFLAGS): Likewise.
119 (fixvideo_mod_LDFLAGS): Likewise.
121 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
123 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
125 2009-04-07 David S. Miller <davem@davemloft.net>
127 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
128 support for R_SPARC_OLO10 relocations. Fix compile warning for
129 R_SPARC_WDISP30 case.
130 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
132 2009-04-06 Pavel Roskin <proski@gnu.org>
134 * include/grub/misc.h (ARRAY_SIZE): New macro.
135 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
137 * loader/i386/linux.c (allocate_pages): Use free_pages().
138 (grub_linux_unload): Don't use free_pages().
139 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
140 wrong index. Treat all other modes as text modes.
141 (grub_cmd_linux): Initialize vid_mode unconditionally to
142 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
144 * commands/help.c (print_command_help): Use cmd->prio, not
145 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
147 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
151 * parttool/pcpart.c: new file
152 * commands/parttool.c: likewise
153 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
154 (parttool_mod_SOURCES): new variable
155 (parttool_mod_CFLAGS): likewise
156 (parttool_mod_LDFLAGS): likewise
157 (pcpart_mod_SOURCES): likewise
158 (pcpart_mod_CFLAGS): likewise
159 (pcpart_mod_LDFLAGS): likewise
160 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
161 and parttool/pcpart.c
162 * conf/i386-efi.rmk: likewise
163 * conf/i386-ieee1275.rmk: likewise
164 * conf/i386-pc.rmk: likewise
165 * conf/powerpc-ieee1275.rmk: likewise
166 * conf/sparc64-ieee1275.rmk: likewise
167 * conf/x86_64-ieee1275.rmk: likewise
169 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
171 Support for mtime and further expandability of dir command
173 * include/grub/lib/datetime.h: moved to ...
174 * include/grub/datetime.h: ... moved here and added
175 declaration of grub_unixtime2datetime. All users updated
176 * include/grub/fs.h: new syntax for dir and mtime functionin
178 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
179 and GRUB_FSHELP_FLAGS_MASK
180 * commands/ls.c (grub_ls_list_files): Write mtime in long format
181 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
182 (grub_ext2_mtime): new function
183 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
184 (grub_hfsplus_mtime): new function
185 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
186 (GRUB_UFS_ATTR_FILE): likewise
187 (GRUB_UFS_ATTR_LNK): likewise
188 (struct grub_ufs_sblock): new fields mtime
189 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
191 (grub_ufs_dir): mtime support
192 (grub_ufs_mtime): new function
193 * fs/affs.c (grub_affs_dir): use new dir syntax
194 * fs/afs.c (grub_afs_dir): likewise
195 * fs/cpio.c (grub_cpio_dir): likewise
196 * fs/fat.c (grub_fat_find_dir): likewise
197 * fs/hfs.c (grub_hfs_dir): likewise
198 * fs/iso9660.c (grub_iso9660_dir): likewise
199 * fs/jfs.c (grub_jfs_dir): likewise
200 * fs/minix.c (grub_minix_dir): likewise
201 * fs/ntfs.c (grub_ntfs_dir): likewise
202 * fs/reiserfs.c (grub_reiserfs_dir): likewise
203 * fs/sfs.c (grub_sfs_dir): likewise
204 * fs/xfs.c (grub_xfs_dir): likewise
205 * util/hostfs.c (grub_hostfs_dir): likewise
206 * lib/datetime.c: moved to ...
207 * normal/datetime.c: ... moved here
208 (grub_unixtime2datetime): new function
209 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
210 * normal/completition.c (iterate_dir): use new dir syntax
211 * normal/misc.c (grub_normal_print_device_info): tell the
212 last modification time of a volume
213 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
214 * conf/common.rmk: added lib/datetime.c to ls.mod
215 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
216 (normal_mod_SOURCES): likewise
217 (datetime_mod_SOURCES): Removed lib/datetime.c
218 * conf/i386-efi.rmk: likewise
219 * conf/i386-ieee1275.rmk: likewise
220 * conf/i386-pc.rmk: likewise
221 * conf/powerpc-ieee1275.rmk: likewise
222 * conf/sparc64-ieee1275.rmk: likewise
223 * conf/x86_64-efi.rmk: likewise
225 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
227 Trim trailing spaces in FAT label and support mtools-like labels
229 * fs/fat.c (grub_fat_iterate_dir): New function based
231 (grub_fat_find_dir): use grub_fat_iterate_dir
232 (grub_fat_label): likewise
234 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
236 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
238 remove extraneous kernel_elf_HEADERS
240 2009-04-04 Bean <bean123ch@gnail.com>
242 * include/grub/util/misc.h: Add dummy function fsync for mingw.
244 * util/misc.c: Likewise.
246 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
248 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
249 instead of grub_printf.
251 2009-04-03 Robert Millan <rmh@aybabtu.com>
253 * loader/i386/linux.c (grub_linux_setup_video): Fill
254 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
255 values from `mode info' structure instead of hardcoded
258 2009-04-01 Pavel Roskin <proski@gnu.org>
260 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
262 * genmk.rb: Likewise.
263 * configure.ac: Likewise.
265 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
267 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
268 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
270 2009-04-01 David S. Miller <davem@davemloft.net>
272 * normal/sparc64/setjmp.S: Fix setjmp implementation.
273 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
274 (grub_setjmp): Mark with 'returns_twice' attribute.
275 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
276 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
277 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
279 2009-04-01 Robert Millan <rmh@aybabtu.com>
281 Reapply fix from 2008-07-28 which was accidentally reverted; also
282 perform the same fix to a similar check in same function.
284 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
285 with the same number are found, just use issue a warning with
286 grub_dprintf(), as this error has been reported to be non-fatal.
288 2009-03-31 Pavel Roskin <proski@gnu.org>
290 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
291 for cross-compilation.
293 2009-03-30 Robert Millan <rmh@aybabtu.com>
295 Fix i386-ieee1275 build.
297 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
300 2009-03-30 Pavel Roskin <proski@gnu.org>
302 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
303 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
304 zero-terminated, rely only on the strlen value. Fix comparison
305 of strings differing in length.
307 2009-03-30 Robert Millan <rmh@aybabtu.com>
309 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
310 checking for abi version. Improve error messages on BIOS to notify
311 user about `linux16' command.
313 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
317 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
319 * disk/scsi.c (grub_scsi_open): free scsi in case of error
321 2009-03-29 Robert Millan <rmh@aybabtu.com>
323 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
324 set `vid_mode' accordingly.
325 (grub_linux_boot): Process `vid_mode' and set video mode.
327 2009-03-29 Robert Millan <rmh@aybabtu.com>
329 * util/grub.d/10_linux.in (linux_entry): New function.
330 Factorize generation of Linux boot entries.
332 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
334 Make the format of Environment Block plain text. The boot loader
335 part is not tested well yet.
337 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
340 (usage): Remove "info" and "clear". Add "unset". Update the
341 description of "set", as this does not delete variables any
343 (create_envblk_file): Complete rewrite.
344 (open_envblk_file): Likewise.
346 (cmd_list): Likewise.
348 (cmd_clear): Likewise.
349 (list_variables): New function.
350 (write_envblk): Likewise.
351 (set_variables): Likewise.
352 (unset_variables): Likewise.
353 (main): Complete rewrite.
355 * commands/loadenv.c (buffer): Removed.
357 (open_envblk_file): New function.
358 (read_envblk_file): Complete rewrite.
359 (grub_cmd_load_env): Likewise.
360 (grub_cmd_list_env): Likewise.
361 (struct blocklist): New struct.
362 (free_blocklists): New function.
363 (check_blocklists): Likewise.
364 (write_blocklists): Likewise.
365 (grub_cmd_save_env): Complete rewrite.
367 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
368 a plain text signature.
369 (GRUB_ENVBLK_MAXLEN): Removed.
370 (struct grub_envblk): Complete rewrite.
371 (grub_envblk_find): Removed.
372 (grub_envblk_insert): Likewise.
373 (grub_envblk_open): New prototype.
374 (grub_envblk_set): Likewise.
375 (grub_envblk_delete): Put const to VALUE.
376 (grub_envblk_iterate): Put const to NAME and VALUE.
377 (grub_envblk_close): New prototype.
378 (grub_envblk_buffer): New inline function.
379 (grub_envblk_size): Likewise.
381 * lib/envblk.c: Include grub/mm.h.
382 (grub_env_find): Removed.
383 (grub_envblk_open): New function.
384 (grub_envblk_close): Likewise.
385 (escaped_value_len): Likewise.
386 (find_next_line): Likewise.
387 (grub_envblk_insert): Removed.
388 (grub_envblk_set): New function.
389 (grub_envblk_delete): Complete rewrite.
390 (grub_envblk_iterate): Likewise.
392 2009-03-28 Robert Millan <rmh@aybabtu.com>
394 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
395 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
396 variables. Use 16-bit loader.
397 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
399 * kern/i386/loader.S (grub_linux_boot): Rename to ...
400 (grub_linux16_boot): ... this. Update all users.
401 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
402 (grub_linux_boot): ... this. Update all users.
404 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
405 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
406 commands to `linux16' and `initrd16'.
407 (GRUB_MOD_FINI(linux)): Rename to ...
408 (GRUB_MOD_FINI(linux16)): ... this.
410 2009-03-24 Pavel Roskin <proski@gnu.org>
412 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
413 not just for compilation.
415 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
417 Move multiboot helper out of kernel
419 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
420 `loader/i386/multiboot_helper.S'.
421 * conf/i386-coreboot.rmk: Likewise
422 * conf/i386-ieee1275.rmk: Likewise
424 * kern/i386/loader.S: Move multiboot helpers from here...
425 * loader/i386/multiboot_helper.S: ...moved here
426 * include/grub/i386/loader.h: Move declarations of multiboot
428 * include/grub/i386/multiboot.h: ...moved here
429 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
431 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
433 * kern/env.c (grub_env_context_open): Added an argument to specify
434 whether a new context inherits exported variables from current
435 one. This is useful when making a sandbox to interpret a config
439 * include/grub/env.h (grub_env_context_open): Updated the prototype.
441 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
443 * kern/env.c (grub_env_context_close): Fix memory leaks.
445 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
447 * normal/main.c (grub_normal_execute): Added an argument
448 BATCH to specify if an interactive interface should be provided
449 after reading a config file.
451 (read_command_list): Prevent being executed twice.
452 (read_fs_list): Likewise.
454 * include/grub/normal.h (grub_normal_execute): Updated the
457 2009-03-22 Pavel Roskin <proski@gno.org>
459 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
461 * kern/i386/pc/startup.S: Likewise.
462 * kern/i386/efi/startup.S: Likewise.
463 * kern/i386/ieee1275/startup.S: Likewise.
464 * kern/i386/coreboot/startup.S: Likewise.
465 * kern/x86_64/efi/startup.S: Likewise.
467 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
468 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
469 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
471 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
473 Bugfixes in multiboot for bugs uncovered by solaris kernel.
475 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
477 Use vaddr of correct segment for entry_point.
479 2009-03-21 Bean <bean123ch@gmail.com>
481 * commands/blocklist.c: Add include file <grub/command.h>, remove
482 <grub/normal.h> and <grub/arg.h>.
483 (grub_cmd_blocklist): Use the new command interface.
484 (GRUB_MOD_INIT): Likewise.
485 (GRUB_MOD_FINI): Likewise.
486 * commands/boot.c: Likewise.
487 * commands/cat.c: Likewise.
488 * commands/cmp.c: Likewise.
489 * commands/configfile.c: Likewise.
490 * commands/crc.c: Likewise.
491 * commands/echo.c: Likewise.
492 * commands/halt.c: Likewise.
493 * commands/handler.c: Likewise.
494 * commands/hdparm.c: Likewise.
495 * commands/help.c: Likewise.
496 * commands/hexdump.c: Likewise.
497 * commands/loadenv.c: Likewise.
498 * commands/ls.c: Likewise.
499 * commands/lsmmap.c: Likewise.
500 * commands/lspci.c: Likewise.
501 * commands/loadenv.c: Likewise.
502 * commands/read.c: Likewise.
503 * commands/reboot.c: Likewise.
504 * commands/search.c: Likewise.
505 * commands/sleep.c: Likewise.
506 * commands/test.c: Likewise.
507 * commands/usbtest.c: Likewise.
508 * commands/videotest.c: Likewise.
509 * commands/i386/cpuid.c: Likewise.
510 * commands/i386/pc/halt.c: Likewise.
511 * commands/i386/pc/play.c: Likewise.
512 * commands/i386/pc/pxecmd.c: Likewise.
513 * commands/i386/pc/vbeinfo.c: Likewise.
514 * commands/i386/pc/vbetest.c: Likewise.
515 * commands/ieee1275/suspend.c: Likewise.
516 * disk/loopback.c: Likewise.
517 * font/font_cmd.c: Likewise.
518 * hello/hello.c: Likewise.
519 * loader/efi/appleloader.c: Likewise.
520 * loader/efi/chainloader.c: Likewise.
521 * loader/i386/bsd.c: Likewise.
522 * loader/i386/efi/linux.c: Likewise.
523 * loader/i386/ieee1275/linux.c: Likewise.
524 * loader/i386/linux.c: Likewise.
525 * loader/i386/pc/chainloader.c: Likewise.
526 * loader/i386/pc/linux.c: Likewise.
527 * loader/powerpc/ieee1275/linux.c: Likewise.
528 * loader/multiboot_loader.c: Likewise.
529 * term/gfxterm.c: Likewise.
530 * term/i386/pc/serial.c: Likewise.
531 * term/terminfo.c: Likewise.
533 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
534 * term/i386/pc/vga.c: Likewise.
535 * video/readers/jpeg.c: Likewise.
536 * video/readers/png.c: Likewise.
537 * video/readers/tga.c: Likewise.
539 * util/grub-fstest (cmd_loopback): Removed.
540 (cmd_blocklist): Likewise.
542 (grub_register_command): Likewise.
543 (grub_unregister_command): Likewise.
544 (execute_command): Use grub_command_find to locate command and execute
547 * include/grub/efi/chainloader.h: Removed.
548 * loader/efi/chainloader_normal.c: Likewise.
549 * loader/i386/bsd_normal.c: Likewise.
550 * loader/i386/pc/chainloader_normal.c: Likewise.
551 * loader/i386/pc/multiboot_normal.c: Likewise.
552 * loader/linux_normal.c: Likewise.
553 * loader/multiboot_loader_normal.c: Likewise.
554 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
556 * gencmdlist.sh: Scan new registration command grub_register_extcmd
557 and grub_register_command_p1.
559 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
560 kern/command.c, lib/arg.c and commands/extcmd.c.
561 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
562 (minicmd_mod_SOURCES): New variable.
563 (minicmd_mod_CFLAGS): Likewise.
564 (minicmd_mod_LDFLAGS): Likewise.
565 (extcmd_mod_SOURCES): Likewise.
566 (extcmd_mod_CFLAGS): Likewise.
567 (extcmd_mod_LDFLAGS): Likewise.
568 (boot_mod_SOURCES): Removed.
569 (boot_mod_CFLAGS): Likewise.
570 (boot_mod_LDFLAGS): Likewise.
572 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
574 (kernel_img_HEADERS): Add command.h.
575 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
576 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
578 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
579 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
580 remove the corresponding normal mode command.
581 (normal_mod_SOURCES): Remove normal/arg.c.
582 * conf/i386-coreboot.rmk: Likewise.
583 * conf/i386-efi.rmk: Likewise.
584 * conf/i386-ieee1275.rmk: Likewise.
585 * conf/powerpc-ieee1275.rmk: Likewise.
586 * conf/x86_64-efi.rmk: Likewise.
588 * include/grub/arg.h: Move from here ...
589 * include/grub/lib/arg.h: ... to here.
591 * normal/arg.c: Move from here ...
592 * lib/arg.c: ... to here.
594 * commands/extcmd.c: New file.
595 * commands/minicmd.c: Likewise.
596 * include/grub/command.h: Likewise.
597 * include/grub/extcmd.h: Likewise.
598 * kern/command.c: Likewise.
599 * kern/corecmd.c: Likewise.
601 * kern/list.c (grub_list_iterate): Return int instead of void.
602 (grub_list_insert): New function.
603 (grub_prio_list_insert): Likewise.
605 * kern/rescue.c (grub_rescue_command): Removed.
606 (grub_rescue_command_list): Likewise.
607 (grub_rescue_register_command): Likewise.
608 (grub_rescue_unregister_command): Likewise.
609 (grub_rescue_cmd_boot): Move to minicmd.c
610 (grub_rescue_cmd_help): Likewise.
611 (grub_rescue_cmd_info): Likewise.
612 (grub_rescue_cmd_boot): Likewise.
613 (grub_rescue_cmd_testload): Likewise.
614 (grub_rescue_cmd_dump): Likewise.
615 (grub_rescue_cmd_rmmod): Likewise.
616 (grub_rescue_cmd_lsmod): Likewise.
617 (grub_rescue_cmd_exit): Likewise.
618 (grub_rescue_print_devices): Moved to corecmd.c.
619 (grub_rescue_print_files): Likewise.
620 (grub_rescue_cmd_ls): Likewise.
621 (grub_rescue_cmd_insmod): Likewise.
622 (grub_rescue_cmd_set): Likewise.
623 (grub_rescue_cmd_unset): Likewise.
624 (attempt_normal_mode): Use grub_command_find to get normal module.
625 (grub_enter_rescue_mode): Use grub_register_core_commands to register
626 commands, remove grub_rescue_register_command calls.
628 * normal/command.c (grub_register_command): Removed.
629 (grub_unregister_command): Likewise.
630 (grub_command_find): Likewise.
631 (grub_iterate_commands): Likewise.
632 (rescue_command): Likewise.
633 (export_command): Moved to corecmd.c.
634 (set_command): Removed.
635 (unset_command): Likewise.
636 (insmod_command): Likewise.
637 (rmmod_command): Likewise.
638 (lsmod_command): Likewise.
639 (grub_command_init): Likewise.
641 * normal/completion.c (iterate_command): Use cmd->prio to check for
643 (complete_arguments): Use grub_extcmd_t structure to find options.
644 (grub_normal_do_completion): Change function grub_iterate_commands to
645 grub_command_iterate.
647 * normal/execute.c (grub_script_execute_cmd): No need to parse
650 * normal/main.c (grub_dyncmd_dispatcher): New function.
651 (read_command_list): Register unload commands as dyncmd.
652 (grub_cmd_normal): Use new command interface, register rescue,
653 unregister normal at entry, register normal, unregister rescue at exit.
655 * include/grub/list.h (grub_list_test_t): New type.
656 (grub_list_iterate): Return int instead of void.
657 (grub_list_insert): New function.
658 (GRUB_AS_NAMED_LIST_P): New macro.
659 (GRUB_AS_PRIO_LIST): Likewise.
660 (GRUB_AS_PRIO_LIST_P): Likewise.
661 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
662 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
663 (grub_prio_list): New structure.
664 (grub_prio_list_insert): New function.
665 (grub_prio_list_remove): New inline function.
667 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
668 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
669 (GRUB_COMMAND_FLAG_MENU): Likewise.
670 (GRUB_COMMAND_FLAG_BOTH): Likewise.
671 (GRUB_COMMAND_FLAG_TITLE): Likewise.
672 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
673 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
674 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
675 (grub_command): Likewise.
676 (grub_register_command): Likewise.
677 (grub_command_find): Likewise.
678 (grub_iterate_commands): Likewise.
679 (grub_command_init): Likewise.
680 (grub_arg_parse): Likewise.
681 (grub_arg_show_help): Likewise.
683 * include/grub/rescue.h (grub_rescue_register_command): Removed.
684 (grub_rescue_unregister_command): Likewise.
686 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
687 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
688 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
690 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
691 grub_rescue_cmd_initrd.
692 * include/grub/i386/loader.h: Likewise.
693 * include/grub/x86_64/loader.h: Likewise.
695 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
697 2009-03-21 Bean <bean123ch@gmail.com>
699 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
700 instead of stat in mingw environment.
702 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
704 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
706 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
709 2009-03-21 Bean <bean123ch@gmail.com>
711 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
714 2009-03-18 Michel Dänzer <michel@daenzer.net>
716 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
717 checking inode flags for EXT4_EXTENTS_FLAG.
719 2009-03-18 Robert Millan <rmh@aybabtu.com>
721 * loader/i386/linux.c: Include `<grub/video.h>' and
722 `<grub/i386/pc/vbe.h>'..
723 (grub_linux_setup_video): New function. Loosely based on the EFI one.
724 (grub_linux32_boot): Attempt to configure video settings with
725 grub_linux_setup_video().
726 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
727 to avoid grub_console_fini() which would step out of graphical mode
730 2009-03-14 Robert Millan <rmh@aybabtu.com>
732 Fix build on powerpc.
733 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
735 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
737 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
738 background image command.
740 2009-03-12 Colin D Bennett <colin@gibibit.com>
742 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
743 (grub_gfxterm_putchar): Extract pairs of identical calls to
744 draw_cursor out of conditional blocks.
746 2009-03-11 Pavel Roskin <proski@gnu.org>
748 * fs/hfs.c (grub_hfs_strncasecmp): New function.
749 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
751 2009-03-11 Robert Millan <rmh@aybabtu.com>
753 * loader/i386/multiboot_elfxx.c
754 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
756 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
758 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
761 2009-03-11 Robert Millan <rmh@aybabtu.com>
763 * loader/i386/multiboot.c (code_size): New variable.
764 (grub_multiboot): Define offsets by adding to `code_size' rather
765 than subtracting from `grub_multiboot_payload_size'. Provide
766 4-byte alignment to MBI and others by increasing
767 `boot_loader_name_length' appropriately.
769 * loader/i386/multiboot_elfxx.c
770 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
772 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
774 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
777 2009-03-08 Robert Millan <rmh@aybabtu.com>
779 Make loader/i386/linux.c usable on i386-pc again.
781 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
783 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
786 2009-03-07 Bean <bean123ch@gmail.com>
788 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
791 2009-03-06 Robert Millan <rmh@aybabtu.com>
793 Fix display issue on terminals with screen size other than 80x25
794 (e.g. gfxterm with resolution higher than 640x480).
796 * normal/main.c (grub_normal_init_page): Display title text in a
797 position relative to the center of the terminal instead of relying
798 on a hardcoded offset.
800 2009-03-04 Robert Millan <rmh@aybabtu.com>
802 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
805 * Makefile.in (host_kernel): New variable.
806 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
807 scripts instead of just the windows one.
808 * configure.ac: Initialize and AC_SUBST `host_kernel'.
810 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
812 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
814 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
815 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
816 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
817 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
818 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
819 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
821 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
823 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
824 or if there's no space for the disk label and print the partition number on a
827 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
829 * util/misc.c: Include <time.h>.
830 (grub_millisleep): New function.
832 2009-03-04 Bean <bean123ch@gmail.com>
834 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
835 another option -mno-red-zone.
837 * commands/handler.c: Change module description.
839 * kern/handler.c: Add missing space at the end of description line.
841 * kern/list.c: Likewise.
843 2009-03-03 Robert Millan <rmh@aybabtu.com>
845 Move more components to the relocation area, and fix mbi pointer
846 handling to use the destination rather than the origin (thanks to
847 Vladimir Serbinenko for spotting).
849 * loader/i386/multiboot.c (mbi_dest): New variable.
850 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
851 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
854 2009-03-01 Bean <bean123ch@gmail.com>
856 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
857 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
858 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
859 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
861 * loader/i386/efi/linux.c (acpi_guid): New variable.
862 (acpi_guid): Likewise.
863 (EBDA_SEG_ADDR): New constant.
864 (LOW_MEM_ADDR): Likewise.
865 (FAKE_EBDA_SEG): Likewise.
866 (fake_bios_data): New function.
867 (grub_linux_boot): Call fake_bios_data.
869 2009-03-01 Bean <bean123ch@gmail.com>
871 * commands/terminal.c: Removed.
873 * commands/handler.c: New file.
875 * include/grub/list.h: Likewise.
877 * include/grub/handler.h: Likewise.
879 * kern/list.c: Likewise.
881 * kern/handler.c: Likewise.
883 * kern/term.h: Include header file <grub/handler.h>.
884 (grub_term_input): Move next field to the beginning.
885 (grub_term_output): Likewise.
886 (grub_term_input_class): New variable.
887 (grub_term_output_class): Likewise.
888 (grub_term_register_input): Changed to inline function.
889 (grub_term_register_output): Likewise.
890 (grub_term_unregister_input): Likewise.
891 (grub_term_unregister_output): Likewise.
892 (grub_term_set_current_input): Likewise.
893 (grub_term_set_current_output): Likewise.
894 (grub_term_get_current_input): Likewise.
895 (grub_term_get_current_output): Likewise.
896 (grub_term_iterate_input): Removed.
897 (grub_term_iterate_output): Likewise.
899 * kern/term.c (grub_term_list_input): Removed.
900 (grub_term_list_output): Likewise.
901 (grub_term_input_class): New variable.
902 (grub_term_output_class): Likewise.
903 (grub_cur_term_input): Change variable as macro.
904 (grub_cur_term_output): Likewise.
905 (grub_term_register_input): Removed.
906 (grub_term_register_output): Likewise.
907 (grub_term_unregister_input): Likewise.
908 (grub_term_unregister_output): Likewise.
909 (grub_term_set_current_input): Likewise.
910 (grub_term_set_current_output): Likewise.
911 (grub_term_iterate_input): Likewise.
912 (grub_term_iterate_output): Likewise.
913 (grub_term_get_current_input): Likewise.
914 (grub_term_get_current_output): Likewise.
916 * util/grub-editenv.c: Include header file <grub/handler.h>.
917 (grub_term_get_current_input): Removed.
918 (grub_term_get_current_output): Likewise.
919 (grub_term_input_class): New variable.
920 (grub_term_output_class): Likewise.
922 * util/grub-fstest.c (grub_term_get_current_input): Removed.
923 (grub_term_get_current_output): Likewise.
924 (grub_term_input_class): New variable.
925 (grub_term_output_class): Likewise.
927 * util/grub-probe.c (grub_term_get_current_input): Removed.
928 (grub_term_get_current_output): Likewise.
929 (grub_term_input_class): New variable.
930 (grub_term_output_class): Likewise.
932 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
933 (grub_term_get_current_output): Likewise.
934 (grub_term_input_class): New variable.
935 (grub_term_output_class): Likewise.
937 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
938 (terminal_mod_SOURCES): Likewise.
939 (terminal_mod_CFLAGS): Likewise.
940 (terminal_mod_LDFLAGS): Likewise.
942 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
944 (kernel_img_SOURCES): Add list.c and handler.c.
945 (kernel_img_HEADERS): Add list.h and handler.h.
947 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
949 (kernel_mod_SOURCES): Add list.c and handler.c.
950 (kernel_mod_HEADERS): Add list.h and handler.h.
952 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
954 (kernel_elf_SOURCES): Add list.c and handler.c.
955 (kernel_elf_HEADERS): Add list.h and handler.h.
957 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
959 (kernel_elf_SOURCES): Add list.c and handler.c.
960 (kernel_elf_HEADERS): Add list.h and handler.h.
962 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
964 (kernel_mod_SOURCES): Add list.c and handler.c.
965 (kernel_mod_HEADERS): Add list.h and handler.h.
967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
969 (kernel_elf_SOURCES): Add list.c and handler.c.
970 (kernel_elf_HEADERS): Add list.h and handler.h.
972 2009-02-27 Robert Millan <rmh@aybabtu.com>
974 Factorize elf32 / elf64 code in Multiboot loader. This will
975 prevent it from getting out of sync again.
977 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
978 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
979 grub_multiboot_load_elf64): Move from here ...
980 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
981 grub_multiboot_load_elf): ... to here (new file).
983 2009-02-27 Robert Millan <rmh@aybabtu.com>
985 * util/grub.d/10_linux.in: Rename "single-user mode" to
988 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
990 Don't leak in SCSI code.
991 * disk/scsi.c (grub_scsi_close): free `scsi'.
993 2009-02-27 Robert Millan <rmh@aybabtu.com>
995 * loader/i386/pc/multiboot.c: Move from here ...
996 * loader/i386/multiboot.c: ... to here. Update all users.
998 2009-02-27 Robert Millan <rmh@aybabtu.com>
1000 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1001 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1003 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
1005 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1008 2009-02-27 Robert Millan <rmh@aybabtu.com>
1010 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1011 `0x' qualifier as 0 when base is specified as parameter).
1013 2009-02-24 Bean <bean123ch@gmail.com>
1015 * configure.ac: Check for -mcmodel=large in x86_64 target.
1017 * include/grub/efi/api.h (efi_call_10): New macro.
1018 (efi_wrap_10): New function.
1020 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1021 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1022 (GRUB_PE32_REL_BASED_LOW): Likewise.
1023 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1024 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1025 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1026 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1027 (GRUB_PE32_REL_BASED_REL): Likewise.
1028 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1029 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1030 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1032 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1035 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1036 (efi_wrap_10): New function.
1038 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1040 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1041 MB/MBP model (NV chipset).
1042 (devdata_devs): Add devpath_5 to the list.
1044 * load/i386/efi/linux.c (video_base): Remove variable.
1045 (RGB_MASK): New macro.
1046 (RGB_MAGIC): Likewise.
1047 (LINE_MIN): Likewise.
1048 (LINE_MAX): Likewise.
1049 (FBTEST_STEP): Likewise.
1050 (FBTEST_COUNT): Likewise.
1051 (fb_list): New variable.
1052 (grub_find_video_card): Remove function.
1053 (find_framebuf): New function.
1054 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1057 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1060 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1062 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1064 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1067 2009-02-22 Robert Millan <rmh@aybabtu.com>
1069 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1070 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1071 in our relocation, instead of using it directly from heap. Also
1072 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1074 2009-02-21 Robert Millan <rmh@aybabtu.com>
1076 Implement USB keyboard support (based on patch by Marco Gerards)
1078 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1079 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1080 (usb_keyboard_mod_LDFLAGS): New variables.
1082 * term/usb_keyboard.c: New file.
1084 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1086 Corrected wrong declaration
1088 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1090 2009-02-14 Christian Franke <franke@computer.org>
1092 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1093 (grub_lspci_iter): Print class code and programming interface byte.
1095 2009-02-14 Christian Franke <franke@computer.org>
1097 * gendistlist.sh: Ignore `.svn' directories.
1099 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
1101 * fs/fat.c: Add 2009 to Copyright line.
1103 2009-02-14 Christian Franke <franke@computer.org>
1105 * commands/hdparm.c: New file. Provides `hdparm' command
1106 which sends ATA commands via grub_disk_ata_pass_through ().
1108 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1110 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1111 and <grub/cpu/io.h> to include/grub/ata.h.
1112 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1113 (GRUB_CDROM_SECTOR_SIZE): Remove.
1114 (GRUB_ATA_*): Move to include/grub/ata.h.
1115 (GRUB_ATAPI_*): Likewise.
1116 (enum grub_ata_commands): Likewise.
1117 (enum grub_ata_timeout_milliseconds): Likewise.
1118 (struct grub_ata_device): Likewise.
1119 (grub_ata_regset): Likewise.
1120 (grub_ata_regget): Likewise.
1121 (grub_ata_regset2): Likewise.
1122 (grub_ata_regget2): Likewise.
1123 (grub_ata_check_ready): Likewise.
1124 (grub_ata_wait_not_busy): Remove static, exported in
1126 (grub_ata_wait_drq): Likewise.
1127 (grub_ata_pio_read): Likewise.
1129 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1130 function for hdparm.mod.
1132 * include/grub/ata.h: New file, contains declarations from
1134 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1136 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1137 (grub_disk_ata_pass_through): New exported variable.
1139 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1141 2009-02-13 Colin D Bennett <colin@gibibit.com>
1143 Support multiple fallback entries, and provide an API to support
1144 executing default+fallback menu entries. Renamed the `terminal' menu
1147 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1148 variable declaration.
1149 (grub_menu_execute_callback): New structure declaration.
1150 (grub_menu_execute_callback_t): New typedef.
1151 (grub_menu_execute_with_fallback): New function declaration.
1152 (grub_menu_get_entry): Likewise.
1153 (grub_menu_get_timeout): Likewise.
1154 (grub_menu_set_timeout): Likewise.
1156 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1158 * normal/menu.c (grub_wait_after_message): Moved to
1159 `normal/menu_text.c'.
1160 (draw_border): Likewise.
1161 (print_message): Likewise.
1162 (print_entry): Likewise.
1163 (print_entries): Likewise.
1164 (grub_menu_init_page): Likewise.
1165 (get_entry_number): Likewise.
1166 (print_timeout): Likewise.
1167 (run_menu): Likewise.
1168 (grub_menu_execute_entry): Likewise.
1169 (show_text_menu): Likewise.
1170 (get_and_remove_first_entry_number): New function.
1171 (grub_menu_execute_with_fallback): Likewise.
1172 (get_entry): Renamed to ...
1173 (grub_menu_get_entry): .. this and made it global.
1174 (get_timeout): Renamed to ...
1175 (grub_menu_get_timeout): ... this and made it global.
1176 (set_timeout): Renamed to ...
1177 (grub_menu_set_timeout): ... this and made it global.
1178 (grub_normal_terminal_menu_viewer): Renamed to ...
1179 (grub_normal_text_menu_viewer): ... this.
1181 * normal/menu_text.c: New file. Extracted text-menu-specific code
1184 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1185 (normal_mod_SOURCES): Likewise.
1187 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1188 (normal_mod_SOURCES): Likewise.
1190 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1191 (normal_mod_SOURCES): Likewise.
1193 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
1194 (normal_mod_SOURCES): Likewise.
1196 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1197 (normal_mod_SOURCES): Likewise.
1199 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1200 (normal_mod_SOURCES): Likewise.
1202 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1203 (normal_mod_SOURCES): Likewise.
1205 2009-02-11 Robert Millan <rmh@aybabtu.com>
1207 * util/grub.d/00_header.in: Update old reference to `font' command.
1209 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
1211 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
1213 Based on patch from Javier MartÃn.
1215 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1217 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
1218 to avoid false positives with FAT.
1219 (grub_fstest_SOURCES): Likewise.
1220 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1221 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1222 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1223 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1224 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1225 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1227 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1229 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
1230 bpb.version_specific.fat12_or_fat16.fstype and
1231 bpb.version_specific.fat32.fstype.
1233 2009-02-08 Robert Millan <rmh@aybabtu.com>
1235 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
1237 2009-02-08 Robert Millan <rmh@aybabtu.com>
1239 * Makefile.in (host_os, host_cpu): New variables.
1240 (target_os): Remove. Update all users.
1242 2009-02-08 Marco Gerards <marco@gnu.org>
1244 * Makefile.in (enable_grub_emu_usb): New variable.
1245 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
1246 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
1247 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
1248 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
1249 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1250 `usbtest.mod' and `usbms.mod'.
1251 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1252 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1253 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1254 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1255 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1258 * disk/usbms.c: New file.
1260 * include/grub/usb.h: Likewise.
1262 * include/grub/usbtrans.h: Likewise.
1264 * include/grub/usbdesc.h: Likewise.
1266 * bus/usb/usbtrans.c: Likewise.
1268 * bus/usb/ohci.c: Likewise.
1270 * bus/usb/uhci.c: Likewise.
1272 * bus/usb/usbhub.c: Likewise.
1274 * bus/usb/usb.c: Likewise.
1276 * commands/usbtest.c: Likewise.
1278 * util/usb.c: Likewise.
1280 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1282 * configure.ac: Test for libusb presence.
1284 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1286 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
1288 * kern/mm.c: Add more comments.
1290 2009-02-08 Robert Millan <rmh@aybabtu.com>
1292 Patch from Javier MartÃn.
1293 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1294 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1296 2009-02-08 Robert Millan <rmh@aybabtu.com>
1298 * fs/cpio.c: Split tar functionality to ...
1299 * fs/tar.c: ... here (new file). Update all users.
1301 2009-02-07 Robert Millan <rmh@aybabtu.com>
1303 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1304 backward-incompatible features.
1306 Based on patch from Javier MartÃn, with some adjustments.
1308 2009-02-07 Michael Scherer <misc@mandriva.org>
1310 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1312 2009-02-07 Robert Millan <rmh@aybabtu.com>
1314 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1315 position of `disk/lvm.c' to ensure grub_init_all() always picks it
1316 after the RAID stuff.
1318 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
1320 Fixes problem when running vbetest command as reported by
1321 Vladimir Serbinenko <phcoder@gmail.com>.
1323 * (grub_vbe_set_video_mode): Fixed problem with text modes.
1325 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
1327 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1328 /dev/md/NpN style mdraid devices.
1330 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1332 * util/unifont2pff.rb: Remove.
1334 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1336 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1339 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1341 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1342 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1343 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1344 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1345 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1346 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1347 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1349 2009-02-02 Christian Franke <franke@computer.org>
1351 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1353 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
1355 * INSTALL: Note that we now require at least autoconf 2.59 and
1356 that LZO is optional.
1358 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1360 Base on patch on bug #24154 created by Tomas Tintera
1363 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1365 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1367 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1368 <bero@arklinux.org>.
1370 * normal/parser.y (script_init): Add missing semicolon.
1372 2009-01-31 Colin D Bennett <colin@gibibit.com>
1374 * normal/main.c: Add include to grub/menu_viewer.h.
1375 (free_menu_entry_classes): Added.
1376 (grub_normal_menu_addentry): Added class property handling.
1377 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1378 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1380 * normal/menu_viewer.c: New file.
1382 * normal/menu.c (run_menu_entry): Renamed to ...
1383 (grub_menu_execute_entry): ... this and made it as global.
1384 (grub_menu_run): Renamed to ...
1385 (show_text_menu): ... this and made it local.
1386 (show_text_menu): Adapt to new function names.
1387 (grub_normal_terminal_menu_viewer): New global variable.
1389 * include/grub/menu.h: New file.
1391 * include/grub/menu_viewer.h: New file.
1393 * include/grub/normal.h: Added include to grub/menu.h.
1394 (grub_menu_entry): Moved to include/grub/menu.h.
1395 (grub_menu_entry_t): Likewise.
1396 (grub_menu): Likewise.
1397 (grub_menu_t): Likewise.
1398 (grub_normal_terminal_menu_viewer): Added.
1399 (grub_menu_execute_entry): Likewise.
1400 (grub_menu_run): Removed.
1402 * DISTLIST: Added include/grub/menu.h.
1403 Added include/grub/menu_viewer.h.
1404 Added normal/menu_viewer.c.
1406 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
1408 * normal/execute.c (grub_script_execute_menuentry): Changed to use
1409 arglist for menutitle arguments.
1411 * normal/main.c (grub_normal_menu_addentry): Likewise.
1413 * normal/parser.y (menuentry): Likewise.
1415 * normal/script.c (grub_script_create_cmdmenu): Likewise.
1417 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1418 (grub_script_create_cmdmenu): Likewise.
1420 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1422 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1425 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1427 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1429 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1431 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1433 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1435 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1437 2009-01-30 Christian Franke <franke@computer.org>
1439 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1440 in option help text.
1442 2009-01-27 Pavel Roskin <proski@gnu.org>
1444 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1446 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1448 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1450 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1452 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1453 unregister function.
1455 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1457 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1459 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1461 * util/grub-mkfont.c (usage): Fix typo.
1463 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1465 2009-01-26 Daniel Mierswa <impulze@impulze.org>
1467 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1469 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1471 * kern/misc.c (grub_strcasecmp): New function.
1472 (grub_strcasecmp): Use grub_size_t instead of int for length.
1474 * include/grub/misc.h: Update function prototypes.
1476 2009-01-26 Robert Millan <rmh@aybabtu.com>
1478 * configure.ac: Fix cross-compilation check.
1480 2009-01-22 Christian Franke <franke@computer.org>
1482 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1483 (precision) digit string. Allow `.format2' without `format1' (width).
1484 Limit input chars for `%s' output to `format2' if specified. This is
1485 compatible with standard printf ().
1487 2009-01-22 Christian Franke <franke@computer.org>
1489 * disk/ata.c (grub_ata_wait_status): Replace by ...
1490 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1491 other status bits may be invalid while BSY is asserted.
1492 (grub_ata_check_ready): New function.
1493 (grub_ata_cmd): Removed.
1494 (grub_ata_wait_drq): New function.
1495 (grub_ata_strncpy): Remove inline.
1496 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1497 and error check now done by grub_ata_wait_drq ().
1498 (grub_ata_pio_write): Likewise.
1499 (grub_atapi_identify): Set DEV before check for !BSY. Use
1500 grub_ata_wait_drq () to wait for data.
1501 (grub_ata_device_initialize): Add status register check to
1502 detect missing SATA slave devices. Add debug messages.
1503 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1504 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1505 transfer loop by grub_ata_pio_write ().
1506 (grub_ata_identify): Set DEV before check for !BSY. Use
1507 grub_ata_wait_drq () to wait for data.
1508 (grub_ata_setaddress): Set DEV before check for !BSY.
1509 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1510 read/write in one loop. Fix invalid command on write. Fix incomplete
1511 command on (size % batch) == 0. Add missing error check after write of
1512 last block. Add debug messages.
1513 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1515 2009-01-19 Christian Franke <franke@computer.org>
1517 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1518 (GRUB_ATAPI_IREASON_*): Likewise.
1519 (grub_ata_pio_write): Fix timeout error return.
1520 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1521 (grub_atapi_wait_drq): New function.
1522 (grub_atapi_packet): New parameter `size'.
1523 Use grub_atapi_wait_drq () and direct write instead of
1524 grub_ata_pio_write ().
1525 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1526 reads the number of bytes requested by the device for each DRQ
1528 (grub_atapi_write): Remove old implementation, return not
1529 implemented instead.
1531 2009-01-19 Christian Franke <franke@computer.org>
1533 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1534 of 512 to calculate data size.
1535 (grub_scsi_read12): Likewise.
1536 (grub_scsi_write10): Likewise.
1537 (grub_scsi_write12): Likewise.
1538 (grub_scsi_read): Adjust size according to blocksize.
1539 Add checks for invalid blocksize and unaligned transfer.
1541 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1543 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1545 * term/gfxterm.c (write_char): Fix background rendering for wide
1548 2009-01-19 Robert Millan <rmh@aybabtu.com>
1550 * config.guess: Update to latest version from config git.
1551 * config.sub: Likewise.
1553 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
1555 * Makefile.in: Change font compilation to use new grub-mkfont instead
1558 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1559 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1560 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1561 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1562 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1563 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1564 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1565 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1566 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1568 2009-01-16 Christian Franke <franke@computer.org>
1570 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1571 (enum grub_ata_timeout_milliseconds): New enum.
1572 (grub_ata_wait_status): Add parameter milliseconds.
1573 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1574 recovery from timed-out commands.
1575 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1576 return grub_errno instead of REG_ERROR.
1577 (grub_ata_pio_write): Add parameter milliseconds.
1578 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1579 Pass milliseconds to grub_ata_wait_status () and
1580 grub_ata_pio_read ().
1581 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1582 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1583 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1584 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1585 It is not suitable for device detection, because DEV bit is ignored,
1586 the command may run too long, and not all devices set the signature
1588 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1589 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1590 Fix device selection, DEV bit must be set first to address the registers
1591 of the correct device.
1592 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1593 grub_ata_pio_read/write ().
1594 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1595 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1597 2009-01-13 Carles Pina i Estany <carles@pina.cat>
1599 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1601 2009-01-13 Bean <bean123ch@gmail.com>
1603 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1605 2009-01-13 Bean <bean123ch@gmail.com>
1607 * Makefile.in: (enable_grub_mkfont): New variable.
1608 (freetype_cflags): Likewise.
1609 (freetype_libs): Likewise.
1611 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1612 (grub_mkfont_SOURCES): New variable.
1613 (grub_mkfont_CFLAGS): Likewise.
1614 (grub_mkfont_LDFLAGS): Likewise.
1616 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1617 library if `--enable-grub-mkfont' is requested.
1618 (enable_grub_mkfont): New variable.
1619 (freetype_cflags): Likewise.
1620 (freetype_libs): Likewise.
1622 * util/grub-mkfont.c: New file.
1624 2009-01-12 Christian Franke <franke@computer.org>
1626 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1627 mode check. Fix setting of compat_use[].
1629 2009-01-10 Robert Millan <rmh@aybabtu.com>
1631 Update a few copyright years which we forgot to do in 2008 (only for
1632 files whose changes made in 2008 were copyright-significant)
1634 * Makefile.in: Add 2008 to Copyright line.
1635 * disk/ieee1275/ofdisk.c: Likewise.
1636 * disk/efi/efidisk.c: Likewise.
1637 * kern/dl.c: Likewise.
1638 * kern/sparc64/ieee1275/init.c: Likewise.
1639 * kern/mm.c: Likewise.
1640 * kern/efi/mm.c: Likewise.
1641 * boot/i386/pc/boot.S: Likewise.
1642 * genfslist.sh: Likewise.
1643 * fs/iso9660.c: Likewise.
1644 * fs/hfs.c: Likewise.
1645 * fs/jfs.c: Likewise.
1646 * fs/minix.c: Likewise.
1647 * fs/ufs.c: Likewise.
1648 * gensymlist.sh.in: Likewise.
1649 * genkernsyms.sh.in: Likewise.
1650 * include/grub/misc.h: Likewise.
1651 * include/grub/types.h: Likewise.
1652 * include/grub/symbol.h: Likewise.
1653 * include/grub/elf.h: Likewise.
1654 * include/grub/kernel.h: Likewise.
1655 * include/grub/disk.h: Likewise.
1656 * include/grub/dl.h: Likewise.
1657 * include/grub/i386/linux.h: Likewise.
1658 * include/grub/i386/pc/biosdisk.h: Likewise.
1659 * include/grub/efi/api.h: Likewise.
1660 * include/grub/efi/pe32.h: Likewise.
1661 * include/grub/util/misc.h: Likewise.
1662 * normal/execute.c: Likewise.
1663 * normal/arg.c: Likewise.
1664 * normal/completion.c: Likewise.
1665 * normal/lexer.c: Likewise.
1666 * normal/parser.y: Likewise.
1667 * normal/misc.c: Likewise.
1668 * commands/i386/pc/vbeinfo.c: Likewise.
1669 * commands/hexdump.c: Likewise.
1670 * commands/terminal.c: Likewise.
1671 * commands/ls.c: Likewise.
1672 * commands/help.c: Likewise.
1673 * partmap/pc.c: Likewise.
1674 * loader/efi/chainloader.c: Likewise.
1675 * loader/multiboot_loader.c: Likewise.
1676 * loader/i386/pc/multiboot2.c: Likewise.
1677 * term/efi/console.c: Likewise.
1678 * term/i386/pc/serial.c: Likewise.
1679 * util/lvm.c: Likewise.
1680 * util/console.c: Likewise.
1681 * util/i386/efi/grub-mkimage.c: Likewise.
1682 * util/raid.c: Likewise.
1684 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1686 * commands/videotest.c: Removed include to grub/machine/memory.h.
1688 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1689 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1690 (video_mod_SOURCES): Removed.
1691 (video_mod_CFLAGS): Likewise.
1692 (video_mod_LDFLAGS): Likewise.
1693 (gfxterm_mod_SOURCES): Likewise.
1694 (gfxterm_mod_CFLAGS): Likewise.
1695 (gfxterm_mod_LDFLAGS): Likewise.
1696 (videotest_mod_SOURCES): Likewise.
1697 (videotest_mod_CFLAGS): Likewise.
1698 (videotest_mod_LDFLAGS): Likewise.
1699 (bitmap_mod_SOURCES): Likewise.
1700 (bitmap_mod_CFLAGS): Likewise.
1701 (bitmap_mod_LDFLAGS): Likewise.
1702 (tga_mod_SOURCES): Likewise.
1703 (tga_mod_CFLAGS): Likewise.
1704 (tga_mod_LDFLAGS): Likewise.
1705 (jpeg_mod_SOURCES): Likewise.
1706 (jpeg_mod_CFLAGS): Likewise.
1707 (jpeg_mod_LDFLAGS): Likewise.
1708 (png_mod_SOURCES): Likewise.
1709 (png_mod_CFLAGS): Likewise.
1710 (png_mod_LDFLAGS): Likewise.
1712 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1713 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1714 (video_mod_SOURCES): Added.
1715 (video_mod_CFLAGS): Likewise.
1716 (video_mod_LDFLAGS): Likewise.
1717 (videotest_mod_SOURCES): Likewise.
1718 (videotest_mod_CFLAGS): Likewise.
1719 (videotest_mod_LDFLAGS): Likewise.
1720 (bitmap_mod_SOURCES): Likewise.
1721 (bitmap_mod_CFLAGS): Likewise.
1722 (bitmap_mod_LDFLAGS): Likewise.
1723 (tga_mod_SOURCES): Likewise.
1724 (tga_mod_CFLAGS): Likewise.
1725 (tga_mod_LDFLAGS): Likewise.
1726 (jpeg_mod_SOURCES): Likewise.
1727 (jpeg_mod_CFLAGS): Likewise.
1728 (jpeg_mod_LDFLAGS): Likewise.
1729 (png_mod_SOURCES): Likewise.
1730 (png_mod_CFLAGS): Likewise.
1731 (png_mod_LDFLAGS): Likewise.
1732 (gfxterm_mod_SOURCES): Likewise.
1733 (gfxterm_mod_CFLAGS): Likewise.
1734 (gfxterm_mod_LDFLAGS): Likewise.
1736 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1737 grub/machine/console.h.
1739 2009-01-04 Jerone Young <jerone@gmail.com>
1741 Make on screen instructions clearer
1743 Based on patch created by Jidanni <jidanni@jidanni.org>
1745 * normal/menu.c: print clearer instructions on the screen
1747 2009-01-02 Colin D Bennett <colin@gibibit.com>
1751 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1752 build system and fixed gfxterm.c to work with different sized fonts.
1754 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
1756 * configure: Re-generated.
1758 * DISTLIST: Removed font/manager.c.
1760 Added font/font_cmd.c.
1762 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1765 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
1767 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1769 * kern/term.c: Changed users of grub_utf8_to_ucs4.
1771 * normal/menu.c: Likewise.
1773 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1774 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1776 * include/grub/font.h: Replaced with new file.
1778 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1779 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1780 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1781 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1782 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1783 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1784 fg_red, fg_green, fg_blue, fg_alpha.
1785 (grub_video_adapter): Removed blit_glyph.
1786 (grub_video_blit_glyph): Removed.
1788 * font/manager.c: Removed file.
1790 * font/font.c: New file.
1792 * font/font_cmd.c: Likewise.
1794 * video/video.c (grub_video_blit_glyph): Removed.
1796 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1797 (grub_video_vbe_map_rgba): Likewise.
1798 (grub_video_vbe_unmap_color_int): Likewise.
1799 (grub_video_vbe_blit_glyph): Removed.
1800 (grub_video_vbe_adapter): Removed blit_glyph.
1802 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1803 (get_pixel): Likewise.
1804 (set_pixel): Likewise.
1806 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1808 * term/gfxterm.c: Adapted to new font engine.
1810 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
1812 * term/i386/pc/vga.c: Likewise.
1814 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1816 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1818 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1820 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1822 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1824 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1826 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1828 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1830 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1832 * util/grub.d/00_header.in: Changed to use new loadfont command.
1834 * util/grub-mkconfig_lib.in: Changed font extension.
1836 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
1838 * util/getroot.c (grub_util_get_grub_dev): Add support for
1839 /dev/md/dNNpNN style partitionable mdraid devices.
1841 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
1843 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1844 at a time limit of the PXE TFTP API correctly.
1845 (grub_pxefs_close): Likewise.
1847 2008-11-29 Robert Millan <rmh@aybabtu.com>
1849 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1850 grub_ata_device_initialize() calls.
1852 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
1854 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1856 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1858 2008-11-28 Robert Millan <rmh@aybabtu.com>
1860 Fix build on powerpc-ieee1275. Based on patch created by
1861 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1862 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1863 `kern/ieee1275/mmap.c'.
1864 * include/grub/powerpc/ieee1275/memory.h: New file.
1866 Provide grub-install on coreboot.
1867 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1868 (grub_install_SOURCES): New variable.
1869 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1872 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
1874 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1875 to `grub_term_input_t'.
1876 (grub_term_get_current_output): Change return type to
1877 `grub_term_output_t'.
1879 2008-11-22 Robert Millan <rmh@aybabtu.com>
1881 Fix breakage on coreboot due to declaration mismatch.
1882 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1883 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1884 grub_vga_text_cls().
1886 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
1887 comments. Avoid copying one more byte than necessary (just in case).
1889 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1890 to 0x200000 (avoids trouble with some OFW implementations, and matches
1891 with the one in Yaboot).
1892 Reported by Manoel Abranches
1894 2008-11-20 Robert Millan <rmh@aybabtu.com>
1896 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1897 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1899 * util/grub-mkconfig_lib.in (grub_warn): New function.
1900 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1901 warnings, to obtain consistent formatting.
1902 * util/grub.d/00_header.in: Likewise.
1903 * util/update-grub_lib.in: Likewise.
1905 * loader/i386/linux.c (allocate_pages): Fix a warning.
1906 Move comment text to `#error' stanza.
1908 Harmonize ieee1275's grub_available_iterate() with the generic
1909 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1910 build problem on i386-ieee1275):
1911 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1912 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1913 parameter `type'. Update all users of this function.
1914 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1915 `kern/ieee1275/mmap.c'.
1916 * kern/ieee1275/init.c
1917 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1919 (grub_machine_mmap_iterate): ... this.
1920 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1921 return type to `grub_err_t'. Update all implementations of this
1923 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1926 Add `lsmmap' command (lists firmware-provided memory map):
1927 * commands/lsmmap.c: New file.
1928 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1929 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1931 * conf/powerpc-ieee1275.rmk: Likewise.
1932 * conf/i386-coreboot.rmk: Likewise.
1933 * conf/i386-ieee1275.rmk: Likewise.
1935 2008-11-19 Robert Millan <rmh@aybabtu.com>
1937 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
1938 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1939 constraints to initrd allocation (based on code from
1940 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1941 for Linux to find it.
1943 2008-11-14 Robert Millan <rmh@aybabtu.com>
1945 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1946 order to cope with duplicate slashes.
1948 2008-11-14 Robert Millan <rmh@aybabtu.com>
1950 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1951 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1952 don't want to mess with lower memory, because it is used in the Linux
1955 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
1956 an appropriate place in lower memory, between 0x10000 and 0x90000,
1957 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1958 is in our heap (probably as a result of it being corrupted during
1959 decompression). Add #error instance with comment to explain why this
1960 loader isn't currently usable on PC/BIOS.
1962 2008-11-14 Robert Millan <rmh@aybabtu.com>
1964 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
1965 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
1967 2008-11-12 Robert Millan <rmh@aybabtu.com>
1969 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1971 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1972 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1974 * include/grub/i386/pc/memory.h: ... to here.
1976 2008-11-12 Robert Millan <rmh@aybabtu.com>
1978 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1981 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1982 (grub_console_cur_color, grub_console_real_putchar)
1983 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1984 (grub_console_setcolorstate, grub_console_setcolor)
1985 (grub_console_getcolor): Move from here ...
1986 * include/grub/i386/vga_common.h: ... to here (new file).
1988 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1989 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1991 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1992 `<grub/i386/vga_common.h>'.
1994 2008-11-12 Robert Millan <rmh@aybabtu.com>
1996 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1997 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1998 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2000 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2001 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2003 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2004 grub_console_init() with call to grub_vga_text_init().
2005 (grub_machine_fini): Replace call to
2006 grub_console_fini() with call to grub_vga_text_fini() and
2007 grub_at_keyboard_fini().
2009 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2010 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2011 (grub_console_setcolorstate, grub_console_setcolor)
2012 (grub_console_getcolor): New function prototypes.
2014 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2015 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2016 (grub_vga_text_setcursor): Static-ize.
2017 (grub_vga_text_term): New structure.
2018 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2020 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2021 (grub_console_cur_color, grub_console_standard_color)
2022 (grub_console_normal_color, grub_console_highlight_color)
2023 (map_char, grub_console_putchar, grub_console_getcharwidth)
2024 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2025 (grub_console_getcolor): Move from here ...
2026 * term/i386/vga_common.c: ... to here (same function names).
2028 2008-11-12 Robert Millan <rmh@aybabtu.com>
2030 Use newly-added Multiboot support in coreboot.
2032 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2033 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2035 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2036 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2037 (codestart): Store the MBI in `startup_multiboot_info' when we're
2038 being loaded using Multiboot.
2040 * kern/i386/coreboot/init.c (grub_machine_init): Move
2041 grub_at_keyboard_init() call to beginning of function (useful for
2042 debugging). Call grub_machine_mmap_init() before attempting to use
2043 grub_machine_mmap_iterate().
2044 (grub_lower_mem, grub_upper_mem): Move from here ...
2045 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2048 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2051 2008-11-12 Robert Millan <rmh@aybabtu.com>
2053 Fix a regression introduced by the at_keyboard.mod split. Because
2054 some terminals are default on some platforms and non-default on
2055 others, the first terminal being registered determines which is
2056 going to be default.
2058 * kern/term.c (grub_term_register_input): If this is the first
2059 terminal being registered, set it as the current one.
2060 (grub_term_register_output): Likewise.
2062 * term/efi/console.c (grub_console_init): Do not call
2063 grub_term_set_current_output() or grub_term_set_current_input().
2064 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2065 * term/i386/pc/console.c (grub_console_init): Likewise.
2066 (grub_console_fini): Do not call grub_term_set_current_input()
2067 (but leave grub_term_set_current_output() to restore text mode).
2069 2008-11-10 Robert Millan <rmh@aybabtu.com>
2071 * util/grub.d/00_header.in: Add backward compatibility check for
2072 versions of terminal.mod that don't understand `terminal_input' or
2075 2008-11-09 Robert Millan <rmh@aybabtu.com>
2077 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2078 `terminal_input' / `terminal_output', not `terminal'.
2080 2008-11-08 Robert Millan <rmh@aybabtu.com>
2082 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2083 (DISTCLEANFILES): Add `build_env.mk'.
2085 2008-11-08 Robert Millan <rmh@aybabtu.com>
2087 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
2088 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2089 members. Update all users.
2090 * util/console.c (grub_ncurses_term): Split in ...
2091 (grub_ncurses_term_input): ... this, and ...
2092 (grub_ncurses_term_output): ... this. Update all users.
2093 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
2095 2008-11-08 Robert Millan <rmh@aybabtu.com>
2097 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2098 (PKGDATA): Add $(pkgdata_SRCDIR).
2099 (pkglib_BUILDDIR): New variable.
2100 (pkgdata_SRCDIR): New variable.
2101 (build_env.mk): New target.
2102 (include_DATA): New variable.
2103 (install-local): Install $(include_DATA) files in $(includedir).
2105 2008-11-07 Pavel Roskin <proski@gnu.org>
2107 * gendistlist.sh: Use C locale for sorting to ensure consistent
2108 output on all systems.
2110 * util/grub.d/00_header.in: Remove incorrect space before
2113 2008-11-07 Robert Millan <rmh@aybabtu.com>
2115 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2117 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2118 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2119 (based on find_multi_boot1_header).
2120 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2121 using find_multi_boot2_header(), and abort if neither Multiboot or
2122 Multiboot headers were found.
2124 2008-11-07 Robert Millan <rmh@aybabtu.com>
2126 Modularize at_keyboard.mod:
2128 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2129 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2130 (at_keyboard_mod_LDFLAGS): New variables.
2132 Actual terminal split:
2134 * include/grub/term.h (struct grub_term): Split in ...
2135 (struct grub_term_input): ... this, and ...
2136 (struct grub_term_output): ... this. Update all users.
2137 (grub_term_set_current): Split in ...
2138 (grub_term_set_current_input): ... this, and ...
2139 (grub_term_set_current_output): ... this.
2140 (grub_term_get_current): Split in ...
2141 (grub_term_get_current_input): ... this, and ...
2142 (grub_term_get_current_output): ... this.
2143 (grub_term_register): Split in ...
2144 (grub_term_register_input): ... this, and ...
2145 (grub_term_register_output): ... this.
2146 (grub_term_unregister): Split in ...
2147 (grub_term_unregister_input): ... this, and ...
2148 (grub_term_unregister_output): ... this.
2149 (grub_term_iterate): Split in ...
2150 (grub_term_iterate_input): ... this, and ...
2151 (grub_term_iterate_output): ... this.
2153 * kern/term.c (grub_term_list): Split in ...
2154 (grub_term_list_input): ... this, and ...
2155 (grub_term_list_output): ... this. Update all users.
2156 (grub_cur_term): Split in ...
2157 (grub_cur_term_input): ... this, and ...
2158 (grub_cur_term_output): ... this. Update all users.
2159 (grub_term_set_current): Split in ...
2160 (grub_term_set_current_input): ... this, and ...
2161 (grub_term_set_current_output): ... this.
2162 (grub_term_get_current): Split in ...
2163 (grub_term_get_current_input): ... this, and ...
2164 (grub_term_get_current_output): ... this.
2165 (grub_term_register): Split in ...
2166 (grub_term_register_input): ... this, and ...
2167 (grub_term_register_output): ... this.
2168 (grub_term_unregister): Split in ...
2169 (grub_term_unregister_input): ... this, and ...
2170 (grub_term_unregister_output): ... this.
2171 (grub_term_iterate): Split in ...
2172 (grub_term_iterate_input): ... this, and ...
2173 (grub_term_iterate_output): ... this.
2175 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2176 a check for input and one for output (and only attempt to get keys
2177 from user when input works).
2179 * util/grub-probe.c (grub_term_get_current): Split in ...
2180 (grub_term_get_current_input): ... this, and ...
2181 (grub_term_get_current_output): ... this.
2182 * util/grub-fstest.c: Likewise.
2183 * util/i386/pc/grub-setup.c: Likewise.
2184 * util/grub-editenv.c: Likewise.
2186 Portability adjustments:
2188 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2189 `term/i386/pc/at_keyboard.c'.
2190 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2191 grub_keyboard_controller_init() (now handled by terminal .init).
2192 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
2193 grub_at_keyboard_init().
2194 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
2195 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
2196 at_keyboard.mod via input terminal interface).
2197 * include/grub/i386/coreboot/console.h: Convert into a stub for
2198 `<grub/i386/pc/console.h>'.
2200 Migrate full terminals to new API:
2202 * term/efi/console.c (grub_console_term): Split into ...
2203 (grub_console_term_input): ... this, and ...
2204 (grub_console_term_output): ... this. Update all users.
2205 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
2206 (grub_ofconsole_init): Split into ...
2207 (grub_ofconsole_init_input): ... this, and ...
2208 (grub_ofconsole_init_output): ... this.
2209 (grub_ofconsole_term): Split into ...
2210 (grub_ofconsole_term_input): ... this, and ...
2211 (grub_ofconsole_term_output): ... this. Update all users.
2212 * term/i386/pc/serial.c (grub_serial_term): Split into ...
2213 (grub_serial_term_input): ... this, and ...
2214 (grub_serial_term_output): ... this. Update all users.
2215 * term/i386/pc/console.c (grub_console_term): Split into ...
2216 (grub_console_term_input): ... this, and ...
2217 (grub_console_term_output): ... this. Update all users.
2218 (grub_console_term_input): Only enable it on PC/BIOS platform.
2219 (grub_console_init): Remove grub_keyboard_controller_init() call.
2221 Migrate input terminals to new API:
2223 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
2224 `i386' and `i386/pc' to enable build on x86_64 (this driver is
2225 i386-specific anyway).
2226 (grub_console_checkkey): Rename to ...
2227 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
2229 (grub_keyboard_controller_orig): New variable.
2230 (grub_console_getkey): Rename to ...
2231 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
2233 (grub_keyboard_controller_init): Static-ize. Save original
2234 controller value so that it can be restored ...
2235 (grub_keyboard_controller_fini): ... here (new function).
2236 (grub_at_keyboard_term): New structure.
2237 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
2240 Migrate output terminals to new API:
2242 * term/i386/pc/vga.c (grub_vga_term): Change type to
2243 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2244 members. Update all users.
2245 * term/gfxterm.c (grub_video_term): Change type to
2246 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2247 members. Update all users.
2248 * include/grub/i386/pc/console.h (grub_console_checkkey)
2249 (grub_console_getkey): Do not export (no longer needed by gfxterm,
2252 Migrate `terminal' command and userland tools to new API:
2254 * commands/terminal.c (grub_cmd_terminal): Split into ...
2255 (grub_cmd_terminal_input): ... this, and ...
2256 (grub_cmd_terminal_output): ... this.
2257 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2258 `terminal_input' and `terminal_output'.
2259 * util/grub.d/00_header.in: Adjust `terminal' calls to new
2260 `terminal_input' / `terminal_output' API.
2261 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2262 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2263 provided ${GRUB_TERMINAL}, convert it).
2265 2008-11-04 Robert Millan <rmh@aybabtu.com>
2267 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
2269 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2271 2008-11-03 Bean <bean123ch@gmail.com>
2273 * kern/elf.c (grub_elf32_load): Revert to previous code.
2274 (grub_elf64_load): Likewise.
2276 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2278 2008-11-01 Robert Millan <rmh@aybabtu.com>
2280 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2281 (TARGET_CPPFLAGS): Likewise.
2282 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2284 2008-11-01 Carles Pina i Estany <carles@pina.cat>
2286 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2288 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2290 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2291 addition of objects until the code is not going to be able to fail.
2293 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2295 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2296 (add a missing NULL check, and correct them by moving the pointer
2297 operations after the actual check).
2299 2008-10-29 Robert Millan <rmh@aybabtu.com>
2301 * util/i386/pc/grub-install.in: Handle empty string as output from
2302 make_system_path_relative_to_its_root().
2304 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
2306 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2307 circular metadata worst case scenario. If the metadata is circular
2308 then copy the wrap in place.
2309 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2310 project lib/format_text/layout.h
2311 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2313 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2315 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2317 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2319 * util/update-grub_lib.in: Mention filename in warning message.
2321 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2323 * NEWS: Update for rename of update-grub to grub-mkconfig.
2325 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2327 * util/update-grub_lib.in: Copy to ...
2328 * util/grub-mkconfig_lib.in: ... this. Update all users.
2329 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2330 * util/update-grub.in: Rename to ...
2331 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
2332 option. Add `--output' option to allow users to specify the generated
2333 configuration file. Default to stdout.
2334 (update_grub_dir): Rename to ...
2335 (grub_mkconfig_dir): ... this.
2336 (grub_cfg): Default to an empty string.
2337 * conf/common.rmk (update-grub): Rename to ...
2338 (grub-mkconfig): ... this.
2339 (update-grub_lib): Copy to ...
2340 (grub-mkconfig_lib): ... this.
2341 (update-grub_SCRIPTS): Copy to ...
2342 (grub-mkconfig_SCRIPTS): ... this. Update all users.
2343 (update-grub_DATA): Rename to ...
2344 (grub-mkconfig_DATA): ... this.
2346 2008-09-28 Robert Millan <rmh@aybabtu.com>
2348 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2349 to `modified'. Add the real `created' field.
2350 (grub_iso9660_uuid): Use `modified' rather than `created' for
2351 constructing the UUID.
2353 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
2355 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2356 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2358 2008-09-28 Bean <bean123ch@gmail.com>
2360 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2361 Thanks to Christian Franke for finding this bug.
2363 2008-09-25 Robert Millan <rmh@aybabtu.com>
2365 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2366 instances of grub_util_get_disk_name() (see previous commit).
2368 2008-09-25 Robert Millan <rmh@aybabtu.com>
2370 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2371 `util/i386/get_disk_name.c'.
2372 * conf/i386-efi.rmk: Likewise.
2373 * conf/x86_64-efi.rmk: Likewise.
2374 * conf/i386-coreboot.rmk: Likewise.
2375 * conf/i386-ieee1275.rmk: Likewise.
2376 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2377 `util/ieee1275/get_disk_name.c'.
2378 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2379 * util/ieee1275/get_disk_name.c: Remove file.
2380 * util/i386/get_disk_name.c: Remove file.
2381 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2382 "hd%d" for device.map entries, rather than using
2383 grub_util_get_disk_name().
2385 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2387 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2389 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2391 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2393 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2395 (GRUB_TERM_PPAGE): Changed to 0x4900.
2397 2008-09-24 Robert Millan <rmh@aybabtu.com>
2399 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2400 macros (they were i386-pc specific).
2401 * include/grub/sparc64/ieee1275/console.h: Likewise.
2402 * include/grub/efi/console.h: Likewise.
2404 2008-09-22 Bean <bean123ch@gmail.com>
2406 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2407 resident and in attribute list.
2409 * include/grub/ntfs.h (BMP_LEN): Removed.
2411 2008-09-22 Bean <bean123ch@gmail.com>
2413 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2414 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2416 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2417 error occurs, as grub_disk_open will call grub_disk_close, which will
2418 call p->close (scsi).
2420 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2422 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2423 (AC_PREREQ): Bumped to 2.59.
2424 (AC_TRY_COMPILE): Replace obsolete macro with ...
2425 (AC_COMPILE_IFELSE): ... this.
2426 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2427 (AC_LINK_IFELSE): ... this.
2429 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2431 * autogen.sh: Add a call to `gendistlist.sh'.
2433 2008-09-19 Christian Franke <franke@computer.org>
2435 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2436 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2437 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2438 Export __enable_execute_stack() to modules.
2439 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2442 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2444 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2447 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2449 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2450 #include <grub/util/hostdisk.h>.
2452 2008-09-08 Robert Millan <rmh@aybabtu.com>
2454 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2455 segments when their filesz is zero (grub_file_read() interprets
2456 zero-size as "read until EOF", which results in memory corruption).
2457 Use `lowest_segment' rather than 0 for calculating the current
2458 segment load address.
2460 2008-09-08 Robert Millan <rmh@aybabtu.com>
2462 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2463 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2464 clobbered useful information.
2466 2008-09-08 Robert Millan <rmh@aybabtu.com>
2468 * include/grub/util/biosdisk.h: Move to ...
2469 * include/grub/util/hostdisk.h: ... here. Update all users.
2470 * util/biosdisk.c: Move to ...
2471 * util/hostdisk.c: ... here. Update all users.
2473 2008-09-07 Robert Millan <rmh@aybabtu.com>
2475 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2477 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2478 and length can be stored directly in the `mbi->mmap_addr' and
2479 `mbi->mmap_length' struct fields.
2481 2008-09-07 Robert Millan <rmh@aybabtu.com>
2483 * conf/i386.rmk: New file. Provides declaration for building
2485 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2486 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2488 Include `conf/i386.mk'.
2489 * conf/i386-efi.rmk: Likewise.
2490 * conf/x86_64-efi.rmk: Likewise.
2491 * conf/i386-coreboot.rmk: Likewise.
2492 * conf/i386-ieee1275.rmk: Likewise.
2494 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2496 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2497 Adds optimization support for BGR based modes.
2499 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2500 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2501 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2502 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2503 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2504 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2505 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2506 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2507 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2508 (grub_video_i386_vbeblit_index_index): Likewise.
2509 (grub_video_i386_vbeblit_replace_directN): Added.
2510 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2511 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2512 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2513 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2514 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2515 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2516 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2517 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2518 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2519 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2520 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2521 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2522 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2524 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2525 (grub_video_i386_vbefill_R8G8B8): Likewise.
2526 (grub_video_i386_vbefill_index): Likewise.
2527 (grub_video_i386_vbefill_direct32): Added.
2528 (grub_video_i386_vbefill_direct24): Likewise.
2529 (grub_video_i386_vbefill_direct16): Likewise.
2530 (grub_video_i386_vbefill_direct8): Likewise.
2532 * include/grub/video.h (grub_video_blit_format): Removed
2533 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2534 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2535 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2536 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2537 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2539 * video/video.c (grub_video_get_blit_format): Updated to use new
2540 blit formats. Added handling for 16 bit color modes.
2542 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2544 (common_blitter): Updated to use new blitters.
2546 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2548 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2549 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2550 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2551 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2552 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2553 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2554 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2555 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2556 (grub_video_i386_vbeblit_index_index): Likewise.
2557 (grub_video_i386_vbeblit_replace_directN): Added.
2558 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2559 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2560 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2561 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2562 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2563 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2564 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2565 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2566 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2567 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2568 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2569 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2570 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2572 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2573 (grub_video_i386_vbefill_R8G8B8): Likewise.
2574 (grub_video_i386_vbefill_index): Likewise.
2575 (grub_video_i386_vbefill_direct32): Added.
2576 (grub_video_i386_vbefill_direct24): Likewise.
2577 (grub_video_i386_vbefill_direct16): Likewise.
2578 (grub_video_i386_vbefill_direct8): Likewise.
2580 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2583 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2586 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2589 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2592 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2594 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2597 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2599 * fs/iso9660.c (grub_iso9660_date): New structure.
2600 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2601 (grub_iso9660_uuid): New function.
2603 2008-09-05 Bean <bean123ch@gmail.com>
2605 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2607 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2608 insensitive bit for names in Win32 and Win32 & DOS namespace.
2610 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2612 * include/grub/types.h (LONG_MAX): Likewise.
2614 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2616 * util/getroot.c: Include <config.h>.
2617 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2618 add support for /dev/md/N devices and handle LVM double dash escaping.
2620 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2622 * config.guess: Update to latest version from config git.
2623 * config.sub: Likewise.
2625 2008-09-03 Robert Millan <rmh@aybabtu.com>
2627 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2628 `disk->total_sectors'.
2630 2008-09-01 Colin D Bennett <colin@gibibit.com>
2632 * include/grub/normal.h: Fixed incorrect comment for
2633 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2635 2008-09-01 Colin D Bennett <colin@gibibit.com>
2637 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2638 values with defines.
2640 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2641 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2642 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2643 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2644 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2645 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2646 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2647 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2648 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2649 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2650 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2651 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2652 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2653 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2654 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2655 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2656 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2657 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2658 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2660 2008-08-31 Robert Millan <rmh@aybabtu.com>
2662 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2664 (grub_multiboot): Fix a few warnings.
2666 2008-08-31 Robert Millan <rmh@aybabtu.com>
2668 * loader/i386/pc/multiboot.c: Update comment not to say that
2669 boot_device support is unimplemented.
2671 2008-08-31 Robert Millan <rmh@aybabtu.com>
2673 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2674 or memory map support are unimplemented.
2676 2008-08-31 Colin D Bennett <colin@gibibit.com>
2678 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2680 2008-08-31 Colin D Bennett <colin@gibibit.com>
2682 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2683 total video memory in 'vbeinfo' output; show color format details for
2686 2008-08-30 Pavel Roskin <proski@gnu.org>
2688 * util/genmoddep.c: Remove for real this time.
2689 * DISTLIST: Remove util/genmoddep.c.
2691 2008-08-30 Robert Millan <rmh@aybabtu.com>
2693 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2694 as required by Multiboot spec (it was already 4-byte aligned, but
2697 2008-08-29 Pavel Roskin <proski@gnu.org>
2699 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2700 * kern/powerpc/ieee1275/startup.S: ... this.
2701 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2702 * DISTLIST: Likewise.
2704 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2705 grub/cpu/kernel.h. Add start label for consistency with other
2706 platforms. Add grub_prefix immediately after start. Add jump
2707 to the code after grub_prefix.
2708 * include/grub/powerpc/kernel.h: Provide valid values for
2709 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2711 2008-08-29 Bean <bean123ch@gmail.com>
2713 * configure.ac: Change host_os to cygwin for mingw.
2714 (asprintf): New check for function.
2716 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2717 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2719 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2720 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2721 sync, sleep and grub_util_get_disk_size for mingw.
2723 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2724 to get size in mingw.
2725 (open_device): Use flag O_BINARY if it's defined.
2726 (find_root_device): Add dummy code for mingw.
2728 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2729 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2730 (get_scsi_disk_name): Return 0 for mingw.
2732 * util/hostfs.c: #include <grub/util/misc.h>.
2733 (grub_hostfs_open): Use "rb" flag to open file, use
2734 grub_util_get_disk_size to get disk size for mingw.
2736 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2737 (asprintf): New function if HAVE_ASPRINTF is not set.
2738 (sync): New function for mingw.
2740 (grub_util_get_disk_size): Likewise.
2742 2008-08-28 Pavel Roskin <proski@gnu.org>
2744 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2747 2008-08-28 Robert Millan <rmh@aybabtu.com>
2749 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2751 2008-08-28 Robert Millan <rmh@aybabtu.com>
2753 Change find_grub_drive() syntax so it doesn't prevent it from
2754 detecting NULL names as errors.
2756 * util/biosdisk.c (find_grub_drive): Move free slot search code
2758 (find_free_slot): ... to here.
2759 (read_device_map): Use find_free_slot() to search for free slots.
2761 2008-08-27 Marco Gerards <marco@gnu.org>
2763 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2764 (scsi_mod_SOURCES): New variable.
2765 (scsi_mod_CFLAGS): Likewise
2766 (scsi_mod_LDFLAGS): Likewise.
2768 * disk/scsi.c: New file.
2770 * include/grub/scsi.h: Likewise.
2772 * include/grub/scsicmd.h: Likewise.
2774 * disk/ata.c: Include <grub/scsi.h>.
2775 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2777 (grub_ata_iterate): Skip ATAPI devices.
2778 (grub_ata_open): Only handle ATAPI devices.
2779 (struct grub_atapi_read): Removed.
2780 (grub_atapi_readsector): Likewise.
2781 (grub_ata_read): No longer handle ATAPI devices.
2782 (grub_ata_write): Likewise.
2783 (grub_atapi_iterate): New function.
2784 (grub_atapi_read): Likewise.
2785 (grub_atapi_write): Likewise.
2786 (grub_atapi_open): Likewise.
2787 (grub_atapi_close): Likewise.
2788 (grub_atapi_dev): New variable.
2789 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2790 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2792 * include/grub/disk.h (enum grub_disk_dev_id): Add
2793 `GRUB_DISK_DEVICE_SCSI_ID'.
2795 2008-08-26 Robert Millan <rmh@aybabtu.com>
2797 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2798 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2801 2008-08-23 Bean <bean123ch@gmail.com>
2803 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2804 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2805 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2806 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2808 (raid5rec_mod_SOURCES): New macro.
2809 (raid5rec_mod_CFLAGS): Likewise.
2810 (raid5rec_mod_LDFLAGS): Likewise.
2811 (raid6rec_mod_SOURCES): Likewise.
2812 (raid6rec_mod_CFLAGS): Likewise.
2813 (raid6rec_mod_LDFLAGS): Likewise.
2814 (mdraid_mod_SOURCES): Likewise.
2815 (mdraid_mod_CFLAGS): Likewise.
2816 (mdraid_mod_LDFLAGS): Likewise.
2817 (dm_nv_mod_SOURCES): Likewise.
2818 (dm_nv_mod_CFLAGS): Likewise.
2819 (dm_nv_mod_LDFLAGS): Likewise.
2821 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2822 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2823 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2825 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2826 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2828 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2830 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2832 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2836 * disk/raid5_recover.c: New file.
2838 * disk/raid6_recover.c: Likewise.
2840 * disk/mdraid_linux.c: Likewise.
2842 * disk/dmraid_nvidia.c: Likewise.
2844 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2847 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2848 calculate the size of raid device.
2849 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2850 different layout of raid5.
2851 (grub_raid_scan_device): Remove code specific to mdraid.
2852 (grub_raid_list): New variable.
2853 (free_array): New function.
2854 (grub_raid_register): Likewise.
2855 (grub_raid_unregister): Likewise.
2856 (grub_raid_rescan): Likewise.
2857 (GRUB_MOD_INIT): Don't iterate device here.
2858 (GRUB_MOD_FINI): Use free_array to release resource.
2860 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2861 (grub_raid5_recover_func_t): New function variable type.
2862 (grub_raid6_recover_func_t): Likewise.
2863 (grub_raid5_recover_func): New variable.
2864 (grub_raid6_recover_func): Likewise.
2865 (grub_raid_register): New function.
2866 (grub_raid_unregister): Likewise.
2867 (grub_raid_rescan): Likewise.
2868 (grub_raid_block_xor): Likewise.
2870 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2871 (CMD_CRC): New macro.
2873 (read_file): Handle device as well as file.
2874 (cmd_crc): New function.
2875 (fstest): Handle multiple disks.
2876 (options): Remove part, raw and long, add root and diskcount.
2877 (usage): Add crc, remove -p, -r, -l, add -r and -c.
2878 (main): Find the first non option entry and ignore subsequent options,
2879 add handling for the new options, support multiple disks.
2881 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2883 2008-08-23 Bean <bean123ch@gmail.com>
2885 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2887 * genfslist.sh: Ignore kernel.mod.
2889 * genpartmaplist.sh: Likewise.
2891 2008-08-23 Robert Millan <rmh@aybabtu.com>
2893 * util/getroot.c (find_root_device): Skip anything that starts with
2894 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2896 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
2898 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2899 * util/grub.d/00_header.in: Allow the administrator to change default
2900 gfxmode via ${GRUB_GFXMODE}.
2902 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
2904 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2906 2008-08-21 Robert Millan <rmh@aybabtu.com>
2908 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2910 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2911 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2913 2008-08-20 Carles Pina i Estany <carles@pina.cat>
2915 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2916 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2918 2008-08-19 Robert Millan <rmh@aybabtu.com>
2920 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2921 (struct grub_virtual_screen): Remove `cursor_color'.
2922 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2924 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2926 2008-08-18 Robert Millan <rmh@aybabtu.com>
2928 Unify (identical) linux_normal.c files.
2929 * loader/i386/efi/linux_normal.c: Move from here ...
2930 * loader/linux_normal.c: ... to here. Update all users.
2931 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2932 * loader/i386/ieee1275/linux_normal.c: Likewise.
2934 2008-08-18 Robert Millan <rmh@aybabtu.com>
2936 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2937 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2938 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2939 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2940 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2942 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2943 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2944 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2945 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2946 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2947 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2948 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2949 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2950 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2951 portably using grub_getxy().
2952 Replace `-EFI' with `-bzImage' in boot message.
2954 2008-08-17 Robert Millan <rmh@aybabtu.com>
2956 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2958 2008-08-17 Robert Millan <rmh@aybabtu.com>
2960 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2962 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2963 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2964 (grub_machine_mmap_iterate): New function declaration.
2965 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2967 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2970 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2971 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2972 Move e820 parsing from here ...
2973 * kern/i386/pc/mmap.c: New file.
2974 (grub_machine_mmap_iterate): ... to here.
2976 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2977 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2978 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2979 (grub_available_iterate): Redeclare to return `void', and redeclare
2980 its hook to use grub_uint64_t as addr and size parameters, and rename
2982 (grub_machine_mmap_iterate): ... this. Update all users.
2984 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2985 to make it more readable. Rename to ...
2986 (grub_machine_mmap_iterate): ... this.
2988 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2989 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2990 (grub_multiboot): Allocate an extra region after the payload, and fill
2991 it with a Multiboot memory map. Adjust a.out loader to calculate size
2992 with the extra space.
2993 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2994 with the extra space.
2996 2008-08-17 Carles Pina i Estany <carles@pina.cat>
2998 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
3000 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
3002 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3003 mdate-sh to the list `find' searches for.
3004 * DISTLIST: Regenerated.
3006 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
3008 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3009 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
3010 genmoddep.awk, gensymlist.sh.in.
3011 (DISTDIRS): Add bus, docs, hook, lib.
3012 * DISTLIST: Regenerated.
3013 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
3015 2008-08-16 Robert Millan <rmh@aybabtu.com>
3017 * disk/raid.c (grub_raid_init): Handle/report errors set by
3018 grub_device_iterate().
3019 * disk/lvm.c (grub_lvm_init): Likewise.
3021 2008-08-15 Bean <bean123ch@gmail.com>
3023 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3025 (datetime_mod_SOURCES): New macro.
3026 (datetime_mod_CFLAGS): Likewise.
3027 (datetime_mod_LDFLAGS): Likewise.
3028 (date_mod_SOURCES): Likewise.
3029 (date_mod_CFLAGS): Likewise.
3030 (date_mod_LDFLAGS): Likewise.
3031 (datehook_mod_SOURCES): Likewise.
3032 (datehook_mod_CFLAGS): Likewise.
3033 (datehook_mod_LDFLAGS): Likewise.
3035 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3037 (datetime_mod_SOURCES): New macro.
3038 (datetime_mod_CFLAGS): Likewise.
3039 (datetime_mod_LDFLAGS): Likewise.
3040 (date_mod_SOURCES): Likewise.
3041 (date_mod_CFLAGS): Likewise.
3042 (date_mod_LDFLAGS): Likewise.
3043 (datehook_mod_SOURCES): Likewise.
3044 (datehook_mod_CFLAGS): Likewise.
3045 (datehook_mod_LDFLAGS): Likewise.
3047 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3049 (datetime_mod_SOURCES): New macro.
3050 (datetime_mod_CFLAGS): Likewise.
3051 (datetime_mod_LDFLAGS): Likewise.
3052 (date_mod_SOURCES): Likewise.
3053 (date_mod_CFLAGS): Likewise.
3054 (date_mod_LDFLAGS): Likewise.
3055 (datehook_mod_SOURCES): Likewise.
3056 (datehook_mod_CFLAGS): Likewise.
3057 (datehook_mod_LDFLAGS): Likewise.
3059 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3061 (datetime_mod_SOURCES): New macro.
3062 (datetime_mod_CFLAGS): Likewise.
3063 (datetime_mod_LDFLAGS): Likewise.
3064 (date_mod_SOURCES): Likewise.
3065 (date_mod_CFLAGS): Likewise.
3066 (date_mod_LDFLAGS): Likewise.
3067 (datehook_mod_SOURCES): Likewise.
3068 (datehook_mod_CFLAGS): Likewise.
3069 (datehook_mod_LDFLAGS): Likewise.
3071 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3073 (datetime_mod_SOURCES): New macro.
3074 (datetime_mod_CFLAGS): Likewise.
3075 (datetime_mod_LDFLAGS): Likewise.
3076 (date_mod_SOURCES): Likewise.
3077 (date_mod_CFLAGS): Likewise.
3078 (date_mod_LDFLAGS): Likewise.
3079 (datehook_mod_SOURCES): Likewise.
3080 (datehook_mod_CFLAGS): Likewise.
3081 (datehook_mod_LDFLAGS): Likewise.
3083 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3085 * commands/date.c: New file.
3087 * hook/datehook.c: Likewise.
3089 * include/grub/lib/datetime.h: Likewise.
3091 * include/grub/i386/cmos.h: Likewise.
3093 * lib/datetime.c: Likewise.
3095 * lib/i386/datetime.c: Likewise.
3097 * lib/efi/datetime.c: Likewise.
3099 2008-08-14 Robert Millan <rmh@aybabtu.com>
3101 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3102 (grub_mkelfimage_SOURCES): New variable.
3103 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3105 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3106 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3107 * conf/powerpc-ieee1275.rmk: Likewise.
3108 * conf/i386-ieee1275.rmk: Likewise.
3110 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3111 * kern/i386/coreboot/init.c: Likewise.
3113 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3114 with `<grub/cpu/kernel.h>'.
3115 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3117 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3118 * kern/i386/coreboot/startup.S: Likewise.
3120 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3121 (GRUB_MOD_GAP): Remove.
3122 * include/grub/powerpc/kernel.h: New file.
3123 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3124 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3125 * include/grub/i386/kernel.h: New file.
3126 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3127 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3128 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3130 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3132 Use --directory when invoking grub_mkimage.
3134 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3135 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3136 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3137 and GRUB_KERNEL_CPU_PREFIX.
3139 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
3141 * include/grub/err.h (grub_err_printf): New function prototype.
3142 * util/misc.c (grub_err_printf): New function.
3143 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3145 * kern/err.c (grub_print_error): Use grub_err_printf.
3147 2008-08-13 Robert Millan <rmh@aybabtu.com>
3149 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3151 2008-08-13 Robert Millan <rmh@aybabtu.com>
3153 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3156 2008-08-12 Robert Millan <rmh@aybabtu.com>
3158 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3159 of the relocation code from here ...
3160 (grub_multiboot): ... to here.
3161 (forward_relocator, backward_relocator): Move from here ...
3162 * kern/i386/loader.S (grub_multiboot_forward_relocator)
3163 (grub_multiboot_backward_relocator): ... to here.
3164 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
3165 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
3166 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3167 (grub_multiboot_forward_relocator_end)
3168 (grub_multiboot_backward_relocator)
3169 (grub_multiboot_backward_relocator_end): New variables.
3171 2008-08-12 Bean <bean123ch@gmail.com>
3173 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3175 2008-08-11 Robert Millan <rmh@aybabtu.com>
3177 * kern/i386/linuxbios/startup.S: Move from here ...
3178 * kern/i386/coreboot/startup.S: ... to here.
3180 * kern/i386/linuxbios/init.c: Move from here ...
3181 * kern/i386/coreboot/init.c: ... to here.
3183 * kern/i386/linuxbios/table.c: Move from here ...
3184 * kern/i386/coreboot/mmap.c: ... to here.
3186 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3188 2008-08-11 Robert Millan <rmh@aybabtu.com>
3190 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3191 errors. Leave it to the upper layer to handle them.
3193 2008-08-09 Christian Franke <franke@computer.org>
3195 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
3196 * conf/common.rmk: Install `grub-pe2elf' only if requested.
3197 Install `grub.d/10_windows' only on Cygwin.
3198 * configure.ac: Add subst of `target_os'.
3199 Check `target_os' also before setting TARGET_OBJ2ELF.
3200 Add `--enable-grub-pe2elf'.
3202 2008-08-08 Robert Millan <rmh@aybabtu.com>
3204 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3205 (grub_last_time): Change type to grub_uint64_t.
3206 (grub_disk_open): Migrate code from to using grub_get_time_ms().
3207 (grub_disk_close): Likewise.
3209 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3210 (run_menu): Migrate code from to using grub_get_time_ms().
3212 * util/misc.c (grub_get_time_ms): New function.
3214 2008-08-08 Marco Gerards <marco@gnu.org>
3216 * disk/ata.c (grub_ata_regget): Change return type to
3218 (grub_ata_regget2): Likewise.
3219 (grub_ata_wait_status): New function.
3220 (grub_ata_wait_busy): Removed function, updated all users to use
3221 `grub_ata_wait_status'.
3222 (grub_ata_wait_drq): Likewise.
3223 (grub_ata_cmd): New function.
3224 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
3226 (grub_ata_pio_write): Add error handling.
3227 (grub_atapi_identify): Likewise.
3228 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
3230 (grub_ata_identify): Use `grub_ata_cmd' and improve error
3231 handling. Actually use the detected registers. Reorder the
3232 detection logic such that it is easier to read.
3233 (grub_ata_pciinit): Do not assign the same ID to each controller.
3234 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
3236 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
3238 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
3240 2008-08-08 Marco Gerards <marco@gnu.org>
3244 2008-08-07 Bean <bean123ch@gmail.com>
3246 * include/grub/x86_64/pci.h: New file.
3248 2008-08-07 Christian Franke <franke@computer.org>
3250 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3251 (TIMER2_GATE): Likewise.
3252 (grub_pit_wait): Add enable/disable of the timer2 gate
3253 bit of port 0x61. This fixes a possible infinite loop.
3255 2008-08-07 Bean <bean123ch@gmail.com>
3257 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3258 kern/i386/tsc.c and kern/i386/pit.c.
3260 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3263 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3266 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3268 2008-08-07 Bean <bean123ch@gmail.com>
3270 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3272 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3274 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3275 multiple inclusion. Add #include <grub/types.h>.
3277 2008-08-06 Christian Franke <franke@computer.org>
3279 * conf/common.rmk: Build and install `10_windows'.
3280 * util/grub.d/10_windows.in: New script.
3282 2008-08-06 Pavel Roskin <proski@gnu.org>
3284 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3286 2008-08-06 Robert Millan <rmh@aybabtu.com>
3288 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3289 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3291 2008-08-06 Bean <bean123ch@gmail.com>
3293 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3294 (grub_pxefs_fs_int): Remove dummy definition.
3295 (grub_pxefs_open): Use data->block_size to store the current block
3297 (grub_pxefs_read): Use block size stored in data->block_size. As the
3298 value of grub_pxe_blksize can be changed after the file is opened.
3300 2008-08-06 Bean <bean123ch@gmail.com>
3302 * fs/i386/pc/pxe.c (curr_file): new variable.
3303 (grub_pxefs_open): Simply the handling of pxe file system. Don't
3304 require the dummy internal file system anymore.
3305 (grub_pxefs_read): Removed.
3306 (grub_pxefs_close): Likewise.
3307 (grub_pxefs_fs_int): Likewise.
3308 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3309 connection when we switch file.
3310 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3312 2008-08-06 Robert Millan <rmh@aybabtu.com>
3314 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3316 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3317 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3319 * kern/i386/halt.c: New file.
3320 * kern/i386/reboot.c: Likewise.
3321 * include/grub/i386/reboot.h: Likewise.
3322 * include/grub/i386/halt.h: Likewise.
3324 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3325 Include `<grub/cpu/halt.h>'.
3326 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3327 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3329 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3330 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3331 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3332 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3333 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3334 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3336 * include/grub/i386/at_keyboard.h: ... to here.
3338 2008-08-05 Robert Millan <rmh@aybabtu.com>
3340 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3341 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3342 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3343 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3344 `kern/generic/millisleep.c'.
3346 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3347 instead of grub_get_rtc().
3348 (grub_tsc_init): Initialize `tsc_boot_time'.
3350 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3351 (grub_machine_init): Use grub_tsc_init() rather than
3352 installing an RTC-based handler via grub_install_get_time_ms().
3354 * kern/i386/pit.c: New file.
3355 * include/grub/i386/pit.h: Likewise.
3357 2008-08-05 Bean <bean123ch@gmail.com>
3359 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3361 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3362 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3363 (pxe_mod_SOURCES): New macro.
3364 (pxe_mod_CFLAGS): Likewise.
3365 (pxe_mod_LDFLAGS): Likewise.
3366 (pxecmd_mod_SOURCES): Likewise.
3367 (pxecmd_mod_CFLAGS): Likewise.
3368 (pxecmd_mod_LDFLAGS): Likewise.
3370 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3371 (grub_pxe_call): Likewise.
3373 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3375 * commands/i386/pc/pxecmd.c: New file.
3377 * fs/i386/pc/pxe.c: Likewise.
3379 * include/grub/i386/pc/pxe.h: Likewise.
3381 2008-08-05 Bean <bean123ch@gmail.com>
3383 * util/console.c (grub_console_cur_color): New variable.
3384 (grub_console_standard_color): Likewise.
3385 (grub_console_normal_color): Likewise.
3386 (grub_console_highlight_color): Likewise.
3387 (color_map): Likewise.
3388 (use_color): Likewise.
3389 (NUM_COLORS): New macro.
3390 (grub_ncurses_setcolorstate): Handle color properly.
3391 (grub_ncurses_setcolor): Don't change color here, just remember the
3392 settings, color will be set in grub_ncurses_setcolorstate.
3393 (grub_ncurses_getcolor): New function.
3394 (grub_ncurses_init): Initialize color pairs.
3395 (grub_ncurses_term): New member grub_ncurses_getcolor.
3397 2008-08-05 Colin D Bennett <colin@gibibit.com>
3399 High resolution timer support. Implemented for x86 CPUs using TSC.
3400 Extracted generic grub_millisleep() so it's linked in only as needed.
3401 This requires a Pentium compatible CPU; if the RDTSC instruction is
3402 not supported, then it falls back on the generic grub_get_time_ms()
3403 implementation that uses the machine's RTC.
3405 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3406 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3407 `kern/generic/millisleep.c'.
3409 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3410 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3412 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3413 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3415 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3417 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3418 `kern/generic/millisleep.c'.
3420 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3422 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3424 * kern/generic/rtc_get_time_ms.c: New file.
3426 * kern/generic/millisleep.c: New file.
3428 * kern/misc.c: Don't include
3429 <kern/time.h> anymore.
3430 (grub_millisleep_generic): Removed.
3432 * commands/sleep.c (grub_interruptible_millisleep): Uses
3433 grub_get_time_ms() instead of grub_get_rtc().
3435 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3437 (grub_cpu_is_cpuid_supported): New inline function.
3438 (grub_cpu_is_tsc_supported): New inline function.
3439 (grub_tsc_init): New function prototype.
3440 (grub_tsc_get_time_ms): New function prototype.
3442 * kern/i386/tsc.c (grub_get_time_ms): New file.
3444 * include/grub/time.h: Include <grub/types.h.
3445 (grub_millisleep_generic): Removed.
3446 (grub_get_time_ms): New prototype.
3447 (grub_install_get_time_ms): New prototype.
3448 (grub_rtc_get_time_ms): New prototype.
3450 * kern/time.c (grub_get_time_ms): New function.
3451 (grub_install_get_time_ms): New function.
3453 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3454 <grub/time.h> anymore.
3455 (grub_millisleep): Removed.
3456 (grub_machine_init): Call grub_tsc_init.
3458 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3459 get_time_ms() implementation.
3461 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3462 (ieee1275_get_time_ms): New function.
3463 (grub_machine_init): Install get_time_ms() implementation.
3465 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3466 (grub_machine_init): Call grub_tsc_init().
3467 (grub_millisleep): Removed.
3469 * kern/ieee1275/init.c (grub_millisleep): Removed.
3470 (grub_machine_init): Install ieee1275_get_time_ms()
3472 (ieee1275_get_time_ms): New function.
3473 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3476 2008-08-05 Marco Gerards <marco@gnu.org>
3478 * disk/ata.c: Include <grub/pci.h>.
3479 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3480 (grub_ata_initialize): Rewritten.
3481 (grub_ata_device_initialize): New function.
3483 2008-08-04 Pavel Roskin <proski@gnu.org>
3485 * kern/main.c: Include grub/mm.h.
3487 2008-08-04 Robert Millan <rmh@aybabtu.com>
3489 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3490 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3491 corruption problem).
3493 2008-08-04 Robert Millan <rmh@aybabtu.com>
3495 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3496 warnings introduced in my last commit.
3498 2008-08-03 Robert Millan <rmh@aybabtu.com>
3500 Make PCI available on all i386 architectures.
3502 * include/grub/i386/pc/pci.h: Move from here ...
3503 * include/grub/i386/pci.h: ... to here.
3505 * include/grub/i386/pc/pci.h: Remove.
3506 * include/grub/i386/efi/pci.h: Remove.
3507 * include/grub/x86_64/efi/pci.h: Remove.
3509 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3512 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3513 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3514 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3516 * conf/i386-ieee1275.rmk: Likewise.
3518 2008-08-03 Robert Millan <rmh@aybabtu.com>
3520 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3521 (grub_console_setcursor): Make it possible to set cursor off.
3523 2008-08-03 Robert Millan <rmh@aybabtu.com>
3525 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3526 of modules instead of assuming which platform provides what.
3527 * util/update-grub.in: Likewise.
3529 2008-08-03 Robert Millan <rmh@aybabtu.com>
3531 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3532 instead of `grub_install_dos_part' to determine whether a drive needs
3533 to be prepended to prefix (`grub_install_dos_part' is not reliable,
3534 because it can be overridden when loading GRUB via Multiboot).
3536 2008-08-02 Robert Millan <rmh@aybabtu.com>
3538 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3540 2008-08-02 Robert Millan <rmh@aybabtu.com>
3542 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3543 of informational grub_dprintf() calls.
3545 2008-08-02 Robert Millan <rmh@aybabtu.com>
3547 * disk/memdisk.c (memdisk_size): Don't initialize.
3548 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3550 * include/grub/i386/pc/kernel.h
3551 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3552 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3553 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3554 (grub_arch_memdisk_size): Remove.
3556 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3557 field (was only used to transfer a constant). Add `type' field to
3558 support multiple module types.
3559 (grub_module_iterate): New function.
3561 * kern/device.c (grub_device_open): Do not hide error messages
3562 when grub_disk_open() fails. Use grub_print_error() instead.
3564 * kern/i386/pc/init.c (grub_arch_modules_addr)
3565 (grub_arch_memdisk_size): Remove functions.
3566 (grub_arch_modules_addr): Return the module address in high memory
3567 (now that it isn't copied anymore).
3569 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3570 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3571 decompression routine (grub_total_module_size already includes that
3572 now). Don't copy modules back to low memory.
3574 * kern/main.c: Include `<grub/mm.h>'.
3575 (grub_load_modules): Split out (and use) ...
3576 (grub_module_iterate): ... this function, which iterates through
3577 module objects and runs a hook.
3578 Comment out grub_mm_init_region() call, as it would cause non-ELF
3579 modules to be overwritten.
3581 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3582 the memdisk image in its own region, make it part of the module list.
3583 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3584 (main): Parse --memdisk|-m option, and pass user-provided path as
3585 parameter to generate_image().
3586 (add_segments): Pass `memdisk_path' down to load_modules().
3587 (load_modules): Embed memdisk image in module section when requested.
3588 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3589 `header.type' instead of `header.offset'.
3591 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3592 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3593 (memdisk_mod_LDFLAGS): New variables.
3594 * conf/i386-coreboot.rmk: Likewise.
3595 * conf/i386-ieee1275.rmk: Likewise.
3597 2008-08-02 Robert Millan <rmh@aybabtu.com>
3599 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3600 (backward_relocator): New variables. Used to allocate and relocate
3601 the payload, respectively.
3602 (grub_multiboot_load_elf32): Load into heap instead of requested
3603 address, install the appropriate relocator code in each bound of
3604 the payload, and set the entry point such that
3605 grub_multiboot_real_boot() will jump to one of them.
3607 * kern/i386/loader.S (grub_multiboot_payload_size)
3608 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3609 (grub_multiboot_payload_entry_offset): New variables.
3610 (grub_multiboot_real_boot): Set cpu context to what the relocator
3611 expects, and jump to the relocator instead of the payload.
3613 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3614 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3615 (grub_multiboot_payload_entry_offset): Export.
3617 2008-08-01 Bean <bean123ch@gmail.com>
3619 * normal/menu_entry.c (editor_getline): Don't return the original
3620 string as result, as it will be released by lexer once it has done
3623 2008-08-01 Robert Millan <rmh@aybabtu.com>
3625 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3626 within menuentries, not before them.
3627 util/grub.d/10_hurd.in: Likewise.
3629 2008-08-01 Bean <bean123ch@gmail.com>
3631 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3632 (bufio_mod_SOURCES): New macro.
3633 (bufio_mod_CFLAGS): Likewise.
3634 (bufio_mod_LDFLAGS): Likewise.
3636 * include/grub/bufio.h: New file.
3638 * io/bufio.c: Likewise.
3640 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3641 (grub_video_reader_png): Use grub_buffile_open to open file.
3643 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3644 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3646 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3647 (grub_video_reader_tga): Use grub_buffile_open to open file.
3649 * font/manager.c: Include <grub/bufio.h>.
3650 (add_font): Use grub_buffile_open to open file.
3652 2008-07-31 Robert Millan <rmh@aybabtu.com>
3654 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3655 ELF segments, use a macro for arbitrarily accessing any of them instead
3656 of preparing a pointer that allows access to one at a time.
3657 (grub_multiboot_load_elf64): Likewise.
3659 2008-07-31 Bean <bean123ch@gmail.com>
3661 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3662 GRUB_KERNEL_MACHINE_DATA_END.
3664 2008-07-30 Robert Millan <rmh@aybabtu.com>
3666 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3667 Increase from 0x50 to 0x60.
3668 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3669 use UUIDs to identify the root drive for them. If that's not
3671 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3672 check, for cross-disk installs.
3674 2008-07-30 Robert Millan <rmh@aybabtu.com>
3676 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3677 is non-empty, use it to set the `prefix' environment variable instead
3678 of the usual approach.
3679 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3680 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3681 environment variable instead of dummy make_install_device().
3683 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3684 (start): Insert a data section, with `grub_prefix' variable.
3685 * kern/i386/linuxbios/startup.S: Likewise.
3687 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3688 New variable reference.
3689 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3690 New macro. Defines offset of `grub_prefix' within startup.S (relative
3692 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3693 section within startup.S (relative to `start').
3694 * include/grub/i386/coreboot/kernel.h: Likewise.
3696 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3697 Overwrite grub_prefix with its contents, at the beginning of the
3699 (main): Understand -p|--prefix.
3701 2008-07-30 Robert Millan <rmh@aybabtu.com>
3703 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3705 2008-07-30 Robert Millan <rmh@aybabtu.com>
3707 * term/i386/pc/vga_text.c (grub_console_cls): Use
3708 grub_console_gotoxy() to go back to beginning of the screen.
3709 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3711 2008-07-29 Christian Franke <franke@computer.org>
3713 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3714 Add conversion of emulated mount points on Cygwin.
3716 2008-07-29 Christian Franke <franke@computer.org>
3718 * util/update-grub.in: Add a check for admin
3720 Remove old `grub.cfg.new' before creation.
3721 Add `-f' to `mv' to handle the different filesystem
3722 semantics of Windows.
3724 2008-07-29 Bean <bean123ch@gmail.com>
3726 * normal/main.c (get_line): Fix buffer overflow bug.
3728 2008-07-28 Robert Millan <rmh@aybabtu.com>
3730 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3731 (struct grub_apple_header): New struct. Describes the layout of
3733 (apple_partition_map_iterate): Check the header magic as well as the
3734 partition magic (which was already being checked).
3736 2008-07-28 Pavel Roskin <proski@gnu.org>
3738 * genmk.rb: Add a warning to the beginning of the output that
3739 it's a generated file and should not be edited.
3741 2008-07-28 Robert Millan <rmh@aybabtu.com>
3743 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3744 with the same number are found, just use issue a warning with
3745 grub_dprintf(), as this error has been reported to be non-fatal.
3747 2008-07-27 Robert Millan <rmh@aybabtu.com>
3749 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3752 2008-07-27 Bean <bean123ch@gmail.com>
3754 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3755 (grub_fat_find_dir): Ignore case when comparing filename.
3757 2008-07-27 Bean <bean123ch@gmail.com>
3759 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3760 smallino, as it's more descriptive, and i8count can be confused with
3761 the other field count.
3762 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3765 2008-07-27 Bean <bean123ch@gmail.com>
3767 * commands/crc.c: New file.
3769 * lib/crc.c: Likewise.
3771 * include/grub/lib/crc.h: Likewise.
3773 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3775 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3776 (hexdump): Move this function to ...
3778 * lib/hexdump.c: ... here.
3780 * include/grub/hexdump.h: Renamed to ...
3782 * include/grub/lib/hexdump.h: ... this.
3784 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3786 * util/grub-editenv.c: Likewise.
3788 * include/envblk.h: Renamed to ...
3790 * include/lib/envblk.h: ... this.
3792 * util/envblk.c: Renamed to ...
3794 * lib/envblk.c: ... this.
3796 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3798 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3799 (pkglib_MODULES): Add crc.mod.
3800 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3801 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3802 (crc_mod_SOURCES): New macro.
3803 (crc_mod_CFLAGS): Likewise.
3804 (crc_mod_LDFLAGS): Likewise.
3806 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3808 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3810 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3814 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3816 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
3818 * commands/help.c: Include <grub/term.h>.
3819 (TERM_WIDTH): Removed. Updated all users.
3821 2008-07-27 Pavel Roskin <proski@gnu.org>
3823 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3824 spurious warnings about a comment within a comment.
3826 2008-07-25 Robert Millan <rmh@aybabtu.com>
3828 * util/getroot.c (find_root_device): Skip devices that match
3829 /dev/dm-[0-9]. This lets the real device be found for any type of
3830 abstraction (LVM, EVMS, RAID..).
3831 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3832 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3833 device is found first, find_root_device() will now skip it.
3835 2008-07-24 Pavel Roskin <proski@gnu.org>
3837 * include/grub/types.h: Use __builtin_bswap32() and
3838 __builtin_bswap64() with gcc 4.3 and newer.
3840 2008-07-24 Christian Franke <franke@computer.org>
3842 * util/i386/pc/grub-install.in: If `--debug' is specified,
3843 pass `--verbose' to grub-setup.
3844 Abort script if make_system_path_relative_to_its_root() fails.
3846 2008-07-24 Bean <bean123ch@gmail.com>
3848 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3849 variable `target_platform' should be `platform'.
3851 2008-07-24 Bean <bean123ch@gmail.com>
3853 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
3854 (grub_png_init_fixed_block): New function.
3855 (grub_png_decode_image_data): Handle fixed huffman code compression.
3857 2008-07-24 Bean <bean123ch@gmail.com>
3859 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3860 (grub_pe2elf_SOURCES): New macro.
3861 (CLEANFILES): Add grub-pe2elf.
3863 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3864 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3865 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3866 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3867 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3868 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3869 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3870 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3871 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3872 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3873 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3874 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3875 (GRUB_PE32_DT_FUNCTION): Likewise.
3876 (GRUB_PE32_REL_I386_DIR32): Likewise.
3877 (GRUB_PE32_REL_I386_REL32): Likewise.
3878 (grub_pe32_symbol): New structure.
3879 (grub_pe32_reloc): Likewise.
3881 * util/grub-pe2elf.c: New file.
3883 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3884 start symbol in non pc platform.
3886 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3888 The following patches are from Christian Franke.
3890 * include/grub/dl.h: Remove .previous, gas supports this only
3893 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3894 Remove .type, gas supports this only for ELF format.
3896 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3897 nullbytes in symbol table. This fixes an infinite loop if table is
3900 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3901 TARGET_IMG_LDFLAGS and EXEEXT.
3903 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3904 TARGET_IMG_LDFLAGS_AC.
3905 (grub_CHECK_STACK_ARG_PROBE): New function.
3907 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3909 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3911 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3912 to set TARGET_IMG_LD* accordingly.
3913 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3914 Add call to grub_CHECK_STACK_ARG_PROBE.
3915 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3917 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3919 * genmk.rb: Add EXEEXT to CLEANFILES.
3921 2008-07-23 Robert Millan <rmh@aybabtu.com>
3923 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3924 define the codes for arrows and lines used for the menu).
3925 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3928 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3929 fonts, because the latter are too slow.
3931 2008-07-21 Bean <bean123ch@gmail.com>
3933 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3934 a20. Run keyboard test last, as it will cause macbook to halt.
3936 2008-07-18 Pavel Roskin <proski@gnu.org>
3938 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3939 load foreign architecture modules correctly anyway. Keep
3940 support for loading host architecture modules, whether we
3941 compile them or not.
3943 2008-07-17 Pavel Roskin <proski@gnu.org>
3945 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3946 change target_cpu. The compiler default can mismatch target_cpu
3949 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3950 * kern/efi/efi.c: Likewise.
3952 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3953 target compiler is functional.
3954 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3957 * configure.ac: Default to efi platform for x86_64-apple. Allow
3958 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3959 adjustments from the rest, only do them if target is not
3960 explicitly given. Merge other adjustments with the final sanity
3961 check. Remove an extraneous check for supported CPU. Be
3962 specific which CPU and which platform is not supported.
3964 * configure.ac: Default to pc platform for x86_64.
3966 2008-07-17 Robert Millan <rmh@aybabtu.com>
3968 Partial LinuxBIOS -> Coreboot rename.
3970 * conf/i386-linuxbios.rmk: Renamed to ...
3971 * conf/i386-coreboot.rmk: ... this.
3972 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3973 * configure.ac: Accept "coreboot" as input platform (but maintain
3974 compatibility with "linuxbios").
3975 * include/grub/i386/linuxbios: Renamed to ...
3976 * include/grub/i386/coreboot: ... this.
3978 2008-07-17 Bean <bean123ch@gmail.com>
3980 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
3981 (appleldr_mod_SOURCE): New variable.
3982 (appleldr_mod_CFLAGS): Likewise.
3983 (appleldr_mod_LDFLAGS): Likewise.
3984 (pci_mod_SOURCES): Likewise.
3985 (pci_mod_CFLAGS): Likewise.
3986 (pci_mod_LDFLAGS): Likewise.
3987 (lspci_mod_SOURCES): Likewise.
3988 (lspci_mod_CFLAGS): Likewise.
3989 (lspci_mod_LDFLAGS): Likewise.
3991 * conf/x86_64-efi.rmk: New file.
3993 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3995 (grub_efidisk_write): Likewise.
3997 * include/efi/api.h (efi_call_0): New macro.
3998 (efi_call_1): Likewise.
3999 (efi_call_2): Likewise.
4000 (efi_call_3): Likewise.
4001 (efi_call_4): Likewise.
4002 (efi_call_5): Likewise.
4003 (efi_call_6): Likewise.
4005 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4006 grub_rescue_cmd_chainloader.
4008 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4009 (grub_pe32_optional_header): Change some fields based on i386 or
4011 (GRUB_PE32_PE32_MAGIC): Likewise.
4013 * include/grub/efi/uga_draw.h: New file.
4015 * include/grub/elf.h (STN_ABS): New constant.
4016 (R_X86_64_NONE): Relocation constant for x86_64.
4017 (R_X86_64_64): Likewise.
4018 (R_X86_64_PC32): Likewise.
4019 (R_X86_64_GOT32): Likewise.
4020 (R_X86_64_PLT32): Likewise.
4021 (R_X86_64_COPY): Likewise.
4022 (R_X86_64_GLOB_DAT): Likewise.
4023 (R_X86_64_JUMP_SLOT): Likewise.
4024 (R_X86_64_RELATIVE): Likewise.
4025 (R_X86_64_GOTPCREL): Likewise.
4026 (R_X86_64_32): Likewise.
4027 (R_X86_64_32S): Likewise.
4028 (R_X86_64_16): Likewise.
4029 (R_X86_64_PC16): Likewise.
4030 (R_X86_64_8): Likewise.
4031 (R_X86_64_PC8): Likewise.
4033 * include/grub/i386/efi/pci.h: New file.
4035 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4036 Change it value based on platform.
4037 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4038 (GRUB_E820_RAM): Likewise.
4039 (GRUB_E820_RESERVED): Likewise.
4040 (GRUB_E820_ACPI): Likewise.
4041 (GRUB_E820_NVS): Likewise.
4042 (GRUB_E820_EXEC_CODE): Likewise.
4043 (GRUB_E820_MAX_ENTRY): Likewise.
4044 (grub_e820_mmap): New structure.
4045 (linux_kernel_header): Change the efi field according to different
4046 kernel version, also field from linux_kernel_header.
4048 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4050 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4051 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4052 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4053 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4054 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4055 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4056 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4057 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4058 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4059 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4061 * include/grub/x86_64/efi/kernel.h: New file.
4063 * include/grub/x86_64/efi/loader.h: Likewise.
4065 * include/grub/x86_64/efi/machine.h: Likewise.
4067 * include/grub/x86_64/efi/pci.h: Likewise.
4069 * include/grub/x86_64/efi/time.h: Likewise.
4071 * include/grub/x86_64/linux.h: Likewise.
4073 * include/grub/x86_64/setjmp.h: Likewise.
4075 * include/grub/x86_64/time.h: Likewise.
4077 * include/grub/x86_64/types.h: Likewise.
4079 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4080 GRUB_TARGET_SIZEOF_VOID_P.
4082 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4083 (grub_efi_locate_handle): Likewise.
4084 (grub_efi_open_protocol): Likewise.
4085 (grub_efi_set_text_mode): Likewise.
4086 (grub_efi_stall): Likewise.
4087 (grub_exit): Likewise.
4088 (grub_reboot): Likewise.
4089 (grub_halt): Likewise.
4090 (grub_efi_exit_boot_services): Likewise.
4091 (grub_get_rtc): Likewise.
4093 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4094 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4095 (grub_efi_allocate_pages): Wrap efi calls.
4096 (grub_efi_free_pages): Wrap efi calls.
4097 (grub_efi_get_memory_map): Wrap efi calls.
4099 * kern/x86_64/dl.c: New file.
4101 * kern/x86_64/efi/callwrap.S: Likewise.
4103 * kern/x86_64/efi/startup.S: Likewise.
4105 * loader/efi/appleloader.c: Likewise.
4107 * loader/efi/chainloader.c (cmdline): New variable.
4108 (grub_chainloader_unload): Wrap efi calls.
4109 (grub_chainloader_boot): Likewise.
4110 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4113 * loader/efi/chainloader_normal.c (chainloader_command):
4114 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4117 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4119 (grub_e820_add_region): New function.
4120 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4122 (grub_find_video_card): New function.
4123 (grub_linux_setup_video): New function.
4124 (grub_rescue_cmd_linux): Probe for video information.
4126 * normal/x86_64/setjmp.S: New file.
4128 * term/efi/console.c (map_char): New function.
4129 (grub_console_putchar): Map unicode char.
4130 (grub_console_checkkey): Wrap efi calls.
4131 (grub_console_getkey): Likewise.
4132 (grub_console_getwh): Likewise.
4133 (grub_console_gotoxy): Likewise.
4134 (grub_console_cls): Likewise.
4135 (grub_console_setcolorstate): Likewise.
4136 (grub_console_setcursor): Likewise.
4138 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4140 2008-07-16 Pavel Roskin <proski@gnu.org>
4142 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4145 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4146 pointer, not an integer. This fixes a warning and prevents
4147 precision loss on 64-bit systems.
4148 (relocate_addresses): Remove unneeded cast.
4150 2008-07-15 Pavel Roskin <proski@gnu.org>
4152 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4154 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4156 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4157 Fix comparison between signed and unsigned.
4159 * include/grub/i386/ieee1275/console.h: Declare
4160 grub_console_init() and grub_console_fini().
4162 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4163 It's empty and unused.
4165 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4166 beginning to avoid warnings with some compilers.
4168 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4169 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4171 2008-07-14 Pavel Roskin <proski@gnu.org>
4173 * kern/env.c (grub_register_variable_hook): Don't copy empty
4174 string, it leaks memory. Pass "" to grub_env_set(), it should
4175 handle constant strings.
4177 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4178 * commands/cmp.c (grub_cmd_cmp): Likewise.
4179 * kern/dl.c (grub_dl_flush_cache): Likewise.
4180 (grub_dl_load_core): Likewise.
4181 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4182 (grub_elf64_load_phdrs): Likewise.
4184 2008-07-13 Pavel Roskin <proski@gnu.org>
4186 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4187 between signed and unsigned.
4188 (LzmaEnc_Finish): Fix warning about an unused parameter.
4190 2008-07-13 Bean <bean123ch@gmail.com>
4192 * Makefile.in (enable_lzo): New rule.
4194 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
4196 * configure.ac (ENABLE_LZO): New option --enable-lzo.
4198 * boot/i386/pc/lnxboot.S: #include <config.h>.
4200 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
4201 its value according to the compression algorithm used, lzo or lzma.
4203 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
4204 compression algorithm according to configure macro.
4206 * kern/i386/pc/startup.S (codestart): Likewise.
4208 * kern/i386/pc/lzma_decode.S: New file.
4210 * include/grub/lib/LzFind.h: Likewise.
4212 * include/grub/lib/LzHash.h: Likewise.
4214 * include/grub/lib/LzmaDec.h: Likewise.
4216 * include/grub/lib/LzmaEnc.h: Likewise.
4218 * include/grub/lib/LzmaTypes.h: Likewise.
4220 * lib/LzFind.c: Likewise.
4222 * lib/LzmaDec.c: Likewise.
4224 * lib/LzmaEnc.c: Likewise.
4226 2008-07-13 Bean <bean123ch@gmail.com>
4228 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
4229 (grub_ext4_extent_header): New structure.
4230 (grub_ext4_extent): Likewise.
4231 (grub_ext4_extent_idx): Likewise.
4232 (grub_ext4_find_leaf): New function.
4233 (grub_ext2_read_block): Handle extents.
4235 2008-07-12 Robert Millan <rmh@aybabtu.com>
4237 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
4239 2008-07-11 Robert Millan <rmh@aybabtu.com>
4241 * util/grub.d/40_custom.in: New file. Example on how to add custom
4242 entries to /etc/grub.d.
4243 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
4244 40_custom (implicitly, by merging all the grub.d rules).
4246 2008-07-11 Pavel Roskin <proski@gnu.org>
4248 * commands/read.c (grub_getline): Fix invalid memory access.
4249 Don't add newline to the variable value.
4251 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4252 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4253 (serial_hw_get_port): Check validity of the port number.
4254 (grub_cmd_serial): Check return value of serial_hw_get_port().
4256 2008-07-07 Pavel Roskin <proski@gnu.org>
4258 * boot/i386/pc/diskboot.S (notification_string): Replace
4259 "Loading kernel" with just "loading". This is shorter, less
4260 confusing and saves a few bytes for possible future changes.
4262 2008-07-05 Pavel Roskin <proski@gnu.org>
4264 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4265 size for ATAPI devices, they are undefined. Output sector
4266 number in decimal form.
4268 * disk/ata.c: Use named constants for status bits.
4270 2008-07-04 Pavel Roskin <proski@gnu.org>
4272 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4273 grub_addr_t before casting it to the void pointer to fix a
4274 warning. Non-addressable regions are discarded earlier.
4275 (grub_arch_modules_addr): Cast _end to grub_addr_t.
4276 * kern/i386/linuxbios/table.c: Include grub/misc.h.
4277 (check_signature): Don't shadow table_header.
4278 (grub_linuxbios_table_iterate): Cast numeric constants to
4279 grub_linuxbios_table_header_t.
4280 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4283 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4286 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4287 pointer, which can cause warnings. Support 64-bit addresses.
4289 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4290 of sizeof(long). This fixes PowerPC image generation on x86_64.
4292 2008-07-04 Robert Millan <rmh@aybabtu.com>
4294 This fixes a performance issue when pc & gpt partmap iterators
4295 didn't abort iteration even after our hook found what it was
4296 looking for (often causing expensive probes of non-existent drives).
4298 Some callers relied on previous buggy behaviour, since they would
4299 raise an error when their own hooks caused early abortion of its
4302 * kern/device.c (grub_device_open): Improve error message.
4303 * disk/lvm.c (grub_lvm_open): Likewise.
4304 * disk/raid.c (grub_raid_open): Likewise.
4306 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4307 when hook requests it, independently of grub_errno.
4308 (pc_partition_map_probe): Do not fail when find_func() caused
4309 early abortion of pc_partition_map_iterate().
4311 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4312 when hook requests it, independently of grub_errno.
4313 (gpt_partition_map_probe): Do not fail when find_func() caused
4314 early abortion of gpt_partition_map_iterate().
4316 * kern/partition.c (grub_partition_iterate): Abort parent iteration
4317 when hook requests it, independently of grub_errno. Do not fail when
4318 part_map_iterate_hook() caused early abortion of p->iterate().
4320 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4321 when grub_partition_iterate() returned with non-zero.
4323 2008-07-03 Pavel Roskin <proski@gnu.org>
4325 * disk/ata.c (grub_ata_pio_write): Check status before writing,
4326 like we do in grub_ata_pio_read().
4327 (grub_ata_readwrite): Always write individual sectors. Fix the
4328 sector count for the remainder.
4329 (grub_ata_write): Enable writing to ATA devices. Correctly
4330 report error for ATAPI devices.
4332 2008-07-02 Pavel Roskin <proski@gnu.org>
4334 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4337 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4338 for every read sector, we already increment it for the whole
4339 batch. This fixes reading more than 256 sectors at once.
4341 * util/grub-editenv.c (cmd_info): Cast argument to long
4342 explicitly. ptrdiff_t reduces to int on i386.
4344 * util/grub-editenv.c (main): Be specific which parameter is
4347 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4348 (memdisk): Make memdisk_orig_addr a pointer.
4350 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4351 for file offsets, use grub_off_t instead. Fix printf format
4354 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4355 there. Real unexpected warnings should not drown in the noise
4356 about known problems.
4358 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4359 grub_disk_addr_t for memory addresses.
4361 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4362 explicitly to fix a warning.
4364 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4366 * Makefile.in (MODULE_LDFLAGS): New variable.
4367 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
4368 the linker accepts --build-id=none.
4369 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
4371 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4373 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4374 those in Linux XFS code. Provide a way to access 64-bit parent
4376 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
4377 the end of struct grub_xfs_dir_header.
4379 2008-07-02 Bean <bean123ch@gmail.com>
4381 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4382 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4383 and GRUB_IEEE1275_FLAG_NO_ANSI.
4385 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4386 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4387 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4389 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4390 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4392 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4393 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4395 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4396 esc sequence on non ANSI terminal.
4397 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4399 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4402 2008-07-02 Bean <bean123ch@gmail.com>
4404 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4405 (grub_editenv_SOURCES): New variable.
4406 (pkglib_MODULES): Add loadenv.mod.
4407 (loadenv_mod_SOURCES): New variable.
4408 (loadenv_mod_CFLAGS): Likewise.
4409 (loadenv_mod_LDFLAGS): Likewise.
4411 * include/grub/envblk.h: New file.
4413 * util/envblk.c: New file.
4415 * util/grub-editenv.c: New file.
4417 * commands/loadenv.c: New file.
4419 2008-07-01 Pavel Roskin <proski@gnu.org>
4421 * include/multiboot2.h (struct multiboot_tag_module): Use char,
4422 not unsigned char. This fixes warnings and is consistent with
4425 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4427 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4429 * term/tparm.c (analyze): Always set *popcount.
4431 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4432 cast to fix a warning.
4434 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4435 cast to suppress a warning.
4437 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4438 grub_fshelp_read_file() expects.
4440 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4441 write uuid as a 32-bit value in CPU byte order, so declare and
4444 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4445 long if the format specifier expects it.
4446 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4447 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4448 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4449 long to fix a warning.
4450 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4451 grub_dprintf() arguments to fix warnings.
4453 2008-06-30 Pavel Roskin <proski@gnu.org>
4455 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4456 install_bsd_part immediately before core.img is embedded or
4457 modified on disk. This fixes core.img verification if core.img
4460 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4461 core_path to calculate the blocklist.
4462 Patch from Javier MartÃn <lordhabbit@gmail.com>
4464 2008-06-29 Robert Millan <rmh@aybabtu.com>
4466 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4467 block to disk block.
4468 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4469 Patch from Niels Böhm <bitbucket@arcor.de>
4471 2008-06-29 Robert Millan <rmh@aybabtu.com>
4473 * util/update-grub_lib.in (font_path): Search for fonts in
4474 /boot/grub first, which is more likely to be readable (we aren't
4475 deciding where fonts live, just looking for them).
4477 2008-06-26 Pavel Roskin <proski@gnu.org>
4479 * util/biosdisk.c (read_device_map): Don't leave dead map
4480 entries for devices failing stat() check.
4482 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4483 core_path_dev for the core.img path on the target device.
4485 2008-06-26 Robert Millan <rmh@aybabtu.com>
4487 * disk/fs_uuid.c: New file.
4488 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4489 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4490 (fs_uuid_mod_LDFLAGS): New variables.
4491 * include/grub/disk.h (grub_disk_dev_id): Add
4492 `GRUB_DISK_DEVICE_UUID_ID'.
4493 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4494 implement iterate().
4496 2008-06-26 Robert Millan <rmh@aybabtu.com>
4498 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4499 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4500 Linux image includes no initrd.
4502 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
4504 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4505 call to resolve the core image location that effectively appended the
4508 2008-06-21 Robert Millan <rmh@aybabtu.com>
4510 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4513 * util/grub.d/10_hurd.in: ... to here ...
4514 * util/grub.d/10_linux.in: ... and here.
4516 2008-06-19 Robert Millan <rmh@aybabtu.com>
4518 * kern/main.c (grub_main): Export `prefix' variable immediately
4519 after it has been set by grub_machine_set_prefix().
4521 2008-06-19 Robert Millan <rmh@aybabtu.com>
4523 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4524 search result when not saving to variable, not the other way around.
4525 When saving to variable, abort iteration as soon as a match is found.
4527 2008-06-19 Robert Millan <rmh@aybabtu.com>
4529 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4530 check for partition that provides /boot/grub. Its logic is flawed,
4531 as it prevents prepare_grub_to_access_device() from being called
4534 2008-06-19 Robert Millan <rmh@aybabtu.com>
4536 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4537 "insmod" command directly when abstraction modules are needed,
4538 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4539 since it had already been processed).
4541 2008-06-19 Pavel Roskin <proski@gnu.org>
4543 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4544 changed. This is needed in case GRUB_LIBDIR changes.
4545 * conf/i386-ieee1275.rmk: Likewise.
4546 * conf/i386-linuxbios.rmk: Likewise.
4547 * conf/i386-pc.rmk: Likewise.
4548 * conf/powerpc-ieee1275.rmk: Likewise.
4550 2008-06-18 Pavel Roskin <proski@gnu.org>
4552 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4553 kernel_elf_symlist.c to symlist.c for consistency with other
4554 architectures. Update all users.
4555 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4557 2008-06-18 Robert Millan <rmh@aybabtu.com>
4559 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4562 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4563 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4564 a RAID device, run setup() for all members independently on whether
4565 LVM abstraction is being used.
4566 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4567 If grub-mkimage has set `*install_dos_part == -2', don't override this
4569 Perform *install_dos_part adjustments independently on whether
4570 we're embedding or not.
4571 Clarify error message when image is too big for embedding.
4572 Remove duplicate *install_dos_part stanza.
4574 2008-06-17 Robert Millan <rmh@aybabtu.com>
4576 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4577 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4579 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4580 values in grub_ofconsole_normal_color and
4581 grub_ofconsole_highlight_color (they're not directly related to
4582 background and foreground).
4583 (grub_ofconsole_setcolorstate): Extract background and foreground
4584 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4586 2008-06-17 Robert Millan <rmh@aybabtu.com>
4588 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4589 /boot/grub for the check in last commit, not /boot (they could be
4590 different partitions).
4592 2008-06-16 Robert Millan <rmh@aybabtu.com>
4594 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4595 asked to setup access for the same partition that provides /boot,
4596 don't bother using UUIDs since our root already has the value we
4599 2008-06-16 Robert Millan <rmh@aybabtu.com>
4601 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4603 Patch from Sven Mueller <sven@debian.org>.
4605 2008-06-16 Robert Millan <rmh@aybabtu.com>
4607 * util/update-grub.in: Check for $EUID instead of $UID.
4608 Reported by Vincent Zweije.
4610 2008-06-16 Bean <bean123ch@gmail.com>
4612 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
4613 (grub_ext2_read_block): Likewise.
4614 (grub_ext2_read_inode): Likewise.
4615 (grub_ext2_mount): Likewise.
4616 (grub_ext2_close): Likewise.
4617 (grub_ext3_get_journal): Removed.
4619 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
4620 (grub_reiserfs_read_symlink): Likewise.
4621 (grub_reiserfs_mount): Likewise.
4622 (grub_reiserfs_open): Likewise.
4623 (grub_reiserfs_read): Likewise.
4624 (grub_reiserfs_close): Likewise.
4625 (grub_reiserfs_get_journal): Removed.
4627 * fs/fshelp.c (grub_fshelp_read): Removed.
4628 (grub_fshelp_map_block): Likewise.
4630 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4631 (grub_fshelp_journal): Likewise.
4632 (grub_fshelp_read): Likewise.
4633 (grub_fshelp_map_block): Likewise.
4635 2008-06-16 Pavel Roskin <proski@gnu.org>
4637 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4638 floating point anymore.
4639 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4641 2008-06-15 Pavel Roskin <proski@gnu.org>
4643 * commands/ls.c (grub_ls_list_files): Use integer calculations
4644 for human readable format, avoid floating point use.
4645 * kern/misc.c (grub_ftoa): Remove.
4646 (grub_vsprintf): Remove floating point support.
4648 2008-06-15 Robert Millan <rmh@aybabtu.com>
4650 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
4652 Reported by Max Vozeler.
4654 2008-06-15 Robert Millan <rmh@aybabtu.com>
4656 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4657 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4659 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4660 the beginning of the prefix.
4662 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4663 It is assumed that if we have a memdisk, grub-mkimage has set
4664 grub_prefix to include the "(memdisk)" drive in it.
4666 2008-06-15 Robert Millan <rmh@aybabtu.com>
4668 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4669 Initialize keyboard controller after registering the terminal, so that
4670 grub_printf() can be called from grub_keyboard_controller_init().
4672 2008-06-15 Robert Millan <rmh@aybabtu.com>
4674 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4675 extent-btree which is written as big endian on disk.
4676 Reported by Alain Greppin <al@chilibi.org>.
4678 2008-06-14 Robert Millan <rmh@aybabtu.com>
4680 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4681 * util/i386/pc/grub-install.in (modules): Likewise.
4683 2008-06-13 Pavel Roskin <proski@gnu.org>
4685 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4687 2008-06-13 Bean <bean123ch@gmail.com>
4689 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4691 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4693 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4694 to indicate sparse block.
4696 2008-06-12 Pavel Roskin <proski@gnu.org>
4698 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4699 number, grub_fshelp_read() does it for us.
4701 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4702 linear disk read with journal translation.
4703 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4704 * include/grub/fshelp.h: Declare grub_fshelp_read().
4706 2008-06-09 Pavel Roskin <proski@gnu.org>
4708 * fs/minix.c (grub_minix_mount): Handle error reading
4711 2008-06-08 Robert Millan <rmh@aybabtu.com>
4713 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4714 don't append the RAID prefix afterwards.
4715 Reported by Clint Adams.
4717 2008-06-08 Robert Millan <rmh@aybabtu.com>
4719 Based on description from Pavel:
4720 * kern/disk.c (grub_disk_check_range): Rename to ...
4721 (grub_disk_adjust_range): ... this. Add a comment explaining the
4722 tasks performed by this function.
4724 2008-06-08 Robert Millan <rmh@aybabtu.com>
4726 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4727 `num_serial' (for consistency with other variables).
4728 (struct grub_ntfs_data): Add `uuid' member.
4729 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4730 (grub_ntfs_uuid): New function.
4731 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4733 2008-06-07 Pavel Roskin <proski@gnu.org>
4735 * util/biosdisk.c (open_device): Revert last change to the
4736 function, it broke installation. The sector needs to be
4737 different dependent on which device is opened.
4739 2008-06-06 Robert Millan <rmh@aybabtu.com>
4741 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4742 rest of GRUB, and breakage doesn't happen if its value were modified.
4744 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4745 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4746 a constant (same value).
4747 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4748 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4750 2008-06-06 Robert Millan <rmh@aybabtu.com>
4752 * util/biosdisk.c (open_device): Do not modify sector offset when
4753 accessing a partition. kern/disk.c already handles this for us.
4755 2008-06-06 Robert Millan <rmh@aybabtu.com>
4757 * util/grub-emu.c (grub_machine_init): Move code in this function from
4759 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4760 segfault in case grub_printf() is called).
4762 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4763 grub_probe. Update all users not to explicitly add it again.
4764 (grub_device): New variable; contains corresponding device for grubdir.
4765 (fs_module, partmap_module, devabstraction_module): Pass
4766 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4769 2008-06-05 Robert Millan <rmh@aybabtu.com>
4771 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4772 is found, print it (same layout as with labels).
4774 2008-06-04 Robert Millan <rmh@aybabtu.com>
4776 * util/biosdisk.c (get_drive): Rename to ...
4777 (find_grub_drive): ... this. Update all users.
4779 (get_os_disk): Rename to ...
4780 (convert_system_partition_to_system_disk): ... this. Update all users.
4782 (find_drive): Rename to ...
4783 (find_system_device): ... this. Update all users.
4785 2008-06-04 Robert Millan <rmh@aybabtu.com>
4787 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4788 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4789 (make_device_map): Likewise.
4791 2008-06-01 Robert Millan <rmh@aybabtu.com>
4793 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4794 before dereferencing it.
4796 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4797 union with fat12/fat16-specific ones. Add some new fields, including
4798 `num_serial' for both versions.
4799 (struct grub_fat_data): Add `uuid' member.
4800 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4801 names. Initialize `data->uuid' using `num_serial'.
4802 (grub_fat_uuid): New function.
4803 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4805 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4806 (grub_reiserfs_uuid): New function.
4807 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4810 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4811 (grub_xfs_uuid): New function.
4812 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4814 2008-06-01 Robert Millan <rmh@aybabtu.com>
4816 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4817 code that is backward compatible with pre-uuid search command.
4819 2008-05-31 Robert Millan <rmh@aybabtu.com>
4821 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4822 floppies after everything else, to ensure floppy drive isn't accessed
4823 unnecessarily (patch from Bean).
4825 2008-05-31 Robert Millan <rmh@aybabtu.com>
4827 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4828 not print device names when we were asked to set a variable.
4830 2008-05-31 Robert Millan <rmh@aybabtu.com>
4832 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4833 using "cursor-on" and "cursor-off" commands (understood at least by
4834 the Open Firmware flavour on OLPC).
4836 2008-05-31 Michael Gorven <michael@gorven.za.net>
4838 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4839 on and off sequences.
4841 2008-05-31 Robert Millan <rmh@aybabtu.com>
4843 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4844 * util/update-grub.in: Likewise.
4846 2008-05-30 Pavel Roskin <proski@gnu.org>
4848 * util/biosdisk.c (linux_find_partition): Simplify logic and
4849 make the code more universal. Keep special processing for
4850 devfs, but use a simple rule for all other devices. If the
4851 device ends with a number, append 'p' and the partition number.
4852 Otherwise, append only the partition number.
4854 2008-05-30 Robert Millan <rmh@aybabtu.com>
4856 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4857 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4858 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4859 the `root' parameter to Linux.
4861 2008-05-30 Robert Millan <rmh@aybabtu.com>
4863 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4864 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4865 --fs_uuid with --fs-uuid.
4866 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4867 all filesystems support them).
4869 2008-05-30 Robert Millan <rmh@aybabtu.com>
4871 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
4872 grub_printf() flags, since we're printing in units of 2 bytes.
4874 2008-05-30 Robert Millan <rmh@aybabtu.com>
4876 * util/grub.d/00_header.in: Remove obsolete comment referencing
4877 convert_system_path_to_grub_path().
4878 * util/update-grub.in: Likewise.
4879 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4880 (convert_system_path_to_grub_path): Add a warning message explaining
4881 that this function is deprecated. Rely on is_path_readable_by_grub()
4882 for the readability checks.
4883 (font_path): Use is_path_readable_by_grub() for the readability
4884 check rather than convert_system_path_to_grub_path().
4886 2008-05-30 Robert Millan <rmh@aybabtu.com>
4888 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4889 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4890 converting it first.
4891 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4892 grub.cfg for access to font file, and afterwards call it again to set
4895 2008-05-30 Robert Millan <rmh@aybabtu.com>
4897 * commands/search.c (options): Add --fs_uuid option.
4898 (search_fs_uuid): New function.
4899 (grub_cmd_search): Fix --set argument passing.
4900 Use search_fs_uuid() when requested via --fs_uuid.
4901 (grub_search_init): Update help message.
4902 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4903 and redeclare it as an array of 16-bit words.
4904 (grub_ext2_uuid): New function.
4905 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4906 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4907 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4908 (GRUB_DEVICE_BOOT_UUID): New variables.
4909 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4910 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4912 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4913 just assume `root' variable has the right value.
4914 * util/grub.d/10_linux.in: Likewise.
4915 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4917 (main): Recognise `-t fs_uuid' argument.
4919 2008-05-30 Robert Millan <rmh@aybabtu.com>
4921 * util/biosdisk.c (map): Redefine structure to hold information
4922 about GRUB drive name.
4923 (get_drive): Reimplement without assuming (and verifying) BIOS-like
4925 (call_hook): Remove.
4926 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4927 member. Assume drive has partitions.
4928 (grub_util_biosdisk_open): Access device names via `.device' struct
4930 (open_device): Likewise.
4931 (find_drive): Likewise.
4932 (read_device_map): Adjust map[] usage to match the new struct
4933 definition. Don't check for duplicates (still possible, but not cheap
4935 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4936 (make_device_name): Remove assumption of BIOS-like drive names.
4938 2008-05-30 Pavel Roskin <proski@gnu.org>
4940 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4941 compiling execute.c doesn't need grub_script.tab.h anymore.
4942 (normal/command.c_DEPENDENCIES): Likewise.
4943 (normal/function.c_DEPENDENCIES): Likewise.
4944 * conf/i386-ieee1275.rmk: Likewise.
4945 * conf/i386-linuxbios.rmk: Likewise.
4946 * conf/i386-pc.rmk: Likewise.
4947 * conf/powerpc-ieee1275.rmk: Likewise.
4948 * conf/sparc64-ieee1275.rmk: Likewise.
4950 2008-05-29 Pavel Roskin <proski@gnu.org>
4952 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4953 when scanning metadata for volume group name.
4955 * include/grub/script.h: Don't include grub_script.tab.h. It's
4956 a generated file, which may only be included from the files with
4957 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4958 use union YYSTYPE, as the later allows forward declaration.
4959 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4961 2008-05-29 Robert Millan <rmh@aybabtu.com>
4963 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4964 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4965 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4966 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4969 2008-05-29 Robert Millan <rmh@aybabtu.com>
4971 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4972 control key combinations.
4974 2008-05-29 Robert Millan <rmh@aybabtu.com>
4976 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4977 * util/ieee1275/grub-install.in: ... to here.
4978 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4979 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4980 (grub_install_SOURCES): Likewise.
4982 2008-05-29 Robert Millan <rmh@aybabtu.com>
4984 * fs/affs.c: Update copyright year.
4985 * fs/ext2.c: Likewise.
4986 * fs/fshelp.c: Likewise.
4987 * fs/hfsplus.c: Likewise.
4988 * fs/ntfs.c: Likewise.
4989 * fs/xfs.c: Likewise.
4990 * include/grub/fshelp.h: Likewise.
4991 * util/grub-mkdevicemap.c: Likewise.
4993 2008-05-28 Robert Millan <rmh@aybabtu.com>
4995 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4996 might need to be fatfs to support some firmware implementations
4999 2008-05-28 Robert Millan <rmh@aybabtu.com>
5001 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5003 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5004 (make_device_map): Likewise.
5006 2008-05-20 Bean <bean123ch@gmail.com>
5008 * fs/fshelp.c (grub_fshelp_map_block): New function.
5009 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5010 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5012 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5013 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5014 (grub_fshelp_journal): New structure.
5015 (grub_fshelp_map_block): New function prototype.
5016 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5017 (grub_fshelp_map_block): Likewise.
5019 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5020 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5021 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5022 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5023 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5024 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5025 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5026 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5027 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5028 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5029 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5030 (grub_ext2_sblock): New members for journal support.
5031 (grub_ext3_journal_header): New structure.
5032 (grub_ext3_journal_revoke_header): Likewise.
5033 (grub_ext3_journal_block_tag): Likewise.
5034 (grub_ext3_journal_sblock): Likewise.
5035 (grub_fshelp_node): New members logfile and journal.
5036 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5037 grub_fshelp_map_block to get real block number.
5038 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5040 (grub_ext2_read_inode): Likewise.
5041 (grub_ext3_get_journal): New function.
5042 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5043 (grub_ext2_close): Release memory used by journal.
5045 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5046 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5047 (grub_reiserfs_transaction_header): Renamed to
5048 grub_reiserfs_description_block, replace field data with real_blocks.
5049 (grub_reiserfs_commit_block): New structure.
5050 (grub_reiserfs_data): New member journal.
5051 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5053 (grub_reiserfs_read_symlink): Likewise.
5054 (grub_reiserfs_iterate_dir): Likewise.
5055 (grub_reiserfs_open): Likewise.
5056 (grub_reiserfs_read): Likewise.
5057 (grub_reiserfs_get_journal): New function.
5058 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5059 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5060 using grub_reiserfs_get_journal.
5061 (grub_reiserfs_close): Release memory used by journal.
5063 * fs/affs.c (grub_affs_read_block): Change block type to
5064 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5066 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5068 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5070 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5072 * fs/udf.c (grub_udf_read_block): Change block type to
5073 grub_disk_addr_t. Use type cast to avoid warning.
5075 * fs/xfs.c (grub_xfs_read_block): Likewise.
5077 2008-05-16 Christian Franke <franke@computer.org>
5079 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5080 to ensure that break with ESC will always work.
5081 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5082 Remove ESC from keyboard queue.
5084 2008-05-16 Christian Franke <franke@computer.org>
5086 * util/biosdisk.c: [__CYGWIN__] Add includes.
5087 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5088 (get_os_disk): Move variable declarations to OS specific
5089 parts to avoid warning.
5090 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5091 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5092 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5094 * util/getroot.c: [__CYGWIN__] Add includes.
5095 (strip_extra_slashes): Fix "/" case.
5096 [__CYGWIN__] (get_win32_path): New function.
5097 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5098 [__CYGWIN__] (find_root_device): Disable.
5099 [__CYGWIN__] (get_bootsec_serial): New function.
5100 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5101 [__linux__] (grub_guess_root_device): Add early returns to simplify
5103 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5104 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5105 check for Linux only.
5107 2008-05-15 Bean <bean123ch@gmail.com>
5109 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5110 keyboard hang problem in apple's intel mac.
5112 2008-05-09 Robert Millan <rmh@aybabtu.com>
5114 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5116 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5117 (make_device_map): Likewise.
5118 Reported by Aurelien Jarno <aurel32@debian.org>
5120 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
5122 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5123 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5124 (make_device_map): Output entries for xvd type disks.
5126 2008-05-07 Robert Millan <rmh@aybabtu.com>
5128 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5130 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5131 (make_device_map): Likewise.
5132 Reported by Roland Dreier <rdreier@cisco.com>
5134 2008-05-07 Robert Millan <rmh@aybabtu.com>
5136 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5137 grub_strstr() call. Correct a few mistakes in failure path handling.
5139 2008-05-06 Robert Millan <rmh@aybabtu.com>
5141 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5142 Do not print a trailing slash (therefore, the root directory is an
5144 (convert_system_path_to_grub_path): Do not remove trailing slash
5145 from make_system_path_relative_to_its_root() output.
5147 * util/i386/pc/grub-install.in: Add trailing slash to output from
5148 make_system_path_relative_to_its_root().
5150 2008-05-06 Robert Millan <rmh@aybabtu.com>
5152 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5153 ensures that output lines aren't intermangled with those sent to
5154 stderr (via grub_util_info()).
5155 * util/grub-probe.c (grub_refresh): Likewise.
5156 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5158 2008-05-05 Christian Franke <franke@computer.org>
5160 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5161 Add Cygwin device names.
5162 (get_ide_disk_name) [__CYGWIN__]: Likewise.
5163 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5164 (check_device): Return error instead of success on empty name.
5165 (make_device_map): Move label inside linux specific code to
5166 prevent compiler warning.
5168 2008-04-30 Robert Millan <rmh@aybabtu.com>
5170 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5171 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5173 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5175 2008-04-29 Robert Millan <rmh@aybabtu.com>
5177 * docs/grub.cfg: New file (example GRUB configuration).
5179 2008-04-26 Robert Millan <rmh@aybabtu.com>
5181 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
5182 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5183 and `disk/ieee1275/nand.c'.
5185 2008-04-25 Bean <bean123ch@gmail.com>
5187 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5190 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5191 change the buffer size to 4096 for cdrom device.
5193 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
5195 (_linux_mod_SOURCES): New variable.
5196 (_linux_mod_CFLAGS): Likewise.
5197 (_linux_mod_LDFLAGS): Likewise.
5198 (linux_mod_SOURCES): Likewise.
5199 (linux_mod_CFLAGS): Likewise.
5200 (linux_mod_LDFLAGS): Likewise.
5201 (nand_mod_SOURCES): Likewise.
5202 (nand_mod_CFLAGS): Likewise.
5203 (nand_mod_LDFLAGS): Likewise.
5205 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
5206 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
5207 type property. (nand device in olpc don't have this property)
5209 * include/grub/disk.h (grub_disk_dev_id): New macro
5210 GRUB_DISK_DEVICE_NAND_ID.
5212 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
5214 (grub_rescue_cmd_initrd): Likewise.
5216 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
5217 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
5218 ofw_cif_handler and ofw_idt, adjust padding number.
5220 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
5221 GRUB_MACHINE_IEEE1275 is defined.
5223 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
5224 Use NESTED_FUNC_ATTR attribute on the hook parameter.
5226 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
5227 on nested function heap_init.
5228 (grub_upper_mem): New variable for i386-ieee1275.
5229 (grub_get_extended_memory): New function for i386-ieee1275.
5230 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
5232 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
5233 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
5236 * loader/i386/ieee1275/linux.c: New file.
5238 * loader/i386/ieee1275/linux_normal.c: New file.
5240 * disk/ieee1275/nand.c: New file.
5242 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
5244 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
5246 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
5248 2008-04-18 Robert Millan <rmh@aybabtu.com>
5250 Restructures early code path on ieee1275 to unify grub_main() as
5251 the first C function that is executed in every platform.
5253 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5254 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5256 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5257 * kern/ieee1275/cmain.c (cmain): Rename to ...
5258 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5259 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5262 2008-04-18 Robert Millan <rmh@aybabtu.com>
5264 * util/update-grub.in: Fix syntax error when setting
5265 `GRUB_PRELOAD_MODULES'.
5266 Reported by Stephane Chazelas <stephane@artesyncp.com>
5268 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
5270 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5271 section into account, newer toolchains generate unique build ids
5272 * configure.ac: remove the test for --build-id=none acceptance,
5273 we want build ids to be preserved
5274 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5275 far from other sections don't cause the raw binary images grow
5278 2008-04-15 Robert Millan <rmh@aybabtu.com>
5280 * disk/lvm.c: Update copyright year.
5281 * kern/misc.c: Likewise.
5283 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5285 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5286 there is no memory left for physical volume name.
5288 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5290 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5291 volume name mapping to support bigger than 9 character names properly.
5293 2008-04-13 Robert Millan <rmh@aybabtu.com>
5295 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5296 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5298 2008-04-13 Christian Franke <franke@computer.org>
5300 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5301 to create a floppy emulation boot CD when non emulation mode
5303 Enable Joliet CD filesystem extension.
5305 2008-04-13 Robert Millan <rmh@aybabtu.com>
5307 * kern/misc.c (grub_strncat): Fix off-by-one error.
5308 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5310 * kern/env.c (grub_env_context_close): Clear current context, not
5312 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5314 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5316 2008-04-13 Robert Millan <rmh@aybabtu.com>
5318 Improve robustness when handling LVM.
5320 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5321 (and leave `*p' unmodified).
5322 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5324 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5325 iterating through it.
5326 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5328 (grub_lvm_scan_device): Check the return value (and fail gracefully
5329 when due) on each grub_lvm_getvalue() or grub_strstr() call.
5330 Don't assume `vg->pvs != NULL' when iterating through it.
5332 2008-04-13 Robert Millan <rmh@aybabtu.com>
5334 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5335 * genmk.rb (partmap): New variable.
5336 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5337 (#{partmap}): New target rule.
5338 * genpartmaplist.sh: New file.
5339 * Makefile.in (pkglib_DATA): Add partmap.lst.
5340 (partmap.lst): New target rule.
5341 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5342 modules (including all partition maps), instead of preloading them.
5344 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
5346 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5347 `linux-boot-prober' (if installed) to detect other operating
5348 systems which are installed on the computer and add them to
5350 * conf/common.rmk: Build and install 30_os-prober.
5352 2008-04-12 Robert Millan <rmh@aybabtu.com>
5354 * kern/powerpc/ieee1275/init.c: Move from here ...
5355 * kern/ieee1275/init.c: ... to here. Update all users.
5357 * kern/powerpc/ieee1275/cmain.c: Move from here ...
5358 * kern/ieee1275/cmain.c: ... to here. Update all users.
5360 * kern/powerpc/ieee1275/openfw.c: Move from here ...
5361 * kern/ieee1275/openfw.c: ... to here. Update all users.
5363 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5364 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
5366 2008-04-10 Pavel Roskin <proski@gnu.org>
5368 * configure.ac: Always use "_cv_" in cache variables for
5369 compatibility with Autoconf 2.62.
5371 2008-04-07 Robert Millan <rmh@aybabtu.com>
5373 Revert grub/machine/init.h addition by Pavel (since it breaks on
5374 i386-ieee1275 and others):
5375 * util/i386/pc/misc.c: Remove grub/machine/init.h.
5376 * util/powerpc/ieee1275/misc.c: Likewise.
5378 2008-04-07 Robert Millan <rmh@aybabtu.com>
5380 * util/grub-probe.c (probe): Improve error message.
5382 2008-04-07 Robert Millan <rmh@aybabtu.com>
5384 * util/biosdisk.c (read_device_map): Skip devices that don't exist
5385 (this prevents the presence of a bogus entry from ruining the whole
5388 2008-04-06 Pavel Roskin <proski@gnu.org>
5390 * util/biosdisk.c: Include grub/util/biosdisk.h.
5391 * util/grub-fstest.c (execute_command): Make static.
5392 * util/grub-mkdevicemap.c (check_device): Likewise.
5393 * util/i386/pc/misc.c: Include grub/machine/init.h.
5394 * util/powerpc/ieee1275/misc.c: Likewise.
5395 * util/lvm.c: Include grub/util/lvm.h.
5396 * util/misc.c: Include grub/kernel.h, grub/misc.h and
5398 * util/raid.c: Include grub/util/raid.h.
5399 (grub_util_getdiskname): Make static.
5401 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5402 grub_hostfs_fini(), as they are called from grub_init_all() and
5403 grub_fini_all() respectively. This fixes an infinite loop in
5404 grub-fstest due to double registration of hostfs.
5405 Reported by Christian Franke <Christian.Franke@t-online.de>
5407 2008-04-05 Pavel Roskin <proski@gnu.org>
5409 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5410 all 8 functions. Otherwise, probe function 0 only.
5412 2008-04-04 Pavel Roskin <proski@gnu.org>
5414 * commands/lspci.c (grub_lspci_iter): Print the bus number
5417 * commands/lspci.c (grub_pci_classes): Fix typos.
5418 (grub_lspci_iter): Don't print func twice. Print vendor ID
5419 before device ID, as it's normally done.
5421 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5422 Fix signedness warnings.
5423 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5425 * util/ieee1275/get_disk_name.c: Include config.h so that
5426 _GNU_SOURCE is defined and getline() is declared. Mark an
5427 unused argument as such. Fix a signedness warning.
5429 2008-04-02 Pavel Roskin <proski@gnu.org>
5431 * genkernsyms.sh.in: Use more robust assignments for CC and
5432 srcdir. Quote srcdir.
5433 * gensymlist.sh.in: Likewise. Assert at the compile time that
5434 the symbol table is not empty.
5436 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5437 * fs/cpio.c (grub_cpio_read): Likewise.
5439 2008-04-01 Pavel Roskin <proski@gnu.org>
5441 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5442 * disk/host.c (grub_host_open): Likewise.
5443 * disk/loopback.c (grub_loopback_open): Likewise.
5444 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5445 disk->id as in disk/host.c, not a multi-character constant.
5447 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5448 later is obsolete, potentially dangerous and sets a bad example.
5449 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5450 * util/misc.c (grub_util_get_image_size): Likewise.
5452 * disk/loopback.c (options): Improve help for "--partitions".
5454 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5455 options to align them with the short options, e.g. "echo -e".
5457 2008-03-31 Bean <bean123ch@gmail.com>
5459 * video/reader/png.c (grub_png_data): New member is_16bit and
5461 (grub_png_decode_image_header): Detect 16 bit png image.
5462 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5463 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5464 (grub_video_reader_png): Release memory occupied by image_data.
5466 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5468 (grub_nfs_mount): Skip the test for sector per cluster.
5470 * include/grub/ntfs.h (MAX_SPC): Removed.
5472 2008-03-31 Bean <bean123ch@gmail.com>
5474 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5475 (grub_probe_SOURCES): Add fs/afs.c.
5476 (grub_fstest_SOURCES): Likewise.
5477 (afs_mod_SOURCES): New variable.
5478 (afs_mod_CFLAGS): Likewise.
5479 (afs_mod_LDFLAGS): Likewise.
5481 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5482 (grub_emu_SOURCES): Likewise.
5484 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5486 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5488 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5490 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5492 * fs/afs.c: New file.
5494 2008-03-30 Pavel Roskin <proski@gnu.org>
5496 * disk/host.c: Include grub/misc.h to fix a warning.
5497 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5498 warnings about implicit declarations.
5500 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5502 * include/grub/i386/loader.h: Change declaration of
5503 grub_linux_boot() to match what grub_loader_set() expects.
5504 * util/getroot.c (grub_guess_root_device): Return const char* to
5506 * util/grub-probe.c (probe): Fix a warning about uninitialized
5507 abstraction_name variable.
5508 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5509 second argument as unused to fix a warning.
5511 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5512 missing grub_error() call.
5514 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5515 2.60 and newer uses it to define datadir.
5517 * commands/sleep.c: Fix warning about implicit declaration.
5518 * disk/memdisk.c: Likewise.
5519 * loader/aout.c: Likewise.
5520 * loader/i386/bsd_normal.c: Likewise.
5521 * util/grub-probe.c: Likewise.
5523 * commands/i386/cpuid.c (has_longmode): Make static.
5524 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5525 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5527 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5528 GDT. This is more robust, as %ds can change.
5529 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5530 calling real_to_prot().
5531 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5533 2008-03-28 Pavel Roskin <proski@gnu.org>
5535 * kern/i386/pc/startup.S: Assert that uncompressed functions
5536 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5537 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5538 code, as they push parts of the code (error handlers) beyond
5539 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5540 code as correctness and size.
5542 2008-03-28 Pavel Roskin <proski@gnu.org>
5544 * kern/i386/pc/startup.S
5545 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5546 data block address to the real mode, keep offset minimal. This
5547 works around a bug in AWARD BIOS on old Athlon systems, which
5548 makes CD detection hang.
5550 2008-03-26 Pavel Roskin <proski@gnu.org>
5552 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5554 * include/grub/normal.h: Add grub_parse_color_name_pair()
5557 2008-03-24 Bean <bean123ch@gmail.com>
5559 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5560 (cd_count): Removed.
5561 (cd_drive): New variable.
5562 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5563 (grub_biosdisk_call_hook): Likewise.
5564 (grub_biosdisk_iterate): Change cdrom detection method.
5565 (grub_biosdisk_open): Replace cd_start with cd_drive.
5566 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5567 detect cdrom device.
5569 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5571 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5572 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5573 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5574 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5575 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5576 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5577 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5578 (grub_biosdisk_cdrp): New structure.
5579 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5581 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5583 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5586 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5589 2008-03-20 Robert Millan <rmh@aybabtu.com>
5591 Remove 2 TiB limit in ata.mod.
5592 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5593 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5594 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5595 grub_uint64_t instead of grub_uint32_t.
5597 2008-03-05 Bean <bean123ch@gmail.com>
5599 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5600 (grub_multiboot): Set boot device.
5602 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5604 2008-03-02 Bean <bean123ch@gmail.com>
5606 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5609 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5611 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5614 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5617 * docs/fdl.texi: New file.
5619 * docs/mdate-sh: New file. Copied from gnulib.
5620 * docs/texinfo.tex: Likewise.
5622 * config.guess: Updated from gnulib.
5623 * install-sh: Likewise.
5625 2008-02-28 Robert Millan <rmh@aybabtu.com>
5627 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5628 (aout_mod_SOURCES): New variable.
5629 (aout_mod_CFLAGS): Likewise.
5630 (aout_mod_LDFLAGS): Likewise.
5632 * conf/i386-ieee1275.rmk: Likewise.
5634 2008-02-28 Robert Millan <rmh@aybabtu.com>
5636 * util/update-grub.in: Reorganise terminal validity check. Accept
5637 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5638 Based on suggestion by Franklin PIAT.
5640 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5642 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5644 * util/getroot.c (grub_util_check_block_device): New function that
5645 returns the given argument if it is a block device and returns NULL else.
5646 * util/grub-probe.c (argument_is_device): New variable.
5647 (probe): Promote device_name from a variable to an argument. Receive
5648 device_name from grub_util_check_block_device() if path is NULL and from
5649 grub_guess_root_device() else. Do not free() device_name anymore.
5650 (options): Introduce new parameter '-d, --device'.
5651 (main): Add description of the new parameter to the help screen.
5652 Rename path variable to argument. Set argument_is_device if the '-d'
5653 option is given. Pass argument to probe() depending on
5656 2008-02-24 Bean <bean123ch@gmail.com>
5658 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5659 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5660 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5661 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5662 (GRUB_ISO9660_VOLDESC_END): Likewise.
5663 (grub_iso9660_primary_voldesc): New member escape.
5664 (grub_iso9660_data): New member joliet.
5665 (grub_iso9660_convert_string): New function.
5666 (grub_iso9660_mount): Detect joliet extension.
5667 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5668 (grub_iso9660_iso9660_label): Likewise.
5670 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5671 (grub_setup_SOURCES): Add fs/udf.c.
5672 (grub_fstest_SOURCES): Likewise.
5673 (udf_mod_SOURCES): New variable.
5674 (udf_mod_CFLAGS): Likewise.
5675 (udf_mod_LDFLAGS): Likewise.
5677 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5678 (grub_emu_SOURCES): Likewise.
5680 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5682 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5684 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5686 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5688 * fs/udf.c: New file.
5690 2008-02-24 Robert Millan <rmh@aybabtu.com>
5692 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5693 (normal/lexer.c_DEPENDENCIES): New variables.
5694 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5695 (normal/lexer.c_DEPENDENCIES): Likewise.
5696 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5697 (normal/lexer.c_DEPENDENCIES): Likewise.
5698 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5699 (normal/lexer.c_DEPENDENCIES): Likewise.
5700 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5701 (normal/lexer.c_DEPENDENCIES): Likewise.
5702 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5703 (normal/lexer.c_DEPENDENCIES): Likewise.
5705 2008-02-23 Robert Millan <rmh@aybabtu.com>
5707 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5708 since they were intended to be in hex. This didn't break previously
5709 because of a bug in gpt_partition_map_iterate() (see below).
5711 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5712 when checking the validity of GPT header.
5713 Remove `partno', since it always provides the same information as `i'.
5715 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5717 * include/grub/efi/time.h: Fix a wrong comment.
5719 2008-02-19 Pavel Roskin <proski@gnu.org>
5721 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5724 2008-02-19 Bean <bean123ch@gmail.com>
5726 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5727 (aout_mod_SOURCES): New variable.
5728 (aout_mod_CFLAGS): Likewise.
5729 (aout_mod_LDFLAGS): Likewise.
5730 (_bsd_mod_SOURCES): New variable.
5731 (_bsd_mod_CFLAGS): Likewise.
5732 (_bsd_mod_LDFLAGS): Likewise.
5733 (bsd_mod_SOURCES): New variable.
5734 (bsd_mod_CFLAGS): Likewise.
5735 (bsd_mod_LDFLAGS): Likewise.
5737 * include/grub/aout.h: New file.
5739 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5741 * include/grub/i386/bsd.h: New file.
5743 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5746 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5747 function is called, so that it's possible to change it inside the hook.
5748 (grub_elf64_load): Likewise.
5749 (grub_elf_file): Don't close the file if elf header is not found.
5750 (grub_elf_close): Close the file if grub_elf_file fails (The new
5751 grub_elf_file won't close it).
5752 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5753 (grub_elf64_size): Likewise.
5755 * kern/i386/loader.S (grub_unix_real_boot): New function.
5757 * loader/aout.c: New file.
5759 * loader/i386/bsd.c: New file.
5761 * loader/i386/bsd_normal.c: New file.
5763 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5765 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
5766 can test other formats.
5768 2008-02-19 Robert Millan <rmh@aybabtu.com>
5770 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5771 (grub_gpt_partition_type_empty): Redefine with macro from
5772 `<grub/gpt_partition.h>'.
5773 (gpt_partition_map_iterate): Adjust partition type comparison.
5775 Export `entry' as partmap-specific `part.data' struct.
5776 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5778 * include/grub/gpt_partition.h (grub_gpt_header)
5779 (grub_gpt_partentry): ... to here (new file).
5781 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5783 (grub_gpt_partition_type_bios_boot): New const variable, defined
5784 with macro from `<grub/gpt_partition.h>'.
5786 (setup): Replace `first_start' with `embed_region', which keeps
5787 track of the embed region (and is partmap-agnostic).
5789 Replace find_first_partition_start() with find_usable_region(),
5790 which finds a usable region for embedding using partmap-specific
5791 knowledge (supports PC/MSDOS and GPT).
5793 Fix all assumptions that the embed region start at sector 1, using
5794 `embed_region.start' from now on. Similarly, use `embed_region.end'
5795 rather than `first_start' to calculate available size.
5797 In grub_util_info() message, replace "into after the MBR" with an
5798 indication of the specific sector our embed region starts at.
5800 2008-02-19 Robert Millan <rmh@aybabtu.com>
5802 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5803 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5804 `commands/reboot.c'.
5805 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5806 (halt_mod_SOURCES): Likewise.
5807 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5808 (halt_mod_SOURCES): Likewise.
5810 2008-02-17 Christian Franke <franke@computer.org>
5812 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5814 2008-02-17 Robert Millan <rmh@aybabtu.com>
5816 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5817 set `first_start' to 0 for non-PC/MSDOS partition maps.
5819 2008-02-16 Robert Millan <rmh@aybabtu.com>
5821 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5822 do not assume partition map is PC/MSDOS before performing checks that
5823 are specific to that layout.
5825 2008-02-13 Robert Millan <rmh@aybabtu.com>
5827 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5828 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5829 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5831 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5833 * configure.ac: Only a cosmetic change on the handling of
5834 -fno-stack-protector.
5836 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
5838 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5839 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5841 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5842 (halt_mod_SOURCES): New variable.
5843 (halt_mod_CFLAGS): Likewise.
5844 (halt_mod_LDFLAGS): Likewise.
5845 (reboot_mod_SOURCES): Likewise.
5846 (reboot_mod_CFLAGS): Likewise.
5847 (reboot_mod_LDFLAGS): Likewise.
5849 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5850 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5852 (halt_mod_SOURCES): Likewise.
5853 (reboot_mod_SOURCES): Likewise.
5855 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5856 commands/i386/pc/reboot.c by commands/reboot.c.
5857 (reboot_mod_SOURCES): Likewise.
5859 * commands/i386/pc/reboot.c: merge this file ...
5861 * commands/ieee1275/reboot.c: ... and this file ...
5863 * commands/reboot.c: ... to this file.
5864 Add some precompiler directive to include the correct header for
5867 * commands/ieee1275/halt.c: move this file ...
5869 * commands/halt.c: ... to here.
5870 Add some precompiler directive to include the correct header for
5873 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5874 (grub_halt): Likewise.
5876 * kern/efi/efi.c (grub_reboot): New function.
5877 (grub_halt): Likewise.
5879 2008-02-12 Robert Millan <rmh@aybabtu.com>
5881 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5882 /dev (like it is done for /dev/mapper). This doesn't provide support
5883 for EVMS, but at least it is now easy to identify the problem when it
5886 2008-02-11 Robert Millan <rmh@aybabtu.com>
5888 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5889 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5890 comparing it with -1, not 0.
5892 2008-02-10 Robert Millan <rmh@aybabtu.com>
5894 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5896 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5897 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5899 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5900 `disk/lvm.c' to the end of the list.
5901 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5902 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5904 2008-02-10 Robert Millan <rmh@aybabtu.com>
5906 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5907 grub_print_error() instead. This will let user know why we're entering
5909 Based on suggestions from Sam Morris.
5911 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
5913 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5914 on remaining N args, instead of "--" arg N times.
5916 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5918 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5919 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5920 pattern for unknown glyphs.
5922 2008-02-09 Robert Millan <rmh@aybabtu.com>
5924 * configure.ac: Probe for `help2man'.
5925 * Makefile.in (builddir): New variable.
5926 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5927 or otherwise add a few flags/options to it.
5928 (install-local): For every executable utility or script that is
5929 installed, invoke $(HELP2MAN) to install a manpage based on --help
5932 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5933 that it doesn't prevent --help from working in build tree.
5935 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5936 with `bug-grub@gnu.org'.
5937 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5938 * util/update-grub.in (usage): New function.
5939 Implement proper argument check, with support for --help and --version
5940 (as well as existing -y).
5942 2008-02-09 Christian Franke <franke@computer.org>
5944 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5945 avoid overwriting previous output.
5946 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5948 2008-02-09 Robert Millan <rmh@aybabtu.com>
5950 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5953 2008-02-09 Robert Millan <rmh@aybabtu.com>
5955 * commands/sleep.c: New file.
5956 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5957 (sleep_mod_SOURCES): New variable.
5958 (sleep_mod_CFLAGS): Likewise.
5959 (sleep_mod_LDFLAGS): Likewise.
5961 2008-02-09 Robert Millan <rmh@aybabtu.com>
5963 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5964 situations in which we can deduce the RAID size and the superblock
5967 2008-02-09 Robert Millan <rmh@aybabtu.com>
5969 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5970 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5971 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5973 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5974 and return a grub_diskmemberlist_t composed of physical array members.
5975 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5977 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5979 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5980 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5981 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5983 * util/grub-probe.c (probe): Move partmap probing code from here ...
5984 (probe_partmap): ... to here.
5985 (probe): Use probe_partmap() once for the disk we're probing, and
5986 additionally, when such disk contains a memberlist() struct member,
5987 once for each disk that is contained in the structure returned by
5990 2008-02-09 Robert Millan <rmh@aybabtu.com>
5992 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5993 environment variable to 'all' in order to obtain debug output from
5995 * util/i386/pc/grub-setup.c (main): Likewise.
5997 2008-02-08 Robert Millan <rmh@aybabtu.com>
5999 * disk/raid.c (grub_raid_scan_device): Check for
6000 `array->device[sb.this_disk.number]' rather than for
6001 `array->device[sb.this_disk.number]->name', since the latter is not
6002 guaranteed to be accessible.
6004 2008-02-08 Robert Millan <rmh@aybabtu.com>
6006 * disk/raid.c: Update copyright.
6007 * fs/cpio.c: Likewise.
6008 * include/grub/raid.h: Likewise.
6009 * loader/i386/pc/multiboot.c: Likewise.
6010 * util/hostfs.c: Likewise.
6012 2008-02-08 Robert Millan <rmh@aybabtu.com>
6014 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6015 to a grub_disk_t array.
6016 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6018 (grub_raid_scan_device): Replace `device[x].name' accesses with
6019 `device[x]->name'. Simplify initialization of `array->device[x]'.
6021 2008-02-08 Robert Millan <rmh@aybabtu.com>
6023 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6024 grub_dprintf() calls.
6025 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6028 2008-02-07 Christian Franke <franke@computer.org>
6030 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6031 instead of fseek and ftell to support large files.
6032 (grub_hostfs_read): Likewise.
6034 2008-02-07 Robert Millan <rmh@aybabtu.com>
6036 Patch from Jeroen Dekkers.
6037 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
6038 failure, since successfully reading all array members might not be
6041 2008-02-06 Robert Millan <rmh@aybabtu.com>
6043 * util/grub-probe.c (probe): Simplify partmap probing (with the
6044 assumption that the first word up to the underscore equals to
6047 2008-02-06 Christian Franke <franke@computer.org>
6049 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6050 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6051 last block of a cpio or tar stream.
6052 Check for "TRAILER!!!" instead of any empty data
6053 block to detect last block of a cpio stream.
6054 (grub_cpio_dir): Fix constness of variable np.
6055 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6056 cpio or tar trailer is detected. This fixes a crash
6057 on open of a non existing file.
6059 2008-02-05 Bean <bean123ch@gmail.com>
6061 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6063 (grub_multiboot_load_elf64): Likewise.
6064 (grub_multiboot): Initialize mbi structure.
6066 * util/grub-fstest.c: Don't include unused header file script.h.
6068 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
6070 (grub_fstest_SOURCES): Likewise.
6072 2008-02-05 Robert Millan <rmh@aybabtu.com>
6074 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6075 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6076 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6077 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6079 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6080 (translation_table): Replace hardcoded values with macros
6081 provided by `<grub/term.h>'.
6083 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6084 (keyboard_map): Correct/add a few values, with macros provided
6086 (keyboard_map_shift): Zero values that don't differ from their
6087 `keyboard_map' equivalents.
6088 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6089 Discard the second scan code that is always sent by Caps lock.
6090 Only use `keyboard_map_shift' when it provides a non-zero value,
6091 otherwise fallback to `keyboard_map'.
6093 2008-02-04 Bean <bean123ch@gmail.com>
6095 * Makefile.in (enable_grub_fstest): New variable.
6097 * conf/common.rmk (grub_fstest_init.lst): New rule.
6098 (grub_fstest_init.h): Likewise.
6099 (grub_fstest_init.c): Likewise.
6100 (util/grub-fstest.c_DEPENDENCIES): New variable.
6101 (grub_fstest_SOURCES): Likewise.
6103 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6105 * util/grub-fstest.c: New file.
6107 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6109 Make grub-setup handle a separate root device.
6111 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6112 so that the root device can be compared with the destination
6114 When embedding the core image, if the root and destination devices
6115 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6117 When not embedding, set ROOT_DRIVE to 0xFF.
6119 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6121 Add support for having a grub directory in a different drive. This
6122 is still only the data handling part.
6124 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6125 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6126 (grub_root_drive): New variable.
6128 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6129 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6130 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6133 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6135 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6137 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6139 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6140 is bogus, because PXE booting does not specify any drive
6143 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6144 am not sure if this is really correct.
6146 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6147 is always identical to the boot drive when booting from a CD.
6149 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6151 (root_drive): New variable.
6152 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6153 (setup_sectors): Push %dx right after popping it, because %dh will
6155 (copy_buffer): Restore %dx.
6157 2008-02-03 Robert Millan <rmh@aybabtu.com>
6159 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6160 use `cdboot.img' for cdrom images.
6162 2008-02-03 Robert Millan <rmh@aybabtu.com>
6164 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6165 only setup gfxterm when `font' command has succeeded.
6167 2008-02-03 Robert Millan <rmh@aybabtu.com>
6169 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6170 (grub_rescue_cmd_multiboot_loader)
6171 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6173 2008-02-03 Pavel Roskin <proski@gnu.org>
6175 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
6176 %edx and %esi from stack only after grub_gate_a20() is called.
6177 grub_gate_a20() clobbers %edx.
6179 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6181 * configure.ac (AC_INIT): Bumped to 1.96.
6183 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6184 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6185 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6186 video/readers/png.c.
6188 2008-02-03 Bean <bean123ch@gmail.com>
6190 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6191 (cdboot_img_SOURCES): New variable.
6192 (cdboot_img_ASFLAGS): New variable.
6193 (cdboot_img_LDFLAGS): New variable.
6195 * boot/i386/pc/cdboot.S: New file.
6197 * disk/i386/pc/biosdisk.c (cd_start): New variable.
6198 (cd_count): Likewise.
6199 (grub_biosdisk_get_drive): Add support for cd device.
6200 (grub_biosdisk_call_hook): Likewise.
6201 (grub_biosdisk_iterate): Likewise.
6202 (grub_biosdisk_open): Likewise.
6203 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
6204 (grub_biosdisk_rw): Support reading from cd device.
6205 (GRUB_MOD_INIT): Iterate cd devices.
6207 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
6208 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
6209 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
6211 * kern/i386/pc/init.c (make_install_device): Check for cd device.
6213 2008-02-02 Robert Millan <rmh@aybabtu.com>
6215 * commands/read.c: New file.
6216 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
6217 (read_mod_SOURCES): New variable.
6218 (read_mod_CFLAGS): Likewise.
6219 (read_mod_LDFLAGS): Likewise.
6221 2008-02-02 Robert Millan <rmh@aybabtu.com>
6223 * normal/main.c (grub_normal_execute): Check for `menu->size' when
6224 determining whether menu has to be displayed.
6226 2008-02-02 Marco Gerards <marco@gnu.org>
6228 * bus/pci.c: New file.
6230 * include/grub/pci.h: Likewise.
6232 * include/grub/i386/pc/pci.h: Likewise.
6234 * commands/lspci.c: Likewise.
6236 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
6238 (pci_mod_SOURCES): New variable.
6239 (pci_mod_CFLAGS): Likewise.
6240 (pci_mod_LDFLAGS): Likewise.
6241 (lspci_mod_SOURCES): Likewise.
6242 (lspci_mod_CFLAGS): Likewise.
6243 (lspci_mod_LDFLAGS): Likewise.
6245 2008-02-02 Bean <bean123ch@gmail.com>
6247 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
6248 (grub_ufs_get_file_block): Fix indirect block calculation problem.
6250 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6251 (grub_xfs_btree_node): New structure.
6252 (grub_xfs_btree_root): New structure.
6253 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6254 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6255 (GRUB_XFS_EXTENT_BLOCK): Likewise.
6256 (GRUB_XFS_EXTENT_SIZE): Likewise.
6257 (grub_xfs_read_block): Support btree format type.
6258 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6259 Use directory block as basic unit.
6261 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6263 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6264 __attribute__ ((__regparm__ (1))).
6266 2008-02-01 Robert Millan <rmh@aybabtu.com>
6268 Correct a mistake in previous commit.
6270 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6272 (normal/command.c_DEPENDENCIES): New variable.
6274 2008-02-01 Robert Millan <rmh@aybabtu.com>
6276 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6278 (normal/command.c_DEPENDENCIES): New variable.
6279 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6280 * conf/i386-ieee1275.rmk: Likewise.
6281 * conf/i386-linuxbios.rmk: Likewise.
6282 * conf/i386-pc.rmk: Likewise.
6283 * conf/sparc64-ieee1275.rmk: Likewise.
6284 * conf/powerpc-ieee1275.rmk: Likewise.
6285 (grub_emu_SOURCES): Add `fs/fshelp.c'.
6287 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6289 2008-02-01 Robert Millan <rmh@aybabtu.com>
6291 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6292 call at beginning of function.
6294 2008-01-31 Pavel Roskin <proski@gnu.org>
6296 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6297 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6298 (grub_mkrescue_SOURCES): Likewise.
6299 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6301 2008-01-30 Robert Millan <rmh@aybabtu.com>
6303 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6304 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6305 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6306 (grub_probe_SOURCES): ... to here.
6308 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6309 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6310 * conf/i386-ieee1275.rmk: Likewise.
6311 * conf/i386-linuxbios.rmk: Likewise.
6312 * conf/powerpc-ieee1275.rmk: Likewise.
6314 2008-01-30 Tristan Gingold <gingold@free.fr>
6316 * kern/rescue.c: Silently accept empty lines.
6318 2008-01-29 Bean <bean123ch@gmail.com>
6320 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6321 (real_code_2): Code cleanup and change comment style.
6322 (move_memory): Avoid using 32-bit address mode.
6324 2008-01-29 Bean <bean123ch@gmail.com>
6326 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6327 (png_mod_SOURCES): New variable.
6328 (png_mod_CFLAGS): Likewise.
6329 (png_mod_LDFLAGS): Likewise.
6331 * video/readers/png.c: New file.
6333 2008-01-28 Robert Millan <rmh@aybabtu.com>
6335 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6336 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6337 `ifndef GRUB_MOD_GAP' hack.
6338 * util/elf/grub-mkimage.c (add_segments): Likewise.
6340 2008-01-27 Robert Millan <rmh@aybabtu.com>
6342 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6343 `GRUB_MOD_GAP' for platforms in which it's not defined.
6344 * util/elf/grub-mkimage.c (add_segments): Likewise.
6346 2008-01-27 Robert Millan <rmh@aybabtu.com>
6348 Get grub-emu to build again (including parallel builds).
6350 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6352 (util/grub-emu.c_DEPENDENCIES): ... this, ...
6353 (normal/execute.c_DEPENDENCIES): ... this, ...
6354 (grub-emu_DEPENDENCIES): ... and this.
6356 * conf/i386-efi.rmk: Likewise.
6357 * conf/i386-linuxbios.rmk: Likewise.
6358 * conf/i386-ieee1275.rmk: Likewise.
6359 * conf/powerpc-ieee1275.rmk: Likewise.
6360 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6362 2008-01-27 Robert Millan <rmh@aybabtu.com>
6364 * NEWS: Add a few items.
6366 2008-01-27 Robert Millan <rmh@aybabtu.com>
6368 Fix parallel builds with grub-emu. Based on earlier commit for
6369 grub-probe and grub-setup.
6371 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6372 (util/grub-emu.c_DEPENDENCIES): ... this.
6373 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6374 (util/grub-emu.c_DEPENDENCIES): ... this.
6375 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6376 (util/grub-emu.c_DEPENDENCIES): ... this.
6377 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6378 (util/grub-emu.c_DEPENDENCIES): ... this.
6379 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6380 (util/grub-emu.c_DEPENDENCIES): ... this.
6382 2008-01-27 Pavel Roskin <proski@gnu.org>
6384 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6385 to create a gap between _end and the modules added to the image
6386 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
6387 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6388 * util/elf/grub-mkimage.c (add_segments): Likewise.
6390 2008-01-26 Pavel Roskin <proski@gnu.org>
6392 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6393 just return an error.
6395 2008-01-26 Bean <bean123ch@gmail.com>
6397 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6398 (grub_reiserfs_get_item): Save offset of the next item.
6399 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6401 2008-01-25 Robert Millan <rmh@aybabtu.com>
6403 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6404 make all filesystem sources appear together (possibly fixing omissions
6406 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6407 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6408 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6409 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6411 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
6413 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6414 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6415 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6416 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6418 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6419 (probe): Add a sanity check to make sure of our ability to read
6420 requested files when probing for filesystem type.
6422 * genmk.rb: Update copyright year (2007).
6424 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6425 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6426 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6427 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6428 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6429 : Remove function prototypes.
6431 2008-01-25 Robert Millan <rmh@aybabtu.com>
6433 Revert my previous commits (based on wrong assumption of how grub_errno
6436 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6437 * kern/file.c (grub_file_open): Likewise.
6439 2008-01-24 Pavel Roskin <proski@gnu.org>
6441 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6442 that hang if GRUB tries to setup colors.
6443 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6444 colors for firmwares that don't support it.
6445 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6446 Recognize Open Hack'Ware, set flags to work around its
6449 2008-01-24 Robert Millan <rmh@aybabtu.com>
6451 * kern/file.c (grub_file_open): Do not account previous failures of
6452 unrelated functions when grub_errno is checked for.
6453 Reported by Oleg Strikov.
6455 2008-01-24 Bean <bean123ch@gmail.com>
6457 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6458 (grub_ufs_sblock): New member volume name.
6459 (grub_ufs_find_file): Fix string copy bug.
6460 (grub_ufs_label): Implement this function properly.
6462 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6463 (grub_hfs_iterate_records): Use the correct file number for extents
6464 and catalog file. Fix problem in next index calculation.
6465 (grub_hfs_find_node): Replace recursive function call with loop.
6466 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6468 2008-01-23 Robert Millan <rmh@aybabtu.com>
6470 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6471 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6472 (grub_multiboot2_real_boot): New function prototype.
6474 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6475 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6477 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6478 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6480 2008-01-23 Robert Millan <rmh@aybabtu.com>
6482 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6483 #ifdef'ed out grub_printf().
6485 2008-01-23 Robert Millan <rmh@aybabtu.com>
6487 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6488 grub_dprintf calls, since they make "debug=all" mode unusable.
6489 (grub_console_checkkey): Likewise.
6491 2008-01-23 Robert Millan <rmh@aybabtu.com>
6493 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6494 `term/i386/pc/at_keyboard.c'.
6495 (pkglib_MODULES): Add `serial.mod'.
6496 (serial_mod_SOURCES): New variable.
6497 (serial_mod_CFLAGS): Likewise.
6498 (serial_mod_LDFLAGS): Likewise.
6500 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6501 `<grub/powerpc/ieee1275/console.h>'.
6502 (grub_keyboard_controller_init): New function prototype.
6503 (grub_console_checkkey): Likewise.
6504 (grub_console_getkey): Likewise.
6506 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6509 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6510 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6512 2008-01-23 Robert Millan <rmh@aybabtu.com>
6514 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6515 present, "(memdisk)/boot/grub" becomes the default prefix.
6517 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6518 a memdisk tarball with all the modules. Add --overlay=DIR option that
6519 allows users to overlay additional files into the image.
6521 2008-01-23 Robert Millan <rmh@aybabtu.com>
6523 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6524 and `machine/memory.h'.
6525 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6526 (_multiboot_mod_SOURCES): New variable.
6527 (_multiboot_mod_CFLAGS): Likewise.
6528 (_multiboot_mod_LDFLAGS): Likewise.
6529 (multiboot_mod_SOURCES): Likewise.
6530 (multiboot_mod_CFLAGS): Likewise.
6531 (multiboot_mod_LDFLAGS): Likewise.
6533 * include/grub/i386/ieee1275/loader.h: New file.
6535 * include/grub/i386/ieee1275/machine.h: Likewise.
6537 * include/grub/i386/ieee1275/memory.h: Likewise.
6539 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6540 variable declaration.
6541 (grub_os_area_size): Likewise.
6543 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6544 (grub_lower_mem, grub_upper_mem): New variables.
6545 (grub_stop_floppy): New function (just to make
6546 grub_multiboot2_real_boot() happy).
6548 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6549 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6550 (grub_stop): New function.
6551 Include `"../realmode.S"' and `"../loader.S"'.
6553 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6554 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6556 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6557 rely on grub_multiboot2_real_boot() for final boot.
6559 2008-01-22 Robert Millan <rmh@aybabtu.com>
6561 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6562 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6563 device that doesn't look like an SD card.
6564 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6565 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6566 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6567 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6570 2008-01-22 Robert Millan <rmh@aybabtu.com>
6572 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6573 avoid claiming over our own code.
6575 2008-01-22 Bean <bean123ch@gmail.com>
6577 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6578 (jpeg_mod_SOURCES): New variable.
6579 (jpeg_mod_CFLAGS): Likewise.
6580 (jpeg_mod_LDFLAGS): Likewise.
6582 * video/readers/jpeg.c : New file.
6584 2008-01-22 Bean <bean123ch@gmail.com>
6586 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6587 there are no more items.
6589 2008-01-21 Robert Millan <rmh@aybabtu.com>
6591 * kern/mm.c (grub_mm_init_region): Improve debug message.
6593 2008-01-21 Robert Millan <rmh@aybabtu.com>
6595 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6596 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6598 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6600 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6601 Indicates start of upper memory.
6602 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6603 (generate_image): Abort when image size is big enough to corrupt
6606 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6607 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6608 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6609 instead of hardcoding 0xA0000.
6610 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6611 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6612 instead of hardcoding 0xA0000.
6614 2008-01-21 Robert Millan <rmh@aybabtu.com>
6616 * disk/memdisk.c (memdisk_size): New variable.
6617 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6619 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6620 image to dynamic memory.
6621 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6622 `memdisk_size'. Free memdisk block.
6624 2008-01-21 Robert Millan <rmh@aybabtu.com>
6626 Fix detection of very small filesystems (like tar).
6628 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6629 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6630 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6631 a problem with this disk).
6633 2008-01-21 Robert Millan <rmh@aybabtu.com>
6635 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6636 on grub_biosdisk_rw_standard() error.
6638 2008-01-21 Robert Millan <rmh@aybabtu.com>
6640 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6642 * kern/elf.c: Likewise.
6643 * kern/ieee1275/ieee1275.c: Likewise.
6644 * kern/powerpc/ieee1275/openfw.c: Likewise.
6645 * term/ieee1275/ofconsole.c: Likewise.
6647 2008-01-21 Robert Millan <rmh@aybabtu.com>
6649 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6651 * include/grub/kernel.h (grub_arch_memdisk_addr)
6652 (grub_arch_memdisk_size): Moved from here ...
6654 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6655 (grub_arch_memdisk_size): ... to here.
6657 2008-01-21 Robert Millan <rmh@aybabtu.com>
6659 Mostly based on bugfix from Bean.
6661 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6662 attribute with hook() parameter.
6663 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6665 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6666 attribute with hook() parameter.
6667 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6670 2008-01-21 Robert Millan <rmh@aybabtu.com>
6672 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6673 (pkglib_MODULES): Add `memdisk.mod'.
6674 (memdisk_mod_SOURCES): New variable.
6675 (memdisk_mod_CFLAGS): Likewise.
6676 (memdisk_mod_LDFLAGS): Likewise.
6678 * disk/memdisk.c: New file.
6680 * include/grub/disk.h (grub_disk_dev_id): Add
6681 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6683 * include/grub/i386/pc/kernel.h
6684 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6685 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6686 (grub_kernel_image_size): New variable declaration.
6687 (grub_total_module_size): Likewise.
6688 (grub_memdisk_image_size): Likewise.
6690 * include/grub/i386/pc/memory.h
6691 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6693 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6694 (grub_arch_memdisk_addr): New variable declaration.
6695 (grub_arch_memdisk_size): Likewise.
6697 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6698 (grub_arch_memdisk_size): Likewise.
6700 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6701 (codestart): Replace hardcoded `0x100000' with
6702 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6704 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6705 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6706 not NULL, append the contents of the file it refers to, at the end of
6707 the compressed kernel image. Initialize `grub_memdisk_image_size'
6708 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6709 (options): Add "memdisk"|'m' option.
6710 (main): Parse --memdisk|-m option, and pass user-provided path as
6711 parameter to generate_image().
6713 2008-01-20 Robert Millan <rmh@aybabtu.com>
6715 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6716 grub_dprintf() calls from here ...
6717 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6719 2008-01-20 Robert Millan <rmh@aybabtu.com>
6721 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6723 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6725 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6726 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6727 `GRUB_IEEE1275_FLAG_REAL_MODE'.
6728 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6730 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6731 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6733 2008-01-19 Robert Millan <rmh@aybabtu.com>
6735 Get rid of confusing function (superseded by
6736 `grub_ieee1275_get_integer_property')
6737 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6739 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6741 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6742 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
6743 in native endianness from grub_ieee1275_get_integer_property().
6745 2008-01-19 Robert Millan <rmh@aybabtu.com>
6747 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6748 command after "shut-down", since implementations differ on which
6749 the command for halt is.
6751 2008-01-19 Robert Millan <rmh@aybabtu.com>
6753 * include/grub/i386/linuxbios/console.h: Add header protection.
6754 (grub_keyboard_controller_init): New function prototype.
6755 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6756 (KEYBOARD_COMMAND_READ): Likewise.
6757 (KEYBOARD_COMMAND_WRITE): Likewise.
6758 (KEYBOARD_SCANCODE_SET1): Likewise.
6759 (grub_keyboard_controller_write): New function.
6760 (grub_keyboard_controller_read): Likewise.
6761 (grub_keyboard_controller_init): Likewise.
6763 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6764 (grub_console_init): On coreboot/LinuxBIOS, call
6765 grub_keyboard_controller_init().
6767 2008-01-19 Robert Millan <rmh@aybabtu.com>
6769 PowerPC changes provided by Pavel Roskin.
6771 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6772 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6773 don't rely on cmain() doing it.
6774 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6775 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6777 2008-01-16 Robert Millan <rmh@aybabtu.com>
6779 * include/grub/i386/linuxbios/memory.h
6780 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6781 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6782 receive `table_header' as argument. Instead, probe for it in the
6783 known memory ranges where it can be present.
6784 (grub_available_iterate): Do not pass a fixed `table_header' address
6785 to grub_linuxbios_table_iterate().
6787 2008-01-15 Robert Millan <rmh@aybabtu.com>
6789 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6790 * conf/i386-ieee1275.rmk: New file.
6791 * include/grub/i386/ieee1275/console.h: Likewise.
6792 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6793 * include/grub/i386/ieee1275/kernel.h: Likewise.
6794 * include/grub/i386/ieee1275/time.h: Likewise.
6795 * kern/i386/ieee1275/init.c: Likewise.
6796 * kern/i386/ieee1275/startup.S: Likewise.
6798 2008-01-15 Robert Millan <rmh@aybabtu.com>
6800 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6801 when pointers are 32-bit (but still do set it to one when they are
6804 2008-01-15 Robert Millan <rmh@aybabtu.com>
6806 * include/grub/ieee1275/ieee1275.h
6807 (grub_ieee1275_get_integer_property): New function prototype.
6809 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6810 (grub_ieee1275_get_integer_property): New function. Wraps around
6811 grub_ieee1275_get_property() to handle endianness.
6813 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6814 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6816 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6817 (grub_map): Likewise.
6818 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6820 2008-01-15 Bean <bean123ch@gmail.com>
6822 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6823 (grub_script_execute_cmdline): Reset grub_errno.
6825 * normal/main.c (read_config_file): Reset grub_errno.
6827 * normal/parse.y (script_init): New.
6828 (script): Move function and menuentry here.
6830 (command): Add delimiter at the end of command.
6831 (commands): Adjust to match the new command.
6832 (commandblock): Remove grub_script_lexer_record_start.
6833 (menuentry): Add grub_script_lexer_record_start, use the new commands.
6834 (if): Use the new commands.
6836 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6838 2008-01-15 Robert Millan <rmh@aybabtu.com>
6840 * normal/menu.c (run_menu): Move timeout message from here ...
6841 (print_timeout): ... to here.
6842 (run_menu): Use print_timeout() once during initial draw to print
6843 the whole message, and again in every clock tick to update only
6844 the number of seconds.
6846 2008-01-15 Robert Millan <rmh@aybabtu.com>
6848 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6849 actual size of `available' from grub_ieee1275_get_property(), and
6850 restrict parsing to that bound.
6852 2008-01-15 Christian Franke <franke@computer.org>
6854 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6855 (argp_program_version): Remove variable.
6856 (argp_program_bug_address): Likewise.
6857 (options): Convert from struct argp_option to struct option.
6858 (struct arguments): Remove.
6859 (parse_opt): Remove.
6860 (usage): New function.
6861 (main): Replace struct args members by simple variables.
6862 Replace argp_parse() by getopt_long().
6863 Add switch to evaluate options.
6864 Add missing "(...)" around root_dev in prefix string.
6866 2008-01-14 Robert Millan <rmh@aybabtu.com>
6868 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6869 for grub_ieee1275_exit(), in order to improve portability.
6871 2008-01-14 Robert Millan <rmh@aybabtu.com>
6873 * util/grub.d/10_linux.in (prefix): Define.
6874 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6876 2008-01-13 Pavel Roskin <proski@gnu.org>
6878 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6879 grub_errno if no errors have been detected.
6881 2008-01-12 Robert Millan <rmh@aybabtu.com>
6883 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6884 (grub_util_get_dev_abstraction): New function prototype.
6886 * util/getroot.c: Include `<grub/util/getroot.h>'
6887 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6888 (grub_util_get_dev_abstraction): ... here (new function).
6890 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6891 `PRINT_ABSTRACTION'.
6892 (probe): Probe for abstraction type when requested.
6893 (main): Understand `--target=abstraction'.
6895 * util/i386/efi/grub-install.in: Add abstraction module to core
6896 image when it is found to be necessary.
6897 * util/i386/pc/grub-install.in: Likewise.
6898 * util/powerpc/ieee1275/grub-install.in: Likewise.
6900 * util/update-grub_lib.in (font_path): Return system path without
6901 converting to GRUB path.
6902 * util/update-grub.in: Convert system path returned by font_path()
6903 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6904 abstraction module is needed for loading fonts (if any). Export
6905 that as `GRUB_PRELOAD_MODULES'.
6906 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6909 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6911 Remove some unused code from reiserfs.
6913 * fs/reiserfs.c (struct grub_reiserfs_key)
6914 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6915 (struct grub_reiserfs_node_body): Removed.
6916 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6918 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6920 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6922 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6924 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6926 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6928 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6929 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6930 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6932 2008-01-10 Robert Millan <rmh@aybabtu.com>
6934 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6935 Determines if a file is garbage left by packaging systems, etc.
6936 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6937 for processing /etc/grub.d scripts.
6938 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6939 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6940 as a condition for processing Linux images.
6942 2008-01-10 Pavel Roskin <proski@gnu.org>
6944 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6945 to compile reiserfs.c on PowerPC.
6947 2008-01-10 Robert Millan <rmh@aybabtu.com>
6949 * kern/device.c (grub_device_iterate): Do not abort device iteration
6950 when one of the devices cannot be opened.
6951 * kern/disk.c (grub_disk_open): Do not account previous failures of
6952 unrelated functions when grub_errno is checked for.
6954 2008-01-08 Robert Millan <rmh@aybabtu.com>
6956 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6957 `! grub_linux_is_bzimage', change order of address comparison to make
6958 it more intuitive, and improve "too big zImage" error message.
6960 2008-01-08 Robert Millan <rmh@aybabtu.com>
6962 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6963 `$(update-grub_DATA)'.
6964 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6967 2008-01-07 Robert Millan <rmh@aybabtu.com>
6969 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6970 which instruction is modified by grub-setup during installation
6971 (since it wasn't obvious by only looking at this file).
6973 2008-01-07 Robert Millan <rmh@aybabtu.com>
6975 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6976 listing actual TODO items.
6978 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6980 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6982 (grub_reiserfs_get_key_offset): Likewise.
6983 (grub_reiserfs_set_key_offset): Likewise.
6984 (grub_reiserfs_set_key_type): Likewise.
6985 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
6987 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6988 better to remove the bitfield version completely.
6990 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6992 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6993 allocated from the heap, due to the fshelp implementation.
6994 (grub_reiserfs_dir): Free NODE, due to the same reason.
6996 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6998 Mostly from Vincent Pelletier:
7000 * fs/reiserfs.c: New file.
7002 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7003 (reiserfs_mod_SOURCES): New variable.
7004 (reiserfs_mod_CFLAGS): Likewise.
7005 (reiserfs_mod_LDFLAGS): Likewise.
7007 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7008 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7009 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7012 2008-01-06 Robert Millan <rmh@aybabtu.com>
7014 * normal/color.c: Remove `<grub/env.h>'.
7016 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7018 * include/grub/normal.h: Include <grub/env.h>.
7020 2008-01-05 Robert Millan <rmh@aybabtu.com>
7022 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7023 usage example with `(hd0,1)'.
7024 Reported by Samuel Thibault.
7026 2008-01-05 Robert Millan <rmh@aybabtu.com>
7028 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7029 (grub_linux_boot_zimage): Rename to ...
7030 (grub_linux_boot): ... this.
7031 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7032 (grub_linux_boot_zimage): Conditionalize zImage copy.
7034 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7035 (grub_linux_boot_bzimage): Remove prototype.
7036 (grub_linux_boot_zimage): Rename to ...
7037 (grub_linux_boot): ... this.
7039 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7040 (grub_linux_boot): Remove function.
7042 2008-01-05 Robert Millan <rmh@aybabtu.com>
7044 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7045 (grub_env_write_color_highlight): Likewise.
7046 (grub_wait_after_message): Likewise.
7048 * normal/color.c: New file.
7050 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7051 (normal_mod_DEPENDENCIES): Likewise.
7053 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7054 (normal_mod_DEPENDENCIES): Likewise.
7056 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7057 (normal_mod_DEPENDENCIES): Likewise.
7059 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7060 (normal_mod_DEPENDENCIES): Likewise.
7062 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7063 for waiting after a message is printed.
7064 * normal/main.c (read_config_file): Likewise.
7065 (grub_normal_init): Register grub_env_write_color_normal() and
7066 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7067 `color_highlight' variables as global.
7069 * normal/menu.c (grub_wait_after_message): New function.
7070 (grub_color_menu_normal): New variable. Replaces ...
7071 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7072 (grub_color_menu_highlight): New variable. Replaces ...
7073 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7074 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7075 `GRUB_TERM_COLOR_STANDARD'.
7076 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7077 `normal_code' and `highlight_code' to `old_color_normal' and
7078 `old_color_highlight', respectively.
7079 (grub_menu_init_page): Update colors when drawing the menu, based on
7080 `menu_color_normal' and `menu_color_highlight' variables.
7081 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7082 a message is printed.
7084 2008-01-05 Robert Millan <rmh@aybabtu.com>
7086 * kern/env.c (grub_env_context_open): Propagate hooks for global
7087 variables to new context.
7089 * kern/main.c (grub_set_root_dev): Export `root' variable.
7091 2008-01-05 Robert Millan <rmh@aybabtu.com>
7093 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
7094 discs unconditionally, since udev and others have options to provide
7097 2008-01-05 Robert Millan <rmh@aybabtu.com>
7099 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7101 2008-01-04 Christian Franke <franke@computer.org>
7103 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7106 2008-01-03 Pavel Roskin <proski@gnu.org>
7108 * kern/i386/linuxbios/init.c: Put "void" to all function
7109 declarations with no arguments.
7110 * kern/powerpc/ieee1275/init.c: Likewise.
7111 * term/i386/pc/at_keyboard.c: Likewise.
7112 * term/i386/pc/vga_text.c: Likewise.
7113 * util/grub-mkdevicemap.c: Likewise.
7115 2008-01-02 Robert Millan <rmh@aybabtu.com>
7117 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7118 message when loaded image is out of bounds.
7119 (grub_multiboot_load_elf64): Likewise.
7121 2008-01-02 Pavel Roskin <proski@gnu.org>
7123 * util/grub.d/10_linux.in: Try version without ".old" when
7124 looking for initrd. It's better to use initrd from the newer
7125 kernel of the same version than no initrd at all.
7127 2008-01-01 Robert Millan <rmh@aybabtu.com>
7129 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7131 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7133 * include/grub/video.h: Added grub_video_unmap_color and
7134 grub_video_get_active_render_target.
7135 (grub_video_adapter): Added unmap_color and get_active_render_target.
7137 * video/video.c: Added grub_video_unmap_color and
7138 grub_video_get_active_render_target.
7139 (grub_video_get_info): Changed method to accept NULL pointer as an
7140 argument to allow detection of active video adapter.
7142 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7143 grub_video_vbe_unmap_color_int.
7144 Added grub_video_vbe_unmap_color and
7145 grub_video_vbe_get_active_render_target.
7146 (grub_video_vbe_adapter): Added unmap_color and
7147 get_active_render_target.
7149 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
7150 with grub_video_vbe_unmap_color_int.
7152 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7153 (DEFAULT_NORMAL_COLOR): Likewise.
7154 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7155 (DEFAULT_FG_COLOR): Removed.
7156 (DEFAULT_BG_COLOR): Likewise.
7157 (DEFAULT_CURSOR_COLOR): Changed value.
7158 (grub_virtual_screen): Added standard_color_setting,
7159 normal_color_setting, highlight_color_setting and term_color.
7160 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7161 (bitmap_width): Added.
7162 (bitmap_height): Likewise.
7164 (set_term_color): Likewise.
7165 (grub_virtual_screen_setup): Changed to use new terminal coloring
7167 (grub_gfxterm_init): Added init for bitmap.
7168 (grub_gfxterm_fini): Added destroy for bitmap.
7169 (redraw_screen_rect): Updated to use background bitmap and new
7171 (scroll_up): Added optimization for case when there is no bitmap.
7172 (grub_gfxterm_cls): Fixed to use correct background color.
7173 (grub_virtual_screen_setcolorstate): Changed to use new terminal
7175 (grub_virtual_screen_setcolor): Likewise.
7176 (grub_virtual_screen_getcolor): Added.
7177 (grub_gfxterm_background_image_cmd): Likewise.
7178 (grub_video_term): Added setcolor and getcolor.
7179 (MOD_INIT): Added registration of background_image command.
7180 (MOD_TERM): Added unregistration for background_image command.
7182 2007-12-30 Pavel Roskin <proski@gnu.org>
7184 * loader/multiboot_loader.c: Fix multiboot command
7185 unregistration. Fix all typos in the word "multiboot".
7187 2007-12-29 Pavel Roskin <proski@gnu.org>
7189 * util/grub.d/10_linux.in: Refactor search for initrd. Add
7190 support for initrd names used in Fedora.
7192 2007-12-26 Bean <bean123ch@gmail.com>
7194 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
7195 (cpio_mod_SOURCES): New variable.
7196 (cpio_mod_CFLAGS): Likewise.
7197 (cpio_mod_LDFLAGS): Likewise.
7199 * fs/cpio.c: New file.
7201 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
7203 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7205 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7207 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7209 2007-12-25 Robert Millan <rmh@aybabtu.com>
7211 * include/grub/term.h (struct grub_term): Add `getcolor' function.
7212 (grub_getcolor): New function.
7214 * kern/term.c (grub_getcolor): New function.
7215 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
7216 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
7217 (print_entry): Set normal and highlight colors to
7218 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
7219 respectively, before printing and restore them to old
7221 (grub_menu_init_page): Likewise. Fill an additional colored space
7222 that would otherwise be left blank.
7224 * term/efi/console.c (grub_console_getcolor): New function.
7225 (struct grub_console_term.getcolor): New variable.
7226 * term/i386/pc/console.c (grub_console_getcolor): New function.
7227 (struct grub_console_term.getcolor): New variable.
7228 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
7229 (struct grub_console_term.getcolor): New variable.
7231 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
7232 (struct grub_console_term.setcolor): Remove variable.
7233 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
7234 (struct grub_console_term.setcolor): Remove variable.
7235 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
7236 (struct grub_console_term.setcolor): Remove variable.
7237 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
7238 (struct grub_console_term.setcolor): Remove variable.
7240 2007-12-25 Robert Millan <rmh@aybabtu.com>
7242 * configure.ac: Search for possible unifont.hex locations, and
7243 define UNIFONT_HEX if found.
7245 * Makefile.in (UNIFONT_HEX): Define variable.
7246 (DATA): Rename to ...
7247 (PKGLIB): ... this. Update all users.
7248 (PKGDATA): New variable.
7249 (pkgdata_IMAGES): Rename to ...
7250 (pkglib_IMAGES): ... this. Update all users.
7251 (pkgdata_MODULES): Rename to ...
7252 (pkglib_MODULES): ... this. Update all users.
7253 (pkgdata_PROGRAMS): Rename to ...
7254 (pkglib_PROGRAMS): ... this. Update all users.
7255 (pkgdata_DATA): Rename to ...
7256 (pkglib_DATA): ... this. Update all users.
7257 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7258 (unicode.pff, ascii.pff): New rules.
7259 (all-local): Add `$(PKGDATA)' dependency.
7260 (install-local): Process `$(PKGDATA)'.
7262 * util/update-grub_lib.in (font_path): Search for *.pff files in
7263 a few more locations, including `${pkgdata}'.
7265 2007-12-23 Robert Millan <rmh@aybabtu.com>
7267 Patch from Bean <bean123ch@gmail.com>:
7268 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7271 2007-12-21 Bean <bean123ch@gmail.com>
7273 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7274 (ntfscomp_mod_SOURCES): New variable.
7275 (ntfscomp_mod_CFLAGS): Likewise.
7276 (ntfscomp_mod_LDFLAGS): Likewise.
7278 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7279 (grub_probe_SOURCES): Likewise.
7280 (grub_emu_SOURCES): Likewise.
7282 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7283 (grub_emu_SOURCES): Likewise.
7285 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7286 (grub_emu_SOURCES): Likewise.
7288 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7289 (grub_emu_SOURCES): Likewise.
7291 * fs/ntfs.c (grub_ntfscomp_func): New variable.
7292 (read_run_list): Renamed to grub_ntfs_read_run_list.
7293 (decomp_nextvcn): Moved to ntfscomp.c.
7294 (decomp_getch): Likewise.
7295 (decomp_get16): Likewise.
7296 (decomp_block): Likewise.
7297 (read_block): Likewise.
7298 (read_data): Partially moved to ntfscomp.c.
7299 (fixup): Change unsigned to grub_uint16_t.
7300 (read_mft): Change unsigned long to grub_uint32_t.
7301 (read_attr): Likewise.
7302 (read_data): Likewise.
7303 (read_run_data): Likewise.
7304 (read_run_list): Likewise.
7305 (read_mft): Likewise.
7307 * fs/ntfscomp.c: New file.
7309 * include/grub/ntfs.h: New file.
7311 2007-12-16 Robert Millan <rmh@aybabtu.com>
7313 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7314 IDE disk check, since Linux is known to support 20 IDE disks.
7315 Reported by Colin Watson.
7317 2007-12-15 Bean <bean123ch@gmail.com>
7319 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7320 (lnxboot_img_SOURCES): New variable.
7321 (lnxboot_img_ASFLAGS): Likewise.
7322 (lnxboot_img_LDFLAGS): Likewise.
7324 * boot/i386/pc/lnxboot.S: New file.
7326 2007-11-24 Pavel Roskin <proski@gnu.org>
7328 * configure.ac: Test if '--build-id=none' is supported by the
7329 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
7330 objcopy to generate incorrect binary files (binutils
7331 2.17.50.0.18-1 as shipped by Fedora 8).
7332 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7333 linking, so that build ID doesn't break the test.
7335 2007-11-24 Pavel Roskin <proski@gnu.org>
7337 * include/grub/i386/time.h: use "void" in the argument list
7339 * include/grub/powerpc/time.h: Likewise.
7340 * include/grub/sparc64/time.h: Likewise.
7342 2007-11-18 Christian Franke <franke@computer.org>
7344 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7345 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7346 This fixes the problem that function keys did not work in grub-emu.
7348 2007-11-18 Christian Franke <franke@computer.org>
7350 * disk/host.c (grub_host_open): Remove attribute unused from
7351 name parameter. Add check for "host". This fixes the problem
7352 that grub-emu does not find partitions.
7354 2007-11-18 Christian Franke <franke@computer.org>
7356 * util/hostfs.c (is_dir): New function.
7357 (grub_hostfs_dir): Handle missing dirent.d_type case.
7358 (grub_hostfs_read): Add missing fseek().
7359 (grub_hostfs_label): Clear label pointer. This fixes a crash
7360 of grub-emu on "ls (host)".
7362 2007-11-18 Christian Franke <franke@computer.org>
7364 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7365 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7366 to 64 bit boundary by default.
7368 2007-11-18 Bean <bean123ch@gmail.com>
7370 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7371 (hexdump_mod_SOURCES): New variable.
7372 (hexdump_mod_CFLAGS): Likewise.
7373 (hexdump_mod_LDFLAGS): Likewise.
7375 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7377 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7379 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7381 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7383 * include/grub/hexdump.h: New file.
7385 * commands/hexdump.c: New file.
7387 2007-11-10 Robert Millan <rmh@aybabtu.com>
7389 * commands/i386/pc/play.c (beep_off): Switch order of arguments
7390 in grub_outb() calls.
7391 (beep_on): Likewise.
7393 2007-11-10 Christian Franke <franke@computer.org>
7395 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7396 (grub_menu_run): Likewise.
7398 2007-11-10 Robert Millan <rmh@aybabtu.com>
7400 * include/grub/i386/efi/machine.h: New file.
7401 * include/grub/i386/linuxbios/machine.h: Likewise.
7402 * include/grub/i386/pc/machine.h: Likewise.
7403 * include/grub/powerpc/ieee1275/machine.h: Likewise.
7404 * include/grub/sparc64/ieee1275/machine.h: Likewise.
7406 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7407 (serial_hw_io_addr): New variable.
7408 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7409 instead of `(unsigned short *) 0x400'.
7411 2007-11-10 Bean <bean123ch@gmail.com>
7413 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7415 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7417 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7418 (vga_mod_SOURCES): Added.
7419 (vga_mod_CFLAGS): Likewise.
7420 (vga_mod_LDFLAGS): Likewise.
7422 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7424 (set_map_mask): Likewise.
7425 (set_read_map): Likewise.
7426 (set_read_address): Likewise.
7427 (vga_font): Removed variable.
7428 (get_vga_glyph): Removed function.
7429 (invalidate_char): Likewise.
7430 (write_char): Changed to use grub_font_get_glyph() for font
7432 (grub_vga_putchar): Likewise.
7433 (grub_vga_getcharwidth): Likewise.
7435 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7437 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7439 (pxeboot_img_LDFLAGS): Likewise.
7440 (diskboot_img_LDFLAGS): Likewise.
7441 (kernel_img_LDFLAGS): Likewise.
7443 2007-11-06 Robert Millan <rmh@aybabtu.com>
7445 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7446 in grub_outb() calls.
7447 (serial_hw_init): Likewise.
7449 2007-11-05 Robert Millan <rmh@aybabtu.com>
7451 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7452 spaces. Skip non-regular files.
7454 2007-11-05 Robert Millan <rmh@aybabtu.com>
7456 * kern/disk.c (grub_disk_firmware_fini)
7457 (grub_disk_firmware_is_tainted): New variables.
7459 * include/grub/disk.h (grub_disk_firmware_fini)
7460 (grub_disk_firmware_is_tainted): Likewise.
7462 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7463 (grub_disk_biosdisk_fini): ... to here.
7464 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7465 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7466 is set. Register grub_disk_biosdisk_fini() in
7467 `grub_disk_firmware_fini'.
7469 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7470 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7471 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7472 to finish existing firmware disk interface.
7474 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7475 (ata_mod_SOURCES): New variable.
7476 (ata_mod_CFLAGS): Likewise.
7477 (ata_mod_LDFLAGS): Likewise.
7479 2007-11-05 Robert Millan <rmh@aybabtu.com>
7481 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7482 (grub_ata_wait): Reimplement using grub_millisleep().
7484 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7485 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7487 2007-11-03 Marco Gerards <marco@gnu.org>
7489 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7490 (CRTC_ADDR_PORT): New macro.
7491 (CRTC_DATA_PORT): Likewise.
7492 (CRTC_CURSOR): Likewise.
7493 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7494 (CRTC_CURSOR_ADDR_LOW): Likewise.
7495 (update_cursor): New function.
7496 (grub_console_real_putchar): Call `update_cursor'.
7497 (grub_console_gotoxy): Likewise.
7498 (grub_console_cls): Set the default color when clearing the
7500 (grub_console_setcursor): Implemented.
7502 2007-11-03 Marco Gerards <marco@gnu.org>
7504 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7506 (grub_ata_pio_write): Likewise.
7508 (grub_atapi_identify): Wait after issuing an ATA command.
7509 (grub_atapi_packet): Likewise.
7510 (grub_ata_identify): Likewise.
7511 (grub_ata_readwrite): Likewise.
7513 2007-11-03 Marco Gerards <marco@gnu.org>
7515 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7516 (grub_ata_pio_write): Likewise.
7517 (grub_ata_readwrite): Use `grub_error', instead of
7518 returning `grub_errno'.
7520 2007-11-03 Marco Gerards <marco@gnu.org>
7522 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7523 grub_ata_pio_write once for every single sector, instead of for
7526 2007-10-31 Robert Millan <rmh@aybabtu.com>
7528 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7530 * conf/i386-linuxbios.rmk: New file.
7532 * kern/i386/pc/hardware.c: Likewise.
7533 * term/i386/pc/at_keyboard.c: Likewise.
7534 * term/i386/pc/vga_text.c: Likewise.
7536 * include/grub/i386/linuxbios/boot.h: Likewise.
7537 * include/grub/i386/linuxbios/console.h: Likewise.
7538 * include/grub/i386/linuxbios/init.h: Likewise.
7539 * include/grub/i386/linuxbios/kernel.h: Likewise.
7540 * include/grub/i386/linuxbios/loader.h: Likewise.
7541 * include/grub/i386/linuxbios/memory.h: Likewise.
7542 * include/grub/i386/linuxbios/serial.h: Likewise.
7543 * include/grub/i386/linuxbios/time.h: Likewise.
7545 * kern/i386/linuxbios/init.c: Likewise.
7546 * kern/i386/linuxbios/startup.S: Likewise.
7547 * kern/i386/linuxbios/table.c: Likewise.
7549 2007-10-31 Marco Gerards <marco@gnu.org>
7551 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7552 (ata_mod_SOURCES): New variable.
7553 (ata_mod_CFLAGS): Likewise.
7554 (ata_mod_LDFLAGS): Likewise.
7556 * disk/ata.c: New file.
7558 * include/grub/disk.h (grub_disk_dev_id): Add
7559 `GRUB_DISK_DEV_ATA_ID'.
7561 2007-10-31 Robert Millan <rmh@aybabtu.com>
7563 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7564 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7566 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7567 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7569 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7572 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7574 2007-10-27 Robert Millan <rmh@aybabtu.com>
7576 * include/grub/types.h (ULONG_MAX): Define macro.
7578 2007-10-22 Robert Millan <rmh@aybabtu.com>
7580 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7582 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7584 2007-10-22 Robert Millan <rmh@aybabtu.com>
7586 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7587 (pkgdata_MODULES): Add `biosdisk.mod'.
7588 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7591 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7592 (grub_biosdisk_init): Replace with ...
7593 (GRUB_MOD_INIT(biosdisk)): ... this.
7594 (grub_biosdisk_fini): Replace with ...
7595 (GRUB_MOD_FINI(biosdisk)): ... this.
7597 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7598 (grub_machine_init): Remove call to grub_biosdisk_init().
7599 (grub_machine_fini): Remove call to grub_machine_fini().
7601 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7603 2007-10-22 Robert Millan <rmh@aybabtu.com>
7605 * include/grub/time.h: New file.
7606 * include/grub/i386/time.h: Likewise.
7607 * include/grub/powerpc/time.h: Likewise.
7608 * include/grub/sparc64/time.h: Likewise.
7610 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7612 (KERNEL_MACHINE_TIME_HEADER): ... this.
7613 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7615 (KERNEL_MACHINE_TIME_HEADER): ... this.
7616 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7618 (KERNEL_MACHINE_TIME_HEADER): ... this.
7620 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7621 (grub_millisleep): New function.
7622 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7623 (grub_millisleep): New function.
7624 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7625 Remove `grub/machine/time.h' include.
7626 (grub_millisleep): New function.
7627 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7628 Remove `grub/machine/time.h' include.
7629 (grub_millisleep): New function.
7631 * include/grub/misc.h (grub_div_roundup): New function.
7633 * kern/misc.c: Include `<grub/time.h>'.
7634 (grub_millisleep_generic): New function.
7636 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7638 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7640 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7641 `machine/time.h'. Add `time.h'.
7642 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7644 2007-10-21 Robert Millan <rmh@aybabtu.com>
7646 * include/grub/misc.h (grub_max): New function.
7648 2007-10-21 Robert Millan <rmh@aybabtu.com>
7650 * util/misc.c (grub_util_info): Call fflush() before returning.
7652 2007-10-20 Robert Millan <rmh@aybabtu.com>
7654 * genmk.rb (Image): Copy `extra_flags' from here ...
7655 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7657 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7658 to `argc' and `args' arguments.
7660 2007-10-17 Robert Millan <rmh@aybabtu.com>
7662 * kern/i386/loader.S: New file.
7664 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7665 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7666 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7667 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7668 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7669 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7670 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7671 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7672 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7673 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7674 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7675 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7676 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7677 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7679 * kern/i386/realmode.S: New file.
7681 * kern/i386/pc/startup.S (protstack): Moved from here ...
7682 * kern/i386/realmode.S (protstack)... to here.
7683 * kern/i386/pc/startup.S (gdt): Moved from here ...
7684 * kern/i386/realmode.S (gdt)... to here.
7685 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7686 * kern/i386/realmode.S (prot_to_real)... to here.
7688 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7689 `kern/i386/realmode.S'.
7691 2007-10-17 Robert Millan <rmh@aybabtu.com>
7693 * include/grub/i386/loader.h: New file.
7695 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7696 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7697 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7698 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7699 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7700 * include/grub/i386/loader.h (grub_linux_prot_size)
7701 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7702 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7703 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7704 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7706 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7708 2007-10-15 Robert Millan <rmh@aybabtu.com>
7710 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7711 filesystem when dev->disk is unset.
7712 Do probe for filesystem even when dev->disk->has_partitions is set.
7713 In case a filesystem is found, always report it.
7714 In case it isn't, if dev->disk->has_partitions is set, report that
7715 a partition table was found instead of reporting that no filesystem
7716 could be identified.
7718 2007-10-12 Robert Millan <rmh@aybabtu.com>
7720 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7721 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7723 * include/grub/types.h (grub_host_to_target16): New macro.
7724 (grub_host_to_target32): Likewise.
7725 (grub_host_to_target64): Likewise.
7726 (grub_target_to_host16): Likewise.
7727 (grub_target_to_host32): Likewise.
7728 (grub_target_to_host64): Likewise.
7730 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7732 (GRUB_MOD_ALIGN): ...this. Update all users.
7734 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7735 grub_host_to_target32.
7736 Replace grub_be_to_cpu32 with grub_target_to_host32.
7737 (load_modules): Likewise.
7738 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7739 Replace grub_be_to_cpu32 with grub_target_to_host32.
7740 Replace grub_cpu_to_be16 with grub_host_to_target16.
7741 Replace grub_cpu_to_be32 grub_host_to_target32.
7743 2007-10-12 Robert Millan <rmh@aybabtu.com>
7745 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7746 * util/elf/grub-mkimage.c: ... here.
7748 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7749 `util/powerpc/ieee1275/grub-mkimage.c'.
7751 2007-10-07 Robert Millan <rmh@aybabtu.com>
7753 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7754 and make it easier to figure out.
7755 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7756 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7757 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7758 leave us with less than HEAP_MIN_SIZE total heap.
7759 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
7761 2007-10-03 Robert Millan <rmh@aybabtu.com>
7763 * include/grub/i386/io.h: New file.
7764 * commands/i386/pc/play.c (inb): Removed.
7766 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7768 * term/i386/pc/serial.c (inb): Removed.
7770 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7772 * term/i386/pc/vga.c (inb): Removed.
7774 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7777 2007-10-02 Robert Millan <rmh@aybabtu.com>
7779 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7780 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7781 Reported by Marcin Kurek.
7783 2007-09-07 Robert Millan <rmh@aybabtu.com>
7785 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7786 SmartFirmware version updates (as released by Sven Luther), and avoid
7787 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7788 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7791 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7794 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7795 when merging two regions.
7797 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7799 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7800 * normal/completion.c (grub_normal_do_completion): Likewise.
7801 Reported by Hitoshi Ozeki.
7803 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7805 Do not use devices at boot in chainloading.
7807 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7808 (boot_part_addr): Likewise.
7809 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7810 with BOOT_DRIVE and BOOT_PART_ADDR.
7811 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7812 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7814 2007-08-29 Robert Millan <rmh@aybabtu.com>
7816 Patch from Simon Peter <dn.tlp@gmx.net>:
7817 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7818 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7819 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7820 util/i386/pc/grub-setup.c_DEPENDENCIES.
7821 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7822 util/grub-probe.c_DEPENDENCIES.
7823 * conf/powerpc-ieee1275.rmk: Likewise.
7825 2007-08-28 Robert Millan <rmh@aybabtu.com>
7827 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7828 to tell grub-mkdevicemap how to name devices.
7829 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7832 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7833 util/i386/get_disk_name.c.
7834 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7835 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7836 util/ieee1275/get_disk_name.c.
7838 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7840 * DISTLIST: Add util/i386/get_disk_name.c and
7841 util/ieee1275/get_disk_name.c.
7843 * util/grub-mkdevicemap.c: Replace device naming logic with
7844 grub_util_get_disk_name() calls.
7846 2007-08-20 Robert Millan <rmh@aybabtu.com>
7848 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7849 (so that it works for both plural and singular quantities).
7851 2007-08-05 Robert Millan <rmh@aybabtu.com>
7853 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7854 so that [xz] isn't taken into account when determining order.
7856 2007-08-02 Marco Gerards <marco@gnu.org>
7858 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7859 `include/multiboot2.h', `include/grub/elfload.h',
7860 `include/multiboot.h', `include/grub/multiboot.h',
7861 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7862 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7863 `kern/elf.c', `loader/multiboot_loader.c',
7864 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7865 `loader/i386/pc/multiboot2.c',
7866 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7867 `util/i386/pc/grub-mkrescue.in'. Remove
7868 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7869 `include/grub/i386/pc/util/biosdisk.h' and
7870 `include/grub/powerpc/ieee1275/multiboot.h'.
7872 2007-08-02 Bean <bean123ch@gmail.com>
7874 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7875 (ntfs_mod_SOURCES): New variable.
7876 (ntfs_mod_CFLAGS): Likewise.
7877 (ntfs_mod_LDFLAGS): Likewise.
7879 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7880 (grub_probe_SOURCES): Likewise.
7881 (grub_emu_SOURCES): Likewise.
7883 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7884 (grub_emu_SOURCES): Likewise.
7886 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7887 (grub_emu_SOURCES): Likewise.
7889 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7891 * fs/ntfs.c: New file.
7893 2007-08-02 Bean <bean123ch@gmail.com>
7895 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7897 * file.h (grub_file): Likewise.
7899 * fshelp.h (grub_fshelp_read_file): Likewise.
7901 * util/i386/pc/grub-setup.c (setup): Likewise.
7902 (save_first_sector): Likewise.
7903 (save_blocklists): Likewise.
7905 * fs/affs.c (grub_affs_read_file): Likewise.
7907 * fs/ext2.c (grub_ext2_read_file): Likewise.
7909 * fs/fat.c (grub_fat_read_data): Likewise.
7911 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7913 * fs/hfs.c (grub_hfs_read_file): Likewise.
7915 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7917 * fs/jfs.c (grub_jfs_read_file): Likewise.
7919 * fs/minix.c (grub_minix_read_file): Likewise.
7921 * fs/sfs.c (grub_sfs_read_file): Likewise.
7923 * fs/ufs.c (grub_ufs_read_file): Likewise.
7925 * fs/xfs.c (grub_xfs_read_file): Likewise.
7927 * command/blocklist.c (read_blocklist): Likewise.
7928 (print_blocklist): Likewise.
7930 2007-08-02 Marco Gerards <marco@gnu.org>
7932 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7935 * disk/host.c: New file.
7937 * util/hostfs.c: Likewise.
7939 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7940 return `GRUB_ERR_BAD_FS'.
7941 * fs/sfs.c (grub_sfs_mount): Likewise.
7942 * fs/xfs.c (grub_xfs_mount): Likewise.
7944 * include/grub/disk.h (enum grub_disk_dev_id): Add
7945 `GRUB_DISK_DEVICE_HOST_ID'.
7947 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7949 2007-07-24 Jerone Young <jerone@gmail.com>
7951 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
7952 modules for compilation.
7953 * conf/powerpc-ieee1275.rmk: Likewise.
7955 * include/multiboot.h: Move multiboot definitions to one file. Rename
7956 many definitions to not get grub specific.
7957 * include/multiboot2.h: Create header with multiboot 2 definitions.
7958 * include/grub/multiboot.h: Header for grub specific function
7959 prototypes and definitions.
7960 * include/grub/multiboot2.h: Likewise.
7961 * include/grub/multiboot_loader.h: Likewise.
7962 * include/grub/i386/pc/multiboot.h: Removed.
7963 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7965 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7966 and 2 to allow for one multiboot and module commands.
7967 * loader/multiboot2.c: Add multiboot2 functionality.
7968 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7969 and definition names.
7970 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7972 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7973 ieee1275 specific multiboot2 code.
7975 * kern/i386/pc/startup.S: Change headers and definition names for
7976 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7978 2007-07-22 Robert Millan <rmh@aybabtu.com>
7980 * geninitheader.sh: Process file specified in first parameter rather
7981 than hardcoding grub_modules_init.lst.
7982 * geninit.sh: Likewise. Also, construct header name dynamically rather
7983 than hardcoding grub_modules_init.h.
7985 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7986 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7987 grub_probe_init.[ch] and grub_setup_init.[ch].
7989 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7990 grub_modules_init.h with grub_emu_init.h.
7991 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7992 grub_probe_init.[ch] files.
7993 * conf/i386-efi.rmk: Likewise.
7994 * conf/i386-pc.rmk: Likewise.
7995 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7996 grub_setup_init.[ch] files.
7998 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7999 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8000 to initialize modules rather than a list of hardcoded functions.
8001 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8002 grub_init_all() to initialize modules rather than a list of hardcoded
8005 2007-07-22 Robert Millan <rmh@aybabtu.com>
8007 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8008 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8010 2007-07-22 Robert Millan <rmh@aybabtu.com>
8012 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8013 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8014 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8015 flag when running on SmartFirmware.
8016 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8017 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8020 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8021 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8022 rather than decreasing it.
8024 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8025 there's not enough space to do it, fail in the same way as when it
8026 can't be done because there are no partitions.
8028 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8029 when nvsetenv failed.
8031 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8033 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8034 because this rule is automatically generated.
8035 (grub-mkrescue): Removed for the same reason as above.
8037 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8039 Migrate to GNU General Public License Version 3.
8041 * COPYING: Replaced with the plain text version of GPLv3.
8043 * config.guess: Updated from gnulib.
8044 * config.sub: Likewise.
8046 * geninit.sh: Output a GPLv3 copyright notice.
8047 * geninitheader.sh: Likewise.
8048 * genmodsrc.sh: Likewise.
8049 * gensymlist.sh.in: Likewise.
8051 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8052 * boot/i386/pc/diskboot.S: Likewise.
8053 * boot/i386/pc/pxeboot.S: Likewise.
8054 * commands/blocklist.c: Likewise.
8055 * commands/boot.c: Likewise.
8056 * commands/cat.c: Likewise.
8057 * commands/cmp.c: Likewise.
8058 * commands/configfile.c: Likewise.
8059 * commands/echo.c: Likewise.
8060 * commands/help.c: Likewise.
8061 * commands/ls.c: Likewise.
8062 * commands/search.c: Likewise.
8063 * commands/terminal.c: Likewise.
8064 * commands/test.c: Likewise.
8065 * commands/videotest.c: Likewise.
8066 * commands/i386/cpuid.c: Likewise.
8067 * commands/i386/pc/halt.c: Likewise.
8068 * commands/i386/pc/play.c: Likewise.
8069 * commands/i386/pc/reboot.c: Likewise.
8070 * commands/i386/pc/vbeinfo.c: Likewise.
8071 * commands/i386/pc/vbetest.c: Likewise.
8072 * commands/ieee1275/halt.c: Likewise.
8073 * commands/ieee1275/reboot.c: Likewise.
8074 * commands/ieee1275/suspend.c: Likewise.
8075 * disk/loopback.c: Likewise.
8076 * disk/lvm.c: Likewise.
8077 * disk/raid.c: Likewise.
8078 * disk/efi/efidisk.c: Likewise.
8079 * disk/i386/pc/biosdisk.c: Likewise.
8080 * disk/ieee1275/ofdisk.c: Likewise.
8081 * font/manager.c: Likewise.
8082 * fs/affs.c: Likewise.
8083 * fs/ext2.c: Likewise.
8084 * fs/fat.c: Likewise.
8085 * fs/fshelp.c: Likewise.
8086 * fs/hfs.c: Likewise.
8087 * fs/hfsplus.c: Likewise.
8088 * fs/iso9660.c: Likewise.
8089 * fs/jfs.c: Likewise.
8090 * fs/minix.c: Likewise.
8091 * fs/sfs.c: Likewise.
8092 * fs/ufs.c: Likewise.
8093 * fs/xfs.c: Likewise.
8094 * hello/hello.c: Likewise.
8095 * include/grub/acorn_filecore.h: Likewise.
8096 * include/grub/arg.h: Likewise.
8097 * include/grub/bitmap.h: Likewise.
8098 * include/grub/boot.h: Likewise.
8099 * include/grub/cache.h: Likewise.
8100 * include/grub/device.h: Likewise.
8101 * include/grub/disk.h: Likewise.
8102 * include/grub/dl.h: Likewise.
8103 * include/grub/elfload.h: Likewise.
8104 * include/grub/env.h: Likewise.
8105 * include/grub/err.h: Likewise.
8106 * include/grub/file.h: Likewise.
8107 * include/grub/font.h: Likewise.
8108 * include/grub/fs.h: Likewise.
8109 * include/grub/fshelp.h: Likewise.
8110 * include/grub/gzio.h: Likewise.
8111 * include/grub/hfs.h: Likewise.
8112 * include/grub/kernel.h: Likewise.
8113 * include/grub/loader.h: Likewise.
8114 * include/grub/lvm.h: Likewise.
8115 * include/grub/misc.h: Likewise.
8116 * include/grub/mm.h: Likewise.
8117 * include/grub/net.h: Likewise.
8118 * include/grub/normal.h: Likewise.
8119 * include/grub/parser.h: Likewise.
8120 * include/grub/partition.h: Likewise.
8121 * include/grub/pc_partition.h: Likewise.
8122 * include/grub/raid.h: Likewise.
8123 * include/grub/rescue.h: Likewise.
8124 * include/grub/script.h: Likewise.
8125 * include/grub/setjmp.h: Likewise.
8126 * include/grub/symbol.h: Likewise.
8127 * include/grub/term.h: Likewise.
8128 * include/grub/terminfo.h: Likewise.
8129 * include/grub/tparm.h: Likewise.
8130 * include/grub/types.h: Likewise.
8131 * include/grub/video.h: Likewise.
8132 * include/grub/efi/api.h: Likewise.
8133 * include/grub/efi/chainloader.h: Likewise.
8134 * include/grub/efi/console.h: Likewise.
8135 * include/grub/efi/console_control.h: Likewise.
8136 * include/grub/efi/disk.h: Likewise.
8137 * include/grub/efi/efi.h: Likewise.
8138 * include/grub/efi/pe32.h: Likewise.
8139 * include/grub/efi/time.h: Likewise.
8140 * include/grub/i386/linux.h: Likewise.
8141 * include/grub/i386/setjmp.h: Likewise.
8142 * include/grub/i386/types.h: Likewise.
8143 * include/grub/i386/efi/kernel.h: Likewise.
8144 * include/grub/i386/efi/loader.h: Likewise.
8145 * include/grub/i386/efi/time.h: Likewise.
8146 * include/grub/i386/pc/biosdisk.h: Likewise.
8147 * include/grub/i386/pc/boot.h: Likewise.
8148 * include/grub/i386/pc/chainloader.h: Likewise.
8149 * include/grub/i386/pc/console.h: Likewise.
8150 * include/grub/i386/pc/init.h: Likewise.
8151 * include/grub/i386/pc/kernel.h: Likewise.
8152 * include/grub/i386/pc/loader.h: Likewise.
8153 * include/grub/i386/pc/memory.h: Likewise.
8154 * include/grub/i386/pc/multiboot.h: Likewise.
8155 * include/grub/i386/pc/serial.h: Likewise.
8156 * include/grub/i386/pc/time.h: Likewise.
8157 * include/grub/i386/pc/vbe.h: Likewise.
8158 * include/grub/i386/pc/vbeblit.h: Likewise.
8159 * include/grub/i386/pc/vbefill.h: Likewise.
8160 * include/grub/i386/pc/vbeutil.h: Likewise.
8161 * include/grub/i386/pc/vga.h: Likewise.
8162 * include/grub/ieee1275/ieee1275.h: Likewise.
8163 * include/grub/ieee1275/ofdisk.h: Likewise.
8164 * include/grub/powerpc/libgcc.h: Likewise.
8165 * include/grub/powerpc/setjmp.h: Likewise.
8166 * include/grub/powerpc/types.h: Likewise.
8167 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8168 * include/grub/powerpc/ieee1275/console.h: Likewise.
8169 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8170 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8171 * include/grub/powerpc/ieee1275/loader.h: Likewise.
8172 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8173 * include/grub/powerpc/ieee1275/time.h: Likewise.
8174 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8175 * include/grub/sparc64/libgcc.h: Likewise.
8176 * include/grub/sparc64/setjmp.h: Likewise.
8177 * include/grub/sparc64/types.h: Likewise.
8178 * include/grub/sparc64/ieee1275/console.h: Likewise.
8179 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8180 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8181 * include/grub/sparc64/ieee1275/time.h: Likewise.
8182 * include/grub/util/biosdisk.h: Likewise.
8183 * include/grub/util/getroot.h: Likewise.
8184 * include/grub/util/lvm.h: Likewise.
8185 * include/grub/util/misc.h: Likewise.
8186 * include/grub/util/raid.h: Likewise.
8187 * include/grub/util/resolve.h: Likewise.
8188 * io/gzio.c: Likewise.
8189 * kern/device.c: Likewise.
8190 * kern/disk.c: Likewise.
8191 * kern/dl.c: Likewise.
8192 * kern/elf.c: Likewise.
8193 * kern/env.c: Likewise.
8194 * kern/err.c: Likewise.
8195 * kern/file.c: Likewise.
8196 * kern/fs.c: Likewise.
8197 * kern/loader.c: Likewise.
8198 * kern/main.c: Likewise.
8199 * kern/misc.c: Likewise.
8200 * kern/mm.c: Likewise.
8201 * kern/parser.c: Likewise.
8202 * kern/partition.c: Likewise.
8203 * kern/rescue.c: Likewise.
8204 * kern/term.c: Likewise.
8205 * kern/efi/efi.c: Likewise.
8206 * kern/efi/init.c: Likewise.
8207 * kern/efi/mm.c: Likewise.
8208 * kern/i386/dl.c: Likewise.
8209 * kern/i386/efi/init.c: Likewise.
8210 * kern/i386/efi/startup.S: Likewise.
8211 * kern/i386/pc/init.c: Likewise.
8212 * kern/i386/pc/lzo1x.S: Likewise.
8213 * kern/i386/pc/startup.S: Likewise.
8214 * kern/ieee1275/ieee1275.c: Likewise.
8215 * kern/powerpc/cache.S: Likewise.
8216 * kern/powerpc/dl.c: Likewise.
8217 * kern/powerpc/ieee1275/cmain.c: Likewise.
8218 * kern/powerpc/ieee1275/crt0.S: Likewise.
8219 * kern/powerpc/ieee1275/init.c: Likewise.
8220 * kern/powerpc/ieee1275/openfw.c: Likewise.
8221 * kern/sparc64/cache.S: Likewise.
8222 * kern/sparc64/dl.c: Likewise.
8223 * kern/sparc64/ieee1275/init.c: Likewise.
8224 * kern/sparc64/ieee1275/openfw.c: Likewise.
8225 * loader/efi/chainloader.c: Likewise.
8226 * loader/efi/chainloader_normal.c: Likewise.
8227 * loader/i386/efi/linux.c: Likewise.
8228 * loader/i386/efi/linux_normal.c: Likewise.
8229 * loader/i386/pc/chainloader.c: Likewise.
8230 * loader/i386/pc/chainloader_normal.c: Likewise.
8231 * loader/i386/pc/linux.c: Likewise.
8232 * loader/i386/pc/linux_normal.c: Likewise.
8233 * loader/i386/pc/multiboot.c: Likewise.
8234 * loader/i386/pc/multiboot_normal.c: Likewise.
8235 * loader/powerpc/ieee1275/linux.c: Likewise.
8236 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8237 * normal/arg.c: Likewise.
8238 * normal/cmdline.c: Likewise.
8239 * normal/command.c: Likewise.
8240 * normal/completion.c: Likewise.
8241 * normal/execute.c: Likewise.
8242 * normal/function.c: Likewise.
8243 * normal/lexer.c: Likewise.
8244 * normal/main.c: Likewise.
8245 * normal/menu.c: Likewise.
8246 * normal/menu_entry.c: Likewise.
8247 * normal/misc.c: Likewise.
8248 * normal/parser.y: Likewise.
8249 * normal/script.c: Likewise.
8250 * normal/i386/setjmp.S: Likewise.
8251 * normal/powerpc/setjmp.S: Likewise.
8252 * normal/sparc64/setjmp.S: Likewise.
8253 * partmap/acorn.c: Likewise.
8254 * partmap/amiga.c: Likewise.
8255 * partmap/apple.c: Likewise.
8256 * partmap/gpt.c: Likewise.
8257 * partmap/pc.c: Likewise.
8258 * partmap/sun.c: Likewise.
8259 * term/gfxterm.c: Likewise.
8260 * term/terminfo.c: Likewise.
8261 * term/efi/console.c: Likewise.
8262 * term/i386/pc/console.c: Likewise.
8263 * term/i386/pc/serial.c: Likewise.
8264 * term/i386/pc/vesafb.c: Likewise.
8265 * term/i386/pc/vga.c: Likewise.
8266 * term/ieee1275/ofconsole.c: Likewise.
8267 * util/biosdisk.c: Likewise.
8268 * util/console.c: Likewise.
8269 * util/genmoddep.c: Likewise.
8270 * util/getroot.c: Likewise.
8271 * util/grub-emu.c: Likewise.
8272 * util/grub-mkdevicemap.c: Likewise.
8273 * util/grub-probe.c: Likewise.
8274 * util/lvm.c: Likewise.
8275 * util/misc.c: Likewise.
8276 * util/raid.c: Likewise.
8277 * util/resolve.c: Likewise.
8278 * util/update-grub.in: Likewise.
8279 * util/update-grub_lib.in: Likewise.
8280 * util/grub.d/00_header.in: Likewise.
8281 * util/grub.d/10_hurd.in: Likewise.
8282 * util/grub.d/10_linux.in: Likewise.
8283 * util/i386/efi/grub-install.in: Likewise.
8284 * util/i386/efi/grub-mkimage.c: Likewise.
8285 * util/i386/pc/grub-install.in: Likewise.
8286 * util/i386/pc/grub-mkimage.c: Likewise.
8287 * util/i386/pc/grub-mkrescue.in: Likewise.
8288 * util/i386/pc/grub-setup.c: Likewise.
8289 * util/i386/pc/misc.c: Likewise.
8290 * util/powerpc/ieee1275/grub-install.in: Likewise.
8291 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8292 * util/powerpc/ieee1275/misc.c: Likewise.
8293 * video/bitmap.c: Likewise.
8294 * video/video.c: Likewise.
8295 * video/i386/pc/vbe.c: Likewise.
8296 * video/i386/pc/vbeblit.c: Likewise.
8297 * video/i386/pc/vbefill.c: Likewise.
8298 * video/i386/pc/vbeutil.c: Likewise.
8299 * video/readers/tga.c: Likewise.
8301 2007-07-02 Robert Millan <rmh@aybabtu.com>
8303 * conf/i386-efi.rmk: Replace obsolete reference to
8304 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8305 with util/getroot.c.
8306 * conf/powerpc-ieee1275.rmk: Likewise.
8307 * conf/sparc64-ieee1275.rmk: Likewise.
8309 * util/grub-emu.c (main): Fix unchecked pointer handling.
8311 2007-07-02 Robert Millan <rmh@aybabtu.com>
8313 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8314 invocation to fail, in order to support partition-less media.
8316 * util/i386/pc/grub-install.in: Likewise.
8318 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8319 which fs or partmap modules are needed (akin to its sister scripts).
8321 Also use grub-probe to get rid of unportable /proc/mounts check.
8323 Print the same informational message that the other scripts do, before
8326 2007-06-23 Robert Millan <rmh@aybabtu.com>
8328 * util/update-grub_lib.in (font_path): New function. Determine whether
8329 a font file can be found and, if so, echo the GRUB path to it.
8331 * util/update-grub.in: Handle multiple terminals depending on user
8332 input, platform availability and font file presence. Propagate
8333 variables of our findings to /etc/grub.d/ children.
8335 * util/grub.d/00_header.in: Handle multiple terminals, based on
8336 environment setup by update-grub.
8338 2007-06-23 Robert Millan <rmh@aybabtu.com>
8340 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8342 2007-06-21 Robert Millan <rmh@aybabtu.com>
8344 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8345 indicate end of data section in kernel image.
8346 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8347 GRUB_KERNEL_MACHINE_DATA_END.
8349 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8351 * kern/i386/efi/startup.S: Likewise.
8353 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8354 during image generation. Implement --prefix option to override this
8356 * util/i386/efi/grub-mkimage.c: Likewise.
8358 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8359 code to make path relative to its root into a separate function.
8361 * util/i386/pc/grub-install.in: Use newly provided
8362 make_system_path_relative_to_its_root() to convert ${grubdir}, then
8363 pass the result to grub-install --prefix.
8365 2007-06-13 Robert Millan <rmh@aybabtu.com>
8367 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8369 * util/grub-emu.c: Use above definitions from misc.h instead of
8371 * util/grub-mkdevicemap.c: Likewise.
8372 * util/i386/pc/grub-setup.c: Likewise.
8373 * util/grub-probe.c: Likewise.
8374 (probe): Abort with grub_util_error() when either
8375 grub_guess_root_device or grub_util_get_grub_dev fails.
8377 2007-06-12 Robert Millan <rmh@aybabtu.com>
8379 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8381 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8383 * util/grub-probe.c (probe): Likewise for "drive_name".
8385 2007-06-11 Robert Millan <rmh@aybabtu.com>
8387 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8388 not just the cdrom one.
8390 2007-06-11 Robert Millan <rmh@aybabtu.com>
8392 * util/i386/pc/grub-mkrescue.in: Add "set -e".
8393 Add --pkglibdir=DIR option to override pkglibdir.
8394 Mention --image-type=TYPE in help output.
8395 Fix --grub-mkimage (it was a no-op).
8396 Abort gracefully when no parameter is given.
8398 2007-06-11 Robert Millan <rmh@aybabtu.com>
8400 * util/i386/pc/grub-mkrescue.in: New file.
8401 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
8402 * Makefile.in: Handle bin_SCRIPTS.
8404 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
8406 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8407 list of video modes.
8409 2007-06-06 Robert Millan <rmh@aybabtu.com>
8411 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8412 file doesn't exist, or if it is in a filesystem grub can't read.
8414 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
8415 not abort if GRUB_DRIVE could not be defined. Rearrange generated
8416 header comment to fit in 80 columns when the variables are resolved.
8418 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8419 could be identified by update-grub. Remove redundant check for
8420 unifont.pff existence (since convert_system_path_to_grub_path now
8423 2007-06-04 Robert Millan <rmh@aybabtu.com>
8425 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8427 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8429 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8431 2007-06-04 Robert Millan <rmh@aybabtu.com>
8433 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8435 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8436 grub_apple_partition_map_fini.
8439 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8440 to access >2 TiB disks).
8442 Print disk->total_sectors with %llu instead of %lu, since this
8443 variable is always 64-bit (prevents wrong disk size from being displayed
8444 on either >2 TiB disk or big-endian CPU).
8446 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8447 into a generic case that supports all (sane) partition maps.
8449 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8452 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8453 and grub_apple_partition_map_fini() after that.
8455 2007-06-01 Robert Millan <rmh@aybabtu.com>
8457 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8459 * util/grub.d/00_header.in: Only enable gfxterm when
8460 convert_system_path_to_grub_path() succeeds.
8462 2007-05-20 Robert Millan <rmh@aybabtu.com>
8464 * util/update-grub_lib.in: New file.
8465 * DISTLIST: Add update-grub_lib.in.
8466 * conf/common.rmk: Generate update-grub_lib and install it in
8468 * Makefile.in: Add install routine for $(lib_DATA).
8470 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8471 function provided by update-grub_lib to support arbitrary paths of
8473 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8474 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8476 2007-05-19 Robert Millan <rmh@aybabtu.com>
8478 * commands/i386/cpuid.c: New module.
8480 * conf/i386-efi.rmk: Enable cpuid.mod.
8481 * conf/i386-pc.rmk: Likewise.
8483 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8485 * kern/disk.c (grub_disk_read): Check return value of
8488 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8490 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8492 * disk/raid.c (grub_raid_open): Likewise.
8494 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8496 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8497 stack instead of on the heap.
8499 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8500 before doing a read on it.
8502 * configure.ac: Only use -fno-stack-protector for the target
8505 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8507 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8508 __attribute_ ((unused)) to mode_type argument.
8510 * util/getroot.c (grub_guess_root_device): Fix #endif.
8512 * kern/misc.c (memcmp): Fix prototype.
8514 * include/grub/partition.h [GRUB_UTIL]
8515 (grub_gpt_partition_map_init): Add prototype.
8516 (grub_gpt_partition_map_fini): Likewise.
8518 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8521 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8522 (grub_fat_read_data): Likewise.
8523 (grub_fat_find_dir): Likewise.
8525 * font/manager.c (find_glyph): Make table a const.
8526 (grub_font_get_glyph): Remove bitmap from if statement.
8528 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8530 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8531 code, first search for device in /dev/mapper, then in /dev.
8532 (grub_util_get_grub_dev): New function.
8533 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8535 * util/grub-probe.c (probe): Remove check for RAID, call
8536 grub_util_get_grub_dev() instead of
8537 grub_util_biosdisk_get_grub_dev().
8538 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8539 grub_util_biosdisk_get_grub_dev().
8540 * util/i386/pc/grub-setup.c (main): Likewise.
8542 2007-05-16 Robert Millan <rmh@aybabtu.com>
8544 * DISTLIST: Update for the latest changes.
8545 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8546 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8547 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8548 grub/util/biosdisk.h.
8549 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8550 grub/util/biosdisk.h.
8552 2007-05-16 Robert Millan <rmh@aybabtu.com>
8554 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8556 2007-05-16 Robert Millan <rmh@aybabtu.com>
8558 * util/i386/efi/grub-install.in: New.
8559 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8560 newly added grub-install.
8561 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8563 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8564 grub/util/biosdisk.h.
8565 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8566 grub/util/biosdisk.h.
8568 2007-05-16 Robert Millan <rmh@aybabtu.com>
8570 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8571 * include/grub/util/biosdisk.h: ... here.
8572 * util/i386/pc/biosdisk.c: Moved to ...
8573 * util/biosdisk.c: ... here.
8574 * util/i386/pc/getroot.c: Moved to ...
8575 * util/getroot.c: ... here.
8576 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8577 * util/grub-mkdevicemap.c: ... here.
8578 * util/i386/pc/grub-probe.c: Moved to ...
8579 * util/grub-probe.c: ... here.
8581 2007-05-15 Robert Millan <rmh@aybabtu.com>
8583 * util/update-grub.in: Remove duplicated line in grub.cfg header
8586 2007-05-13 Robert Millan <rmh@aybabtu.com>
8588 * util/update-grub.in: Fix a few assumptions about the devices holding
8589 /, /boot and /boot/grub being the same.
8590 * util/grub.d/00_header.in: Likewise.
8591 * util/grub.d/10_hurd.in: Likewise.
8592 * util/grub.d/10_linux.in: Likewise.
8594 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8595 patterns. Use that to define the `.old' suffix as older than `'.
8597 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8599 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8600 the grub.cfg header message.
8602 2007-05-11 Robert Millan <rmh@aybabtu.com>
8604 * util/update-grub.in: Create device.map if it doesn't already exist,
8605 before attempting to run grub-probe.
8606 Check for grub-probe and grub-mkdevicemap with the same code
8607 grub-install is using.
8610 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8612 * Makefile.in: Add the datarootdir autoconf variable.
8614 2007-05-09 Robert Millan <rmh@aybabtu.com>
8616 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
8617 fail gracefully if dev->disk->partition == NULL.
8619 2007-05-07 Robert Millan <rmh@aybabtu.com>
8621 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8622 determine partition map module.
8623 * util/i386/pc/grub-install.in: Use this feature to decide which
8624 partition module to load, instead of hardcoding pc and gpt.
8626 2007-05-07 Robert Millan <rmh@aybabtu.com>
8628 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8629 source directory differs from build directory.
8631 2007-05-05 Robert Millan <rmh@aybabtu.com>
8633 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8636 2007-05-05 Robert Millan <rmh@aybabtu.com>
8638 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8640 2007-05-05 Robert Millan <rmh@aybabtu.com>
8642 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8643 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8645 2007-05-05 Robert Millan <rmh@aybabtu.com>
8647 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8648 (grub_probe_SOURCES): Likewise.
8649 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8650 GPT and initialize dos_part and bsd_part accordingly.
8651 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8653 (main): Activate gpt module for use during partition identification,
8654 and deactivate it afterwards.
8655 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8656 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8657 partition identification, and deactivate it afterwards.
8659 2007-05-05 Robert Millan <rmh@aybabtu.com>
8661 * term/i386/pc/console.c (grub_console_fini): Call
8662 grub_term_set_current() before grub_term_unregister().
8664 2007-05-04 Robert Millan <rmh@aybabtu.com>
8666 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8667 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8668 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8669 and update-grub_DATA.
8670 * conf/common.rmk: Build and install update-grub components.
8671 * conf/common.mk: Regenerate.
8672 * util/update-grub.in: New. Core of update-grub.
8673 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8674 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8675 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8676 * util/grub.d/README: New. Document grub.d directory layout.
8678 2007-05-01 Robert Millan <rmh@aybabtu.com>
8680 * util/grub-emu.c: Move initialization functions
8681 grub_util_biosdisk_init() and grub_init_all() before
8682 grub_util_biosdisk_get_grub_dev(), which relies on them.
8684 2007-04-19 Robert Millan <rmh@aybabtu.com>
8686 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8689 2007-04-18 Jerone Young <jerone@gmail.com>
8691 * kernel/elf.c: Add missing parenthesis for conditional statement
8694 2007-04-10 Jerone Young <jerone@gmail.com>
8696 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8697 continue on and look for device node with real device name.
8699 2007-04-10 Jerone Young <jerone@gmail.com>
8701 * configure.ac: Add argument for autoconf to use transformation
8703 * Makefile.in: Add autoconf package transformation code.
8704 * util/i386/pc/grub-install.in: Likewise.
8705 * util/powerpc/ieee1275/grub-install.in: Likewise.
8707 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8709 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8710 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8711 (EXT2_REVISION): Likewise.
8712 (EXT2_INODE_SIZE): Likewise.
8713 (struct grub_ext2_block_group): Added a missing member
8715 (grub_ext2_read_inode): Divide by the inode size in a superblock
8716 instead of 128 to obtain INODES_PER_BLOCK.
8717 Use the macro EXT2_INODE_SIZE instead of directly using
8720 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8722 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8723 superblock instead of the structure size to compute an
8724 offset. This fixes the problem that GRUB could not read a
8725 filesystem when inode size is different from 128-byte.
8727 2007-03-05 Marco Gerards <marco@gnu.org>
8729 * normal/main.c (read_config_file): When "menu" is not set, create
8732 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8734 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8735 (HEAP_LIMIT): New macro.
8736 (grub_claim_heap): Claim memory up to `heaplimit'.
8738 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8740 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8741 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8743 (grub_arch_modules_addr): Return address after `_end'.
8744 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8745 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8746 (add_segments): Calculate `_end' from phdr size and location.
8747 (ALIGN_UP): Moved to ...
8748 * include/grub/misc.h: here.
8749 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8751 (GRUB_IEEE1275_MODULE_BASE): Removed.
8753 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8755 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8758 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8760 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8762 (grub_elf64_load_hook_t): Likewise.
8763 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8766 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8768 * kern/mm.c: Update copyright.
8769 (grub_mm_debug): Correct syntax error.
8770 (grub_mm_dump_free): New function.
8771 (grub_debug_free): Call `grub_free'.
8772 * include/grub/mm.h: Update copyright.
8773 (grub_mm_dump_free): Add declaration.
8775 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8777 * include/grub/ieee1275/ieee1275.h: Update copyright.
8778 * kern/powerpc/ieee1275/init.c: Likewise.
8779 * kern/powerpc/ieee1275/openfw.c: Likewise.
8781 * loader/powerpc/ieee1275/linux.c: Likewise.
8782 * include/grub/elfload.h: Likewise.
8783 * kern/elf.c: Likewise.
8784 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8786 (grub_elf64_load): Likewise.
8787 (grub_elf32_load_segment): Move to a nested function.
8788 (grub_elf64_load_segment): Likewise.
8790 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8792 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8794 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8795 (grub_heap_len): Likewise.
8796 (HEAP_SIZE): New macro.
8797 (grub_claim_heap): New function.
8798 (grub_machine_init): Don't claim heap directly. Call
8800 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8801 (grub_available_iterate): New function.
8803 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8805 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8806 * configure.ac: Use it for testing the HOST and TARGET compilers.
8808 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8810 * Makefile.in (enable_grub_emu): New variable.
8811 * configure.ac (--enable-grub-emu): New option.
8812 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8813 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8814 * conf/i386-pc.rmk: Likewise.
8815 * conf/powerpc-ieee1275.rmk: Likewise.
8816 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8818 2006-12-12 Marco Gerards <marco@gnu.org>
8820 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8822 * kern/env.c (grub_env_unset): Don't free the member `value' when
8823 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8826 * normal/main.c (current_menu): Removed.
8827 (free_menu): Unset the `menu' environment variable.
8828 (grub_normal_menu_addentry): Make use of the environment variable
8829 `menu', instead of using the global `current_menu'. Allocate
8830 memory for the sourcecode of this entry.
8831 (read_config_file): New argument `nested', changed all callers.
8832 Only in the case of a new context, initialize a new menu. Set the
8833 `menu' environment variable.
8834 (grub_normal_execute): Don't set and unset the environment
8835 variable `menu' here anymore. Only free the menu when leaving the
8838 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8841 2006-12-11 Marco Gerards <marco@gnu.org>
8843 * normal/menu_entry.c (run): Fix off by one bug so the last line
8844 is executed. Move the loader check to outside the loop.
8846 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8848 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8850 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8852 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8853 the number of sectors. Reported by Andrey Shuvikov
8854 <mr_hyro@yahoo.com>.
8856 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8858 * kern/disk.c (grub_disk_read): When there is a read error, always
8859 try to read only the necessary data.
8861 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8863 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8865 [GRUB_UTIL] (grub_raid_fini): Likewise.
8866 [GRUB_UTIL] (grub_lvm_init): Likewise.
8867 [GRUB_UTIL] (grub_lvm_fini): Likewise.
8868 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8869 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8870 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8871 and grub_raid_fini().
8873 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8875 * include/grub/types.h (__unused): Rename to UNUSED.
8876 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8877 (grub_elf64_size): Likewise.
8879 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8881 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8882 grub_error_push and grub_error_pop in the error-handling path.
8883 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8886 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8888 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8889 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8890 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8891 (kernel_elf_SOURCES): Likewise.
8892 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8893 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8894 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8895 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8896 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8897 (elf_mod_SOURCES): New variable.
8898 (elf_mod_CFLAGS): Likewise.
8899 (elf_mod_LDFLAGS): Likewise.
8900 * include/grub/types.h (__unused): New macro.
8901 * include/grub/elfload.h: New file.
8902 * kern/elf.c: Likewise.
8903 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8904 (ELF32_LOADMASK): New macro.
8905 (ELF64_LOADMASK): Likewise.
8907 (grub_linux_load32): New function.
8908 (grub_linux_load64): Likewise.
8909 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8910 Use grub_elf_t instead of grub_file_t.
8912 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8914 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8915 `catch_result' to struct set_color_args.
8917 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8919 * normal/menu.c: Include grub/script.h.
8920 * normal/menu_entry.c: Likewise.
8921 * include/grub/normal.h: Do not include grub/script.h.
8923 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8925 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8927 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8929 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8931 (grub_disk_close): Print debug messages when closing a disk.
8932 (grub_disk_read): Print debug messages when disk read fails.
8933 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8935 * kern/partition.c: Include misc.h.
8936 (grub_partition_iterate): Print debug messages when detecting
8939 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8941 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8943 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8945 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8947 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8948 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8950 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8952 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8953 instead of sizeof(lv). Patch by Michael Guntsche.
8955 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8957 * disk/lvm.c: Rename VGS to VG_LIST.
8958 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8959 (grub_lvm_open): Likewise.
8960 Thanks to Michael Guntsche for finding this bug.
8962 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8964 * configure.ac (AC_INIT): Bumped to 1.95.
8966 2006-10-14 Robert Millan <rmh@aybabtu.com>
8968 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8969 with "/dev/.static/dev/md".
8971 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8973 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8974 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8975 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8976 DRIVE_NAME are always freed.
8978 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8979 DOS_PART, as a DOS partition is counted from one instead of zero
8980 now. Reported by Robert Millan.
8982 2006-10-14 Robert Millan <rmh@aybabtu.com>
8984 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8985 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8986 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8987 string returned by grub_guess_root_device.
8988 * util/i386/pc/grub-setup.c: Likewise.
8989 * util/i386/pc/grub-probefs.c: Likewise.
8991 * util/i386/pc/grub-probefs.c: Rename to ...
8992 * util/i386/pc/grub-probe.c: ... this.
8993 * DISTLIST: Remove grub-probefs, add grub-probe.
8994 * conf/i386-efi.rmk: Likewise.
8995 * conf/i386-pc.rmk: Likewise.
8996 * util/i386/pc/grub-install.in: Likewise.
8998 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8999 choose which information we want to print.
9001 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9003 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9004 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9005 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9006 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9007 video/readers/tga.c and video/i386/pc/vbeutil.c.
9009 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9011 Added support for RAID and LVM.
9013 * disk/lvm.c: New file.
9014 * disk/raid.c: Likewise.
9015 * include/grub/lvm.h: Likewise.
9016 * include/grub/raid.h: Likewise.
9017 * include/grub/util/lvm.h: Likewise.
9018 * include/grub/util/raid.h: Likewise.
9019 * util/lvm.c: Likewise.
9020 * util/raid.c: Likewise.
9022 * include/grub/disk.h (grub_disk_dev_id): Add
9023 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9024 (grub_disk_get_size): New prototype.
9025 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9026 returns a partition.
9027 (grub_disk_get_size): New function.
9029 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9030 verbatim if grub_install_dos_part is -2.
9032 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9035 * util/i386/pc/grub-setup.c (setup): New argument
9036 MUST_EMBED. Force embedding of GRUB when the argument is
9037 true. Close FILE before returning.
9038 (main): Add support for RAID and LVM.
9040 * conf/common.rmk: Add RAID and LVM modules.
9041 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9043 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9045 * kern/misc.c (grub_strstr): New function.
9046 * include/grub/misc.h (grub_strstr): New prototype.
9048 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9050 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9052 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9054 * kern/misc.c (grub_strtoull): Guess the base only if not
9057 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9059 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9062 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9064 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9066 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9067 Remove `flags' argument. All callers changed.
9068 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9069 (IEEE1275_IHANDLE_INVALID): New variable.
9070 (IEEE1275_CELL_INVALID): New variable.
9071 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9072 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9073 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9074 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9075 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9076 codes from Open Firmware. All callers updated.
9077 (grub_ieee1275_next_property): Directly return Open Firmware return
9079 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9080 Standardize error checking from `grub_ieee1275_get_property'.
9081 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9082 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9084 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9086 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9087 `instance_to_package_args' to `instance_to_path_args'.
9089 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9090 `grub_ieee1275_chosen'.
9092 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9093 `grub_ieee1275_interpret'.
9095 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9097 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9099 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9101 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9102 (__cmpdi): Likewise.
9104 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9105 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9108 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
9110 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9111 to type `grub_ssize_t'.
9112 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9114 2006-09-22 Marco Gerards <marco@gnu.org>
9116 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9119 2006-09-22 Marco Gerards <marco@gnu.org>
9121 * commands/echo.c: New file.
9123 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9125 * conf/common.rmk (echo_mod_SOURCES): New variable.
9126 (echo_mod_CFLAGS): Likewise.
9127 (echo_mod_LDFLAGS): Likewise.
9129 2006-09-22 Marco Gerards <marco@gnu.org>
9131 * normal/main.c (get_line): Malloc memory instead of using
9132 preallocated memory. Removed the arguments `cmdline' and
9133 `max_len'. Updated all callers.
9135 2006-09-22 Marco Gerards <marco@gnu.org>
9137 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9138 (normal_mod_DEPENDENCIES): Likewise.
9140 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9141 (normal_mod_DEPENDENCIES): Likewise.
9143 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9145 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
9147 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9149 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9150 (normal_mod_DEPENDENCIES): Likewise.
9151 * conf/i386-pc.mk: Regenerate.
9152 * conf/i386-efi.mk: Likewise
9153 * conf/common.mk: Likewise.
9154 * conf/powerpc-ieee1275.mk: Likewise.
9155 * conf/sparc64-ieee1275.mk: Likewise.
9157 2006-09-22 Robert Millan <rmh@aybabtu.com>
9159 Sync with i386 version.
9160 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9161 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9163 2006-09-21 Robert Millan <rmh@aybabtu.com>
9165 Import from GRUB Legacy (lib/device.c):
9166 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9167 (init_device_map) [__linux__]: Add support for I2O devices.
9169 2006-09-14 Marco Gerards <marco@gnu.org>
9171 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9174 2006-09-14 Robert Millan <rmh@aybabtu.com>
9176 * util/i386/pc/grub-install.in: Skip menu.lst when removing
9179 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
9181 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9182 before adding it to device.map.
9184 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
9186 * genmk.rb: Let GCC generate dependencies the first time it
9187 compiles a file; using the -MD option.
9188 * conf/common.mk: Regenerate.
9189 * conf/i386-pc.mk: Likewise.
9190 * conf/i386-efi.mk: Likewise.
9191 * conf/powerpc-ieee1275.mk: Likewise.
9192 * conf/sparc64-ieee1275.mk: Likewise.
9194 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
9196 Move the prototypes of grub_setjmp and grub_longjmp to
9197 cpu/setjmp.h, so that each architecture may specify different
9200 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
9201 (grub_longjmp): Likewise.
9202 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
9203 (grub_longjmp): Likewise.
9204 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
9205 (grub_longjmp): Likewise.
9207 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
9208 [!GRUB_UTIL] (grub_longjmp): Removed.
9210 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
9212 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
9213 "color!" method does not return any value.
9215 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9217 * include/grub/bitmap.h: New file.
9219 * include/grub/i386/pc/vbeutil.h: Likewise.
9221 * video/bitmap.c: Likewise.
9223 * video/readers/tga.c: Likewise.
9225 * video/i386/pc/vbeutil.c: Likewise.
9227 * commands/videotest.c: Code cleanup and updated to reflect to new
9230 * term/gfxterm.c: Likewise.
9232 * video/video.c: Likewise.
9234 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
9235 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
9236 (bitmap_mod_SOURCES): New entry.
9237 (bitmap_mod_CFLAGS): Likewise.
9238 (bitmap_mod_LDFLAGS): Likewise.
9239 (tga_mod_SOURCES): Likewise.
9240 (tga_mod_CFLAGS): Likewise.
9241 (tga_mod_LDFLAGS): Likewise.
9243 * include/grub/video.h (grub_video_blit_operators): New enum type.
9244 (grub_video_render_target): Changed as forward declaration and moved
9245 actual definition to be video driver specific.
9246 (grub_video_adapter.blit_bitmap): Added blitting operator.
9247 (grub_video_adapter.blit_render_target): Likewise.
9248 (grub_video_blit_bitmap): Likewise.
9249 (grub_video_blit_render_target): Likewise.
9251 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9252 driver specific render target definition.
9253 (grub_video_vbe_map_rgba): Added driver internal helper.
9254 (grub_video_vbe_unmap_color): Updated to use
9255 grub_video_i386_vbeblit_info.
9256 (grub_video_vbe_get_video_ptr): Likewise.
9258 * include/grub/i386/pc/vbeblit.h
9259 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9260 grub_video_i386_vbeblit_info.
9261 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9262 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9263 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9264 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9265 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9266 (grub_video_i386_vbeblit_index_index): Likewise.
9267 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9268 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9269 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9270 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9272 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9275 * video/i386/pc/vbeblit.c: Updated to reflect changes on
9276 include/grub/i386/pc/vbeblit.h.
9278 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9279 Updated to use grub_video_i386_vbeblit_info.
9280 (grub_video_i386_vbefill_R8G8B8): Likewise.
9281 (grub_video_i386_vbefill_index): Likewise.
9282 (grub_video_i386_vbefill): Added generic filler.
9284 * video/i386/pc/vbefill.c: Updated to reflect changes on
9285 include/grub/i386/pc/vbefill.h.
9287 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9288 grub_video_i386_vbeblit_info.
9289 (grub_video_vbe_unmap_color): Likewise.
9290 (grub_video_vbe_blit_glyph): Likewise.
9291 (grub_video_vbe_scroll): Likewise.
9292 (grub_video_vbe_draw_pixel): Removed function.
9293 (grub_video_vbe_get_pixel): Likewise.
9294 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9295 updated code to use it.
9296 (common_blitter): Added common blitter for render target and bitmap.
9297 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9298 (grub_video_vbe_blit_render_target): Likewise.
9300 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
9302 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9303 is in text mode if there is no console control protocol instance
9306 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9308 * include/grub/video.h: Code cleanup.
9310 * include/grub/i386/pc/vbe.h: Likewise.
9312 * video/i386/pc/vbe.c: Likewise.
9314 * video/i386/pc/vbeblit.c: Likewise.
9316 * video/i386/pc/vbefill.c: Likewise.
9318 * video/video.c: Likewise. Also added more comments.
9320 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9322 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9323 (struct grub_biosdisk_dap): Likewise.
9325 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
9326 linkage settings for all functions.
9328 2006-07-12 Marco Gerards <marco@gnu.org>
9330 * configure.ac (--enable-mm-debug): Fix typo.
9332 * genkernsyms.sh.in: Use proper quoting for `CC'.
9334 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
9336 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9337 (normal_mod_ASFLAGS): Remove "-m32".
9339 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
9341 * util/misc.c: Include config.h.
9342 [!HAVE_MEMALIGN]: Do not include malloc.h.
9343 (grub_memalign): Use posix_memalign, if present. Then, use
9344 memalign, if present. Otherwise, emit an error.
9346 * util/grub-emu.c: Do not include malloc.h.
9348 * include/grub/util/misc.h: Include unistd.h. This is required for
9349 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9350 D. Eades III <hde@foobar-qux.org>.
9352 * configure.ac (AC_GNU_SOURCE): Added.
9353 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9356 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
9358 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9359 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9361 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
9363 * include/grub/types.h (grub_host_addr_t): Rename to
9365 (grub_host_off_t): Rename to grub_target_off_t.
9366 (grub_host_size_t): Rename to grub_target_size_t.
9367 (grub_host_ssize_t): Rename to grub_target_ssize_t.
9368 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9370 * include/grub/kernel.h (struct grub_module_header): Change type
9371 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9372 (grub_module_info): Likewise.
9374 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9376 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9377 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9378 Velazquez <jesus.velazquez@gmail.com>.
9380 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9382 Count partitions from 1 instead of 0 in the string representation
9383 of partitions. Still use 0-based internally.
9385 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9386 (sun_partition_map_iterate): Use grub_partition_t instead of
9387 struct grub_partition *. Cast DESC->START_CYLINDER to
9388 grub_uint64_t after converting the endian.
9389 (sun_partition_map_probe): Subtract 1 for PARTNUM.
9390 (sun_partition_map_get_name): Add 1 to P->INDEX.
9392 * partmap/pc.c (grub_partition_parse): Subtract 1 for
9394 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9396 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9397 zero instead of one.
9398 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9399 (gpt_partition_map_get_name): Add 1 into P->INDEX.
9401 * partmap/apple.c (apple_partition_map_iterate): Change the type
9403 (apple_partition_map_probe): Subtract 1 for PARTNUM.
9404 (apple_partition_map_get_name): Add 1 into P->INDEX.
9406 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9408 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9409 calculate the offset of a partition.
9410 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9411 (amiga_partition_map_get_name): Add 1 into P->INDEX.
9413 * partmap/acorn.c (acorn_partition_map_find): Change the type of
9414 SECTOR to grub_disk_addr_t.
9415 (acorn_partition_map_iterate): Likewise.
9416 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9417 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9419 (acorn_partition_map_get_name): Add 1 into P->INDEX.
9421 * kern/i386/pc/init.c (make_install_device): Add 1 into
9422 GRUB_INSTALL_DOS_PART.
9424 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9427 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9429 Clean up the code to support 64-bit addressing in disks and
9430 files. This change is not enough for filesystems yet.
9432 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9433 type of "start" to grub_uint64_t.
9434 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9435 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9436 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9439 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9440 to grub_disk_addr_t.
9442 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9445 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9447 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9450 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9452 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9454 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9456 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9457 to grub_off_t, to detect an error from grub_file_seek.
9458 (grub_multiboot_load_elf32): Likewise.
9460 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9461 maximum unsigned long value when an overflow is detected.
9462 (grub_strtoull): New function.
9463 (grub_divmod64): Likewise.
9464 (grub_lltoa): use grub_divmod64.
9466 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9468 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9469 the pointer to next character. Use grub_strtoull instead of
9471 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9472 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9475 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9476 return value is signed.
9477 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9478 test if OFFSET is less than zero, as OFFSET is unsigned now.
9480 * kern/disk.c (struct grub_disk_cache): Change the type of
9481 "sector" to grub_disk_addr_t.
9482 (grub_disk_cache_get_index): Change the type of SECTOR to
9483 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9484 unsigned after shifting.
9485 (grub_disk_cache_invalidate): Change the type of SECTOR to
9487 (grub_disk_cache_unlock): Likewise.
9488 (grub_disk_cache_store): Likewise.
9489 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9490 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9491 grub_disk_addr_t and grub_uint64_t, respectively.
9492 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9493 body, as the value of OFFSET is tweaked by
9494 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9495 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9497 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9498 body, as the value of OFFSET is tweaked by
9499 grub_disk_check_range. Change the types of LEN and N to
9502 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9503 and "saved_offset" to grub_off_t.
9504 (test_header): Cast BUF to char *.
9505 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9507 (grub_gzio_read): Change the types of OFFSET and SIZE to
9508 grub_off_t and grub_size_t, respectively.
9510 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9512 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9513 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9514 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9515 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9516 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9518 * include/grub/types.h (grub_off_t): Unconditionally set to
9520 (grub_disk_addr_t): Changed to grub_uint64_t.
9522 * include/grub/partition.h (struct grub_partition): Change the
9523 types of "start", "len" and "offset" to grub_disk_addr_t,
9524 grub_uint64_t and grub_disk_addr_t, respectively.
9525 (grub_partition_get_start): Return grub_disk_addr_t.
9526 (grub_partition_get_len): Return grub_uint64_t.
9528 * include/grub/misc.h (grub_strtoull): New prototype.
9529 (grub_divmod64): Likewise.
9531 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9532 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9533 grub_off_t, respectively.
9534 All callers and references changed.
9536 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9537 grub_size_t in "read".
9538 All callers and references changed.
9540 * include/grub/file.h (struct grub_file): Change the types of
9541 "offset" and "size" to grub_off_t and grub_off_t,
9542 respectively. Change the type of SECTOR to grub_disk_addr_t in
9544 (grub_file_read): Change the type of LEN to grub_size_t.
9545 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9547 (grub_file_size): Return grub_off_t.
9548 (grub_file_tell): Likewise.
9549 All callers and references changed.
9551 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9552 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9554 (struct grub_disk): Change the type of "total_sectors" to
9555 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
9557 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9558 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9559 (grub_disk_write): Likewise.
9560 All callers and references changed.
9562 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9563 char * for grub_strncmp to silence gcc.
9564 (grub_iso9660_mount): Likewise.
9565 (grub_iso9660_mount): Likewise.
9566 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9568 (grub_iso9660_iterate_dir): Likewise.
9569 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9571 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9572 LEN to grub_disk_addr_t and grub_size_t, respectively.
9574 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9576 * fs/jfs.c (grub_jfs_read_file): Likewise.
9578 * fs/minix.c (grub_jfs_read_file): Likewise.
9580 * fs/sfs.c (grub_jfs_read_file): Likewise.
9582 * fs/ufs.c (grub_jfs_read_file): Likewise.
9584 * fs/xfs.c (grub_jfs_read_file): Likewise.
9586 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9587 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9590 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9591 BLKNR to -1 instead of returning GRUB_ERRNO.
9592 (grub_ext2_read_file): Change the types of SECTOR and
9593 LEN to grub_disk_addr_t and grub_size_t, respectively.
9595 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9596 LEN to grub_disk_addr_t and grub_size_t, respectively.
9598 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9601 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9602 string. Do not cast SECTOR explicitly.
9604 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9605 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9606 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9607 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9608 over 2TB and LBA mode is not supported, raise an error.
9609 (get_safe_sectors): New function.
9610 (grub_biosdisk_read): Use get_safe_sectors.
9611 (grub_biosdisk_write): Likewise.
9613 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9614 (grub_efidisk_write): Likewise.
9616 * disk/loopback.c (delete_loopback): Cosmetic changes.
9617 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9619 (grub_loopback_open): Likewise.
9620 (grub_loopback_read): Likewise. Also, change the type of POS to
9621 grub_off_t, and fix the usage of grub_memset.
9623 * commands/i386/pc/play.c: Include grub/machine/time.h.
9625 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9628 * commands/configfile.c: Include grub/env.h.
9630 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9631 GRUB_ERRNO directly instead. Change the type of POS to
9632 grub_off_t. Follow the coding standard.
9634 * commands/blocklist.c: Include grub/partition.h.
9635 (grub_cmd_blocklist): Return an error if the underlying device is
9636 not a disk. Take the starting sector of a partition into account,
9637 if a partition is used.
9639 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9641 (lba_mode): Support 64-bit addresses.
9642 (chs_mode): Likewise.
9643 (copy_buffer): Adapted to the new offsets of a length field and a
9645 (blocklist_default_start): Allocate 64-bit space.
9647 * boot/i386/pc/boot.S (force_lba): Removed.
9648 (boot_drive): Moved to under KERNEL_SECTOR.
9649 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
9651 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9653 (lba_mode): Refactored to support a 64-bit address. More size
9655 (setup_sectors): Likewise.
9657 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9659 * DISTLIST: Added include/grub/i386/linux.h. Removed
9660 include/grub/i386/pc/linux.h
9662 * configure.ac (AC_INIT): Bumped to 1.94.
9664 * config.guess: Updated from gnulib.
9665 * config.sub: Likewise.
9666 * install-sh: Likewise.
9667 * mkinstalldirs: Likewise.
9669 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9671 * conf/common.rmk (grub_modules_init.lst): Depended on
9672 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9675 * genmk.rb (PModule::rule): Reverted the previous change.
9677 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9679 * conf/common.rmk (grub_modules_init.lst): Depends on
9680 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9681 that the target does not exist before producing.
9682 (grub_modules_init.h): Remove the target before generating.
9683 (grub_emu_init.c): Likewise.
9685 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9687 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9689 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9690 for the target-specific tests. Make sure that we also have the
9691 up-to-date target variables for those tests.
9693 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9695 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9696 (PModule::rule): Likewise.
9698 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9700 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9701 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9702 target-specific flags should be prefixed.
9703 (PModule::rule): Likewise.
9705 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9707 * configure.ac (CMP): Check if cmp is available explicitly.
9709 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9711 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9712 (target_cpu): New variable.
9713 (pkglibdir): Use target_cpu instead of host_cpu.
9715 * util/i386/pc/grub-install.in (host_cpu): Removed.
9716 (target_cpu): New variable.
9717 (pkglibdir): Use target_cpu instead of host_cpu.
9719 * util/genmoddep.c: Removed.
9721 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9722 instead of GRUB_HOST_SIZEOF_VOID_P.
9723 * kern/dl.c: Likewise.
9725 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9727 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9728 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9729 (GRUB_TARGET_SIZEOF_LONG): ... this.
9730 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9731 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9732 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9734 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9735 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9736 (GRUB_TARGET_SIZEOF_LONG): ... this.
9737 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9738 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9739 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9741 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9742 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9743 (GRUB_TARGET_SIZEOF_LONG): ... this.
9744 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9745 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9747 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9748 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9749 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9750 instead of GRUB_HOST_SIZEOF_LONG.
9751 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9752 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9753 GRUB_CPU_WORDS_BIGENDIAN.
9754 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9755 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9758 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9759 (genmoddep_SOURCES): Likewise.
9760 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9761 (genmoddep_SOURCES): Likewise.
9762 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9763 (genmoddep_SOURCES): Likewise.
9764 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9766 (genmoddep_SOURCES): Likewise.
9768 * genmoddep.awk: New file.
9770 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9771 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9772 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9773 (PModule::rule): Likewise.
9774 (Program::rule): Likewise.
9775 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9776 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9779 * configure.ac: Rewritten intensively to use host and target
9780 instead of build and host, respectively.
9782 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9783 (host_cpu): Removed.
9784 (target_cpu): New variable.
9785 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9786 (BUILD_CC): Removed.
9787 (BUILD_CFLAGS): Likewise.
9788 (BUILD_CPPFLAGS): Likewise.
9789 (TARGET_CC): New variable.
9790 (TARGET_CFLAGS): Likewise.
9791 (TARGET_CPPFLAGS): Likewise.
9792 (TARGET_LDFLAGS): Likewise.
9794 (include): Use target_cpu instead of host_cpu.
9795 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9797 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9799 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9801 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9802 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9803 field 'false' to 'exec_on_false'.
9804 (grub_script_create_cmdif): Renamed argument names to reflect above
9807 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9809 * normal/script.c (grub_script_create_cmdif): Likewise.
9811 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9813 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9815 (grub_hfsplus_btree_recptr): Likewise.
9816 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9817 FILEBLOCK both to pass a block number and store next block
9819 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9820 overflow file correctly. Specify errors appropriately, because
9821 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9822 grub_hfsplus_btree_recptr to get the pointer to a found key.
9823 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9826 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9828 (_linux_mod_SOURCES): New variable.
9829 (_linux_mod_CFLAGS): Likewise.
9830 (_linux_mod_LDFLAGS): Likewise.
9831 (linux_mod_SOURCES): Likewise.
9832 (linux_mod_CFLAGS): Likewise.
9833 (linux_mod_LDFLAGS): Likewise.
9835 * DISTLIST: Added loader/i386/efi/linux.c,
9836 loader/i386/efi/linux_normal.c and
9837 include/grub/i386/efi/loader.h.
9839 * loader/i386/efi/linux.c: New file.
9840 * loader/i386/efi/linux_normal.c: Likewise.
9841 * include/grub/i386/efi/loader.h: Likewise.
9843 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9845 * commands/blocklist.c: New file.
9847 * DISTLIST: Added commands/blocklist.c.
9849 * term/efi/console.c (grub_console_highlight_color): Use a lighter
9850 color for the background, and a darker color for the foreground.
9851 (grub_console_checkkey): Return READ_KEY.
9852 (grub_console_cls): Set the background to
9853 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9855 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9857 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9858 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9860 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9863 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9864 BG. The spec is wrong again.
9866 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9868 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9870 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9871 commands/blocklist.c.
9872 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9874 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9875 (blocklist_mod_SOURCES): New variable.
9876 (blocklist_mod_CFLAGS): Likewise.
9877 (blocklist_mod_LDFLAGS): Likewise.
9879 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9881 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9883 (lba_mode): Use %eax more intensively to reduce the code size.
9885 2006-05-20 Marco Gerards <marco@gnu.org>
9887 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9889 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9891 (script): Accept leading newlines.
9892 (newlines): New rule to describe 0 or more newlines.
9893 (commands): Accept `command' with trailing newline. Fixed the
9894 order in which arguments were passed to `grub_script_add_cmd'.
9895 Accept commands separated by newlines.
9896 (function): Changed to accept newlines.
9897 (menuentry) Rewritten.
9899 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9900 front of the list, instead of to the end.
9902 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9904 * util/i386/pc/grub-install.in (bindir): New variable.
9905 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9906 Shaver <lbgwjl@gmail.com>.
9908 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9910 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9911 grub/machine/linux.h
9912 * loader/i386/pc/linux.c: Likewise.
9914 * include/grub/i386/pc/linux.h: Moved to ...
9915 * include/grub/i386/linux.h: ... here.
9917 * include/grub/i386/linux.h (struct linux_kernel_params): New
9920 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9922 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9924 (grub_video_vbe_blit_glyph): Likewise.
9925 (grub_video_vbe_blit_bitmap): Likewise.
9926 (grub_video_vbe_blit_render_target): Likewise.
9928 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9930 * configure.ac (--with-platform): Properly quote the square
9933 2006-05-08 Marco Gerards <marco@gnu.org>
9935 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9937 (kernel_elf_HEADERS): ...to this. Updated all users.
9938 (grubof_symlist.c): Renamed from this...
9939 (kernel_elf_symlist.c): ...to this. Updated all users.
9940 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9941 (grubof_SOURCES): Renamed from this...
9942 (kernel_elf_SOURCES): ...to this.
9943 (grubof_HEADERS): Renamed from this...
9944 (kernel_elf_HEADERS): ...to this.
9945 (grubof_CFLAGS): Renamed from this...
9946 (kernel_elf_CFLAGS): ...to this.
9947 (grubof_ASFLAGS): Renamed from this...
9948 (kernel_elf_ASFLAGS): ...to this.
9949 (grubof_LDFLAGS): Renamed from this...
9950 (kernel_elf_LDFLAGS): ...to this.
9952 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9954 (kernel_elf_HEADERS): ...to this. Updated all users.
9955 (grubof_symlist.c): Renamed from this...
9956 (kernel_elf_symlist.c): ...to this. Updated all users.
9957 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9958 (grubof_SOURCES): Renamed from this...
9959 (kernel_elf_SOURCES): ...to this.
9960 (grubof_HEADERS): Renamed from this...
9961 (kernel_elf_HEADERS): ...to this.
9962 (grubof_CFLAGS): Renamed from this...
9963 (kernel_elf_CFLAGS): ...to this.
9964 (grubof_ASFLAGS): Renamed from this...
9965 (kernel_elf_ASFLAGS): ...to this.
9966 (grubof_LDFLAGS): Renamed from this...
9967 (kernel_elf_LDFLAGS): ...to this.
9969 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9970 `kernel.elf' instead of `grubof'.
9972 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9974 Add --with-platform to configure. Use pkglibdir instead of
9975 pkgdatadir. This is reported by Roger Leigh.
9977 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9978 (host_vendor): Likewise.
9979 (host_os): Likewise.
9980 (pkgdatadir): Likewise.
9981 (platform): New variable.
9982 (pkglibdir): Likewise.
9983 Use PKGLIBDIR instead of PKGDATADIR.
9985 * util/i386/pc/grub-install.in (datadir): Removed.
9986 (host_vendor): Likewise.
9987 (host_os): Likewise.
9988 (pkgdatadir): Likewise.
9989 (platform): New variable.
9990 (pkglibdir): Likewise.
9991 Use PKGLIBDIR instead of PKGDATADIR.
9993 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9994 instead of GRUB_DATADIR.
9996 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9998 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10001 * configure.ac (--with-platform): New option.
10002 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10004 * Makefile.in: Include a makefile based on PLATFORM instead of
10006 (pkgdatadir): Not appended by the machine type.
10007 (pkglibdir): Appended by the machine type.
10008 (host_vendor): Removed.
10009 (platform): New variable.
10010 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10011 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10012 (uninstall): Likewise.
10014 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10016 Use the environment context in the menu. Remove the commands
10017 "default" and "timeout", and use variables instead.
10019 * normal/menu.c: Include grub/env.h.
10020 (print_entry): Cast TITLE to silence gcc.
10021 (get_timeout): New function.
10022 (set_timeout): Likewise.
10023 (get_entry_number): Likewise.
10024 (run_menu): Use a default entry, a fallback entry and a timeout
10025 in the environment variables "default", "fallback" and
10026 "timeout". Also, tweak the default entry if it is not within the
10027 current menu entries.
10028 (grub_menu_run): Use a fallback entry in the environment variable
10031 * normal/main.c (read_config_file): Do not initialize
10032 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10034 (grub_normal_execute): Use a data slot to store the menu.
10036 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10037 fallback_entry and timeout.
10038 (struct grub_menu_list): Removed.
10039 (grub_menu_list_t): Likewise.
10040 (struct grub_context): Likewise.
10041 (grub_context_t): Likewise.
10042 (grub_context_get): Likewise.
10043 (grub_context_get_current_menu): Likewise.
10044 (grub_context_push_menu): Likewise.
10045 (grub_context_pop_menu): Likewise.
10046 (grub_default_init): Likewise.
10047 (grub_default_fini): Likewise.
10048 (grub_timeout_init): Likewise.
10049 (grub_timeout_fini): Likewise.
10051 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10053 (normal_mod_SOURCES): Removed normal/context.c.
10055 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10056 commands/default.c, commands/timeout.c and normal/context.c.
10057 (normal_mod_SOURCES): Removed normal/context.c.
10059 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10060 commands/timeout.c and normal/context.c.
10061 (normal_mod_SOURCES): Removed normal/context.c.
10063 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10064 commands/default.c, commands/timeout.c and normal/context.c.
10065 (normal_mod_SOURCES): Removed normal/context.c.
10067 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10069 (default_mod_SOURCES): Removed.
10070 (default_mod_CFLAGS): Likewise.
10071 (default_mod_LDFLAGS): Likewise.
10072 (timeout_mod_SOURCES): Removed.
10073 (timeout_mod_CFLAGS): Likewise.
10074 (timeout_mod_LDFLAGS): Likewise.
10076 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10079 * commands/default.c: Removed.
10080 * commands/timeout.c: Likewise.
10081 * normal/context.c: Likewise.
10083 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10085 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10087 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10089 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10090 "next" to "prev" for readability.
10091 (struct grub_env_sorted_var): New struct.
10092 (grub_env_context): Renamed to ...
10093 (initial_context): ... this.
10094 (grub_env_var_context): Renamed to ...
10095 (current_context): ... this.
10096 (grub_env_find): Look only at CURRENT_CONTEXT.
10097 (grub_env_context_open): Rewritten to copy exported variables from
10099 (grub_env_context_close): Rewritten according to the new
10100 scheme. Also, add an assertion to prevent the initial context from
10102 (grub_env_insert): Removed the code for the sorted list.
10103 (grub_env_remove): Likewise.
10104 (grub_env_export): Simply mark the variable with
10105 GRUB_ENV_VAR_GLOBAL.
10106 (grub_env_set): A cosmetic change for naming consistency.
10107 (grub_env_get): Likewise.
10108 (grub_env_unset): Likewise.
10109 (grub_env_iterate): Rewritten to sort variables within this
10111 (grub_register_variable_hook): Fixed for naming consistency. Call
10112 grub_env_find again, only if NAME is not found at the first time.
10113 (mangle_data_slot_name): New function.
10114 (grub_env_set_data_slot): Likewise.
10115 (grub_env_get_data_slot): Likewise.
10116 (grub_env_unset_data_slot): Likewise.
10118 * include/grub/env.h (grub_env_var_type): New enum.
10119 (GRUB_ENV_VAR_LOCAL): New constant.
10120 (GRUB_ENV_VAR_GLOBAL): Likewise.
10121 (GRUB_ENV_VAR_DATA): Likewise.
10122 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10124 (grub_env_set): Replace VAR with NAME for consistency.
10125 (grub_register_variable_hook): Likewise.
10126 (grub_env_export): Specify the name of the argument.
10127 (grub_env_set_data_slot): New prototype.
10128 (grub_env_get_data_slot): Likewise.
10129 (grub_env_unset_data_slot): Likewise.
10131 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10133 Extend the loader so that GRUB can accept a loader which comes
10134 back to GRUB when a loaded image exits. Also, this change adds
10135 support for a chainloader on EFI.
10137 * term/efi/console.c: Include grub/misc.h.
10138 (grub_console_checkkey): Display a scan code on the top for
10139 debugging. This will be removed once the EFI port gets stable.
10140 Correct the scan code mapping.
10142 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10143 allocate memory from larger regions, in order to reduce the number
10144 of allocated regions. Otherwise, the MacOSX loader panics.
10145 (filter_memory_map): Avoid less than 1MB for compatibility with
10147 (add_memory_regions): Allocate from the tail of a region, if
10148 possible, to avoid allocating a region near to 1MB, for the MacOSX
10151 * kern/efi/init.c (grub_efi_set_prefix): Specify
10152 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10154 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10155 argument IMAGE_HANDLE and specify it to get a loaded image.
10156 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10157 grub_efi_get_loaded_image.
10158 (grub_efi_get_filename): Divide the length by the size of
10160 (grub_efi_get_device_path): New function.
10161 (grub_efi_print_device_path): Print End Device Path nodes. Divide
10162 the length by the size of grub_efi_char16_t for a file path device
10165 * kern/loader.c (grub_loader_noreturn): New variable.
10166 (grub_loader_set): Accept a new argument NORETURN. Set
10167 GRUB_LOADER_NORETURN to NORETURN.
10168 All callers changed.
10169 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10172 * include/grub/efi/efi.h (grub_efi_get_device_path): New
10174 (grub_efi_get_loaded_image): Take an argument to specify an image
10177 * include/grub/loader.h (grub_loader_set): Added one more argument
10180 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10181 instead of grub_efi_open_protocol.
10182 (grub_efidisk_get_device_name): Likewise.
10183 (grub_efidisk_close): Print a newline.
10184 (grub_efidisk_get_device_handle): Fixed to use
10185 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10186 GRUB_EFI_DEVICE_PATH_TYPE.
10188 * disk/efi/efidisk.c (device_path_guid): Moved to ...
10189 * kern/efi/efi.c (device_path_guid): ... here.
10191 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
10193 (kernel_mod_HEADERS): Added efi/disk.h.
10194 (_chain_mod_SOURCES): New variable.
10195 (_chain_mod_CFLAGS): Likewise.
10196 (_chain_mod_LDFLAGS): Likewise.
10197 (chain_mod_SOURCES): Likewise.
10198 (chain_mod_CFLAGS): Likewise.
10199 (chain_mod_LDFLAGS): Likewise.
10201 * DISTLIST: Added include/grub/efi/chainloader.h,
10202 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
10204 * include/grub/efi/chainloader.h: New file.
10205 * loader/efi/chainloader.c: Likewise.
10206 * loader/efi/chainloader_normal.c: Likewise.
10208 2006-04-30 Marco Gerards <marco@gnu.org>
10210 * commands/configfile.c (grub_cmd_source): New function.
10211 (GRUB_MOD_INIT): Register the commands `source' and `.'.
10212 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
10214 2006-04-30 Marco Gerards <marco@gnu.org>
10216 * normal/execute.c (grub_script_execute_cmd): Change the return
10217 type to `grub_err_t'. Correctly return the error.
10218 (grub_script_execute_cmdline): In case a command line is not a
10219 command or a function, try to interpret it as an assignment.
10221 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10223 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
10224 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
10225 skip a node whose name is obviously invalid as UTF-16,
10226 i.e. contains a NUL character. Stop the iteration when the last
10227 directory entry is found. Instead of using the return value of
10228 grub_hfsplus_btree_iterate_node, store the value in RET and use
10229 it, because the iterator can be stopped by the last directory
10232 2006-04-30 Marco Gerards <marco@gnu.org>
10234 * include/grub/env.h (grub_env_export): New prototype. Reported
10235 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
10237 2006-04-30 Marco Gerards <marco@gnu.org>
10239 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
10240 size of the extents in a catalog file record.
10242 2006-04-29 Marco Gerards <marco@gnu.org>
10244 * commands/configfile.c (grub_cmd_configfile): Execute the
10245 configfile within its own context.
10247 * include/grub/env.h (grub_env_context_open): New prototype.
10248 (grub_env_context_close): Likewise.
10250 * kern/env.c (grub_env): Removed.
10251 (grub_env_sorted): Likewise.
10252 (grub_env_context): New variable.
10253 (grub_env_var_context): Likewise.
10254 (grub_env_find): Search both the active context and the global
10256 (grub_env_context_open): New function.
10257 (grub_env_context_close): Likewise.
10258 (grub_env_insert): Likewise.
10259 (grub_env_remove): Likewise.
10260 (grub_env_export): Likewise.
10261 (grub_env_set): Changed to use helper functions to avoid code
10263 (grub_env_iterate): Rewritten so both the current context and the
10264 global context are being used.
10266 * normal/command.c (export_command): New function.
10267 (grub_command_init): Register the `export' function.
10269 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
10271 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10272 explicitly to suppress gcc's warnings.
10273 * fs/fat.c (grub_fat_find_dir): Likewise.
10274 (grub_fat_label): Likewise.
10275 * fs/xfs.c (grub_xfs_read_inode): Likewise.
10276 (grub_xfs_mount): Likewise.
10277 (grub_xfs_label): Likewise.
10278 * fs/affs.c (grub_affs_mount): Likewise.
10279 (grub_affs_label): Likewise.
10280 (grub_affs_iterate_dir): Likewise.
10281 * fs/sfs.c (grub_sfs_mount): Likewise.
10282 (grub_sfs_iterate_dir): Likewise.
10283 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10284 * fs/hfs.c (grub_hfs_mount): Likewise.
10285 (grub_hfs_cmp_catkeys): Likewise.
10286 (grub_hfs_find_dir): Likewise.
10287 (grub_hfs_dir): Likewise.
10288 (grub_hfs_label): Likewise.
10289 * fs/jfs.c (grub_jfs_mount): Likewise.
10290 (grub_jfs_opendir): Likewise.
10291 (grub_jfs_getent): Likewise.
10292 (grub_jfs_lookup_symlink): Likewise.
10293 (grub_jfs_label): Likewise.
10294 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10295 (grub_hfsplus_iterate_dir): Likewise.
10296 (grub_hfsplus_btree_iterate_node): Made static.
10298 * util/grub-emu.c (prefix): New variable.
10299 (grub_machine_set_prefix): New function.
10300 (main): Do not set the environment variable "prefix" here. Only
10301 set PREFIX, which is used later by grub_machine_set_prefix.
10303 * include/grub/video.h: Do not include grub/symbol.h.
10304 (grub_video_register): Not exported. This symbol is not defined in
10306 (grub_video_unregister): Likewise.
10307 (grub_video_iterate): Likewise.
10308 (grub_video_setup): Likewise.
10309 (grub_video_restore): Likewise.
10310 (grub_video_get_info): Likewise.
10311 (grub_video_get_blit_format): Likewise.
10312 (grub_video_set_palette): Likewise.
10313 (grub_video_get_palette): Likewise.
10314 (grub_video_set_viewport): Likewise.
10315 (grub_video_get_viewport): Likewise.
10316 (grub_video_map_color): Likewise.
10317 (grub_video_map_rgb): Likewise.
10318 (grub_video_map_rgba): Likewise.
10319 (grub_video_fill_rect): Likewise.
10320 (grub_video_blit_glyph): Likewise.
10321 (grub_video_blit_bitmap): Likewise.
10322 (grub_video_blit_render_target): Likewise.
10323 (grub_video_scroll): Likewise.
10324 (grub_video_swap_buffers): Likewise.
10325 (grub_video_create_render_target): Likewise.
10326 (grub_video_delete_render_target): Likewise.
10327 (grub_video_set_active_render_target): Likewise.
10329 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10331 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10333 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10334 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10335 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10336 instead of $(srcdir)/genkernsyms.sh.
10338 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10339 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10340 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10341 instead of $(srcdir)/genkernsyms.sh.
10343 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10344 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10345 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10346 instead of $(srcdir)/genkernsyms.sh.
10348 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10349 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10350 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10351 instead of $(srcdir)/genkernsyms.sh.
10353 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10356 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10358 (gensymlist.sh): New target.
10359 (genkernsyms.sh): Likewise.
10361 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10362 genkernsyms.sh.in and gensymlist.sh.in.
10364 * genkernsyms.sh: Removed.
10365 * gensymlist.sh: Likewise.
10367 * genkernsyms.sh.in: New file.
10368 * gensymlist.sh.in: Likewise.
10370 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10372 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10373 clobber "prefix", since we may have already set it manually.
10375 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10377 * kern/misc.c (abort): New alias for grub_abort.
10379 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
10381 A new machine-specific function "grub_machine_set_prefix" is
10382 defined. This is called after loading modules, so that a prefix
10383 initialization can use modules. Also, this change adds an
10384 intensive debugging feature for the memory manager via the
10385 configure option "--enable-mm-debug".
10387 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10390 * kern/sparc64/ieee1275/init.c (abort): Removed.
10391 (grub_stop): Likewise.
10392 (grub_exit): New function.
10393 (grub_set_prefix): Renamed to ...
10394 (grub_machine_set_prefix): ... this.
10395 (grub_machine_init): Do not call grub_set_prefix.
10397 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10398 (grub_machine_set_prefix): ... this.
10399 (grub_machine_init): Do not call grub_set_prefix.
10401 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10402 (grub_machine_init): Do not set the prefix here.
10404 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10406 * kern/efi/init.c: Include grub/mm.h.
10407 (grub_efi_set_prefix): New function.
10409 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10410 (grub_efi_get_filename): New function.
10411 (grub_print_device_path): Renamed to ...
10412 (grub_efi_print_device_path): ... this.
10414 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10415 [MM_DEBUG] (grub_realloc): Likewise.
10416 [MM_DEBUG] (grub_free): Likewise.
10417 [MM_DEBUG] (grub_memalign): Likewise.
10418 [MM_DEBUG] (grub_mm_debug): New variable.
10419 [MM_DEBUG] (grub_debug_malloc): New function.
10420 [MM_DEBUG] (grub_debug_free): New function.
10421 [MM_DEBUG] (grub_debug_realloc): New function.
10422 [MM_DEBUG] (grub_debug_memalign): New function.
10424 * kern/misc.c (grub_abort): Print a newline to distinguish
10427 * kern/main.c (grub_main): Call grub_machine_set_prefix and
10428 grub_set_root_dev after loading modules. This is necessary when
10429 setting a prefix depends on modules.
10431 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10432 (grub_efi_print_device_path): ... this.
10433 (grub_efi_get_filename): New prototype.
10434 (grub_efi_set_prefix): Likewise.
10436 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10438 (grub_efidisk_get_device_handle): New prototype.
10439 (grub_efidisk_get_device_name): Likewise.
10441 * include/grub/mm.h: Include config.h.
10442 (MM_DEBUG): Removed.
10443 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10444 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10445 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10446 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10447 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10448 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10449 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10450 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10451 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10453 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10455 * disk/efi/efidisk.c: Include grub/partition.h.
10456 (iterate_child_devices): New function.
10457 (add_device): First, compare only last device path nodes, so that
10458 devices are sorted by the types.
10459 (grub_efidisk_get_device_handle): New function.
10460 (grub_efidisk_get_device_name): Likewise.
10462 * configure.ac (--enable-mm-debug): New option to enable the
10463 memory manager debugging feature. This makes the binary much
10464 bigger, so is disabled by default.
10466 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10468 Use grub_abort instead of grub_stop, and grub_exit must be
10469 define in each architecture now. Also, this change adds support
10472 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10473 (grub_getkey): New function.
10474 (grub_term_get_current): Likewise.
10476 * util/i386/pc/grub-setup.c: Include grub/term.h.
10477 (grub_getkey): New function.
10478 (grub_term_get_current): Likewise.
10480 * util/misc.c (grub_stop): Renamed to ...
10481 (grub_exit): ... this.
10483 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10484 (grub_exit): ... this.
10485 (grub_machine_init): Use grub_abort instead of abort.
10486 (grub_stop): Removed.
10488 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10491 * kern/i386/pc/startup.S (grub_exit): New function.
10492 (cold_reboot): New label.
10494 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10495 (grub_efi_init): Call grub_efidisk_init.
10496 (grub_efi_fini): Call grub_efidisk_fini.
10498 * kern/efi/efi.c: Include grub/mm.h.
10499 (grub_efi_console_control_guid): Renamed to ...
10500 (console_control_guid): ... this.
10501 (grub_efi_loaded_image_guid): Renamed to ...
10502 (loaded_image_guid): ... this.
10503 (grub_efi_locate_handle): New function.
10504 (grub_efi_open_protocol): Likewise.
10505 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10506 GRUB_EFI_CONSOLE_CONTROL_GUID.
10507 (grub_efi_exit): Removed.
10508 (grub_stop): Likewise.
10509 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10510 (grub_exit): New function.
10511 (grub_print_device_path): Likewise.
10513 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10514 (grub_enter_rescue_mode): Register "exit".
10516 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10517 (grub_abort): New function.
10519 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10521 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10523 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10525 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10526 (grub_print_device_path): New prototype.
10527 (grub_efi_locate_handle): Likewise.
10528 (grub_efi_open_protocol): Likewise.
10530 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10531 * disk/efi/efidisk.c: Likewise.
10533 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10535 * include/grub/efi/console_control.h
10536 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10538 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10539 last 8 bytes as an array.
10540 (GRUB_EFI_DISK_IO_GUID): New macro.
10541 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10542 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10543 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10545 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10546 (struct grub_efi_device_path): Rename the member "sub_type" to
10548 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10549 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10550 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10551 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10552 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10553 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10554 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10555 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10556 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10557 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10558 (struct grub_efi_pci_device_path): New structure.
10559 (grub_efi_pci_device_path_t): New type.
10560 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10561 (struct grub_efi_pccard_device_path): New structure.
10562 (grub_efi_pccard_device_path_t): New type.
10563 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10564 (struct grub_efi_memory_mapped_device_path): New structure.
10565 (grub_efi_memory_mapped_device_path_t): New type.
10566 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10567 (struct grub_efi_vendor_device_path): New structure.
10568 (grub_efi_vendor_device_path_t): New type.
10569 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10570 (struct grub_efi_controller_device_path): New structure.
10571 (grub_efi_controller_device_path_t): New type.
10572 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10573 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10574 (struct grub_efi_acpi_device_path): New structure.
10575 (grub_efi_acpi_device_path_t): New type.
10576 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10577 (struct grub_efi_expanded_acpi_device_path): New structure.
10578 (grub_efi_expanded_acpi_device_path_t): New type.
10579 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10580 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10581 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10582 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10583 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10584 (struct grub_efi_atapi_device_path): New structure.
10585 (grub_efi_atapi_device_path_t): New type.
10586 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10587 (struct grub_efi_fibre_channel_device_path): New structure.
10588 (grub_efi_fibre_channel_device_path_t): New type.
10589 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10590 (struct grub_efi_1394_device_path): New structure.
10591 (grub_efi_1394_device_path_t): New type.
10592 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10593 (struct grub_efi_usb_device_path): New structure.
10594 (grub_efi_usb_device_path_t): New type.
10595 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10596 (struct grub_efi_usb_class_device_path): New structure.
10597 (grub_efi_usb_class_device_path_t): New type.
10598 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10599 (struct grub_efi_i2o_device_path): New structure.
10600 (grub_efi_i2o_device_path_t): New type.
10601 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10602 (struct grub_efi_mac_address_device_path): New structure.
10603 (grub_efi_mac_address_device_path_t): New type.
10604 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10605 (struct grub_efi_ipv4_device_path): New structure.
10606 (grub_efi_ipv4_device_path_t): New type.
10607 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10608 (struct grub_efi_ipv6_device_path): New structure.
10609 (grub_efi_ipv6_device_path_t): New type.
10610 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10611 (struct grub_efi_infiniband_device_path): New structure.
10612 (grub_efi_infiniband_device_path_t): New type.
10613 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10614 (struct grub_efi_uart_device_path): New structure.
10615 (grub_efi_uart_device_path_t): New type.
10616 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10617 (struct grub_efi_vendor_messaging_device_path): New structure.
10618 (grub_efi_vendor_messaging_device_path_t): New type.
10619 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10620 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10621 (struct grub_efi_hard_drive_device_path): New structure.
10622 (grub_efi_hard_drive_device_path_t): New type.
10623 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10624 (struct grub_efi_cdrom_device_path): New structure.
10625 (grub_efi_cdrom_device_path_t): New type.
10626 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10627 (struct grub_efi_vendor_media_device_path): New structure.
10628 (grub_efi_vendor_media_device_path_t): New type.
10629 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10630 (struct grub_efi_file_path_device_path): New structure.
10631 (grub_efi_file_path_device_path_t): New type.
10632 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10633 (struct grub_efi_protocol_device_path): New structure.
10634 (grub_efi_protocol_device_path_t): New type.
10635 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10636 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10637 (struct grub_efi_bios_device_path): New structure.
10638 (grub_efi_bios_device_path_t): New type.
10639 (struct grub_efi_disk_io): New structure.
10640 (grub_efi_disk_io_t): New type.
10641 (struct grub_efi_block_io_media): New structure.
10642 (grub_efi_block_io_media_t): New type.
10643 (struct grub_efi_block_io): New structure.
10644 (grub_efi_block_io_t): New type.
10646 * include/grub/misc.h (grub_stop): Removed.
10647 (grub_exit): New prototype.
10648 (grub_abort): Likewise.
10650 * include/grub/disk.h (enum grub_disk_dev_id): Added
10651 GRUB_DISK_DEVICE_EFIDISK_ID.
10653 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10654 disk/efi/efidisk.c.
10655 (kernel_syms.lst): Remove the target if an error occurs.
10657 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10659 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10660 as it was simply too buggy.
10662 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10664 * kern/misc.c (grub_lltoa): New function.
10665 (grub_vsprintf): Added support for the long long suffix,
10668 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10670 * Makefile.in (LDFLAGS): Add variable.
10671 (LD): Remove variable.
10672 * configure.ac: Add -m32 to LDFLAGS.
10673 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10674 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10675 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10676 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10677 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10679 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10680 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10681 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10683 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10685 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10686 length for unknown glyph.
10688 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10690 Add support for pre-loaded modules into the EFI port.
10692 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10693 completely. Accept one more argument DIR. The caller has changed.
10695 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10697 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10698 (grub_efi_loaded_image_guid): New variable.
10699 (grub_efi_get_loaded_image): New function.
10700 (grub_arch_modules_addr): Likewise.
10702 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10705 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10706 (struct grub_efi_loaded_image): New structure.
10707 (grub_efi_loaded_image_t): New type.
10709 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10711 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10712 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10713 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10715 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10717 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10719 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10721 * DISTLIST: Added include/grub/efi/console.h,
10722 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10723 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10725 * include/grub/efi/console.h: New file.
10726 * include/grub/efi/time.h: Likewise.
10727 * include/grub/i386/efi/kernel.h: Likewise.
10728 * kern/efi/init.c: Likewise.
10729 * kern/efi/mm.c: Likewise.
10730 * term/efi/console.c: Likewise.
10732 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10733 (grub_stop): Removed.
10734 (grub_get_rtc): Likewise.
10735 (grub_machine_init): Simply call grub_efi_init.
10736 (grub_machine_fini): Call grub_efi_fini.
10738 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10739 (grub_efi_output_string): Removed.
10740 (grub_efi_stall): New function.
10741 (grub_stop): Likewise.
10742 (grub_get_rtc): Likewise.
10744 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10745 (grub_efi_stall): New prototype.
10746 (grub_efi_allocate_pages): Likewise.
10747 (grub_efi_free_pages): Likewise.
10748 (grub_efi_get_memory_map): Likewise.
10749 (grub_efi_mm_init): Likewise.
10750 (grub_efi_mm_fini): Likewise.
10751 (grub_efi_init): Likewise.
10752 (grub_efi_fini): Likewise.
10754 * include/grub/i386/efi/time.h: Do not include
10755 grub/symbol.h. Include grub/efi/time.h.
10756 (GRUB_TICKS_PER_SECOND): Removed.
10757 (grub_get_rtc): Likewise.
10759 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10760 Added padding. The EFI spec is buggy.
10761 (GRUB_EFI_BLACK): New macro.
10762 (GRUB_EFI_BLUE): Likewise.
10763 (GRUB_EFI_GREEN): Likewise.
10764 (GRUB_EFI_CYAN): Likewise.
10765 (GRUB_EFI_RED): Likewise.
10766 (GRUB_EFI_MAGENTA): Likewise.
10767 (GRUB_EFI_BROWN): Likewise.
10768 (GRUB_EFI_LIGHTGRAY): Likewise.
10769 (GRUB_EFI_BRIGHT): Likewise.
10770 (GRUB_EFI_DARKGRAY): Likewise.
10771 (GRUB_EFI_LIGHTBLUE): Likewise.
10772 (GRUB_EFI_LIGHTGREEN): Likewise.
10773 (GRUB_EFI_LIGHTCYAN): Likewise.
10774 (GRUB_EFI_LIGHTRED): Likewise.
10775 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10776 (GRUB_EFI_YELLOW): Likewise.
10777 (GRUB_EFI_WHITE): Likewise.
10778 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10779 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10780 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10781 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10782 (GRUB_EFI_BACKGROUND_RED): Likewise.
10783 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10784 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10785 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10786 (GRUB_EFI_TEXT_ATTR): Likewise.
10788 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10789 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10790 (kernel_mod_HEADERS): Added efi/time.h.
10792 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10794 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10795 include/grub/efi/api.h, include/grub/efi/console_control.h,
10796 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10797 include/grub/i386/efi/time.h, kern/efi/efi.c,
10798 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10799 and util/i386/efi/grub-mkimage.c.
10801 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10803 * genmk.rb (PModule#rule): Do not export symbols if
10804 #{prefix}_EXPORTS is set to "no".
10806 * conf/i386-efi.mk: New file.
10807 * conf/i386-efi.rmk: Likewise.
10808 * include/grub/efi/api.h: Likewise.
10809 * include/grub/efi/console_control.h: Likewise.
10810 * include/grub/efi/efi.h: Likewise.
10811 * include/grub/efi/pe32.h: Likewise.
10812 * include/grub/i386/efi/time.h: Likewise.
10813 * kern/efi/efi.c: Likewise.
10814 * kern/i386/efi/init.c: Likewise.
10815 * kern/i386/efi/startup.S: Likewise.
10816 * util/i386/efi/grub-mkimage.c: Likewise.
10818 2006-04-17 Marco Gerards <marco@gnu.org>
10820 * include/grub/script.h: Include <grub/parser.h> and
10821 "grub_script.tab.h".
10822 (struct grub_lexer_param): New struct.
10823 (struct grub_parser_param): Likewise.
10824 (grub_script_create_arglist): Pass the state in an argument.
10825 (grub_script_add_arglist): Likewise.
10826 (grub_script_create_cmdline): Likewise.
10827 (grub_script_create_cmdblock): Likewise.
10828 (grub_script_create_cmdif): Likewise.
10829 (grub_script_create_cmdmenu): Likewise.
10830 (grub_script_add_cmd): Likewise.
10831 (grub_script_arg_add): Likewise.
10832 (grub_script_lexer_ref): Likewise.
10833 (grub_script_lexer_deref): Likewise.
10834 (grub_script_lexer_record_start): Likewise.
10835 (grub_script_lexer_record_stop): Likewise.
10836 (grub_script_mem_record): Likewise.
10837 (grub_script_mem_record_stop): Likewise.
10838 (grub_script_malloc): Likewise.
10839 (grub_script_yylex): Likewise.
10840 (grub_script_yyparse): Likewise.
10841 (grub_script_yyerror): Likewise.
10842 (grub_script_yylex): Likewise.
10843 (grub_script_lexer_init): Return the state.
10845 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10846 (grub_script_lexer_done): Likewise.
10847 (grub_script_lexer_getline): Likewise.
10848 (grub_script_lexer_refs): Likewise.
10849 (script): Likewise.
10850 (newscript): Likewise.
10851 (record): Likewise.
10852 (recording): Likewise.
10853 (recordpos): Likewise.
10854 (recordlen): Likewise.
10855 (grub_script_lexer_init): Return the state instead of setting
10857 (grub_script_lexer_ref): Use the newly added argument for state
10858 instead of globals.
10859 (grub_script_lexer_deref): Likewise.
10860 (grub_script_lexer_record_start): Likewise.
10861 (grub_script_lexer_record_stop): Likewise.
10862 (recordchar): Likewise.
10863 (nextchar): Likewise.
10864 (grub_script_yylex2): Likewise.
10865 (grub_script_yylex): Likewise.
10866 (grub_script_yyerror): Likewise.
10868 * normal/parser.y (func_mem): Removed variable.
10869 (menu_entry): Likewise.
10871 (%lex-param): New parser option.
10872 (%parse-param): Likewise.
10873 (script): Always return the AST.
10874 (argument): Pass the state around.
10875 (arguments): Likewise.
10876 (grubcmd): Likewise.
10877 (commands): Likewise.
10878 (function): Likewise.
10879 (menuentry): Likewise.
10880 (if_statement): Likewise.
10883 * normal/script.c (grub_script_memused): Removed variable.
10884 (grub_script_parsed): Likewise.
10885 (grub_script_malloc): Added a state argument. Use that instead of
10887 (grub_script_mem_record): Likewise.
10888 (grub_script_mem_record_stop): Likewise.
10889 (grub_script_arg_add): Likewise.
10890 (grub_script_add_arglist): Likewise.
10891 (grub_script_create_cmdline): Likewise.
10892 (grub_script_create_cmdif): Likewise.
10893 (grub_script_create_cmdmenu): Likewise.
10894 (grub_script_add_cmd): Likewise.
10895 (grub_script_parse): Setup the state before calling the parser.
10897 2006-04-16 Marco Gerards <marco@gnu.org>
10899 * normal/command.c (grub_command_init): Remove the title command.
10901 * normal/lexer.c (grub_script_yylex): Renamed from this...
10902 (grub_script_yylex2): ... to this.
10903 (grub_script_yylex): New function. Temporary
10904 introduced to filter some tokens.
10905 (grub_script_yyerror): Print a newline.
10907 * normal/main.c (read_config_file): Output information about the
10908 lines that contain errors. Wait for a key after all lines have
10909 been processed. Don't return an empty menu.
10911 * normal/parser.y (func_mem): Don't initialize.
10912 (menu_entry): Likewise.
10913 (err): New variable.
10914 (script): Don't return anything when an error was encountered.
10915 (ws, returns): Removed rules.
10916 (argument): Disabled concatenated variable support.
10917 (arguments): Remove explicit separators.
10918 (grubcmd): Likewise.
10919 (function): Likewise.
10920 (menuentry): Likewise.
10922 (commands): Likewise. Add error handling.
10924 * normal/script.c (grub_script_create_cmdline): If
10925 `grub_script_parsed' is 0, assume the parser encountered an error.
10927 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10929 * configure.ac: Add support for EFI. Fix the typo
10930 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10932 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10934 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10935 foreign multibyte characters should be shown correctly.
10937 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10939 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10941 (read_config_file): Made it to close file before returning.
10943 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10945 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10946 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10947 video/i386/pc/vbefill.c.
10949 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10950 video/i386/pc/vbefill.c.
10952 * include/grub/video.h (grub_video_blit_format): New enum.
10953 (grub_video_mode_info): Added new member blit_format.
10954 (grub_video_get_blit_format): New function prototype.
10956 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10957 function prototype.
10958 (grub_video_vbe_map_rgb): Likewise.
10959 (grub_video_vbe_unmap_color): Likewise.
10961 * include/grub/i386/pc/vbeblit.h: New file.
10963 * include/grub/i386/pc/vbefill.h: New file.
10965 * video/video.c (grub_video_get_blit_format): New function.
10966 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10967 (grub_video_vbe_map_rgb): Likewise.
10968 (grub_video_vbe_unmap_color): Likewise.
10970 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10972 (grub_video_vbe_blit_render_target): Changed to use more optimized
10974 (grub_video_vbe_setup): Added detection for optimized settings.
10975 (grub_video_vbe_create_render_target): Likewise.
10977 * video/i386/pc/vbeblit.c: New file.
10979 * video/i386/pc/vbefill.c: New file.
10981 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10983 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10986 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10987 parsing to support both hex and dec ranges. If filename was missing
10988 show usage information.
10990 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10992 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10993 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10995 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10996 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10997 (video_mod_SOURCES): Added.
10998 (video_mod_CFLAGS): Likewise.
10999 (video_mod_LDFLAGS): Likewise.
11000 (gfxterm_mod_SOURCES): Likewise.
11001 (gfxterm_mod_CFLAGS): Likewise.
11002 (gfxterm_mod_LDFLAGS): Likewise.
11003 (videotest_mod_SOURCES): Likewise.
11004 (videotest_mod_CFLAGS): Likewise.
11005 (videotest_mod_LDFLAGS): Likewise.
11006 (vesafb_mod_SOURCES): Removed.
11007 (vesafb_mod_CFLAGS): Likewise.
11008 (vesafb_mod_LDFLAGS): Likewise.
11009 (vga_mod_SOURCES): Likewise.
11010 (vga_mod_CFLAGS): Likewise.
11011 (vga_mod_LDFLAGS): Likewise.
11013 * commands/videotest.c: New file.
11015 * font/manager.c (fill_with_default_glyph): Modified to use
11017 (grub_font_get_glyph): Likewise.
11018 (fontmanager): Renamed from this...
11019 (font_manager): ... to this.
11021 * include/grub/font.h (grub_font_glyph): Added new structure.
11022 (grub_font_get_glyph): Modified to use grub_font_glyph.
11024 * include/grub/misc.h (grub_abs): Added as inline function.
11026 * include/grub/video.h: New file.
11028 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11029 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11030 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11031 (grub_vbe_get_controller_info): Renamed from this...
11032 (grub_vbe_bios_get_controller_info): ... to this.
11033 (grub_vbe_get_mode_info): Renamed from this...
11034 (grub_vbe_bios_get_mode_info): ... to this.
11035 (grub_vbe_set_mode): Renamed from this...
11036 (grub_vbe_bios_set_mode): ... to this.
11037 (grub_vbe_get_mode): Renamed from this...
11038 (grub_vbe_bios_get_mode): ... to this.
11039 (grub_vbe_set_memory_window): Renamed from this...
11040 (grub_vbe_bios_set_memory_window): ... to this.
11041 (grub_vbe_get_memory_window): Renamed from this...
11042 (grub_vbe_bios_get_memory_window): ... to this.
11043 (grub_vbe_set_scanline_length): Renamed from this...
11044 (grub_vbe_set_scanline_length): ... to this.
11045 (grub_vbe_get_scanline_length): Renamed from this...
11046 (grub_vbe_bios_get_scanline_length): ... to this.
11047 (grub_vbe_set_display_start): Renamed from this...
11048 (grub_vbe_bios_set_display_start): ... to this.
11049 (grub_vbe_get_display_start): Renamed from this...
11050 (grub_vbe_bios_get_display_start): ... to this.
11051 (grub_vbe_set_palette_data): Renamed from this...
11052 (grub_vbe_bios_set_palette_data): ... to this.
11053 (grub_vbe_set_pixel_rgb): Removed.
11054 (grub_vbe_set_pixel_index): Likewise.
11056 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11058 (grub_vbe_bios_get_controller_info): ... to this.
11059 (grub_vbe_get_mode_info): Renamed from this...
11060 (grub_vbe_bios_get_mode_info): ... to this.
11061 (grub_vbe_set_mode): Renamed from this...
11062 (grub_vbe_bios_set_mode): ... to this.
11063 (grub_vbe_get_mode): Renamed from this...
11064 (grub_vbe_bios_get_mode): ... to this.
11065 (grub_vbe_set_memory_window): Renamed from this...
11066 (grub_vbe_bios_set_memory_window): ... to this.
11067 (grub_vbe_get_memory_window): Renamed from this...
11068 (grub_vbe_bios_get_memory_window): ... to this.
11069 (grub_vbe_set_scanline_length): Renamed from this...
11070 (grub_vbe_set_scanline_length): ... to this.
11071 (grub_vbe_get_scanline_length): Renamed from this...
11072 (grub_vbe_bios_get_scanline_length): ... to this.
11073 (grub_vbe_set_display_start): Renamed from this...
11074 (grub_vbe_bios_set_display_start): ... to this.
11075 (grub_vbe_get_display_start): Renamed from this...
11076 (grub_vbe_bios_get_display_start): ... to this.
11077 (grub_vbe_set_palette_data): Renamed from this...
11078 (grub_vbe_bios_set_palette_data): ... to this.
11079 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11080 getting corrupted after calling it. Added more pushes and pops.
11081 (grub_vbe_bios_set_mode): Likewise.
11082 (grub_vbe_bios_get_mode): Likewise.
11083 (grub_vbe_bios_get_memory_window): Likewise.
11084 (grub_vbe_bios_set_scanline_length): Likewise.
11085 (grub_vbe_bios_get_scanline_length): Likewise.
11086 (grub_vbe_bios_get_display_start): Likewise.
11087 (grub_vbe_bios_set_palette_data): Likewise.
11089 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11090 (cl_insert): Likewise.
11091 (cl_delete): Likewise.
11093 * term/gfxterm.c: New file.
11095 * term/i386/pc/vesafb.c: Removed file.
11097 * video/video.c: New file.
11099 * video/i386/pc/vbe.c (real2pm): Added new function.
11100 (grub_video_vbe_draw_pixel): Likewise.
11101 (grub_video_vbe_get_video_ptr): Likewise.
11102 (grub_video_vbe_get_pixel): Likewise
11103 (grub_video_vbe_init): Likewise.
11104 (grub_video_vbe_fini): Likewise.
11105 (grub_video_vbe_setup): Likewise.
11106 (grub_video_vbe_get_info): Likewise.
11107 (grub_video_vbe_set_palette): Likewise.
11108 (grub_video_vbe_get_palette): Likewise.
11109 (grub_video_vbe_set_viewport): Likewise.
11110 (grub_video_vbe_get_viewport): Likewise.
11111 (grub_video_vbe_map_color): Likewise.
11112 (grub_video_vbe_map_rgb): Likewise.
11113 (grub_video_vbe_map_rgba): Likewise.
11114 (grub_video_vbe_unmap_color): Likewise.
11115 (grub_video_vbe_fill_rect): Likewise.
11116 (grub_video_vbe_blit_glyph): Likewise.
11117 (grub_video_vbe_blit_bitmap): Likewise.
11118 (grub_video_vbe_blit_render_target): Likewise.
11119 (grub_video_vbe_scroll): Likewise.
11120 (grub_video_vbe_swap_buffers): Likewise.
11121 (grub_video_vbe_create_render_target): Likewise.
11122 (grub_video_vbe_delete_render_target): Likewise.
11123 (grub_video_vbe_set_active_render_target): Likewise.
11124 (grub_vbe_set_pixel_rgb): Remove function.
11125 (grub_vbe_set_pixel_index): Likewise.
11126 (index_color_mode): Remove static variable.
11127 (active_mode): Likewise.
11128 (framebuffer): Likewise.
11129 (bytes_per_scan_line): Likewise.
11130 (grub_video_vbe_adapter): Added new static variable.
11131 (framebuffer): Likewise.
11132 (render_target): Likewise.
11133 (initial_mode): Likewise.
11134 (mode_in_use): Likewise.
11135 (mode_list): Likewise.
11137 2006-03-10 Marco Gerards <marco@gnu.org>
11139 * configure.ac (AC_INIT): Bumped to 1.93.
11141 * DISTLIST: Added `include/grub/hfs.h'.
11143 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11145 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11146 18H, which might help the BIOS falling back to next boot media.
11148 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11150 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11151 Poe Chen <poe.poechen@gmail.com>.
11153 2006-01-17 Marco Gerards <marco@gnu.org>
11155 * include/grub/normal.h: Include <grub/script.h>.
11156 (grub_command_list): Removed struct.
11157 (grub_command_list_t): Removed type.
11158 (grub_menu_entry): Remove members `num' and `command_list'. Add
11159 members `commands' and `sourcecode'.
11160 * include/grub/script.h: Add inclusion guards.
11161 (grub_script_cmd_menuentry): New struct.
11162 (grub_script_execute_menuentry): New prototype.
11163 (grub_script_lexer_record_start): Likewise.
11164 (grub_script_lexer_record_stop): Likewise.
11165 * normal/execute.c (grub_script_execute_menuentry): New function.
11166 * normal/lexer.c (record, recording, recordpos, recordlen): New
11168 (grub_script_lexer_record_start): New function.
11169 (grub_script_lexer_record_stop): Likewise.
11170 (recordchar): Likewise.
11171 (nextchar): Likewise.
11172 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
11173 2048 as the buffer size. Add the tokens `menuentry' and `@'.
11174 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11175 (current_menu): New variable.
11176 (free_menu): Mainly rewritten.
11177 (grub_normal_menu_addentry): New function.
11178 (read_config_file): Rewritten.
11179 * normal/menu.c (run_menu_entry): Mainly rewritten.
11180 * normal/menu_entry.c (make_screen): Rewritten the code to insert
11182 (run): Mainly rewritten.
11183 * normal/parser.y (menu_entry): New variable.
11184 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11185 (menuentry): New rule.
11186 (command): Add `menuentry'.
11187 (if_statement): Allow additional returns before `fi'.
11188 * normal/script.c (grub_script_create_cmdmenu): New function.
11190 2006-01-03 Marco Gerards <marco@gnu.org>
11192 * INSTALL: GNU Bison is required.
11193 * configure.ac: Rewritten the test to detect Bison.
11194 * Makefile.in (YACC): New variable. Reported by Xun Sun
11195 <xun.sun.cn@gmail.com>.
11197 2006-01-03 Marco Gerards <marco@gnu.org>
11199 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
11200 the HFS+ filesystem to filesystem blocks.
11201 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
11202 GCC warning is silenced.
11204 2006-01-03 Marco Gerards <marco@gnu.org>
11206 * partmap/apple.c (apple_partition_map_iterate): Convert the data
11207 read from disk from big endian to host byte order.
11209 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
11211 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
11213 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
11214 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
11215 embedded HFS+ filesystem.
11216 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
11217 (grub_hfs_sblock): Move from here...
11218 * include/grub/hfs.h: To here... New file.
11219 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
11221 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
11223 (grub_hfsplus_volheader): Change type of member `magic' to
11225 (grub_hfsplus_data): Add new member `embedded_offset'.
11226 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
11228 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
11229 Calculate the offset.
11231 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11233 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
11235 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
11237 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11239 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
11240 ENV->NAME is NULL after allocating ENV->VALUE.
11242 2005-12-25 Marco Gerards <marco@gnu.org>
11244 * kern/env.c (grub_env_set): Rewritten the error handling code.
11246 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11248 * geninit.sh: Made more robust, and more portable.
11250 2005-12-25 Marco Gerards <marco@gnu.org>
11252 Add support for Apple HFS+ filesystems.
11254 * fs/hfsplus.c: New file.
11256 * DISTLIST: Added `fs/hfsplus.c'.
11258 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11259 (hfsplus_mod_SOURCES): New variable.
11260 (hfsplus_mod_CFLAGS): Likewise.
11261 (hfsplus_mod_LDFLAGS): Likewise.
11262 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11263 (grub_setup_SOURCES): Likewise.
11264 (grub_mkdevicemap_SOURCES): Likewise.
11265 (grub_emu_SOURCES): Likewise.
11266 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11268 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11270 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11272 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11274 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11275 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11276 include/grub/parser.h, include/grub/script.h, kern/parser.c,
11277 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11278 normal/lexer.c, normal/parser.y, normal/script.c, and
11280 Removed kern/sparc64/cache.c.
11282 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11283 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11286 * configure.ac (AC_INIT): Bumped to 1.92.
11288 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
11290 * kern/err.c (grub_error_push): Added new function to support error
11292 (grub_error_pop): Likewise.
11293 (grub_error_stack_items): New local variable to support error stacks.
11294 (grub_error_stack_pos): Likewise.
11295 (grub_error_stack_assert): Likewise.
11296 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11298 (grub_print_error): Added support to print errors from error stack.
11300 * include/grub/err.h (grub_error_push): Added function prototype.
11301 (grub_error_pop): Likewise.
11303 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
11305 * configure.ac: Accept `powerpc64' as host_cpu.
11306 (amd64): Rename to `biarch32'.
11308 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11309 non-cacheline-aligned addresses.
11311 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11312 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11313 if `size' is non-zero.
11315 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
11317 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11318 and `cd' to make sure the filename is not prefixed with a
11320 (pkgdata_MODULES): Add `gpt.mod'.
11321 (gpt_mod_SOURCES): New variable.
11322 (gpt_mod_CFLAGS): Likewise.
11323 (gpt_mod_LDFLAGS): Likewise.
11325 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11327 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11330 * partmap/gpt.c: New file.
11332 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11333 GPT partition map is detected.
11335 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
11337 * commands/i386/pc/play.c: New file.
11338 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11339 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11342 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
11344 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11345 ((unused))' to silence gcc warning.
11347 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
11349 * configure.ac: Correct `AC_PROG_YACC' test.
11351 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11353 * util/powerpc/ieee1275/grub-install.in: Run the mount point
11354 check before installing files.
11356 2005-11-22 Mike Small <smallm@panix.com>
11358 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11359 number regex so multidigit numbers are recognized correctly.
11361 2005-11-22 Mike Small <smallm@panix.com>
11363 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11364 debugging message before attempting to claim memory.
11365 (grub_rescue_cmd_initrd): Add a claim debugging message and try
11366 multiple addresses in case of failure.
11368 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11370 * term/tparm.c (get_space): Remove empty `if' statement.
11372 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11374 * kern/parser.c (check_varstate): Rename `state' to 's'.
11376 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11378 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
11379 variable definitions to the beginning of each function. Sort stack
11381 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
11382 `buf' argument to `char *'.
11384 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11386 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11387 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11388 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11389 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11390 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11391 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11392 configfile.mod, search.mod, gzio.mod and test.mod.
11393 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11394 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11395 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11396 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11397 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11398 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11399 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11400 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11401 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11402 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11403 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11404 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11405 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11406 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11407 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11408 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11409 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11410 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11411 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11412 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11413 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11414 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11415 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11417 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11419 (pkgdata_MODULES): Add test.mod.
11421 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11423 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
11424 appending to variables with "+=".
11425 (PModule): Use full pathname to generate *.lst filenames.
11427 * Makefile.in: Fixed list rules moved from genmk.rb.
11428 (.DELETE_ON_ERROR): New special target.
11429 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11431 * conf/i386-pc.rmk: Include conf/common.mk.
11432 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11433 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11434 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11435 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11436 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11437 configfile.mod, search.mod, gzio.mod and test.mod.
11438 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11439 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11440 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11441 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11442 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11443 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11444 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11445 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11446 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11447 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11448 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11449 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11450 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11451 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11452 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11453 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11454 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11455 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11456 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11457 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11458 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11459 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11460 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11462 * conf/common.rmk: ... to here. New file.
11464 * conf/common.mk: New file.
11466 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11468 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11469 (grub_script.tab.c): ... here.
11471 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11472 (grub_script.tab.c): ... here.
11474 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11475 (grub_script.tab.c): ... here.
11477 * normal/command.c (grub_command_find): Fixed a memory leak of
11478 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11480 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11482 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11483 "@" which marks the start of a comment on ARM.
11484 (VARIABLE): Likewise.
11486 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11488 Add support for Linux/ADFS partition tables.
11490 * partmap/acorn.c: New file.
11492 * include/grub/acorn_filecore.h: Likewise.
11494 * DISTLIST: Added `partmap/acorn.c' and
11495 `include/grub/acorn_filecore.h'.
11497 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11499 (pkgdata_MODULES): Add `acorn.mod'.
11500 (acorn_mod_SOURCES): New variable.
11501 (acorn_mod_CFLAGS): Likewise.
11503 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11505 (pkgdata_MODULES): Add `acorn.mod'.
11506 (acorn_mod_SOURCES): New variable.
11507 (acorn_mod_CFLAGS): Likewise.
11509 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11510 (pkgdata_MODULES): Add `acorn.mod'.
11511 (acorn_mod_SOURCES): New variable.
11512 (acorn_mod_CFLAGS): Likewise.
11513 (acorn_mod_LDFLAGS): Likewise.
11515 * include/types.h (grub_disk_addr_t): New typedef.
11517 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
11519 * geninit.sh: New file.
11521 * geninitheader.sh: Likewise.
11523 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11524 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11525 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11526 * commands/configfile.c (grub_configfile_init)
11527 (grub_configfile_fini): Likewise.
11528 * commands/default.c (grub_default_init, grub_default_fini):
11530 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11531 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11532 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11533 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11535 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11536 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11538 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11539 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11541 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11543 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11545 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11546 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11547 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11548 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11549 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11550 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11551 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11552 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11553 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11554 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11555 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11556 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11557 * partmap/amiga.c (grub_amiga_partition_map_init)
11558 (grub_amiga_partition_map_fini): Likewise.
11559 * partmap/apple.c (grub_apple_partition_map_init)
11560 (grub_apple_partition_map_fini): Likewise.
11561 * partmap/pc.c (grub_pc_partition_map_init)
11562 (grub_pc_partition_map_fini): Likewise.
11563 * partmap/sun.c (grub_sun_partition_map_init,
11564 grub_sun_partition_map_fini): Likewise.
11565 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11568 * util/grub-emu.c: Include <grub_modules_init.h>.
11569 (main): Don't initialize and de-initialize any modules directly,
11570 use `grub_init_all' and `grub_fini_all' instead.
11572 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11573 `grub_vesafb_mod_init'.
11574 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11576 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11577 `grub_vga_mod_init'. Updated all users.
11578 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
11580 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11581 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11584 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11585 Generate a function to initialize the module in utilities.
11586 Updated all callers.
11587 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11588 initialize the module in utilities. Updated all callers.
11590 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11592 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11593 escape sequence and a literal ^L to clear the screen.
11595 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11596 when returning from Open Firmware.
11598 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11600 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11601 (grub_ofconsole_height): Likewise.
11602 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11603 manually insert a '\n'.
11604 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11605 `grub_ofconsole_height'. Return early if these are already set.
11607 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11609 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11610 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11611 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11612 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11613 and `normal/script.c'.
11614 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11615 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11616 (test_mod_SOURCES): New variable.
11617 (test_mod_CFLAGS): Likewise.
11618 (test_mod_LDFLAGS): Likewise.
11619 (pkgdata_MODULES): Add `test.mod'.
11620 (grub_script.tab.c): New rule.
11621 (grub_script.tab.h): Likewise.
11623 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
11625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11626 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11627 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11628 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11629 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11630 (test_mod_SOURCES): New variable.
11631 (test_mod_CFLAGS): Likewise.
11632 (pkgdata_MODULES): Add `test.mod'.
11633 (grub_script.tab.c): New rule.
11634 (grub_script.tab.h): Likewise.
11636 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
11638 Add initial scripting support.
11640 * commands/test.c: New file.
11641 * include/grub/script.h: Likewise.
11642 * normal/execute.c: Likewise.
11643 * normal/function.c: Likewise.
11644 * normal/lexer.c: Likewise.
11645 * normal/parser.y: Likewise.
11646 * normal/script.c: Likewise.
11648 * configure.ac: Add `AC_PROG_YACC' test.
11650 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11651 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11652 `normal/function.c' and `normal/script.c'.
11653 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11654 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11655 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11657 (pkgdata_MODULES): Add `test.mod'.
11658 (grub_script.tab.c): New rule.
11659 (grub_script.tab.h): Likewise.
11661 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11663 * include/grub/normal.h (grub_test_init): New prototype.
11664 (grub_test_fini): Likewise.
11666 * normal/command.c: Include <grub/script.h>.
11667 (grub_command_execute): Rewritten.
11669 * util/grub-emu.c (main): Call `grub_test_init' and
11672 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11674 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11676 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11677 there are no pending characters.
11679 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11681 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11682 `grub_strndup' to drop device arguments. Replace unnecessary
11683 `grub_strndup' with `grub_strdup'.
11685 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11687 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11688 `debug' environment variable has been set.
11690 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
11692 * Makefile.in (install-local): Use $(DATA).
11693 (uninstall): Likewise.
11694 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11695 (sbin_UTILITIES): ... to here.
11696 (sbin_SCRIPTS): New variable.
11697 (grub_install_SOURCES): New variable.
11698 * util/powerpc/ieee1275/grub-install.in: New file.
11699 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11701 (add_segments): Call `grub_util_get_path'.
11703 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11705 From Timothy Baldwin:
11706 * commands/ls.c (grub_ls_list_files): Close FILE with
11708 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11710 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
11712 * include/grub/parser.h: New file.
11714 * kern/parser.c: Likewise.
11716 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11717 (grub_setup_SOURCES): Likewise.
11718 (grub_probefs_SOURCES): Likewise.
11719 (grub_emu_SOURCES): Likewise.
11720 (kernel_img_HEADERS): Add `parser.h'.
11722 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11723 (grub_emu_SOURCES): Add `kern/parser.c'.
11724 (grubof_SOURCES): Likewise.
11726 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11727 (grubof_SOURCES): Add `kern/parser.c'.
11729 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11731 * kern/misc.c (grub_split_cmdline): Removed function.
11733 * kern/rescue.c: Include <grub/parser.h>.
11734 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11735 of `grub_split_cmdline'.
11737 * normal/command.c: Include <grub/parser.h>.
11738 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11739 of `grub_split_cmdline'.
11741 * normal/completion.c: Include <grub/parser.h>.
11742 (cmdline_state): New variable.
11743 (iterate_dir): End the filename with a quote depending on the
11744 command line state.
11745 (get_state): new function.
11746 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11747 split the arguments and determine the current argument. When the
11748 argument string is not quoted, escape all spaces.
11750 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11752 * normal/sparc64/setjmp.S: New file.
11754 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11756 * include/grub/sparc64/libgcc.h: New file.
11757 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11758 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11759 normal/sparc64/setjmp.c.
11761 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11763 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11764 * kern/sparc64/cache.S: New file.
11765 * kern/sparc64/cache.c: Removed.
11766 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11767 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11769 (COMMON_LDFLAGS): Add -melf64_sparc.
11770 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11771 (grubof_SOURCES): Use cache.S instead of cache.c.
11772 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11773 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11774 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11776 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11777 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11778 (linux_mod_CFLAGS): Commented out.
11779 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11780 out because module isn't built.
11781 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11782 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11783 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11784 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11785 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11786 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11787 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11788 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11789 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11790 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11791 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11792 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11793 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11794 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11796 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11798 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11799 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11800 longer, because HFS should not be used on PC.
11802 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11804 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11805 consistently within the loop.
11807 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
11809 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11810 directory can not be read.
11812 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11814 * configure.ac (AC_INIT): Increase the version number to 1.91.
11816 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11817 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11818 term/i386/pc/serial.c.
11820 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11822 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11823 file size must be permitted.
11825 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11826 between %ah and %al.
11828 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11830 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11832 Call the hook with a NUL-terminated filename.
11833 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11836 * kern/term.c (cursor_state): New variable.
11837 (grub_term_set_current): Reset the cursor state on a new
11839 (grub_setcursor): Rewritten to use CURSOR_STATE.
11840 (grub_getcursor): New function.
11842 * include/grub/term.h (grub_getcursor): New prototype.
11844 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11845 integers on ARM. Reported by Timothy Baldwin
11846 <T.E.Baldwin99@members.leeds.ac.uk>.
11848 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
11850 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11852 (grub_sfs_dir): Likewise.
11854 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
11856 Add support for the SFS filesystem.
11858 * fs/sfs.c: New file.
11860 * DISTLIST: Added `fs/sfs.c'.
11862 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11863 (grub_probefs_SOURCES): Likewise.
11864 (grub_emu_SOURCES): Likewise.
11865 (pkgdata_MODULES): Add `sfs.mod'.
11866 (sfs_mod_SOURCES): New variable.
11867 (sfs_mod_CFLAGS): Likewise.
11868 (sfs_mod_LDFLAGS): Likewise.
11870 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11871 (pkgdata_MODULES): Add `sfs.mod'.
11872 (sfs_mod_SOURCES): New variable.
11873 (sfs_mod_CFLAGS): Likewise.
11875 * util/grub-emu.c (main): Call `grub_sfs_init' and
11878 * include/grub/fs.h (grub_sfs_init): New prototype.
11879 (grub_sfs_fini): Likewise.
11881 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
11883 Add support for the AFFS filesystem.
11885 * fs/affs.c: New file.
11887 * DISTLIST: Added `fs/affs.c'.
11889 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11890 (grub_probefs_SOURCES): Likewise.
11891 (grub_emu_SOURCES): Likewise.
11892 (pkgdata_MODULES): Add `affs.mod'.
11893 (affs_mod_SOURCES): New variable.
11894 (affs_mod_CFLAGS): Likewise.
11895 (affs_mod_LDFLAGS): Likewise.
11897 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11898 (pkgdata_MODULES): Add `affs.mod'.
11899 (affs_mod_SOURCES): New variable.
11900 (affs_mod_CFLAGS): Likewise.
11902 * util/grub-emu.c (main): Call `grub_affs_init' and
11905 * include/grub/fs.h (grub_affs_init): New prototype.
11906 (grub_affs_fini): Likewise.
11908 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11910 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11912 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11914 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11917 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11920 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11921 (COMMON_LDFLAGS): New variable.
11922 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11923 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11924 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11925 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11926 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11927 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11928 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11929 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11930 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11931 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11932 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11933 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11934 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11935 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11936 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11938 (normal_mod_ASFLAGS): Add `-m32'.
11940 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11941 (grub_host_size_t, grub_host_ssize_t): New types.
11942 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
11943 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
11944 `GRUB_HOST_SIZEOF_VOID_P'.
11946 * include/grub/kernel.h (struct grub_module_header): Type of
11947 member offset changed to `grub_host_off_t'. Type of member size
11948 changed to `grub_host_size_t'.
11949 (struct grub_module_info): Type of member offset changed to
11950 `grub_host_off_t'. Type of member size changed to
11951 `grub_host_size_t'.
11953 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11955 Make GRUB's kernel compliant to Multiboot Specification.
11957 * kern/i386/pc/startup.S (multiboot_header): New label.
11958 (multiboot_entry): Likewise.
11959 (multiboot_trampoline): Likewise.
11961 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11962 Increased to 0x4A0.
11964 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11965 put parentheses after a question mark.
11966 [!GRUB_UTIL] (my_mod): New variable.
11968 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11970 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
11972 Adds support for the XFS filesystem. Btrees are not supported
11975 * fs/xfs.c: New file.
11977 * DISTLIST: Added `fs/xfs.c'.
11979 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11980 (grub_probefs_SOURCES): Likewise.
11981 (grub_emu_SOURCES): Likewise.
11982 (pkgdata_MODULES): Add `xfs.mod'.
11983 (xfs_mod_SOURCES): New variable.
11984 (xfs_mod_CFLAGS): Likewise.
11986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11987 (pkgdata_MODULES): Add `xfs.mod'.
11988 (xfs_mod_SOURCES): New variable.
11989 (xfs_mod_CFLAGS): Likewise.
11991 * util/grub-emu.c (main): Call `grub_xfs_init' and
11994 * include/grub/fs.h (grub_xfs_init): New prototype.
11995 (grub_xfs_fini): Likewise.
11998 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12000 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12001 color modes, allow greater than 16 colors to be configured as
12004 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12006 * normal/completion.c (complete_arguments): Add the qualifier
12007 const into OPTIONS.
12009 From Omniflux <omniflux+lists@omniflux.com>:
12010 * include/grub/terminfo.h: New file.
12011 * include/grub/tparm.h: Likewise.
12012 * include/grub/i386/pc/serial.h: Likewise.
12013 * term/terminfo.c: Likewise.
12014 * term/tparm.c: Likewise.
12015 * term/i386/pc/serial.c: Likewise.
12016 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12018 (terminfo_mod_SOURCES): New variable.
12019 (terminfo_mod_CFLAGS): Likewise.
12020 (serial_mod_SOURCES): Likewise.
12021 (serial_mod_CFLAGS): Likewise.
12023 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12025 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12026 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12027 and kern/powerpc/ieee1275/cmain.c, respectively.
12029 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12030 * kern/powerpc/ieee1275/crt0.S: ... here.
12032 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12033 * kern/powerpc/ieee1275/cmain.c: ... here.
12035 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12036 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12037 instead of boot/powerpc/ieee1275/crt0.S and
12038 boot/powerpc/ieee1275/cmain.c, respectively.
12040 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12041 sectors. It was not used anyway.
12043 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12045 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12046 `unused parameter' warning.
12048 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12050 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12052 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12055 2005-08-28 Marco Gerards <metgerards@student.han.nl>
12057 * include/grub/normal.h (enum grub_completion_type): Added
12058 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12060 * normal/cmdline.c (print_completion): Handle
12061 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12062 * normal/menu_entry.c (store_completion): Likewise.
12064 * normal/completion.c (complete_arguments): New function.
12065 (grub_normal_do_completion): Call `complete_arguments' when the
12066 current words start with a dash.
12068 2005-08-27 Marco Gerards <metgerards@student.han.nl>
12070 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12071 `gzio.mod' instead of `io.mod').
12073 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12075 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12076 (DISTDIRS): Added io and video.
12077 Rewrite the search routine to make an output consistently.
12079 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12080 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12081 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12082 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12083 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12084 util/powerpc/ieee1275/misc.c.
12086 * include/grub/gzio.h: New file.
12087 * io/gzio.c: Likewise.
12089 * kern/file.c (grub_file_close): Call grub_device_close only if
12090 FILE->DEVICE is not NULL.
12092 * include/grub/mm.h [!NULL] (NULL): New macro.
12094 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12096 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12097 (pkgdata_MODULES): Added gzio.mod.
12098 (gzio_mod_SOURCES): New variable.
12099 (gzio_mod_CFLAGS): Likewise.
12101 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12102 (pkgdata_MODULES): Added gzio.mod.
12103 (gzio_mod_SOURCES): New variable.
12104 (gzio_mod_CFLAGS): Likewise.
12106 * commands/cat.c: Include grub/gzio.h.
12107 (grub_cmd_cat): Use grub_gzfile_open instead of
12110 * commands/cmp.c: Include grub/gzio.h.
12111 (grub_cmd_cmp): Use grub_gzfile_open instead of
12114 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12115 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12117 (grub_rescue_cmd_module): Likewise.
12119 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12121 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12122 kern/sparc64/ieee1275/init.c because it contains _start.
12123 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12125 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12127 * configure.ac: Add support for sparc64 host with ieee1275
12129 * configure: Generated from configure.ac.
12130 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12132 (grub_ofdisk_read): Likewise.
12133 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12134 pointers as (void *) to remove a warning.
12135 (grub_ofdisk_close): Likewise.
12136 (grub_ofdisk_read): Likewise.
12137 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12138 returns, so make it return void to remove a warning.
12139 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12140 Corresponding prototype change.
12141 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12142 values, and cast the pointers as (void *) to remove a warning.
12143 (grub_mm_dump): Likewise.
12144 * conf/sparc64-ieee1275.mk: New file.
12145 * conf/sparc64-ieee1275.rmk: Likewise.
12146 * include/grub/sparc64/setjmp.h: Likewise.
12147 * include/grub/sparc64/types.h: Likewise.
12148 * include/grub/sparc64/ieee1275/console.h: Likewise.
12149 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12150 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12151 * include/grub/sparc64/ieee1275/time.h: Likewise.
12152 * kern/sparc64/cache.c: Likewise.
12153 * kern/sparc64/dl.c: Likewise.
12154 * kern/sparc64/ieee1275/init.c: Likewise.
12155 * kern/sparc64/ieee1275/openfw.c: Likewise.
12157 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12159 * util/console.c (grub_ncurses_putchar): If C is greater than
12160 0x7f, set C to a question mark.
12161 (grub_ncurses_getcharwidth): New function.
12162 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12165 * normal/menu.c (print_entry): Made aware of Unicode. First,
12166 convert TITLE to UCS-4, and predict the cursor position by
12169 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12171 * kern/misc.c (grub_utf16_to_utf8): Likewise.
12173 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12175 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12176 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12179 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12180 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12181 grub_strcpy and grub_strlen. Take it into account that a space
12182 character is inserted as a delimiter.
12184 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12186 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
12187 invalid magic in the error.
12189 * commands/search.c: New file.
12191 * util/grub-emu.c (main): Call grub_search_init and
12194 * kern/rescue.c (grub_rescue_print_disks): Removed.
12195 (grub_rescue_print_devices): New function.
12196 (grub_rescue_cmd_ls): Use grub_device_iterate with
12197 grub_rescue_print_devices instead of grub_disk_dev_iterate with
12198 grub_rescue_print_disks.
12200 * kern/partition.c (grub_partition_iterate): Return the result of
12201 PARTMAP->ITERATE instead of GRUB_ERRNO.
12203 * kern/device.c: Include grub/partition.h.
12204 (grub_device_iterate): New function.
12206 * include/grub/partition.h (grub_partition_iterate): Return int
12207 instead of grub_err_t.
12209 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
12211 [GRUB_UTIL] (grub_search_fini): Likewise.
12213 * include/grub/device.h (grub_device_iterate): New prototype.
12215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12217 (pkgdata_MODULES): Added search.mod.
12218 (search_mod_SOURCES): New variable.
12219 (search_mod_CFLAGS): Likewise.
12221 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
12222 (pkgdata_MODULES): Added search.mod.
12223 (search_mod_SOURCES): New variable.
12224 (search_mod_CFLAGS): Likewise.
12226 * commands/ls.c (grub_ls_list_disks): Renamed to ...
12227 (grub_ls_list_devices): ... this, and use grub_device_iterate.
12228 All callers changed.
12230 * DISTLIST: Added commands/search.c.
12232 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12234 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
12236 (grub_getcharwidth): New function.
12238 * kern/misc.c (grub_utf8_to_ucs4): New function.
12240 * include/grub/term.h (struct grub_term): Added a new member
12242 (grub_getcharwidth): New prototype.
12244 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
12246 * term/i386/pc/console.c (map_char): New function. Segregated from
12247 grub_console_putchar.
12248 (grub_console_putchar): Use map_char.
12249 (grub_console_getcharwidth): New function.
12250 (grub_console_term): Specified grub_console_getcharwidth as
12253 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12254 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12256 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12258 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12259 on grub_strtoul completely.
12260 (write_char): Declare local variables in the beginning of the
12262 (grub_vesafb_getcharwidth): New function.
12263 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12266 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
12268 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12269 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12270 commands/i386/pc/vbetest.c.
12272 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12273 call grub_vbe_get_controller_info again, because the returned
12274 information is volatile.
12275 (grub_vbe_set_video_mode): Mostly rewritten.
12276 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12277 grub_vbe_status_t correctly.
12278 (grub_vbe_get_video_mode_info): Likewise.
12279 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12280 several if statements.
12282 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12283 * commands/i386/pc/vbeinfo.c: ... this.
12285 * commands/i386/pc/vbe_test.c: Renamed to ...
12286 * commands/i386/pc/vbetest.c: ... this.
12288 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12290 (grub_cmd_vbeinfo): ... this. Save video modes before
12291 iterating. Skip a video mode, if it is not available, not enough
12292 information is given or it is monochrome. Show the memory
12293 model. Leave the interpretation of MODEVAR to grub_strtoul
12295 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12296 (GRUB_MOD_FINI): Likewise.
12298 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12299 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12300 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12301 duplicated grub_env_get. Leave the interpretation of MODEVAR to
12302 grub_strtoul completely.
12303 (real2pm): Removed.
12304 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12305 (GRUB_MOD_FINI): Likewise.
12307 * normal/misc.c: Include grub/mm.h.
12309 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12310 vbe_list_modes with vbetest.mod and vbeinfo.mod.
12311 (vbe_list_modes_mod_SOURCES): Removed.
12312 (vbe_list_modes_mod_CFLAGS): Likewise.
12313 (vbe_test_mod_SOURCES): Likewise.
12314 (vbe_test_mod_CFLAGS): Likewise.
12315 (vbeinfo_mod_SOURCES): New variable.
12316 (vbeinfo_mod_CFLAGS): Likewise.
12317 (vbetest_mod_SOURCES): Likewise.
12318 (vbetest_mod_CFLAGS): Likewise.
12320 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
12322 * normal/misc.c: New file.
12324 * DISTLIST: Added normal/misc.c.
12326 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12327 DISK to HOOK. Call HOOK with DISK.
12328 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12329 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12330 * partmap/sun.c (sun_partition_map_iterate): Likewise.
12332 * normal/menu_entry.c (struct screen): Added a new member
12333 "completion_shown".
12334 (completion_buffer): New global variable.
12335 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12336 (store_completion): New function.
12337 (complete): Likewise.
12338 (clear_completions): Likewise.
12339 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12340 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12341 a tab, call complete.
12343 * normal/completion.c (disk_dev): Removed.
12344 (print_simple_completion): Likewise.
12345 (print_partition_completion): Likewise.
12346 (print_func): New global variable.
12347 (add_completion): Do not take the arguments WHAT or PRINT any
12348 longer. Added a new argument TYPE. Instead of printing directly,
12349 call PRINT_FUNC if not NULL.
12350 All callers changed.
12351 (complete_device): Use a local variable DEV instead of
12352 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12353 (grub_normal_do_completion): Take a new argument HOOK. Do not
12354 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12355 empty string, return NULL instead.
12356 All callers changed.
12358 * normal/cmdline.c (print_completion): New function.
12360 * kern/partition.c (grub_partition_iterate): Add an argument DISK
12362 All callers changed.
12364 * kern/disk.c (grub_print_partinfo): Removed.
12366 * include/grub/partition.h (struct grub_partition_map): Add a new
12367 argument DISK into HOOK of ITERATE.
12368 (grub_partition_iterate): Add a new argument DISK to HOOK.
12370 * include/grub/normal.h (enum grub_completion_type): New enum.
12371 (grub_completion_type_t): New type.
12372 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12373 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12374 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12375 (GRUB_COMPLETION_TYPE_FILE): Likewise.
12376 (grub_normal_do_completion): Added a new argument HOOK.
12377 (grub_normal_print_device_info): New prototype.
12379 * include/grub/disk.h (grub_print_partinfo): Removed.
12381 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12382 (normal_mod_SOURCES): Likewise.
12383 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12384 (normal_mod_SOURCES): Likewise.
12386 * commands/ls.c (grub_ls_list_disks): Use
12387 grub_normal_print_device_info instead of grub_print_partinfo. Free
12389 (grub_ls_list_files): Use grub_normal_print_device_info instead of
12390 duplicating the code.
12392 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12394 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12395 follow GCS more precisely.
12396 * commands/i386/pc/vbe_test.c: Likewise.
12397 * include/grub/i386/pc/vbe.h: Likewise.
12398 * term/i386/pc/vesafb.c: Likewise.
12399 * video/i386/pc/vbe.c: Likewise.
12401 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12403 * DISTLIST: Added term/i386/pc/vesafb.c
12404 DISTLIST: Added video/i386/pc/vbe.c
12405 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12406 DISTLIST: Added commands/i386/pc/vbe_test.c.
12407 * commands/i386/pc/vbe_list_modes.c: New file.
12408 * commands/i386/pc/vbe_test.c: Likewise.
12409 * term/i386/pc/vesafb.c: Likewise.
12410 * video/i386/pc/vbe.c: Likewise.
12411 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12412 (grub_vbe_probe) Added prototype.
12413 (grub_vbe_set_video_mode) Likewise.
12414 (grub_vbe_get_video_mode) Likewise.
12415 (grub_vbe_get_video_mode_info) Likewise.
12416 (grub_vbe_set_pixel_rgb) Likewise.
12417 (grub_vbe_set_pixel_index) Likewise.
12418 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12419 (pkgdata_MODULES): Added vesafb.mod.
12420 (pkgdata_MODULES): Added vbe_list_modes.mod.
12421 (pkgdata_MODULES): Added vbe_test.mod.
12422 (vbe_mod_SOURCES): Added.
12423 (vbe_mod_CFLAGS): Likewise.
12424 (vesafb_mod_SOURCES): Likewise.
12425 (vesafb_mod_CFLAGS): Likewise.
12426 (vbe_list_modes_mod_SOURCES): Likewise.
12427 (vbe_list_modes_mod_CFLAGS): Likewise.
12428 (vbe_test_mod_SOURCES): Likewise.
12429 (vbe_test_mod_CFLAGS): Likewise.
12431 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12433 * normal/command.c (grub_command_execute): If INTERACTIVE is
12434 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12435 CMDLINE. Disable the pager if INTERACTIVE is true.
12436 All callers are changed.
12438 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12439 before reading a config file.
12440 * normal/main.c (read_config_file): Even if a command is not
12441 found, register it if it is within an entry.
12443 * util/grub-emu.c: Include sys/types.h and unistd.h.
12444 (options): Added --hold.
12445 (struct arguments): Added a new member "hold".
12446 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12448 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12449 cleared by a debugger, if it is not zero.
12451 * include/grub/normal.h (grub_command_execute): Add an argument
12454 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12456 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12458 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12460 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12461 program with another one, because the old one didn't detect a bug
12462 in gcc-3.4. Always use regparm 2, because the new test is still
12463 not enough for gcc-4.0. Someone must investigate a simple test
12464 case which detects a bug in gcc-4.0.
12466 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12468 * DISTLIST: Added normal/completion.c.
12470 * normal/completion.c: New file.
12472 * term/i386/pc/console.c (grub_console_getwh): New function.
12473 (grub_console_term): Assign grub_console_getwh to getwh.
12475 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12476 function is defined in normal/completion.c as
12477 grub_normal_do_completion.
12478 (grub_cmdline_get): Use grub_normal_do_completion instead of
12481 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12482 returns non-zero, otherwise return 0.
12483 (grub_partition_iterate): First, probe the partition map. Then,
12484 call ITERATE only for this partition map.
12486 * kern/misc.c (grub_strncmp): Rewritten.
12488 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12489 returns non-zero. Otherwise return 0.
12491 * include/grub/partition.h (grub_partition_map_iterate): Return
12492 int instead of void.
12494 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12496 * include/grub/misc.h (grub_strncmp): Change the type of N to
12499 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12502 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12503 unsigned explicitly before comparing it with I.
12505 * kern/main.c (grub_env_write_root): Add the attribute unused into
12508 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12509 normal/completion.c.
12510 (normal_mod_SOURCES): Likewise.
12511 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12512 (normal_mod_SOURCES): Likewise.
12514 * normal/command.c (grub_iterate_commands): If ITERATE returns
12515 non-zero, return one immediately.
12517 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12519 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12520 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12522 (grub_vbe_get_controller_info): New function.
12523 (grub_vbe_get_mode_info): Likewise.
12524 (grub_vbe_set_mode): Likewise.
12525 (grub_vbe_get_mode): Likewise.
12526 (grub_vbe_set_memory_window): Likewise.
12527 (grub_vbe_get_memory_window): Likewise.
12528 (grub_vbe_set_scanline_length): Likewise.
12529 (grub_vbe_get_scanline_length): Likewise.
12530 (grub_vbe_set_display_start): Likewise.
12531 (grub_vbe_get_display_start): Likewise.
12532 (grub_vbe_set_palette_data): Likewise.
12533 * include/grub/i386/pc/vbe.h: New file.
12535 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12537 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12538 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12539 * DISTLIST: Likewise.
12540 * kern/ieee1275/of.c: Moved to ...
12541 * kern/ieee1275/ieee1275.c: ... here.
12543 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12545 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12546 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12547 Pass 0 as `end' parameter to grub_strtoul().
12549 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12551 * include/grub/powerpc/ieee1275/console.h: Do not include
12552 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12554 (grub_console_cur_color): Remove i386-specific prototype.
12555 (grub_console_real_putchar): Likewise.
12556 (grub_console_checkkey): Likewise.
12557 (grub_console_getkey): Likewise.
12558 (grub_console_getxy): Likewise.
12559 (grub_console_gotoxy): Likewise.
12560 (grub_console_cls): Likewise.
12561 (grub_console_setcursor): Likewise.
12562 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12563 Include <grub/machine/console.h>.
12564 * term/ieee1275/ofconsole.c: Likewise.
12566 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12568 * Makefile.in (LIBLZO): New variable.
12570 * configure.ac: Check for LZO version 2.
12572 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12573 lzo/lzo1x.h instead of lzo1x.h.
12575 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12578 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12579 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12581 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12582 copying the data from PARTITION to P.
12584 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12586 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12587 negative, unload the module.
12589 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12590 map is "pc_partition_map" but not "pc".
12591 (usage): Fix the description. The options are --boot-image and
12592 --core-image but not --boot-file or --core-file.
12593 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12594 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12597 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12598 --core-file. Specify INSTALL_DEVICE as an argument.
12600 * util/console.c: Include config.h.
12601 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12602 [HAVE_NCURSES_H]: Include ncurses.h.
12603 [HAVE_CURSES_H]: Include curses.h.
12604 [!A_NORMAL] (A_NORMAL): Defined as zero.
12605 [!A_STANDOUT] (A_STANDOUT): Likewise.
12607 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12609 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12611 * configure.ac: Check for curses libraries and headers.
12613 * Makefile.in (LIBCURSES): New variable.
12615 * genmk.rb (Script::rule): Set the executable bits.
12617 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12618 name of the PC partition map is "pc_partition_map" but not "pc".
12620 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12622 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12623 (modules): Likewise.
12624 (usage): Added descriptions for --modules and --grub-probefs.
12625 Handle --modules and --grub-probefs. Save the arguments in MODULES
12626 and GRUB_PROBEFS, respectively.
12627 Auto-detect a filesystem module against GRUBDIR. If the result is
12628 empty and modules are not specified explicitly, abort the
12629 installation. Add the result to MODULES.
12631 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12632 disk/powerpc/ieee1275/ofdisk.c,
12633 include/grub/powerpc/ieee1275/init.h and
12634 term/powerpc/ieee1275/ofconsole.c.
12635 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12636 term/ieee1275/ofconsole.c.
12638 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12640 * COPYING: Upgraded to the latest version. Only the address of the
12641 FSF office has changed.
12643 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12645 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12646 kern/ieee1275.c with kern/ieee1275/of.c.
12648 * kern/ieee1275.c: Moved to ...
12649 * kern/ieee1275/of.c: ... here.
12651 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12653 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
12656 * config.guess: Updated to the latest version from gnulib.
12657 * config.sub: Likewise.
12658 * install.sh: Likewise.
12659 * mkinstalldirs: Likewise.
12661 * include/grub/console.h: Removed. This file is arch-specific. Do
12662 not put this in include/grub.
12664 * include/grub/i386/pc/console.h: Resurrected.
12666 * util/console.c: Include grub/machine/console.h instead of
12668 * util/grub-emu.c: Likewise.
12670 2005-08-04 Marco Gerards <metgerards@student.han.nl>
12672 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12675 From Vincent Pelletier <subdino2004@yahoo.fr>
12676 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12677 Redefined to use grub_getwh.
12678 (grub_term): New member named getwh.
12679 (grub_getwh): New prototype.
12680 * kern/term.c (grub_getwh): New function.
12681 * term/i386/pc/console.c (grub_console_getwh): New function.
12682 (grub_console_term): New member `getwh'.
12683 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12684 (grub_vga_term): New member `getwh'.
12685 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
12687 (grub_ofconsole_getw): New function.
12688 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12689 (grub_ofconsole_term): New field named getwh and new initial
12692 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12694 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12695 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12696 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12697 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12698 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12699 of <grub/machine/ieee1275.h>.
12700 * commands/ieee1275/reboot.c: Likewise.
12701 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12702 * kern/ieee1275.c: ... to here. All users updated. Change all
12703 parameter structs to use new type `grub_ieee1275_cell_t'.
12704 * term/powerpc/ieee1275/ofconsole.c: Move ...
12705 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12706 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12707 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12708 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12710 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12711 Remove unused prototypes. All users updated.
12712 * include/grub/powerpc/ieee1275/console.h: Removed.
12713 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12714 `grub_ieee1275_cell_t'.
12715 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12716 Cast comparisons with -1 to the correct type.
12717 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12718 type to match `grub_ieee1275_entry_fn'.
12720 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12722 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12724 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12725 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12727 (grub_probefs_SOURCES): New variable.
12729 * util/i386/pc/grub-probefs.c: New file.
12731 * util/i386/pc/grub-setup.c (main): Call
12732 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12733 grub_hfs_init and grub_jfs_init to initialize the system. Call
12734 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12735 grub_pc_partition_map_fini to finish the system.
12737 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12739 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12741 (grub_multiboot_load_elf32): Likewise.
12742 (grub_multiboot_is_elf64): Likewise.
12743 (grub_multiboot_load_elf64): Likewise.
12744 (grub_multiboot_load_elf): Likewise.
12745 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12746 an ELF32 or ELF64 file.
12747 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12749 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12750 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12751 NULL before calling FS->LABEL.
12752 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12753 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12754 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12755 before calling FS->LABEL.
12757 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12759 * util/i386/pc/grub-install.in (datadir): New variable.
12761 (pkgdatadir): New variable.
12762 (pkglibdir): Removed.
12764 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12766 * DISTLIST: Added util/i386/pc/grub-install.in.
12768 * util/i386/pc/grub-install.in: New file.
12770 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12771 (grub_install_SOURCES): Likewise.
12773 * genmk.rb: Added support for scripts.
12774 (Script): New class.
12775 (scripts): New variable.
12777 * Makefile.in (install-local): Install sbin_SCRIPTS by
12779 (uninstall): Remove sbin_SCRIPTS.
12781 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12782 device, try to get a GRUB device by
12783 grub_util_biosdisk_get_grub_dev.
12786 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12787 description for --device-map.
12789 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12791 Change the semantics of variable hooks. They now return strings
12792 instead of error values.
12794 * util/i386/pc/grub-setup.c: Include grub/env.h.
12795 (setup): Use grub_device_set_root instead of grub_env_set.
12797 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12798 grub_env_get instead of grub_device_set_root and
12799 grub_device_get_root, respectively.
12801 * kern/main.c (grub_env_write_root): New function.
12802 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12803 grub_env_set instead of grub_device_set_root.
12805 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12807 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12808 rather than calling ENV->WRITE_HOOK afterwards.
12809 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12810 passing a pointer of a pointer.
12811 (grub_register_variable_hook): Change the types of "read_hook" and
12812 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12814 Allocate the default empty string on the heap, because this string
12815 may be freed later.
12817 * kern/device.c: Include grub/env.h.
12818 (grub_device_set_root): Removed.
12819 (grub_device_get_root): Likewise.
12820 (grub_device_open): Use grub_env_get instead of
12821 grub_device_get_root.
12823 * include/grub/env.h (grub_env_read_hook_t): New type.
12824 (grub_env_write_hook_t): Likewise.
12825 (grub_env_var): Change the types of "read_hook" and "write_hook"
12826 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12827 (grub_register_variable_hook): Likewise.
12829 * include/grub/device.h (grub_device_set_root): Removed.
12830 (grub_device_set_root): Likewise.
12832 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12833 make sure that DIRNAME terminates with '/', so that
12834 grub_fat_find_dir will fail if PATH is not a directory.
12836 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12838 Use the qualifier auto for print_files and print_files_long.
12839 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12841 Put a newline only if there is no error.
12842 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12845 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12847 * kern/partition.c (grub_partition_probe): Initialize PART to
12848 NULL. Otherwise, when no partition map is registered, this returns
12851 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12853 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12854 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12857 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12859 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12860 information on each device, if it does not have partitions. Print
12861 "Device" instead of "Disk", because this function is not specific
12864 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12865 static to ensure that it is put on the memory rather than a
12868 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12870 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12871 (grub_cat_init): Likewise.
12872 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12873 (options): Likewise.
12874 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12875 (grub_configfile_init): Likewise.
12876 * font/manager.c (GRUB_MOD_INIT): Likewise.
12877 * commands/help.c (GRUB_MOD_INIT): Likewise.
12878 (grub_help_init): Likewise.
12879 * normal/command.c (grub_command_init): Likewise.
12880 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12881 * disk/loopback.c (grub_loop_init): Likewise.
12882 (GRUB_MOD_INIT): Likewise.
12883 * commands/ls.c (grub_ls_init): Likewise.
12884 (GRUB_MOD_INIT): Likewise.
12885 (options): Likewise.
12886 * commands/boot.c (grub_boot_init): Likewise.
12887 (GRUB_MOD_INIT): Likewise.
12888 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12889 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12890 (GRUB_MOD_INIT): Likewise.
12891 * commands/cmp.c (grub_cmp_init): Likewise.
12892 (GRUB_MOD_INIT): Likewise.
12894 * normal/arg.c: Use <> instead of "" to include header files.
12895 (SHORT_ARG_HELP): New macro.
12896 (SHORT_ARG_USAGE): Likewise.
12897 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12898 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12900 (find_short): Check if C is 'h' or 'u' explicitly.
12901 (grub_arg_show_help): Use space characters instead of tabs. Treat
12902 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12903 are shown with --help and --usage only if they are not used for
12904 the command itself.
12905 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12908 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12909 const into "longarg". Change the type of "shortarg" to int.
12911 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12913 * boot/i386/pc/boot.S (boot_drive_check): New label.
12915 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12918 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12919 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12921 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12923 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12924 When turning off Gate A20, skip the check and return immediately,
12925 because this is not fatal usually.
12927 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12929 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12930 be 0x7C00 instead of 0x8000.
12932 * boot/i386/pc/pxeboot.S: Rewritten.
12934 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12936 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12939 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12941 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12942 robustness. This routine now supports a BIOS call and System
12943 Control Port A to modify the gate A20.
12945 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12946 Increased to 0x440.
12948 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12950 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12951 device path and resulting ihandle.
12952 (grub_ofdisk_close): dprintf the ihandle being closed.
12953 (grub_ofdisk_read): dprintf function parameters.
12954 * kern/mm.c (grub_mm_init_region): Likewise.
12955 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12956 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12957 size, and boot arguments.
12958 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12959 before loading into memory.
12960 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12961 before loading into memory.
12963 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12965 * kern/mm.c: Added much documentation.
12966 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12967 8, set to 5 instead of 8.
12969 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
12971 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12973 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12974 (grub_mkdevicemap_SOURCES): New variable.
12976 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12977 lib/device.c of GRUB Legacy.
12979 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
12981 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12982 instead of PATH is NULL.
12984 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12986 * commands/cmp.c (BUFFER_SIZE): New macro.
12987 (grub_cmd_cmp): Close the right file at the right time. Compare
12988 only data just read. Don't report files of different size as
12989 identical. Dynamically allocate buffers. Move variable
12990 declarations at the beginning of function.
12992 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
12994 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12997 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12999 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13000 when backspace is pressed at beginning of line.
13002 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
13004 * DISTLIST: Added genfslist.sh.
13006 * normal/main.c (fs_module_list): New variable.
13007 (autoload_fs_module): New function.
13008 (read_fs_list): Likewise.
13009 (grub_normal_execute): Call read_fs_list.
13011 * kern/fs.c (grub_fs_autoload_hook): New variable.
13012 (grub_fs_probe): Added support for auto-loading.
13014 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13015 (grub_fs_module_list_t): New type.
13017 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13018 (grub_fs_autoload_hook): New prototype.
13020 * genfslist.sh: New file.
13022 * genmk.rb: Added a rule to generate a filesystem list.
13024 2005-06-30 Marco Gerards <metgerards@student.han.nl>
13026 * configure.ac: Fix the test for cross-compiling.
13028 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13029 define GRUB_UTIL anymore.
13031 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13032 so this function works on other systems than just big endian.
13033 (load_modules): Likewise.
13034 (add_segments): Likewise.
13036 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13038 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13039 contains `l' modifier, get a long from va_arg().
13041 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13043 * kern/mm.c (grub_free): If the next free block which is being
13044 merged is the first free block, set the first block to the block
13046 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13048 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13050 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13051 `grub_ieee1275_chosen'.
13053 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13055 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13056 (grub_ieee1275_chosen): New variable.
13057 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13059 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13060 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13061 Rename first argument to `phandle' for consistency.
13062 (grub_ieee1275_get_property_length): Likewise.
13063 (grub_ieee1275_next_property): Likewise. Change type of first argument
13064 to grub_ieee1275_phandle_t.
13065 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13066 Move export next to declaration.
13067 (grub_ieee1275_chosen): New variable.
13068 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13069 Correct cosmetic typo.
13070 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13071 `grub_ieee1275_chosen'.
13072 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13073 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13074 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13075 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13076 `grub_ieee1275_chosen'.
13078 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13080 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13082 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13083 /chosen/bootargs as "variable=value" pairs.
13085 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13087 * include/grub/misc.h (grub_dprintf): New macro.
13088 (grub_real_dprintf): New prototype.
13089 (grub_strword): Likewise.
13090 (grub_iswordseparator): Likewise.
13091 * kern/misc.c (grub_real_dprintf): New function.
13092 (grub_strword): Likewise.
13093 (grub_iswordseparator): Likewise.
13095 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13097 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13098 (roundup): Remove macro.
13099 (grub_ieee1275_flags): Make static.
13100 (grub_ieee1275_realmode): Remove.
13101 (grub_ieee1275_test_flag): New function.
13102 (grub_ieee1275_set_flag): Likewise.
13103 (find_options): Rename to `grub_ieee1275_find_options'; update
13104 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13105 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13106 (cmain): New prototype.
13107 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13108 `grub_ieee1275_flags' directly.
13109 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13110 machine/biosdisk.h.
13111 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13112 Don't include grub/machine/init.h.
13113 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13114 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13116 (grub_ieee1275_realmode): Likewise.
13117 (grub_ieee1275_flag): New enum.
13118 (grub_ieee1275_test_flag): New prototype.
13119 (grub_ieee1275_set_flag): New prototype.
13120 * include/grub/powerpc/ieee1275/init.h: Remove file.
13121 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13122 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13123 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13124 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13126 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13127 `grub_ieee1275_test_flag'.
13128 (grub_ieee1275_encode_devname): Likewise.
13130 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13132 * include/grub/powerpc/ieee1275/ieee1275.h
13133 (grub_ieee1275_encode_devname): New prototype.
13134 (grub_ieee1275_get_filename): Likewise.
13135 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13137 (grub_set_prefix): Likewise.
13138 (grub_machine_init): Call grub_set_prefix.
13139 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13140 (grub_parse_type): New enum.
13141 (grub_ieee1275_get_devargs): New function.
13142 (grub_ieee1275_get_devname): Likewise.
13143 (grub_ieee1275_parse_args): Likewise.
13144 (grub_ieee1275_get_filename): Likewise.
13145 (grub_ieee1275_encode_devname): Likewise.
13147 2005-03-30 Marco Gerards <metgerards@student.han.nl>
13149 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13150 `grub_loader_unset'.
13152 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13154 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13155 instead of grub_ieee1275_interpret.
13156 (grub_halt_init): New function.
13157 (grub_halt_fini): Likewise.
13158 (GRUB_MOD_INIT): Correct message grammar.
13159 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13160 instead of grub_ieee1275_interpret.
13161 (grub_reboot_init): New function.
13162 (grub_reboot_fini): Likewise.
13163 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13164 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13165 util/i386/pc/misc.c with commands/ieee1275/halt.c,
13166 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13167 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13169 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13171 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13173 (grub_halt): Likewise.
13174 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13175 (cmain): Remove __attribute__((unused)).
13176 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13177 (grub_heap_len): Likewise.
13178 (grub_machine_fini): New function.
13179 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13180 (grub_halt): Likewise.
13181 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13183 * util/powerpc/ieee1275/misc.c: New file.
13185 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13187 * DISTLIST: New file.
13188 * gendistlist.sh: Likewise.
13190 * Makefile.in (COMMON_DISTFILES): Removed.
13191 (BOOT_DISTFILES): Likewise.
13192 (CONF_DISTFILES): Likewise.
13193 (DISK_DISTFILES): Likewise.
13194 (FS_DISTFILES): Likewise.
13195 (INCLUDE_DISTFILES): Likewise.
13196 (KERN_DISTFILES): Likewise.
13197 (LOADER_DISTFILES): Likewise.
13198 (TERM_DISTFILES): Likewise.
13199 (UTIL_DISTFILES): Likewise.
13200 (DISTFILES): Likewise.
13201 (uninstall): Uninstall files in $(pkgdata_DATA).
13202 (DISTLIST): New target.
13203 (distdir): Use the contents of the file DISTLIST to get a list of
13206 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13208 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
13209 descriptor. This is ported from GRUB Legacy.
13211 * gencmdlist.sh: Added an extra semicolon to make it work with
13212 old sed versions. Reported by Robert Bihlmeyer
13213 <robbe@orcus.priv.at>.
13215 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
13217 Automatic loading of commands is supported.
13219 * normal/main.c (read_command_list): New function.
13220 (grub_normal_execute): Call read_command_list.
13222 * normal/command.c (grub_register_command): Return zero or CMD.
13223 Allocate CMD->NAME from the heap.
13224 Initialize CMD->MODULE_NAME to zero.
13225 Find the same name as well. If the same command is found and it is
13226 a dummy command, overwrite members. If it is not a dummy command,
13228 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
13229 (grub_command_find): If a dummy command is found, load a module
13230 and retry to find a command only once.
13232 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
13233 make sure that each command is loaded.
13235 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
13237 (struct grub_command): Remove const from the member `name'.
13238 Add a new member `module_name'.
13239 (grub_register_command): Return grub_command_t.
13241 * commands/help.c (grub_cmd_help): Call grub_command_find to make
13242 sure that each command is loaded.
13244 * genmk.rb (PModule::rule): Specify a module name without the
13245 suffix ".mod" to gencmdlist.sh.
13247 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13249 * gencmdlist.sh: New file.
13251 * genmk.rb (PModule::rule): Generate a rule for a command list.
13253 Generate command.lst from $(COMMANDFILES).
13255 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13256 (DATA): Added $(pkgdata_DATA).
13257 (install-local): Install files in $(pkgdata_DATA).
13259 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13261 * term/i386/pc/vga.c (debug_command): Removed.
13262 (GRUB_MOD_INIT): Do not register the command "debug".
13264 From Hollis Blanchard:
13265 * commands/configfile.c: New file.
13266 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13267 commands/configfile.c.
13268 (pkgdata_MODULES): Added configfile.mod.
13269 (configfile_mod_SOURCES): New variable.
13270 (configfile_mod_CFLAGS): Likewise.
13271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13272 commands/configfile.c.
13273 (pkgdata_MODULES): Added configfile.mod.
13274 (configfile_mod_SOURCES): New variable.
13275 (configfile_mod_CFLAGS): Likewise.
13276 * util/grub-emu.c (main): Call grub_configfile_init and
13277 grub_configfile_fini.
13278 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13280 [GRUB_UTIL] (grub_configfile_fini): Likewise.
13282 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13284 * normal/arg.c (grub_arg_show_help): Do not show the bug report
13287 * commands/help.c (grub_cmd_help): Do not print newlines after
13288 the last command in print_command_help.
13290 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13292 * commands/default.h: New file.
13293 * commands/timeout.h: Likewise.
13294 * normal/context.c: Likewise.
13296 * util/misc.c: Do not include sys/times.h.
13297 Include sys/time.h and grub/machine/time.h.
13298 (grub_get_rtc): Rewritten with gettimeofday.
13300 * util/grub-emu.c (main): Call grub_default_init and
13301 grub_timeout_init before grub_normal_init, and call
13302 grub_timeout_fini and grub_default_fini after grub_main.
13304 * util/console.c (grub_ncurses_checkkey): Return the read
13307 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13310 * normal/main.c (read_config_file): Push MENU. If this fails,
13311 print an error and wait for a user input.
13312 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13313 If a menu is empty or an error occurs, pop MENU.
13314 (grub_normal_execute): Pop and free MENU after grub_menu_run
13317 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13319 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13321 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13323 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13325 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13328 * include/grub/normal.h (struct grub_menu_list): New struct.
13329 (grub_menu_list_t): New type.
13330 (struct grub_context): New struct.
13331 (grub_context_t): New type.
13332 (grub_register_command): Got rid of EXPORT_FUNC.
13333 (grub_unregister_command): Likewise.
13334 (grub_context_get): New prototype.
13335 (grub_context_get_current_menu): Likewise.
13336 (grub_context_push_menu): Likewise.
13337 (grub_context_pop_menu): Likewise.
13338 [GRUB_UTIL] (grub_default_init): Likewise.
13339 [GRUB_UTIL] (grub_default_fini): Likewise.
13340 [GRUB_UTIL] (grub_timeout_init): Likewise.
13341 [GRUB_UTIL] (grub_timeout_fini): Likewise.
13343 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13344 commands/timeout.c and normal/context.c.
13345 (pkgdata_MODULES): Added default.mod and timeout.mod.
13346 (normal_mod_SOURCES): Added normal/context.c.
13347 (default_mod_SOURCES): New variable.
13348 (default_mod_CFLAGS): Likewise.
13349 (timeout_mod_SOURCES): Likewise.
13350 (timeout_mod_CFLAGS): Likewise.
13351 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13353 (pkgdata_MODULES): Added default.mod and timeout.mod.
13354 (normal_mod_SOURCES): Added normal/context.c.
13355 (default_mod_SOURCES): New variable.
13356 (default_mod_CFLAGS): Likewise.
13357 (timeout_mod_SOURCES): Likewise.
13358 (timeout_mod_CFLAGS): Likewise.
13360 * Makefile.in (all-local): Added $(MKFILES).
13362 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
13364 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13365 (grub_emu_SOURCES): Likewise.
13366 (pkgdata_MODULES): Add `sun.mod'.
13367 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13368 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13370 (pkgdata_MODULES): Add `sun.mod'.
13371 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13372 * include/grub/partition.h (grub_sun_partition_map_init): New
13374 (grub_sun_partition_map_fini): Likewise.
13375 * partmap/sun.c: New file.
13376 * util/grub-emu.c (main): Initialize and de-initialize the sun
13377 partitionmap support.
13379 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
13381 This implements an Emacs-like menu entry editor.
13383 * normal/menu_entry.c: New file.
13385 * util/console.c (grub_ncurses_putchar): Translate some Unicode
13386 characters to ASCII.
13387 (saved_char): New variable.
13388 (grub_ncurses_checkkey): Rewritten completely.
13389 (grub_ncurses_getkey): Likewise.
13390 (grub_ncurses_init): Call raw instead of cbreak.
13392 * normal/menu.c (print_entry): Do not put a space.
13393 (init_page): Renamed to ...
13394 (grub_menu_init_page): ... this. All callers changed.
13395 (edit_menu_entry): Removed.
13396 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13398 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13400 * kern/misc.c (grub_vprintf): Call grub_refresh.
13402 * normal/menu.c (DISP_LEFT): Renamed to ...
13403 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13404 * normal/menu.c (DISP_UP): Renamed to ...
13405 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13406 * normal/menu.c (DISP_RIGHT): Renamed to ...
13407 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13408 * normal/menu.c (DISP_DOWN): Renamed to ...
13409 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13410 * normal/menu.c (DISP_HLINE): Renamed to ...
13411 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13412 * normal/menu.c (DISP_VLINE): Renamed to ...
13413 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13414 * normal/menu.c (DISP_UL): Renamed to ...
13415 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13416 * normal/menu.c (DISP_UR): Renamed to ...
13417 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13418 * normal/menu.c (DISP_LL): Renamed to ...
13419 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13420 * normal/menu.c (DISP_LR): Renamed to ...
13421 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13422 * normal/menu.c (TERM_WIDTH): Renamed to ...
13423 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13424 * normal/menu.c (TERM_HEIGHT): Renamed to ...
13425 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13426 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13427 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13428 * normal/menu.c (TERM_MARGIN): Renamed to ...
13429 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13430 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13431 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13432 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13433 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13434 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13435 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13436 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13437 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13438 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13439 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13440 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13441 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13442 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13443 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13444 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13445 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13446 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13447 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13448 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13449 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13450 All callers changed.
13452 * include/grub/normal.h: New prototype.
13454 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13455 normal/menu_entry.c.
13456 (normal_mod_SOURCES): Likewise.
13457 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13458 (normal_mod_SOURCES): Likewise.
13460 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13462 * include/grub/normal.h (grub_halt_init): New prototype.
13463 (grub_halt_fini): Likewise.
13464 (grub_reboot_init): Likewise.
13465 (grub_reboot_fini): Likewise.
13467 * util/grub-emu.c: Include signal.h.
13468 (main_env): New global variable.
13469 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13471 (grub_machine_fini): New function.
13472 (main): Call grub_halt_init and grub_reboot_init before
13473 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13474 Call setjmp with MAIN_ENV to go back afterwards.
13475 Call grub_machine_fini right before return.
13477 * include/grub/util/misc.h: Include setjmp.h.
13478 (main_env): New prototype.
13480 * include/grub/kernel.h (grub_machine_fini): New prototype.
13481 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13482 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13484 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13485 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13486 * term/i386/pc/console.c (grub_console_fini): Likewise.
13488 * util/i386/pc/misc.c: New file.
13490 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13491 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13492 commands/i386/pc/reboot.c.
13494 2005-02-14 Guillem Jover <guillem@hadrons.org>
13496 * include/grub/dl.h (grub_dl_check_header): New prototype.
13497 (grub_arch_dl_check_header): Change return type to grub_err_t,
13498 remove size parameter and export function. Update all callers.
13499 * kern/dl.c (grub_dl_check_header): New function.
13500 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13501 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13502 are inside the core.
13503 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13504 independent ELF header checks.
13505 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13506 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13507 `grub_dl_check_header' instead of explicit checks. Check for the
13509 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13510 `grub_dl_check_header' instead of explicit checks. Remove arch
13511 specific ELF header checks.
13513 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13516 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13518 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13519 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13521 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13523 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13524 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13525 (part_map_iterate): Clear `grub_errno' and return 0 if
13526 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13527 * partmap/amiga.c (amiga_partition_map_iterate): Return
13528 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13529 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13531 2005-02-01 Guillem Jover <guillem@hadrons.org>
13533 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13536 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13538 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13540 (grub_rescue_cmd_linux): New prototype.
13541 (grub_rescue_cmd_initrd): Likewise.
13542 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13544 (grub_linux_release_mem): Release the memory for the initrd.
13545 (grub_load_linux): Renamed from this...
13546 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13547 Changed `entry' not to be static. Loop over memory regions to
13548 find another one when the default fails.
13549 (grub_rescue_cmd_initrd): New function.
13550 (grub_linux_init): Remove function.
13551 (grub_linux_fini): Likewise.
13552 (GRUB_MOD_INIT): Register `initrd'.
13553 (GRUB_MOD_FINI): Unregister `initrd'.
13554 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13556 (grub_linux_normal_fini): Likewise.
13557 (GRUB_MOD_INIT): Register `initrd'.
13558 (GRUB_MOD_FINI): Unregister `initrd'.
13560 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13562 * commands/help.c: New file.
13563 * normal/arg.c (show_help): Renamed to...
13564 (grub_arg_show_help): ... this.
13565 * commands/i386/pc/halt.c: New file.
13566 * commands/i386/pc/reboot.c: Likewise.
13567 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13568 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13569 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13570 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13572 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13574 (pkgdata_MODULES): Add `help.mod'.
13575 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13576 * grub/i386/pc/init.h (grub_reboot): New prototype.
13577 (grub_halt): Likewise.
13578 * include/grub/normal.h (grub_arg_show_help): New prototype.
13579 (grub_help_init): Likewise.
13580 (grub_help_fini): Likewise.
13581 * util/grub-emu.c (main): Initialize and deinitialize the help
13584 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13586 * normal/command.c (grub_command_init): Fixed the description of
13587 the `set' and `unset' commands.
13589 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13591 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13593 * commands/ieee1275/halt.c: New file.
13594 * commands/ieee1275/reboot.c: Likewise.
13595 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13596 `__attribute__ ((unused))'. Some GCS related fixed.
13597 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13598 (grub_suspend_fini): Likewise.
13599 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13601 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13602 (halt_mod_CFLAGS): New variables.
13603 * include/grub/powerpc/ieee1275/ieee1275.h
13604 (grub_ieee1275_interpret): New prototype.
13606 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13608 * include/grub/misc.h (memmove): New prototype.
13609 (memcpy): Likewise.
13611 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13613 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13614 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13616 2005-01-22 Marco Gerards <metgerards@student.han.nl>
13618 * kern/misc.c (grub_strndup): Function rewritten.
13620 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13622 * normal/menu.c (TERM_WIDTH): Macro redefined.
13623 (TERM_TOP_BORDER_Y): Likewise.
13624 (draw_border): Replaced while-loop by a for-loop. Make the number
13625 of lines consistent with the number of lines displayed in
13626 print_entries. Added a margin below the rectangle.
13627 (print_entry): Make the entry fit in the rectangle.
13628 (print_entries): Display the scroll arrows next to the right
13631 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13633 * fs/minix.c (grub_minix_find_file): Reserve more space for
13634 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13635 `grub_strncpy' to copy `path' into it.
13637 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13639 Add the loopback device, a device via which files can be accessed
13642 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13643 (pkgdata_MODULES): Add loopback.mod.
13644 (loopback_mod_SOURCES): New variable.
13645 (loopback_mod_CFLAGS): Likewise.
13646 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13648 (pkgdata_MODULES): Add loopback.mod.
13649 (loopback_mod_SOURCES): New variable.
13650 (loopback_mod_CFLAGS): Likewise.
13651 * disk/loopback.c: new file.
13652 * include/grub/normal.h (grub_loop_init): New prototype.
13653 (grub_loop_fini): New prototype.
13654 * util/grub-emu.c (main): Initialize and de-initialize loopback
13656 * include/grub/disk.h (grub_disk_dev_id): Add
13657 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13659 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13661 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13663 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13664 (suspend_mod_SOURCES): New variable.
13665 (suspend_mod_CFLAGS): Likewise.
13666 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13668 * commands/ieee1275/suspend.c: New file.
13670 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13672 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
13673 ((unused))' to `__attribute__ ((used))'.
13674 (GRUB_MOD_FINI): Likewise.
13675 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13676 * genmk.rb (PModule): Assign space to common symbols when linking
13679 2005-01-20 Marco Gerards <metgerards@student.han.nl>
13681 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13682 `unsigned' arguments to `grub_size_t'.
13683 (grub_malloc): Likewise.
13684 (grub_realloc): Likewise.
13685 (grub_memalign): Likewise.
13686 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13687 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13688 * util/misc.c (grub_malloc): Likewise.
13689 (grub_realloc): Likewise.
13690 * kern/mm.c (get_header_from_pointer): Change the casts to
13691 `unsigned' into a cast to `grub_size_t'.
13693 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13694 point to `currnode' when `currnode' is changed.
13696 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13697 Schottelius <nico-linux@schottelius.org>.
13699 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13701 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13702 (note_path): Remove variable.
13703 (GRUB_IEEE1275_NOTE_NAME): New macro.
13704 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13705 (grub_ieee1275_note_hdr): New structure.
13706 (grub_ieee1275_note_desc): Likewise.
13707 (grub_ieee1275_note): Likewise.
13708 (load_note): Remove `dir' argument. All callers updated. Remove
13709 `note_img' and `path'. Do not load a file from `note_path'.
13710 Initialize a struct grub_ieee1275_note and write that to `out'.
13711 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13713 2005-01-05 Marco Gerards <metgerards@student.han.nl>
13715 * util/misc.c (grub_util_read_image): Revert last change. It
13716 called `grub_util_read_at', which seeks from the beginning of the
13719 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13721 * TODO: Add note about endianness in grub-mkimage.
13722 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13724 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13725 (grub_mkimage_SOURCES): New target.
13726 * include/grub/kernel.h (grub_start_addr): Remove variable.
13727 (grub_end_addr): Likewise.
13728 (grub_total_module_size): Likewise.
13729 (grub_kernel_image_size): Likewise.
13730 (GRUB_MODULE_MAGIC): New constant.
13731 (grub_module_info): New structure.
13732 (grub_arch_modules_addr): New prototype.
13733 (grub_get_end_addr): Remove prototype.
13734 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13735 * include/grub/powerpc/ieee1275/kernel.h: New file.
13736 * include/grub/util/misc.h (grub_util_get_fp_size): New
13738 (grub_util_read_at): Likewise.
13739 (grub_util_write_image_at): Likewise.
13740 * kern/main.c (grub_get_end_addr): Remove function.
13741 (grub_load_modules): Call grub_arch_modules_addr instead of using
13742 grub_end_addr. Look for a grub_module_info struct in memory. Use
13743 the grub_module_info fields instead of calling grub_get_end_addr
13744 as loop conditions. Move grub_add_unused_region code here.
13745 (grub_add_unused_region): Remove function.
13746 * kern/i386/pc/init.c: Include grub/cache.h.
13747 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13748 one call to add_mem_region.
13749 (grub_arch_modules_addr): New function.
13750 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13751 (grub_total_module_size): Likewise.
13752 Include grub/machine/kernel.h.
13753 (grub_arch_modules_addr): New function.
13754 * util/grub-emu.c (grub_end_addr): Remove variable.
13755 (grub_total_module_size): Likewise.
13756 (grub_arch_modules_addr): New function.
13757 * util/misc.c: Include unistd.h.
13758 (grub_util_get_fp_size): New function.
13759 (grub_util_read_at): Likewise.
13760 (grub_util_write_image_at): Likewise.
13761 (grub_util_read_image): Call grub_util_read_at.
13762 (grub_util_write_image): Call grub_util_write_image_at.
13763 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13764 additional memory in kernel_img for a struct grub_module_info.
13765 Fill in that grub_module_info.
13766 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13768 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13770 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13772 * include/grub/powerpc/ieee1275/ieee1275.h
13773 (grub_ieee1275_milliseconds): New prototype.
13774 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13776 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13777 grub_ieee1275_milliseconds.
13779 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13781 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13783 (find_options): New function.
13784 (cmain): Call find_options.
13785 * include/grub/powerpc/ieee1275/ieee1275.h
13786 (grub_ieee1275_realmode): New extern variable.
13787 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13788 grub_map if grub_ieee1275_realmode is false.
13790 2004-12-29 Marco Gerards <metgerards@student.han.nl>
13792 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13793 lines are inserted and make it work like readline. Reported by
13794 Vincent Pelletier <subdino2004@yahoo.fr>.
13796 2004-12-28 Marco Gerards <metgerards@student.han.nl>
13798 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13801 `kern/powerpc/cache.S'.
13803 2004-12-27 Marco Gerards <metgerards@student.han.nl>
13805 * genmk.rb: Handle the `Program' class in the main loop. Written
13806 by Johan Rydberg <jrydberg@gnu.org>.
13807 (Program): New class.
13808 (programs): New variable.
13809 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13810 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13811 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13812 (help_arch): Function removed.
13813 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13814 `powerpc/libgcc.h' and `loader.h'.
13815 (pkgdata_PROGRAMS): New variable.
13816 (sbin_UTILITIES): Variable removed.
13817 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13818 (grubof_SOURCES): Variable re-defined so it only includes the
13819 core functionality.
13820 (grubof_CFLAGS): Remove `-DGRUBOF'.
13821 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13822 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13823 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13824 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13825 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13826 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13827 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13828 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13829 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13830 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13831 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13832 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13833 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13834 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13835 (pc_mod_CFLAGS): New variables.
13836 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13837 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13838 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13839 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13841 * include/grub/i386/pc/init.h (grub_os_area_addr)
13842 (rub_os_area_size): ... to here.
13843 * include/grub/powerpc/ieee1275/ieee1275.h
13844 (grub_ieee1275_entry_fn): Export symbol.
13845 * include/grub/powerpc/ieee1275/init.h: New file.
13846 * include/grub/powerpc/libgcc.h: Likewise.
13847 * include/grub/cache.h: Likewise.
13848 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13849 <hollis@penguinppc.org>.
13850 * kern/dl.c: Include <grub/cache.h>.
13851 (grub_dl_flush_cache): New function.
13852 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13854 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13855 (grub_console_init): Removed prototypes.
13856 (grub_machine_init): Don't initialize the modules anymore.
13857 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13859 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13860 Macro undef removed.
13861 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13862 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13863 relocation `R_PPC_REL32'. Return an error when the relocation is
13865 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13866 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13867 * util/misc.c (grub_arch_sync_caches): Likewise.
13869 2004-12-19 Marco Gerards <metgerards@student.han.nl>
13871 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13872 `symlist.c', add `grubof_symlist.c'.
13873 (symlist.c): Variable removed.
13874 (grubof_HEADERS): Variable added.
13875 (grubof_symlist.c): New target.
13876 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13877 `kernel_img_HEADERS'.
13878 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13879 * kern/powerpc/dl.c: New file.
13880 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13882 (grub_arch_dl_relocate_symbols): Likewise.
13883 (grub_register_exported_symbols): Likewise.
13885 2004-12-13 Marco Gerards <metgerards@student.han.nl>
13887 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13888 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13889 to fail instead. Reported by Vincent Pelletier
13890 <subdino2004@yahoo.fr>.
13892 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13893 it is not allocated. Reported by Vincent Pelletier
13894 <subdino2004@yahoo.fr>.
13896 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13897 output so the output looks better.
13899 2004-12-04 Marco Gerards <metgerards@student.han.nl>
13901 Modulize the partition map support and add support for the amiga
13904 * commands/ls.c: Include <grub/partition.h> instead of
13905 <grub/machine/partition.h>.
13906 * kern/disk.c: Likewise.
13907 * kern/rescue.c: Likewise.
13908 * loader/i386/pc/chainloader.c: Likewise.
13909 * normal/cmdline.c: Likewise.
13910 * kern/powerpc/ieee1275/init.c: Likewise.
13911 (grub_machine_init): Call `grub_pc_partition_map_init',
13912 `grub_amiga_partition_map_init' and
13913 `grub_apple_partition_map_init'.
13914 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13915 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13916 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13917 `partition.h' and `pc_partition.h'.
13918 (grub_setup_SOURCES): Remove
13919 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13920 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13921 (grub_emu_SOURCES): Likewise.
13922 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13923 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13924 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13925 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13926 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13927 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13928 (grubof_SOURCES): Likewise.
13929 * disk/i386/pc/partition.c: File removed.
13930 * disk/powerpc/ieee1275/partition.c: Likewise.
13931 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13932 * include/grub/i386/pc/partition.h: Likewise.
13933 * kern/partition.c: New file.
13934 * partmap/amiga.c: Likewise.
13935 * partmap/apple.c: Likewise.
13936 * partmap/pc.c: Likewise.
13937 * include/grub/partition.h: Likewise..
13938 * include/grub/pc_partition.h: Likewise.
13939 * util/grub-emu.c: Include <grub/partition.h> instead of
13940 <grub/machine/partition.h>.
13941 (main): Call `grub_pc_partition_map_init',
13942 `grub_amiga_partition_map_init' and
13943 `grub_apple_partition_map_init' and deinitialize afterwards.
13944 * util/i386/pc/biosdisk.c: Include `#include
13945 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13946 `<grub/machine/partition.h>'.
13947 * util/i386/pc/grub-setup.c: Likewise.
13948 * util/i386/pc/biosdisk.c: Likewise.
13949 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13950 partition information in case of a PC partition.
13951 * util/i386/pc/grub-setup.c: Include `#include
13952 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13953 `<grub/machine/partition.h>'.
13954 (setup): Only access the PC specific partition information in case
13957 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
13959 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13960 (grub_longjmp): Likewise.
13961 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13963 * normal/powerpc/setjmp.S: New file.
13964 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13965 `normal/powerpc/setjmp.S'.
13966 (grubof_CFLAGS): Add `-DGRUBOF'.
13967 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13968 [GRUB_UTIL && !GRUBOF].
13970 2004-11-16 Marco Gerards <metgerards@student.han.nl>
13972 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13973 property named `name'. Correctly handle the error returned by
13974 `grub_ieee1275_finddevice' if a device can not be opened.
13976 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13978 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13979 `actual' for negativity.
13980 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13983 2004-11-01 Marco Gerards <metgerards@student.han.nl>
13985 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13986 (PAGE_OFFSET): New macro.
13987 (CRTC_ADDR_PORT): Likewise.
13988 (CRTC_DATA_PORT): Likewise.
13989 (START_ADDR_HIGH_REGISTER): Likewise.
13990 (START_ADDR_LOW_REGISTER): Likewise.
13991 (GRAPHICS_ADDR_PORT): Likewise.
13992 (GRAPHICS_DATA_PORT): Likewise.
13993 (READ_MAP_REGISTER): Likewise.
13994 (INPUT_STATUS1_REGISTER): Likewise.
13995 (INPUT_STATUS1_VERTR_BIT): Likewise.
13996 (page): New variable.
13997 (wait_vretrace): New function.
13998 (set_read_map): Likewise.
13999 (set_start_address): Likewise.
14000 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14002 (check_vga_mem): Take the page into account.
14003 (write_char): Likewise.
14004 (write_cursor): Likewise.
14005 (scroll_up): Likewise. Copy the page to the page that is not
14006 shown and switch between both pages.
14007 (grub_vga_putchar): Fix off by one error.
14008 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14011 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14013 Add support for iso9660 (including rockridge).
14015 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14016 (iso9660_mod_SOURCES): New variable.
14017 (iso9660_mod_CFLAGS): Likewise.
14018 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14019 * include/grub/fs.h (grub_iso9660_init): New prototype.
14020 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14021 * fs/iso9660.c: New file.
14023 * include/grub/misc.h (grub_strncat): New prototype.
14024 * kern/misc.c (grub_strncat): New function.
14026 * fs/hfs.c (grub_hfs_mount): Translate the error
14027 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14028 * fs/jfs.c (grub_jfs_mount): Likewise.
14029 * fs/ufs.c (grub_ufs_mount): Likewise.
14031 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14033 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14034 which initialized BAT registers.
14035 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14036 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14038 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14039 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14041 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14042 (grub_mapclaim): Likewise.
14043 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14044 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14047 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14049 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14050 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14051 -ffreestanding and -msoft-float.
14053 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14055 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14056 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14057 set in grub_ieee1275_flags.
14059 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14061 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14063 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14064 grub_console_init first.
14065 Change the memory range used for grub_ieee1275_claim and
14066 grub_mm_init_region.
14067 Print an error message if the claim fails.
14068 Include <grub/misc.h>.
14070 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14072 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14073 Call grub_children_iterate for device nodes of type `scsi',
14075 (grub_ofdisk_open): Remove manual device alias resolution.
14076 Fix memory leak when device cannot be opened.
14077 * include/grub/powerpc/ieee1275/ieee1275.h
14078 (grub_children_iterate): New prototype.
14079 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14081 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14082 Return -1 if args.size was -1.
14084 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14086 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14087 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14088 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14089 Open Firmware's memory for it; claim memory from _start to _end.
14090 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14091 (_end): New extern.
14092 (_start): Zero BSS from __bss_start to _end.
14093 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14095 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14097 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14099 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14100 -1 if args.base was -1.
14102 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14104 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14105 escape sequence instead of a literal ^L. Also call
14106 grub_ofconsole_gotoxy.
14108 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14110 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14111 void * arguments to grub_addr_t. All callers updated. Also make
14112 the `result' argument optional.
14113 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14114 All callers updated.
14116 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14118 * commands/ls.c (grub_ls_list_files): Use the string following the
14119 initial ')', if present, as the filesystem path.
14120 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14122 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14124 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14126 Make the source code of the menu interface more readable.
14128 * normal/menu.c: Include grub/mm.h.
14129 (TERM_WIDTH): New macro.
14130 (TERM_HEIGHT): Likewise.
14131 (TERM_INFO_HEIGHT): Likewise.
14132 (TERM_MARGIN): Likewise.
14133 (TERM_SCROLL_WIDTH): Likewise.
14134 (TERM_TOP_BORDER_Y): Likewise.
14135 (TERM_LEFT_BORDER_X): Likewise.
14136 (TERM_BORDER_WIDTH): Likewise.
14137 (TERM_MESSAGE_HEIGHT): Likewise.
14138 (TERM_BORDER_HEIGHT): Likewise.
14139 (TERM_NUM_ENTRIES): Likewise.
14140 (TERM_FIRST_ENTRY_Y): Likewise.
14141 (TERM_ENTRY_WIDTH): Likewise.
14142 (TERM_CURSOR_X): Likewise.
14143 (draw_border): Use macros instead of magic numbers.
14144 (print_entry): Likewise.
14145 (print_entries): Likewise.
14146 (run_menu): Likewise. Also, handle the key 'e'.
14147 (run_menu_entry): Ignore empty command lines.
14148 (print_message): Added a new argument EDIT. If EDIT is true,
14149 print a different message.
14150 (init_page): Likewise.
14151 (edit_menu_entry): New function. Not implemented yet.
14153 2004-09-17 Marco Gerards <metgerards@student.han.nl>
14155 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14156 can be loaded from normal mode.
14158 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14160 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14161 (multiboot_mod_CFLAGS): New variables.
14162 * loader/i386/pc/linux_normal.c: New file.
14163 * loader/i386/pc/multiboot_normal.c: Likewise.
14165 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14166 attribute `unused'.
14168 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
14169 `fdiro' to read the mode information from instead of `diro'.
14171 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14172 looking up a symlink.
14174 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14176 * normal/command.c (grub_command_execute): Don't parse the
14177 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14178 flags of the command.
14180 * normal/menu.c (grub_menu_run): Fix typo.
14182 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
14184 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14186 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14187 `y + 1' instead of `y - 1'.
14189 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
14191 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
14193 From Hollis Blanchard <hollis@penguinppc.org>:
14194 * kern/misc.c (memmove): New alias for grub_memmove.
14195 (memcmp): New alias for grub_memcmp.
14196 (memset): New alias for grub_memset.
14197 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14198 Change "int handle" to "grub_ieee1275_phandle_t handle".
14199 * include/grub/powerpc/ieee1275/ieee1275.h
14200 (grub_ieee1275_get_property): Likewise.
14202 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
14204 Added normal mode command `chainloader' as module chain.mod, which
14205 depends on normal.mod and _chain.mod.
14207 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
14208 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
14209 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
14211 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
14212 but arguments parsing moved to ...
14213 (grub_chainloader_cmd): ... here. New function.
14214 * include/grub/i386/pc/chainloader.h: New file.
14215 * loader/i386/pc/chainloader_normal.c: Likewise.
14217 2004-09-11 Marco Gerards <metgerards@student.han.nl>
14219 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
14220 (grub_mkimage_LDFLAGS): Likewise.
14221 (grub_emu_SOURCES): Likewise.
14222 (kernel_img_HEADERS): Added fshelp.h.
14223 * fs/ext2.c: Include <grub/fshelp.h>.
14224 (FILETYPE_REG): New macro.
14225 (FILETYPE_INO_REG): Likewise.
14226 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
14228 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
14230 (grub_fshelp_node): New struct.
14231 (grub_ext2_data): Added member `diropen'. Changed member `inode'
14233 (grub_ext2_get_file_block): Removed function.
14234 (grub_ext2_read_block): New function.
14235 (grub_ext2_read_file): Replaced parameter `data' by `node'.
14236 This function was written.
14237 (grub_ext2_mount): Read the root inode. Create a diropen struct.
14238 (grub_ext2_find_file): Removed function.
14239 (grub_ext2_read_symlink): New function.
14240 (grub_ext2_iterate_dir): Likewise.
14241 (grub_ext2_open): Rewritten.
14242 (grub_ext2_dir): Rewritten.
14243 * include/grub/fshelp.h: New file.
14244 * fs/fshelp.c: Likewise.
14246 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
14248 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
14249 (print_message): Add a missing newline.
14250 (run_menu): Added timeout support.
14251 (run_menu_entry): New local function.
14252 (grub_menu_run): Added support for booting.
14254 * kern/loader.c (grub_loader_is_loaded): New function.
14256 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14257 (grub_get_rtc): Exported.
14259 * include/grub/i386/pc/time.h: Include grub/symbol.h.
14260 (grub_get_rtc): Exported.
14262 * include/grub/normal.h (struct grub_command_list): Remove
14263 constant from the member `command'.
14265 * include/grub/loader.h (grub_loader_is_loaded): Declared.
14267 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14269 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14271 2004-08-28 Marco Gerards <metgerards@student.han.nl>
14273 Add support for the JFS filesystem.
14275 * fs/jfs.c: New file.
14276 * include/grub/fs.h (grub_jfs_init): New prototype.
14277 (grub_jfs_fini): New prototype.
14278 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14279 (grub_emu_SOURCES): Likewise.
14280 (pkgdata_MODULES): Add jfs.mod.
14281 (jfs_mod_SOURCES): New variable.
14282 (jfs_mod_CFLAGS): Likewise.
14283 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14284 (grubof_SOURCES): Likewise.
14285 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14287 * fs/fat.c (grub_fat_find_dir): Convert the filename little
14288 endian to the host endian.
14289 (grub_fat_utf16_to_utf8): Move function from there...
14290 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
14291 the endianness of the source string anymore.
14292 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14294 2004-08-24 Marco Gerards <metgerards@student.han.nl>
14296 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14297 (grub_boot_fini) [GRUB_UTIL]: Likewise.
14298 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14299 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14301 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14302 (grub_hfs_iterate_dir): Make the function static. Add prototypes
14303 for `node_found' and `it_dir'.
14304 (grub_hfs_dir): Add prototype for `dir_hook'.
14306 * fs/minix.c (grub_minix_get_file_block): Add prototype for
14307 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
14308 and `indir32' to silence a gcc warning.
14310 * include/grub/fs.h (grub_hfs_init): New prototype.
14311 (grub_hfs_fini): Likewise.
14314 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14316 Each disk device has its own id now. This is useful to make use
14317 of multiple disk devices.
14319 * include/grub/disk.h (grub_disk_dev_id): New enum.
14320 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14321 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14323 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14324 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14326 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14327 GRUB_DISK_DEVICE_OFDISK_ID as an id.
14329 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14330 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14332 * include/grub/disk.h (struct grub_disk_dev): Added a new member
14333 "id" which is used by the cache manager.
14335 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14338 2004-08-18 Marco Gerards <metgerards@student.han.nl>
14340 * fs/hfs.c: New file.
14341 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14342 (grub_emu_SOURCES): Likewise.
14343 (pkgdata_MODULES): Add hfs.mod.
14344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14345 (grubof_SOURCES): Likewise.
14346 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14348 * include/grub/misc.h (grub_strncasecmp): Add prototype.
14349 * kern/misc.c (grub_strncasecmp): Add function.
14351 2004-08-14 Marco Gerards <metgerards@student.han.nl>
14353 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14356 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14357 (grub_ext2_dir): In case the directory entry type is unknown, read
14360 2004-08-02 Peter Bruin <pjbruin@dds.nl>
14362 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14363 grub_load_linux instead of grub_rescue_cmd_linux as second
14364 argument of grub_rescue_register_command.
14366 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14368 2004-07-27 Marco Gerards <metgerards@student.han.nl>
14370 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14372 * commands/boot.c: Remove the check for `GRUB_UTIL'.
14373 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14374 `loader/powerpc/ieee1275/linux.c',
14375 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14376 * include/grub/powerpc/ieee1275/ieee1275.h
14377 (grub_ieee1275_release): New prototype.
14378 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14379 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14380 normal, boot, linux and linux_normal.
14381 * loader/powerpc/ieee1275/linux.c: New file.
14382 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14384 2004-07-12 Marco Gerards <metgerards@student.han.nl>
14386 * normal/arg.c (grub_arg_parse): Correct error handling after
14387 reallocating the argumentlist (check if `argl' is not null instead
14388 of checking if `args' is not null).
14389 * kern/mm.c (grub_realloc): Return the same pointer when using the
14390 same region, instead of returning the header address.
14392 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14394 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14395 one block instead of two when looking for the initial partition.
14396 (grub_partition_probe): Initialize the local variable `p' with 0.
14397 Use base 10 for the grub_strtoul call.
14398 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
14399 need for one local variable.
14400 (grub_strtoul): Don't add the new value to `num', instead of that
14403 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14405 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14406 (pxeboot_img_SOURCES): New variable.
14407 (pxeboot_img_ASFLAGS): Likewise.
14408 (pxeboot_img_LDFLAGS): Likewise.
14409 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
14410 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
14411 <lode_leroy@hotmail.com>.
14413 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14415 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14416 there was no input.
14418 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14420 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
14421 the history buffer logic.
14423 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14425 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14426 (FILETYPE_INO_SYMLINK): New macros.
14427 (grub_ext2_find_file): Check if the node is a directory using the
14428 inode stat information instead of using the filetype in the
14429 dirent. Exclude the first character of an absolute symlink.
14430 (grub_ext2_dir): Mask out the filetype part of the mode member of
14433 2004-05-24 Marco Gerards <metgerards@student.han.nl>
14435 Add support for UFS version 1 and 2. Add support for the minix
14436 filesystem version 1 and 2, both the variants with 14 and 30 long
14439 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14441 (grub_emu_SOURCES): Likewise.
14442 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14443 (ufs_mod_SOURCES): New variable.
14444 (ufs_mod_CFLAGS): Likewise.
14445 (minix_mod_SOURCES): Likewise.
14446 (minix_mod_CFLAGS): Likewise.
14447 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14449 (grubof_SOURCES): Likewise.
14450 * fs/ufs.c: New file.
14451 * fs/minix.c: New file.
14452 * include/grub/fs.h (grub_ufs_init): New prototype.
14453 (grub_ufs_fini): Likewise.
14454 (grub_minix_init): Likewise.
14455 (grub_minix_fini): Likewise.
14456 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14459 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14461 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14462 commands/ls.c, commands/terminal.c, commands/boot.c,
14463 commands/cmp.c and commands/cat.c.
14464 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14466 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14469 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14471 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14472 and grub_, respectively. Because the conversion is trivial and
14473 mechanical, I omit the details here. Please refer to the CVS
14474 if you need more information.
14476 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14478 * include/pupa: Renamed to ...
14479 * include/grub: ... this.
14480 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14481 * util/i386/pc/grub-mkimage.c: ... this.
14482 * util/i386/pc/pupa-setup.c: Renamed to ...
14483 * util/i386/pc/grub-setup.c: ... this.
14484 * util/pupa-emu.c: Renamed to ...
14485 * util/grub-emu.c: ... this.
14487 2004-03-29 Marco Gerards <metgerards@student.han.nl>
14489 Add support for the newworld apple macintosh (PPC). This has been
14490 tested on the powerbook 2000 only. It only adds support for
14491 generic ieee1275 functions, console and disk support. This should
14492 be easy to port to other architectures with support for Open
14495 * configure.ac: Accept the powerpc as host_cpu. In the case of
14496 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14497 specific tests are only executed while building for the i386.
14498 Inverse test for crosscompile.
14499 * genmk.rb (Utility): Allow assembler files.
14500 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14501 * conf/powerpc-ieee1275.rmk: New file.
14502 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14503 * disk/powerpc/ieee1275/partition.c: Likewise.
14504 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14505 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14506 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14507 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14508 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14509 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14510 * include/pupa/powerpc/ieee1275/loader.h
14511 * include/pupa/powerpc/setjmp.h: Likewise.
14512 * include/pupa/powerpc/types.h: Likewise.
14513 * kern/powerpc/ieee1275/init.c: Likewise.
14514 * kern/powerpc/ieee1275/openfw.c: Likewise.
14515 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14517 These files were written by Johan Rydberg
14518 (jrydberg@night.trouble.net) and I only modified them slightly.
14520 * boot/powerpc/ieee1275/cmain.c: New file.
14521 * boot/powerpc/ieee1275/crt0.S: Likewise.
14522 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14523 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14525 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14527 * Makefile.in: Update copyright.
14528 * genmodsrc.sh: Likewise.
14529 * gensymlist.sh: Likewise.
14530 * term/i386/pc/vga.c: Indent correctly.
14532 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14533 bugreporting address.
14534 * util/i386/pc/pupa-setup.c (usage): Likewise,
14535 (main): Call pupa_ext2_init and pupa_ext2_fini.
14537 * fs/fat.c (log2): Renamed to ...
14538 (fat_log2): ... this.
14539 All callers changed.
14540 * kern/misc.c (memcpy): Alias to pupa_memmove.
14541 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14543 * util/console.c (pupa_ncurses_fini): Return 0.
14545 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14546 Move fail label here.
14547 [__GNU__]: Don't warn when using stat.
14548 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14549 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14550 long int. Use strtol instead of strtoul.
14552 2004-03-14 Marco Gerards <metgerards@student.han.nl>
14554 * commands/boot.c: New file.
14555 * commands/cat.c: Likewise.
14556 * commands/cmp.c: Likewise.
14557 * commands/ls.c: Likewise.
14558 * commands/terminal.c: Likewise.
14559 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14560 (pupa_register_command): Changed interface to match the new
14562 (pupa_command_execute): Changed (almost rewritten) so it uses
14563 pupa_split_command. Added support for setting variables using the
14565 (rescue_command): Changed to work with the new argument parser.
14566 (terminal_command): Moved from here to commands/terminal.c.
14567 (set_command): New function.
14568 (unset_command): New function.
14569 (insmod_command): New function.
14570 (rmmod_command): New function.
14571 (lsmod_command): New function.
14572 (pupa_command_init): Don't initialize the command terminal
14573 anymore. Initialize the commands set, unset, insmod, rmmod and
14575 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14576 (kernel_img_HEADERS): Add arg.h and env.h.
14577 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14578 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14579 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14581 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14583 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14584 (boot_mod_SOURCES): New variable.
14585 (terminal_mod_SOURCES): Likewise.
14586 (ls_mod_SOURCES): Likewise.
14587 (cmp_mod_SOURCES): Likewise.
14588 (cat_mod_SOURCES): Likewise.
14590 * normal/arg.c: New file.
14591 * kern/env.c: Likewise.
14592 * include/pupa/arg.h: Likewise.
14593 * include/pupa/env.h: Likewise.
14594 * font/manager.c (font_command): Changed to match argument parsing
14596 (PUPA_MOD_INIT): Likewise.
14597 * hello/hello.c (pupa_cmd_hello): Likewise.
14598 (PUPA_MOD_INIT): Likewise.
14599 * include/pupa/disk.h: Include <pupa/device.h>.
14600 (pupa_print_partinfo): New prototype.
14601 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14602 (pupa_dl_get_prefix): Likewise.
14603 * include/pupa/misc.h: Include <pupa/err.h>.
14604 (pupa_isgraph): New prototype.
14605 (pupa_isdigit): Likewise.
14606 (pupa_split_cmdline): Likewise.
14607 * include/pupa/normal.h: Include <pupa/arg.h>.
14608 (pupa_command): Changed the prototype of the member `func' to
14609 match the argument parsing interface. Added member `options'.
14610 (pupa_register_command): Updated to match function.
14611 (pupa_arg_parse): New prototype.
14612 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14613 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14614 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14615 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14616 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14617 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14618 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14619 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14620 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14621 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14622 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14623 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14624 * kern/disk.c: Include <pupa/file.h>.
14625 (pupa_print_partinfo): New function.
14626 * kern/dl.c: Include <pupa/env.h>.
14627 (pupa_dl_dir): Variable removed.
14628 (pupa_dl_load): Use the environment variable `prefix' instead of
14629 the variable pupa_dl_dir.
14630 (pupa_dl_set_prefix): Function removed.
14631 (pupa_dl_get_prefix): Likewise.
14632 * kern/i386/pc/init.c: Include <pupa/env.h>.
14633 (pupa_machine_init): Use the environment variable `prefix' instead of
14634 using pupa_dl_set_prefix to set the prefix.
14635 * kern/main.c: Include <pupa/env.h>.
14636 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14637 using pupa_dl_get_prefix to get the prefix.
14638 * kern/misc.c: Include <pupa/env.h>.
14639 (pupa_isdigit): New function.
14640 (pupa_isgraph): Likewise.
14641 (pupa_ftoa): Likewise.
14642 (pupa_vsprintf): Added support for printing values of the type
14643 `double'. Make it possible to format variable output when using
14644 formatting like `%1.2%f'.
14645 (pupa_split_cmdline): New function.
14646 * kern/rescue.c: Include <pupa/env.h>.
14647 (next_word): Removed function.
14648 (pupa_rescue_cmd_prefix): Likewise.
14649 (pupa_rescue_cmd_set): New function.
14650 (pupa_rescue_cmd_unset): New function.
14651 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14652 split the command line instead of splitting it here. Added
14653 support for setting variables using the syntax `foo=bar'. Don't
14654 initialize the prefix command anymore. Initialized the set and
14656 * normal/cmdline.c: Include <pupa/env.h>.
14657 (pupa_tab_complete): Added prototypes for print_simple_completion,
14658 print_partition_completion, add_completion, iterate_commands,
14659 iterate_dev, iterate_part and iterate_dir. Moved code to print
14660 partition information from here to kern/disk.c.
14661 (pupa_cmdline_run): Don't check if the function exists anymore.
14662 * normal/main.c: Include <pupa/env.h>.
14663 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14664 instead of using pupa_dl_get_prefix to get the prefix.
14665 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14666 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14668 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14669 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14670 ((unused))' to silence a gcc warning.
14671 (pupa_vga_setcolor): Likewise.
14672 (debug_command): Changed to match argument parsing
14674 * util/pupa-emu.c: Include <pupa/env.h>.
14675 (options): Added 0's for unused fields to silence a gcc warning.
14677 (main): Use the environment variable `prefix' instead of using
14678 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14679 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14682 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14683 * util/misc.c: Include <malloc.h>.
14684 (pupa_malloc): Rewritten so errors are correctly reported.
14685 (pupa_realloc): Likewise.
14686 (pupa_memalign): Likewise.
14687 (pupa_mm_init_region): Declare unused variables with
14688 `__attribute__ ((unused))' to silence a gcc warning.
14689 * normal/i386/setjmp.S: Remove tab at the end of the file to
14690 silence a gcc warning.
14691 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14692 variables with `__attribute__ ((unused))' to silence a gcc
14694 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14695 local variable i unsigned to silence a gcc warning.
14697 * kern/term.c: Include <pupa/misc.h>.
14698 (pupa_more_lines): New variable.
14699 (pupa_more): Likewise.
14700 (pupa_putcode): When the pager is active pause at the end of every
14702 (pupa_set_more): New function.
14703 * include/pupa/term.h (pupa_set_more): New prototype.
14706 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14708 Now this project is GRUB 2 rather than PUPA. The location of
14709 the CVS repository was moved to GRUB's.
14711 * configure.ac: Use bug-grub as the reporting address.
14712 Use GRUB instead of PUPA.
14713 Change the version number to 1.90.
14715 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14717 * genkernsyms.sh: Updated copyright information.
14718 * genmk.rb: Likewise.
14719 * genmodsrc.sh: Likewise.
14720 * gensymlist.sh: Likewise.
14721 * boot/i386/pc/boot.S: Likewise.
14722 * boot/i386/pc/diskboot.S: Likewise.
14723 * disk/i386/pc/biosdisk.c: Likewise.
14724 * disk/i386/pc/partition.c: Likewise.
14725 * font/manager.c: Likewise.
14726 * fs/ext2.c: Likewise.
14727 * fs/fat.c: Likewise.
14728 * include/pupa/boot.h: Likewise.
14729 * include/pupa/device.h: Likewise.
14730 * include/pupa/disk.h: Likewise.
14731 * include/pupa/dl.h: Likewise.
14732 * include/pupa/elf.h: Likewise.
14733 * include/pupa/err.h: Likewise.
14734 * include/pupa/file.h: Likewise.
14735 * include/pupa/font.h: Likewise.
14736 * include/pupa/fs.h: Likewise.
14737 * include/pupa/kernel.h: Likewise.
14738 * include/pupa/loader.h: Likewise.
14739 * include/pupa/misc.h: Likewise.
14740 * include/pupa/mm.h: Likewise.
14741 * include/pupa/net.h: Likewise.
14742 * include/pupa/normal.h: Likewise.
14743 * include/pupa/rescue.h: Likewise.
14744 * include/pupa/setjmp.h: Likewise.
14745 * include/pupa/symbol.h: Likewise.
14746 * include/pupa/term.h: Likewise.
14747 * include/pupa/types.h: Likewise.
14748 * include/pupa/i386/setjmp.h: Likewise.
14749 * include/pupa/i386/types.h: Likewise.
14750 * include/pupa/i386/pc/biosdisk.h: Likewise.
14751 * include/pupa/i386/pc/boot.h: Likewise.
14752 * include/pupa/i386/pc/console.h: Likewise.
14753 * include/pupa/i386/pc/init.h: Likewise.
14754 * include/pupa/i386/pc/kernel.h: Likewise.
14755 * include/pupa/i386/pc/linux.h: Likewise.
14756 * include/pupa/i386/pc/loader.h: Likewise.
14757 * include/pupa/i386/pc/memory.h: Likewise.
14758 * include/pupa/i386/pc/multiboot.h: Likewise.
14759 * include/pupa/i386/pc/partition.h: Likewise.
14760 * include/pupa/i386/pc/time.h: Likewise.
14761 * include/pupa/i386/pc/vga.h: Likewise.
14762 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14763 * include/pupa/util/getroot.h: Likewise.
14764 * include/pupa/util/misc.h: Likewise.
14765 * include/pupa/util/resolve.h: Likewise.
14766 * kern/device.c: Likewise.
14767 * kern/disk.c: Likewise.
14768 * kern/dl.c: Likewise.
14769 * kern/err.c: Likewise.
14770 * kern/file.c: Likewise.
14771 * kern/fs.c: Likewise.
14772 * kern/loader.c: Likewise.
14773 * kern/main.c: Likewise.
14774 * kern/misc.c: Likewise.
14775 * kern/mm.c: Likewise.
14776 * kern/rescue.c: Likewise.
14777 * kern/term.c: Likewise.
14778 * kern/i386/dl.c: Likewise.
14779 * kern/i386/pc/init.c: Likewise.
14780 * kern/i386/pc/lzo1x.S: Likewise.
14781 * kern/i386/pc/startup.S: Likewise.
14782 * loader/i386/pc/chainloader.c: Likewise.
14783 * loader/i386/pc/linux.c: Likewise.
14784 * loader/i386/pc/multiboot.c: Likewise.
14785 * normal/cmdline.c: Likewise.
14786 * normal/command.c: Likewise.
14787 * normal/main.c: Likewise.
14788 * normal/menu.c: Likewise.
14789 * normal/i386/setjmp.S: Likewise.
14790 * term/i386/pc/console.c: Likewise.
14791 * term/i386/pc/vga.c: Likewise.
14792 * util/console.c: Likewise.
14793 * util/genmoddep.c: Likewise.
14794 * util/misc.c: Likewise.
14795 * util/pupa-emu.c: Likewise.
14796 * util/resolve.c: Likewise.
14797 * util/unifont2pff.rb: Likewise.
14798 * util/i386/pc/biosdisk.c: Likewise.
14799 * util/i386/pc/getroot.c: Likewise.
14800 * util/i386/pc/pupa-mkimage.c: Likewise.
14801 * util/i386/pc/pupa-setup.c: Likewise.
14803 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14805 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14806 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14807 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14808 reading and reset it after reading.
14809 (pupa_ext2_close): Return PUPA_ERR_NONE.
14811 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14813 (struct linux_kernel_header): Add kernel_version and
14815 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14816 pupa_file_read succeeds.
14817 (pupa_rescue_cmd_initrd): Implement.
14819 2003-12-03 Marco Gerards <metgerards@student.han.nl>
14821 * fs/ext2.c (pupa_ext2_label): New function.
14822 (pupa_ext2_fs): Added label.
14823 * fs/fat.c (pupa_fat_label): New function.
14824 (pupa_fat_fs): Added label.
14825 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14827 * kern/misc.c (pupa_strndup): New function.
14828 * include/pupa/misc.h (pupa_strndup): New prototype.
14830 * include/pupa/normal.h: Include <pupa/err.h>.
14831 (pupa_set_history): New prototype.
14832 (pupa_iterate_commands): New prototype.
14833 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14834 <pupa/disk.h>, <pupa/file.h>.
14835 (hist_size): New variable.
14836 (hist_lines): Likewise.
14837 (hist_end): Likewise.
14838 (hist_used): Likewise.
14839 (pupa_set_history): New function.
14840 (pupa_history_get): Likewise.
14841 (pupa_history_add): Likewise.
14842 (pupa_history_replace): Likewise.
14843 (pupa_tab_complete): Likewise.
14844 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14845 completion shows partitionnames while completing partitions, this
14846 feature was suggested by Jeff Bailey.
14847 * normal/command.c (pupa_iterate_commands): New function.
14848 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14849 (pupa_normal_init): Initialize history buffer.
14850 (PUPA_MOD_INIT): Likewise.
14851 (pupa_normal_fini): Free the history buffer.
14852 (PUPA_MOD_FINI): Likewise.
14854 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14857 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14858 * configure.ac [i386]: Check for regparam bug.
14859 (NESTED_FUNC_ATTR) [! i386]: Defined.
14861 2003-11-17 Marco Gerards <metgerards@student.han.nl>
14863 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14864 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14865 (pupa_emu_SOURCES): New variable.
14866 (pupa_emu_LDFLAGS): Likewise.
14867 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14868 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14869 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14870 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14871 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14872 (pupa_jmp_buf): New typedef.
14873 (pupa_setjmp) [PUPA_UTIL]: New macro.
14874 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14875 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14876 (pupa_refresh): New prototype.
14877 * include/pupa/util/getroot.h: New file.
14878 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14880 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14881 (pupa_rescue_cmd_cat): Likewise.
14882 (pupa_rescue_cmd_ls): Likewise.
14883 (pupa_rescue_cmd_testload): Likewise.
14884 (pupa_rescue_cmd_lsmod): Likewise.
14885 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14886 * normal/menu.c (run_menu): Likewise.
14887 * kern/term.c (pupa_cls): Likewise.
14888 (pupa_refresh): New function.
14889 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14890 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14891 * util/console.c: New file.
14893 * util/i386/pc/getroot.c: New file.
14894 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14895 (pupa_putchar): New function.
14896 (pupa_refresh): Likewise.
14897 (xgetcwd): Function moved to ...
14898 (strip_extra_slashes): Likewise.
14899 (get_prefix): Likewise.
14900 * util/i386/pc/getroot.c: ... here.
14901 (find_root_device): Function moved and renamed to...
14902 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14903 Changed all callers.
14904 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14906 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14907 Changed all callers.
14908 * util/misc.c (pupa_memalign): New function.
14909 (pupa_mm_init_region): Likewise.
14910 (pupa_register_exported_symbols): Likewise.
14911 (pupa_putchar): Function removed.
14912 * util/pupa-emu.c: New file.
14914 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14916 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14917 (_multiboot_mod_SOURCES): New variable.
14918 (_multiboot_mod_CFLAGS): Likewise.
14919 * loader/i386/pc/multiboot.c: New file.
14920 * include/pupa/i386/pc/multiboot.h: Likewise.
14921 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14922 (pupa_multiboot_real_boot): New function.
14923 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14924 (pupa_multiboot_real_boot): New prototype.
14925 (pupa_rescue_cmd_multiboot): Likewise
14926 (pupa_rescue_cmd_module): Likewise.
14928 * kern/loader.c (pupa_loader_set): Continue when
14929 pupa_loader_unload_func() fails.
14930 (pupa_loader_unset): New function.
14931 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14933 * kern/misc.c (pupa_stpcpy): New function.
14934 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14936 2003-11-12 Marco Gerards <metgerards@student.han.nl>
14938 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14939 for available extensions.
14941 * include/pupa/i386/pc/time.h: New file.
14942 * kern/disk.c: Include <pupa/machine/time.h>.
14943 (PUPA_CACHE_TIMEOUT): New macro.
14944 (pupa_last_time): New variable.
14945 (pupa_disk_open): Flush the cache when there was a timeout.
14946 (pupa_disk_close): Reset the timer.
14947 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14949 * util/misc.c: Include <sys/times.h>
14950 (pupa_get_rtc): New function.
14952 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14954 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14956 (pupa_ext2_get_file_block): Use blocks member.
14958 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14959 first block. Return -1 instead of pupa_errno on error.
14961 2003-10-27 Marco Gerards <metgerards@student.han.nl>
14963 * README: In the pupa-mkimage example use _chain instead of chain
14964 and ext2 instead of fat.
14965 * TODO: Replace ext2fs with jfs as an example. Add an item for
14966 adding journal playback for ext2fs.
14967 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14968 (pkgdata_MODULES): Added ext2.mod.
14969 (ext2_mod_SOURCES): New variable.
14970 (ext2_mod_CFLAGS): Likewise.
14971 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14972 * include/pupa/misc.h (pupa_strncpy): New prototype.
14973 (pupa_strcat): Likewise.
14974 (pupa_strncmp): Likewise.
14975 * kern/misc.c (pupa_strcat): Enable function.
14976 (pupa_strncpy): New function.
14977 (pupa_strncmp): Likewise.
14978 * fs/ext2.c: New file.
14980 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14981 when the read failed before retrying.
14982 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14983 (_FILE_OFFSET_BITS): Likewise.
14984 * configure.ac: Added AC_SYS_LARGEFILE.
14986 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14988 * genmk.rb (PModule#rule): Make sure to get only symbol names
14989 from the output of nm.
14990 Reported by Robert Millan <zeratul2@wanadoo.es>.
14992 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14994 I forgot to check in these changes for a long time. This adds
14995 incomplete support for VGA console, and this is still very
14996 buggy. Also, a lot of consideration is required for I18N,
14997 UNICODE, and VGA font issues. Therefore, assume that this is
14998 such that "better than nothing".
15000 * font/manager.c: New file.
15001 * include/pupa/font.h: Likewise.
15002 * include/pupa/i386/pc/vga.h: Likewise.
15003 * term/i386/pc/vga.c: Likewise.
15004 * util/unifont2pff.rb: Likewise.
15006 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15007 (pkgdata_MODULES): Added vga.mod and font.mod.
15008 (vga_mod_SOURCES): New variables.
15009 (vga_mod_CFLAGS): Likewise.
15010 (font_mod_SOURCES): Likewise.
15011 (font_mod_CFLAGS): Likewise.
15013 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15015 * include/pupa/term.h: Include pupa/err.h.
15016 (struct pupa_term): Added init and fini.
15017 Changed the argument of putchar to pupa_uint32_t.
15019 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15020 (pupa_console_real_putchar): New prototype.
15021 (pupa_console_putchar): Removed.
15022 (pupa_console_checkkey): Exported.
15023 (pupa_console_getkey): Likewise.
15025 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15028 * kern/term.c (pupa_term_set_current): Rewritten.
15029 (pupa_putchar): Likewise.
15030 (pupa_putcode): New function.
15032 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15033 (pupa_console_real_putchar): ... this.
15034 (pupa_vga_set_mode): New function.
15035 (pupa_vga_get_font): Likewise.
15037 * normal/command.c: Include pupa/term.h.
15038 (terminal_command): New function.
15039 (pupa_command_init): Register the command "terminal".
15041 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15042 (DISP_UP): Likewise.
15043 (DISP_RIGHT): Likewise.
15044 (DISP_DOWN): Likewise.
15045 (DISP_HLINE): Likewise.
15046 (DISP_VLINE): Likewise.
15047 (DISP_UL): Likewise.
15048 (DISP_UR): Likewise.
15049 (DISP_LL): Likewise.
15050 (DISP_LR): Likewise.
15052 * term/i386/pc/console.c (pupa_console_putchar): New function.
15054 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15056 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15057 FIX. Reverse the path_list.
15059 * include/pupa/normal.h: Export pupa_register_command and
15060 pupa_unregister_command.
15062 * hello/hello.c (pupa_cmd_hello): New module.
15063 * conf/i386-pc.rmk: Added hello.mod.
15065 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15067 * kern/i386/pc/lzo1x.S: New file.
15069 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15070 (compress_kernel): New variable.
15071 (generate_image): Heavily modified to support compressing a
15072 large part of the core image.
15074 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15076 (pupa_util_load_image): New function.
15078 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15079 (pupa_compressed_size): New variable.
15080 (codestart): Enable Gate A20 here.
15081 Decompress the compressed part of the core image.
15082 Rearrange the code to put functions and variables which are
15083 required for initialization in the non-compressed part.
15086 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15089 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15091 * include/pupa/i386/pc/kernel.h
15092 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15093 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15094 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15095 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15096 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15098 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15100 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15101 (Utility#rule): Likewise.
15103 * configure.ac: Check if LZO is available.
15105 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15107 * include/pupa/normal.h: New file.
15108 * include/pupa/setjmp.h: Likewise.
15109 * include/pupa/i386/setjmp.h: Likewise.
15110 * normal/cmdline.c: Likewise.
15111 * normal/command.c: Likewise.
15112 * normal/main.c: Likewise.
15113 * normal/menu.c: Likewise.
15114 * normal/i386/setjmp.S: Likewise.
15116 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15117 (pupa_rescue_cmd_initrd): Likewise.
15119 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15122 * kern/i386/pc/startup.S (translation_table): New variable.
15123 (translate_keycode): New function.
15124 (pupa_console_getkey): Call translate_keycode.
15126 * kern/rescue.c (attempt_normal_mode): New function.
15127 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15128 it failed, print a message.
15130 * kern/mm.c (pupa_real_malloc): Print more information when a
15131 free magic is broken.
15132 (pupa_free): If the first free header is not free actually, set
15135 * kern/main.c (pupa_load_normal_mode): Just load the module
15137 (pupa_main): Don't print the message
15138 "Entering into rescue mode..." here.
15140 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15142 (pupa_rescue_cmd_initrd): Likewise.
15143 (pupa_rescue_cmd_initrd): Likewise.
15145 * include/pupa/symbol.h (FUNCTION): Specify the type.
15146 (VARIABLE): Likewise.
15148 * include/pupa/err.h (pupa_err_t): Added
15149 PUPA_ERR_UNKNOWN_COMMAND.
15151 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15152 (pupa_dl_get_prefix): Likewise.
15154 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15155 Added _chain.mod and _linux.mod instead of chain.mod and
15157 (chain_mod_SOURCES): Renamed to ...
15158 (_chain_mod_SOURCES): ... this.
15159 (chain_mod_CFLAGS): Renamed to ...
15160 (_chain_mod_CFLAGS): ... this.
15161 (linux_mod_SOURCES): Renamed to ...
15162 (_linux_mod_SOURCES): ... this.
15163 (linux_mod_CFLAGS): Renamed to ...
15164 (_linux_mod_CFLAGS): ... this.
15165 (normal_mod_SOURCES): New variable.
15166 (normal_mod_CFLAGS): Likewise.
15167 (normal_mod_ASFLAGS): Likewise.
15169 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
15171 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15174 * kern/dl.c (pupa_dl_ref): Refer depending modules
15176 (pupa_dl_unref): Unrefer depending modules recursively.
15177 Don't call pupa_dl_unload implicitly, because PUPA can crash if
15178 a module is unloaded before one depending on that module is
15180 (pupa_dl_unload): Unload depending modules explicitly,
15183 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
15185 * include/pupa/i386/pc/linux.h: New file.
15186 * loader/i386/pc/linux.c: Likewise.
15188 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15190 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15191 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
15192 of PUPA_CHAINLOADER_BOOT_SECTOR.
15194 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
15195 (pupa_linux_prot_size): New variable.
15196 (pupa_linux_tmp_addr): Likewise.
15197 (pupa_linux_real_addr): Likewise.
15198 (pupa_linux_boot_zimage): New function.
15199 (pupa_linux_boot_bzimage): Likewise.
15201 * kern/i386/pc/init.c (struct mem_region): New structure.
15202 (MAX_REGIONS): New macro.
15203 (mem_regions): New variable.
15204 (num_regions): Likewise.
15205 (pupa_os_area_addr): Likewise.
15206 (pupa_os_area_size): Likewise.
15207 (pupa_lower_mem): Likewise.
15208 (pupa_upper_mem): Likewise.
15209 (add_mem_region): New function.
15210 (compact_mem_regions): Likewise.
15211 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
15212 the size of the conventional memory and that of so-called upper
15213 memory (before the first memory hole).
15214 Instead of adding each found region to free memory, use
15215 add_mem_region and add them after removing overlaps.
15216 Also, add only 1/4 of the upper memory to free memory. The rest
15217 is used for loading OS images. Maybe this is ad hoc, but this
15218 makes it much easier to relocate OS images when booting.
15220 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
15221 (pupa_enter_rescue_mode): Don't register initrd and module.
15223 * kern/mm.c: Include pupa/dl.h.
15225 * kern/main.c: Include pupa/file.h and pupa/device.h.
15227 * kern/loader.c (pupa_loader_load_module_func): Removed.
15228 (pupa_loader_load_module): Likewise.
15230 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
15233 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
15234 (pupa_linux_tmp_addr): Likewise.
15235 (pupa_linux_real_addr): Likewise.
15236 (pupa_linux_boot_zimage): Likewise.
15237 (pupa_linux_boot_bzimage): Likewise.
15239 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
15240 (pupa_upper_mem): Likewise.
15241 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
15242 module is too dangerous.
15244 * include/pupa/loader.h (pupa_os_area_addr): Declared.
15245 (pupa_os_area_size): Likewise.
15246 (pupa_loader_set): Remove the first argument. Loader doesn't
15247 manage modules or initrd any longer.
15248 (pupa_loader_load_module): Removed.
15250 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15251 (linux_mod_SOURCES): New variable.
15252 (linux_mod_CFLAGS): Likewise.
15254 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
15256 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15257 the length of a blocklist correctly.
15259 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15260 Use ioctl only if the OS file is a block device.
15261 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15262 not very useful for normal files.
15264 * kern/main.c (pupa_set_root_dev): New function.
15265 (pupa_load_normal_mode): Likewise.
15266 (pupa_main): Call those above.
15268 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15271 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15273 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
15275 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15276 (setup): Configure the installed partition information and the
15279 * loader/i386/pc/chainloader.c (my_mod): New variable.
15280 (pupa_chainloader_unload): New function.
15281 (pupa_rescue_cmd_chainloader): Refer itself.
15282 (PUPA_MOD_INIT): Save its own module in MY_MOD.
15284 * kern/i386/pc/startup.S (install_partition): Removed.
15285 (version_string): Likewise.
15286 (config_file): Likewise.
15287 (pupa_install_dos_part): New variable.
15288 (pupa_install_bsd_part): Likewise.
15289 (pupa_prefix): Likewise.
15290 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15292 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15294 (make_install_device): New function.
15295 (pupa_machine_init): Set the dl prefix.
15297 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15298 (buf): Renamed to ...
15299 (linebuf): ... this.
15300 (pupa_rescue_cmd_prefix): New function.
15301 (pupa_rescue_cmd_insmod): Likewise.
15302 (pupa_rescue_cmd_rmmod): Likewise.
15303 (pupa_rescue_cmd_lsmod): Likewise.
15304 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15307 * kern/mm.c (pupa_memalign): If failed even after invalidating
15308 disk caches, unload unneeded modules and retry.
15310 * kern/misc.c (pupa_memmove): New function.
15311 (pupa_memcpy): Removed.
15312 (pupa_strcpy): New function.
15313 (pupa_itoa): Made static.
15315 * kern/dl.c (pupa_dl_iterate): New function.
15316 (pupa_dl_ref): Likewise.
15317 (pupa_dl_unref): Likewise.
15318 (pupa_dl_unload): Return if succeeded or not.
15319 (pupa_dl_unload_unneeded): New function.
15320 (pupa_dl_unload_all): Likewise.
15321 (pupa_dl_init): Renamed to ...
15322 (pupa_dl_set_prefix): ... this.
15323 (pupa_dl_get_prefix): New function.
15325 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15326 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15327 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15328 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15329 (pupa_install_dos_part): Declared.
15330 (pupa_install_bsd_part): Likewise.
15331 (pupa_prefix): Likewise.
15332 (pupa_boot_drive): Likewise.
15334 * include/pupa/types.h: Fix a typo.
15336 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15338 (pupa_memmove): Declared.
15339 (pupa_strcpy): Likewise.
15341 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15342 pupa_mod_init takes one argument, its own module.
15343 (pupa_dl_unload_unneeded): Declared.
15344 (pupa_dl_unload_all): Likewise.
15345 (pupa_dl_ref): Likewise.
15346 (pupa_dl_unref): Likewise.
15347 (pupa_dl_iterate): Likewise.
15348 (pupa_dl_init): Renamed to ...
15349 (pupa_dl_set_prefix): ... this.
15350 (pupa_dl_get_prefix): Declared.
15352 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15353 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15355 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15356 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15358 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15359 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15361 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15363 * util/i386/pc/pupa-setup.c (setup): Define the internal
15364 function find_first_partition_start at the top level, because GCC
15365 3.0.x cannot compile internal functions in deeper scopes
15367 (find_root_device): Use lstat instead of stat.
15368 Don't follow symbolic links.
15369 Fix the path-constructing code.
15371 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15372 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15373 by a BLKGETSIZE ioctl first, because block devices don't fill
15374 the member st_mode of the structure stat on Linux.
15375 [__linux__] (linux_find_partition): Use a temporary buffer
15376 REAL_DEV for the working space. Copy it to DEV before returning.
15377 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15378 buffer cache consistent.
15379 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15380 strncmp. The previous value was merely wrong.
15381 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15383 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15384 FAT size is 12. The previous value was merely wrong.
15386 * kern/main.c (pupa_main): Don't split the starting message from
15389 * kern/term.c (pupa_putchar): Put CR after LF instead of before
15390 LF, because BIOS goes crazy about character attributes in this
15393 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15395 * include/i386/pc/util/biosdisk.h: New file.
15396 * util/i386/pc/biosdisk.c: Likewise.
15397 * util/i386/pc/pupa-setup.c: Likewise.
15399 * Makefile.in (INCLUDE_DISTFILES): Added
15400 include/pupa/i386/pc/util/biosdisk.h.
15401 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15402 directory util/i386/pc.
15403 (install-local): Added a rule for sbin_UTILITIES.
15404 (uninstall): Likewise.
15406 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15408 * util/misc.c (xrealloc): New function.
15409 (pupa_malloc): Likewise.
15410 (pupa_free): Likewise.
15411 (pupa_realloc): Likewise.
15412 (pupa_stop): Likewise.
15413 (pupa_putchar): Likewise.
15415 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15417 * include/pupa/util/misc.h (xrealloc): Declared.
15419 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15421 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15422 (PUPA_BOOT_MACHINE_BPB_END): ... this.
15424 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15425 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15427 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15428 way should be implemented.
15429 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15431 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15432 the size of NAME for safety.
15433 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15436 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15437 (pupa_setup_SOURCES): Likewise.
15439 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15441 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15443 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15444 bunch of pushl's from pusha, because this destroys the return
15447 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15449 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15450 This means that any missing prototypes could be fatal. Also, you
15451 must take care when writing assembly code. See the comments at
15452 the beginning of startup.S, for more details.
15454 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15455 compilation mechanism.
15456 (pupa_chainloader_real_boot): Likewise.
15457 (pupa_biosdisk_rw_int13_extensions): Likewise.
15458 (pupa_biosdisk_rw_standard): Likewise.
15459 (pupa_biosdisk_check_int13_extensions): Likewise.
15460 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15461 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15462 (pupa_get_memsize): Likewise.
15463 (pupa_get_mmap_entry): Likewise.
15464 (pupa_console_putchar): Likewise.
15465 (pupa_console_setcursor): Likewise.
15466 (pupa_getrtsecs): Use pushl instead of push.
15468 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15469 memory instead of the stack for a mmap entry, because some
15470 BIOSes may ignore the maximum size and overflow.
15472 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15474 * genmk.rb (PModule#rule): Compile automatically generated
15475 sources with module-specific CFLAGS as well as other sources.
15477 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15479 * configure.ac: Check ld.
15480 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15481 respectively, before checking endianness and sizes.
15483 * Makefile.in (LD): New variable.
15485 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15487 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15489 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15491 * Changelog: New file.