1 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
4 * config.h.in: Likewise.
5 * stamp-h.in: Likewise.
7 * conf/common.mk: Likewise.
8 * conf/i386-coreboot.mk: Likewise.
9 * conf/i386-efi.mk: Likewise.
10 * conf/i386-ieee1275.mk: Likewise.
11 * conf/i386.mk: Likewise.
12 * conf/i386-pc.mk: Likewise.
13 * conf/powerpc-ieee1275.mk: Likewise.
14 * conf/sparc64-ieee1275.mk: Likewise.
15 * conf/x86_64-efi.mk: Likewise.
17 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
20 2009-04-14 John Stanley <jpsinthemix@verizon.net>
21 David S. Miller <davem@davemloft.net>
23 * util/hostdisk.c (make_device_name): Fix buffer length
26 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
28 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
29 <sys/param.h> and <sys/sysctl.h>.
30 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
31 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
32 opening the device and reset them afterwards.
34 2009-04-13 Pavel Roskin <proski@gnu.org>
36 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
37 Reported by John Stanley <jpsinthemix@verizon.net>
39 2009-04-13 Robert Millan <rmh@aybabtu.com>
41 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
42 that name for menuentries when appropiate.
44 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
46 * util/grub.d/10_freebsd.in: Add a missing `fi'.
48 2009-04-13 Robert Millan <rmh@aybabtu.com>
50 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
51 to Linux, simply abort telling the user it's no longer supported.
53 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
55 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
56 doestn't exist. Check also for /boot/kernel/kernel.gz. Print
57 `freebsd_loadenv' only when devices.hints exist.
59 2009-04-13 Pavel Roskin <proski@gnu.org>
61 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
63 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
65 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
67 (grub_drive): Likewise.
69 2009-04-13 David S. Miller <davem@davemloft.net>
71 * kern/sparc64/ieee1275/ieee1275.c: New file.
72 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
73 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
74 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
75 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
76 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
77 grub_ieee1275_alloc_physmem): Declare new exported functions.
79 * include/grub/sparc64/ieee1275/loader.h: New file.
80 * include/grub/sparc64/ieee1275/memory.h: Likewise.
81 * include/grub/sparc64/kernel.h: Likewise.
82 * loader/sparc64/ieee1275/linux.c: Likewise.
84 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
85 (grub_fstest_SOURCES): Likewise.
87 * util/hostdisk.c (make_device_name): Do not make any assumptions
88 about the length of drive names.
90 * kern/dl.c (grub_dl_load_file): Close file immediately when
93 2009-04-12 David S. Miller <davem@davemloft.net>
95 * kern/misc.c (grub_ltoa): Fix cast when handling negative
96 values. Noticed by Pavel Roskin.
98 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
101 * genmk.rb: Add more flexible image type specification, also
102 pass --strip-unneeded to objcopy.
103 * conf/i386-pc.rmk: Use *_FORMAT.
104 * conf/i386-pc.mk: Rebuilt.
106 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
107 (OFDISK_HASH_SZ): Define.
108 (ofdisk_hash): New hash table.
109 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
110 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
111 instead of device phandle which is not unique.
113 * kern/sparc64/ieee1275/init.c: Delete, replace with...
114 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
115 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
116 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
117 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
118 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
119 GRUB_KERNEL_MACHINE_DATA_END): Define.
120 (grub_kernel_image_size, grub_total_module_size): Declare.
122 2009-04-12 Pavel Roskin <proski@gnu.org>
124 * configure.ac: Change the logic when we check for target tools.
125 Do it when the target is specified and it's different from the
126 specified value of the host.
128 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
130 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
131 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
132 GNU/kFreeBSD. Check if a device is a character device. Use
133 DIOCGMEDIASIZE to get the size.
134 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
135 support for GNU/kFreeBSD.
136 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
137 is a character device instead of a block device. Add support for
138 FreeBSD device names.
140 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
141 is a character device instead of a block device.
143 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
144 is a character device instead of a block device.
146 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
148 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
149 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
150 FreeBSD. Check if a device is a character device. Use
151 DIOCGMEDIASIZE to get the size.
152 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
154 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
155 is a character device instead of a block device. Add support for
156 FreeBSD device names.
158 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
159 a character device instead of a block device.
160 (grub_util_check_char_device): New function.
162 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
163 a character device instead of a block device.
165 * include/grub/util/getroot.h (grub_util_check_char_device): New
168 2009-04-11 David S. Miller <davem@davemloft.net>
170 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
172 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
173 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
174 function, if present.
175 (__bswapdi2): Likewise.
177 * include/grub/sparc64/ieee1275/boot.h: New file.
178 * boot/sparc64/ieee1275/boot.S: Likewise.
179 * boot/sparc64/ieee1275/diskboot.S: Likewise.
181 * kern/misc.c (grub_ltoa): New function.
182 (grub_vsprintf): Use it to format 'long' integers.
184 2009-04-10 David S. Miller <davem@davemloft.net>
186 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
187 slots are of type grub_ieee1275_cell_t.
188 (grub_nand_read): Likewise.
189 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
190 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
191 macros are used to compare values in arg/ret block of the call.
192 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
193 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
194 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
195 grub_ieee1275_instance_to_path, grub_ieee1275_write,
196 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
197 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
198 grub_ieee1275_close, grub_ieee1275_set_property,
199 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
200 grub_ieee1275_cell_t.
201 * kern/ieee1275/openfw.c (grub_map): Likewise.
202 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
203 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
205 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
206 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
207 (grub_devalias_iterate): Likewise.
209 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
213 * fs/ufs.c (INODE_NBLOCKS): new definition
214 (struct grub_ufs_dirent): added fields for non-BSD dirents
215 (grub_ufs_get_file_block): fixed double indirect handling
216 (grub_ufs_lookup_symlink): use more robust way to determine whether
218 (grub_ufs_find_file): support for non-BSD dirents
219 (grub_ufs_dir): support for non-BSD dirents
221 2009-04-10 Bean <bean123ch@gnail.com>
223 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
224 attribute, otherwise the size would be wrong for i386 platform.
226 * include/grub/pci.h (grub_pci_read_word): New inline function.
227 (grub_pci_read_byte): Likewise.
228 (grub_pci_write): Likewise.
229 (grub_pci_write_word): Likewise.
230 (grub_pci_write_byte): Likewise.
232 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
234 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
235 (find_framebuf): Scan pci to locate the frame buffer address.
237 * commands/efi/fixvideo.c: New file.
239 * commands/efi/loadbios.c: Likewise.
241 * commands/memrw.c: Likewise.
243 * util/grub-dumpbios.in: Likewise.
245 * conf/common.rmk (grub-dumpbios): New utility.
246 (pkglib_MODULES): New module memrw.mod.
247 (memrw_mod_SOURCE): New macro.
248 (memrw_mod_CFLAGS): Likewise.
249 (memrw_mod_LDFLAGS): Likewise.
251 * conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
253 (loadbios_mod_SOURCE): New macro.
254 (loadbios_mod_CFLAGS): Likewise.
255 (loadbios_mod_LDFLAGS): Likewise.
256 (fixvideo_mod_SOURCE): Likewise.
257 (fixvideo_mod_CFLAGS): Likewise.
258 (fixvideo_mod_LDFLAGS): Likewise.
260 * conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
262 (loadbios_mod_SOURCE): New macro.
263 (loadbios_mod_CFLAGS): Likewise.
264 (loadbios_mod_LDFLAGS): Likewise.
265 (fixvideo_mod_SOURCE): Likewise.
266 (fixvideo_mod_CFLAGS): Likewise.
267 (fixvideo_mod_LDFLAGS): Likewise.
269 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
271 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
273 2009-04-07 David S. Miller <davem@davemloft.net>
275 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
276 support for R_SPARC_OLO10 relocations. Fix compile warning for
277 R_SPARC_WDISP30 case.
278 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
280 2009-04-06 Pavel Roskin <proski@gnu.org>
282 * include/grub/misc.h (ARRAY_SIZE): New macro.
283 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
285 * loader/i386/linux.c (allocate_pages): Use free_pages().
286 (grub_linux_unload): Don't use free_pages().
287 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
288 wrong index. Treat all other modes as text modes.
289 (grub_cmd_linux): Initialize vid_mode unconditionally to
290 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
292 * commands/help.c (print_command_help): Use cmd->prio, not
293 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
295 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
299 * parttool/pcpart.c: new file
300 * commands/parttool.c: likewise
301 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
302 (parttool_mod_SOURCES): new variable
303 (parttool_mod_CFLAGS): likewise
304 (parttool_mod_LDFLAGS): likewise
305 (pcpart_mod_SOURCES): likewise
306 (pcpart_mod_CFLAGS): likewise
307 (pcpart_mod_LDFLAGS): likewise
308 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
309 and parttool/pcpart.c
310 * conf/i386-efi.rmk: likewise
311 * conf/i386-ieee1275.rmk: likewise
312 * conf/i386-pc.rmk: likewise
313 * conf/powerpc-ieee1275.rmk: likewise
314 * conf/sparc64-ieee1275.rmk: likewise
315 * conf/x86_64-ieee1275.rmk: likewise
317 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
319 Support for mtime and further expandability of dir command
321 * include/grub/lib/datetime.h: moved to ...
322 * include/grub/datetime.h: ... moved here and added
323 declaration of grub_unixtime2datetime. All users updated
324 * include/grub/fs.h: new syntax for dir and mtime functionin
326 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
327 and GRUB_FSHELP_FLAGS_MASK
328 * commands/ls.c (grub_ls_list_files): Write mtime in long format
329 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
330 (grub_ext2_mtime): new function
331 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
332 (grub_hfsplus_mtime): new function
333 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
334 (GRUB_UFS_ATTR_FILE): likewise
335 (GRUB_UFS_ATTR_LNK): likewise
336 (struct grub_ufs_sblock): new fields mtime
337 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
339 (grub_ufs_dir): mtime support
340 (grub_ufs_mtime): new function
341 * fs/affs.c (grub_affs_dir): use new dir syntax
342 * fs/afs.c (grub_afs_dir): likewise
343 * fs/cpio.c (grub_cpio_dir): likewise
344 * fs/fat.c (grub_fat_find_dir): likewise
345 * fs/hfs.c (grub_hfs_dir): likewise
346 * fs/iso9660.c (grub_iso9660_dir): likewise
347 * fs/jfs.c (grub_jfs_dir): likewise
348 * fs/minix.c (grub_minix_dir): likewise
349 * fs/ntfs.c (grub_ntfs_dir): likewise
350 * fs/reiserfs.c (grub_reiserfs_dir): likewise
351 * fs/sfs.c (grub_sfs_dir): likewise
352 * fs/xfs.c (grub_xfs_dir): likewise
353 * util/hostfs.c (grub_hostfs_dir): likewise
354 * lib/datetime.c: moved to ...
355 * normal/datetime.c: ... moved here
356 (grub_unixtime2datetime): new function
357 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
358 * normal/completition.c (iterate_dir): use new dir syntax
359 * normal/misc.c (grub_normal_print_device_info): tell the
360 last modification time of a volume
361 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
362 * conf/common.rmk: added lib/datetime.c to ls.mod
363 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
364 (normal_mod_SOURCES): likewise
365 (datetime_mod_SOURCES): Removed lib/datetime.c
366 * conf/i386-efi.rmk: likewise
367 * conf/i386-ieee1275.rmk: likewise
368 * conf/i386-pc.rmk: likewise
369 * conf/powerpc-ieee1275.rmk: likewise
370 * conf/sparc64-ieee1275.rmk: likewise
371 * conf/x86_64-efi.rmk: likewise
373 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
375 Trim trailing spaces in FAT label and support mtools-like labels
377 * fs/fat.c (grub_fat_iterate_dir): New function based
379 (grub_fat_find_dir): use grub_fat_iterate_dir
380 (grub_fat_label): likewise
382 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
384 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
386 remove extraneous kernel_elf_HEADERS
388 2009-04-04 Bean <bean123ch@gnail.com>
390 * include/grub/util/misc.h: Add dummy function fsync for mingw.
392 * util/misc.c: Likewise.
394 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
396 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
397 instead of grub_printf.
399 2009-04-03 Robert Millan <rmh@aybabtu.com>
401 * loader/i386/linux.c (grub_linux_setup_video): Fill
402 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
403 values from `mode info' structure instead of hardcoded
406 2009-04-01 Pavel Roskin <proski@gnu.org>
408 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
410 * genmk.rb: Likewise.
411 * configure.ac: Likewise.
413 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
415 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
416 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
418 2009-04-01 David S. Miller <davem@davemloft.net>
420 * normal/sparc64/setjmp.S: Fix setjmp implementation.
421 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
422 (grub_setjmp): Mark with 'returns_twice' attribute.
423 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
424 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
425 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
427 2009-04-01 Robert Millan <rmh@aybabtu.com>
429 Reapply fix from 2008-07-28 which was accidentally reverted; also
430 perform the same fix to a similar check in same function.
432 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
433 with the same number are found, just use issue a warning with
434 grub_dprintf(), as this error has been reported to be non-fatal.
436 2009-03-31 Pavel Roskin <proski@gnu.org>
438 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
439 for cross-compilation.
441 2009-03-30 Robert Millan <rmh@aybabtu.com>
443 Fix i386-ieee1275 build.
445 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
448 2009-03-30 Pavel Roskin <proski@gnu.org>
450 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
451 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
452 zero-terminated, rely only on the strlen value. Fix comparison
453 of strings differing in length.
455 2009-03-30 Robert Millan <rmh@aybabtu.com>
457 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
458 checking for abi version. Improve error messages on BIOS to notify
459 user about `linux16' command.
461 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
465 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
467 * disk/scsi.c (grub_scsi_open): free scsi in case of error
469 2009-03-29 Robert Millan <rmh@aybabtu.com>
471 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
472 set `vid_mode' accordingly.
473 (grub_linux_boot): Process `vid_mode' and set video mode.
475 2009-03-29 Robert Millan <rmh@aybabtu.com>
477 * util/grub.d/10_linux.in (linux_entry): New function.
478 Factorize generation of Linux boot entries.
480 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
482 Make the format of Environment Block plain text. The boot loader
483 part is not tested well yet.
485 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
488 (usage): Remove "info" and "clear". Add "unset". Update the
489 description of "set", as this does not delete variables any
491 (create_envblk_file): Complete rewrite.
492 (open_envblk_file): Likewise.
494 (cmd_list): Likewise.
496 (cmd_clear): Likewise.
497 (list_variables): New function.
498 (write_envblk): Likewise.
499 (set_variables): Likewise.
500 (unset_variables): Likewise.
501 (main): Complete rewrite.
503 * commands/loadenv.c (buffer): Removed.
505 (open_envblk_file): New function.
506 (read_envblk_file): Complete rewrite.
507 (grub_cmd_load_env): Likewise.
508 (grub_cmd_list_env): Likewise.
509 (struct blocklist): New struct.
510 (free_blocklists): New function.
511 (check_blocklists): Likewise.
512 (write_blocklists): Likewise.
513 (grub_cmd_save_env): Complete rewrite.
515 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
516 a plain text signature.
517 (GRUB_ENVBLK_MAXLEN): Removed.
518 (struct grub_envblk): Complete rewrite.
519 (grub_envblk_find): Removed.
520 (grub_envblk_insert): Likewise.
521 (grub_envblk_open): New prototype.
522 (grub_envblk_set): Likewise.
523 (grub_envblk_delete): Put const to VALUE.
524 (grub_envblk_iterate): Put const to NAME and VALUE.
525 (grub_envblk_close): New prototype.
526 (grub_envblk_buffer): New inline function.
527 (grub_envblk_size): Likewise.
529 * lib/envblk.c: Include grub/mm.h.
530 (grub_env_find): Removed.
531 (grub_envblk_open): New function.
532 (grub_envblk_close): Likewise.
533 (escaped_value_len): Likewise.
534 (find_next_line): Likewise.
535 (grub_envblk_insert): Removed.
536 (grub_envblk_set): New function.
537 (grub_envblk_delete): Complete rewrite.
538 (grub_envblk_iterate): Likewise.
540 2009-03-28 Robert Millan <rmh@aybabtu.com>
542 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
543 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
544 variables. Use 16-bit loader.
545 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
547 * kern/i386/loader.S (grub_linux_boot): Rename to ...
548 (grub_linux16_boot): ... this. Update all users.
549 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
550 (grub_linux_boot): ... this. Update all users.
552 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
553 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
554 commands to `linux16' and `initrd16'.
555 (GRUB_MOD_FINI(linux)): Rename to ...
556 (GRUB_MOD_FINI(linux16)): ... this.
558 2009-03-24 Pavel Roskin <proski@gnu.org>
560 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
561 not just for compilation.
563 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
565 Move multiboot helper out of kernel
567 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
568 `loader/i386/multiboot_helper.S'.
569 * conf/i386-coreboot.rmk: Likewise
570 * conf/i386-ieee1275.rmk: Likewise
572 * kern/i386/loader.S: Move multiboot helpers from here...
573 * loader/i386/multiboot_helper.S: ...moved here
574 * include/grub/i386/loader.h: Move declarations of multiboot
576 * include/grub/i386/multiboot.h: ...moved here
577 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
579 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
581 * kern/env.c (grub_env_context_open): Added an argument to specify
582 whether a new context inherits exported variables from current
583 one. This is useful when making a sandbox to interpret a config
587 * include/grub/env.h (grub_env_context_open): Updated the prototype.
589 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
591 * kern/env.c (grub_env_context_close): Fix memory leaks.
593 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
595 * normal/main.c (grub_normal_execute): Added an argument
596 BATCH to specify if an interactive interface should be provided
597 after reading a config file.
599 (read_command_list): Prevent being executed twice.
600 (read_fs_list): Likewise.
602 * include/grub/normal.h (grub_normal_execute): Updated the
605 2009-03-22 Pavel Roskin <proski@gno.org>
607 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
609 * kern/i386/pc/startup.S: Likewise.
610 * kern/i386/efi/startup.S: Likewise.
611 * kern/i386/ieee1275/startup.S: Likewise.
612 * kern/i386/coreboot/startup.S: Likewise.
613 * kern/x86_64/efi/startup.S: Likewise.
615 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
616 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
617 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
619 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
621 Bugfixes in multiboot for bugs uncovered by solaris kernel.
623 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
625 Use vaddr of correct segment for entry_point.
627 2009-03-21 Bean <bean123ch@gmail.com>
629 * commands/blocklist.c: Add include file <grub/command.h>, remove
630 <grub/normal.h> and <grub/arg.h>.
631 (grub_cmd_blocklist): Use the new command interface.
632 (GRUB_MOD_INIT): Likewise.
633 (GRUB_MOD_FINI): Likewise.
634 * commands/boot.c: Likewise.
635 * commands/cat.c: Likewise.
636 * commands/cmp.c: Likewise.
637 * commands/configfile.c: Likewise.
638 * commands/crc.c: Likewise.
639 * commands/echo.c: Likewise.
640 * commands/halt.c: Likewise.
641 * commands/handler.c: Likewise.
642 * commands/hdparm.c: Likewise.
643 * commands/help.c: Likewise.
644 * commands/hexdump.c: Likewise.
645 * commands/loadenv.c: Likewise.
646 * commands/ls.c: Likewise.
647 * commands/lsmmap.c: Likewise.
648 * commands/lspci.c: Likewise.
649 * commands/loadenv.c: Likewise.
650 * commands/read.c: Likewise.
651 * commands/reboot.c: Likewise.
652 * commands/search.c: Likewise.
653 * commands/sleep.c: Likewise.
654 * commands/test.c: Likewise.
655 * commands/usbtest.c: Likewise.
656 * commands/videotest.c: Likewise.
657 * commands/i386/cpuid.c: Likewise.
658 * commands/i386/pc/halt.c: Likewise.
659 * commands/i386/pc/play.c: Likewise.
660 * commands/i386/pc/pxecmd.c: Likewise.
661 * commands/i386/pc/vbeinfo.c: Likewise.
662 * commands/i386/pc/vbetest.c: Likewise.
663 * commands/ieee1275/suspend.c: Likewise.
664 * disk/loopback.c: Likewise.
665 * font/font_cmd.c: Likewise.
666 * hello/hello.c: Likewise.
667 * loader/efi/appleloader.c: Likewise.
668 * loader/efi/chainloader.c: Likewise.
669 * loader/i386/bsd.c: Likewise.
670 * loader/i386/efi/linux.c: Likewise.
671 * loader/i386/ieee1275/linux.c: Likewise.
672 * loader/i386/linux.c: Likewise.
673 * loader/i386/pc/chainloader.c: Likewise.
674 * loader/i386/pc/linux.c: Likewise.
675 * loader/powerpc/ieee1275/linux.c: Likewise.
676 * loader/multiboot_loader.c: Likewise.
677 * term/gfxterm.c: Likewise.
678 * term/i386/pc/serial.c: Likewise.
679 * term/terminfo.c: Likewise.
681 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
682 * term/i386/pc/vga.c: Likewise.
683 * video/readers/jpeg.c: Likewise.
684 * video/readers/png.c: Likewise.
685 * video/readers/tga.c: Likewise.
687 * util/grub-fstest (cmd_loopback): Removed.
688 (cmd_blocklist): Likewise.
690 (grub_register_command): Likewise.
691 (grub_unregister_command): Likewise.
692 (execute_command): Use grub_command_find to locate command and execute
695 * include/grub/efi/chainloader.h: Removed.
696 * loader/efi/chainloader_normal.c: Likewise.
697 * loader/i386/bsd_normal.c: Likewise.
698 * loader/i386/pc/chainloader_normal.c: Likewise.
699 * loader/i386/pc/multiboot_normal.c: Likewise.
700 * loader/linux_normal.c: Likewise.
701 * loader/multiboot_loader_normal.c: Likewise.
702 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
704 * gencmdlist.sh: Scan new registration command grub_register_extcmd
705 and grub_register_command_p1.
707 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
708 kern/command.c, lib/arg.c and commands/extcmd.c.
709 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
710 (minicmd_mod_SOURCES): New variable.
711 (minicmd_mod_CFLAGS): Likewise.
712 (minicmd_mod_LDFLAGS): Likewise.
713 (extcmd_mod_SOURCES): Likewise.
714 (extcmd_mod_CFLAGS): Likewise.
715 (extcmd_mod_LDFLAGS): Likewise.
716 (boot_mod_SOURCES): Removed.
717 (boot_mod_CFLAGS): Likewise.
718 (boot_mod_LDFLAGS): Likewise.
720 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
722 (kernel_img_HEADERS): Add command.h.
723 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
724 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
726 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
727 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
728 remove the corresponding normal mode command.
729 (normal_mod_SOURCES): Remove normal/arg.c.
730 * conf/i386-coreboot.rmk: Likewise.
731 * conf/i386-efi.rmk: Likewise.
732 * conf/i386-ieee1275.rmk: Likewise.
733 * conf/powerpc-ieee1275.rmk: Likewise.
734 * conf/x86_64-efi.rmk: Likewise.
736 * include/grub/arg.h: Move from here ...
737 * include/grub/lib/arg.h: ... to here.
739 * normal/arg.c: Move from here ...
740 * lib/arg.c: ... to here.
742 * commands/extcmd.c: New file.
743 * commands/minicmd.c: Likewise.
744 * include/grub/command.h: Likewise.
745 * include/grub/extcmd.h: Likewise.
746 * kern/command.c: Likewise.
747 * kern/corecmd.c: Likewise.
749 * kern/list.c (grub_list_iterate): Return int instead of void.
750 (grub_list_insert): New function.
751 (grub_prio_list_insert): Likewise.
753 * kern/rescue.c (grub_rescue_command): Removed.
754 (grub_rescue_command_list): Likewise.
755 (grub_rescue_register_command): Likewise.
756 (grub_rescue_unregister_command): Likewise.
757 (grub_rescue_cmd_boot): Move to minicmd.c
758 (grub_rescue_cmd_help): Likewise.
759 (grub_rescue_cmd_info): Likewise.
760 (grub_rescue_cmd_boot): Likewise.
761 (grub_rescue_cmd_testload): Likewise.
762 (grub_rescue_cmd_dump): Likewise.
763 (grub_rescue_cmd_rmmod): Likewise.
764 (grub_rescue_cmd_lsmod): Likewise.
765 (grub_rescue_cmd_exit): Likewise.
766 (grub_rescue_print_devices): Moved to corecmd.c.
767 (grub_rescue_print_files): Likewise.
768 (grub_rescue_cmd_ls): Likewise.
769 (grub_rescue_cmd_insmod): Likewise.
770 (grub_rescue_cmd_set): Likewise.
771 (grub_rescue_cmd_unset): Likewise.
772 (attempt_normal_mode): Use grub_command_find to get normal module.
773 (grub_enter_rescue_mode): Use grub_register_core_commands to register
774 commands, remove grub_rescue_register_command calls.
776 * normal/command.c (grub_register_command): Removed.
777 (grub_unregister_command): Likewise.
778 (grub_command_find): Likewise.
779 (grub_iterate_commands): Likewise.
780 (rescue_command): Likewise.
781 (export_command): Moved to corecmd.c.
782 (set_command): Removed.
783 (unset_command): Likewise.
784 (insmod_command): Likewise.
785 (rmmod_command): Likewise.
786 (lsmod_command): Likewise.
787 (grub_command_init): Likewise.
789 * normal/completion.c (iterate_command): Use cmd->prio to check for
791 (complete_arguments): Use grub_extcmd_t structure to find options.
792 (grub_normal_do_completion): Change function grub_iterate_commands to
793 grub_command_iterate.
795 * normal/execute.c (grub_script_execute_cmd): No need to parse
798 * normal/main.c (grub_dyncmd_dispatcher): New function.
799 (read_command_list): Register unload commands as dyncmd.
800 (grub_cmd_normal): Use new command interface, register rescue,
801 unregister normal at entry, register normal, unregister rescue at exit.
803 * include/grub/list.h (grub_list_test_t): New type.
804 (grub_list_iterate): Return int instead of void.
805 (grub_list_insert): New function.
806 (GRUB_AS_NAMED_LIST_P): New macro.
807 (GRUB_AS_PRIO_LIST): Likewise.
808 (GRUB_AS_PRIO_LIST_P): Likewise.
809 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
810 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
811 (grub_prio_list): New structure.
812 (grub_prio_list_insert): New function.
813 (grub_prio_list_remove): New inline function.
815 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
816 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
817 (GRUB_COMMAND_FLAG_MENU): Likewise.
818 (GRUB_COMMAND_FLAG_BOTH): Likewise.
819 (GRUB_COMMAND_FLAG_TITLE): Likewise.
820 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
821 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
822 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
823 (grub_command): Likewise.
824 (grub_register_command): Likewise.
825 (grub_command_find): Likewise.
826 (grub_iterate_commands): Likewise.
827 (grub_command_init): Likewise.
828 (grub_arg_parse): Likewise.
829 (grub_arg_show_help): Likewise.
831 * include/grub/rescue.h (grub_rescue_register_command): Removed.
832 (grub_rescue_unregister_command): Likewise.
834 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
835 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
836 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
838 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
839 grub_rescue_cmd_initrd.
840 * include/grub/i386/loader.h: Likewise.
841 * include/grub/x86_64/loader.h: Likewise.
843 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
845 2009-03-21 Bean <bean123ch@gmail.com>
847 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
848 instead of stat in mingw environment.
850 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
852 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
854 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
857 2009-03-21 Bean <bean123ch@gmail.com>
859 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
862 2009-03-18 Michel Dänzer <michel@daenzer.net>
864 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
865 checking inode flags for EXT4_EXTENTS_FLAG.
867 2009-03-18 Robert Millan <rmh@aybabtu.com>
869 * loader/i386/linux.c: Include `<grub/video.h>' and
870 `<grub/i386/pc/vbe.h>'..
871 (grub_linux_setup_video): New function. Loosely based on the EFI one.
872 (grub_linux32_boot): Attempt to configure video settings with
873 grub_linux_setup_video().
874 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
875 to avoid grub_console_fini() which would step out of graphical mode
878 2009-03-14 Robert Millan <rmh@aybabtu.com>
880 Fix build on powerpc.
881 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
883 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
885 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
886 background image command.
888 2009-03-12 Colin D Bennett <colin@gibibit.com>
890 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
891 (grub_gfxterm_putchar): Extract pairs of identical calls to
892 draw_cursor out of conditional blocks.
894 2009-03-11 Pavel Roskin <proski@gnu.org>
896 * fs/hfs.c (grub_hfs_strncasecmp): New function.
897 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
899 2009-03-11 Robert Millan <rmh@aybabtu.com>
901 * loader/i386/multiboot_elfxx.c
902 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
904 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
906 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
909 2009-03-11 Robert Millan <rmh@aybabtu.com>
911 * loader/i386/multiboot.c (code_size): New variable.
912 (grub_multiboot): Define offsets by adding to `code_size' rather
913 than subtracting from `grub_multiboot_payload_size'. Provide
914 4-byte alignment to MBI and others by increasing
915 `boot_loader_name_length' appropriately.
917 * loader/i386/multiboot_elfxx.c
918 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
920 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
922 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
925 2009-03-08 Robert Millan <rmh@aybabtu.com>
927 Make loader/i386/linux.c usable on i386-pc again.
929 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
931 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
934 2009-03-07 Bean <bean123ch@gmail.com>
936 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
939 2009-03-06 Robert Millan <rmh@aybabtu.com>
941 Fix display issue on terminals with screen size other than 80x25
942 (e.g. gfxterm with resolution higher than 640x480).
944 * normal/main.c (grub_normal_init_page): Display title text in a
945 position relative to the center of the terminal instead of relying
946 on a hardcoded offset.
948 2009-03-04 Robert Millan <rmh@aybabtu.com>
950 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
953 * Makefile.in (host_kernel): New variable.
954 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
955 scripts instead of just the windows one.
956 * configure.ac: Initialize and AC_SUBST `host_kernel'.
958 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
960 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
962 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
963 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
964 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
965 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
966 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
967 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
969 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
971 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
972 or if there's no space for the disk label and print the partition number on a
975 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
977 * util/misc.c: Include <time.h>.
978 (grub_millisleep): New function.
980 2009-03-04 Bean <bean123ch@gmail.com>
982 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
983 another option -mno-red-zone.
985 * commands/handler.c: Change module description.
987 * kern/handler.c: Add missing space at the end of description line.
989 * kern/list.c: Likewise.
991 2009-03-03 Robert Millan <rmh@aybabtu.com>
993 Move more components to the relocation area, and fix mbi pointer
994 handling to use the destination rather than the origin (thanks to
995 Vladimir Serbinenko for spotting).
997 * loader/i386/multiboot.c (mbi_dest): New variable.
998 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
999 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1002 2009-03-01 Bean <bean123ch@gmail.com>
1004 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
1005 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1006 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1007 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1009 * loader/i386/efi/linux.c (acpi_guid): New variable.
1010 (acpi_guid): Likewise.
1011 (EBDA_SEG_ADDR): New constant.
1012 (LOW_MEM_ADDR): Likewise.
1013 (FAKE_EBDA_SEG): Likewise.
1014 (fake_bios_data): New function.
1015 (grub_linux_boot): Call fake_bios_data.
1017 2009-03-01 Bean <bean123ch@gmail.com>
1019 * commands/terminal.c: Removed.
1021 * commands/handler.c: New file.
1023 * include/grub/list.h: Likewise.
1025 * include/grub/handler.h: Likewise.
1027 * kern/list.c: Likewise.
1029 * kern/handler.c: Likewise.
1031 * kern/term.h: Include header file <grub/handler.h>.
1032 (grub_term_input): Move next field to the beginning.
1033 (grub_term_output): Likewise.
1034 (grub_term_input_class): New variable.
1035 (grub_term_output_class): Likewise.
1036 (grub_term_register_input): Changed to inline function.
1037 (grub_term_register_output): Likewise.
1038 (grub_term_unregister_input): Likewise.
1039 (grub_term_unregister_output): Likewise.
1040 (grub_term_set_current_input): Likewise.
1041 (grub_term_set_current_output): Likewise.
1042 (grub_term_get_current_input): Likewise.
1043 (grub_term_get_current_output): Likewise.
1044 (grub_term_iterate_input): Removed.
1045 (grub_term_iterate_output): Likewise.
1047 * kern/term.c (grub_term_list_input): Removed.
1048 (grub_term_list_output): Likewise.
1049 (grub_term_input_class): New variable.
1050 (grub_term_output_class): Likewise.
1051 (grub_cur_term_input): Change variable as macro.
1052 (grub_cur_term_output): Likewise.
1053 (grub_term_register_input): Removed.
1054 (grub_term_register_output): Likewise.
1055 (grub_term_unregister_input): Likewise.
1056 (grub_term_unregister_output): Likewise.
1057 (grub_term_set_current_input): Likewise.
1058 (grub_term_set_current_output): Likewise.
1059 (grub_term_iterate_input): Likewise.
1060 (grub_term_iterate_output): Likewise.
1061 (grub_term_get_current_input): Likewise.
1062 (grub_term_get_current_output): Likewise.
1064 * util/grub-editenv.c: Include header file <grub/handler.h>.
1065 (grub_term_get_current_input): Removed.
1066 (grub_term_get_current_output): Likewise.
1067 (grub_term_input_class): New variable.
1068 (grub_term_output_class): Likewise.
1070 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1071 (grub_term_get_current_output): Likewise.
1072 (grub_term_input_class): New variable.
1073 (grub_term_output_class): Likewise.
1075 * util/grub-probe.c (grub_term_get_current_input): Removed.
1076 (grub_term_get_current_output): Likewise.
1077 (grub_term_input_class): New variable.
1078 (grub_term_output_class): Likewise.
1080 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1081 (grub_term_get_current_output): Likewise.
1082 (grub_term_input_class): New variable.
1083 (grub_term_output_class): Likewise.
1085 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1086 (terminal_mod_SOURCES): Likewise.
1087 (terminal_mod_CFLAGS): Likewise.
1088 (terminal_mod_LDFLAGS): Likewise.
1090 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1092 (kernel_img_SOURCES): Add list.c and handler.c.
1093 (kernel_img_HEADERS): Add list.h and handler.h.
1095 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1097 (kernel_mod_SOURCES): Add list.c and handler.c.
1098 (kernel_mod_HEADERS): Add list.h and handler.h.
1100 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1102 (kernel_elf_SOURCES): Add list.c and handler.c.
1103 (kernel_elf_HEADERS): Add list.h and handler.h.
1105 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1107 (kernel_elf_SOURCES): Add list.c and handler.c.
1108 (kernel_elf_HEADERS): Add list.h and handler.h.
1110 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1112 (kernel_mod_SOURCES): Add list.c and handler.c.
1113 (kernel_mod_HEADERS): Add list.h and handler.h.
1115 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1117 (kernel_elf_SOURCES): Add list.c and handler.c.
1118 (kernel_elf_HEADERS): Add list.h and handler.h.
1120 2009-02-27 Robert Millan <rmh@aybabtu.com>
1122 Factorize elf32 / elf64 code in Multiboot loader. This will
1123 prevent it from getting out of sync again.
1125 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1126 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1127 grub_multiboot_load_elf64): Move from here ...
1128 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1129 grub_multiboot_load_elf): ... to here (new file).
1131 2009-02-27 Robert Millan <rmh@aybabtu.com>
1133 * util/grub.d/10_linux.in: Rename "single-user mode" to
1136 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
1138 Don't leak in SCSI code.
1139 * disk/scsi.c (grub_scsi_close): free `scsi'.
1141 2009-02-27 Robert Millan <rmh@aybabtu.com>
1143 * loader/i386/pc/multiboot.c: Move from here ...
1144 * loader/i386/multiboot.c: ... to here. Update all users.
1146 2009-02-27 Robert Millan <rmh@aybabtu.com>
1148 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1149 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1151 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
1153 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1156 2009-02-27 Robert Millan <rmh@aybabtu.com>
1158 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1159 `0x' qualifier as 0 when base is specified as parameter).
1161 2009-02-24 Bean <bean123ch@gmail.com>
1163 * configure.ac: Check for -mcmodel=large in x86_64 target.
1165 * include/grub/efi/api.h (efi_call_10): New macro.
1166 (efi_wrap_10): New function.
1168 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1169 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1170 (GRUB_PE32_REL_BASED_LOW): Likewise.
1171 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1172 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1173 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1174 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1175 (GRUB_PE32_REL_BASED_REL): Likewise.
1176 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1177 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1178 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1180 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1183 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1184 (efi_wrap_10): New function.
1186 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1188 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1189 MB/MBP model (NV chipset).
1190 (devdata_devs): Add devpath_5 to the list.
1192 * load/i386/efi/linux.c (video_base): Remove variable.
1193 (RGB_MASK): New macro.
1194 (RGB_MAGIC): Likewise.
1195 (LINE_MIN): Likewise.
1196 (LINE_MAX): Likewise.
1197 (FBTEST_STEP): Likewise.
1198 (FBTEST_COUNT): Likewise.
1199 (fb_list): New variable.
1200 (grub_find_video_card): Remove function.
1201 (find_framebuf): New function.
1202 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1205 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1208 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1210 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1212 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1215 2009-02-22 Robert Millan <rmh@aybabtu.com>
1217 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1218 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1219 in our relocation, instead of using it directly from heap. Also
1220 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1222 2009-02-21 Robert Millan <rmh@aybabtu.com>
1224 Implement USB keyboard support (based on patch by Marco Gerards)
1226 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1227 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1228 (usb_keyboard_mod_LDFLAGS): New variables.
1230 * term/usb_keyboard.c: New file.
1232 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1234 Corrected wrong declaration
1236 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1238 2009-02-14 Christian Franke <franke@computer.org>
1240 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1241 (grub_lspci_iter): Print class code and programming interface byte.
1243 2009-02-14 Christian Franke <franke@computer.org>
1245 * gendistlist.sh: Ignore `.svn' directories.
1247 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
1249 * fs/fat.c: Add 2009 to Copyright line.
1251 2009-02-14 Christian Franke <franke@computer.org>
1253 * commands/hdparm.c: New file. Provides `hdparm' command
1254 which sends ATA commands via grub_disk_ata_pass_through ().
1256 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1258 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1259 and <grub/cpu/io.h> to include/grub/ata.h.
1260 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1261 (GRUB_CDROM_SECTOR_SIZE): Remove.
1262 (GRUB_ATA_*): Move to include/grub/ata.h.
1263 (GRUB_ATAPI_*): Likewise.
1264 (enum grub_ata_commands): Likewise.
1265 (enum grub_ata_timeout_milliseconds): Likewise.
1266 (struct grub_ata_device): Likewise.
1267 (grub_ata_regset): Likewise.
1268 (grub_ata_regget): Likewise.
1269 (grub_ata_regset2): Likewise.
1270 (grub_ata_regget2): Likewise.
1271 (grub_ata_check_ready): Likewise.
1272 (grub_ata_wait_not_busy): Remove static, exported in
1274 (grub_ata_wait_drq): Likewise.
1275 (grub_ata_pio_read): Likewise.
1277 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1278 function for hdparm.mod.
1280 * include/grub/ata.h: New file, contains declarations from
1282 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1284 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1285 (grub_disk_ata_pass_through): New exported variable.
1287 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1289 2009-02-13 Colin D Bennett <colin@gibibit.com>
1291 Support multiple fallback entries, and provide an API to support
1292 executing default+fallback menu entries. Renamed the `terminal' menu
1295 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1296 variable declaration.
1297 (grub_menu_execute_callback): New structure declaration.
1298 (grub_menu_execute_callback_t): New typedef.
1299 (grub_menu_execute_with_fallback): New function declaration.
1300 (grub_menu_get_entry): Likewise.
1301 (grub_menu_get_timeout): Likewise.
1302 (grub_menu_set_timeout): Likewise.
1304 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1306 * normal/menu.c (grub_wait_after_message): Moved to
1307 `normal/menu_text.c'.
1308 (draw_border): Likewise.
1309 (print_message): Likewise.
1310 (print_entry): Likewise.
1311 (print_entries): Likewise.
1312 (grub_menu_init_page): Likewise.
1313 (get_entry_number): Likewise.
1314 (print_timeout): Likewise.
1315 (run_menu): Likewise.
1316 (grub_menu_execute_entry): Likewise.
1317 (show_text_menu): Likewise.
1318 (get_and_remove_first_entry_number): New function.
1319 (grub_menu_execute_with_fallback): Likewise.
1320 (get_entry): Renamed to ...
1321 (grub_menu_get_entry): .. this and made it global.
1322 (get_timeout): Renamed to ...
1323 (grub_menu_get_timeout): ... this and made it global.
1324 (set_timeout): Renamed to ...
1325 (grub_menu_set_timeout): ... this and made it global.
1326 (grub_normal_terminal_menu_viewer): Renamed to ...
1327 (grub_normal_text_menu_viewer): ... this.
1329 * normal/menu_text.c: New file. Extracted text-menu-specific code
1332 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1333 (normal_mod_SOURCES): Likewise.
1335 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1336 (normal_mod_SOURCES): Likewise.
1338 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1339 (normal_mod_SOURCES): Likewise.
1341 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
1342 (normal_mod_SOURCES): Likewise.
1344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1345 (normal_mod_SOURCES): Likewise.
1347 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1348 (normal_mod_SOURCES): Likewise.
1350 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1351 (normal_mod_SOURCES): Likewise.
1353 2009-02-11 Robert Millan <rmh@aybabtu.com>
1355 * util/grub.d/00_header.in: Update old reference to `font' command.
1357 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
1359 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
1361 Based on patch from Javier MartÃn.
1363 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1365 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
1366 to avoid false positives with FAT.
1367 (grub_fstest_SOURCES): Likewise.
1368 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1369 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1370 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1371 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1372 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1373 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1375 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1377 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
1378 bpb.version_specific.fat12_or_fat16.fstype and
1379 bpb.version_specific.fat32.fstype.
1381 2009-02-08 Robert Millan <rmh@aybabtu.com>
1383 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
1385 2009-02-08 Robert Millan <rmh@aybabtu.com>
1387 * Makefile.in (host_os, host_cpu): New variables.
1388 (target_os): Remove. Update all users.
1390 2009-02-08 Marco Gerards <marco@gnu.org>
1392 * Makefile.in (enable_grub_emu_usb): New variable.
1393 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
1394 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
1395 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
1396 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
1397 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1398 `usbtest.mod' and `usbms.mod'.
1399 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1400 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1401 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1402 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1403 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1406 * disk/usbms.c: New file.
1408 * include/grub/usb.h: Likewise.
1410 * include/grub/usbtrans.h: Likewise.
1412 * include/grub/usbdesc.h: Likewise.
1414 * bus/usb/usbtrans.c: Likewise.
1416 * bus/usb/ohci.c: Likewise.
1418 * bus/usb/uhci.c: Likewise.
1420 * bus/usb/usbhub.c: Likewise.
1422 * bus/usb/usb.c: Likewise.
1424 * commands/usbtest.c: Likewise.
1426 * util/usb.c: Likewise.
1428 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1430 * configure.ac: Test for libusb presence.
1432 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1434 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
1436 * kern/mm.c: Add more comments.
1438 2009-02-08 Robert Millan <rmh@aybabtu.com>
1440 Patch from Javier MartÃn.
1441 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1442 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1444 2009-02-08 Robert Millan <rmh@aybabtu.com>
1446 * fs/cpio.c: Split tar functionality to ...
1447 * fs/tar.c: ... here (new file). Update all users.
1449 2009-02-07 Robert Millan <rmh@aybabtu.com>
1451 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1452 backward-incompatible features.
1454 Based on patch from Javier MartÃn, with some adjustments.
1456 2009-02-07 Michael Scherer <misc@mandriva.org>
1458 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1460 2009-02-07 Robert Millan <rmh@aybabtu.com>
1462 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1463 position of `disk/lvm.c' to ensure grub_init_all() always picks it
1464 after the RAID stuff.
1466 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
1468 Fixes problem when running vbetest command as reported by
1469 Vladimir Serbinenko <phcoder@gmail.com>.
1471 * (grub_vbe_set_video_mode): Fixed problem with text modes.
1473 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
1475 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1476 /dev/md/NpN style mdraid devices.
1478 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1480 * util/unifont2pff.rb: Remove.
1482 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1484 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1487 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1489 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1490 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1491 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1492 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1493 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1494 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1495 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1497 2009-02-02 Christian Franke <franke@computer.org>
1499 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1501 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
1503 * INSTALL: Note that we now require at least autoconf 2.59 and
1504 that LZO is optional.
1506 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1508 Base on patch on bug #24154 created by Tomas Tintera
1511 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1513 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1515 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1516 <bero@arklinux.org>.
1518 * normal/parser.y (script_init): Add missing semicolon.
1520 2009-01-31 Colin D Bennett <colin@gibibit.com>
1522 * normal/main.c: Add include to grub/menu_viewer.h.
1523 (free_menu_entry_classes): Added.
1524 (grub_normal_menu_addentry): Added class property handling.
1525 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1526 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1528 * normal/menu_viewer.c: New file.
1530 * normal/menu.c (run_menu_entry): Renamed to ...
1531 (grub_menu_execute_entry): ... this and made it as global.
1532 (grub_menu_run): Renamed to ...
1533 (show_text_menu): ... this and made it local.
1534 (show_text_menu): Adapt to new function names.
1535 (grub_normal_terminal_menu_viewer): New global variable.
1537 * include/grub/menu.h: New file.
1539 * include/grub/menu_viewer.h: New file.
1541 * include/grub/normal.h: Added include to grub/menu.h.
1542 (grub_menu_entry): Moved to include/grub/menu.h.
1543 (grub_menu_entry_t): Likewise.
1544 (grub_menu): Likewise.
1545 (grub_menu_t): Likewise.
1546 (grub_normal_terminal_menu_viewer): Added.
1547 (grub_menu_execute_entry): Likewise.
1548 (grub_menu_run): Removed.
1550 * DISTLIST: Added include/grub/menu.h.
1551 Added include/grub/menu_viewer.h.
1552 Added normal/menu_viewer.c.
1554 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
1556 * normal/execute.c (grub_script_execute_menuentry): Changed to use
1557 arglist for menutitle arguments.
1559 * normal/main.c (grub_normal_menu_addentry): Likewise.
1561 * normal/parser.y (menuentry): Likewise.
1563 * normal/script.c (grub_script_create_cmdmenu): Likewise.
1565 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1566 (grub_script_create_cmdmenu): Likewise.
1568 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1570 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1573 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1575 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1577 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1579 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1581 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1583 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1585 2009-01-30 Christian Franke <franke@computer.org>
1587 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1588 in option help text.
1590 2009-01-27 Pavel Roskin <proski@gnu.org>
1592 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1594 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1596 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1598 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1600 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1601 unregister function.
1603 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1605 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1607 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1609 * util/grub-mkfont.c (usage): Fix typo.
1611 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1613 2009-01-26 Daniel Mierswa <impulze@impulze.org>
1615 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1617 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1619 * kern/misc.c (grub_strcasecmp): New function.
1620 (grub_strcasecmp): Use grub_size_t instead of int for length.
1622 * include/grub/misc.h: Update function prototypes.
1624 2009-01-26 Robert Millan <rmh@aybabtu.com>
1626 * configure.ac: Fix cross-compilation check.
1628 2009-01-22 Christian Franke <franke@computer.org>
1630 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1631 (precision) digit string. Allow `.format2' without `format1' (width).
1632 Limit input chars for `%s' output to `format2' if specified. This is
1633 compatible with standard printf ().
1635 2009-01-22 Christian Franke <franke@computer.org>
1637 * disk/ata.c (grub_ata_wait_status): Replace by ...
1638 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1639 other status bits may be invalid while BSY is asserted.
1640 (grub_ata_check_ready): New function.
1641 (grub_ata_cmd): Removed.
1642 (grub_ata_wait_drq): New function.
1643 (grub_ata_strncpy): Remove inline.
1644 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1645 and error check now done by grub_ata_wait_drq ().
1646 (grub_ata_pio_write): Likewise.
1647 (grub_atapi_identify): Set DEV before check for !BSY. Use
1648 grub_ata_wait_drq () to wait for data.
1649 (grub_ata_device_initialize): Add status register check to
1650 detect missing SATA slave devices. Add debug messages.
1651 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1652 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1653 transfer loop by grub_ata_pio_write ().
1654 (grub_ata_identify): Set DEV before check for !BSY. Use
1655 grub_ata_wait_drq () to wait for data.
1656 (grub_ata_setaddress): Set DEV before check for !BSY.
1657 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1658 read/write in one loop. Fix invalid command on write. Fix incomplete
1659 command on (size % batch) == 0. Add missing error check after write of
1660 last block. Add debug messages.
1661 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1663 2009-01-19 Christian Franke <franke@computer.org>
1665 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1666 (GRUB_ATAPI_IREASON_*): Likewise.
1667 (grub_ata_pio_write): Fix timeout error return.
1668 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1669 (grub_atapi_wait_drq): New function.
1670 (grub_atapi_packet): New parameter `size'.
1671 Use grub_atapi_wait_drq () and direct write instead of
1672 grub_ata_pio_write ().
1673 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1674 reads the number of bytes requested by the device for each DRQ
1676 (grub_atapi_write): Remove old implementation, return not
1677 implemented instead.
1679 2009-01-19 Christian Franke <franke@computer.org>
1681 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1682 of 512 to calculate data size.
1683 (grub_scsi_read12): Likewise.
1684 (grub_scsi_write10): Likewise.
1685 (grub_scsi_write12): Likewise.
1686 (grub_scsi_read): Adjust size according to blocksize.
1687 Add checks for invalid blocksize and unaligned transfer.
1689 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1691 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1693 * term/gfxterm.c (write_char): Fix background rendering for wide
1696 2009-01-19 Robert Millan <rmh@aybabtu.com>
1698 * config.guess: Update to latest version from config git.
1699 * config.sub: Likewise.
1701 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
1703 * Makefile.in: Change font compilation to use new grub-mkfont instead
1706 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1707 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1708 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1709 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1710 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1711 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1712 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1713 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1714 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1716 2009-01-16 Christian Franke <franke@computer.org>
1718 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1719 (enum grub_ata_timeout_milliseconds): New enum.
1720 (grub_ata_wait_status): Add parameter milliseconds.
1721 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1722 recovery from timed-out commands.
1723 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1724 return grub_errno instead of REG_ERROR.
1725 (grub_ata_pio_write): Add parameter milliseconds.
1726 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1727 Pass milliseconds to grub_ata_wait_status () and
1728 grub_ata_pio_read ().
1729 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1730 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1731 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1732 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1733 It is not suitable for device detection, because DEV bit is ignored,
1734 the command may run too long, and not all devices set the signature
1736 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1737 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1738 Fix device selection, DEV bit must be set first to address the registers
1739 of the correct device.
1740 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1741 grub_ata_pio_read/write ().
1742 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1743 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1745 2009-01-13 Carles Pina i Estany <carles@pina.cat>
1747 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1749 2009-01-13 Bean <bean123ch@gmail.com>
1751 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1753 2009-01-13 Bean <bean123ch@gmail.com>
1755 * Makefile.in: (enable_grub_mkfont): New variable.
1756 (freetype_cflags): Likewise.
1757 (freetype_libs): Likewise.
1759 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1760 (grub_mkfont_SOURCES): New variable.
1761 (grub_mkfont_CFLAGS): Likewise.
1762 (grub_mkfont_LDFLAGS): Likewise.
1764 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1765 library if `--enable-grub-mkfont' is requested.
1766 (enable_grub_mkfont): New variable.
1767 (freetype_cflags): Likewise.
1768 (freetype_libs): Likewise.
1770 * util/grub-mkfont.c: New file.
1772 2009-01-12 Christian Franke <franke@computer.org>
1774 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1775 mode check. Fix setting of compat_use[].
1777 2009-01-10 Robert Millan <rmh@aybabtu.com>
1779 Update a few copyright years which we forgot to do in 2008 (only for
1780 files whose changes made in 2008 were copyright-significant)
1782 * Makefile.in: Add 2008 to Copyright line.
1783 * disk/ieee1275/ofdisk.c: Likewise.
1784 * disk/efi/efidisk.c: Likewise.
1785 * kern/dl.c: Likewise.
1786 * kern/sparc64/ieee1275/init.c: Likewise.
1787 * kern/mm.c: Likewise.
1788 * kern/efi/mm.c: Likewise.
1789 * boot/i386/pc/boot.S: Likewise.
1790 * genfslist.sh: Likewise.
1791 * fs/iso9660.c: Likewise.
1792 * fs/hfs.c: Likewise.
1793 * fs/jfs.c: Likewise.
1794 * fs/minix.c: Likewise.
1795 * fs/ufs.c: Likewise.
1796 * gensymlist.sh.in: Likewise.
1797 * genkernsyms.sh.in: Likewise.
1798 * include/grub/misc.h: Likewise.
1799 * include/grub/types.h: Likewise.
1800 * include/grub/symbol.h: Likewise.
1801 * include/grub/elf.h: Likewise.
1802 * include/grub/kernel.h: Likewise.
1803 * include/grub/disk.h: Likewise.
1804 * include/grub/dl.h: Likewise.
1805 * include/grub/i386/linux.h: Likewise.
1806 * include/grub/i386/pc/biosdisk.h: Likewise.
1807 * include/grub/efi/api.h: Likewise.
1808 * include/grub/efi/pe32.h: Likewise.
1809 * include/grub/util/misc.h: Likewise.
1810 * normal/execute.c: Likewise.
1811 * normal/arg.c: Likewise.
1812 * normal/completion.c: Likewise.
1813 * normal/lexer.c: Likewise.
1814 * normal/parser.y: Likewise.
1815 * normal/misc.c: Likewise.
1816 * commands/i386/pc/vbeinfo.c: Likewise.
1817 * commands/hexdump.c: Likewise.
1818 * commands/terminal.c: Likewise.
1819 * commands/ls.c: Likewise.
1820 * commands/help.c: Likewise.
1821 * partmap/pc.c: Likewise.
1822 * loader/efi/chainloader.c: Likewise.
1823 * loader/multiboot_loader.c: Likewise.
1824 * loader/i386/pc/multiboot2.c: Likewise.
1825 * term/efi/console.c: Likewise.
1826 * term/i386/pc/serial.c: Likewise.
1827 * util/lvm.c: Likewise.
1828 * util/console.c: Likewise.
1829 * util/i386/efi/grub-mkimage.c: Likewise.
1830 * util/raid.c: Likewise.
1832 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1834 * commands/videotest.c: Removed include to grub/machine/memory.h.
1836 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1837 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1838 (video_mod_SOURCES): Removed.
1839 (video_mod_CFLAGS): Likewise.
1840 (video_mod_LDFLAGS): Likewise.
1841 (gfxterm_mod_SOURCES): Likewise.
1842 (gfxterm_mod_CFLAGS): Likewise.
1843 (gfxterm_mod_LDFLAGS): Likewise.
1844 (videotest_mod_SOURCES): Likewise.
1845 (videotest_mod_CFLAGS): Likewise.
1846 (videotest_mod_LDFLAGS): Likewise.
1847 (bitmap_mod_SOURCES): Likewise.
1848 (bitmap_mod_CFLAGS): Likewise.
1849 (bitmap_mod_LDFLAGS): Likewise.
1850 (tga_mod_SOURCES): Likewise.
1851 (tga_mod_CFLAGS): Likewise.
1852 (tga_mod_LDFLAGS): Likewise.
1853 (jpeg_mod_SOURCES): Likewise.
1854 (jpeg_mod_CFLAGS): Likewise.
1855 (jpeg_mod_LDFLAGS): Likewise.
1856 (png_mod_SOURCES): Likewise.
1857 (png_mod_CFLAGS): Likewise.
1858 (png_mod_LDFLAGS): Likewise.
1860 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1861 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1862 (video_mod_SOURCES): Added.
1863 (video_mod_CFLAGS): Likewise.
1864 (video_mod_LDFLAGS): Likewise.
1865 (videotest_mod_SOURCES): Likewise.
1866 (videotest_mod_CFLAGS): Likewise.
1867 (videotest_mod_LDFLAGS): Likewise.
1868 (bitmap_mod_SOURCES): Likewise.
1869 (bitmap_mod_CFLAGS): Likewise.
1870 (bitmap_mod_LDFLAGS): Likewise.
1871 (tga_mod_SOURCES): Likewise.
1872 (tga_mod_CFLAGS): Likewise.
1873 (tga_mod_LDFLAGS): Likewise.
1874 (jpeg_mod_SOURCES): Likewise.
1875 (jpeg_mod_CFLAGS): Likewise.
1876 (jpeg_mod_LDFLAGS): Likewise.
1877 (png_mod_SOURCES): Likewise.
1878 (png_mod_CFLAGS): Likewise.
1879 (png_mod_LDFLAGS): Likewise.
1880 (gfxterm_mod_SOURCES): Likewise.
1881 (gfxterm_mod_CFLAGS): Likewise.
1882 (gfxterm_mod_LDFLAGS): Likewise.
1884 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1885 grub/machine/console.h.
1887 2009-01-04 Jerone Young <jerone@gmail.com>
1889 Make on screen instructions clearer
1891 Based on patch created by Jidanni <jidanni@jidanni.org>
1893 * normal/menu.c: print clearer instructions on the screen
1895 2009-01-02 Colin D Bennett <colin@gibibit.com>
1899 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1900 build system and fixed gfxterm.c to work with different sized fonts.
1902 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
1904 * configure: Re-generated.
1906 * DISTLIST: Removed font/manager.c.
1908 Added font/font_cmd.c.
1910 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1913 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
1915 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1917 * kern/term.c: Changed users of grub_utf8_to_ucs4.
1919 * normal/menu.c: Likewise.
1921 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1922 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1924 * include/grub/font.h: Replaced with new file.
1926 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1927 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1928 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1929 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1930 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1931 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1932 fg_red, fg_green, fg_blue, fg_alpha.
1933 (grub_video_adapter): Removed blit_glyph.
1934 (grub_video_blit_glyph): Removed.
1936 * font/manager.c: Removed file.
1938 * font/font.c: New file.
1940 * font/font_cmd.c: Likewise.
1942 * video/video.c (grub_video_blit_glyph): Removed.
1944 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1945 (grub_video_vbe_map_rgba): Likewise.
1946 (grub_video_vbe_unmap_color_int): Likewise.
1947 (grub_video_vbe_blit_glyph): Removed.
1948 (grub_video_vbe_adapter): Removed blit_glyph.
1950 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1951 (get_pixel): Likewise.
1952 (set_pixel): Likewise.
1954 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1956 * term/gfxterm.c: Adapted to new font engine.
1958 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
1960 * term/i386/pc/vga.c: Likewise.
1962 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1964 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1966 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1968 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1970 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1972 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1974 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1976 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1978 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1980 * util/grub.d/00_header.in: Changed to use new loadfont command.
1982 * util/grub-mkconfig_lib.in: Changed font extension.
1984 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
1986 * util/getroot.c (grub_util_get_grub_dev): Add support for
1987 /dev/md/dNNpNN style partitionable mdraid devices.
1989 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
1991 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1992 at a time limit of the PXE TFTP API correctly.
1993 (grub_pxefs_close): Likewise.
1995 2008-11-29 Robert Millan <rmh@aybabtu.com>
1997 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1998 grub_ata_device_initialize() calls.
2000 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
2002 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2004 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2006 2008-11-28 Robert Millan <rmh@aybabtu.com>
2008 Fix build on powerpc-ieee1275. Based on patch created by
2009 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2010 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2011 `kern/ieee1275/mmap.c'.
2012 * include/grub/powerpc/ieee1275/memory.h: New file.
2014 Provide grub-install on coreboot.
2015 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2016 (grub_install_SOURCES): New variable.
2017 * util/i386/pc/grub-install.in: Add a few condition checks to make it
2020 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
2022 * util/grub-fstest.c (grub_term_get_current_input): Change return type
2023 to `grub_term_input_t'.
2024 (grub_term_get_current_output): Change return type to
2025 `grub_term_output_t'.
2027 2008-11-22 Robert Millan <rmh@aybabtu.com>
2029 Fix breakage on coreboot due to declaration mismatch.
2030 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2031 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2032 grub_vga_text_cls().
2034 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
2035 comments. Avoid copying one more byte than necessary (just in case).
2037 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2038 to 0x200000 (avoids trouble with some OFW implementations, and matches
2039 with the one in Yaboot).
2040 Reported by Manoel Abranches
2042 2008-11-20 Robert Millan <rmh@aybabtu.com>
2044 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2045 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2047 * util/grub-mkconfig_lib.in (grub_warn): New function.
2048 (convert_system_path_to_grub_path): Use grub_warn() when issuing
2049 warnings, to obtain consistent formatting.
2050 * util/grub.d/00_header.in: Likewise.
2051 * util/update-grub_lib.in: Likewise.
2053 * loader/i386/linux.c (allocate_pages): Fix a warning.
2054 Move comment text to `#error' stanza.
2056 Harmonize ieee1275's grub_available_iterate() with the generic
2057 grub_machine_mmap_iterate() interface (fixes a recently-introduced
2058 build problem on i386-ieee1275):
2059 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2060 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
2061 parameter `type'. Update all users of this function.
2062 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2063 `kern/ieee1275/mmap.c'.
2064 * kern/ieee1275/init.c
2065 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2067 (grub_machine_mmap_iterate): ... this.
2068 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2069 return type to `grub_err_t'. Update all implementations of this
2071 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2074 Add `lsmmap' command (lists firmware-provided memory map):
2075 * commands/lsmmap.c: New file.
2076 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2077 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2079 * conf/powerpc-ieee1275.rmk: Likewise.
2080 * conf/i386-coreboot.rmk: Likewise.
2081 * conf/i386-ieee1275.rmk: Likewise.
2083 2008-11-19 Robert Millan <rmh@aybabtu.com>
2085 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
2086 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2087 constraints to initrd allocation (based on code from
2088 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2089 for Linux to find it.
2091 2008-11-14 Robert Millan <rmh@aybabtu.com>
2093 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2094 order to cope with duplicate slashes.
2096 2008-11-14 Robert Millan <rmh@aybabtu.com>
2098 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2099 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
2100 don't want to mess with lower memory, because it is used in the Linux
2103 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
2104 an appropriate place in lower memory, between 0x10000 and 0x90000,
2105 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
2106 is in our heap (probably as a result of it being corrupted during
2107 decompression). Add #error instance with comment to explain why this
2108 loader isn't currently usable on PC/BIOS.
2110 2008-11-14 Robert Millan <rmh@aybabtu.com>
2112 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
2113 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
2115 2008-11-12 Robert Millan <rmh@aybabtu.com>
2117 Make loader/i386/linux.c buildable on i386-pc (although disabled).
2119 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2120 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2122 * include/grub/i386/pc/memory.h: ... to here.
2124 2008-11-12 Robert Millan <rmh@aybabtu.com>
2126 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2129 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2130 (grub_console_cur_color, grub_console_real_putchar)
2131 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2132 (grub_console_setcolorstate, grub_console_setcolor)
2133 (grub_console_getcolor): Move from here ...
2134 * include/grub/i386/vga_common.h: ... to here (new file).
2136 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2137 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2139 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2140 `<grub/i386/vga_common.h>'.
2142 2008-11-12 Robert Millan <rmh@aybabtu.com>
2144 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2145 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2146 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2148 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2149 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2151 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2152 grub_console_init() with call to grub_vga_text_init().
2153 (grub_machine_fini): Replace call to
2154 grub_console_fini() with call to grub_vga_text_fini() and
2155 grub_at_keyboard_fini().
2157 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2158 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2159 (grub_console_setcolorstate, grub_console_setcolor)
2160 (grub_console_getcolor): New function prototypes.
2162 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2163 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2164 (grub_vga_text_setcursor): Static-ize.
2165 (grub_vga_text_term): New structure.
2166 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2168 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2169 (grub_console_cur_color, grub_console_standard_color)
2170 (grub_console_normal_color, grub_console_highlight_color)
2171 (map_char, grub_console_putchar, grub_console_getcharwidth)
2172 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2173 (grub_console_getcolor): Move from here ...
2174 * term/i386/vga_common.c: ... to here (same function names).
2176 2008-11-12 Robert Millan <rmh@aybabtu.com>
2178 Use newly-added Multiboot support in coreboot.
2180 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2181 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2183 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2184 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2185 (codestart): Store the MBI in `startup_multiboot_info' when we're
2186 being loaded using Multiboot.
2188 * kern/i386/coreboot/init.c (grub_machine_init): Move
2189 grub_at_keyboard_init() call to beginning of function (useful for
2190 debugging). Call grub_machine_mmap_init() before attempting to use
2191 grub_machine_mmap_iterate().
2192 (grub_lower_mem, grub_upper_mem): Move from here ...
2193 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2196 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2199 2008-11-12 Robert Millan <rmh@aybabtu.com>
2201 Fix a regression introduced by the at_keyboard.mod split. Because
2202 some terminals are default on some platforms and non-default on
2203 others, the first terminal being registered determines which is
2204 going to be default.
2206 * kern/term.c (grub_term_register_input): If this is the first
2207 terminal being registered, set it as the current one.
2208 (grub_term_register_output): Likewise.
2210 * term/efi/console.c (grub_console_init): Do not call
2211 grub_term_set_current_output() or grub_term_set_current_input().
2212 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2213 * term/i386/pc/console.c (grub_console_init): Likewise.
2214 (grub_console_fini): Do not call grub_term_set_current_input()
2215 (but leave grub_term_set_current_output() to restore text mode).
2217 2008-11-10 Robert Millan <rmh@aybabtu.com>
2219 * util/grub.d/00_header.in: Add backward compatibility check for
2220 versions of terminal.mod that don't understand `terminal_input' or
2223 2008-11-09 Robert Millan <rmh@aybabtu.com>
2225 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2226 `terminal_input' / `terminal_output', not `terminal'.
2228 2008-11-08 Robert Millan <rmh@aybabtu.com>
2230 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2231 (DISTCLEANFILES): Add `build_env.mk'.
2233 2008-11-08 Robert Millan <rmh@aybabtu.com>
2235 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
2236 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2237 members. Update all users.
2238 * util/console.c (grub_ncurses_term): Split in ...
2239 (grub_ncurses_term_input): ... this, and ...
2240 (grub_ncurses_term_output): ... this. Update all users.
2241 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
2243 2008-11-08 Robert Millan <rmh@aybabtu.com>
2245 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2246 (PKGDATA): Add $(pkgdata_SRCDIR).
2247 (pkglib_BUILDDIR): New variable.
2248 (pkgdata_SRCDIR): New variable.
2249 (build_env.mk): New target.
2250 (include_DATA): New variable.
2251 (install-local): Install $(include_DATA) files in $(includedir).
2253 2008-11-07 Pavel Roskin <proski@gnu.org>
2255 * gendistlist.sh: Use C locale for sorting to ensure consistent
2256 output on all systems.
2258 * util/grub.d/00_header.in: Remove incorrect space before
2261 2008-11-07 Robert Millan <rmh@aybabtu.com>
2263 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2265 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2266 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2267 (based on find_multi_boot1_header).
2268 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2269 using find_multi_boot2_header(), and abort if neither Multiboot or
2270 Multiboot headers were found.
2272 2008-11-07 Robert Millan <rmh@aybabtu.com>
2274 Modularize at_keyboard.mod:
2276 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2277 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2278 (at_keyboard_mod_LDFLAGS): New variables.
2280 Actual terminal split:
2282 * include/grub/term.h (struct grub_term): Split in ...
2283 (struct grub_term_input): ... this, and ...
2284 (struct grub_term_output): ... this. Update all users.
2285 (grub_term_set_current): Split in ...
2286 (grub_term_set_current_input): ... this, and ...
2287 (grub_term_set_current_output): ... this.
2288 (grub_term_get_current): Split in ...
2289 (grub_term_get_current_input): ... this, and ...
2290 (grub_term_get_current_output): ... this.
2291 (grub_term_register): Split in ...
2292 (grub_term_register_input): ... this, and ...
2293 (grub_term_register_output): ... this.
2294 (grub_term_unregister): Split in ...
2295 (grub_term_unregister_input): ... this, and ...
2296 (grub_term_unregister_output): ... this.
2297 (grub_term_iterate): Split in ...
2298 (grub_term_iterate_input): ... this, and ...
2299 (grub_term_iterate_output): ... this.
2301 * kern/term.c (grub_term_list): Split in ...
2302 (grub_term_list_input): ... this, and ...
2303 (grub_term_list_output): ... this. Update all users.
2304 (grub_cur_term): Split in ...
2305 (grub_cur_term_input): ... this, and ...
2306 (grub_cur_term_output): ... this. Update all users.
2307 (grub_term_set_current): Split in ...
2308 (grub_term_set_current_input): ... this, and ...
2309 (grub_term_set_current_output): ... this.
2310 (grub_term_get_current): Split in ...
2311 (grub_term_get_current_input): ... this, and ...
2312 (grub_term_get_current_output): ... this.
2313 (grub_term_register): Split in ...
2314 (grub_term_register_input): ... this, and ...
2315 (grub_term_register_output): ... this.
2316 (grub_term_unregister): Split in ...
2317 (grub_term_unregister_input): ... this, and ...
2318 (grub_term_unregister_output): ... this.
2319 (grub_term_iterate): Split in ...
2320 (grub_term_iterate_input): ... this, and ...
2321 (grub_term_iterate_output): ... this.
2323 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2324 a check for input and one for output (and only attempt to get keys
2325 from user when input works).
2327 * util/grub-probe.c (grub_term_get_current): Split in ...
2328 (grub_term_get_current_input): ... this, and ...
2329 (grub_term_get_current_output): ... this.
2330 * util/grub-fstest.c: Likewise.
2331 * util/i386/pc/grub-setup.c: Likewise.
2332 * util/grub-editenv.c: Likewise.
2334 Portability adjustments:
2336 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2337 `term/i386/pc/at_keyboard.c'.
2338 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2339 grub_keyboard_controller_init() (now handled by terminal .init).
2340 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
2341 grub_at_keyboard_init().
2342 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
2343 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
2344 at_keyboard.mod via input terminal interface).
2345 * include/grub/i386/coreboot/console.h: Convert into a stub for
2346 `<grub/i386/pc/console.h>'.
2348 Migrate full terminals to new API:
2350 * term/efi/console.c (grub_console_term): Split into ...
2351 (grub_console_term_input): ... this, and ...
2352 (grub_console_term_output): ... this. Update all users.
2353 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
2354 (grub_ofconsole_init): Split into ...
2355 (grub_ofconsole_init_input): ... this, and ...
2356 (grub_ofconsole_init_output): ... this.
2357 (grub_ofconsole_term): Split into ...
2358 (grub_ofconsole_term_input): ... this, and ...
2359 (grub_ofconsole_term_output): ... this. Update all users.
2360 * term/i386/pc/serial.c (grub_serial_term): Split into ...
2361 (grub_serial_term_input): ... this, and ...
2362 (grub_serial_term_output): ... this. Update all users.
2363 * term/i386/pc/console.c (grub_console_term): Split into ...
2364 (grub_console_term_input): ... this, and ...
2365 (grub_console_term_output): ... this. Update all users.
2366 (grub_console_term_input): Only enable it on PC/BIOS platform.
2367 (grub_console_init): Remove grub_keyboard_controller_init() call.
2369 Migrate input terminals to new API:
2371 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
2372 `i386' and `i386/pc' to enable build on x86_64 (this driver is
2373 i386-specific anyway).
2374 (grub_console_checkkey): Rename to ...
2375 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
2377 (grub_keyboard_controller_orig): New variable.
2378 (grub_console_getkey): Rename to ...
2379 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
2381 (grub_keyboard_controller_init): Static-ize. Save original
2382 controller value so that it can be restored ...
2383 (grub_keyboard_controller_fini): ... here (new function).
2384 (grub_at_keyboard_term): New structure.
2385 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
2388 Migrate output terminals to new API:
2390 * term/i386/pc/vga.c (grub_vga_term): Change type to
2391 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2392 members. Update all users.
2393 * term/gfxterm.c (grub_video_term): Change type to
2394 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2395 members. Update all users.
2396 * include/grub/i386/pc/console.h (grub_console_checkkey)
2397 (grub_console_getkey): Do not export (no longer needed by gfxterm,
2400 Migrate `terminal' command and userland tools to new API:
2402 * commands/terminal.c (grub_cmd_terminal): Split into ...
2403 (grub_cmd_terminal_input): ... this, and ...
2404 (grub_cmd_terminal_output): ... this.
2405 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2406 `terminal_input' and `terminal_output'.
2407 * util/grub.d/00_header.in: Adjust `terminal' calls to new
2408 `terminal_input' / `terminal_output' API.
2409 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2410 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2411 provided ${GRUB_TERMINAL}, convert it).
2413 2008-11-04 Robert Millan <rmh@aybabtu.com>
2415 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
2417 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2419 2008-11-03 Bean <bean123ch@gmail.com>
2421 * kern/elf.c (grub_elf32_load): Revert to previous code.
2422 (grub_elf64_load): Likewise.
2424 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2426 2008-11-01 Robert Millan <rmh@aybabtu.com>
2428 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2429 (TARGET_CPPFLAGS): Likewise.
2430 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2432 2008-11-01 Carles Pina i Estany <carles@pina.cat>
2434 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2436 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2438 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2439 addition of objects until the code is not going to be able to fail.
2441 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2443 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2444 (add a missing NULL check, and correct them by moving the pointer
2445 operations after the actual check).
2447 2008-10-29 Robert Millan <rmh@aybabtu.com>
2449 * util/i386/pc/grub-install.in: Handle empty string as output from
2450 make_system_path_relative_to_its_root().
2452 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
2454 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2455 circular metadata worst case scenario. If the metadata is circular
2456 then copy the wrap in place.
2457 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2458 project lib/format_text/layout.h
2459 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2461 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2463 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2465 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2467 * util/update-grub_lib.in: Mention filename in warning message.
2469 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2471 * NEWS: Update for rename of update-grub to grub-mkconfig.
2473 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2475 * util/update-grub_lib.in: Copy to ...
2476 * util/grub-mkconfig_lib.in: ... this. Update all users.
2477 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2478 * util/update-grub.in: Rename to ...
2479 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
2480 option. Add `--output' option to allow users to specify the generated
2481 configuration file. Default to stdout.
2482 (update_grub_dir): Rename to ...
2483 (grub_mkconfig_dir): ... this.
2484 (grub_cfg): Default to an empty string.
2485 * conf/common.rmk (update-grub): Rename to ...
2486 (grub-mkconfig): ... this.
2487 (update-grub_lib): Copy to ...
2488 (grub-mkconfig_lib): ... this.
2489 (update-grub_SCRIPTS): Copy to ...
2490 (grub-mkconfig_SCRIPTS): ... this. Update all users.
2491 (update-grub_DATA): Rename to ...
2492 (grub-mkconfig_DATA): ... this.
2494 2008-09-28 Robert Millan <rmh@aybabtu.com>
2496 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2497 to `modified'. Add the real `created' field.
2498 (grub_iso9660_uuid): Use `modified' rather than `created' for
2499 constructing the UUID.
2501 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
2503 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2504 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2506 2008-09-28 Bean <bean123ch@gmail.com>
2508 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2509 Thanks to Christian Franke for finding this bug.
2511 2008-09-25 Robert Millan <rmh@aybabtu.com>
2513 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2514 instances of grub_util_get_disk_name() (see previous commit).
2516 2008-09-25 Robert Millan <rmh@aybabtu.com>
2518 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2519 `util/i386/get_disk_name.c'.
2520 * conf/i386-efi.rmk: Likewise.
2521 * conf/x86_64-efi.rmk: Likewise.
2522 * conf/i386-coreboot.rmk: Likewise.
2523 * conf/i386-ieee1275.rmk: Likewise.
2524 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2525 `util/ieee1275/get_disk_name.c'.
2526 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2527 * util/ieee1275/get_disk_name.c: Remove file.
2528 * util/i386/get_disk_name.c: Remove file.
2529 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2530 "hd%d" for device.map entries, rather than using
2531 grub_util_get_disk_name().
2533 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2535 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2537 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2539 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2541 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2543 (GRUB_TERM_PPAGE): Changed to 0x4900.
2545 2008-09-24 Robert Millan <rmh@aybabtu.com>
2547 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2548 macros (they were i386-pc specific).
2549 * include/grub/sparc64/ieee1275/console.h: Likewise.
2550 * include/grub/efi/console.h: Likewise.
2552 2008-09-22 Bean <bean123ch@gmail.com>
2554 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2555 resident and in attribute list.
2557 * include/grub/ntfs.h (BMP_LEN): Removed.
2559 2008-09-22 Bean <bean123ch@gmail.com>
2561 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2562 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2564 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2565 error occurs, as grub_disk_open will call grub_disk_close, which will
2566 call p->close (scsi).
2568 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2570 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2571 (AC_PREREQ): Bumped to 2.59.
2572 (AC_TRY_COMPILE): Replace obsolete macro with ...
2573 (AC_COMPILE_IFELSE): ... this.
2574 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2575 (AC_LINK_IFELSE): ... this.
2577 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2579 * autogen.sh: Add a call to `gendistlist.sh'.
2581 2008-09-19 Christian Franke <franke@computer.org>
2583 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2584 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2585 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2586 Export __enable_execute_stack() to modules.
2587 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2590 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2592 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2595 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2597 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2598 #include <grub/util/hostdisk.h>.
2600 2008-09-08 Robert Millan <rmh@aybabtu.com>
2602 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2603 segments when their filesz is zero (grub_file_read() interprets
2604 zero-size as "read until EOF", which results in memory corruption).
2605 Use `lowest_segment' rather than 0 for calculating the current
2606 segment load address.
2608 2008-09-08 Robert Millan <rmh@aybabtu.com>
2610 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2611 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2612 clobbered useful information.
2614 2008-09-08 Robert Millan <rmh@aybabtu.com>
2616 * include/grub/util/biosdisk.h: Move to ...
2617 * include/grub/util/hostdisk.h: ... here. Update all users.
2618 * util/biosdisk.c: Move to ...
2619 * util/hostdisk.c: ... here. Update all users.
2621 2008-09-07 Robert Millan <rmh@aybabtu.com>
2623 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2625 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2626 and length can be stored directly in the `mbi->mmap_addr' and
2627 `mbi->mmap_length' struct fields.
2629 2008-09-07 Robert Millan <rmh@aybabtu.com>
2631 * conf/i386.rmk: New file. Provides declaration for building
2633 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2634 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2636 Include `conf/i386.mk'.
2637 * conf/i386-efi.rmk: Likewise.
2638 * conf/x86_64-efi.rmk: Likewise.
2639 * conf/i386-coreboot.rmk: Likewise.
2640 * conf/i386-ieee1275.rmk: Likewise.
2642 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2644 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2645 Adds optimization support for BGR based modes.
2647 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2648 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2649 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2650 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2651 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2652 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2653 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2654 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2655 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2656 (grub_video_i386_vbeblit_index_index): Likewise.
2657 (grub_video_i386_vbeblit_replace_directN): Added.
2658 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2659 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2660 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2661 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2662 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2663 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2664 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2665 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2666 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2667 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2668 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2669 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2670 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2672 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2673 (grub_video_i386_vbefill_R8G8B8): Likewise.
2674 (grub_video_i386_vbefill_index): Likewise.
2675 (grub_video_i386_vbefill_direct32): Added.
2676 (grub_video_i386_vbefill_direct24): Likewise.
2677 (grub_video_i386_vbefill_direct16): Likewise.
2678 (grub_video_i386_vbefill_direct8): Likewise.
2680 * include/grub/video.h (grub_video_blit_format): Removed
2681 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2682 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2683 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2684 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2685 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2687 * video/video.c (grub_video_get_blit_format): Updated to use new
2688 blit formats. Added handling for 16 bit color modes.
2690 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2692 (common_blitter): Updated to use new blitters.
2694 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2696 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2697 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2698 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2699 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2700 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2701 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2702 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2703 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2704 (grub_video_i386_vbeblit_index_index): Likewise.
2705 (grub_video_i386_vbeblit_replace_directN): Added.
2706 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2707 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2708 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2709 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2710 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2711 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2712 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2713 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2714 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2715 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2716 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2717 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2718 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2720 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2721 (grub_video_i386_vbefill_R8G8B8): Likewise.
2722 (grub_video_i386_vbefill_index): Likewise.
2723 (grub_video_i386_vbefill_direct32): Added.
2724 (grub_video_i386_vbefill_direct24): Likewise.
2725 (grub_video_i386_vbefill_direct16): Likewise.
2726 (grub_video_i386_vbefill_direct8): Likewise.
2728 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2731 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2734 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2737 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2740 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2742 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2745 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2747 * fs/iso9660.c (grub_iso9660_date): New structure.
2748 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2749 (grub_iso9660_uuid): New function.
2751 2008-09-05 Bean <bean123ch@gmail.com>
2753 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2755 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2756 insensitive bit for names in Win32 and Win32 & DOS namespace.
2758 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2760 * include/grub/types.h (LONG_MAX): Likewise.
2762 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2764 * util/getroot.c: Include <config.h>.
2765 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2766 add support for /dev/md/N devices and handle LVM double dash escaping.
2768 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2770 * config.guess: Update to latest version from config git.
2771 * config.sub: Likewise.
2773 2008-09-03 Robert Millan <rmh@aybabtu.com>
2775 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2776 `disk->total_sectors'.
2778 2008-09-01 Colin D Bennett <colin@gibibit.com>
2780 * include/grub/normal.h: Fixed incorrect comment for
2781 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2783 2008-09-01 Colin D Bennett <colin@gibibit.com>
2785 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2786 values with defines.
2788 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2789 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2790 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2791 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2792 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2793 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2794 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2795 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2796 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2797 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2798 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2799 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2800 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2801 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2802 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2803 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2804 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2805 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2806 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2808 2008-08-31 Robert Millan <rmh@aybabtu.com>
2810 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2812 (grub_multiboot): Fix a few warnings.
2814 2008-08-31 Robert Millan <rmh@aybabtu.com>
2816 * loader/i386/pc/multiboot.c: Update comment not to say that
2817 boot_device support is unimplemented.
2819 2008-08-31 Robert Millan <rmh@aybabtu.com>
2821 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2822 or memory map support are unimplemented.
2824 2008-08-31 Colin D Bennett <colin@gibibit.com>
2826 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2828 2008-08-31 Colin D Bennett <colin@gibibit.com>
2830 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2831 total video memory in 'vbeinfo' output; show color format details for
2834 2008-08-30 Pavel Roskin <proski@gnu.org>
2836 * util/genmoddep.c: Remove for real this time.
2837 * DISTLIST: Remove util/genmoddep.c.
2839 2008-08-30 Robert Millan <rmh@aybabtu.com>
2841 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2842 as required by Multiboot spec (it was already 4-byte aligned, but
2845 2008-08-29 Pavel Roskin <proski@gnu.org>
2847 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2848 * kern/powerpc/ieee1275/startup.S: ... this.
2849 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2850 * DISTLIST: Likewise.
2852 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2853 grub/cpu/kernel.h. Add start label for consistency with other
2854 platforms. Add grub_prefix immediately after start. Add jump
2855 to the code after grub_prefix.
2856 * include/grub/powerpc/kernel.h: Provide valid values for
2857 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2859 2008-08-29 Bean <bean123ch@gmail.com>
2861 * configure.ac: Change host_os to cygwin for mingw.
2862 (asprintf): New check for function.
2864 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2865 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2867 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2868 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2869 sync, sleep and grub_util_get_disk_size for mingw.
2871 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2872 to get size in mingw.
2873 (open_device): Use flag O_BINARY if it's defined.
2874 (find_root_device): Add dummy code for mingw.
2876 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2877 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2878 (get_scsi_disk_name): Return 0 for mingw.
2880 * util/hostfs.c: #include <grub/util/misc.h>.
2881 (grub_hostfs_open): Use "rb" flag to open file, use
2882 grub_util_get_disk_size to get disk size for mingw.
2884 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2885 (asprintf): New function if HAVE_ASPRINTF is not set.
2886 (sync): New function for mingw.
2888 (grub_util_get_disk_size): Likewise.
2890 2008-08-28 Pavel Roskin <proski@gnu.org>
2892 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2895 2008-08-28 Robert Millan <rmh@aybabtu.com>
2897 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2899 2008-08-28 Robert Millan <rmh@aybabtu.com>
2901 Change find_grub_drive() syntax so it doesn't prevent it from
2902 detecting NULL names as errors.
2904 * util/biosdisk.c (find_grub_drive): Move free slot search code
2906 (find_free_slot): ... to here.
2907 (read_device_map): Use find_free_slot() to search for free slots.
2909 2008-08-27 Marco Gerards <marco@gnu.org>
2911 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2912 (scsi_mod_SOURCES): New variable.
2913 (scsi_mod_CFLAGS): Likewise
2914 (scsi_mod_LDFLAGS): Likewise.
2916 * disk/scsi.c: New file.
2918 * include/grub/scsi.h: Likewise.
2920 * include/grub/scsicmd.h: Likewise.
2922 * disk/ata.c: Include <grub/scsi.h>.
2923 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2925 (grub_ata_iterate): Skip ATAPI devices.
2926 (grub_ata_open): Only handle ATAPI devices.
2927 (struct grub_atapi_read): Removed.
2928 (grub_atapi_readsector): Likewise.
2929 (grub_ata_read): No longer handle ATAPI devices.
2930 (grub_ata_write): Likewise.
2931 (grub_atapi_iterate): New function.
2932 (grub_atapi_read): Likewise.
2933 (grub_atapi_write): Likewise.
2934 (grub_atapi_open): Likewise.
2935 (grub_atapi_close): Likewise.
2936 (grub_atapi_dev): New variable.
2937 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2938 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2940 * include/grub/disk.h (enum grub_disk_dev_id): Add
2941 `GRUB_DISK_DEVICE_SCSI_ID'.
2943 2008-08-26 Robert Millan <rmh@aybabtu.com>
2945 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2946 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2949 2008-08-23 Bean <bean123ch@gmail.com>
2951 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2952 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2953 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2954 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2956 (raid5rec_mod_SOURCES): New macro.
2957 (raid5rec_mod_CFLAGS): Likewise.
2958 (raid5rec_mod_LDFLAGS): Likewise.
2959 (raid6rec_mod_SOURCES): Likewise.
2960 (raid6rec_mod_CFLAGS): Likewise.
2961 (raid6rec_mod_LDFLAGS): Likewise.
2962 (mdraid_mod_SOURCES): Likewise.
2963 (mdraid_mod_CFLAGS): Likewise.
2964 (mdraid_mod_LDFLAGS): Likewise.
2965 (dm_nv_mod_SOURCES): Likewise.
2966 (dm_nv_mod_CFLAGS): Likewise.
2967 (dm_nv_mod_LDFLAGS): Likewise.
2969 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2970 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2971 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2973 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2974 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2976 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2978 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2980 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2982 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2984 * disk/raid5_recover.c: New file.
2986 * disk/raid6_recover.c: Likewise.
2988 * disk/mdraid_linux.c: Likewise.
2990 * disk/dmraid_nvidia.c: Likewise.
2992 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2995 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2996 calculate the size of raid device.
2997 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2998 different layout of raid5.
2999 (grub_raid_scan_device): Remove code specific to mdraid.
3000 (grub_raid_list): New variable.
3001 (free_array): New function.
3002 (grub_raid_register): Likewise.
3003 (grub_raid_unregister): Likewise.
3004 (grub_raid_rescan): Likewise.
3005 (GRUB_MOD_INIT): Don't iterate device here.
3006 (GRUB_MOD_FINI): Use free_array to release resource.
3008 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3009 (grub_raid5_recover_func_t): New function variable type.
3010 (grub_raid6_recover_func_t): Likewise.
3011 (grub_raid5_recover_func): New variable.
3012 (grub_raid6_recover_func): Likewise.
3013 (grub_raid_register): New function.
3014 (grub_raid_unregister): Likewise.
3015 (grub_raid_rescan): Likewise.
3016 (grub_raid_block_xor): Likewise.
3018 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3019 (CMD_CRC): New macro.
3021 (read_file): Handle device as well as file.
3022 (cmd_crc): New function.
3023 (fstest): Handle multiple disks.
3024 (options): Remove part, raw and long, add root and diskcount.
3025 (usage): Add crc, remove -p, -r, -l, add -r and -c.
3026 (main): Find the first non option entry and ignore subsequent options,
3027 add handling for the new options, support multiple disks.
3029 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3031 2008-08-23 Bean <bean123ch@gmail.com>
3033 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3035 * genfslist.sh: Ignore kernel.mod.
3037 * genpartmaplist.sh: Likewise.
3039 2008-08-23 Robert Millan <rmh@aybabtu.com>
3041 * util/getroot.c (find_root_device): Skip anything that starts with
3042 a dot, not just directories. This avoids things like /dev/.tmp.md0.
3044 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
3046 * util/update-grub.in (GRUB_GFXMODE): Export variable.
3047 * util/grub.d/00_header.in: Allow the administrator to change default
3048 gfxmode via ${GRUB_GFXMODE}.
3050 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
3052 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3054 2008-08-21 Robert Millan <rmh@aybabtu.com>
3056 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
3058 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3059 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3061 2008-08-20 Carles Pina i Estany <carles@pina.cat>
3063 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3064 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3066 2008-08-19 Robert Millan <rmh@aybabtu.com>
3068 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3069 (struct grub_virtual_screen): Remove `cursor_color'.
3070 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3072 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3074 2008-08-18 Robert Millan <rmh@aybabtu.com>
3076 Unify (identical) linux_normal.c files.
3077 * loader/i386/efi/linux_normal.c: Move from here ...
3078 * loader/linux_normal.c: ... to here. Update all users.
3079 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3080 * loader/i386/ieee1275/linux_normal.c: Likewise.
3082 2008-08-18 Robert Millan <rmh@aybabtu.com>
3084 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3085 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3086 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3087 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3088 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3090 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3091 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3092 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3093 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3094 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3095 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3096 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3097 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3098 Initialize `params->video_cursor_x' and `params->video_cursor_y'
3099 portably using grub_getxy().
3100 Replace `-EFI' with `-bzImage' in boot message.
3102 2008-08-17 Robert Millan <rmh@aybabtu.com>
3104 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3106 2008-08-17 Robert Millan <rmh@aybabtu.com>
3108 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3110 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3111 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3112 (grub_machine_mmap_iterate): New function declaration.
3113 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3115 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3118 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3119 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3120 Move e820 parsing from here ...
3121 * kern/i386/pc/mmap.c: New file.
3122 (grub_machine_mmap_iterate): ... to here.
3124 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3125 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3126 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
3127 (grub_available_iterate): Redeclare to return `void', and redeclare
3128 its hook to use grub_uint64_t as addr and size parameters, and rename
3130 (grub_machine_mmap_iterate): ... this. Update all users.
3132 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3133 to make it more readable. Rename to ...
3134 (grub_machine_mmap_iterate): ... this.
3136 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3137 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3138 (grub_multiboot): Allocate an extra region after the payload, and fill
3139 it with a Multiboot memory map. Adjust a.out loader to calculate size
3140 with the extra space.
3141 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3142 with the extra space.
3144 2008-08-17 Carles Pina i Estany <carles@pina.cat>
3146 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
3148 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
3150 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3151 mdate-sh to the list `find' searches for.
3152 * DISTLIST: Regenerated.
3154 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
3156 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3157 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
3158 genmoddep.awk, gensymlist.sh.in.
3159 (DISTDIRS): Add bus, docs, hook, lib.
3160 * DISTLIST: Regenerated.
3161 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
3163 2008-08-16 Robert Millan <rmh@aybabtu.com>
3165 * disk/raid.c (grub_raid_init): Handle/report errors set by
3166 grub_device_iterate().
3167 * disk/lvm.c (grub_lvm_init): Likewise.
3169 2008-08-15 Bean <bean123ch@gmail.com>
3171 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3173 (datetime_mod_SOURCES): New macro.
3174 (datetime_mod_CFLAGS): Likewise.
3175 (datetime_mod_LDFLAGS): Likewise.
3176 (date_mod_SOURCES): Likewise.
3177 (date_mod_CFLAGS): Likewise.
3178 (date_mod_LDFLAGS): Likewise.
3179 (datehook_mod_SOURCES): Likewise.
3180 (datehook_mod_CFLAGS): Likewise.
3181 (datehook_mod_LDFLAGS): Likewise.
3183 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3185 (datetime_mod_SOURCES): New macro.
3186 (datetime_mod_CFLAGS): Likewise.
3187 (datetime_mod_LDFLAGS): Likewise.
3188 (date_mod_SOURCES): Likewise.
3189 (date_mod_CFLAGS): Likewise.
3190 (date_mod_LDFLAGS): Likewise.
3191 (datehook_mod_SOURCES): Likewise.
3192 (datehook_mod_CFLAGS): Likewise.
3193 (datehook_mod_LDFLAGS): Likewise.
3195 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3197 (datetime_mod_SOURCES): New macro.
3198 (datetime_mod_CFLAGS): Likewise.
3199 (datetime_mod_LDFLAGS): Likewise.
3200 (date_mod_SOURCES): Likewise.
3201 (date_mod_CFLAGS): Likewise.
3202 (date_mod_LDFLAGS): Likewise.
3203 (datehook_mod_SOURCES): Likewise.
3204 (datehook_mod_CFLAGS): Likewise.
3205 (datehook_mod_LDFLAGS): Likewise.
3207 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3209 (datetime_mod_SOURCES): New macro.
3210 (datetime_mod_CFLAGS): Likewise.
3211 (datetime_mod_LDFLAGS): Likewise.
3212 (date_mod_SOURCES): Likewise.
3213 (date_mod_CFLAGS): Likewise.
3214 (date_mod_LDFLAGS): Likewise.
3215 (datehook_mod_SOURCES): Likewise.
3216 (datehook_mod_CFLAGS): Likewise.
3217 (datehook_mod_LDFLAGS): Likewise.
3219 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3221 (datetime_mod_SOURCES): New macro.
3222 (datetime_mod_CFLAGS): Likewise.
3223 (datetime_mod_LDFLAGS): Likewise.
3224 (date_mod_SOURCES): Likewise.
3225 (date_mod_CFLAGS): Likewise.
3226 (date_mod_LDFLAGS): Likewise.
3227 (datehook_mod_SOURCES): Likewise.
3228 (datehook_mod_CFLAGS): Likewise.
3229 (datehook_mod_LDFLAGS): Likewise.
3231 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3233 * commands/date.c: New file.
3235 * hook/datehook.c: Likewise.
3237 * include/grub/lib/datetime.h: Likewise.
3239 * include/grub/i386/cmos.h: Likewise.
3241 * lib/datetime.c: Likewise.
3243 * lib/i386/datetime.c: Likewise.
3245 * lib/efi/datetime.c: Likewise.
3247 2008-08-14 Robert Millan <rmh@aybabtu.com>
3249 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3250 (grub_mkelfimage_SOURCES): New variable.
3251 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3253 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3254 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3255 * conf/powerpc-ieee1275.rmk: Likewise.
3256 * conf/i386-ieee1275.rmk: Likewise.
3258 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3259 * kern/i386/coreboot/init.c: Likewise.
3261 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3262 with `<grub/cpu/kernel.h>'.
3263 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3265 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3266 * kern/i386/coreboot/startup.S: Likewise.
3268 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3269 (GRUB_MOD_GAP): Remove.
3270 * include/grub/powerpc/kernel.h: New file.
3271 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3272 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3273 * include/grub/i386/kernel.h: New file.
3274 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3275 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3276 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3278 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3280 Use --directory when invoking grub_mkimage.
3282 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3283 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3284 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3285 and GRUB_KERNEL_CPU_PREFIX.
3287 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
3289 * include/grub/err.h (grub_err_printf): New function prototype.
3290 * util/misc.c (grub_err_printf): New function.
3291 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3293 * kern/err.c (grub_print_error): Use grub_err_printf.
3295 2008-08-13 Robert Millan <rmh@aybabtu.com>
3297 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3299 2008-08-13 Robert Millan <rmh@aybabtu.com>
3301 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3304 2008-08-12 Robert Millan <rmh@aybabtu.com>
3306 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3307 of the relocation code from here ...
3308 (grub_multiboot): ... to here.
3309 (forward_relocator, backward_relocator): Move from here ...
3310 * kern/i386/loader.S (grub_multiboot_forward_relocator)
3311 (grub_multiboot_backward_relocator): ... to here.
3312 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
3313 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
3314 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3315 (grub_multiboot_forward_relocator_end)
3316 (grub_multiboot_backward_relocator)
3317 (grub_multiboot_backward_relocator_end): New variables.
3319 2008-08-12 Bean <bean123ch@gmail.com>
3321 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3323 2008-08-11 Robert Millan <rmh@aybabtu.com>
3325 * kern/i386/linuxbios/startup.S: Move from here ...
3326 * kern/i386/coreboot/startup.S: ... to here.
3328 * kern/i386/linuxbios/init.c: Move from here ...
3329 * kern/i386/coreboot/init.c: ... to here.
3331 * kern/i386/linuxbios/table.c: Move from here ...
3332 * kern/i386/coreboot/mmap.c: ... to here.
3334 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3336 2008-08-11 Robert Millan <rmh@aybabtu.com>
3338 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3339 errors. Leave it to the upper layer to handle them.
3341 2008-08-09 Christian Franke <franke@computer.org>
3343 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
3344 * conf/common.rmk: Install `grub-pe2elf' only if requested.
3345 Install `grub.d/10_windows' only on Cygwin.
3346 * configure.ac: Add subst of `target_os'.
3347 Check `target_os' also before setting TARGET_OBJ2ELF.
3348 Add `--enable-grub-pe2elf'.
3350 2008-08-08 Robert Millan <rmh@aybabtu.com>
3352 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3353 (grub_last_time): Change type to grub_uint64_t.
3354 (grub_disk_open): Migrate code from to using grub_get_time_ms().
3355 (grub_disk_close): Likewise.
3357 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3358 (run_menu): Migrate code from to using grub_get_time_ms().
3360 * util/misc.c (grub_get_time_ms): New function.
3362 2008-08-08 Marco Gerards <marco@gnu.org>
3364 * disk/ata.c (grub_ata_regget): Change return type to
3366 (grub_ata_regget2): Likewise.
3367 (grub_ata_wait_status): New function.
3368 (grub_ata_wait_busy): Removed function, updated all users to use
3369 `grub_ata_wait_status'.
3370 (grub_ata_wait_drq): Likewise.
3371 (grub_ata_cmd): New function.
3372 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
3374 (grub_ata_pio_write): Add error handling.
3375 (grub_atapi_identify): Likewise.
3376 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
3378 (grub_ata_identify): Use `grub_ata_cmd' and improve error
3379 handling. Actually use the detected registers. Reorder the
3380 detection logic such that it is easier to read.
3381 (grub_ata_pciinit): Do not assign the same ID to each controller.
3382 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
3384 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
3386 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
3388 2008-08-08 Marco Gerards <marco@gnu.org>
3392 2008-08-07 Bean <bean123ch@gmail.com>
3394 * include/grub/x86_64/pci.h: New file.
3396 2008-08-07 Christian Franke <franke@computer.org>
3398 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3399 (TIMER2_GATE): Likewise.
3400 (grub_pit_wait): Add enable/disable of the timer2 gate
3401 bit of port 0x61. This fixes a possible infinite loop.
3403 2008-08-07 Bean <bean123ch@gmail.com>
3405 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3406 kern/i386/tsc.c and kern/i386/pit.c.
3408 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3411 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3414 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3416 2008-08-07 Bean <bean123ch@gmail.com>
3418 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3420 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3422 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3423 multiple inclusion. Add #include <grub/types.h>.
3425 2008-08-06 Christian Franke <franke@computer.org>
3427 * conf/common.rmk: Build and install `10_windows'.
3428 * util/grub.d/10_windows.in: New script.
3430 2008-08-06 Pavel Roskin <proski@gnu.org>
3432 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3434 2008-08-06 Robert Millan <rmh@aybabtu.com>
3436 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3437 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3439 2008-08-06 Bean <bean123ch@gmail.com>
3441 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3442 (grub_pxefs_fs_int): Remove dummy definition.
3443 (grub_pxefs_open): Use data->block_size to store the current block
3445 (grub_pxefs_read): Use block size stored in data->block_size. As the
3446 value of grub_pxe_blksize can be changed after the file is opened.
3448 2008-08-06 Bean <bean123ch@gmail.com>
3450 * fs/i386/pc/pxe.c (curr_file): new variable.
3451 (grub_pxefs_open): Simply the handling of pxe file system. Don't
3452 require the dummy internal file system anymore.
3453 (grub_pxefs_read): Removed.
3454 (grub_pxefs_close): Likewise.
3455 (grub_pxefs_fs_int): Likewise.
3456 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3457 connection when we switch file.
3458 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3460 2008-08-06 Robert Millan <rmh@aybabtu.com>
3462 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3464 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3465 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3467 * kern/i386/halt.c: New file.
3468 * kern/i386/reboot.c: Likewise.
3469 * include/grub/i386/reboot.h: Likewise.
3470 * include/grub/i386/halt.h: Likewise.
3472 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3473 Include `<grub/cpu/halt.h>'.
3474 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3475 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3477 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3478 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3479 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3480 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3481 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3482 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3484 * include/grub/i386/at_keyboard.h: ... to here.
3486 2008-08-05 Robert Millan <rmh@aybabtu.com>
3488 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3489 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3490 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3491 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3492 `kern/generic/millisleep.c'.
3494 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3495 instead of grub_get_rtc().
3496 (grub_tsc_init): Initialize `tsc_boot_time'.
3498 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3499 (grub_machine_init): Use grub_tsc_init() rather than
3500 installing an RTC-based handler via grub_install_get_time_ms().
3502 * kern/i386/pit.c: New file.
3503 * include/grub/i386/pit.h: Likewise.
3505 2008-08-05 Bean <bean123ch@gmail.com>
3507 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3509 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3510 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3511 (pxe_mod_SOURCES): New macro.
3512 (pxe_mod_CFLAGS): Likewise.
3513 (pxe_mod_LDFLAGS): Likewise.
3514 (pxecmd_mod_SOURCES): Likewise.
3515 (pxecmd_mod_CFLAGS): Likewise.
3516 (pxecmd_mod_LDFLAGS): Likewise.
3518 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3519 (grub_pxe_call): Likewise.
3521 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3523 * commands/i386/pc/pxecmd.c: New file.
3525 * fs/i386/pc/pxe.c: Likewise.
3527 * include/grub/i386/pc/pxe.h: Likewise.
3529 2008-08-05 Bean <bean123ch@gmail.com>
3531 * util/console.c (grub_console_cur_color): New variable.
3532 (grub_console_standard_color): Likewise.
3533 (grub_console_normal_color): Likewise.
3534 (grub_console_highlight_color): Likewise.
3535 (color_map): Likewise.
3536 (use_color): Likewise.
3537 (NUM_COLORS): New macro.
3538 (grub_ncurses_setcolorstate): Handle color properly.
3539 (grub_ncurses_setcolor): Don't change color here, just remember the
3540 settings, color will be set in grub_ncurses_setcolorstate.
3541 (grub_ncurses_getcolor): New function.
3542 (grub_ncurses_init): Initialize color pairs.
3543 (grub_ncurses_term): New member grub_ncurses_getcolor.
3545 2008-08-05 Colin D Bennett <colin@gibibit.com>
3547 High resolution timer support. Implemented for x86 CPUs using TSC.
3548 Extracted generic grub_millisleep() so it's linked in only as needed.
3549 This requires a Pentium compatible CPU; if the RDTSC instruction is
3550 not supported, then it falls back on the generic grub_get_time_ms()
3551 implementation that uses the machine's RTC.
3553 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3554 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3555 `kern/generic/millisleep.c'.
3557 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3558 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3560 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3561 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3563 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3565 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3566 `kern/generic/millisleep.c'.
3568 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3570 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3572 * kern/generic/rtc_get_time_ms.c: New file.
3574 * kern/generic/millisleep.c: New file.
3576 * kern/misc.c: Don't include
3577 <kern/time.h> anymore.
3578 (grub_millisleep_generic): Removed.
3580 * commands/sleep.c (grub_interruptible_millisleep): Uses
3581 grub_get_time_ms() instead of grub_get_rtc().
3583 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3585 (grub_cpu_is_cpuid_supported): New inline function.
3586 (grub_cpu_is_tsc_supported): New inline function.
3587 (grub_tsc_init): New function prototype.
3588 (grub_tsc_get_time_ms): New function prototype.
3590 * kern/i386/tsc.c (grub_get_time_ms): New file.
3592 * include/grub/time.h: Include <grub/types.h.
3593 (grub_millisleep_generic): Removed.
3594 (grub_get_time_ms): New prototype.
3595 (grub_install_get_time_ms): New prototype.
3596 (grub_rtc_get_time_ms): New prototype.
3598 * kern/time.c (grub_get_time_ms): New function.
3599 (grub_install_get_time_ms): New function.
3601 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3602 <grub/time.h> anymore.
3603 (grub_millisleep): Removed.
3604 (grub_machine_init): Call grub_tsc_init.
3606 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3607 get_time_ms() implementation.
3609 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3610 (ieee1275_get_time_ms): New function.
3611 (grub_machine_init): Install get_time_ms() implementation.
3613 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3614 (grub_machine_init): Call grub_tsc_init().
3615 (grub_millisleep): Removed.
3617 * kern/ieee1275/init.c (grub_millisleep): Removed.
3618 (grub_machine_init): Install ieee1275_get_time_ms()
3620 (ieee1275_get_time_ms): New function.
3621 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3624 2008-08-05 Marco Gerards <marco@gnu.org>
3626 * disk/ata.c: Include <grub/pci.h>.
3627 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3628 (grub_ata_initialize): Rewritten.
3629 (grub_ata_device_initialize): New function.
3631 2008-08-04 Pavel Roskin <proski@gnu.org>
3633 * kern/main.c: Include grub/mm.h.
3635 2008-08-04 Robert Millan <rmh@aybabtu.com>
3637 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3638 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3639 corruption problem).
3641 2008-08-04 Robert Millan <rmh@aybabtu.com>
3643 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3644 warnings introduced in my last commit.
3646 2008-08-03 Robert Millan <rmh@aybabtu.com>
3648 Make PCI available on all i386 architectures.
3650 * include/grub/i386/pc/pci.h: Move from here ...
3651 * include/grub/i386/pci.h: ... to here.
3653 * include/grub/i386/pc/pci.h: Remove.
3654 * include/grub/i386/efi/pci.h: Remove.
3655 * include/grub/x86_64/efi/pci.h: Remove.
3657 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3660 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3661 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3662 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3664 * conf/i386-ieee1275.rmk: Likewise.
3666 2008-08-03 Robert Millan <rmh@aybabtu.com>
3668 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3669 (grub_console_setcursor): Make it possible to set cursor off.
3671 2008-08-03 Robert Millan <rmh@aybabtu.com>
3673 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3674 of modules instead of assuming which platform provides what.
3675 * util/update-grub.in: Likewise.
3677 2008-08-03 Robert Millan <rmh@aybabtu.com>
3679 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3680 instead of `grub_install_dos_part' to determine whether a drive needs
3681 to be prepended to prefix (`grub_install_dos_part' is not reliable,
3682 because it can be overridden when loading GRUB via Multiboot).
3684 2008-08-02 Robert Millan <rmh@aybabtu.com>
3686 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3688 2008-08-02 Robert Millan <rmh@aybabtu.com>
3690 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3691 of informational grub_dprintf() calls.
3693 2008-08-02 Robert Millan <rmh@aybabtu.com>
3695 * disk/memdisk.c (memdisk_size): Don't initialize.
3696 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3698 * include/grub/i386/pc/kernel.h
3699 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3700 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3701 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3702 (grub_arch_memdisk_size): Remove.
3704 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3705 field (was only used to transfer a constant). Add `type' field to
3706 support multiple module types.
3707 (grub_module_iterate): New function.
3709 * kern/device.c (grub_device_open): Do not hide error messages
3710 when grub_disk_open() fails. Use grub_print_error() instead.
3712 * kern/i386/pc/init.c (grub_arch_modules_addr)
3713 (grub_arch_memdisk_size): Remove functions.
3714 (grub_arch_modules_addr): Return the module address in high memory
3715 (now that it isn't copied anymore).
3717 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3718 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3719 decompression routine (grub_total_module_size already includes that
3720 now). Don't copy modules back to low memory.
3722 * kern/main.c: Include `<grub/mm.h>'.
3723 (grub_load_modules): Split out (and use) ...
3724 (grub_module_iterate): ... this function, which iterates through
3725 module objects and runs a hook.
3726 Comment out grub_mm_init_region() call, as it would cause non-ELF
3727 modules to be overwritten.
3729 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3730 the memdisk image in its own region, make it part of the module list.
3731 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3732 (main): Parse --memdisk|-m option, and pass user-provided path as
3733 parameter to generate_image().
3734 (add_segments): Pass `memdisk_path' down to load_modules().
3735 (load_modules): Embed memdisk image in module section when requested.
3736 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3737 `header.type' instead of `header.offset'.
3739 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3740 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3741 (memdisk_mod_LDFLAGS): New variables.
3742 * conf/i386-coreboot.rmk: Likewise.
3743 * conf/i386-ieee1275.rmk: Likewise.
3745 2008-08-02 Robert Millan <rmh@aybabtu.com>
3747 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3748 (backward_relocator): New variables. Used to allocate and relocate
3749 the payload, respectively.
3750 (grub_multiboot_load_elf32): Load into heap instead of requested
3751 address, install the appropriate relocator code in each bound of
3752 the payload, and set the entry point such that
3753 grub_multiboot_real_boot() will jump to one of them.
3755 * kern/i386/loader.S (grub_multiboot_payload_size)
3756 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3757 (grub_multiboot_payload_entry_offset): New variables.
3758 (grub_multiboot_real_boot): Set cpu context to what the relocator
3759 expects, and jump to the relocator instead of the payload.
3761 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3762 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3763 (grub_multiboot_payload_entry_offset): Export.
3765 2008-08-01 Bean <bean123ch@gmail.com>
3767 * normal/menu_entry.c (editor_getline): Don't return the original
3768 string as result, as it will be released by lexer once it has done
3771 2008-08-01 Robert Millan <rmh@aybabtu.com>
3773 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3774 within menuentries, not before them.
3775 util/grub.d/10_hurd.in: Likewise.
3777 2008-08-01 Bean <bean123ch@gmail.com>
3779 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3780 (bufio_mod_SOURCES): New macro.
3781 (bufio_mod_CFLAGS): Likewise.
3782 (bufio_mod_LDFLAGS): Likewise.
3784 * include/grub/bufio.h: New file.
3786 * io/bufio.c: Likewise.
3788 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3789 (grub_video_reader_png): Use grub_buffile_open to open file.
3791 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3792 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3794 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3795 (grub_video_reader_tga): Use grub_buffile_open to open file.
3797 * font/manager.c: Include <grub/bufio.h>.
3798 (add_font): Use grub_buffile_open to open file.
3800 2008-07-31 Robert Millan <rmh@aybabtu.com>
3802 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3803 ELF segments, use a macro for arbitrarily accessing any of them instead
3804 of preparing a pointer that allows access to one at a time.
3805 (grub_multiboot_load_elf64): Likewise.
3807 2008-07-31 Bean <bean123ch@gmail.com>
3809 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3810 GRUB_KERNEL_MACHINE_DATA_END.
3812 2008-07-30 Robert Millan <rmh@aybabtu.com>
3814 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3815 Increase from 0x50 to 0x60.
3816 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3817 use UUIDs to identify the root drive for them. If that's not
3819 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3820 check, for cross-disk installs.
3822 2008-07-30 Robert Millan <rmh@aybabtu.com>
3824 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3825 is non-empty, use it to set the `prefix' environment variable instead
3826 of the usual approach.
3827 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3828 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3829 environment variable instead of dummy make_install_device().
3831 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3832 (start): Insert a data section, with `grub_prefix' variable.
3833 * kern/i386/linuxbios/startup.S: Likewise.
3835 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3836 New variable reference.
3837 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3838 New macro. Defines offset of `grub_prefix' within startup.S (relative
3840 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3841 section within startup.S (relative to `start').
3842 * include/grub/i386/coreboot/kernel.h: Likewise.
3844 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3845 Overwrite grub_prefix with its contents, at the beginning of the
3847 (main): Understand -p|--prefix.
3849 2008-07-30 Robert Millan <rmh@aybabtu.com>
3851 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3853 2008-07-30 Robert Millan <rmh@aybabtu.com>
3855 * term/i386/pc/vga_text.c (grub_console_cls): Use
3856 grub_console_gotoxy() to go back to beginning of the screen.
3857 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3859 2008-07-29 Christian Franke <franke@computer.org>
3861 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3862 Add conversion of emulated mount points on Cygwin.
3864 2008-07-29 Christian Franke <franke@computer.org>
3866 * util/update-grub.in: Add a check for admin
3868 Remove old `grub.cfg.new' before creation.
3869 Add `-f' to `mv' to handle the different filesystem
3870 semantics of Windows.
3872 2008-07-29 Bean <bean123ch@gmail.com>
3874 * normal/main.c (get_line): Fix buffer overflow bug.
3876 2008-07-28 Robert Millan <rmh@aybabtu.com>
3878 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3879 (struct grub_apple_header): New struct. Describes the layout of
3881 (apple_partition_map_iterate): Check the header magic as well as the
3882 partition magic (which was already being checked).
3884 2008-07-28 Pavel Roskin <proski@gnu.org>
3886 * genmk.rb: Add a warning to the beginning of the output that
3887 it's a generated file and should not be edited.
3889 2008-07-28 Robert Millan <rmh@aybabtu.com>
3891 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3892 with the same number are found, just use issue a warning with
3893 grub_dprintf(), as this error has been reported to be non-fatal.
3895 2008-07-27 Robert Millan <rmh@aybabtu.com>
3897 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3900 2008-07-27 Bean <bean123ch@gmail.com>
3902 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3903 (grub_fat_find_dir): Ignore case when comparing filename.
3905 2008-07-27 Bean <bean123ch@gmail.com>
3907 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3908 smallino, as it's more descriptive, and i8count can be confused with
3909 the other field count.
3910 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3913 2008-07-27 Bean <bean123ch@gmail.com>
3915 * commands/crc.c: New file.
3917 * lib/crc.c: Likewise.
3919 * include/grub/lib/crc.h: Likewise.
3921 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3923 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3924 (hexdump): Move this function to ...
3926 * lib/hexdump.c: ... here.
3928 * include/grub/hexdump.h: Renamed to ...
3930 * include/grub/lib/hexdump.h: ... this.
3932 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3934 * util/grub-editenv.c: Likewise.
3936 * include/envblk.h: Renamed to ...
3938 * include/lib/envblk.h: ... this.
3940 * util/envblk.c: Renamed to ...
3942 * lib/envblk.c: ... this.
3944 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3946 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3947 (pkglib_MODULES): Add crc.mod.
3948 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3949 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3950 (crc_mod_SOURCES): New macro.
3951 (crc_mod_CFLAGS): Likewise.
3952 (crc_mod_LDFLAGS): Likewise.
3954 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3956 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3958 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3960 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3962 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3964 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
3966 * commands/help.c: Include <grub/term.h>.
3967 (TERM_WIDTH): Removed. Updated all users.
3969 2008-07-27 Pavel Roskin <proski@gnu.org>
3971 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3972 spurious warnings about a comment within a comment.
3974 2008-07-25 Robert Millan <rmh@aybabtu.com>
3976 * util/getroot.c (find_root_device): Skip devices that match
3977 /dev/dm-[0-9]. This lets the real device be found for any type of
3978 abstraction (LVM, EVMS, RAID..).
3979 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3980 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3981 device is found first, find_root_device() will now skip it.
3983 2008-07-24 Pavel Roskin <proski@gnu.org>
3985 * include/grub/types.h: Use __builtin_bswap32() and
3986 __builtin_bswap64() with gcc 4.3 and newer.
3988 2008-07-24 Christian Franke <franke@computer.org>
3990 * util/i386/pc/grub-install.in: If `--debug' is specified,
3991 pass `--verbose' to grub-setup.
3992 Abort script if make_system_path_relative_to_its_root() fails.
3994 2008-07-24 Bean <bean123ch@gmail.com>
3996 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3997 variable `target_platform' should be `platform'.
3999 2008-07-24 Bean <bean123ch@gmail.com>
4001 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
4002 (grub_png_init_fixed_block): New function.
4003 (grub_png_decode_image_data): Handle fixed huffman code compression.
4005 2008-07-24 Bean <bean123ch@gmail.com>
4007 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4008 (grub_pe2elf_SOURCES): New macro.
4009 (CLEANFILES): Add grub-pe2elf.
4011 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4012 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4013 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4014 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4015 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4016 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4017 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4018 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4019 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4020 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4021 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4022 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4023 (GRUB_PE32_DT_FUNCTION): Likewise.
4024 (GRUB_PE32_REL_I386_DIR32): Likewise.
4025 (GRUB_PE32_REL_I386_REL32): Likewise.
4026 (grub_pe32_symbol): New structure.
4027 (grub_pe32_reloc): Likewise.
4029 * util/grub-pe2elf.c: New file.
4031 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4032 start symbol in non pc platform.
4034 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4036 The following patches are from Christian Franke.
4038 * include/grub/dl.h: Remove .previous, gas supports this only
4041 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4042 Remove .type, gas supports this only for ELF format.
4044 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4045 nullbytes in symbol table. This fixes an infinite loop if table is
4048 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4049 TARGET_IMG_LDFLAGS and EXEEXT.
4051 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4052 TARGET_IMG_LDFLAGS_AC.
4053 (grub_CHECK_STACK_ARG_PROBE): New function.
4055 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4057 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4059 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4060 to set TARGET_IMG_LD* accordingly.
4061 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4062 Add call to grub_CHECK_STACK_ARG_PROBE.
4063 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4065 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4067 * genmk.rb: Add EXEEXT to CLEANFILES.
4069 2008-07-23 Robert Millan <rmh@aybabtu.com>
4071 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4072 define the codes for arrows and lines used for the menu).
4073 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4076 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4077 fonts, because the latter are too slow.
4079 2008-07-21 Bean <bean123ch@gmail.com>
4081 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4082 a20. Run keyboard test last, as it will cause macbook to halt.
4084 2008-07-18 Pavel Roskin <proski@gnu.org>
4086 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4087 load foreign architecture modules correctly anyway. Keep
4088 support for loading host architecture modules, whether we
4089 compile them or not.
4091 2008-07-17 Pavel Roskin <proski@gnu.org>
4093 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4094 change target_cpu. The compiler default can mismatch target_cpu
4097 * disk/efi/efidisk.c: Fix format warnings on x86_64.
4098 * kern/efi/efi.c: Likewise.
4100 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
4101 target compiler is functional.
4102 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4105 * configure.ac: Default to efi platform for x86_64-apple. Allow
4106 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
4107 adjustments from the rest, only do them if target is not
4108 explicitly given. Merge other adjustments with the final sanity
4109 check. Remove an extraneous check for supported CPU. Be
4110 specific which CPU and which platform is not supported.
4112 * configure.ac: Default to pc platform for x86_64.
4114 2008-07-17 Robert Millan <rmh@aybabtu.com>
4116 Partial LinuxBIOS -> Coreboot rename.
4118 * conf/i386-linuxbios.rmk: Renamed to ...
4119 * conf/i386-coreboot.rmk: ... this.
4120 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4121 * configure.ac: Accept "coreboot" as input platform (but maintain
4122 compatibility with "linuxbios").
4123 * include/grub/i386/linuxbios: Renamed to ...
4124 * include/grub/i386/coreboot: ... this.
4126 2008-07-17 Bean <bean123ch@gmail.com>
4128 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
4129 (appleldr_mod_SOURCE): New variable.
4130 (appleldr_mod_CFLAGS): Likewise.
4131 (appleldr_mod_LDFLAGS): Likewise.
4132 (pci_mod_SOURCES): Likewise.
4133 (pci_mod_CFLAGS): Likewise.
4134 (pci_mod_LDFLAGS): Likewise.
4135 (lspci_mod_SOURCES): Likewise.
4136 (lspci_mod_CFLAGS): Likewise.
4137 (lspci_mod_LDFLAGS): Likewise.
4139 * conf/x86_64-efi.rmk: New file.
4141 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4143 (grub_efidisk_write): Likewise.
4145 * include/efi/api.h (efi_call_0): New macro.
4146 (efi_call_1): Likewise.
4147 (efi_call_2): Likewise.
4148 (efi_call_3): Likewise.
4149 (efi_call_4): Likewise.
4150 (efi_call_5): Likewise.
4151 (efi_call_6): Likewise.
4153 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4154 grub_rescue_cmd_chainloader.
4156 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4157 (grub_pe32_optional_header): Change some fields based on i386 or
4159 (GRUB_PE32_PE32_MAGIC): Likewise.
4161 * include/grub/efi/uga_draw.h: New file.
4163 * include/grub/elf.h (STN_ABS): New constant.
4164 (R_X86_64_NONE): Relocation constant for x86_64.
4165 (R_X86_64_64): Likewise.
4166 (R_X86_64_PC32): Likewise.
4167 (R_X86_64_GOT32): Likewise.
4168 (R_X86_64_PLT32): Likewise.
4169 (R_X86_64_COPY): Likewise.
4170 (R_X86_64_GLOB_DAT): Likewise.
4171 (R_X86_64_JUMP_SLOT): Likewise.
4172 (R_X86_64_RELATIVE): Likewise.
4173 (R_X86_64_GOTPCREL): Likewise.
4174 (R_X86_64_32): Likewise.
4175 (R_X86_64_32S): Likewise.
4176 (R_X86_64_16): Likewise.
4177 (R_X86_64_PC16): Likewise.
4178 (R_X86_64_8): Likewise.
4179 (R_X86_64_PC8): Likewise.
4181 * include/grub/i386/efi/pci.h: New file.
4183 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4184 Change it value based on platform.
4185 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4186 (GRUB_E820_RAM): Likewise.
4187 (GRUB_E820_RESERVED): Likewise.
4188 (GRUB_E820_ACPI): Likewise.
4189 (GRUB_E820_NVS): Likewise.
4190 (GRUB_E820_EXEC_CODE): Likewise.
4191 (GRUB_E820_MAX_ENTRY): Likewise.
4192 (grub_e820_mmap): New structure.
4193 (linux_kernel_header): Change the efi field according to different
4194 kernel version, also field from linux_kernel_header.
4196 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4198 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4199 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4200 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4201 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4202 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4203 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4204 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4205 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4206 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4207 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4209 * include/grub/x86_64/efi/kernel.h: New file.
4211 * include/grub/x86_64/efi/loader.h: Likewise.
4213 * include/grub/x86_64/efi/machine.h: Likewise.
4215 * include/grub/x86_64/efi/pci.h: Likewise.
4217 * include/grub/x86_64/efi/time.h: Likewise.
4219 * include/grub/x86_64/linux.h: Likewise.
4221 * include/grub/x86_64/setjmp.h: Likewise.
4223 * include/grub/x86_64/time.h: Likewise.
4225 * include/grub/x86_64/types.h: Likewise.
4227 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4228 GRUB_TARGET_SIZEOF_VOID_P.
4230 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4231 (grub_efi_locate_handle): Likewise.
4232 (grub_efi_open_protocol): Likewise.
4233 (grub_efi_set_text_mode): Likewise.
4234 (grub_efi_stall): Likewise.
4235 (grub_exit): Likewise.
4236 (grub_reboot): Likewise.
4237 (grub_halt): Likewise.
4238 (grub_efi_exit_boot_services): Likewise.
4239 (grub_get_rtc): Likewise.
4241 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4242 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4243 (grub_efi_allocate_pages): Wrap efi calls.
4244 (grub_efi_free_pages): Wrap efi calls.
4245 (grub_efi_get_memory_map): Wrap efi calls.
4247 * kern/x86_64/dl.c: New file.
4249 * kern/x86_64/efi/callwrap.S: Likewise.
4251 * kern/x86_64/efi/startup.S: Likewise.
4253 * loader/efi/appleloader.c: Likewise.
4255 * loader/efi/chainloader.c (cmdline): New variable.
4256 (grub_chainloader_unload): Wrap efi calls.
4257 (grub_chainloader_boot): Likewise.
4258 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4261 * loader/efi/chainloader_normal.c (chainloader_command):
4262 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4265 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4267 (grub_e820_add_region): New function.
4268 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4270 (grub_find_video_card): New function.
4271 (grub_linux_setup_video): New function.
4272 (grub_rescue_cmd_linux): Probe for video information.
4274 * normal/x86_64/setjmp.S: New file.
4276 * term/efi/console.c (map_char): New function.
4277 (grub_console_putchar): Map unicode char.
4278 (grub_console_checkkey): Wrap efi calls.
4279 (grub_console_getkey): Likewise.
4280 (grub_console_getwh): Likewise.
4281 (grub_console_gotoxy): Likewise.
4282 (grub_console_cls): Likewise.
4283 (grub_console_setcolorstate): Likewise.
4284 (grub_console_setcursor): Likewise.
4286 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4288 2008-07-16 Pavel Roskin <proski@gnu.org>
4290 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4293 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4294 pointer, not an integer. This fixes a warning and prevents
4295 precision loss on 64-bit systems.
4296 (relocate_addresses): Remove unneeded cast.
4298 2008-07-15 Pavel Roskin <proski@gnu.org>
4300 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4302 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4304 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4305 Fix comparison between signed and unsigned.
4307 * include/grub/i386/ieee1275/console.h: Declare
4308 grub_console_init() and grub_console_fini().
4310 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4311 It's empty and unused.
4313 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4314 beginning to avoid warnings with some compilers.
4316 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4317 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4319 2008-07-14 Pavel Roskin <proski@gnu.org>
4321 * kern/env.c (grub_register_variable_hook): Don't copy empty
4322 string, it leaks memory. Pass "" to grub_env_set(), it should
4323 handle constant strings.
4325 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4326 * commands/cmp.c (grub_cmd_cmp): Likewise.
4327 * kern/dl.c (grub_dl_flush_cache): Likewise.
4328 (grub_dl_load_core): Likewise.
4329 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4330 (grub_elf64_load_phdrs): Likewise.
4332 2008-07-13 Pavel Roskin <proski@gnu.org>
4334 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4335 between signed and unsigned.
4336 (LzmaEnc_Finish): Fix warning about an unused parameter.
4338 2008-07-13 Bean <bean123ch@gmail.com>
4340 * Makefile.in (enable_lzo): New rule.
4342 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
4344 * configure.ac (ENABLE_LZO): New option --enable-lzo.
4346 * boot/i386/pc/lnxboot.S: #include <config.h>.
4348 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
4349 its value according to the compression algorithm used, lzo or lzma.
4351 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
4352 compression algorithm according to configure macro.
4354 * kern/i386/pc/startup.S (codestart): Likewise.
4356 * kern/i386/pc/lzma_decode.S: New file.
4358 * include/grub/lib/LzFind.h: Likewise.
4360 * include/grub/lib/LzHash.h: Likewise.
4362 * include/grub/lib/LzmaDec.h: Likewise.
4364 * include/grub/lib/LzmaEnc.h: Likewise.
4366 * include/grub/lib/LzmaTypes.h: Likewise.
4368 * lib/LzFind.c: Likewise.
4370 * lib/LzmaDec.c: Likewise.
4372 * lib/LzmaEnc.c: Likewise.
4374 2008-07-13 Bean <bean123ch@gmail.com>
4376 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
4377 (grub_ext4_extent_header): New structure.
4378 (grub_ext4_extent): Likewise.
4379 (grub_ext4_extent_idx): Likewise.
4380 (grub_ext4_find_leaf): New function.
4381 (grub_ext2_read_block): Handle extents.
4383 2008-07-12 Robert Millan <rmh@aybabtu.com>
4385 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
4387 2008-07-11 Robert Millan <rmh@aybabtu.com>
4389 * util/grub.d/40_custom.in: New file. Example on how to add custom
4390 entries to /etc/grub.d.
4391 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
4392 40_custom (implicitly, by merging all the grub.d rules).
4394 2008-07-11 Pavel Roskin <proski@gnu.org>
4396 * commands/read.c (grub_getline): Fix invalid memory access.
4397 Don't add newline to the variable value.
4399 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4400 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4401 (serial_hw_get_port): Check validity of the port number.
4402 (grub_cmd_serial): Check return value of serial_hw_get_port().
4404 2008-07-07 Pavel Roskin <proski@gnu.org>
4406 * boot/i386/pc/diskboot.S (notification_string): Replace
4407 "Loading kernel" with just "loading". This is shorter, less
4408 confusing and saves a few bytes for possible future changes.
4410 2008-07-05 Pavel Roskin <proski@gnu.org>
4412 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4413 size for ATAPI devices, they are undefined. Output sector
4414 number in decimal form.
4416 * disk/ata.c: Use named constants for status bits.
4418 2008-07-04 Pavel Roskin <proski@gnu.org>
4420 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4421 grub_addr_t before casting it to the void pointer to fix a
4422 warning. Non-addressable regions are discarded earlier.
4423 (grub_arch_modules_addr): Cast _end to grub_addr_t.
4424 * kern/i386/linuxbios/table.c: Include grub/misc.h.
4425 (check_signature): Don't shadow table_header.
4426 (grub_linuxbios_table_iterate): Cast numeric constants to
4427 grub_linuxbios_table_header_t.
4428 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4431 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4434 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4435 pointer, which can cause warnings. Support 64-bit addresses.
4437 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4438 of sizeof(long). This fixes PowerPC image generation on x86_64.
4440 2008-07-04 Robert Millan <rmh@aybabtu.com>
4442 This fixes a performance issue when pc & gpt partmap iterators
4443 didn't abort iteration even after our hook found what it was
4444 looking for (often causing expensive probes of non-existent drives).
4446 Some callers relied on previous buggy behaviour, since they would
4447 raise an error when their own hooks caused early abortion of its
4450 * kern/device.c (grub_device_open): Improve error message.
4451 * disk/lvm.c (grub_lvm_open): Likewise.
4452 * disk/raid.c (grub_raid_open): Likewise.
4454 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4455 when hook requests it, independently of grub_errno.
4456 (pc_partition_map_probe): Do not fail when find_func() caused
4457 early abortion of pc_partition_map_iterate().
4459 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4460 when hook requests it, independently of grub_errno.
4461 (gpt_partition_map_probe): Do not fail when find_func() caused
4462 early abortion of gpt_partition_map_iterate().
4464 * kern/partition.c (grub_partition_iterate): Abort parent iteration
4465 when hook requests it, independently of grub_errno. Do not fail when
4466 part_map_iterate_hook() caused early abortion of p->iterate().
4468 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4469 when grub_partition_iterate() returned with non-zero.
4471 2008-07-03 Pavel Roskin <proski@gnu.org>
4473 * disk/ata.c (grub_ata_pio_write): Check status before writing,
4474 like we do in grub_ata_pio_read().
4475 (grub_ata_readwrite): Always write individual sectors. Fix the
4476 sector count for the remainder.
4477 (grub_ata_write): Enable writing to ATA devices. Correctly
4478 report error for ATAPI devices.
4480 2008-07-02 Pavel Roskin <proski@gnu.org>
4482 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4485 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4486 for every read sector, we already increment it for the whole
4487 batch. This fixes reading more than 256 sectors at once.
4489 * util/grub-editenv.c (cmd_info): Cast argument to long
4490 explicitly. ptrdiff_t reduces to int on i386.
4492 * util/grub-editenv.c (main): Be specific which parameter is
4495 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4496 (memdisk): Make memdisk_orig_addr a pointer.
4498 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4499 for file offsets, use grub_off_t instead. Fix printf format
4502 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4503 there. Real unexpected warnings should not drown in the noise
4504 about known problems.
4506 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4507 grub_disk_addr_t for memory addresses.
4509 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4510 explicitly to fix a warning.
4512 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4514 * Makefile.in (MODULE_LDFLAGS): New variable.
4515 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
4516 the linker accepts --build-id=none.
4517 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
4519 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4521 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4522 those in Linux XFS code. Provide a way to access 64-bit parent
4524 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
4525 the end of struct grub_xfs_dir_header.
4527 2008-07-02 Bean <bean123ch@gmail.com>
4529 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4530 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4531 and GRUB_IEEE1275_FLAG_NO_ANSI.
4533 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4534 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4535 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4537 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4538 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4540 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4541 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4543 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4544 esc sequence on non ANSI terminal.
4545 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4547 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4550 2008-07-02 Bean <bean123ch@gmail.com>
4552 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4553 (grub_editenv_SOURCES): New variable.
4554 (pkglib_MODULES): Add loadenv.mod.
4555 (loadenv_mod_SOURCES): New variable.
4556 (loadenv_mod_CFLAGS): Likewise.
4557 (loadenv_mod_LDFLAGS): Likewise.
4559 * include/grub/envblk.h: New file.
4561 * util/envblk.c: New file.
4563 * util/grub-editenv.c: New file.
4565 * commands/loadenv.c: New file.
4567 2008-07-01 Pavel Roskin <proski@gnu.org>
4569 * include/multiboot2.h (struct multiboot_tag_module): Use char,
4570 not unsigned char. This fixes warnings and is consistent with
4573 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4575 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4577 * term/tparm.c (analyze): Always set *popcount.
4579 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4580 cast to fix a warning.
4582 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4583 cast to suppress a warning.
4585 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4586 grub_fshelp_read_file() expects.
4588 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4589 write uuid as a 32-bit value in CPU byte order, so declare and
4592 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4593 long if the format specifier expects it.
4594 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4595 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4596 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4597 long to fix a warning.
4598 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4599 grub_dprintf() arguments to fix warnings.
4601 2008-06-30 Pavel Roskin <proski@gnu.org>
4603 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4604 install_bsd_part immediately before core.img is embedded or
4605 modified on disk. This fixes core.img verification if core.img
4608 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4609 core_path to calculate the blocklist.
4610 Patch from Javier MartÃn <lordhabbit@gmail.com>
4612 2008-06-29 Robert Millan <rmh@aybabtu.com>
4614 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4615 block to disk block.
4616 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4617 Patch from Niels Böhm <bitbucket@arcor.de>
4619 2008-06-29 Robert Millan <rmh@aybabtu.com>
4621 * util/update-grub_lib.in (font_path): Search for fonts in
4622 /boot/grub first, which is more likely to be readable (we aren't
4623 deciding where fonts live, just looking for them).
4625 2008-06-26 Pavel Roskin <proski@gnu.org>
4627 * util/biosdisk.c (read_device_map): Don't leave dead map
4628 entries for devices failing stat() check.
4630 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4631 core_path_dev for the core.img path on the target device.
4633 2008-06-26 Robert Millan <rmh@aybabtu.com>
4635 * disk/fs_uuid.c: New file.
4636 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4637 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4638 (fs_uuid_mod_LDFLAGS): New variables.
4639 * include/grub/disk.h (grub_disk_dev_id): Add
4640 `GRUB_DISK_DEVICE_UUID_ID'.
4641 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4642 implement iterate().
4644 2008-06-26 Robert Millan <rmh@aybabtu.com>
4646 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4647 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4648 Linux image includes no initrd.
4650 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
4652 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4653 call to resolve the core image location that effectively appended the
4656 2008-06-21 Robert Millan <rmh@aybabtu.com>
4658 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4661 * util/grub.d/10_hurd.in: ... to here ...
4662 * util/grub.d/10_linux.in: ... and here.
4664 2008-06-19 Robert Millan <rmh@aybabtu.com>
4666 * kern/main.c (grub_main): Export `prefix' variable immediately
4667 after it has been set by grub_machine_set_prefix().
4669 2008-06-19 Robert Millan <rmh@aybabtu.com>
4671 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4672 search result when not saving to variable, not the other way around.
4673 When saving to variable, abort iteration as soon as a match is found.
4675 2008-06-19 Robert Millan <rmh@aybabtu.com>
4677 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4678 check for partition that provides /boot/grub. Its logic is flawed,
4679 as it prevents prepare_grub_to_access_device() from being called
4682 2008-06-19 Robert Millan <rmh@aybabtu.com>
4684 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4685 "insmod" command directly when abstraction modules are needed,
4686 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4687 since it had already been processed).
4689 2008-06-19 Pavel Roskin <proski@gnu.org>
4691 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4692 changed. This is needed in case GRUB_LIBDIR changes.
4693 * conf/i386-ieee1275.rmk: Likewise.
4694 * conf/i386-linuxbios.rmk: Likewise.
4695 * conf/i386-pc.rmk: Likewise.
4696 * conf/powerpc-ieee1275.rmk: Likewise.
4698 2008-06-18 Pavel Roskin <proski@gnu.org>
4700 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4701 kernel_elf_symlist.c to symlist.c for consistency with other
4702 architectures. Update all users.
4703 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4705 2008-06-18 Robert Millan <rmh@aybabtu.com>
4707 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4710 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4711 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4712 a RAID device, run setup() for all members independently on whether
4713 LVM abstraction is being used.
4714 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4715 If grub-mkimage has set `*install_dos_part == -2', don't override this
4717 Perform *install_dos_part adjustments independently on whether
4718 we're embedding or not.
4719 Clarify error message when image is too big for embedding.
4720 Remove duplicate *install_dos_part stanza.
4722 2008-06-17 Robert Millan <rmh@aybabtu.com>
4724 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4725 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4727 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4728 values in grub_ofconsole_normal_color and
4729 grub_ofconsole_highlight_color (they're not directly related to
4730 background and foreground).
4731 (grub_ofconsole_setcolorstate): Extract background and foreground
4732 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4734 2008-06-17 Robert Millan <rmh@aybabtu.com>
4736 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4737 /boot/grub for the check in last commit, not /boot (they could be
4738 different partitions).
4740 2008-06-16 Robert Millan <rmh@aybabtu.com>
4742 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4743 asked to setup access for the same partition that provides /boot,
4744 don't bother using UUIDs since our root already has the value we
4747 2008-06-16 Robert Millan <rmh@aybabtu.com>
4749 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4751 Patch from Sven Mueller <sven@debian.org>.
4753 2008-06-16 Robert Millan <rmh@aybabtu.com>
4755 * util/update-grub.in: Check for $EUID instead of $UID.
4756 Reported by Vincent Zweije.
4758 2008-06-16 Bean <bean123ch@gmail.com>
4760 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
4761 (grub_ext2_read_block): Likewise.
4762 (grub_ext2_read_inode): Likewise.
4763 (grub_ext2_mount): Likewise.
4764 (grub_ext2_close): Likewise.
4765 (grub_ext3_get_journal): Removed.
4767 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
4768 (grub_reiserfs_read_symlink): Likewise.
4769 (grub_reiserfs_mount): Likewise.
4770 (grub_reiserfs_open): Likewise.
4771 (grub_reiserfs_read): Likewise.
4772 (grub_reiserfs_close): Likewise.
4773 (grub_reiserfs_get_journal): Removed.
4775 * fs/fshelp.c (grub_fshelp_read): Removed.
4776 (grub_fshelp_map_block): Likewise.
4778 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4779 (grub_fshelp_journal): Likewise.
4780 (grub_fshelp_read): Likewise.
4781 (grub_fshelp_map_block): Likewise.
4783 2008-06-16 Pavel Roskin <proski@gnu.org>
4785 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4786 floating point anymore.
4787 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4789 2008-06-15 Pavel Roskin <proski@gnu.org>
4791 * commands/ls.c (grub_ls_list_files): Use integer calculations
4792 for human readable format, avoid floating point use.
4793 * kern/misc.c (grub_ftoa): Remove.
4794 (grub_vsprintf): Remove floating point support.
4796 2008-06-15 Robert Millan <rmh@aybabtu.com>
4798 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
4800 Reported by Max Vozeler.
4802 2008-06-15 Robert Millan <rmh@aybabtu.com>
4804 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4805 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4807 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4808 the beginning of the prefix.
4810 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4811 It is assumed that if we have a memdisk, grub-mkimage has set
4812 grub_prefix to include the "(memdisk)" drive in it.
4814 2008-06-15 Robert Millan <rmh@aybabtu.com>
4816 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4817 Initialize keyboard controller after registering the terminal, so that
4818 grub_printf() can be called from grub_keyboard_controller_init().
4820 2008-06-15 Robert Millan <rmh@aybabtu.com>
4822 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4823 extent-btree which is written as big endian on disk.
4824 Reported by Alain Greppin <al@chilibi.org>.
4826 2008-06-14 Robert Millan <rmh@aybabtu.com>
4828 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4829 * util/i386/pc/grub-install.in (modules): Likewise.
4831 2008-06-13 Pavel Roskin <proski@gnu.org>
4833 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4835 2008-06-13 Bean <bean123ch@gmail.com>
4837 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4839 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4841 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4842 to indicate sparse block.
4844 2008-06-12 Pavel Roskin <proski@gnu.org>
4846 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4847 number, grub_fshelp_read() does it for us.
4849 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4850 linear disk read with journal translation.
4851 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4852 * include/grub/fshelp.h: Declare grub_fshelp_read().
4854 2008-06-09 Pavel Roskin <proski@gnu.org>
4856 * fs/minix.c (grub_minix_mount): Handle error reading
4859 2008-06-08 Robert Millan <rmh@aybabtu.com>
4861 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4862 don't append the RAID prefix afterwards.
4863 Reported by Clint Adams.
4865 2008-06-08 Robert Millan <rmh@aybabtu.com>
4867 Based on description from Pavel:
4868 * kern/disk.c (grub_disk_check_range): Rename to ...
4869 (grub_disk_adjust_range): ... this. Add a comment explaining the
4870 tasks performed by this function.
4872 2008-06-08 Robert Millan <rmh@aybabtu.com>
4874 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4875 `num_serial' (for consistency with other variables).
4876 (struct grub_ntfs_data): Add `uuid' member.
4877 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4878 (grub_ntfs_uuid): New function.
4879 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4881 2008-06-07 Pavel Roskin <proski@gnu.org>
4883 * util/biosdisk.c (open_device): Revert last change to the
4884 function, it broke installation. The sector needs to be
4885 different dependent on which device is opened.
4887 2008-06-06 Robert Millan <rmh@aybabtu.com>
4889 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4890 rest of GRUB, and breakage doesn't happen if its value were modified.
4892 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4893 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4894 a constant (same value).
4895 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4896 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4898 2008-06-06 Robert Millan <rmh@aybabtu.com>
4900 * util/biosdisk.c (open_device): Do not modify sector offset when
4901 accessing a partition. kern/disk.c already handles this for us.
4903 2008-06-06 Robert Millan <rmh@aybabtu.com>
4905 * util/grub-emu.c (grub_machine_init): Move code in this function from
4907 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4908 segfault in case grub_printf() is called).
4910 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4911 grub_probe. Update all users not to explicitly add it again.
4912 (grub_device): New variable; contains corresponding device for grubdir.
4913 (fs_module, partmap_module, devabstraction_module): Pass
4914 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4917 2008-06-05 Robert Millan <rmh@aybabtu.com>
4919 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4920 is found, print it (same layout as with labels).
4922 2008-06-04 Robert Millan <rmh@aybabtu.com>
4924 * util/biosdisk.c (get_drive): Rename to ...
4925 (find_grub_drive): ... this. Update all users.
4927 (get_os_disk): Rename to ...
4928 (convert_system_partition_to_system_disk): ... this. Update all users.
4930 (find_drive): Rename to ...
4931 (find_system_device): ... this. Update all users.
4933 2008-06-04 Robert Millan <rmh@aybabtu.com>
4935 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4936 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4937 (make_device_map): Likewise.
4939 2008-06-01 Robert Millan <rmh@aybabtu.com>
4941 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4942 before dereferencing it.
4944 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4945 union with fat12/fat16-specific ones. Add some new fields, including
4946 `num_serial' for both versions.
4947 (struct grub_fat_data): Add `uuid' member.
4948 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4949 names. Initialize `data->uuid' using `num_serial'.
4950 (grub_fat_uuid): New function.
4951 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4953 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4954 (grub_reiserfs_uuid): New function.
4955 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4958 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4959 (grub_xfs_uuid): New function.
4960 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4962 2008-06-01 Robert Millan <rmh@aybabtu.com>
4964 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4965 code that is backward compatible with pre-uuid search command.
4967 2008-05-31 Robert Millan <rmh@aybabtu.com>
4969 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4970 floppies after everything else, to ensure floppy drive isn't accessed
4971 unnecessarily (patch from Bean).
4973 2008-05-31 Robert Millan <rmh@aybabtu.com>
4975 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4976 not print device names when we were asked to set a variable.
4978 2008-05-31 Robert Millan <rmh@aybabtu.com>
4980 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4981 using "cursor-on" and "cursor-off" commands (understood at least by
4982 the Open Firmware flavour on OLPC).
4984 2008-05-31 Michael Gorven <michael@gorven.za.net>
4986 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4987 on and off sequences.
4989 2008-05-31 Robert Millan <rmh@aybabtu.com>
4991 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4992 * util/update-grub.in: Likewise.
4994 2008-05-30 Pavel Roskin <proski@gnu.org>
4996 * util/biosdisk.c (linux_find_partition): Simplify logic and
4997 make the code more universal. Keep special processing for
4998 devfs, but use a simple rule for all other devices. If the
4999 device ends with a number, append 'p' and the partition number.
5000 Otherwise, append only the partition number.
5002 2008-05-30 Robert Millan <rmh@aybabtu.com>
5004 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5005 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5006 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5007 the `root' parameter to Linux.
5009 2008-05-30 Robert Millan <rmh@aybabtu.com>
5011 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5012 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5013 --fs_uuid with --fs-uuid.
5014 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5015 all filesystems support them).
5017 2008-05-30 Robert Millan <rmh@aybabtu.com>
5019 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
5020 grub_printf() flags, since we're printing in units of 2 bytes.
5022 2008-05-30 Robert Millan <rmh@aybabtu.com>
5024 * util/grub.d/00_header.in: Remove obsolete comment referencing
5025 convert_system_path_to_grub_path().
5026 * util/update-grub.in: Likewise.
5027 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5028 (convert_system_path_to_grub_path): Add a warning message explaining
5029 that this function is deprecated. Rely on is_path_readable_by_grub()
5030 for the readability checks.
5031 (font_path): Use is_path_readable_by_grub() for the readability
5032 check rather than convert_system_path_to_grub_path().
5034 2008-05-30 Robert Millan <rmh@aybabtu.com>
5036 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5037 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5038 converting it first.
5039 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5040 grub.cfg for access to font file, and afterwards call it again to set
5043 2008-05-30 Robert Millan <rmh@aybabtu.com>
5045 * commands/search.c (options): Add --fs_uuid option.
5046 (search_fs_uuid): New function.
5047 (grub_cmd_search): Fix --set argument passing.
5048 Use search_fs_uuid() when requested via --fs_uuid.
5049 (grub_search_init): Update help message.
5050 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5051 and redeclare it as an array of 16-bit words.
5052 (grub_ext2_uuid): New function.
5053 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5054 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5055 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5056 (GRUB_DEVICE_BOOT_UUID): New variables.
5057 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5058 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5060 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
5061 just assume `root' variable has the right value.
5062 * util/grub.d/10_linux.in: Likewise.
5063 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5065 (main): Recognise `-t fs_uuid' argument.
5067 2008-05-30 Robert Millan <rmh@aybabtu.com>
5069 * util/biosdisk.c (map): Redefine structure to hold information
5070 about GRUB drive name.
5071 (get_drive): Reimplement without assuming (and verifying) BIOS-like
5073 (call_hook): Remove.
5074 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5075 member. Assume drive has partitions.
5076 (grub_util_biosdisk_open): Access device names via `.device' struct
5078 (open_device): Likewise.
5079 (find_drive): Likewise.
5080 (read_device_map): Adjust map[] usage to match the new struct
5081 definition. Don't check for duplicates (still possible, but not cheap
5083 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5084 (make_device_name): Remove assumption of BIOS-like drive names.
5086 2008-05-30 Pavel Roskin <proski@gnu.org>
5088 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5089 compiling execute.c doesn't need grub_script.tab.h anymore.
5090 (normal/command.c_DEPENDENCIES): Likewise.
5091 (normal/function.c_DEPENDENCIES): Likewise.
5092 * conf/i386-ieee1275.rmk: Likewise.
5093 * conf/i386-linuxbios.rmk: Likewise.
5094 * conf/i386-pc.rmk: Likewise.
5095 * conf/powerpc-ieee1275.rmk: Likewise.
5096 * conf/sparc64-ieee1275.rmk: Likewise.
5098 2008-05-29 Pavel Roskin <proski@gnu.org>
5100 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5101 when scanning metadata for volume group name.
5103 * include/grub/script.h: Don't include grub_script.tab.h. It's
5104 a generated file, which may only be included from the files with
5105 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
5106 use union YYSTYPE, as the later allows forward declaration.
5107 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5109 2008-05-29 Robert Millan <rmh@aybabtu.com>
5111 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5112 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5113 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5114 (grub_console_checkkey): Add grub_dprintf() call to report unknown
5117 2008-05-29 Robert Millan <rmh@aybabtu.com>
5119 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5120 control key combinations.
5122 2008-05-29 Robert Millan <rmh@aybabtu.com>
5124 * util/powerpc/ieee1275/grub-install.in: Move from here ...
5125 * util/ieee1275/grub-install.in: ... to here.
5126 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5127 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5128 (grub_install_SOURCES): Likewise.
5130 2008-05-29 Robert Millan <rmh@aybabtu.com>
5132 * fs/affs.c: Update copyright year.
5133 * fs/ext2.c: Likewise.
5134 * fs/fshelp.c: Likewise.
5135 * fs/hfsplus.c: Likewise.
5136 * fs/ntfs.c: Likewise.
5137 * fs/xfs.c: Likewise.
5138 * include/grub/fshelp.h: Likewise.
5139 * util/grub-mkdevicemap.c: Likewise.
5141 2008-05-28 Robert Millan <rmh@aybabtu.com>
5143 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5144 might need to be fatfs to support some firmware implementations
5147 2008-05-28 Robert Millan <rmh@aybabtu.com>
5149 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5151 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5152 (make_device_map): Likewise.
5154 2008-05-20 Bean <bean123ch@gmail.com>
5156 * fs/fshelp.c (grub_fshelp_map_block): New function.
5157 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5158 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5160 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5161 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5162 (grub_fshelp_journal): New structure.
5163 (grub_fshelp_map_block): New function prototype.
5164 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5165 (grub_fshelp_map_block): Likewise.
5167 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5168 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5169 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5170 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5171 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5172 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5173 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5174 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5175 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5176 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5177 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5178 (grub_ext2_sblock): New members for journal support.
5179 (grub_ext3_journal_header): New structure.
5180 (grub_ext3_journal_revoke_header): Likewise.
5181 (grub_ext3_journal_block_tag): Likewise.
5182 (grub_ext3_journal_sblock): Likewise.
5183 (grub_fshelp_node): New members logfile and journal.
5184 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5185 grub_fshelp_map_block to get real block number.
5186 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5188 (grub_ext2_read_inode): Likewise.
5189 (grub_ext3_get_journal): New function.
5190 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5191 (grub_ext2_close): Release memory used by journal.
5193 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5194 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5195 (grub_reiserfs_transaction_header): Renamed to
5196 grub_reiserfs_description_block, replace field data with real_blocks.
5197 (grub_reiserfs_commit_block): New structure.
5198 (grub_reiserfs_data): New member journal.
5199 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5201 (grub_reiserfs_read_symlink): Likewise.
5202 (grub_reiserfs_iterate_dir): Likewise.
5203 (grub_reiserfs_open): Likewise.
5204 (grub_reiserfs_read): Likewise.
5205 (grub_reiserfs_get_journal): New function.
5206 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5207 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5208 using grub_reiserfs_get_journal.
5209 (grub_reiserfs_close): Release memory used by journal.
5211 * fs/affs.c (grub_affs_read_block): Change block type to
5212 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5214 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5216 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5218 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5220 * fs/udf.c (grub_udf_read_block): Change block type to
5221 grub_disk_addr_t. Use type cast to avoid warning.
5223 * fs/xfs.c (grub_xfs_read_block): Likewise.
5225 2008-05-16 Christian Franke <franke@computer.org>
5227 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5228 to ensure that break with ESC will always work.
5229 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5230 Remove ESC from keyboard queue.
5232 2008-05-16 Christian Franke <franke@computer.org>
5234 * util/biosdisk.c: [__CYGWIN__] Add includes.
5235 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5236 (get_os_disk): Move variable declarations to OS specific
5237 parts to avoid warning.
5238 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5239 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5240 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5242 * util/getroot.c: [__CYGWIN__] Add includes.
5243 (strip_extra_slashes): Fix "/" case.
5244 [__CYGWIN__] (get_win32_path): New function.
5245 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5246 [__CYGWIN__] (find_root_device): Disable.
5247 [__CYGWIN__] (get_bootsec_serial): New function.
5248 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5249 [__linux__] (grub_guess_root_device): Add early returns to simplify
5251 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5252 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5253 check for Linux only.
5255 2008-05-15 Bean <bean123ch@gmail.com>
5257 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5258 keyboard hang problem in apple's intel mac.
5260 2008-05-09 Robert Millan <rmh@aybabtu.com>
5262 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5264 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5265 (make_device_map): Likewise.
5266 Reported by Aurelien Jarno <aurel32@debian.org>
5268 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
5270 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5271 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5272 (make_device_map): Output entries for xvd type disks.
5274 2008-05-07 Robert Millan <rmh@aybabtu.com>
5276 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5278 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5279 (make_device_map): Likewise.
5280 Reported by Roland Dreier <rdreier@cisco.com>
5282 2008-05-07 Robert Millan <rmh@aybabtu.com>
5284 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5285 grub_strstr() call. Correct a few mistakes in failure path handling.
5287 2008-05-06 Robert Millan <rmh@aybabtu.com>
5289 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5290 Do not print a trailing slash (therefore, the root directory is an
5292 (convert_system_path_to_grub_path): Do not remove trailing slash
5293 from make_system_path_relative_to_its_root() output.
5295 * util/i386/pc/grub-install.in: Add trailing slash to output from
5296 make_system_path_relative_to_its_root().
5298 2008-05-06 Robert Millan <rmh@aybabtu.com>
5300 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5301 ensures that output lines aren't intermangled with those sent to
5302 stderr (via grub_util_info()).
5303 * util/grub-probe.c (grub_refresh): Likewise.
5304 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5306 2008-05-05 Christian Franke <franke@computer.org>
5308 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5309 Add Cygwin device names.
5310 (get_ide_disk_name) [__CYGWIN__]: Likewise.
5311 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5312 (check_device): Return error instead of success on empty name.
5313 (make_device_map): Move label inside linux specific code to
5314 prevent compiler warning.
5316 2008-04-30 Robert Millan <rmh@aybabtu.com>
5318 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5319 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5321 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5323 2008-04-29 Robert Millan <rmh@aybabtu.com>
5325 * docs/grub.cfg: New file (example GRUB configuration).
5327 2008-04-26 Robert Millan <rmh@aybabtu.com>
5329 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
5330 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5331 and `disk/ieee1275/nand.c'.
5333 2008-04-25 Bean <bean123ch@gmail.com>
5335 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5338 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5339 change the buffer size to 4096 for cdrom device.
5341 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
5343 (_linux_mod_SOURCES): New variable.
5344 (_linux_mod_CFLAGS): Likewise.
5345 (_linux_mod_LDFLAGS): Likewise.
5346 (linux_mod_SOURCES): Likewise.
5347 (linux_mod_CFLAGS): Likewise.
5348 (linux_mod_LDFLAGS): Likewise.
5349 (nand_mod_SOURCES): Likewise.
5350 (nand_mod_CFLAGS): Likewise.
5351 (nand_mod_LDFLAGS): Likewise.
5353 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
5354 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
5355 type property. (nand device in olpc don't have this property)
5357 * include/grub/disk.h (grub_disk_dev_id): New macro
5358 GRUB_DISK_DEVICE_NAND_ID.
5360 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
5362 (grub_rescue_cmd_initrd): Likewise.
5364 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
5365 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
5366 ofw_cif_handler and ofw_idt, adjust padding number.
5368 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
5369 GRUB_MACHINE_IEEE1275 is defined.
5371 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
5372 Use NESTED_FUNC_ATTR attribute on the hook parameter.
5374 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
5375 on nested function heap_init.
5376 (grub_upper_mem): New variable for i386-ieee1275.
5377 (grub_get_extended_memory): New function for i386-ieee1275.
5378 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
5380 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
5381 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
5384 * loader/i386/ieee1275/linux.c: New file.
5386 * loader/i386/ieee1275/linux_normal.c: New file.
5388 * disk/ieee1275/nand.c: New file.
5390 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
5392 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
5394 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
5396 2008-04-18 Robert Millan <rmh@aybabtu.com>
5398 Restructures early code path on ieee1275 to unify grub_main() as
5399 the first C function that is executed in every platform.
5401 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5402 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5404 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5405 * kern/ieee1275/cmain.c (cmain): Rename to ...
5406 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5407 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5410 2008-04-18 Robert Millan <rmh@aybabtu.com>
5412 * util/update-grub.in: Fix syntax error when setting
5413 `GRUB_PRELOAD_MODULES'.
5414 Reported by Stephane Chazelas <stephane@artesyncp.com>
5416 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
5418 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5419 section into account, newer toolchains generate unique build ids
5420 * configure.ac: remove the test for --build-id=none acceptance,
5421 we want build ids to be preserved
5422 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5423 far from other sections don't cause the raw binary images grow
5426 2008-04-15 Robert Millan <rmh@aybabtu.com>
5428 * disk/lvm.c: Update copyright year.
5429 * kern/misc.c: Likewise.
5431 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5433 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5434 there is no memory left for physical volume name.
5436 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5438 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5439 volume name mapping to support bigger than 9 character names properly.
5441 2008-04-13 Robert Millan <rmh@aybabtu.com>
5443 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5444 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5446 2008-04-13 Christian Franke <franke@computer.org>
5448 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5449 to create a floppy emulation boot CD when non emulation mode
5451 Enable Joliet CD filesystem extension.
5453 2008-04-13 Robert Millan <rmh@aybabtu.com>
5455 * kern/misc.c (grub_strncat): Fix off-by-one error.
5456 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5458 * kern/env.c (grub_env_context_close): Clear current context, not
5460 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5462 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5464 2008-04-13 Robert Millan <rmh@aybabtu.com>
5466 Improve robustness when handling LVM.
5468 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5469 (and leave `*p' unmodified).
5470 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5472 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5473 iterating through it.
5474 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5476 (grub_lvm_scan_device): Check the return value (and fail gracefully
5477 when due) on each grub_lvm_getvalue() or grub_strstr() call.
5478 Don't assume `vg->pvs != NULL' when iterating through it.
5480 2008-04-13 Robert Millan <rmh@aybabtu.com>
5482 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5483 * genmk.rb (partmap): New variable.
5484 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5485 (#{partmap}): New target rule.
5486 * genpartmaplist.sh: New file.
5487 * Makefile.in (pkglib_DATA): Add partmap.lst.
5488 (partmap.lst): New target rule.
5489 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5490 modules (including all partition maps), instead of preloading them.
5492 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
5494 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5495 `linux-boot-prober' (if installed) to detect other operating
5496 systems which are installed on the computer and add them to
5498 * conf/common.rmk: Build and install 30_os-prober.
5500 2008-04-12 Robert Millan <rmh@aybabtu.com>
5502 * kern/powerpc/ieee1275/init.c: Move from here ...
5503 * kern/ieee1275/init.c: ... to here. Update all users.
5505 * kern/powerpc/ieee1275/cmain.c: Move from here ...
5506 * kern/ieee1275/cmain.c: ... to here. Update all users.
5508 * kern/powerpc/ieee1275/openfw.c: Move from here ...
5509 * kern/ieee1275/openfw.c: ... to here. Update all users.
5511 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5512 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
5514 2008-04-10 Pavel Roskin <proski@gnu.org>
5516 * configure.ac: Always use "_cv_" in cache variables for
5517 compatibility with Autoconf 2.62.
5519 2008-04-07 Robert Millan <rmh@aybabtu.com>
5521 Revert grub/machine/init.h addition by Pavel (since it breaks on
5522 i386-ieee1275 and others):
5523 * util/i386/pc/misc.c: Remove grub/machine/init.h.
5524 * util/powerpc/ieee1275/misc.c: Likewise.
5526 2008-04-07 Robert Millan <rmh@aybabtu.com>
5528 * util/grub-probe.c (probe): Improve error message.
5530 2008-04-07 Robert Millan <rmh@aybabtu.com>
5532 * util/biosdisk.c (read_device_map): Skip devices that don't exist
5533 (this prevents the presence of a bogus entry from ruining the whole
5536 2008-04-06 Pavel Roskin <proski@gnu.org>
5538 * util/biosdisk.c: Include grub/util/biosdisk.h.
5539 * util/grub-fstest.c (execute_command): Make static.
5540 * util/grub-mkdevicemap.c (check_device): Likewise.
5541 * util/i386/pc/misc.c: Include grub/machine/init.h.
5542 * util/powerpc/ieee1275/misc.c: Likewise.
5543 * util/lvm.c: Include grub/util/lvm.h.
5544 * util/misc.c: Include grub/kernel.h, grub/misc.h and
5546 * util/raid.c: Include grub/util/raid.h.
5547 (grub_util_getdiskname): Make static.
5549 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5550 grub_hostfs_fini(), as they are called from grub_init_all() and
5551 grub_fini_all() respectively. This fixes an infinite loop in
5552 grub-fstest due to double registration of hostfs.
5553 Reported by Christian Franke <Christian.Franke@t-online.de>
5555 2008-04-05 Pavel Roskin <proski@gnu.org>
5557 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5558 all 8 functions. Otherwise, probe function 0 only.
5560 2008-04-04 Pavel Roskin <proski@gnu.org>
5562 * commands/lspci.c (grub_lspci_iter): Print the bus number
5565 * commands/lspci.c (grub_pci_classes): Fix typos.
5566 (grub_lspci_iter): Don't print func twice. Print vendor ID
5567 before device ID, as it's normally done.
5569 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5570 Fix signedness warnings.
5571 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5573 * util/ieee1275/get_disk_name.c: Include config.h so that
5574 _GNU_SOURCE is defined and getline() is declared. Mark an
5575 unused argument as such. Fix a signedness warning.
5577 2008-04-02 Pavel Roskin <proski@gnu.org>
5579 * genkernsyms.sh.in: Use more robust assignments for CC and
5580 srcdir. Quote srcdir.
5581 * gensymlist.sh.in: Likewise. Assert at the compile time that
5582 the symbol table is not empty.
5584 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5585 * fs/cpio.c (grub_cpio_read): Likewise.
5587 2008-04-01 Pavel Roskin <proski@gnu.org>
5589 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5590 * disk/host.c (grub_host_open): Likewise.
5591 * disk/loopback.c (grub_loopback_open): Likewise.
5592 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5593 disk->id as in disk/host.c, not a multi-character constant.
5595 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5596 later is obsolete, potentially dangerous and sets a bad example.
5597 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5598 * util/misc.c (grub_util_get_image_size): Likewise.
5600 * disk/loopback.c (options): Improve help for "--partitions".
5602 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5603 options to align them with the short options, e.g. "echo -e".
5605 2008-03-31 Bean <bean123ch@gmail.com>
5607 * video/reader/png.c (grub_png_data): New member is_16bit and
5609 (grub_png_decode_image_header): Detect 16 bit png image.
5610 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5611 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5612 (grub_video_reader_png): Release memory occupied by image_data.
5614 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5616 (grub_nfs_mount): Skip the test for sector per cluster.
5618 * include/grub/ntfs.h (MAX_SPC): Removed.
5620 2008-03-31 Bean <bean123ch@gmail.com>
5622 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5623 (grub_probe_SOURCES): Add fs/afs.c.
5624 (grub_fstest_SOURCES): Likewise.
5625 (afs_mod_SOURCES): New variable.
5626 (afs_mod_CFLAGS): Likewise.
5627 (afs_mod_LDFLAGS): Likewise.
5629 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5630 (grub_emu_SOURCES): Likewise.
5632 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5634 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5636 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5640 * fs/afs.c: New file.
5642 2008-03-30 Pavel Roskin <proski@gnu.org>
5644 * disk/host.c: Include grub/misc.h to fix a warning.
5645 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5646 warnings about implicit declarations.
5648 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5650 * include/grub/i386/loader.h: Change declaration of
5651 grub_linux_boot() to match what grub_loader_set() expects.
5652 * util/getroot.c (grub_guess_root_device): Return const char* to
5654 * util/grub-probe.c (probe): Fix a warning about uninitialized
5655 abstraction_name variable.
5656 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5657 second argument as unused to fix a warning.
5659 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5660 missing grub_error() call.
5662 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5663 2.60 and newer uses it to define datadir.
5665 * commands/sleep.c: Fix warning about implicit declaration.
5666 * disk/memdisk.c: Likewise.
5667 * loader/aout.c: Likewise.
5668 * loader/i386/bsd_normal.c: Likewise.
5669 * util/grub-probe.c: Likewise.
5671 * commands/i386/cpuid.c (has_longmode): Make static.
5672 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5673 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5675 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5676 GDT. This is more robust, as %ds can change.
5677 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5678 calling real_to_prot().
5679 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5681 2008-03-28 Pavel Roskin <proski@gnu.org>
5683 * kern/i386/pc/startup.S: Assert that uncompressed functions
5684 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5685 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5686 code, as they push parts of the code (error handlers) beyond
5687 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5688 code as correctness and size.
5690 2008-03-28 Pavel Roskin <proski@gnu.org>
5692 * kern/i386/pc/startup.S
5693 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5694 data block address to the real mode, keep offset minimal. This
5695 works around a bug in AWARD BIOS on old Athlon systems, which
5696 makes CD detection hang.
5698 2008-03-26 Pavel Roskin <proski@gnu.org>
5700 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5702 * include/grub/normal.h: Add grub_parse_color_name_pair()
5705 2008-03-24 Bean <bean123ch@gmail.com>
5707 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5708 (cd_count): Removed.
5709 (cd_drive): New variable.
5710 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5711 (grub_biosdisk_call_hook): Likewise.
5712 (grub_biosdisk_iterate): Change cdrom detection method.
5713 (grub_biosdisk_open): Replace cd_start with cd_drive.
5714 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5715 detect cdrom device.
5717 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5719 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5720 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5721 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5722 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5723 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5724 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5725 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5726 (grub_biosdisk_cdrp): New structure.
5727 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5729 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5731 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5734 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5737 2008-03-20 Robert Millan <rmh@aybabtu.com>
5739 Remove 2 TiB limit in ata.mod.
5740 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5741 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5742 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5743 grub_uint64_t instead of grub_uint32_t.
5745 2008-03-05 Bean <bean123ch@gmail.com>
5747 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5748 (grub_multiboot): Set boot device.
5750 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5752 2008-03-02 Bean <bean123ch@gmail.com>
5754 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5757 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5759 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5762 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5765 * docs/fdl.texi: New file.
5767 * docs/mdate-sh: New file. Copied from gnulib.
5768 * docs/texinfo.tex: Likewise.
5770 * config.guess: Updated from gnulib.
5771 * install-sh: Likewise.
5773 2008-02-28 Robert Millan <rmh@aybabtu.com>
5775 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5776 (aout_mod_SOURCES): New variable.
5777 (aout_mod_CFLAGS): Likewise.
5778 (aout_mod_LDFLAGS): Likewise.
5780 * conf/i386-ieee1275.rmk: Likewise.
5782 2008-02-28 Robert Millan <rmh@aybabtu.com>
5784 * util/update-grub.in: Reorganise terminal validity check. Accept
5785 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5786 Based on suggestion by Franklin PIAT.
5788 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5790 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5792 * util/getroot.c (grub_util_check_block_device): New function that
5793 returns the given argument if it is a block device and returns NULL else.
5794 * util/grub-probe.c (argument_is_device): New variable.
5795 (probe): Promote device_name from a variable to an argument. Receive
5796 device_name from grub_util_check_block_device() if path is NULL and from
5797 grub_guess_root_device() else. Do not free() device_name anymore.
5798 (options): Introduce new parameter '-d, --device'.
5799 (main): Add description of the new parameter to the help screen.
5800 Rename path variable to argument. Set argument_is_device if the '-d'
5801 option is given. Pass argument to probe() depending on
5804 2008-02-24 Bean <bean123ch@gmail.com>
5806 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5807 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5808 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5809 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5810 (GRUB_ISO9660_VOLDESC_END): Likewise.
5811 (grub_iso9660_primary_voldesc): New member escape.
5812 (grub_iso9660_data): New member joliet.
5813 (grub_iso9660_convert_string): New function.
5814 (grub_iso9660_mount): Detect joliet extension.
5815 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5816 (grub_iso9660_iso9660_label): Likewise.
5818 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5819 (grub_setup_SOURCES): Add fs/udf.c.
5820 (grub_fstest_SOURCES): Likewise.
5821 (udf_mod_SOURCES): New variable.
5822 (udf_mod_CFLAGS): Likewise.
5823 (udf_mod_LDFLAGS): Likewise.
5825 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5826 (grub_emu_SOURCES): Likewise.
5828 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5830 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5832 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5836 * fs/udf.c: New file.
5838 2008-02-24 Robert Millan <rmh@aybabtu.com>
5840 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5841 (normal/lexer.c_DEPENDENCIES): New variables.
5842 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5843 (normal/lexer.c_DEPENDENCIES): Likewise.
5844 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5845 (normal/lexer.c_DEPENDENCIES): Likewise.
5846 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5847 (normal/lexer.c_DEPENDENCIES): Likewise.
5848 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5849 (normal/lexer.c_DEPENDENCIES): Likewise.
5850 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5851 (normal/lexer.c_DEPENDENCIES): Likewise.
5853 2008-02-23 Robert Millan <rmh@aybabtu.com>
5855 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5856 since they were intended to be in hex. This didn't break previously
5857 because of a bug in gpt_partition_map_iterate() (see below).
5859 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5860 when checking the validity of GPT header.
5861 Remove `partno', since it always provides the same information as `i'.
5863 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5865 * include/grub/efi/time.h: Fix a wrong comment.
5867 2008-02-19 Pavel Roskin <proski@gnu.org>
5869 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5872 2008-02-19 Bean <bean123ch@gmail.com>
5874 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5875 (aout_mod_SOURCES): New variable.
5876 (aout_mod_CFLAGS): Likewise.
5877 (aout_mod_LDFLAGS): Likewise.
5878 (_bsd_mod_SOURCES): New variable.
5879 (_bsd_mod_CFLAGS): Likewise.
5880 (_bsd_mod_LDFLAGS): Likewise.
5881 (bsd_mod_SOURCES): New variable.
5882 (bsd_mod_CFLAGS): Likewise.
5883 (bsd_mod_LDFLAGS): Likewise.
5885 * include/grub/aout.h: New file.
5887 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5889 * include/grub/i386/bsd.h: New file.
5891 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5894 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5895 function is called, so that it's possible to change it inside the hook.
5896 (grub_elf64_load): Likewise.
5897 (grub_elf_file): Don't close the file if elf header is not found.
5898 (grub_elf_close): Close the file if grub_elf_file fails (The new
5899 grub_elf_file won't close it).
5900 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5901 (grub_elf64_size): Likewise.
5903 * kern/i386/loader.S (grub_unix_real_boot): New function.
5905 * loader/aout.c: New file.
5907 * loader/i386/bsd.c: New file.
5909 * loader/i386/bsd_normal.c: New file.
5911 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5913 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
5914 can test other formats.
5916 2008-02-19 Robert Millan <rmh@aybabtu.com>
5918 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5919 (grub_gpt_partition_type_empty): Redefine with macro from
5920 `<grub/gpt_partition.h>'.
5921 (gpt_partition_map_iterate): Adjust partition type comparison.
5923 Export `entry' as partmap-specific `part.data' struct.
5924 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5926 * include/grub/gpt_partition.h (grub_gpt_header)
5927 (grub_gpt_partentry): ... to here (new file).
5929 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5931 (grub_gpt_partition_type_bios_boot): New const variable, defined
5932 with macro from `<grub/gpt_partition.h>'.
5934 (setup): Replace `first_start' with `embed_region', which keeps
5935 track of the embed region (and is partmap-agnostic).
5937 Replace find_first_partition_start() with find_usable_region(),
5938 which finds a usable region for embedding using partmap-specific
5939 knowledge (supports PC/MSDOS and GPT).
5941 Fix all assumptions that the embed region start at sector 1, using
5942 `embed_region.start' from now on. Similarly, use `embed_region.end'
5943 rather than `first_start' to calculate available size.
5945 In grub_util_info() message, replace "into after the MBR" with an
5946 indication of the specific sector our embed region starts at.
5948 2008-02-19 Robert Millan <rmh@aybabtu.com>
5950 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5951 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5952 `commands/reboot.c'.
5953 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5954 (halt_mod_SOURCES): Likewise.
5955 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5956 (halt_mod_SOURCES): Likewise.
5958 2008-02-17 Christian Franke <franke@computer.org>
5960 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5962 2008-02-17 Robert Millan <rmh@aybabtu.com>
5964 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5965 set `first_start' to 0 for non-PC/MSDOS partition maps.
5967 2008-02-16 Robert Millan <rmh@aybabtu.com>
5969 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5970 do not assume partition map is PC/MSDOS before performing checks that
5971 are specific to that layout.
5973 2008-02-13 Robert Millan <rmh@aybabtu.com>
5975 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5976 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5977 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5979 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5981 * configure.ac: Only a cosmetic change on the handling of
5982 -fno-stack-protector.
5984 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
5986 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5987 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5989 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5990 (halt_mod_SOURCES): New variable.
5991 (halt_mod_CFLAGS): Likewise.
5992 (halt_mod_LDFLAGS): Likewise.
5993 (reboot_mod_SOURCES): Likewise.
5994 (reboot_mod_CFLAGS): Likewise.
5995 (reboot_mod_LDFLAGS): Likewise.
5997 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5998 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6000 (halt_mod_SOURCES): Likewise.
6001 (reboot_mod_SOURCES): Likewise.
6003 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6004 commands/i386/pc/reboot.c by commands/reboot.c.
6005 (reboot_mod_SOURCES): Likewise.
6007 * commands/i386/pc/reboot.c: merge this file ...
6009 * commands/ieee1275/reboot.c: ... and this file ...
6011 * commands/reboot.c: ... to this file.
6012 Add some precompiler directive to include the correct header for
6015 * commands/ieee1275/halt.c: move this file ...
6017 * commands/halt.c: ... to here.
6018 Add some precompiler directive to include the correct header for
6021 * include/grub/efi/efi.h (grub_reboot): New function declaration.
6022 (grub_halt): Likewise.
6024 * kern/efi/efi.c (grub_reboot): New function.
6025 (grub_halt): Likewise.
6027 2008-02-12 Robert Millan <rmh@aybabtu.com>
6029 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6030 /dev (like it is done for /dev/mapper). This doesn't provide support
6031 for EVMS, but at least it is now easy to identify the problem when it
6034 2008-02-11 Robert Millan <rmh@aybabtu.com>
6036 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6037 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6038 comparing it with -1, not 0.
6040 2008-02-10 Robert Millan <rmh@aybabtu.com>
6042 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6045 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6047 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6048 `disk/lvm.c' to the end of the list.
6049 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6050 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6052 2008-02-10 Robert Millan <rmh@aybabtu.com>
6054 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
6055 grub_print_error() instead. This will let user know why we're entering
6057 Based on suggestions from Sam Morris.
6059 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
6061 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6062 on remaining N args, instead of "--" arg N times.
6064 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
6066 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6067 (fill_with_default_glyph): Changed to use unknown_glyph for fill
6068 pattern for unknown glyphs.
6070 2008-02-09 Robert Millan <rmh@aybabtu.com>
6072 * configure.ac: Probe for `help2man'.
6073 * Makefile.in (builddir): New variable.
6074 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6075 or otherwise add a few flags/options to it.
6076 (install-local): For every executable utility or script that is
6077 installed, invoke $(HELP2MAN) to install a manpage based on --help
6080 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6081 that it doesn't prevent --help from working in build tree.
6083 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6084 with `bug-grub@gnu.org'.
6085 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6086 * util/update-grub.in (usage): New function.
6087 Implement proper argument check, with support for --help and --version
6088 (as well as existing -y).
6090 2008-02-09 Christian Franke <franke@computer.org>
6092 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6093 avoid overwriting previous output.
6094 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6096 2008-02-09 Robert Millan <rmh@aybabtu.com>
6098 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6101 2008-02-09 Robert Millan <rmh@aybabtu.com>
6103 * commands/sleep.c: New file.
6104 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6105 (sleep_mod_SOURCES): New variable.
6106 (sleep_mod_CFLAGS): Likewise.
6107 (sleep_mod_LDFLAGS): Likewise.
6109 2008-02-09 Robert Millan <rmh@aybabtu.com>
6111 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6112 situations in which we can deduce the RAID size and the superblock
6115 2008-02-09 Robert Millan <rmh@aybabtu.com>
6117 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
6118 and return a grub_diskmemberlist_t composed of LVM physical volumes.
6119 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6121 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
6122 and return a grub_diskmemberlist_t composed of physical array members.
6123 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6125 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6127 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6128 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6129 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6131 * util/grub-probe.c (probe): Move partmap probing code from here ...
6132 (probe_partmap): ... to here.
6133 (probe): Use probe_partmap() once for the disk we're probing, and
6134 additionally, when such disk contains a memberlist() struct member,
6135 once for each disk that is contained in the structure returned by
6138 2008-02-09 Robert Millan <rmh@aybabtu.com>
6140 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6141 environment variable to 'all' in order to obtain debug output from
6143 * util/i386/pc/grub-setup.c (main): Likewise.
6145 2008-02-08 Robert Millan <rmh@aybabtu.com>
6147 * disk/raid.c (grub_raid_scan_device): Check for
6148 `array->device[sb.this_disk.number]' rather than for
6149 `array->device[sb.this_disk.number]->name', since the latter is not
6150 guaranteed to be accessible.
6152 2008-02-08 Robert Millan <rmh@aybabtu.com>
6154 * disk/raid.c: Update copyright.
6155 * fs/cpio.c: Likewise.
6156 * include/grub/raid.h: Likewise.
6157 * loader/i386/pc/multiboot.c: Likewise.
6158 * util/hostfs.c: Likewise.
6160 2008-02-08 Robert Millan <rmh@aybabtu.com>
6162 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6163 to a grub_disk_t array.
6164 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6166 (grub_raid_scan_device): Replace `device[x].name' accesses with
6167 `device[x]->name'. Simplify initialization of `array->device[x]'.
6169 2008-02-08 Robert Millan <rmh@aybabtu.com>
6171 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6172 grub_dprintf() calls.
6173 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6176 2008-02-07 Christian Franke <franke@computer.org>
6178 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6179 instead of fseek and ftell to support large files.
6180 (grub_hostfs_read): Likewise.
6182 2008-02-07 Robert Millan <rmh@aybabtu.com>
6184 Patch from Jeroen Dekkers.
6185 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
6186 failure, since successfully reading all array members might not be
6189 2008-02-06 Robert Millan <rmh@aybabtu.com>
6191 * util/grub-probe.c (probe): Simplify partmap probing (with the
6192 assumption that the first word up to the underscore equals to
6195 2008-02-06 Christian Franke <franke@computer.org>
6197 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6198 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6199 last block of a cpio or tar stream.
6200 Check for "TRAILER!!!" instead of any empty data
6201 block to detect last block of a cpio stream.
6202 (grub_cpio_dir): Fix constness of variable np.
6203 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6204 cpio or tar trailer is detected. This fixes a crash
6205 on open of a non existing file.
6207 2008-02-05 Bean <bean123ch@gmail.com>
6209 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6211 (grub_multiboot_load_elf64): Likewise.
6212 (grub_multiboot): Initialize mbi structure.
6214 * util/grub-fstest.c: Don't include unused header file script.h.
6216 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
6218 (grub_fstest_SOURCES): Likewise.
6220 2008-02-05 Robert Millan <rmh@aybabtu.com>
6222 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6223 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6224 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6225 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6227 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6228 (translation_table): Replace hardcoded values with macros
6229 provided by `<grub/term.h>'.
6231 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6232 (keyboard_map): Correct/add a few values, with macros provided
6234 (keyboard_map_shift): Zero values that don't differ from their
6235 `keyboard_map' equivalents.
6236 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6237 Discard the second scan code that is always sent by Caps lock.
6238 Only use `keyboard_map_shift' when it provides a non-zero value,
6239 otherwise fallback to `keyboard_map'.
6241 2008-02-04 Bean <bean123ch@gmail.com>
6243 * Makefile.in (enable_grub_fstest): New variable.
6245 * conf/common.rmk (grub_fstest_init.lst): New rule.
6246 (grub_fstest_init.h): Likewise.
6247 (grub_fstest_init.c): Likewise.
6248 (util/grub-fstest.c_DEPENDENCIES): New variable.
6249 (grub_fstest_SOURCES): Likewise.
6251 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6253 * util/grub-fstest.c: New file.
6255 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6257 Make grub-setup handle a separate root device.
6259 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6260 so that the root device can be compared with the destination
6262 When embedding the core image, if the root and destination devices
6263 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6265 When not embedding, set ROOT_DRIVE to 0xFF.
6267 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6269 Add support for having a grub directory in a different drive. This
6270 is still only the data handling part.
6272 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6273 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6274 (grub_root_drive): New variable.
6276 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6277 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6278 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6281 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6283 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6285 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6287 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6288 is bogus, because PXE booting does not specify any drive
6291 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6292 am not sure if this is really correct.
6294 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6295 is always identical to the boot drive when booting from a CD.
6297 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6299 (root_drive): New variable.
6300 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6301 (setup_sectors): Push %dx right after popping it, because %dh will
6303 (copy_buffer): Restore %dx.
6305 2008-02-03 Robert Millan <rmh@aybabtu.com>
6307 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6308 use `cdboot.img' for cdrom images.
6310 2008-02-03 Robert Millan <rmh@aybabtu.com>
6312 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6313 only setup gfxterm when `font' command has succeeded.
6315 2008-02-03 Robert Millan <rmh@aybabtu.com>
6317 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6318 (grub_rescue_cmd_multiboot_loader)
6319 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6321 2008-02-03 Pavel Roskin <proski@gnu.org>
6323 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
6324 %edx and %esi from stack only after grub_gate_a20() is called.
6325 grub_gate_a20() clobbers %edx.
6327 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6329 * configure.ac (AC_INIT): Bumped to 1.96.
6331 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6332 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6333 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6334 video/readers/png.c.
6336 2008-02-03 Bean <bean123ch@gmail.com>
6338 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6339 (cdboot_img_SOURCES): New variable.
6340 (cdboot_img_ASFLAGS): New variable.
6341 (cdboot_img_LDFLAGS): New variable.
6343 * boot/i386/pc/cdboot.S: New file.
6345 * disk/i386/pc/biosdisk.c (cd_start): New variable.
6346 (cd_count): Likewise.
6347 (grub_biosdisk_get_drive): Add support for cd device.
6348 (grub_biosdisk_call_hook): Likewise.
6349 (grub_biosdisk_iterate): Likewise.
6350 (grub_biosdisk_open): Likewise.
6351 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
6352 (grub_biosdisk_rw): Support reading from cd device.
6353 (GRUB_MOD_INIT): Iterate cd devices.
6355 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
6356 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
6357 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
6359 * kern/i386/pc/init.c (make_install_device): Check for cd device.
6361 2008-02-02 Robert Millan <rmh@aybabtu.com>
6363 * commands/read.c: New file.
6364 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
6365 (read_mod_SOURCES): New variable.
6366 (read_mod_CFLAGS): Likewise.
6367 (read_mod_LDFLAGS): Likewise.
6369 2008-02-02 Robert Millan <rmh@aybabtu.com>
6371 * normal/main.c (grub_normal_execute): Check for `menu->size' when
6372 determining whether menu has to be displayed.
6374 2008-02-02 Marco Gerards <marco@gnu.org>
6376 * bus/pci.c: New file.
6378 * include/grub/pci.h: Likewise.
6380 * include/grub/i386/pc/pci.h: Likewise.
6382 * commands/lspci.c: Likewise.
6384 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
6386 (pci_mod_SOURCES): New variable.
6387 (pci_mod_CFLAGS): Likewise.
6388 (pci_mod_LDFLAGS): Likewise.
6389 (lspci_mod_SOURCES): Likewise.
6390 (lspci_mod_CFLAGS): Likewise.
6391 (lspci_mod_LDFLAGS): Likewise.
6393 2008-02-02 Bean <bean123ch@gmail.com>
6395 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
6396 (grub_ufs_get_file_block): Fix indirect block calculation problem.
6398 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6399 (grub_xfs_btree_node): New structure.
6400 (grub_xfs_btree_root): New structure.
6401 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6402 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6403 (GRUB_XFS_EXTENT_BLOCK): Likewise.
6404 (GRUB_XFS_EXTENT_SIZE): Likewise.
6405 (grub_xfs_read_block): Support btree format type.
6406 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6407 Use directory block as basic unit.
6409 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6411 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6412 __attribute__ ((__regparm__ (1))).
6414 2008-02-01 Robert Millan <rmh@aybabtu.com>
6416 Correct a mistake in previous commit.
6418 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6420 (normal/command.c_DEPENDENCIES): New variable.
6422 2008-02-01 Robert Millan <rmh@aybabtu.com>
6424 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6426 (normal/command.c_DEPENDENCIES): New variable.
6427 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6428 * conf/i386-ieee1275.rmk: Likewise.
6429 * conf/i386-linuxbios.rmk: Likewise.
6430 * conf/i386-pc.rmk: Likewise.
6431 * conf/sparc64-ieee1275.rmk: Likewise.
6432 * conf/powerpc-ieee1275.rmk: Likewise.
6433 (grub_emu_SOURCES): Add `fs/fshelp.c'.
6435 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6437 2008-02-01 Robert Millan <rmh@aybabtu.com>
6439 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6440 call at beginning of function.
6442 2008-01-31 Pavel Roskin <proski@gnu.org>
6444 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6445 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6446 (grub_mkrescue_SOURCES): Likewise.
6447 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6449 2008-01-30 Robert Millan <rmh@aybabtu.com>
6451 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6452 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6453 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6454 (grub_probe_SOURCES): ... to here.
6456 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6457 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6458 * conf/i386-ieee1275.rmk: Likewise.
6459 * conf/i386-linuxbios.rmk: Likewise.
6460 * conf/powerpc-ieee1275.rmk: Likewise.
6462 2008-01-30 Tristan Gingold <gingold@free.fr>
6464 * kern/rescue.c: Silently accept empty lines.
6466 2008-01-29 Bean <bean123ch@gmail.com>
6468 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6469 (real_code_2): Code cleanup and change comment style.
6470 (move_memory): Avoid using 32-bit address mode.
6472 2008-01-29 Bean <bean123ch@gmail.com>
6474 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6475 (png_mod_SOURCES): New variable.
6476 (png_mod_CFLAGS): Likewise.
6477 (png_mod_LDFLAGS): Likewise.
6479 * video/readers/png.c: New file.
6481 2008-01-28 Robert Millan <rmh@aybabtu.com>
6483 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6484 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6485 `ifndef GRUB_MOD_GAP' hack.
6486 * util/elf/grub-mkimage.c (add_segments): Likewise.
6488 2008-01-27 Robert Millan <rmh@aybabtu.com>
6490 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6491 `GRUB_MOD_GAP' for platforms in which it's not defined.
6492 * util/elf/grub-mkimage.c (add_segments): Likewise.
6494 2008-01-27 Robert Millan <rmh@aybabtu.com>
6496 Get grub-emu to build again (including parallel builds).
6498 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6500 (util/grub-emu.c_DEPENDENCIES): ... this, ...
6501 (normal/execute.c_DEPENDENCIES): ... this, ...
6502 (grub-emu_DEPENDENCIES): ... and this.
6504 * conf/i386-efi.rmk: Likewise.
6505 * conf/i386-linuxbios.rmk: Likewise.
6506 * conf/i386-ieee1275.rmk: Likewise.
6507 * conf/powerpc-ieee1275.rmk: Likewise.
6508 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6510 2008-01-27 Robert Millan <rmh@aybabtu.com>
6512 * NEWS: Add a few items.
6514 2008-01-27 Robert Millan <rmh@aybabtu.com>
6516 Fix parallel builds with grub-emu. Based on earlier commit for
6517 grub-probe and grub-setup.
6519 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6520 (util/grub-emu.c_DEPENDENCIES): ... this.
6521 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6522 (util/grub-emu.c_DEPENDENCIES): ... this.
6523 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6524 (util/grub-emu.c_DEPENDENCIES): ... this.
6525 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6526 (util/grub-emu.c_DEPENDENCIES): ... this.
6527 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6528 (util/grub-emu.c_DEPENDENCIES): ... this.
6530 2008-01-27 Pavel Roskin <proski@gnu.org>
6532 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6533 to create a gap between _end and the modules added to the image
6534 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
6535 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6536 * util/elf/grub-mkimage.c (add_segments): Likewise.
6538 2008-01-26 Pavel Roskin <proski@gnu.org>
6540 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6541 just return an error.
6543 2008-01-26 Bean <bean123ch@gmail.com>
6545 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6546 (grub_reiserfs_get_item): Save offset of the next item.
6547 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6549 2008-01-25 Robert Millan <rmh@aybabtu.com>
6551 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6552 make all filesystem sources appear together (possibly fixing omissions
6554 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6555 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6556 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6557 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6559 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
6561 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6562 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6563 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6564 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6566 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6567 (probe): Add a sanity check to make sure of our ability to read
6568 requested files when probing for filesystem type.
6570 * genmk.rb: Update copyright year (2007).
6572 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6573 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6574 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6575 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6576 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6577 : Remove function prototypes.
6579 2008-01-25 Robert Millan <rmh@aybabtu.com>
6581 Revert my previous commits (based on wrong assumption of how grub_errno
6584 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6585 * kern/file.c (grub_file_open): Likewise.
6587 2008-01-24 Pavel Roskin <proski@gnu.org>
6589 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6590 that hang if GRUB tries to setup colors.
6591 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6592 colors for firmwares that don't support it.
6593 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6594 Recognize Open Hack'Ware, set flags to work around its
6597 2008-01-24 Robert Millan <rmh@aybabtu.com>
6599 * kern/file.c (grub_file_open): Do not account previous failures of
6600 unrelated functions when grub_errno is checked for.
6601 Reported by Oleg Strikov.
6603 2008-01-24 Bean <bean123ch@gmail.com>
6605 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6606 (grub_ufs_sblock): New member volume name.
6607 (grub_ufs_find_file): Fix string copy bug.
6608 (grub_ufs_label): Implement this function properly.
6610 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6611 (grub_hfs_iterate_records): Use the correct file number for extents
6612 and catalog file. Fix problem in next index calculation.
6613 (grub_hfs_find_node): Replace recursive function call with loop.
6614 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6616 2008-01-23 Robert Millan <rmh@aybabtu.com>
6618 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6619 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6620 (grub_multiboot2_real_boot): New function prototype.
6622 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6623 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6625 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6626 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6628 2008-01-23 Robert Millan <rmh@aybabtu.com>
6630 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6631 #ifdef'ed out grub_printf().
6633 2008-01-23 Robert Millan <rmh@aybabtu.com>
6635 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6636 grub_dprintf calls, since they make "debug=all" mode unusable.
6637 (grub_console_checkkey): Likewise.
6639 2008-01-23 Robert Millan <rmh@aybabtu.com>
6641 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6642 `term/i386/pc/at_keyboard.c'.
6643 (pkglib_MODULES): Add `serial.mod'.
6644 (serial_mod_SOURCES): New variable.
6645 (serial_mod_CFLAGS): Likewise.
6646 (serial_mod_LDFLAGS): Likewise.
6648 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6649 `<grub/powerpc/ieee1275/console.h>'.
6650 (grub_keyboard_controller_init): New function prototype.
6651 (grub_console_checkkey): Likewise.
6652 (grub_console_getkey): Likewise.
6654 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6657 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6658 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6660 2008-01-23 Robert Millan <rmh@aybabtu.com>
6662 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6663 present, "(memdisk)/boot/grub" becomes the default prefix.
6665 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6666 a memdisk tarball with all the modules. Add --overlay=DIR option that
6667 allows users to overlay additional files into the image.
6669 2008-01-23 Robert Millan <rmh@aybabtu.com>
6671 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6672 and `machine/memory.h'.
6673 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6674 (_multiboot_mod_SOURCES): New variable.
6675 (_multiboot_mod_CFLAGS): Likewise.
6676 (_multiboot_mod_LDFLAGS): Likewise.
6677 (multiboot_mod_SOURCES): Likewise.
6678 (multiboot_mod_CFLAGS): Likewise.
6679 (multiboot_mod_LDFLAGS): Likewise.
6681 * include/grub/i386/ieee1275/loader.h: New file.
6683 * include/grub/i386/ieee1275/machine.h: Likewise.
6685 * include/grub/i386/ieee1275/memory.h: Likewise.
6687 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6688 variable declaration.
6689 (grub_os_area_size): Likewise.
6691 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6692 (grub_lower_mem, grub_upper_mem): New variables.
6693 (grub_stop_floppy): New function (just to make
6694 grub_multiboot2_real_boot() happy).
6696 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6697 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6698 (grub_stop): New function.
6699 Include `"../realmode.S"' and `"../loader.S"'.
6701 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6702 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6704 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6705 rely on grub_multiboot2_real_boot() for final boot.
6707 2008-01-22 Robert Millan <rmh@aybabtu.com>
6709 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6710 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6711 device that doesn't look like an SD card.
6712 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6713 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6714 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6715 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6718 2008-01-22 Robert Millan <rmh@aybabtu.com>
6720 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6721 avoid claiming over our own code.
6723 2008-01-22 Bean <bean123ch@gmail.com>
6725 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6726 (jpeg_mod_SOURCES): New variable.
6727 (jpeg_mod_CFLAGS): Likewise.
6728 (jpeg_mod_LDFLAGS): Likewise.
6730 * video/readers/jpeg.c : New file.
6732 2008-01-22 Bean <bean123ch@gmail.com>
6734 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6735 there are no more items.
6737 2008-01-21 Robert Millan <rmh@aybabtu.com>
6739 * kern/mm.c (grub_mm_init_region): Improve debug message.
6741 2008-01-21 Robert Millan <rmh@aybabtu.com>
6743 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6744 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6746 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6748 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6749 Indicates start of upper memory.
6750 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6751 (generate_image): Abort when image size is big enough to corrupt
6754 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6755 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6756 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6757 instead of hardcoding 0xA0000.
6758 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6759 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6760 instead of hardcoding 0xA0000.
6762 2008-01-21 Robert Millan <rmh@aybabtu.com>
6764 * disk/memdisk.c (memdisk_size): New variable.
6765 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6767 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6768 image to dynamic memory.
6769 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6770 `memdisk_size'. Free memdisk block.
6772 2008-01-21 Robert Millan <rmh@aybabtu.com>
6774 Fix detection of very small filesystems (like tar).
6776 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6777 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6778 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6779 a problem with this disk).
6781 2008-01-21 Robert Millan <rmh@aybabtu.com>
6783 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6784 on grub_biosdisk_rw_standard() error.
6786 2008-01-21 Robert Millan <rmh@aybabtu.com>
6788 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6790 * kern/elf.c: Likewise.
6791 * kern/ieee1275/ieee1275.c: Likewise.
6792 * kern/powerpc/ieee1275/openfw.c: Likewise.
6793 * term/ieee1275/ofconsole.c: Likewise.
6795 2008-01-21 Robert Millan <rmh@aybabtu.com>
6797 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6799 * include/grub/kernel.h (grub_arch_memdisk_addr)
6800 (grub_arch_memdisk_size): Moved from here ...
6802 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6803 (grub_arch_memdisk_size): ... to here.
6805 2008-01-21 Robert Millan <rmh@aybabtu.com>
6807 Mostly based on bugfix from Bean.
6809 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6810 attribute with hook() parameter.
6811 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6813 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6814 attribute with hook() parameter.
6815 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6818 2008-01-21 Robert Millan <rmh@aybabtu.com>
6820 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6821 (pkglib_MODULES): Add `memdisk.mod'.
6822 (memdisk_mod_SOURCES): New variable.
6823 (memdisk_mod_CFLAGS): Likewise.
6824 (memdisk_mod_LDFLAGS): Likewise.
6826 * disk/memdisk.c: New file.
6828 * include/grub/disk.h (grub_disk_dev_id): Add
6829 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6831 * include/grub/i386/pc/kernel.h
6832 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6833 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6834 (grub_kernel_image_size): New variable declaration.
6835 (grub_total_module_size): Likewise.
6836 (grub_memdisk_image_size): Likewise.
6838 * include/grub/i386/pc/memory.h
6839 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6841 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6842 (grub_arch_memdisk_addr): New variable declaration.
6843 (grub_arch_memdisk_size): Likewise.
6845 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6846 (grub_arch_memdisk_size): Likewise.
6848 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6849 (codestart): Replace hardcoded `0x100000' with
6850 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6852 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6853 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6854 not NULL, append the contents of the file it refers to, at the end of
6855 the compressed kernel image. Initialize `grub_memdisk_image_size'
6856 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6857 (options): Add "memdisk"|'m' option.
6858 (main): Parse --memdisk|-m option, and pass user-provided path as
6859 parameter to generate_image().
6861 2008-01-20 Robert Millan <rmh@aybabtu.com>
6863 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6864 grub_dprintf() calls from here ...
6865 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6867 2008-01-20 Robert Millan <rmh@aybabtu.com>
6869 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6871 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6873 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6874 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6875 `GRUB_IEEE1275_FLAG_REAL_MODE'.
6876 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6878 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6879 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6881 2008-01-19 Robert Millan <rmh@aybabtu.com>
6883 Get rid of confusing function (superseded by
6884 `grub_ieee1275_get_integer_property')
6885 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6887 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6889 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6890 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
6891 in native endianness from grub_ieee1275_get_integer_property().
6893 2008-01-19 Robert Millan <rmh@aybabtu.com>
6895 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6896 command after "shut-down", since implementations differ on which
6897 the command for halt is.
6899 2008-01-19 Robert Millan <rmh@aybabtu.com>
6901 * include/grub/i386/linuxbios/console.h: Add header protection.
6902 (grub_keyboard_controller_init): New function prototype.
6903 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6904 (KEYBOARD_COMMAND_READ): Likewise.
6905 (KEYBOARD_COMMAND_WRITE): Likewise.
6906 (KEYBOARD_SCANCODE_SET1): Likewise.
6907 (grub_keyboard_controller_write): New function.
6908 (grub_keyboard_controller_read): Likewise.
6909 (grub_keyboard_controller_init): Likewise.
6911 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6912 (grub_console_init): On coreboot/LinuxBIOS, call
6913 grub_keyboard_controller_init().
6915 2008-01-19 Robert Millan <rmh@aybabtu.com>
6917 PowerPC changes provided by Pavel Roskin.
6919 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6920 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6921 don't rely on cmain() doing it.
6922 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6923 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6925 2008-01-16 Robert Millan <rmh@aybabtu.com>
6927 * include/grub/i386/linuxbios/memory.h
6928 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6929 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6930 receive `table_header' as argument. Instead, probe for it in the
6931 known memory ranges where it can be present.
6932 (grub_available_iterate): Do not pass a fixed `table_header' address
6933 to grub_linuxbios_table_iterate().
6935 2008-01-15 Robert Millan <rmh@aybabtu.com>
6937 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6938 * conf/i386-ieee1275.rmk: New file.
6939 * include/grub/i386/ieee1275/console.h: Likewise.
6940 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6941 * include/grub/i386/ieee1275/kernel.h: Likewise.
6942 * include/grub/i386/ieee1275/time.h: Likewise.
6943 * kern/i386/ieee1275/init.c: Likewise.
6944 * kern/i386/ieee1275/startup.S: Likewise.
6946 2008-01-15 Robert Millan <rmh@aybabtu.com>
6948 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6949 when pointers are 32-bit (but still do set it to one when they are
6952 2008-01-15 Robert Millan <rmh@aybabtu.com>
6954 * include/grub/ieee1275/ieee1275.h
6955 (grub_ieee1275_get_integer_property): New function prototype.
6957 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6958 (grub_ieee1275_get_integer_property): New function. Wraps around
6959 grub_ieee1275_get_property() to handle endianness.
6961 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6962 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6964 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6965 (grub_map): Likewise.
6966 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6968 2008-01-15 Bean <bean123ch@gmail.com>
6970 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6971 (grub_script_execute_cmdline): Reset grub_errno.
6973 * normal/main.c (read_config_file): Reset grub_errno.
6975 * normal/parse.y (script_init): New.
6976 (script): Move function and menuentry here.
6978 (command): Add delimiter at the end of command.
6979 (commands): Adjust to match the new command.
6980 (commandblock): Remove grub_script_lexer_record_start.
6981 (menuentry): Add grub_script_lexer_record_start, use the new commands.
6982 (if): Use the new commands.
6984 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6986 2008-01-15 Robert Millan <rmh@aybabtu.com>
6988 * normal/menu.c (run_menu): Move timeout message from here ...
6989 (print_timeout): ... to here.
6990 (run_menu): Use print_timeout() once during initial draw to print
6991 the whole message, and again in every clock tick to update only
6992 the number of seconds.
6994 2008-01-15 Robert Millan <rmh@aybabtu.com>
6996 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6997 actual size of `available' from grub_ieee1275_get_property(), and
6998 restrict parsing to that bound.
7000 2008-01-15 Christian Franke <franke@computer.org>
7002 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7003 (argp_program_version): Remove variable.
7004 (argp_program_bug_address): Likewise.
7005 (options): Convert from struct argp_option to struct option.
7006 (struct arguments): Remove.
7007 (parse_opt): Remove.
7008 (usage): New function.
7009 (main): Replace struct args members by simple variables.
7010 Replace argp_parse() by getopt_long().
7011 Add switch to evaluate options.
7012 Add missing "(...)" around root_dev in prefix string.
7014 2008-01-14 Robert Millan <rmh@aybabtu.com>
7016 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7017 for grub_ieee1275_exit(), in order to improve portability.
7019 2008-01-14 Robert Millan <rmh@aybabtu.com>
7021 * util/grub.d/10_linux.in (prefix): Define.
7022 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
7024 2008-01-13 Pavel Roskin <proski@gnu.org>
7026 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7027 grub_errno if no errors have been detected.
7029 2008-01-12 Robert Millan <rmh@aybabtu.com>
7031 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7032 (grub_util_get_dev_abstraction): New function prototype.
7034 * util/getroot.c: Include `<grub/util/getroot.h>'
7035 (grub_util_get_grub_dev): Move detection of abstraction type to ...
7036 (grub_util_get_dev_abstraction): ... here (new function).
7038 * util/grub-probe.c: Convert PRINT_* to an enum. Add
7039 `PRINT_ABSTRACTION'.
7040 (probe): Probe for abstraction type when requested.
7041 (main): Understand `--target=abstraction'.
7043 * util/i386/efi/grub-install.in: Add abstraction module to core
7044 image when it is found to be necessary.
7045 * util/i386/pc/grub-install.in: Likewise.
7046 * util/powerpc/ieee1275/grub-install.in: Likewise.
7048 * util/update-grub_lib.in (font_path): Return system path without
7049 converting to GRUB path.
7050 * util/update-grub.in: Convert system path returned by font_path()
7051 to a GRUB path. Use `grub-probe -t abstraction' to determine what
7052 abstraction module is needed for loading fonts (if any). Export
7053 that as `GRUB_PRELOAD_MODULES'.
7054 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7057 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
7059 Remove some unused code from reiserfs.
7061 * fs/reiserfs.c (struct grub_reiserfs_key)
7062 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7063 (struct grub_reiserfs_node_body): Removed.
7064 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7066 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7068 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7070 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7072 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7074 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7076 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7077 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7078 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7080 2008-01-10 Robert Millan <rmh@aybabtu.com>
7082 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7083 Determines if a file is garbage left by packaging systems, etc.
7084 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7085 for processing /etc/grub.d scripts.
7086 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7087 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7088 as a condition for processing Linux images.
7090 2008-01-10 Pavel Roskin <proski@gnu.org>
7092 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7093 to compile reiserfs.c on PowerPC.
7095 2008-01-10 Robert Millan <rmh@aybabtu.com>
7097 * kern/device.c (grub_device_iterate): Do not abort device iteration
7098 when one of the devices cannot be opened.
7099 * kern/disk.c (grub_disk_open): Do not account previous failures of
7100 unrelated functions when grub_errno is checked for.
7102 2008-01-08 Robert Millan <rmh@aybabtu.com>
7104 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7105 `! grub_linux_is_bzimage', change order of address comparison to make
7106 it more intuitive, and improve "too big zImage" error message.
7108 2008-01-08 Robert Millan <rmh@aybabtu.com>
7110 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7111 `$(update-grub_DATA)'.
7112 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7115 2008-01-07 Robert Millan <rmh@aybabtu.com>
7117 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7118 which instruction is modified by grub-setup during installation
7119 (since it wasn't obvious by only looking at this file).
7121 2008-01-07 Robert Millan <rmh@aybabtu.com>
7123 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
7124 listing actual TODO items.
7126 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7128 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7130 (grub_reiserfs_get_key_offset): Likewise.
7131 (grub_reiserfs_set_key_offset): Likewise.
7132 (grub_reiserfs_set_key_type): Likewise.
7133 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
7135 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7136 better to remove the bitfield version completely.
7138 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7140 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7141 allocated from the heap, due to the fshelp implementation.
7142 (grub_reiserfs_dir): Free NODE, due to the same reason.
7144 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7146 Mostly from Vincent Pelletier:
7148 * fs/reiserfs.c: New file.
7150 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7151 (reiserfs_mod_SOURCES): New variable.
7152 (reiserfs_mod_CFLAGS): Likewise.
7153 (reiserfs_mod_LDFLAGS): Likewise.
7155 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7156 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7157 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7160 2008-01-06 Robert Millan <rmh@aybabtu.com>
7162 * normal/color.c: Remove `<grub/env.h>'.
7164 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7166 * include/grub/normal.h: Include <grub/env.h>.
7168 2008-01-05 Robert Millan <rmh@aybabtu.com>
7170 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7171 usage example with `(hd0,1)'.
7172 Reported by Samuel Thibault.
7174 2008-01-05 Robert Millan <rmh@aybabtu.com>
7176 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7177 (grub_linux_boot_zimage): Rename to ...
7178 (grub_linux_boot): ... this.
7179 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7180 (grub_linux_boot_zimage): Conditionalize zImage copy.
7182 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7183 (grub_linux_boot_bzimage): Remove prototype.
7184 (grub_linux_boot_zimage): Rename to ...
7185 (grub_linux_boot): ... this.
7187 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7188 (grub_linux_boot): Remove function.
7190 2008-01-05 Robert Millan <rmh@aybabtu.com>
7192 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7193 (grub_env_write_color_highlight): Likewise.
7194 (grub_wait_after_message): Likewise.
7196 * normal/color.c: New file.
7198 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7199 (normal_mod_DEPENDENCIES): Likewise.
7201 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7202 (normal_mod_DEPENDENCIES): Likewise.
7204 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7205 (normal_mod_DEPENDENCIES): Likewise.
7207 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7208 (normal_mod_DEPENDENCIES): Likewise.
7210 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7211 for waiting after a message is printed.
7212 * normal/main.c (read_config_file): Likewise.
7213 (grub_normal_init): Register grub_env_write_color_normal() and
7214 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7215 `color_highlight' variables as global.
7217 * normal/menu.c (grub_wait_after_message): New function.
7218 (grub_color_menu_normal): New variable. Replaces ...
7219 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7220 (grub_color_menu_highlight): New variable. Replaces ...
7221 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7222 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7223 `GRUB_TERM_COLOR_STANDARD'.
7224 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7225 `normal_code' and `highlight_code' to `old_color_normal' and
7226 `old_color_highlight', respectively.
7227 (grub_menu_init_page): Update colors when drawing the menu, based on
7228 `menu_color_normal' and `menu_color_highlight' variables.
7229 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7230 a message is printed.
7232 2008-01-05 Robert Millan <rmh@aybabtu.com>
7234 * kern/env.c (grub_env_context_open): Propagate hooks for global
7235 variables to new context.
7237 * kern/main.c (grub_set_root_dev): Export `root' variable.
7239 2008-01-05 Robert Millan <rmh@aybabtu.com>
7241 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
7242 discs unconditionally, since udev and others have options to provide
7245 2008-01-05 Robert Millan <rmh@aybabtu.com>
7247 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7249 2008-01-04 Christian Franke <franke@computer.org>
7251 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7254 2008-01-03 Pavel Roskin <proski@gnu.org>
7256 * kern/i386/linuxbios/init.c: Put "void" to all function
7257 declarations with no arguments.
7258 * kern/powerpc/ieee1275/init.c: Likewise.
7259 * term/i386/pc/at_keyboard.c: Likewise.
7260 * term/i386/pc/vga_text.c: Likewise.
7261 * util/grub-mkdevicemap.c: Likewise.
7263 2008-01-02 Robert Millan <rmh@aybabtu.com>
7265 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7266 message when loaded image is out of bounds.
7267 (grub_multiboot_load_elf64): Likewise.
7269 2008-01-02 Pavel Roskin <proski@gnu.org>
7271 * util/grub.d/10_linux.in: Try version without ".old" when
7272 looking for initrd. It's better to use initrd from the newer
7273 kernel of the same version than no initrd at all.
7275 2008-01-01 Robert Millan <rmh@aybabtu.com>
7277 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7279 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7281 * include/grub/video.h: Added grub_video_unmap_color and
7282 grub_video_get_active_render_target.
7283 (grub_video_adapter): Added unmap_color and get_active_render_target.
7285 * video/video.c: Added grub_video_unmap_color and
7286 grub_video_get_active_render_target.
7287 (grub_video_get_info): Changed method to accept NULL pointer as an
7288 argument to allow detection of active video adapter.
7290 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7291 grub_video_vbe_unmap_color_int.
7292 Added grub_video_vbe_unmap_color and
7293 grub_video_vbe_get_active_render_target.
7294 (grub_video_vbe_adapter): Added unmap_color and
7295 get_active_render_target.
7297 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
7298 with grub_video_vbe_unmap_color_int.
7300 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7301 (DEFAULT_NORMAL_COLOR): Likewise.
7302 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7303 (DEFAULT_FG_COLOR): Removed.
7304 (DEFAULT_BG_COLOR): Likewise.
7305 (DEFAULT_CURSOR_COLOR): Changed value.
7306 (grub_virtual_screen): Added standard_color_setting,
7307 normal_color_setting, highlight_color_setting and term_color.
7308 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7309 (bitmap_width): Added.
7310 (bitmap_height): Likewise.
7312 (set_term_color): Likewise.
7313 (grub_virtual_screen_setup): Changed to use new terminal coloring
7315 (grub_gfxterm_init): Added init for bitmap.
7316 (grub_gfxterm_fini): Added destroy for bitmap.
7317 (redraw_screen_rect): Updated to use background bitmap and new
7319 (scroll_up): Added optimization for case when there is no bitmap.
7320 (grub_gfxterm_cls): Fixed to use correct background color.
7321 (grub_virtual_screen_setcolorstate): Changed to use new terminal
7323 (grub_virtual_screen_setcolor): Likewise.
7324 (grub_virtual_screen_getcolor): Added.
7325 (grub_gfxterm_background_image_cmd): Likewise.
7326 (grub_video_term): Added setcolor and getcolor.
7327 (MOD_INIT): Added registration of background_image command.
7328 (MOD_TERM): Added unregistration for background_image command.
7330 2007-12-30 Pavel Roskin <proski@gnu.org>
7332 * loader/multiboot_loader.c: Fix multiboot command
7333 unregistration. Fix all typos in the word "multiboot".
7335 2007-12-29 Pavel Roskin <proski@gnu.org>
7337 * util/grub.d/10_linux.in: Refactor search for initrd. Add
7338 support for initrd names used in Fedora.
7340 2007-12-26 Bean <bean123ch@gmail.com>
7342 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
7343 (cpio_mod_SOURCES): New variable.
7344 (cpio_mod_CFLAGS): Likewise.
7345 (cpio_mod_LDFLAGS): Likewise.
7347 * fs/cpio.c: New file.
7349 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
7351 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7353 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7355 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7357 2007-12-25 Robert Millan <rmh@aybabtu.com>
7359 * include/grub/term.h (struct grub_term): Add `getcolor' function.
7360 (grub_getcolor): New function.
7362 * kern/term.c (grub_getcolor): New function.
7363 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
7364 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
7365 (print_entry): Set normal and highlight colors to
7366 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
7367 respectively, before printing and restore them to old
7369 (grub_menu_init_page): Likewise. Fill an additional colored space
7370 that would otherwise be left blank.
7372 * term/efi/console.c (grub_console_getcolor): New function.
7373 (struct grub_console_term.getcolor): New variable.
7374 * term/i386/pc/console.c (grub_console_getcolor): New function.
7375 (struct grub_console_term.getcolor): New variable.
7376 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
7377 (struct grub_console_term.getcolor): New variable.
7379 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
7380 (struct grub_console_term.setcolor): Remove variable.
7381 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
7382 (struct grub_console_term.setcolor): Remove variable.
7383 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
7384 (struct grub_console_term.setcolor): Remove variable.
7385 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
7386 (struct grub_console_term.setcolor): Remove variable.
7388 2007-12-25 Robert Millan <rmh@aybabtu.com>
7390 * configure.ac: Search for possible unifont.hex locations, and
7391 define UNIFONT_HEX if found.
7393 * Makefile.in (UNIFONT_HEX): Define variable.
7394 (DATA): Rename to ...
7395 (PKGLIB): ... this. Update all users.
7396 (PKGDATA): New variable.
7397 (pkgdata_IMAGES): Rename to ...
7398 (pkglib_IMAGES): ... this. Update all users.
7399 (pkgdata_MODULES): Rename to ...
7400 (pkglib_MODULES): ... this. Update all users.
7401 (pkgdata_PROGRAMS): Rename to ...
7402 (pkglib_PROGRAMS): ... this. Update all users.
7403 (pkgdata_DATA): Rename to ...
7404 (pkglib_DATA): ... this. Update all users.
7405 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7406 (unicode.pff, ascii.pff): New rules.
7407 (all-local): Add `$(PKGDATA)' dependency.
7408 (install-local): Process `$(PKGDATA)'.
7410 * util/update-grub_lib.in (font_path): Search for *.pff files in
7411 a few more locations, including `${pkgdata}'.
7413 2007-12-23 Robert Millan <rmh@aybabtu.com>
7415 Patch from Bean <bean123ch@gmail.com>:
7416 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7419 2007-12-21 Bean <bean123ch@gmail.com>
7421 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7422 (ntfscomp_mod_SOURCES): New variable.
7423 (ntfscomp_mod_CFLAGS): Likewise.
7424 (ntfscomp_mod_LDFLAGS): Likewise.
7426 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7427 (grub_probe_SOURCES): Likewise.
7428 (grub_emu_SOURCES): Likewise.
7430 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7431 (grub_emu_SOURCES): Likewise.
7433 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7434 (grub_emu_SOURCES): Likewise.
7436 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7437 (grub_emu_SOURCES): Likewise.
7439 * fs/ntfs.c (grub_ntfscomp_func): New variable.
7440 (read_run_list): Renamed to grub_ntfs_read_run_list.
7441 (decomp_nextvcn): Moved to ntfscomp.c.
7442 (decomp_getch): Likewise.
7443 (decomp_get16): Likewise.
7444 (decomp_block): Likewise.
7445 (read_block): Likewise.
7446 (read_data): Partially moved to ntfscomp.c.
7447 (fixup): Change unsigned to grub_uint16_t.
7448 (read_mft): Change unsigned long to grub_uint32_t.
7449 (read_attr): Likewise.
7450 (read_data): Likewise.
7451 (read_run_data): Likewise.
7452 (read_run_list): Likewise.
7453 (read_mft): Likewise.
7455 * fs/ntfscomp.c: New file.
7457 * include/grub/ntfs.h: New file.
7459 2007-12-16 Robert Millan <rmh@aybabtu.com>
7461 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7462 IDE disk check, since Linux is known to support 20 IDE disks.
7463 Reported by Colin Watson.
7465 2007-12-15 Bean <bean123ch@gmail.com>
7467 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7468 (lnxboot_img_SOURCES): New variable.
7469 (lnxboot_img_ASFLAGS): Likewise.
7470 (lnxboot_img_LDFLAGS): Likewise.
7472 * boot/i386/pc/lnxboot.S: New file.
7474 2007-11-24 Pavel Roskin <proski@gnu.org>
7476 * configure.ac: Test if '--build-id=none' is supported by the
7477 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
7478 objcopy to generate incorrect binary files (binutils
7479 2.17.50.0.18-1 as shipped by Fedora 8).
7480 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7481 linking, so that build ID doesn't break the test.
7483 2007-11-24 Pavel Roskin <proski@gnu.org>
7485 * include/grub/i386/time.h: use "void" in the argument list
7487 * include/grub/powerpc/time.h: Likewise.
7488 * include/grub/sparc64/time.h: Likewise.
7490 2007-11-18 Christian Franke <franke@computer.org>
7492 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7493 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7494 This fixes the problem that function keys did not work in grub-emu.
7496 2007-11-18 Christian Franke <franke@computer.org>
7498 * disk/host.c (grub_host_open): Remove attribute unused from
7499 name parameter. Add check for "host". This fixes the problem
7500 that grub-emu does not find partitions.
7502 2007-11-18 Christian Franke <franke@computer.org>
7504 * util/hostfs.c (is_dir): New function.
7505 (grub_hostfs_dir): Handle missing dirent.d_type case.
7506 (grub_hostfs_read): Add missing fseek().
7507 (grub_hostfs_label): Clear label pointer. This fixes a crash
7508 of grub-emu on "ls (host)".
7510 2007-11-18 Christian Franke <franke@computer.org>
7512 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7513 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7514 to 64 bit boundary by default.
7516 2007-11-18 Bean <bean123ch@gmail.com>
7518 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7519 (hexdump_mod_SOURCES): New variable.
7520 (hexdump_mod_CFLAGS): Likewise.
7521 (hexdump_mod_LDFLAGS): Likewise.
7523 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7525 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7527 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7529 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7531 * include/grub/hexdump.h: New file.
7533 * commands/hexdump.c: New file.
7535 2007-11-10 Robert Millan <rmh@aybabtu.com>
7537 * commands/i386/pc/play.c (beep_off): Switch order of arguments
7538 in grub_outb() calls.
7539 (beep_on): Likewise.
7541 2007-11-10 Christian Franke <franke@computer.org>
7543 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7544 (grub_menu_run): Likewise.
7546 2007-11-10 Robert Millan <rmh@aybabtu.com>
7548 * include/grub/i386/efi/machine.h: New file.
7549 * include/grub/i386/linuxbios/machine.h: Likewise.
7550 * include/grub/i386/pc/machine.h: Likewise.
7551 * include/grub/powerpc/ieee1275/machine.h: Likewise.
7552 * include/grub/sparc64/ieee1275/machine.h: Likewise.
7554 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7555 (serial_hw_io_addr): New variable.
7556 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7557 instead of `(unsigned short *) 0x400'.
7559 2007-11-10 Bean <bean123ch@gmail.com>
7561 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7563 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7565 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7566 (vga_mod_SOURCES): Added.
7567 (vga_mod_CFLAGS): Likewise.
7568 (vga_mod_LDFLAGS): Likewise.
7570 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7572 (set_map_mask): Likewise.
7573 (set_read_map): Likewise.
7574 (set_read_address): Likewise.
7575 (vga_font): Removed variable.
7576 (get_vga_glyph): Removed function.
7577 (invalidate_char): Likewise.
7578 (write_char): Changed to use grub_font_get_glyph() for font
7580 (grub_vga_putchar): Likewise.
7581 (grub_vga_getcharwidth): Likewise.
7583 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7585 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7587 (pxeboot_img_LDFLAGS): Likewise.
7588 (diskboot_img_LDFLAGS): Likewise.
7589 (kernel_img_LDFLAGS): Likewise.
7591 2007-11-06 Robert Millan <rmh@aybabtu.com>
7593 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7594 in grub_outb() calls.
7595 (serial_hw_init): Likewise.
7597 2007-11-05 Robert Millan <rmh@aybabtu.com>
7599 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7600 spaces. Skip non-regular files.
7602 2007-11-05 Robert Millan <rmh@aybabtu.com>
7604 * kern/disk.c (grub_disk_firmware_fini)
7605 (grub_disk_firmware_is_tainted): New variables.
7607 * include/grub/disk.h (grub_disk_firmware_fini)
7608 (grub_disk_firmware_is_tainted): Likewise.
7610 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7611 (grub_disk_biosdisk_fini): ... to here.
7612 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7613 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7614 is set. Register grub_disk_biosdisk_fini() in
7615 `grub_disk_firmware_fini'.
7617 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7618 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7619 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7620 to finish existing firmware disk interface.
7622 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7623 (ata_mod_SOURCES): New variable.
7624 (ata_mod_CFLAGS): Likewise.
7625 (ata_mod_LDFLAGS): Likewise.
7627 2007-11-05 Robert Millan <rmh@aybabtu.com>
7629 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7630 (grub_ata_wait): Reimplement using grub_millisleep().
7632 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7633 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7635 2007-11-03 Marco Gerards <marco@gnu.org>
7637 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7638 (CRTC_ADDR_PORT): New macro.
7639 (CRTC_DATA_PORT): Likewise.
7640 (CRTC_CURSOR): Likewise.
7641 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7642 (CRTC_CURSOR_ADDR_LOW): Likewise.
7643 (update_cursor): New function.
7644 (grub_console_real_putchar): Call `update_cursor'.
7645 (grub_console_gotoxy): Likewise.
7646 (grub_console_cls): Set the default color when clearing the
7648 (grub_console_setcursor): Implemented.
7650 2007-11-03 Marco Gerards <marco@gnu.org>
7652 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7654 (grub_ata_pio_write): Likewise.
7656 (grub_atapi_identify): Wait after issuing an ATA command.
7657 (grub_atapi_packet): Likewise.
7658 (grub_ata_identify): Likewise.
7659 (grub_ata_readwrite): Likewise.
7661 2007-11-03 Marco Gerards <marco@gnu.org>
7663 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7664 (grub_ata_pio_write): Likewise.
7665 (grub_ata_readwrite): Use `grub_error', instead of
7666 returning `grub_errno'.
7668 2007-11-03 Marco Gerards <marco@gnu.org>
7670 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7671 grub_ata_pio_write once for every single sector, instead of for
7674 2007-10-31 Robert Millan <rmh@aybabtu.com>
7676 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7678 * conf/i386-linuxbios.rmk: New file.
7680 * kern/i386/pc/hardware.c: Likewise.
7681 * term/i386/pc/at_keyboard.c: Likewise.
7682 * term/i386/pc/vga_text.c: Likewise.
7684 * include/grub/i386/linuxbios/boot.h: Likewise.
7685 * include/grub/i386/linuxbios/console.h: Likewise.
7686 * include/grub/i386/linuxbios/init.h: Likewise.
7687 * include/grub/i386/linuxbios/kernel.h: Likewise.
7688 * include/grub/i386/linuxbios/loader.h: Likewise.
7689 * include/grub/i386/linuxbios/memory.h: Likewise.
7690 * include/grub/i386/linuxbios/serial.h: Likewise.
7691 * include/grub/i386/linuxbios/time.h: Likewise.
7693 * kern/i386/linuxbios/init.c: Likewise.
7694 * kern/i386/linuxbios/startup.S: Likewise.
7695 * kern/i386/linuxbios/table.c: Likewise.
7697 2007-10-31 Marco Gerards <marco@gnu.org>
7699 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7700 (ata_mod_SOURCES): New variable.
7701 (ata_mod_CFLAGS): Likewise.
7702 (ata_mod_LDFLAGS): Likewise.
7704 * disk/ata.c: New file.
7706 * include/grub/disk.h (grub_disk_dev_id): Add
7707 `GRUB_DISK_DEV_ATA_ID'.
7709 2007-10-31 Robert Millan <rmh@aybabtu.com>
7711 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7712 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7714 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7715 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7717 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7720 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7722 2007-10-27 Robert Millan <rmh@aybabtu.com>
7724 * include/grub/types.h (ULONG_MAX): Define macro.
7726 2007-10-22 Robert Millan <rmh@aybabtu.com>
7728 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7730 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7732 2007-10-22 Robert Millan <rmh@aybabtu.com>
7734 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7735 (pkgdata_MODULES): Add `biosdisk.mod'.
7736 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7739 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7740 (grub_biosdisk_init): Replace with ...
7741 (GRUB_MOD_INIT(biosdisk)): ... this.
7742 (grub_biosdisk_fini): Replace with ...
7743 (GRUB_MOD_FINI(biosdisk)): ... this.
7745 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7746 (grub_machine_init): Remove call to grub_biosdisk_init().
7747 (grub_machine_fini): Remove call to grub_machine_fini().
7749 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7751 2007-10-22 Robert Millan <rmh@aybabtu.com>
7753 * include/grub/time.h: New file.
7754 * include/grub/i386/time.h: Likewise.
7755 * include/grub/powerpc/time.h: Likewise.
7756 * include/grub/sparc64/time.h: Likewise.
7758 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7760 (KERNEL_MACHINE_TIME_HEADER): ... this.
7761 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7763 (KERNEL_MACHINE_TIME_HEADER): ... this.
7764 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7766 (KERNEL_MACHINE_TIME_HEADER): ... this.
7768 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7769 (grub_millisleep): New function.
7770 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7771 (grub_millisleep): New function.
7772 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7773 Remove `grub/machine/time.h' include.
7774 (grub_millisleep): New function.
7775 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7776 Remove `grub/machine/time.h' include.
7777 (grub_millisleep): New function.
7779 * include/grub/misc.h (grub_div_roundup): New function.
7781 * kern/misc.c: Include `<grub/time.h>'.
7782 (grub_millisleep_generic): New function.
7784 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7786 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7788 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7789 `machine/time.h'. Add `time.h'.
7790 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7792 2007-10-21 Robert Millan <rmh@aybabtu.com>
7794 * include/grub/misc.h (grub_max): New function.
7796 2007-10-21 Robert Millan <rmh@aybabtu.com>
7798 * util/misc.c (grub_util_info): Call fflush() before returning.
7800 2007-10-20 Robert Millan <rmh@aybabtu.com>
7802 * genmk.rb (Image): Copy `extra_flags' from here ...
7803 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7805 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7806 to `argc' and `args' arguments.
7808 2007-10-17 Robert Millan <rmh@aybabtu.com>
7810 * kern/i386/loader.S: New file.
7812 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7813 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7814 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7815 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7816 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7817 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7818 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7819 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7820 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7821 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7822 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7823 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7824 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7825 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7827 * kern/i386/realmode.S: New file.
7829 * kern/i386/pc/startup.S (protstack): Moved from here ...
7830 * kern/i386/realmode.S (protstack)... to here.
7831 * kern/i386/pc/startup.S (gdt): Moved from here ...
7832 * kern/i386/realmode.S (gdt)... to here.
7833 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7834 * kern/i386/realmode.S (prot_to_real)... to here.
7836 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7837 `kern/i386/realmode.S'.
7839 2007-10-17 Robert Millan <rmh@aybabtu.com>
7841 * include/grub/i386/loader.h: New file.
7843 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7844 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7845 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7846 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7847 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7848 * include/grub/i386/loader.h (grub_linux_prot_size)
7849 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7850 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7851 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7852 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7854 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7856 2007-10-15 Robert Millan <rmh@aybabtu.com>
7858 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7859 filesystem when dev->disk is unset.
7860 Do probe for filesystem even when dev->disk->has_partitions is set.
7861 In case a filesystem is found, always report it.
7862 In case it isn't, if dev->disk->has_partitions is set, report that
7863 a partition table was found instead of reporting that no filesystem
7864 could be identified.
7866 2007-10-12 Robert Millan <rmh@aybabtu.com>
7868 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7869 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7871 * include/grub/types.h (grub_host_to_target16): New macro.
7872 (grub_host_to_target32): Likewise.
7873 (grub_host_to_target64): Likewise.
7874 (grub_target_to_host16): Likewise.
7875 (grub_target_to_host32): Likewise.
7876 (grub_target_to_host64): Likewise.
7878 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7880 (GRUB_MOD_ALIGN): ...this. Update all users.
7882 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7883 grub_host_to_target32.
7884 Replace grub_be_to_cpu32 with grub_target_to_host32.
7885 (load_modules): Likewise.
7886 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7887 Replace grub_be_to_cpu32 with grub_target_to_host32.
7888 Replace grub_cpu_to_be16 with grub_host_to_target16.
7889 Replace grub_cpu_to_be32 grub_host_to_target32.
7891 2007-10-12 Robert Millan <rmh@aybabtu.com>
7893 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7894 * util/elf/grub-mkimage.c: ... here.
7896 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7897 `util/powerpc/ieee1275/grub-mkimage.c'.
7899 2007-10-07 Robert Millan <rmh@aybabtu.com>
7901 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7902 and make it easier to figure out.
7903 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7904 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7905 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7906 leave us with less than HEAP_MIN_SIZE total heap.
7907 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
7909 2007-10-03 Robert Millan <rmh@aybabtu.com>
7911 * include/grub/i386/io.h: New file.
7912 * commands/i386/pc/play.c (inb): Removed.
7914 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7916 * term/i386/pc/serial.c (inb): Removed.
7918 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7920 * term/i386/pc/vga.c (inb): Removed.
7922 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7925 2007-10-02 Robert Millan <rmh@aybabtu.com>
7927 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7928 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7929 Reported by Marcin Kurek.
7931 2007-09-07 Robert Millan <rmh@aybabtu.com>
7933 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7934 SmartFirmware version updates (as released by Sven Luther), and avoid
7935 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7936 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7939 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7942 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7943 when merging two regions.
7945 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7947 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7948 * normal/completion.c (grub_normal_do_completion): Likewise.
7949 Reported by Hitoshi Ozeki.
7951 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7953 Do not use devices at boot in chainloading.
7955 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7956 (boot_part_addr): Likewise.
7957 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7958 with BOOT_DRIVE and BOOT_PART_ADDR.
7959 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7960 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7962 2007-08-29 Robert Millan <rmh@aybabtu.com>
7964 Patch from Simon Peter <dn.tlp@gmx.net>:
7965 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7966 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7967 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7968 util/i386/pc/grub-setup.c_DEPENDENCIES.
7969 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7970 util/grub-probe.c_DEPENDENCIES.
7971 * conf/powerpc-ieee1275.rmk: Likewise.
7973 2007-08-28 Robert Millan <rmh@aybabtu.com>
7975 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7976 to tell grub-mkdevicemap how to name devices.
7977 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7980 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7981 util/i386/get_disk_name.c.
7982 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7983 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7984 util/ieee1275/get_disk_name.c.
7986 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7988 * DISTLIST: Add util/i386/get_disk_name.c and
7989 util/ieee1275/get_disk_name.c.
7991 * util/grub-mkdevicemap.c: Replace device naming logic with
7992 grub_util_get_disk_name() calls.
7994 2007-08-20 Robert Millan <rmh@aybabtu.com>
7996 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7997 (so that it works for both plural and singular quantities).
7999 2007-08-05 Robert Millan <rmh@aybabtu.com>
8001 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8002 so that [xz] isn't taken into account when determining order.
8004 2007-08-02 Marco Gerards <marco@gnu.org>
8006 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8007 `include/multiboot2.h', `include/grub/elfload.h',
8008 `include/multiboot.h', `include/grub/multiboot.h',
8009 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8010 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8011 `kern/elf.c', `loader/multiboot_loader.c',
8012 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8013 `loader/i386/pc/multiboot2.c',
8014 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8015 `util/i386/pc/grub-mkrescue.in'. Remove
8016 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8017 `include/grub/i386/pc/util/biosdisk.h' and
8018 `include/grub/powerpc/ieee1275/multiboot.h'.
8020 2007-08-02 Bean <bean123ch@gmail.com>
8022 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8023 (ntfs_mod_SOURCES): New variable.
8024 (ntfs_mod_CFLAGS): Likewise.
8025 (ntfs_mod_LDFLAGS): Likewise.
8027 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8028 (grub_probe_SOURCES): Likewise.
8029 (grub_emu_SOURCES): Likewise.
8031 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8032 (grub_emu_SOURCES): Likewise.
8034 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8035 (grub_emu_SOURCES): Likewise.
8037 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8039 * fs/ntfs.c: New file.
8041 2007-08-02 Bean <bean123ch@gmail.com>
8043 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8045 * file.h (grub_file): Likewise.
8047 * fshelp.h (grub_fshelp_read_file): Likewise.
8049 * util/i386/pc/grub-setup.c (setup): Likewise.
8050 (save_first_sector): Likewise.
8051 (save_blocklists): Likewise.
8053 * fs/affs.c (grub_affs_read_file): Likewise.
8055 * fs/ext2.c (grub_ext2_read_file): Likewise.
8057 * fs/fat.c (grub_fat_read_data): Likewise.
8059 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8061 * fs/hfs.c (grub_hfs_read_file): Likewise.
8063 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8065 * fs/jfs.c (grub_jfs_read_file): Likewise.
8067 * fs/minix.c (grub_minix_read_file): Likewise.
8069 * fs/sfs.c (grub_sfs_read_file): Likewise.
8071 * fs/ufs.c (grub_ufs_read_file): Likewise.
8073 * fs/xfs.c (grub_xfs_read_file): Likewise.
8075 * command/blocklist.c (read_blocklist): Likewise.
8076 (print_blocklist): Likewise.
8078 2007-08-02 Marco Gerards <marco@gnu.org>
8080 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8083 * disk/host.c: New file.
8085 * util/hostfs.c: Likewise.
8087 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8088 return `GRUB_ERR_BAD_FS'.
8089 * fs/sfs.c (grub_sfs_mount): Likewise.
8090 * fs/xfs.c (grub_xfs_mount): Likewise.
8092 * include/grub/disk.h (enum grub_disk_dev_id): Add
8093 `GRUB_DISK_DEVICE_HOST_ID'.
8095 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8097 2007-07-24 Jerone Young <jerone@gmail.com>
8099 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
8100 modules for compilation.
8101 * conf/powerpc-ieee1275.rmk: Likewise.
8103 * include/multiboot.h: Move multiboot definitions to one file. Rename
8104 many definitions to not get grub specific.
8105 * include/multiboot2.h: Create header with multiboot 2 definitions.
8106 * include/grub/multiboot.h: Header for grub specific function
8107 prototypes and definitions.
8108 * include/grub/multiboot2.h: Likewise.
8109 * include/grub/multiboot_loader.h: Likewise.
8110 * include/grub/i386/pc/multiboot.h: Removed.
8111 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8113 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8114 and 2 to allow for one multiboot and module commands.
8115 * loader/multiboot2.c: Add multiboot2 functionality.
8116 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8117 and definition names.
8118 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8120 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8121 ieee1275 specific multiboot2 code.
8123 * kern/i386/pc/startup.S: Change headers and definition names for
8124 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8126 2007-07-22 Robert Millan <rmh@aybabtu.com>
8128 * geninitheader.sh: Process file specified in first parameter rather
8129 than hardcoding grub_modules_init.lst.
8130 * geninit.sh: Likewise. Also, construct header name dynamically rather
8131 than hardcoding grub_modules_init.h.
8133 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8134 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
8135 grub_probe_init.[ch] and grub_setup_init.[ch].
8137 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8138 grub_modules_init.h with grub_emu_init.h.
8139 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8140 grub_probe_init.[ch] files.
8141 * conf/i386-efi.rmk: Likewise.
8142 * conf/i386-pc.rmk: Likewise.
8143 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8144 grub_setup_init.[ch] files.
8146 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8147 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8148 to initialize modules rather than a list of hardcoded functions.
8149 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8150 grub_init_all() to initialize modules rather than a list of hardcoded
8153 2007-07-22 Robert Millan <rmh@aybabtu.com>
8155 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8156 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8158 2007-07-22 Robert Millan <rmh@aybabtu.com>
8160 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8161 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8162 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8163 flag when running on SmartFirmware.
8164 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8165 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8168 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8169 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8170 rather than decreasing it.
8172 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8173 there's not enough space to do it, fail in the same way as when it
8174 can't be done because there are no partitions.
8176 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8177 when nvsetenv failed.
8179 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8181 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8182 because this rule is automatically generated.
8183 (grub-mkrescue): Removed for the same reason as above.
8185 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8187 Migrate to GNU General Public License Version 3.
8189 * COPYING: Replaced with the plain text version of GPLv3.
8191 * config.guess: Updated from gnulib.
8192 * config.sub: Likewise.
8194 * geninit.sh: Output a GPLv3 copyright notice.
8195 * geninitheader.sh: Likewise.
8196 * genmodsrc.sh: Likewise.
8197 * gensymlist.sh.in: Likewise.
8199 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8200 * boot/i386/pc/diskboot.S: Likewise.
8201 * boot/i386/pc/pxeboot.S: Likewise.
8202 * commands/blocklist.c: Likewise.
8203 * commands/boot.c: Likewise.
8204 * commands/cat.c: Likewise.
8205 * commands/cmp.c: Likewise.
8206 * commands/configfile.c: Likewise.
8207 * commands/echo.c: Likewise.
8208 * commands/help.c: Likewise.
8209 * commands/ls.c: Likewise.
8210 * commands/search.c: Likewise.
8211 * commands/terminal.c: Likewise.
8212 * commands/test.c: Likewise.
8213 * commands/videotest.c: Likewise.
8214 * commands/i386/cpuid.c: Likewise.
8215 * commands/i386/pc/halt.c: Likewise.
8216 * commands/i386/pc/play.c: Likewise.
8217 * commands/i386/pc/reboot.c: Likewise.
8218 * commands/i386/pc/vbeinfo.c: Likewise.
8219 * commands/i386/pc/vbetest.c: Likewise.
8220 * commands/ieee1275/halt.c: Likewise.
8221 * commands/ieee1275/reboot.c: Likewise.
8222 * commands/ieee1275/suspend.c: Likewise.
8223 * disk/loopback.c: Likewise.
8224 * disk/lvm.c: Likewise.
8225 * disk/raid.c: Likewise.
8226 * disk/efi/efidisk.c: Likewise.
8227 * disk/i386/pc/biosdisk.c: Likewise.
8228 * disk/ieee1275/ofdisk.c: Likewise.
8229 * font/manager.c: Likewise.
8230 * fs/affs.c: Likewise.
8231 * fs/ext2.c: Likewise.
8232 * fs/fat.c: Likewise.
8233 * fs/fshelp.c: Likewise.
8234 * fs/hfs.c: Likewise.
8235 * fs/hfsplus.c: Likewise.
8236 * fs/iso9660.c: Likewise.
8237 * fs/jfs.c: Likewise.
8238 * fs/minix.c: Likewise.
8239 * fs/sfs.c: Likewise.
8240 * fs/ufs.c: Likewise.
8241 * fs/xfs.c: Likewise.
8242 * hello/hello.c: Likewise.
8243 * include/grub/acorn_filecore.h: Likewise.
8244 * include/grub/arg.h: Likewise.
8245 * include/grub/bitmap.h: Likewise.
8246 * include/grub/boot.h: Likewise.
8247 * include/grub/cache.h: Likewise.
8248 * include/grub/device.h: Likewise.
8249 * include/grub/disk.h: Likewise.
8250 * include/grub/dl.h: Likewise.
8251 * include/grub/elfload.h: Likewise.
8252 * include/grub/env.h: Likewise.
8253 * include/grub/err.h: Likewise.
8254 * include/grub/file.h: Likewise.
8255 * include/grub/font.h: Likewise.
8256 * include/grub/fs.h: Likewise.
8257 * include/grub/fshelp.h: Likewise.
8258 * include/grub/gzio.h: Likewise.
8259 * include/grub/hfs.h: Likewise.
8260 * include/grub/kernel.h: Likewise.
8261 * include/grub/loader.h: Likewise.
8262 * include/grub/lvm.h: Likewise.
8263 * include/grub/misc.h: Likewise.
8264 * include/grub/mm.h: Likewise.
8265 * include/grub/net.h: Likewise.
8266 * include/grub/normal.h: Likewise.
8267 * include/grub/parser.h: Likewise.
8268 * include/grub/partition.h: Likewise.
8269 * include/grub/pc_partition.h: Likewise.
8270 * include/grub/raid.h: Likewise.
8271 * include/grub/rescue.h: Likewise.
8272 * include/grub/script.h: Likewise.
8273 * include/grub/setjmp.h: Likewise.
8274 * include/grub/symbol.h: Likewise.
8275 * include/grub/term.h: Likewise.
8276 * include/grub/terminfo.h: Likewise.
8277 * include/grub/tparm.h: Likewise.
8278 * include/grub/types.h: Likewise.
8279 * include/grub/video.h: Likewise.
8280 * include/grub/efi/api.h: Likewise.
8281 * include/grub/efi/chainloader.h: Likewise.
8282 * include/grub/efi/console.h: Likewise.
8283 * include/grub/efi/console_control.h: Likewise.
8284 * include/grub/efi/disk.h: Likewise.
8285 * include/grub/efi/efi.h: Likewise.
8286 * include/grub/efi/pe32.h: Likewise.
8287 * include/grub/efi/time.h: Likewise.
8288 * include/grub/i386/linux.h: Likewise.
8289 * include/grub/i386/setjmp.h: Likewise.
8290 * include/grub/i386/types.h: Likewise.
8291 * include/grub/i386/efi/kernel.h: Likewise.
8292 * include/grub/i386/efi/loader.h: Likewise.
8293 * include/grub/i386/efi/time.h: Likewise.
8294 * include/grub/i386/pc/biosdisk.h: Likewise.
8295 * include/grub/i386/pc/boot.h: Likewise.
8296 * include/grub/i386/pc/chainloader.h: Likewise.
8297 * include/grub/i386/pc/console.h: Likewise.
8298 * include/grub/i386/pc/init.h: Likewise.
8299 * include/grub/i386/pc/kernel.h: Likewise.
8300 * include/grub/i386/pc/loader.h: Likewise.
8301 * include/grub/i386/pc/memory.h: Likewise.
8302 * include/grub/i386/pc/multiboot.h: Likewise.
8303 * include/grub/i386/pc/serial.h: Likewise.
8304 * include/grub/i386/pc/time.h: Likewise.
8305 * include/grub/i386/pc/vbe.h: Likewise.
8306 * include/grub/i386/pc/vbeblit.h: Likewise.
8307 * include/grub/i386/pc/vbefill.h: Likewise.
8308 * include/grub/i386/pc/vbeutil.h: Likewise.
8309 * include/grub/i386/pc/vga.h: Likewise.
8310 * include/grub/ieee1275/ieee1275.h: Likewise.
8311 * include/grub/ieee1275/ofdisk.h: Likewise.
8312 * include/grub/powerpc/libgcc.h: Likewise.
8313 * include/grub/powerpc/setjmp.h: Likewise.
8314 * include/grub/powerpc/types.h: Likewise.
8315 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8316 * include/grub/powerpc/ieee1275/console.h: Likewise.
8317 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8318 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8319 * include/grub/powerpc/ieee1275/loader.h: Likewise.
8320 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8321 * include/grub/powerpc/ieee1275/time.h: Likewise.
8322 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8323 * include/grub/sparc64/libgcc.h: Likewise.
8324 * include/grub/sparc64/setjmp.h: Likewise.
8325 * include/grub/sparc64/types.h: Likewise.
8326 * include/grub/sparc64/ieee1275/console.h: Likewise.
8327 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8328 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8329 * include/grub/sparc64/ieee1275/time.h: Likewise.
8330 * include/grub/util/biosdisk.h: Likewise.
8331 * include/grub/util/getroot.h: Likewise.
8332 * include/grub/util/lvm.h: Likewise.
8333 * include/grub/util/misc.h: Likewise.
8334 * include/grub/util/raid.h: Likewise.
8335 * include/grub/util/resolve.h: Likewise.
8336 * io/gzio.c: Likewise.
8337 * kern/device.c: Likewise.
8338 * kern/disk.c: Likewise.
8339 * kern/dl.c: Likewise.
8340 * kern/elf.c: Likewise.
8341 * kern/env.c: Likewise.
8342 * kern/err.c: Likewise.
8343 * kern/file.c: Likewise.
8344 * kern/fs.c: Likewise.
8345 * kern/loader.c: Likewise.
8346 * kern/main.c: Likewise.
8347 * kern/misc.c: Likewise.
8348 * kern/mm.c: Likewise.
8349 * kern/parser.c: Likewise.
8350 * kern/partition.c: Likewise.
8351 * kern/rescue.c: Likewise.
8352 * kern/term.c: Likewise.
8353 * kern/efi/efi.c: Likewise.
8354 * kern/efi/init.c: Likewise.
8355 * kern/efi/mm.c: Likewise.
8356 * kern/i386/dl.c: Likewise.
8357 * kern/i386/efi/init.c: Likewise.
8358 * kern/i386/efi/startup.S: Likewise.
8359 * kern/i386/pc/init.c: Likewise.
8360 * kern/i386/pc/lzo1x.S: Likewise.
8361 * kern/i386/pc/startup.S: Likewise.
8362 * kern/ieee1275/ieee1275.c: Likewise.
8363 * kern/powerpc/cache.S: Likewise.
8364 * kern/powerpc/dl.c: Likewise.
8365 * kern/powerpc/ieee1275/cmain.c: Likewise.
8366 * kern/powerpc/ieee1275/crt0.S: Likewise.
8367 * kern/powerpc/ieee1275/init.c: Likewise.
8368 * kern/powerpc/ieee1275/openfw.c: Likewise.
8369 * kern/sparc64/cache.S: Likewise.
8370 * kern/sparc64/dl.c: Likewise.
8371 * kern/sparc64/ieee1275/init.c: Likewise.
8372 * kern/sparc64/ieee1275/openfw.c: Likewise.
8373 * loader/efi/chainloader.c: Likewise.
8374 * loader/efi/chainloader_normal.c: Likewise.
8375 * loader/i386/efi/linux.c: Likewise.
8376 * loader/i386/efi/linux_normal.c: Likewise.
8377 * loader/i386/pc/chainloader.c: Likewise.
8378 * loader/i386/pc/chainloader_normal.c: Likewise.
8379 * loader/i386/pc/linux.c: Likewise.
8380 * loader/i386/pc/linux_normal.c: Likewise.
8381 * loader/i386/pc/multiboot.c: Likewise.
8382 * loader/i386/pc/multiboot_normal.c: Likewise.
8383 * loader/powerpc/ieee1275/linux.c: Likewise.
8384 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8385 * normal/arg.c: Likewise.
8386 * normal/cmdline.c: Likewise.
8387 * normal/command.c: Likewise.
8388 * normal/completion.c: Likewise.
8389 * normal/execute.c: Likewise.
8390 * normal/function.c: Likewise.
8391 * normal/lexer.c: Likewise.
8392 * normal/main.c: Likewise.
8393 * normal/menu.c: Likewise.
8394 * normal/menu_entry.c: Likewise.
8395 * normal/misc.c: Likewise.
8396 * normal/parser.y: Likewise.
8397 * normal/script.c: Likewise.
8398 * normal/i386/setjmp.S: Likewise.
8399 * normal/powerpc/setjmp.S: Likewise.
8400 * normal/sparc64/setjmp.S: Likewise.
8401 * partmap/acorn.c: Likewise.
8402 * partmap/amiga.c: Likewise.
8403 * partmap/apple.c: Likewise.
8404 * partmap/gpt.c: Likewise.
8405 * partmap/pc.c: Likewise.
8406 * partmap/sun.c: Likewise.
8407 * term/gfxterm.c: Likewise.
8408 * term/terminfo.c: Likewise.
8409 * term/efi/console.c: Likewise.
8410 * term/i386/pc/console.c: Likewise.
8411 * term/i386/pc/serial.c: Likewise.
8412 * term/i386/pc/vesafb.c: Likewise.
8413 * term/i386/pc/vga.c: Likewise.
8414 * term/ieee1275/ofconsole.c: Likewise.
8415 * util/biosdisk.c: Likewise.
8416 * util/console.c: Likewise.
8417 * util/genmoddep.c: Likewise.
8418 * util/getroot.c: Likewise.
8419 * util/grub-emu.c: Likewise.
8420 * util/grub-mkdevicemap.c: Likewise.
8421 * util/grub-probe.c: Likewise.
8422 * util/lvm.c: Likewise.
8423 * util/misc.c: Likewise.
8424 * util/raid.c: Likewise.
8425 * util/resolve.c: Likewise.
8426 * util/update-grub.in: Likewise.
8427 * util/update-grub_lib.in: Likewise.
8428 * util/grub.d/00_header.in: Likewise.
8429 * util/grub.d/10_hurd.in: Likewise.
8430 * util/grub.d/10_linux.in: Likewise.
8431 * util/i386/efi/grub-install.in: Likewise.
8432 * util/i386/efi/grub-mkimage.c: Likewise.
8433 * util/i386/pc/grub-install.in: Likewise.
8434 * util/i386/pc/grub-mkimage.c: Likewise.
8435 * util/i386/pc/grub-mkrescue.in: Likewise.
8436 * util/i386/pc/grub-setup.c: Likewise.
8437 * util/i386/pc/misc.c: Likewise.
8438 * util/powerpc/ieee1275/grub-install.in: Likewise.
8439 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8440 * util/powerpc/ieee1275/misc.c: Likewise.
8441 * video/bitmap.c: Likewise.
8442 * video/video.c: Likewise.
8443 * video/i386/pc/vbe.c: Likewise.
8444 * video/i386/pc/vbeblit.c: Likewise.
8445 * video/i386/pc/vbefill.c: Likewise.
8446 * video/i386/pc/vbeutil.c: Likewise.
8447 * video/readers/tga.c: Likewise.
8449 2007-07-02 Robert Millan <rmh@aybabtu.com>
8451 * conf/i386-efi.rmk: Replace obsolete reference to
8452 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8453 with util/getroot.c.
8454 * conf/powerpc-ieee1275.rmk: Likewise.
8455 * conf/sparc64-ieee1275.rmk: Likewise.
8457 * util/grub-emu.c (main): Fix unchecked pointer handling.
8459 2007-07-02 Robert Millan <rmh@aybabtu.com>
8461 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8462 invocation to fail, in order to support partition-less media.
8464 * util/i386/pc/grub-install.in: Likewise.
8466 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8467 which fs or partmap modules are needed (akin to its sister scripts).
8469 Also use grub-probe to get rid of unportable /proc/mounts check.
8471 Print the same informational message that the other scripts do, before
8474 2007-06-23 Robert Millan <rmh@aybabtu.com>
8476 * util/update-grub_lib.in (font_path): New function. Determine whether
8477 a font file can be found and, if so, echo the GRUB path to it.
8479 * util/update-grub.in: Handle multiple terminals depending on user
8480 input, platform availability and font file presence. Propagate
8481 variables of our findings to /etc/grub.d/ children.
8483 * util/grub.d/00_header.in: Handle multiple terminals, based on
8484 environment setup by update-grub.
8486 2007-06-23 Robert Millan <rmh@aybabtu.com>
8488 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8490 2007-06-21 Robert Millan <rmh@aybabtu.com>
8492 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8493 indicate end of data section in kernel image.
8494 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8495 GRUB_KERNEL_MACHINE_DATA_END.
8497 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8499 * kern/i386/efi/startup.S: Likewise.
8501 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8502 during image generation. Implement --prefix option to override this
8504 * util/i386/efi/grub-mkimage.c: Likewise.
8506 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8507 code to make path relative to its root into a separate function.
8509 * util/i386/pc/grub-install.in: Use newly provided
8510 make_system_path_relative_to_its_root() to convert ${grubdir}, then
8511 pass the result to grub-install --prefix.
8513 2007-06-13 Robert Millan <rmh@aybabtu.com>
8515 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8517 * util/grub-emu.c: Use above definitions from misc.h instead of
8519 * util/grub-mkdevicemap.c: Likewise.
8520 * util/i386/pc/grub-setup.c: Likewise.
8521 * util/grub-probe.c: Likewise.
8522 (probe): Abort with grub_util_error() when either
8523 grub_guess_root_device or grub_util_get_grub_dev fails.
8525 2007-06-12 Robert Millan <rmh@aybabtu.com>
8527 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8529 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8531 * util/grub-probe.c (probe): Likewise for "drive_name".
8533 2007-06-11 Robert Millan <rmh@aybabtu.com>
8535 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8536 not just the cdrom one.
8538 2007-06-11 Robert Millan <rmh@aybabtu.com>
8540 * util/i386/pc/grub-mkrescue.in: Add "set -e".
8541 Add --pkglibdir=DIR option to override pkglibdir.
8542 Mention --image-type=TYPE in help output.
8543 Fix --grub-mkimage (it was a no-op).
8544 Abort gracefully when no parameter is given.
8546 2007-06-11 Robert Millan <rmh@aybabtu.com>
8548 * util/i386/pc/grub-mkrescue.in: New file.
8549 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
8550 * Makefile.in: Handle bin_SCRIPTS.
8552 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
8554 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8555 list of video modes.
8557 2007-06-06 Robert Millan <rmh@aybabtu.com>
8559 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8560 file doesn't exist, or if it is in a filesystem grub can't read.
8562 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
8563 not abort if GRUB_DRIVE could not be defined. Rearrange generated
8564 header comment to fit in 80 columns when the variables are resolved.
8566 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8567 could be identified by update-grub. Remove redundant check for
8568 unifont.pff existence (since convert_system_path_to_grub_path now
8571 2007-06-04 Robert Millan <rmh@aybabtu.com>
8573 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8575 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8577 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8579 2007-06-04 Robert Millan <rmh@aybabtu.com>
8581 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8583 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8584 grub_apple_partition_map_fini.
8587 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8588 to access >2 TiB disks).
8590 Print disk->total_sectors with %llu instead of %lu, since this
8591 variable is always 64-bit (prevents wrong disk size from being displayed
8592 on either >2 TiB disk or big-endian CPU).
8594 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8595 into a generic case that supports all (sane) partition maps.
8597 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8600 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8601 and grub_apple_partition_map_fini() after that.
8603 2007-06-01 Robert Millan <rmh@aybabtu.com>
8605 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8607 * util/grub.d/00_header.in: Only enable gfxterm when
8608 convert_system_path_to_grub_path() succeeds.
8610 2007-05-20 Robert Millan <rmh@aybabtu.com>
8612 * util/update-grub_lib.in: New file.
8613 * DISTLIST: Add update-grub_lib.in.
8614 * conf/common.rmk: Generate update-grub_lib and install it in
8616 * Makefile.in: Add install routine for $(lib_DATA).
8618 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8619 function provided by update-grub_lib to support arbitrary paths of
8621 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8622 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8624 2007-05-19 Robert Millan <rmh@aybabtu.com>
8626 * commands/i386/cpuid.c: New module.
8628 * conf/i386-efi.rmk: Enable cpuid.mod.
8629 * conf/i386-pc.rmk: Likewise.
8631 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8633 * kern/disk.c (grub_disk_read): Check return value of
8636 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8638 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8640 * disk/raid.c (grub_raid_open): Likewise.
8642 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8644 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8645 stack instead of on the heap.
8647 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8648 before doing a read on it.
8650 * configure.ac: Only use -fno-stack-protector for the target
8653 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8655 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8656 __attribute_ ((unused)) to mode_type argument.
8658 * util/getroot.c (grub_guess_root_device): Fix #endif.
8660 * kern/misc.c (memcmp): Fix prototype.
8662 * include/grub/partition.h [GRUB_UTIL]
8663 (grub_gpt_partition_map_init): Add prototype.
8664 (grub_gpt_partition_map_fini): Likewise.
8666 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8669 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8670 (grub_fat_read_data): Likewise.
8671 (grub_fat_find_dir): Likewise.
8673 * font/manager.c (find_glyph): Make table a const.
8674 (grub_font_get_glyph): Remove bitmap from if statement.
8676 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8678 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8679 code, first search for device in /dev/mapper, then in /dev.
8680 (grub_util_get_grub_dev): New function.
8681 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8683 * util/grub-probe.c (probe): Remove check for RAID, call
8684 grub_util_get_grub_dev() instead of
8685 grub_util_biosdisk_get_grub_dev().
8686 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8687 grub_util_biosdisk_get_grub_dev().
8688 * util/i386/pc/grub-setup.c (main): Likewise.
8690 2007-05-16 Robert Millan <rmh@aybabtu.com>
8692 * DISTLIST: Update for the latest changes.
8693 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8694 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8695 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8696 grub/util/biosdisk.h.
8697 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8698 grub/util/biosdisk.h.
8700 2007-05-16 Robert Millan <rmh@aybabtu.com>
8702 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8704 2007-05-16 Robert Millan <rmh@aybabtu.com>
8706 * util/i386/efi/grub-install.in: New.
8707 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8708 newly added grub-install.
8709 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8711 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8712 grub/util/biosdisk.h.
8713 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8714 grub/util/biosdisk.h.
8716 2007-05-16 Robert Millan <rmh@aybabtu.com>
8718 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8719 * include/grub/util/biosdisk.h: ... here.
8720 * util/i386/pc/biosdisk.c: Moved to ...
8721 * util/biosdisk.c: ... here.
8722 * util/i386/pc/getroot.c: Moved to ...
8723 * util/getroot.c: ... here.
8724 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8725 * util/grub-mkdevicemap.c: ... here.
8726 * util/i386/pc/grub-probe.c: Moved to ...
8727 * util/grub-probe.c: ... here.
8729 2007-05-15 Robert Millan <rmh@aybabtu.com>
8731 * util/update-grub.in: Remove duplicated line in grub.cfg header
8734 2007-05-13 Robert Millan <rmh@aybabtu.com>
8736 * util/update-grub.in: Fix a few assumptions about the devices holding
8737 /, /boot and /boot/grub being the same.
8738 * util/grub.d/00_header.in: Likewise.
8739 * util/grub.d/10_hurd.in: Likewise.
8740 * util/grub.d/10_linux.in: Likewise.
8742 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8743 patterns. Use that to define the `.old' suffix as older than `'.
8745 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8747 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8748 the grub.cfg header message.
8750 2007-05-11 Robert Millan <rmh@aybabtu.com>
8752 * util/update-grub.in: Create device.map if it doesn't already exist,
8753 before attempting to run grub-probe.
8754 Check for grub-probe and grub-mkdevicemap with the same code
8755 grub-install is using.
8758 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8760 * Makefile.in: Add the datarootdir autoconf variable.
8762 2007-05-09 Robert Millan <rmh@aybabtu.com>
8764 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
8765 fail gracefully if dev->disk->partition == NULL.
8767 2007-05-07 Robert Millan <rmh@aybabtu.com>
8769 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8770 determine partition map module.
8771 * util/i386/pc/grub-install.in: Use this feature to decide which
8772 partition module to load, instead of hardcoding pc and gpt.
8774 2007-05-07 Robert Millan <rmh@aybabtu.com>
8776 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8777 source directory differs from build directory.
8779 2007-05-05 Robert Millan <rmh@aybabtu.com>
8781 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8784 2007-05-05 Robert Millan <rmh@aybabtu.com>
8786 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8788 2007-05-05 Robert Millan <rmh@aybabtu.com>
8790 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8791 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8793 2007-05-05 Robert Millan <rmh@aybabtu.com>
8795 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8796 (grub_probe_SOURCES): Likewise.
8797 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8798 GPT and initialize dos_part and bsd_part accordingly.
8799 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8801 (main): Activate gpt module for use during partition identification,
8802 and deactivate it afterwards.
8803 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8804 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8805 partition identification, and deactivate it afterwards.
8807 2007-05-05 Robert Millan <rmh@aybabtu.com>
8809 * term/i386/pc/console.c (grub_console_fini): Call
8810 grub_term_set_current() before grub_term_unregister().
8812 2007-05-04 Robert Millan <rmh@aybabtu.com>
8814 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8815 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8816 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8817 and update-grub_DATA.
8818 * conf/common.rmk: Build and install update-grub components.
8819 * conf/common.mk: Regenerate.
8820 * util/update-grub.in: New. Core of update-grub.
8821 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8822 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8823 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8824 * util/grub.d/README: New. Document grub.d directory layout.
8826 2007-05-01 Robert Millan <rmh@aybabtu.com>
8828 * util/grub-emu.c: Move initialization functions
8829 grub_util_biosdisk_init() and grub_init_all() before
8830 grub_util_biosdisk_get_grub_dev(), which relies on them.
8832 2007-04-19 Robert Millan <rmh@aybabtu.com>
8834 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8837 2007-04-18 Jerone Young <jerone@gmail.com>
8839 * kernel/elf.c: Add missing parenthesis for conditional statement
8842 2007-04-10 Jerone Young <jerone@gmail.com>
8844 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8845 continue on and look for device node with real device name.
8847 2007-04-10 Jerone Young <jerone@gmail.com>
8849 * configure.ac: Add argument for autoconf to use transformation
8851 * Makefile.in: Add autoconf package transformation code.
8852 * util/i386/pc/grub-install.in: Likewise.
8853 * util/powerpc/ieee1275/grub-install.in: Likewise.
8855 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8857 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8858 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8859 (EXT2_REVISION): Likewise.
8860 (EXT2_INODE_SIZE): Likewise.
8861 (struct grub_ext2_block_group): Added a missing member
8863 (grub_ext2_read_inode): Divide by the inode size in a superblock
8864 instead of 128 to obtain INODES_PER_BLOCK.
8865 Use the macro EXT2_INODE_SIZE instead of directly using
8868 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8870 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8871 superblock instead of the structure size to compute an
8872 offset. This fixes the problem that GRUB could not read a
8873 filesystem when inode size is different from 128-byte.
8875 2007-03-05 Marco Gerards <marco@gnu.org>
8877 * normal/main.c (read_config_file): When "menu" is not set, create
8880 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8882 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8883 (HEAP_LIMIT): New macro.
8884 (grub_claim_heap): Claim memory up to `heaplimit'.
8886 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8888 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8889 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8891 (grub_arch_modules_addr): Return address after `_end'.
8892 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8893 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8894 (add_segments): Calculate `_end' from phdr size and location.
8895 (ALIGN_UP): Moved to ...
8896 * include/grub/misc.h: here.
8897 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8899 (GRUB_IEEE1275_MODULE_BASE): Removed.
8901 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8903 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8906 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8908 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8910 (grub_elf64_load_hook_t): Likewise.
8911 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8914 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8916 * kern/mm.c: Update copyright.
8917 (grub_mm_debug): Correct syntax error.
8918 (grub_mm_dump_free): New function.
8919 (grub_debug_free): Call `grub_free'.
8920 * include/grub/mm.h: Update copyright.
8921 (grub_mm_dump_free): Add declaration.
8923 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8925 * include/grub/ieee1275/ieee1275.h: Update copyright.
8926 * kern/powerpc/ieee1275/init.c: Likewise.
8927 * kern/powerpc/ieee1275/openfw.c: Likewise.
8929 * loader/powerpc/ieee1275/linux.c: Likewise.
8930 * include/grub/elfload.h: Likewise.
8931 * kern/elf.c: Likewise.
8932 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8934 (grub_elf64_load): Likewise.
8935 (grub_elf32_load_segment): Move to a nested function.
8936 (grub_elf64_load_segment): Likewise.
8938 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8940 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8942 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8943 (grub_heap_len): Likewise.
8944 (HEAP_SIZE): New macro.
8945 (grub_claim_heap): New function.
8946 (grub_machine_init): Don't claim heap directly. Call
8948 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8949 (grub_available_iterate): New function.
8951 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8953 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8954 * configure.ac: Use it for testing the HOST and TARGET compilers.
8956 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8958 * Makefile.in (enable_grub_emu): New variable.
8959 * configure.ac (--enable-grub-emu): New option.
8960 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8961 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8962 * conf/i386-pc.rmk: Likewise.
8963 * conf/powerpc-ieee1275.rmk: Likewise.
8964 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8966 2006-12-12 Marco Gerards <marco@gnu.org>
8968 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8970 * kern/env.c (grub_env_unset): Don't free the member `value' when
8971 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8974 * normal/main.c (current_menu): Removed.
8975 (free_menu): Unset the `menu' environment variable.
8976 (grub_normal_menu_addentry): Make use of the environment variable
8977 `menu', instead of using the global `current_menu'. Allocate
8978 memory for the sourcecode of this entry.
8979 (read_config_file): New argument `nested', changed all callers.
8980 Only in the case of a new context, initialize a new menu. Set the
8981 `menu' environment variable.
8982 (grub_normal_execute): Don't set and unset the environment
8983 variable `menu' here anymore. Only free the menu when leaving the
8986 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8989 2006-12-11 Marco Gerards <marco@gnu.org>
8991 * normal/menu_entry.c (run): Fix off by one bug so the last line
8992 is executed. Move the loader check to outside the loop.
8994 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8996 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8998 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9000 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9001 the number of sectors. Reported by Andrey Shuvikov
9002 <mr_hyro@yahoo.com>.
9004 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9006 * kern/disk.c (grub_disk_read): When there is a read error, always
9007 try to read only the necessary data.
9009 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9011 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9013 [GRUB_UTIL] (grub_raid_fini): Likewise.
9014 [GRUB_UTIL] (grub_lvm_init): Likewise.
9015 [GRUB_UTIL] (grub_lvm_fini): Likewise.
9016 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9017 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9018 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9019 and grub_raid_fini().
9021 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9023 * include/grub/types.h (__unused): Rename to UNUSED.
9024 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9025 (grub_elf64_size): Likewise.
9027 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9029 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9030 grub_error_push and grub_error_pop in the error-handling path.
9031 (grub_elf32_load_segment): Only call grub_file_read with non-zero
9034 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9036 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9037 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9038 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9039 (kernel_elf_SOURCES): Likewise.
9040 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9041 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9042 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9043 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9044 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9045 (elf_mod_SOURCES): New variable.
9046 (elf_mod_CFLAGS): Likewise.
9047 (elf_mod_LDFLAGS): Likewise.
9048 * include/grub/types.h (__unused): New macro.
9049 * include/grub/elfload.h: New file.
9050 * kern/elf.c: Likewise.
9051 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9052 (ELF32_LOADMASK): New macro.
9053 (ELF64_LOADMASK): Likewise.
9055 (grub_linux_load32): New function.
9056 (grub_linux_load64): Likewise.
9057 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9058 Use grub_elf_t instead of grub_file_t.
9060 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
9062 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9063 `catch_result' to struct set_color_args.
9065 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9067 * normal/menu.c: Include grub/script.h.
9068 * normal/menu_entry.c: Likewise.
9069 * include/grub/normal.h: Do not include grub/script.h.
9071 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9073 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9075 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9077 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9079 (grub_disk_close): Print debug messages when closing a disk.
9080 (grub_disk_read): Print debug messages when disk read fails.
9081 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9083 * kern/partition.c: Include misc.h.
9084 (grub_partition_iterate): Print debug messages when detecting
9087 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9089 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9091 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9093 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9095 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9096 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9098 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
9100 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9101 instead of sizeof(lv). Patch by Michael Guntsche.
9103 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
9105 * disk/lvm.c: Rename VGS to VG_LIST.
9106 (grub_lvm_iterate): Change VGS->LV to VG-LV.
9107 (grub_lvm_open): Likewise.
9108 Thanks to Michael Guntsche for finding this bug.
9110 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9112 * configure.ac (AC_INIT): Bumped to 1.95.
9114 2006-10-14 Robert Millan <rmh@aybabtu.com>
9116 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9117 with "/dev/.static/dev/md".
9119 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9121 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9122 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9123 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9124 DRIVE_NAME are always freed.
9126 * util/i386/pc/biosdisk.c (make_device_name): Add one into
9127 DOS_PART, as a DOS partition is counted from one instead of zero
9128 now. Reported by Robert Millan.
9130 2006-10-14 Robert Millan <rmh@aybabtu.com>
9132 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9133 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9134 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9135 string returned by grub_guess_root_device.
9136 * util/i386/pc/grub-setup.c: Likewise.
9137 * util/i386/pc/grub-probefs.c: Likewise.
9139 * util/i386/pc/grub-probefs.c: Rename to ...
9140 * util/i386/pc/grub-probe.c: ... this.
9141 * DISTLIST: Remove grub-probefs, add grub-probe.
9142 * conf/i386-efi.rmk: Likewise.
9143 * conf/i386-pc.rmk: Likewise.
9144 * util/i386/pc/grub-install.in: Likewise.
9146 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9147 choose which information we want to print.
9149 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9151 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9152 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9153 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9154 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9155 video/readers/tga.c and video/i386/pc/vbeutil.c.
9157 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9159 Added support for RAID and LVM.
9161 * disk/lvm.c: New file.
9162 * disk/raid.c: Likewise.
9163 * include/grub/lvm.h: Likewise.
9164 * include/grub/raid.h: Likewise.
9165 * include/grub/util/lvm.h: Likewise.
9166 * include/grub/util/raid.h: Likewise.
9167 * util/lvm.c: Likewise.
9168 * util/raid.c: Likewise.
9170 * include/grub/disk.h (grub_disk_dev_id): Add
9171 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9172 (grub_disk_get_size): New prototype.
9173 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9174 returns a partition.
9175 (grub_disk_get_size): New function.
9177 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9178 verbatim if grub_install_dos_part is -2.
9180 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9183 * util/i386/pc/grub-setup.c (setup): New argument
9184 MUST_EMBED. Force embedding of GRUB when the argument is
9185 true. Close FILE before returning.
9186 (main): Add support for RAID and LVM.
9188 * conf/common.rmk: Add RAID and LVM modules.
9189 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9191 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9193 * kern/misc.c (grub_strstr): New function.
9194 * include/grub/misc.h (grub_strstr): New prototype.
9196 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9198 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9200 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9202 * kern/misc.c (grub_strtoull): Guess the base only if not
9205 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9207 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9210 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9212 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9214 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9215 Remove `flags' argument. All callers changed.
9216 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9217 (IEEE1275_IHANDLE_INVALID): New variable.
9218 (IEEE1275_CELL_INVALID): New variable.
9219 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9220 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9221 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9222 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9223 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9224 codes from Open Firmware. All callers updated.
9225 (grub_ieee1275_next_property): Directly return Open Firmware return
9227 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9228 Standardize error checking from `grub_ieee1275_get_property'.
9229 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9230 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9232 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9234 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9235 `instance_to_package_args' to `instance_to_path_args'.
9237 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9238 `grub_ieee1275_chosen'.
9240 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9241 `grub_ieee1275_interpret'.
9243 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9245 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9247 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9249 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9250 (__cmpdi): Likewise.
9252 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9253 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9256 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
9258 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9259 to type `grub_ssize_t'.
9260 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9262 2006-09-22 Marco Gerards <marco@gnu.org>
9264 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9267 2006-09-22 Marco Gerards <marco@gnu.org>
9269 * commands/echo.c: New file.
9271 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9273 * conf/common.rmk (echo_mod_SOURCES): New variable.
9274 (echo_mod_CFLAGS): Likewise.
9275 (echo_mod_LDFLAGS): Likewise.
9277 2006-09-22 Marco Gerards <marco@gnu.org>
9279 * normal/main.c (get_line): Malloc memory instead of using
9280 preallocated memory. Removed the arguments `cmdline' and
9281 `max_len'. Updated all callers.
9283 2006-09-22 Marco Gerards <marco@gnu.org>
9285 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9286 (normal_mod_DEPENDENCIES): Likewise.
9288 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9289 (normal_mod_DEPENDENCIES): Likewise.
9291 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9293 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
9295 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9297 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9298 (normal_mod_DEPENDENCIES): Likewise.
9299 * conf/i386-pc.mk: Regenerate.
9300 * conf/i386-efi.mk: Likewise
9301 * conf/common.mk: Likewise.
9302 * conf/powerpc-ieee1275.mk: Likewise.
9303 * conf/sparc64-ieee1275.mk: Likewise.
9305 2006-09-22 Robert Millan <rmh@aybabtu.com>
9307 Sync with i386 version.
9308 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9309 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9311 2006-09-21 Robert Millan <rmh@aybabtu.com>
9313 Import from GRUB Legacy (lib/device.c):
9314 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9315 (init_device_map) [__linux__]: Add support for I2O devices.
9317 2006-09-14 Marco Gerards <marco@gnu.org>
9319 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9322 2006-09-14 Robert Millan <rmh@aybabtu.com>
9324 * util/i386/pc/grub-install.in: Skip menu.lst when removing
9327 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
9329 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9330 before adding it to device.map.
9332 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
9334 * genmk.rb: Let GCC generate dependencies the first time it
9335 compiles a file; using the -MD option.
9336 * conf/common.mk: Regenerate.
9337 * conf/i386-pc.mk: Likewise.
9338 * conf/i386-efi.mk: Likewise.
9339 * conf/powerpc-ieee1275.mk: Likewise.
9340 * conf/sparc64-ieee1275.mk: Likewise.
9342 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
9344 Move the prototypes of grub_setjmp and grub_longjmp to
9345 cpu/setjmp.h, so that each architecture may specify different
9348 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
9349 (grub_longjmp): Likewise.
9350 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
9351 (grub_longjmp): Likewise.
9352 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
9353 (grub_longjmp): Likewise.
9355 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
9356 [!GRUB_UTIL] (grub_longjmp): Removed.
9358 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
9360 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
9361 "color!" method does not return any value.
9363 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9365 * include/grub/bitmap.h: New file.
9367 * include/grub/i386/pc/vbeutil.h: Likewise.
9369 * video/bitmap.c: Likewise.
9371 * video/readers/tga.c: Likewise.
9373 * video/i386/pc/vbeutil.c: Likewise.
9375 * commands/videotest.c: Code cleanup and updated to reflect to new
9378 * term/gfxterm.c: Likewise.
9380 * video/video.c: Likewise.
9382 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
9383 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
9384 (bitmap_mod_SOURCES): New entry.
9385 (bitmap_mod_CFLAGS): Likewise.
9386 (bitmap_mod_LDFLAGS): Likewise.
9387 (tga_mod_SOURCES): Likewise.
9388 (tga_mod_CFLAGS): Likewise.
9389 (tga_mod_LDFLAGS): Likewise.
9391 * include/grub/video.h (grub_video_blit_operators): New enum type.
9392 (grub_video_render_target): Changed as forward declaration and moved
9393 actual definition to be video driver specific.
9394 (grub_video_adapter.blit_bitmap): Added blitting operator.
9395 (grub_video_adapter.blit_render_target): Likewise.
9396 (grub_video_blit_bitmap): Likewise.
9397 (grub_video_blit_render_target): Likewise.
9399 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9400 driver specific render target definition.
9401 (grub_video_vbe_map_rgba): Added driver internal helper.
9402 (grub_video_vbe_unmap_color): Updated to use
9403 grub_video_i386_vbeblit_info.
9404 (grub_video_vbe_get_video_ptr): Likewise.
9406 * include/grub/i386/pc/vbeblit.h
9407 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9408 grub_video_i386_vbeblit_info.
9409 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9410 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9411 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9412 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9413 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9414 (grub_video_i386_vbeblit_index_index): Likewise.
9415 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9416 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9417 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9418 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9420 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9423 * video/i386/pc/vbeblit.c: Updated to reflect changes on
9424 include/grub/i386/pc/vbeblit.h.
9426 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9427 Updated to use grub_video_i386_vbeblit_info.
9428 (grub_video_i386_vbefill_R8G8B8): Likewise.
9429 (grub_video_i386_vbefill_index): Likewise.
9430 (grub_video_i386_vbefill): Added generic filler.
9432 * video/i386/pc/vbefill.c: Updated to reflect changes on
9433 include/grub/i386/pc/vbefill.h.
9435 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9436 grub_video_i386_vbeblit_info.
9437 (grub_video_vbe_unmap_color): Likewise.
9438 (grub_video_vbe_blit_glyph): Likewise.
9439 (grub_video_vbe_scroll): Likewise.
9440 (grub_video_vbe_draw_pixel): Removed function.
9441 (grub_video_vbe_get_pixel): Likewise.
9442 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9443 updated code to use it.
9444 (common_blitter): Added common blitter for render target and bitmap.
9445 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9446 (grub_video_vbe_blit_render_target): Likewise.
9448 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
9450 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9451 is in text mode if there is no console control protocol instance
9454 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9456 * include/grub/video.h: Code cleanup.
9458 * include/grub/i386/pc/vbe.h: Likewise.
9460 * video/i386/pc/vbe.c: Likewise.
9462 * video/i386/pc/vbeblit.c: Likewise.
9464 * video/i386/pc/vbefill.c: Likewise.
9466 * video/video.c: Likewise. Also added more comments.
9468 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9470 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9471 (struct grub_biosdisk_dap): Likewise.
9473 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
9474 linkage settings for all functions.
9476 2006-07-12 Marco Gerards <marco@gnu.org>
9478 * configure.ac (--enable-mm-debug): Fix typo.
9480 * genkernsyms.sh.in: Use proper quoting for `CC'.
9482 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
9484 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9485 (normal_mod_ASFLAGS): Remove "-m32".
9487 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
9489 * util/misc.c: Include config.h.
9490 [!HAVE_MEMALIGN]: Do not include malloc.h.
9491 (grub_memalign): Use posix_memalign, if present. Then, use
9492 memalign, if present. Otherwise, emit an error.
9494 * util/grub-emu.c: Do not include malloc.h.
9496 * include/grub/util/misc.h: Include unistd.h. This is required for
9497 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9498 D. Eades III <hde@foobar-qux.org>.
9500 * configure.ac (AC_GNU_SOURCE): Added.
9501 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9504 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
9506 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9507 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9509 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
9511 * include/grub/types.h (grub_host_addr_t): Rename to
9513 (grub_host_off_t): Rename to grub_target_off_t.
9514 (grub_host_size_t): Rename to grub_target_size_t.
9515 (grub_host_ssize_t): Rename to grub_target_ssize_t.
9516 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9518 * include/grub/kernel.h (struct grub_module_header): Change type
9519 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9520 (grub_module_info): Likewise.
9522 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9524 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9525 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9526 Velazquez <jesus.velazquez@gmail.com>.
9528 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9530 Count partitions from 1 instead of 0 in the string representation
9531 of partitions. Still use 0-based internally.
9533 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9534 (sun_partition_map_iterate): Use grub_partition_t instead of
9535 struct grub_partition *. Cast DESC->START_CYLINDER to
9536 grub_uint64_t after converting the endian.
9537 (sun_partition_map_probe): Subtract 1 for PARTNUM.
9538 (sun_partition_map_get_name): Add 1 to P->INDEX.
9540 * partmap/pc.c (grub_partition_parse): Subtract 1 for
9542 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9544 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9545 zero instead of one.
9546 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9547 (gpt_partition_map_get_name): Add 1 into P->INDEX.
9549 * partmap/apple.c (apple_partition_map_iterate): Change the type
9551 (apple_partition_map_probe): Subtract 1 for PARTNUM.
9552 (apple_partition_map_get_name): Add 1 into P->INDEX.
9554 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9556 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9557 calculate the offset of a partition.
9558 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9559 (amiga_partition_map_get_name): Add 1 into P->INDEX.
9561 * partmap/acorn.c (acorn_partition_map_find): Change the type of
9562 SECTOR to grub_disk_addr_t.
9563 (acorn_partition_map_iterate): Likewise.
9564 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9565 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9567 (acorn_partition_map_get_name): Add 1 into P->INDEX.
9569 * kern/i386/pc/init.c (make_install_device): Add 1 into
9570 GRUB_INSTALL_DOS_PART.
9572 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9575 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9577 Clean up the code to support 64-bit addressing in disks and
9578 files. This change is not enough for filesystems yet.
9580 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9581 type of "start" to grub_uint64_t.
9582 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9583 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9584 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9587 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9588 to grub_disk_addr_t.
9590 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9593 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9595 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9598 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9600 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9602 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9604 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9605 to grub_off_t, to detect an error from grub_file_seek.
9606 (grub_multiboot_load_elf32): Likewise.
9608 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9609 maximum unsigned long value when an overflow is detected.
9610 (grub_strtoull): New function.
9611 (grub_divmod64): Likewise.
9612 (grub_lltoa): use grub_divmod64.
9614 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9616 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9617 the pointer to next character. Use grub_strtoull instead of
9619 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9620 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9623 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9624 return value is signed.
9625 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9626 test if OFFSET is less than zero, as OFFSET is unsigned now.
9628 * kern/disk.c (struct grub_disk_cache): Change the type of
9629 "sector" to grub_disk_addr_t.
9630 (grub_disk_cache_get_index): Change the type of SECTOR to
9631 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9632 unsigned after shifting.
9633 (grub_disk_cache_invalidate): Change the type of SECTOR to
9635 (grub_disk_cache_unlock): Likewise.
9636 (grub_disk_cache_store): Likewise.
9637 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9638 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9639 grub_disk_addr_t and grub_uint64_t, respectively.
9640 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9641 body, as the value of OFFSET is tweaked by
9642 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9643 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9645 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9646 body, as the value of OFFSET is tweaked by
9647 grub_disk_check_range. Change the types of LEN and N to
9650 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9651 and "saved_offset" to grub_off_t.
9652 (test_header): Cast BUF to char *.
9653 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9655 (grub_gzio_read): Change the types of OFFSET and SIZE to
9656 grub_off_t and grub_size_t, respectively.
9658 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9660 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9661 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9662 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9663 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9664 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9666 * include/grub/types.h (grub_off_t): Unconditionally set to
9668 (grub_disk_addr_t): Changed to grub_uint64_t.
9670 * include/grub/partition.h (struct grub_partition): Change the
9671 types of "start", "len" and "offset" to grub_disk_addr_t,
9672 grub_uint64_t and grub_disk_addr_t, respectively.
9673 (grub_partition_get_start): Return grub_disk_addr_t.
9674 (grub_partition_get_len): Return grub_uint64_t.
9676 * include/grub/misc.h (grub_strtoull): New prototype.
9677 (grub_divmod64): Likewise.
9679 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9680 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9681 grub_off_t, respectively.
9682 All callers and references changed.
9684 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9685 grub_size_t in "read".
9686 All callers and references changed.
9688 * include/grub/file.h (struct grub_file): Change the types of
9689 "offset" and "size" to grub_off_t and grub_off_t,
9690 respectively. Change the type of SECTOR to grub_disk_addr_t in
9692 (grub_file_read): Change the type of LEN to grub_size_t.
9693 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9695 (grub_file_size): Return grub_off_t.
9696 (grub_file_tell): Likewise.
9697 All callers and references changed.
9699 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9700 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9702 (struct grub_disk): Change the type of "total_sectors" to
9703 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
9705 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9706 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9707 (grub_disk_write): Likewise.
9708 All callers and references changed.
9710 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9711 char * for grub_strncmp to silence gcc.
9712 (grub_iso9660_mount): Likewise.
9713 (grub_iso9660_mount): Likewise.
9714 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9716 (grub_iso9660_iterate_dir): Likewise.
9717 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9719 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9720 LEN to grub_disk_addr_t and grub_size_t, respectively.
9722 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9724 * fs/jfs.c (grub_jfs_read_file): Likewise.
9726 * fs/minix.c (grub_jfs_read_file): Likewise.
9728 * fs/sfs.c (grub_jfs_read_file): Likewise.
9730 * fs/ufs.c (grub_jfs_read_file): Likewise.
9732 * fs/xfs.c (grub_jfs_read_file): Likewise.
9734 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9735 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9738 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9739 BLKNR to -1 instead of returning GRUB_ERRNO.
9740 (grub_ext2_read_file): Change the types of SECTOR and
9741 LEN to grub_disk_addr_t and grub_size_t, respectively.
9743 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9744 LEN to grub_disk_addr_t and grub_size_t, respectively.
9746 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9749 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9750 string. Do not cast SECTOR explicitly.
9752 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9753 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9754 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9755 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9756 over 2TB and LBA mode is not supported, raise an error.
9757 (get_safe_sectors): New function.
9758 (grub_biosdisk_read): Use get_safe_sectors.
9759 (grub_biosdisk_write): Likewise.
9761 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9762 (grub_efidisk_write): Likewise.
9764 * disk/loopback.c (delete_loopback): Cosmetic changes.
9765 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9767 (grub_loopback_open): Likewise.
9768 (grub_loopback_read): Likewise. Also, change the type of POS to
9769 grub_off_t, and fix the usage of grub_memset.
9771 * commands/i386/pc/play.c: Include grub/machine/time.h.
9773 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9776 * commands/configfile.c: Include grub/env.h.
9778 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9779 GRUB_ERRNO directly instead. Change the type of POS to
9780 grub_off_t. Follow the coding standard.
9782 * commands/blocklist.c: Include grub/partition.h.
9783 (grub_cmd_blocklist): Return an error if the underlying device is
9784 not a disk. Take the starting sector of a partition into account,
9785 if a partition is used.
9787 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9789 (lba_mode): Support 64-bit addresses.
9790 (chs_mode): Likewise.
9791 (copy_buffer): Adapted to the new offsets of a length field and a
9793 (blocklist_default_start): Allocate 64-bit space.
9795 * boot/i386/pc/boot.S (force_lba): Removed.
9796 (boot_drive): Moved to under KERNEL_SECTOR.
9797 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
9799 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9801 (lba_mode): Refactored to support a 64-bit address. More size
9803 (setup_sectors): Likewise.
9805 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9807 * DISTLIST: Added include/grub/i386/linux.h. Removed
9808 include/grub/i386/pc/linux.h
9810 * configure.ac (AC_INIT): Bumped to 1.94.
9812 * config.guess: Updated from gnulib.
9813 * config.sub: Likewise.
9814 * install-sh: Likewise.
9815 * mkinstalldirs: Likewise.
9817 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9819 * conf/common.rmk (grub_modules_init.lst): Depended on
9820 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9823 * genmk.rb (PModule::rule): Reverted the previous change.
9825 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9827 * conf/common.rmk (grub_modules_init.lst): Depends on
9828 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9829 that the target does not exist before producing.
9830 (grub_modules_init.h): Remove the target before generating.
9831 (grub_emu_init.c): Likewise.
9833 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9835 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9837 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9838 for the target-specific tests. Make sure that we also have the
9839 up-to-date target variables for those tests.
9841 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9843 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9844 (PModule::rule): Likewise.
9846 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9848 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9849 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9850 target-specific flags should be prefixed.
9851 (PModule::rule): Likewise.
9853 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9855 * configure.ac (CMP): Check if cmp is available explicitly.
9857 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9859 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9860 (target_cpu): New variable.
9861 (pkglibdir): Use target_cpu instead of host_cpu.
9863 * util/i386/pc/grub-install.in (host_cpu): Removed.
9864 (target_cpu): New variable.
9865 (pkglibdir): Use target_cpu instead of host_cpu.
9867 * util/genmoddep.c: Removed.
9869 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9870 instead of GRUB_HOST_SIZEOF_VOID_P.
9871 * kern/dl.c: Likewise.
9873 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9875 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9876 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9877 (GRUB_TARGET_SIZEOF_LONG): ... this.
9878 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9879 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9880 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9882 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9883 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9884 (GRUB_TARGET_SIZEOF_LONG): ... this.
9885 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9886 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9887 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9889 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9890 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9891 (GRUB_TARGET_SIZEOF_LONG): ... this.
9892 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9893 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9895 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9896 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9897 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9898 instead of GRUB_HOST_SIZEOF_LONG.
9899 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9900 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9901 GRUB_CPU_WORDS_BIGENDIAN.
9902 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9903 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9906 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9907 (genmoddep_SOURCES): Likewise.
9908 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9909 (genmoddep_SOURCES): Likewise.
9910 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9911 (genmoddep_SOURCES): Likewise.
9912 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9914 (genmoddep_SOURCES): Likewise.
9916 * genmoddep.awk: New file.
9918 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9919 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9920 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9921 (PModule::rule): Likewise.
9922 (Program::rule): Likewise.
9923 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9924 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9927 * configure.ac: Rewritten intensively to use host and target
9928 instead of build and host, respectively.
9930 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9931 (host_cpu): Removed.
9932 (target_cpu): New variable.
9933 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9934 (BUILD_CC): Removed.
9935 (BUILD_CFLAGS): Likewise.
9936 (BUILD_CPPFLAGS): Likewise.
9937 (TARGET_CC): New variable.
9938 (TARGET_CFLAGS): Likewise.
9939 (TARGET_CPPFLAGS): Likewise.
9940 (TARGET_LDFLAGS): Likewise.
9942 (include): Use target_cpu instead of host_cpu.
9943 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9945 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9947 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9949 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9950 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9951 field 'false' to 'exec_on_false'.
9952 (grub_script_create_cmdif): Renamed argument names to reflect above
9955 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9957 * normal/script.c (grub_script_create_cmdif): Likewise.
9959 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9961 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9963 (grub_hfsplus_btree_recptr): Likewise.
9964 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9965 FILEBLOCK both to pass a block number and store next block
9967 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9968 overflow file correctly. Specify errors appropriately, because
9969 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9970 grub_hfsplus_btree_recptr to get the pointer to a found key.
9971 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9974 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9976 (_linux_mod_SOURCES): New variable.
9977 (_linux_mod_CFLAGS): Likewise.
9978 (_linux_mod_LDFLAGS): Likewise.
9979 (linux_mod_SOURCES): Likewise.
9980 (linux_mod_CFLAGS): Likewise.
9981 (linux_mod_LDFLAGS): Likewise.
9983 * DISTLIST: Added loader/i386/efi/linux.c,
9984 loader/i386/efi/linux_normal.c and
9985 include/grub/i386/efi/loader.h.
9987 * loader/i386/efi/linux.c: New file.
9988 * loader/i386/efi/linux_normal.c: Likewise.
9989 * include/grub/i386/efi/loader.h: Likewise.
9991 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9993 * commands/blocklist.c: New file.
9995 * DISTLIST: Added commands/blocklist.c.
9997 * term/efi/console.c (grub_console_highlight_color): Use a lighter
9998 color for the background, and a darker color for the foreground.
9999 (grub_console_checkkey): Return READ_KEY.
10000 (grub_console_cls): Set the background to
10001 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10003 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10005 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10006 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10008 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10011 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10012 BG. The spec is wrong again.
10014 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10016 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10018 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10019 commands/blocklist.c.
10020 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10022 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10023 (blocklist_mod_SOURCES): New variable.
10024 (blocklist_mod_CFLAGS): Likewise.
10025 (blocklist_mod_LDFLAGS): Likewise.
10027 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
10029 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10031 (lba_mode): Use %eax more intensively to reduce the code size.
10033 2006-05-20 Marco Gerards <marco@gnu.org>
10035 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10037 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
10039 (script): Accept leading newlines.
10040 (newlines): New rule to describe 0 or more newlines.
10041 (commands): Accept `command' with trailing newline. Fixed the
10042 order in which arguments were passed to `grub_script_add_cmd'.
10043 Accept commands separated by newlines.
10044 (function): Changed to accept newlines.
10045 (menuentry) Rewritten.
10047 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10048 front of the list, instead of to the end.
10050 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
10052 * util/i386/pc/grub-install.in (bindir): New variable.
10053 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10054 Shaver <lbgwjl@gmail.com>.
10056 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
10058 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10059 grub/machine/linux.h
10060 * loader/i386/pc/linux.c: Likewise.
10062 * include/grub/i386/pc/linux.h: Moved to ...
10063 * include/grub/i386/linux.h: ... here.
10065 * include/grub/i386/linux.h (struct linux_kernel_params): New
10068 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
10070 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10072 (grub_video_vbe_blit_glyph): Likewise.
10073 (grub_video_vbe_blit_bitmap): Likewise.
10074 (grub_video_vbe_blit_render_target): Likewise.
10076 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10078 * configure.ac (--with-platform): Properly quote the square
10081 2006-05-08 Marco Gerards <marco@gnu.org>
10083 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10085 (kernel_elf_HEADERS): ...to this. Updated all users.
10086 (grubof_symlist.c): Renamed from this...
10087 (kernel_elf_symlist.c): ...to this. Updated all users.
10088 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10089 (grubof_SOURCES): Renamed from this...
10090 (kernel_elf_SOURCES): ...to this.
10091 (grubof_HEADERS): Renamed from this...
10092 (kernel_elf_HEADERS): ...to this.
10093 (grubof_CFLAGS): Renamed from this...
10094 (kernel_elf_CFLAGS): ...to this.
10095 (grubof_ASFLAGS): Renamed from this...
10096 (kernel_elf_ASFLAGS): ...to this.
10097 (grubof_LDFLAGS): Renamed from this...
10098 (kernel_elf_LDFLAGS): ...to this.
10100 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10102 (kernel_elf_HEADERS): ...to this. Updated all users.
10103 (grubof_symlist.c): Renamed from this...
10104 (kernel_elf_symlist.c): ...to this. Updated all users.
10105 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10106 (grubof_SOURCES): Renamed from this...
10107 (kernel_elf_SOURCES): ...to this.
10108 (grubof_HEADERS): Renamed from this...
10109 (kernel_elf_HEADERS): ...to this.
10110 (grubof_CFLAGS): Renamed from this...
10111 (kernel_elf_CFLAGS): ...to this.
10112 (grubof_ASFLAGS): Renamed from this...
10113 (kernel_elf_ASFLAGS): ...to this.
10114 (grubof_LDFLAGS): Renamed from this...
10115 (kernel_elf_LDFLAGS): ...to this.
10117 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10118 `kernel.elf' instead of `grubof'.
10120 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
10122 Add --with-platform to configure. Use pkglibdir instead of
10123 pkgdatadir. This is reported by Roger Leigh.
10125 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10126 (host_vendor): Likewise.
10127 (host_os): Likewise.
10128 (pkgdatadir): Likewise.
10129 (platform): New variable.
10130 (pkglibdir): Likewise.
10131 Use PKGLIBDIR instead of PKGDATADIR.
10133 * util/i386/pc/grub-install.in (datadir): Removed.
10134 (host_vendor): Likewise.
10135 (host_os): Likewise.
10136 (pkgdatadir): Likewise.
10137 (platform): New variable.
10138 (pkglibdir): Likewise.
10139 Use PKGLIBDIR instead of PKGDATADIR.
10141 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10142 instead of GRUB_DATADIR.
10144 * util/i386/pc/grub-mkimage.c (usage): Likewise.
10146 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10149 * configure.ac (--with-platform): New option.
10150 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10152 * Makefile.in: Include a makefile based on PLATFORM instead of
10154 (pkgdatadir): Not appended by the machine type.
10155 (pkglibdir): Appended by the machine type.
10156 (host_vendor): Removed.
10157 (platform): New variable.
10158 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10159 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10160 (uninstall): Likewise.
10162 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10164 Use the environment context in the menu. Remove the commands
10165 "default" and "timeout", and use variables instead.
10167 * normal/menu.c: Include grub/env.h.
10168 (print_entry): Cast TITLE to silence gcc.
10169 (get_timeout): New function.
10170 (set_timeout): Likewise.
10171 (get_entry_number): Likewise.
10172 (run_menu): Use a default entry, a fallback entry and a timeout
10173 in the environment variables "default", "fallback" and
10174 "timeout". Also, tweak the default entry if it is not within the
10175 current menu entries.
10176 (grub_menu_run): Use a fallback entry in the environment variable
10179 * normal/main.c (read_config_file): Do not initialize
10180 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10182 (grub_normal_execute): Use a data slot to store the menu.
10184 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10185 fallback_entry and timeout.
10186 (struct grub_menu_list): Removed.
10187 (grub_menu_list_t): Likewise.
10188 (struct grub_context): Likewise.
10189 (grub_context_t): Likewise.
10190 (grub_context_get): Likewise.
10191 (grub_context_get_current_menu): Likewise.
10192 (grub_context_push_menu): Likewise.
10193 (grub_context_pop_menu): Likewise.
10194 (grub_default_init): Likewise.
10195 (grub_default_fini): Likewise.
10196 (grub_timeout_init): Likewise.
10197 (grub_timeout_fini): Likewise.
10199 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10201 (normal_mod_SOURCES): Removed normal/context.c.
10203 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10204 commands/default.c, commands/timeout.c and normal/context.c.
10205 (normal_mod_SOURCES): Removed normal/context.c.
10207 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10208 commands/timeout.c and normal/context.c.
10209 (normal_mod_SOURCES): Removed normal/context.c.
10211 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10212 commands/default.c, commands/timeout.c and normal/context.c.
10213 (normal_mod_SOURCES): Removed normal/context.c.
10215 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10217 (default_mod_SOURCES): Removed.
10218 (default_mod_CFLAGS): Likewise.
10219 (default_mod_LDFLAGS): Likewise.
10220 (timeout_mod_SOURCES): Removed.
10221 (timeout_mod_CFLAGS): Likewise.
10222 (timeout_mod_LDFLAGS): Likewise.
10224 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10227 * commands/default.c: Removed.
10228 * commands/timeout.c: Likewise.
10229 * normal/context.c: Likewise.
10231 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10233 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10235 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10237 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10238 "next" to "prev" for readability.
10239 (struct grub_env_sorted_var): New struct.
10240 (grub_env_context): Renamed to ...
10241 (initial_context): ... this.
10242 (grub_env_var_context): Renamed to ...
10243 (current_context): ... this.
10244 (grub_env_find): Look only at CURRENT_CONTEXT.
10245 (grub_env_context_open): Rewritten to copy exported variables from
10247 (grub_env_context_close): Rewritten according to the new
10248 scheme. Also, add an assertion to prevent the initial context from
10250 (grub_env_insert): Removed the code for the sorted list.
10251 (grub_env_remove): Likewise.
10252 (grub_env_export): Simply mark the variable with
10253 GRUB_ENV_VAR_GLOBAL.
10254 (grub_env_set): A cosmetic change for naming consistency.
10255 (grub_env_get): Likewise.
10256 (grub_env_unset): Likewise.
10257 (grub_env_iterate): Rewritten to sort variables within this
10259 (grub_register_variable_hook): Fixed for naming consistency. Call
10260 grub_env_find again, only if NAME is not found at the first time.
10261 (mangle_data_slot_name): New function.
10262 (grub_env_set_data_slot): Likewise.
10263 (grub_env_get_data_slot): Likewise.
10264 (grub_env_unset_data_slot): Likewise.
10266 * include/grub/env.h (grub_env_var_type): New enum.
10267 (GRUB_ENV_VAR_LOCAL): New constant.
10268 (GRUB_ENV_VAR_GLOBAL): Likewise.
10269 (GRUB_ENV_VAR_DATA): Likewise.
10270 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10272 (grub_env_set): Replace VAR with NAME for consistency.
10273 (grub_register_variable_hook): Likewise.
10274 (grub_env_export): Specify the name of the argument.
10275 (grub_env_set_data_slot): New prototype.
10276 (grub_env_get_data_slot): Likewise.
10277 (grub_env_unset_data_slot): Likewise.
10279 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10281 Extend the loader so that GRUB can accept a loader which comes
10282 back to GRUB when a loaded image exits. Also, this change adds
10283 support for a chainloader on EFI.
10285 * term/efi/console.c: Include grub/misc.h.
10286 (grub_console_checkkey): Display a scan code on the top for
10287 debugging. This will be removed once the EFI port gets stable.
10288 Correct the scan code mapping.
10290 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10291 allocate memory from larger regions, in order to reduce the number
10292 of allocated regions. Otherwise, the MacOSX loader panics.
10293 (filter_memory_map): Avoid less than 1MB for compatibility with
10295 (add_memory_regions): Allocate from the tail of a region, if
10296 possible, to avoid allocating a region near to 1MB, for the MacOSX
10299 * kern/efi/init.c (grub_efi_set_prefix): Specify
10300 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10302 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10303 argument IMAGE_HANDLE and specify it to get a loaded image.
10304 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10305 grub_efi_get_loaded_image.
10306 (grub_efi_get_filename): Divide the length by the size of
10308 (grub_efi_get_device_path): New function.
10309 (grub_efi_print_device_path): Print End Device Path nodes. Divide
10310 the length by the size of grub_efi_char16_t for a file path device
10313 * kern/loader.c (grub_loader_noreturn): New variable.
10314 (grub_loader_set): Accept a new argument NORETURN. Set
10315 GRUB_LOADER_NORETURN to NORETURN.
10316 All callers changed.
10317 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10320 * include/grub/efi/efi.h (grub_efi_get_device_path): New
10322 (grub_efi_get_loaded_image): Take an argument to specify an image
10325 * include/grub/loader.h (grub_loader_set): Added one more argument
10328 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10329 instead of grub_efi_open_protocol.
10330 (grub_efidisk_get_device_name): Likewise.
10331 (grub_efidisk_close): Print a newline.
10332 (grub_efidisk_get_device_handle): Fixed to use
10333 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10334 GRUB_EFI_DEVICE_PATH_TYPE.
10336 * disk/efi/efidisk.c (device_path_guid): Moved to ...
10337 * kern/efi/efi.c (device_path_guid): ... here.
10339 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
10341 (kernel_mod_HEADERS): Added efi/disk.h.
10342 (_chain_mod_SOURCES): New variable.
10343 (_chain_mod_CFLAGS): Likewise.
10344 (_chain_mod_LDFLAGS): Likewise.
10345 (chain_mod_SOURCES): Likewise.
10346 (chain_mod_CFLAGS): Likewise.
10347 (chain_mod_LDFLAGS): Likewise.
10349 * DISTLIST: Added include/grub/efi/chainloader.h,
10350 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
10352 * include/grub/efi/chainloader.h: New file.
10353 * loader/efi/chainloader.c: Likewise.
10354 * loader/efi/chainloader_normal.c: Likewise.
10356 2006-04-30 Marco Gerards <marco@gnu.org>
10358 * commands/configfile.c (grub_cmd_source): New function.
10359 (GRUB_MOD_INIT): Register the commands `source' and `.'.
10360 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
10362 2006-04-30 Marco Gerards <marco@gnu.org>
10364 * normal/execute.c (grub_script_execute_cmd): Change the return
10365 type to `grub_err_t'. Correctly return the error.
10366 (grub_script_execute_cmdline): In case a command line is not a
10367 command or a function, try to interpret it as an assignment.
10369 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10371 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
10372 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
10373 skip a node whose name is obviously invalid as UTF-16,
10374 i.e. contains a NUL character. Stop the iteration when the last
10375 directory entry is found. Instead of using the return value of
10376 grub_hfsplus_btree_iterate_node, store the value in RET and use
10377 it, because the iterator can be stopped by the last directory
10380 2006-04-30 Marco Gerards <marco@gnu.org>
10382 * include/grub/env.h (grub_env_export): New prototype. Reported
10383 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
10385 2006-04-30 Marco Gerards <marco@gnu.org>
10387 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
10388 size of the extents in a catalog file record.
10390 2006-04-29 Marco Gerards <marco@gnu.org>
10392 * commands/configfile.c (grub_cmd_configfile): Execute the
10393 configfile within its own context.
10395 * include/grub/env.h (grub_env_context_open): New prototype.
10396 (grub_env_context_close): Likewise.
10398 * kern/env.c (grub_env): Removed.
10399 (grub_env_sorted): Likewise.
10400 (grub_env_context): New variable.
10401 (grub_env_var_context): Likewise.
10402 (grub_env_find): Search both the active context and the global
10404 (grub_env_context_open): New function.
10405 (grub_env_context_close): Likewise.
10406 (grub_env_insert): Likewise.
10407 (grub_env_remove): Likewise.
10408 (grub_env_export): Likewise.
10409 (grub_env_set): Changed to use helper functions to avoid code
10411 (grub_env_iterate): Rewritten so both the current context and the
10412 global context are being used.
10414 * normal/command.c (export_command): New function.
10415 (grub_command_init): Register the `export' function.
10417 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
10419 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10420 explicitly to suppress gcc's warnings.
10421 * fs/fat.c (grub_fat_find_dir): Likewise.
10422 (grub_fat_label): Likewise.
10423 * fs/xfs.c (grub_xfs_read_inode): Likewise.
10424 (grub_xfs_mount): Likewise.
10425 (grub_xfs_label): Likewise.
10426 * fs/affs.c (grub_affs_mount): Likewise.
10427 (grub_affs_label): Likewise.
10428 (grub_affs_iterate_dir): Likewise.
10429 * fs/sfs.c (grub_sfs_mount): Likewise.
10430 (grub_sfs_iterate_dir): Likewise.
10431 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10432 * fs/hfs.c (grub_hfs_mount): Likewise.
10433 (grub_hfs_cmp_catkeys): Likewise.
10434 (grub_hfs_find_dir): Likewise.
10435 (grub_hfs_dir): Likewise.
10436 (grub_hfs_label): Likewise.
10437 * fs/jfs.c (grub_jfs_mount): Likewise.
10438 (grub_jfs_opendir): Likewise.
10439 (grub_jfs_getent): Likewise.
10440 (grub_jfs_lookup_symlink): Likewise.
10441 (grub_jfs_label): Likewise.
10442 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10443 (grub_hfsplus_iterate_dir): Likewise.
10444 (grub_hfsplus_btree_iterate_node): Made static.
10446 * util/grub-emu.c (prefix): New variable.
10447 (grub_machine_set_prefix): New function.
10448 (main): Do not set the environment variable "prefix" here. Only
10449 set PREFIX, which is used later by grub_machine_set_prefix.
10451 * include/grub/video.h: Do not include grub/symbol.h.
10452 (grub_video_register): Not exported. This symbol is not defined in
10454 (grub_video_unregister): Likewise.
10455 (grub_video_iterate): Likewise.
10456 (grub_video_setup): Likewise.
10457 (grub_video_restore): Likewise.
10458 (grub_video_get_info): Likewise.
10459 (grub_video_get_blit_format): Likewise.
10460 (grub_video_set_palette): Likewise.
10461 (grub_video_get_palette): Likewise.
10462 (grub_video_set_viewport): Likewise.
10463 (grub_video_get_viewport): Likewise.
10464 (grub_video_map_color): Likewise.
10465 (grub_video_map_rgb): Likewise.
10466 (grub_video_map_rgba): Likewise.
10467 (grub_video_fill_rect): Likewise.
10468 (grub_video_blit_glyph): Likewise.
10469 (grub_video_blit_bitmap): Likewise.
10470 (grub_video_blit_render_target): Likewise.
10471 (grub_video_scroll): Likewise.
10472 (grub_video_swap_buffers): Likewise.
10473 (grub_video_create_render_target): Likewise.
10474 (grub_video_delete_render_target): Likewise.
10475 (grub_video_set_active_render_target): Likewise.
10477 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10479 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10481 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10482 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10483 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10484 instead of $(srcdir)/genkernsyms.sh.
10486 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10487 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10488 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10489 instead of $(srcdir)/genkernsyms.sh.
10491 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10492 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10493 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10494 instead of $(srcdir)/genkernsyms.sh.
10496 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10497 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10498 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10499 instead of $(srcdir)/genkernsyms.sh.
10501 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10504 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10506 (gensymlist.sh): New target.
10507 (genkernsyms.sh): Likewise.
10509 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10510 genkernsyms.sh.in and gensymlist.sh.in.
10512 * genkernsyms.sh: Removed.
10513 * gensymlist.sh: Likewise.
10515 * genkernsyms.sh.in: New file.
10516 * gensymlist.sh.in: Likewise.
10518 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10520 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10521 clobber "prefix", since we may have already set it manually.
10523 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10525 * kern/misc.c (abort): New alias for grub_abort.
10527 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
10529 A new machine-specific function "grub_machine_set_prefix" is
10530 defined. This is called after loading modules, so that a prefix
10531 initialization can use modules. Also, this change adds an
10532 intensive debugging feature for the memory manager via the
10533 configure option "--enable-mm-debug".
10535 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10538 * kern/sparc64/ieee1275/init.c (abort): Removed.
10539 (grub_stop): Likewise.
10540 (grub_exit): New function.
10541 (grub_set_prefix): Renamed to ...
10542 (grub_machine_set_prefix): ... this.
10543 (grub_machine_init): Do not call grub_set_prefix.
10545 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10546 (grub_machine_set_prefix): ... this.
10547 (grub_machine_init): Do not call grub_set_prefix.
10549 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10550 (grub_machine_init): Do not set the prefix here.
10552 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10554 * kern/efi/init.c: Include grub/mm.h.
10555 (grub_efi_set_prefix): New function.
10557 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10558 (grub_efi_get_filename): New function.
10559 (grub_print_device_path): Renamed to ...
10560 (grub_efi_print_device_path): ... this.
10562 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10563 [MM_DEBUG] (grub_realloc): Likewise.
10564 [MM_DEBUG] (grub_free): Likewise.
10565 [MM_DEBUG] (grub_memalign): Likewise.
10566 [MM_DEBUG] (grub_mm_debug): New variable.
10567 [MM_DEBUG] (grub_debug_malloc): New function.
10568 [MM_DEBUG] (grub_debug_free): New function.
10569 [MM_DEBUG] (grub_debug_realloc): New function.
10570 [MM_DEBUG] (grub_debug_memalign): New function.
10572 * kern/misc.c (grub_abort): Print a newline to distinguish
10575 * kern/main.c (grub_main): Call grub_machine_set_prefix and
10576 grub_set_root_dev after loading modules. This is necessary when
10577 setting a prefix depends on modules.
10579 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10580 (grub_efi_print_device_path): ... this.
10581 (grub_efi_get_filename): New prototype.
10582 (grub_efi_set_prefix): Likewise.
10584 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10586 (grub_efidisk_get_device_handle): New prototype.
10587 (grub_efidisk_get_device_name): Likewise.
10589 * include/grub/mm.h: Include config.h.
10590 (MM_DEBUG): Removed.
10591 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10592 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10593 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10594 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10595 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10596 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10597 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10598 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10599 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10601 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10603 * disk/efi/efidisk.c: Include grub/partition.h.
10604 (iterate_child_devices): New function.
10605 (add_device): First, compare only last device path nodes, so that
10606 devices are sorted by the types.
10607 (grub_efidisk_get_device_handle): New function.
10608 (grub_efidisk_get_device_name): Likewise.
10610 * configure.ac (--enable-mm-debug): New option to enable the
10611 memory manager debugging feature. This makes the binary much
10612 bigger, so is disabled by default.
10614 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10616 Use grub_abort instead of grub_stop, and grub_exit must be
10617 define in each architecture now. Also, this change adds support
10620 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10621 (grub_getkey): New function.
10622 (grub_term_get_current): Likewise.
10624 * util/i386/pc/grub-setup.c: Include grub/term.h.
10625 (grub_getkey): New function.
10626 (grub_term_get_current): Likewise.
10628 * util/misc.c (grub_stop): Renamed to ...
10629 (grub_exit): ... this.
10631 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10632 (grub_exit): ... this.
10633 (grub_machine_init): Use grub_abort instead of abort.
10634 (grub_stop): Removed.
10636 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10639 * kern/i386/pc/startup.S (grub_exit): New function.
10640 (cold_reboot): New label.
10642 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10643 (grub_efi_init): Call grub_efidisk_init.
10644 (grub_efi_fini): Call grub_efidisk_fini.
10646 * kern/efi/efi.c: Include grub/mm.h.
10647 (grub_efi_console_control_guid): Renamed to ...
10648 (console_control_guid): ... this.
10649 (grub_efi_loaded_image_guid): Renamed to ...
10650 (loaded_image_guid): ... this.
10651 (grub_efi_locate_handle): New function.
10652 (grub_efi_open_protocol): Likewise.
10653 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10654 GRUB_EFI_CONSOLE_CONTROL_GUID.
10655 (grub_efi_exit): Removed.
10656 (grub_stop): Likewise.
10657 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10658 (grub_exit): New function.
10659 (grub_print_device_path): Likewise.
10661 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10662 (grub_enter_rescue_mode): Register "exit".
10664 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10665 (grub_abort): New function.
10667 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10669 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10671 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10673 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10674 (grub_print_device_path): New prototype.
10675 (grub_efi_locate_handle): Likewise.
10676 (grub_efi_open_protocol): Likewise.
10678 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10679 * disk/efi/efidisk.c: Likewise.
10681 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10683 * include/grub/efi/console_control.h
10684 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10686 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10687 last 8 bytes as an array.
10688 (GRUB_EFI_DISK_IO_GUID): New macro.
10689 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10690 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10691 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10693 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10694 (struct grub_efi_device_path): Rename the member "sub_type" to
10696 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10697 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10698 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10699 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10700 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10701 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10702 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10703 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10704 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10705 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10706 (struct grub_efi_pci_device_path): New structure.
10707 (grub_efi_pci_device_path_t): New type.
10708 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10709 (struct grub_efi_pccard_device_path): New structure.
10710 (grub_efi_pccard_device_path_t): New type.
10711 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10712 (struct grub_efi_memory_mapped_device_path): New structure.
10713 (grub_efi_memory_mapped_device_path_t): New type.
10714 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10715 (struct grub_efi_vendor_device_path): New structure.
10716 (grub_efi_vendor_device_path_t): New type.
10717 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10718 (struct grub_efi_controller_device_path): New structure.
10719 (grub_efi_controller_device_path_t): New type.
10720 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10721 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10722 (struct grub_efi_acpi_device_path): New structure.
10723 (grub_efi_acpi_device_path_t): New type.
10724 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10725 (struct grub_efi_expanded_acpi_device_path): New structure.
10726 (grub_efi_expanded_acpi_device_path_t): New type.
10727 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10728 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10729 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10730 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10731 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10732 (struct grub_efi_atapi_device_path): New structure.
10733 (grub_efi_atapi_device_path_t): New type.
10734 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10735 (struct grub_efi_fibre_channel_device_path): New structure.
10736 (grub_efi_fibre_channel_device_path_t): New type.
10737 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10738 (struct grub_efi_1394_device_path): New structure.
10739 (grub_efi_1394_device_path_t): New type.
10740 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10741 (struct grub_efi_usb_device_path): New structure.
10742 (grub_efi_usb_device_path_t): New type.
10743 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10744 (struct grub_efi_usb_class_device_path): New structure.
10745 (grub_efi_usb_class_device_path_t): New type.
10746 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10747 (struct grub_efi_i2o_device_path): New structure.
10748 (grub_efi_i2o_device_path_t): New type.
10749 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10750 (struct grub_efi_mac_address_device_path): New structure.
10751 (grub_efi_mac_address_device_path_t): New type.
10752 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10753 (struct grub_efi_ipv4_device_path): New structure.
10754 (grub_efi_ipv4_device_path_t): New type.
10755 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10756 (struct grub_efi_ipv6_device_path): New structure.
10757 (grub_efi_ipv6_device_path_t): New type.
10758 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10759 (struct grub_efi_infiniband_device_path): New structure.
10760 (grub_efi_infiniband_device_path_t): New type.
10761 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10762 (struct grub_efi_uart_device_path): New structure.
10763 (grub_efi_uart_device_path_t): New type.
10764 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10765 (struct grub_efi_vendor_messaging_device_path): New structure.
10766 (grub_efi_vendor_messaging_device_path_t): New type.
10767 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10768 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10769 (struct grub_efi_hard_drive_device_path): New structure.
10770 (grub_efi_hard_drive_device_path_t): New type.
10771 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10772 (struct grub_efi_cdrom_device_path): New structure.
10773 (grub_efi_cdrom_device_path_t): New type.
10774 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10775 (struct grub_efi_vendor_media_device_path): New structure.
10776 (grub_efi_vendor_media_device_path_t): New type.
10777 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10778 (struct grub_efi_file_path_device_path): New structure.
10779 (grub_efi_file_path_device_path_t): New type.
10780 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10781 (struct grub_efi_protocol_device_path): New structure.
10782 (grub_efi_protocol_device_path_t): New type.
10783 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10784 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10785 (struct grub_efi_bios_device_path): New structure.
10786 (grub_efi_bios_device_path_t): New type.
10787 (struct grub_efi_disk_io): New structure.
10788 (grub_efi_disk_io_t): New type.
10789 (struct grub_efi_block_io_media): New structure.
10790 (grub_efi_block_io_media_t): New type.
10791 (struct grub_efi_block_io): New structure.
10792 (grub_efi_block_io_t): New type.
10794 * include/grub/misc.h (grub_stop): Removed.
10795 (grub_exit): New prototype.
10796 (grub_abort): Likewise.
10798 * include/grub/disk.h (enum grub_disk_dev_id): Added
10799 GRUB_DISK_DEVICE_EFIDISK_ID.
10801 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10802 disk/efi/efidisk.c.
10803 (kernel_syms.lst): Remove the target if an error occurs.
10805 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10807 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10808 as it was simply too buggy.
10810 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10812 * kern/misc.c (grub_lltoa): New function.
10813 (grub_vsprintf): Added support for the long long suffix,
10816 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10818 * Makefile.in (LDFLAGS): Add variable.
10819 (LD): Remove variable.
10820 * configure.ac: Add -m32 to LDFLAGS.
10821 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10822 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10823 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10824 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10825 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10827 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10828 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10829 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10831 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10833 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10834 length for unknown glyph.
10836 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10838 Add support for pre-loaded modules into the EFI port.
10840 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10841 completely. Accept one more argument DIR. The caller has changed.
10843 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10845 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10846 (grub_efi_loaded_image_guid): New variable.
10847 (grub_efi_get_loaded_image): New function.
10848 (grub_arch_modules_addr): Likewise.
10850 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10853 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10854 (struct grub_efi_loaded_image): New structure.
10855 (grub_efi_loaded_image_t): New type.
10857 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10859 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10860 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10861 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10863 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10865 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10867 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10869 * DISTLIST: Added include/grub/efi/console.h,
10870 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10871 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10873 * include/grub/efi/console.h: New file.
10874 * include/grub/efi/time.h: Likewise.
10875 * include/grub/i386/efi/kernel.h: Likewise.
10876 * kern/efi/init.c: Likewise.
10877 * kern/efi/mm.c: Likewise.
10878 * term/efi/console.c: Likewise.
10880 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10881 (grub_stop): Removed.
10882 (grub_get_rtc): Likewise.
10883 (grub_machine_init): Simply call grub_efi_init.
10884 (grub_machine_fini): Call grub_efi_fini.
10886 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10887 (grub_efi_output_string): Removed.
10888 (grub_efi_stall): New function.
10889 (grub_stop): Likewise.
10890 (grub_get_rtc): Likewise.
10892 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10893 (grub_efi_stall): New prototype.
10894 (grub_efi_allocate_pages): Likewise.
10895 (grub_efi_free_pages): Likewise.
10896 (grub_efi_get_memory_map): Likewise.
10897 (grub_efi_mm_init): Likewise.
10898 (grub_efi_mm_fini): Likewise.
10899 (grub_efi_init): Likewise.
10900 (grub_efi_fini): Likewise.
10902 * include/grub/i386/efi/time.h: Do not include
10903 grub/symbol.h. Include grub/efi/time.h.
10904 (GRUB_TICKS_PER_SECOND): Removed.
10905 (grub_get_rtc): Likewise.
10907 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10908 Added padding. The EFI spec is buggy.
10909 (GRUB_EFI_BLACK): New macro.
10910 (GRUB_EFI_BLUE): Likewise.
10911 (GRUB_EFI_GREEN): Likewise.
10912 (GRUB_EFI_CYAN): Likewise.
10913 (GRUB_EFI_RED): Likewise.
10914 (GRUB_EFI_MAGENTA): Likewise.
10915 (GRUB_EFI_BROWN): Likewise.
10916 (GRUB_EFI_LIGHTGRAY): Likewise.
10917 (GRUB_EFI_BRIGHT): Likewise.
10918 (GRUB_EFI_DARKGRAY): Likewise.
10919 (GRUB_EFI_LIGHTBLUE): Likewise.
10920 (GRUB_EFI_LIGHTGREEN): Likewise.
10921 (GRUB_EFI_LIGHTCYAN): Likewise.
10922 (GRUB_EFI_LIGHTRED): Likewise.
10923 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10924 (GRUB_EFI_YELLOW): Likewise.
10925 (GRUB_EFI_WHITE): Likewise.
10926 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10927 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10928 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10929 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10930 (GRUB_EFI_BACKGROUND_RED): Likewise.
10931 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10932 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10933 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10934 (GRUB_EFI_TEXT_ATTR): Likewise.
10936 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10937 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10938 (kernel_mod_HEADERS): Added efi/time.h.
10940 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10942 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10943 include/grub/efi/api.h, include/grub/efi/console_control.h,
10944 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10945 include/grub/i386/efi/time.h, kern/efi/efi.c,
10946 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10947 and util/i386/efi/grub-mkimage.c.
10949 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10951 * genmk.rb (PModule#rule): Do not export symbols if
10952 #{prefix}_EXPORTS is set to "no".
10954 * conf/i386-efi.mk: New file.
10955 * conf/i386-efi.rmk: Likewise.
10956 * include/grub/efi/api.h: Likewise.
10957 * include/grub/efi/console_control.h: Likewise.
10958 * include/grub/efi/efi.h: Likewise.
10959 * include/grub/efi/pe32.h: Likewise.
10960 * include/grub/i386/efi/time.h: Likewise.
10961 * kern/efi/efi.c: Likewise.
10962 * kern/i386/efi/init.c: Likewise.
10963 * kern/i386/efi/startup.S: Likewise.
10964 * util/i386/efi/grub-mkimage.c: Likewise.
10966 2006-04-17 Marco Gerards <marco@gnu.org>
10968 * include/grub/script.h: Include <grub/parser.h> and
10969 "grub_script.tab.h".
10970 (struct grub_lexer_param): New struct.
10971 (struct grub_parser_param): Likewise.
10972 (grub_script_create_arglist): Pass the state in an argument.
10973 (grub_script_add_arglist): Likewise.
10974 (grub_script_create_cmdline): Likewise.
10975 (grub_script_create_cmdblock): Likewise.
10976 (grub_script_create_cmdif): Likewise.
10977 (grub_script_create_cmdmenu): Likewise.
10978 (grub_script_add_cmd): Likewise.
10979 (grub_script_arg_add): Likewise.
10980 (grub_script_lexer_ref): Likewise.
10981 (grub_script_lexer_deref): Likewise.
10982 (grub_script_lexer_record_start): Likewise.
10983 (grub_script_lexer_record_stop): Likewise.
10984 (grub_script_mem_record): Likewise.
10985 (grub_script_mem_record_stop): Likewise.
10986 (grub_script_malloc): Likewise.
10987 (grub_script_yylex): Likewise.
10988 (grub_script_yyparse): Likewise.
10989 (grub_script_yyerror): Likewise.
10990 (grub_script_yylex): Likewise.
10991 (grub_script_lexer_init): Return the state.
10993 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10994 (grub_script_lexer_done): Likewise.
10995 (grub_script_lexer_getline): Likewise.
10996 (grub_script_lexer_refs): Likewise.
10997 (script): Likewise.
10998 (newscript): Likewise.
10999 (record): Likewise.
11000 (recording): Likewise.
11001 (recordpos): Likewise.
11002 (recordlen): Likewise.
11003 (grub_script_lexer_init): Return the state instead of setting
11005 (grub_script_lexer_ref): Use the newly added argument for state
11006 instead of globals.
11007 (grub_script_lexer_deref): Likewise.
11008 (grub_script_lexer_record_start): Likewise.
11009 (grub_script_lexer_record_stop): Likewise.
11010 (recordchar): Likewise.
11011 (nextchar): Likewise.
11012 (grub_script_yylex2): Likewise.
11013 (grub_script_yylex): Likewise.
11014 (grub_script_yyerror): Likewise.
11016 * normal/parser.y (func_mem): Removed variable.
11017 (menu_entry): Likewise.
11019 (%lex-param): New parser option.
11020 (%parse-param): Likewise.
11021 (script): Always return the AST.
11022 (argument): Pass the state around.
11023 (arguments): Likewise.
11024 (grubcmd): Likewise.
11025 (commands): Likewise.
11026 (function): Likewise.
11027 (menuentry): Likewise.
11028 (if_statement): Likewise.
11031 * normal/script.c (grub_script_memused): Removed variable.
11032 (grub_script_parsed): Likewise.
11033 (grub_script_malloc): Added a state argument. Use that instead of
11035 (grub_script_mem_record): Likewise.
11036 (grub_script_mem_record_stop): Likewise.
11037 (grub_script_arg_add): Likewise.
11038 (grub_script_add_arglist): Likewise.
11039 (grub_script_create_cmdline): Likewise.
11040 (grub_script_create_cmdif): Likewise.
11041 (grub_script_create_cmdmenu): Likewise.
11042 (grub_script_add_cmd): Likewise.
11043 (grub_script_parse): Setup the state before calling the parser.
11045 2006-04-16 Marco Gerards <marco@gnu.org>
11047 * normal/command.c (grub_command_init): Remove the title command.
11049 * normal/lexer.c (grub_script_yylex): Renamed from this...
11050 (grub_script_yylex2): ... to this.
11051 (grub_script_yylex): New function. Temporary
11052 introduced to filter some tokens.
11053 (grub_script_yyerror): Print a newline.
11055 * normal/main.c (read_config_file): Output information about the
11056 lines that contain errors. Wait for a key after all lines have
11057 been processed. Don't return an empty menu.
11059 * normal/parser.y (func_mem): Don't initialize.
11060 (menu_entry): Likewise.
11061 (err): New variable.
11062 (script): Don't return anything when an error was encountered.
11063 (ws, returns): Removed rules.
11064 (argument): Disabled concatenated variable support.
11065 (arguments): Remove explicit separators.
11066 (grubcmd): Likewise.
11067 (function): Likewise.
11068 (menuentry): Likewise.
11070 (commands): Likewise. Add error handling.
11072 * normal/script.c (grub_script_create_cmdline): If
11073 `grub_script_parsed' is 0, assume the parser encountered an error.
11075 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11077 * configure.ac: Add support for EFI. Fix the typo
11078 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11080 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11082 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11083 foreign multibyte characters should be shown correctly.
11085 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11087 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11089 (read_config_file): Made it to close file before returning.
11091 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11093 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11094 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11095 video/i386/pc/vbefill.c.
11097 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11098 video/i386/pc/vbefill.c.
11100 * include/grub/video.h (grub_video_blit_format): New enum.
11101 (grub_video_mode_info): Added new member blit_format.
11102 (grub_video_get_blit_format): New function prototype.
11104 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11105 function prototype.
11106 (grub_video_vbe_map_rgb): Likewise.
11107 (grub_video_vbe_unmap_color): Likewise.
11109 * include/grub/i386/pc/vbeblit.h: New file.
11111 * include/grub/i386/pc/vbefill.h: New file.
11113 * video/video.c (grub_video_get_blit_format): New function.
11114 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11115 (grub_video_vbe_map_rgb): Likewise.
11116 (grub_video_vbe_unmap_color): Likewise.
11118 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11120 (grub_video_vbe_blit_render_target): Changed to use more optimized
11122 (grub_video_vbe_setup): Added detection for optimized settings.
11123 (grub_video_vbe_create_render_target): Likewise.
11125 * video/i386/pc/vbeblit.c: New file.
11127 * video/i386/pc/vbefill.c: New file.
11129 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
11131 * font/manager.c (grub_font_get_glyph): Removed font fixup from
11134 * util/unifont2pff.rb: ... and moved it to here. Improved argument
11135 parsing to support both hex and dec ranges. If filename was missing
11136 show usage information.
11138 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
11140 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11141 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
11143 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11144 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
11145 (video_mod_SOURCES): Added.
11146 (video_mod_CFLAGS): Likewise.
11147 (video_mod_LDFLAGS): Likewise.
11148 (gfxterm_mod_SOURCES): Likewise.
11149 (gfxterm_mod_CFLAGS): Likewise.
11150 (gfxterm_mod_LDFLAGS): Likewise.
11151 (videotest_mod_SOURCES): Likewise.
11152 (videotest_mod_CFLAGS): Likewise.
11153 (videotest_mod_LDFLAGS): Likewise.
11154 (vesafb_mod_SOURCES): Removed.
11155 (vesafb_mod_CFLAGS): Likewise.
11156 (vesafb_mod_LDFLAGS): Likewise.
11157 (vga_mod_SOURCES): Likewise.
11158 (vga_mod_CFLAGS): Likewise.
11159 (vga_mod_LDFLAGS): Likewise.
11161 * commands/videotest.c: New file.
11163 * font/manager.c (fill_with_default_glyph): Modified to use
11165 (grub_font_get_glyph): Likewise.
11166 (fontmanager): Renamed from this...
11167 (font_manager): ... to this.
11169 * include/grub/font.h (grub_font_glyph): Added new structure.
11170 (grub_font_get_glyph): Modified to use grub_font_glyph.
11172 * include/grub/misc.h (grub_abs): Added as inline function.
11174 * include/grub/video.h: New file.
11176 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11177 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11178 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11179 (grub_vbe_get_controller_info): Renamed from this...
11180 (grub_vbe_bios_get_controller_info): ... to this.
11181 (grub_vbe_get_mode_info): Renamed from this...
11182 (grub_vbe_bios_get_mode_info): ... to this.
11183 (grub_vbe_set_mode): Renamed from this...
11184 (grub_vbe_bios_set_mode): ... to this.
11185 (grub_vbe_get_mode): Renamed from this...
11186 (grub_vbe_bios_get_mode): ... to this.
11187 (grub_vbe_set_memory_window): Renamed from this...
11188 (grub_vbe_bios_set_memory_window): ... to this.
11189 (grub_vbe_get_memory_window): Renamed from this...
11190 (grub_vbe_bios_get_memory_window): ... to this.
11191 (grub_vbe_set_scanline_length): Renamed from this...
11192 (grub_vbe_set_scanline_length): ... to this.
11193 (grub_vbe_get_scanline_length): Renamed from this...
11194 (grub_vbe_bios_get_scanline_length): ... to this.
11195 (grub_vbe_set_display_start): Renamed from this...
11196 (grub_vbe_bios_set_display_start): ... to this.
11197 (grub_vbe_get_display_start): Renamed from this...
11198 (grub_vbe_bios_get_display_start): ... to this.
11199 (grub_vbe_set_palette_data): Renamed from this...
11200 (grub_vbe_bios_set_palette_data): ... to this.
11201 (grub_vbe_set_pixel_rgb): Removed.
11202 (grub_vbe_set_pixel_index): Likewise.
11204 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11206 (grub_vbe_bios_get_controller_info): ... to this.
11207 (grub_vbe_get_mode_info): Renamed from this...
11208 (grub_vbe_bios_get_mode_info): ... to this.
11209 (grub_vbe_set_mode): Renamed from this...
11210 (grub_vbe_bios_set_mode): ... to this.
11211 (grub_vbe_get_mode): Renamed from this...
11212 (grub_vbe_bios_get_mode): ... to this.
11213 (grub_vbe_set_memory_window): Renamed from this...
11214 (grub_vbe_bios_set_memory_window): ... to this.
11215 (grub_vbe_get_memory_window): Renamed from this...
11216 (grub_vbe_bios_get_memory_window): ... to this.
11217 (grub_vbe_set_scanline_length): Renamed from this...
11218 (grub_vbe_set_scanline_length): ... to this.
11219 (grub_vbe_get_scanline_length): Renamed from this...
11220 (grub_vbe_bios_get_scanline_length): ... to this.
11221 (grub_vbe_set_display_start): Renamed from this...
11222 (grub_vbe_bios_set_display_start): ... to this.
11223 (grub_vbe_get_display_start): Renamed from this...
11224 (grub_vbe_bios_get_display_start): ... to this.
11225 (grub_vbe_set_palette_data): Renamed from this...
11226 (grub_vbe_bios_set_palette_data): ... to this.
11227 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11228 getting corrupted after calling it. Added more pushes and pops.
11229 (grub_vbe_bios_set_mode): Likewise.
11230 (grub_vbe_bios_get_mode): Likewise.
11231 (grub_vbe_bios_get_memory_window): Likewise.
11232 (grub_vbe_bios_set_scanline_length): Likewise.
11233 (grub_vbe_bios_get_scanline_length): Likewise.
11234 (grub_vbe_bios_get_display_start): Likewise.
11235 (grub_vbe_bios_set_palette_data): Likewise.
11237 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11238 (cl_insert): Likewise.
11239 (cl_delete): Likewise.
11241 * term/gfxterm.c: New file.
11243 * term/i386/pc/vesafb.c: Removed file.
11245 * video/video.c: New file.
11247 * video/i386/pc/vbe.c (real2pm): Added new function.
11248 (grub_video_vbe_draw_pixel): Likewise.
11249 (grub_video_vbe_get_video_ptr): Likewise.
11250 (grub_video_vbe_get_pixel): Likewise
11251 (grub_video_vbe_init): Likewise.
11252 (grub_video_vbe_fini): Likewise.
11253 (grub_video_vbe_setup): Likewise.
11254 (grub_video_vbe_get_info): Likewise.
11255 (grub_video_vbe_set_palette): Likewise.
11256 (grub_video_vbe_get_palette): Likewise.
11257 (grub_video_vbe_set_viewport): Likewise.
11258 (grub_video_vbe_get_viewport): Likewise.
11259 (grub_video_vbe_map_color): Likewise.
11260 (grub_video_vbe_map_rgb): Likewise.
11261 (grub_video_vbe_map_rgba): Likewise.
11262 (grub_video_vbe_unmap_color): Likewise.
11263 (grub_video_vbe_fill_rect): Likewise.
11264 (grub_video_vbe_blit_glyph): Likewise.
11265 (grub_video_vbe_blit_bitmap): Likewise.
11266 (grub_video_vbe_blit_render_target): Likewise.
11267 (grub_video_vbe_scroll): Likewise.
11268 (grub_video_vbe_swap_buffers): Likewise.
11269 (grub_video_vbe_create_render_target): Likewise.
11270 (grub_video_vbe_delete_render_target): Likewise.
11271 (grub_video_vbe_set_active_render_target): Likewise.
11272 (grub_vbe_set_pixel_rgb): Remove function.
11273 (grub_vbe_set_pixel_index): Likewise.
11274 (index_color_mode): Remove static variable.
11275 (active_mode): Likewise.
11276 (framebuffer): Likewise.
11277 (bytes_per_scan_line): Likewise.
11278 (grub_video_vbe_adapter): Added new static variable.
11279 (framebuffer): Likewise.
11280 (render_target): Likewise.
11281 (initial_mode): Likewise.
11282 (mode_in_use): Likewise.
11283 (mode_list): Likewise.
11285 2006-03-10 Marco Gerards <marco@gnu.org>
11287 * configure.ac (AC_INIT): Bumped to 1.93.
11289 * DISTLIST: Added `include/grub/hfs.h'.
11291 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11293 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11294 18H, which might help the BIOS falling back to next boot media.
11296 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11298 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11299 Poe Chen <poe.poechen@gmail.com>.
11301 2006-01-17 Marco Gerards <marco@gnu.org>
11303 * include/grub/normal.h: Include <grub/script.h>.
11304 (grub_command_list): Removed struct.
11305 (grub_command_list_t): Removed type.
11306 (grub_menu_entry): Remove members `num' and `command_list'. Add
11307 members `commands' and `sourcecode'.
11308 * include/grub/script.h: Add inclusion guards.
11309 (grub_script_cmd_menuentry): New struct.
11310 (grub_script_execute_menuentry): New prototype.
11311 (grub_script_lexer_record_start): Likewise.
11312 (grub_script_lexer_record_stop): Likewise.
11313 * normal/execute.c (grub_script_execute_menuentry): New function.
11314 * normal/lexer.c (record, recording, recordpos, recordlen): New
11316 (grub_script_lexer_record_start): New function.
11317 (grub_script_lexer_record_stop): Likewise.
11318 (recordchar): Likewise.
11319 (nextchar): Likewise.
11320 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
11321 2048 as the buffer size. Add the tokens `menuentry' and `@'.
11322 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11323 (current_menu): New variable.
11324 (free_menu): Mainly rewritten.
11325 (grub_normal_menu_addentry): New function.
11326 (read_config_file): Rewritten.
11327 * normal/menu.c (run_menu_entry): Mainly rewritten.
11328 * normal/menu_entry.c (make_screen): Rewritten the code to insert
11330 (run): Mainly rewritten.
11331 * normal/parser.y (menu_entry): New variable.
11332 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11333 (menuentry): New rule.
11334 (command): Add `menuentry'.
11335 (if_statement): Allow additional returns before `fi'.
11336 * normal/script.c (grub_script_create_cmdmenu): New function.
11338 2006-01-03 Marco Gerards <marco@gnu.org>
11340 * INSTALL: GNU Bison is required.
11341 * configure.ac: Rewritten the test to detect Bison.
11342 * Makefile.in (YACC): New variable. Reported by Xun Sun
11343 <xun.sun.cn@gmail.com>.
11345 2006-01-03 Marco Gerards <marco@gnu.org>
11347 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
11348 the HFS+ filesystem to filesystem blocks.
11349 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
11350 GCC warning is silenced.
11352 2006-01-03 Marco Gerards <marco@gnu.org>
11354 * partmap/apple.c (apple_partition_map_iterate): Convert the data
11355 read from disk from big endian to host byte order.
11357 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
11359 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
11361 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
11362 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
11363 embedded HFS+ filesystem.
11364 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
11365 (grub_hfs_sblock): Move from here...
11366 * include/grub/hfs.h: To here... New file.
11367 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
11369 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
11371 (grub_hfsplus_volheader): Change type of member `magic' to
11373 (grub_hfsplus_data): Add new member `embedded_offset'.
11374 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
11376 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
11377 Calculate the offset.
11379 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11381 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
11383 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
11385 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11387 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
11388 ENV->NAME is NULL after allocating ENV->VALUE.
11390 2005-12-25 Marco Gerards <marco@gnu.org>
11392 * kern/env.c (grub_env_set): Rewritten the error handling code.
11394 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11396 * geninit.sh: Made more robust, and more portable.
11398 2005-12-25 Marco Gerards <marco@gnu.org>
11400 Add support for Apple HFS+ filesystems.
11402 * fs/hfsplus.c: New file.
11404 * DISTLIST: Added `fs/hfsplus.c'.
11406 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11407 (hfsplus_mod_SOURCES): New variable.
11408 (hfsplus_mod_CFLAGS): Likewise.
11409 (hfsplus_mod_LDFLAGS): Likewise.
11410 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11411 (grub_setup_SOURCES): Likewise.
11412 (grub_mkdevicemap_SOURCES): Likewise.
11413 (grub_emu_SOURCES): Likewise.
11414 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11416 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11418 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11420 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11422 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11423 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11424 include/grub/parser.h, include/grub/script.h, kern/parser.c,
11425 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11426 normal/lexer.c, normal/parser.y, normal/script.c, and
11428 Removed kern/sparc64/cache.c.
11430 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11431 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11434 * configure.ac (AC_INIT): Bumped to 1.92.
11436 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
11438 * kern/err.c (grub_error_push): Added new function to support error
11440 (grub_error_pop): Likewise.
11441 (grub_error_stack_items): New local variable to support error stacks.
11442 (grub_error_stack_pos): Likewise.
11443 (grub_error_stack_assert): Likewise.
11444 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11446 (grub_print_error): Added support to print errors from error stack.
11448 * include/grub/err.h (grub_error_push): Added function prototype.
11449 (grub_error_pop): Likewise.
11451 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
11453 * configure.ac: Accept `powerpc64' as host_cpu.
11454 (amd64): Rename to `biarch32'.
11456 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11457 non-cacheline-aligned addresses.
11459 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11460 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11461 if `size' is non-zero.
11463 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
11465 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11466 and `cd' to make sure the filename is not prefixed with a
11468 (pkgdata_MODULES): Add `gpt.mod'.
11469 (gpt_mod_SOURCES): New variable.
11470 (gpt_mod_CFLAGS): Likewise.
11471 (gpt_mod_LDFLAGS): Likewise.
11473 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11475 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11478 * partmap/gpt.c: New file.
11480 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11481 GPT partition map is detected.
11483 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
11485 * commands/i386/pc/play.c: New file.
11486 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11487 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11490 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
11492 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11493 ((unused))' to silence gcc warning.
11495 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
11497 * configure.ac: Correct `AC_PROG_YACC' test.
11499 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11501 * util/powerpc/ieee1275/grub-install.in: Run the mount point
11502 check before installing files.
11504 2005-11-22 Mike Small <smallm@panix.com>
11506 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11507 number regex so multidigit numbers are recognized correctly.
11509 2005-11-22 Mike Small <smallm@panix.com>
11511 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11512 debugging message before attempting to claim memory.
11513 (grub_rescue_cmd_initrd): Add a claim debugging message and try
11514 multiple addresses in case of failure.
11516 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11518 * term/tparm.c (get_space): Remove empty `if' statement.
11520 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11522 * kern/parser.c (check_varstate): Rename `state' to 's'.
11524 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11526 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
11527 variable definitions to the beginning of each function. Sort stack
11529 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
11530 `buf' argument to `char *'.
11532 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11534 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11535 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11536 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11537 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11538 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11539 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11540 configfile.mod, search.mod, gzio.mod and test.mod.
11541 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11542 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11543 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11544 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11545 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11546 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11547 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11548 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11549 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11550 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11551 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11552 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11553 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11554 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11555 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11556 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11557 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11558 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11559 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11560 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11561 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11562 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11563 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11565 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11567 (pkgdata_MODULES): Add test.mod.
11569 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11571 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
11572 appending to variables with "+=".
11573 (PModule): Use full pathname to generate *.lst filenames.
11575 * Makefile.in: Fixed list rules moved from genmk.rb.
11576 (.DELETE_ON_ERROR): New special target.
11577 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11579 * conf/i386-pc.rmk: Include conf/common.mk.
11580 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11581 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11582 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11583 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11584 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11585 configfile.mod, search.mod, gzio.mod and test.mod.
11586 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11587 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11588 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11589 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11590 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11591 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11592 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11593 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11594 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11595 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11596 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11597 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11598 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11599 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11600 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11601 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11602 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11603 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11604 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11605 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11606 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11607 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11608 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11610 * conf/common.rmk: ... to here. New file.
11612 * conf/common.mk: New file.
11614 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11616 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11617 (grub_script.tab.c): ... here.
11619 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11620 (grub_script.tab.c): ... here.
11622 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11623 (grub_script.tab.c): ... here.
11625 * normal/command.c (grub_command_find): Fixed a memory leak of
11626 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11628 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11630 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11631 "@" which marks the start of a comment on ARM.
11632 (VARIABLE): Likewise.
11634 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11636 Add support for Linux/ADFS partition tables.
11638 * partmap/acorn.c: New file.
11640 * include/grub/acorn_filecore.h: Likewise.
11642 * DISTLIST: Added `partmap/acorn.c' and
11643 `include/grub/acorn_filecore.h'.
11645 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11647 (pkgdata_MODULES): Add `acorn.mod'.
11648 (acorn_mod_SOURCES): New variable.
11649 (acorn_mod_CFLAGS): Likewise.
11651 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11653 (pkgdata_MODULES): Add `acorn.mod'.
11654 (acorn_mod_SOURCES): New variable.
11655 (acorn_mod_CFLAGS): Likewise.
11657 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11658 (pkgdata_MODULES): Add `acorn.mod'.
11659 (acorn_mod_SOURCES): New variable.
11660 (acorn_mod_CFLAGS): Likewise.
11661 (acorn_mod_LDFLAGS): Likewise.
11663 * include/types.h (grub_disk_addr_t): New typedef.
11665 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
11667 * geninit.sh: New file.
11669 * geninitheader.sh: Likewise.
11671 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11672 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11673 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11674 * commands/configfile.c (grub_configfile_init)
11675 (grub_configfile_fini): Likewise.
11676 * commands/default.c (grub_default_init, grub_default_fini):
11678 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11679 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11680 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11681 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11683 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11684 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11686 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11687 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11689 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11691 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11693 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11694 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11695 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11696 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11697 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11698 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11699 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11700 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11701 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11702 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11703 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11704 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11705 * partmap/amiga.c (grub_amiga_partition_map_init)
11706 (grub_amiga_partition_map_fini): Likewise.
11707 * partmap/apple.c (grub_apple_partition_map_init)
11708 (grub_apple_partition_map_fini): Likewise.
11709 * partmap/pc.c (grub_pc_partition_map_init)
11710 (grub_pc_partition_map_fini): Likewise.
11711 * partmap/sun.c (grub_sun_partition_map_init,
11712 grub_sun_partition_map_fini): Likewise.
11713 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11716 * util/grub-emu.c: Include <grub_modules_init.h>.
11717 (main): Don't initialize and de-initialize any modules directly,
11718 use `grub_init_all' and `grub_fini_all' instead.
11720 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11721 `grub_vesafb_mod_init'.
11722 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11724 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11725 `grub_vga_mod_init'. Updated all users.
11726 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
11728 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11729 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11732 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11733 Generate a function to initialize the module in utilities.
11734 Updated all callers.
11735 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11736 initialize the module in utilities. Updated all callers.
11738 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11740 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11741 escape sequence and a literal ^L to clear the screen.
11743 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11744 when returning from Open Firmware.
11746 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11748 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11749 (grub_ofconsole_height): Likewise.
11750 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11751 manually insert a '\n'.
11752 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11753 `grub_ofconsole_height'. Return early if these are already set.
11755 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11757 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11758 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11759 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11760 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11761 and `normal/script.c'.
11762 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11763 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11764 (test_mod_SOURCES): New variable.
11765 (test_mod_CFLAGS): Likewise.
11766 (test_mod_LDFLAGS): Likewise.
11767 (pkgdata_MODULES): Add `test.mod'.
11768 (grub_script.tab.c): New rule.
11769 (grub_script.tab.h): Likewise.
11771 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
11773 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11774 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11775 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11776 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11777 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11778 (test_mod_SOURCES): New variable.
11779 (test_mod_CFLAGS): Likewise.
11780 (pkgdata_MODULES): Add `test.mod'.
11781 (grub_script.tab.c): New rule.
11782 (grub_script.tab.h): Likewise.
11784 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
11786 Add initial scripting support.
11788 * commands/test.c: New file.
11789 * include/grub/script.h: Likewise.
11790 * normal/execute.c: Likewise.
11791 * normal/function.c: Likewise.
11792 * normal/lexer.c: Likewise.
11793 * normal/parser.y: Likewise.
11794 * normal/script.c: Likewise.
11796 * configure.ac: Add `AC_PROG_YACC' test.
11798 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11799 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11800 `normal/function.c' and `normal/script.c'.
11801 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11802 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11803 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11805 (pkgdata_MODULES): Add `test.mod'.
11806 (grub_script.tab.c): New rule.
11807 (grub_script.tab.h): Likewise.
11809 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11811 * include/grub/normal.h (grub_test_init): New prototype.
11812 (grub_test_fini): Likewise.
11814 * normal/command.c: Include <grub/script.h>.
11815 (grub_command_execute): Rewritten.
11817 * util/grub-emu.c (main): Call `grub_test_init' and
11820 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11822 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11824 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11825 there are no pending characters.
11827 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11829 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11830 `grub_strndup' to drop device arguments. Replace unnecessary
11831 `grub_strndup' with `grub_strdup'.
11833 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11835 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11836 `debug' environment variable has been set.
11838 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
11840 * Makefile.in (install-local): Use $(DATA).
11841 (uninstall): Likewise.
11842 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11843 (sbin_UTILITIES): ... to here.
11844 (sbin_SCRIPTS): New variable.
11845 (grub_install_SOURCES): New variable.
11846 * util/powerpc/ieee1275/grub-install.in: New file.
11847 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11849 (add_segments): Call `grub_util_get_path'.
11851 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11853 From Timothy Baldwin:
11854 * commands/ls.c (grub_ls_list_files): Close FILE with
11856 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11858 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
11860 * include/grub/parser.h: New file.
11862 * kern/parser.c: Likewise.
11864 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11865 (grub_setup_SOURCES): Likewise.
11866 (grub_probefs_SOURCES): Likewise.
11867 (grub_emu_SOURCES): Likewise.
11868 (kernel_img_HEADERS): Add `parser.h'.
11870 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11871 (grub_emu_SOURCES): Add `kern/parser.c'.
11872 (grubof_SOURCES): Likewise.
11874 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11875 (grubof_SOURCES): Add `kern/parser.c'.
11877 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11879 * kern/misc.c (grub_split_cmdline): Removed function.
11881 * kern/rescue.c: Include <grub/parser.h>.
11882 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11883 of `grub_split_cmdline'.
11885 * normal/command.c: Include <grub/parser.h>.
11886 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11887 of `grub_split_cmdline'.
11889 * normal/completion.c: Include <grub/parser.h>.
11890 (cmdline_state): New variable.
11891 (iterate_dir): End the filename with a quote depending on the
11892 command line state.
11893 (get_state): new function.
11894 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11895 split the arguments and determine the current argument. When the
11896 argument string is not quoted, escape all spaces.
11898 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11900 * normal/sparc64/setjmp.S: New file.
11902 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11904 * include/grub/sparc64/libgcc.h: New file.
11905 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11906 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11907 normal/sparc64/setjmp.c.
11909 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11911 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11912 * kern/sparc64/cache.S: New file.
11913 * kern/sparc64/cache.c: Removed.
11914 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11915 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11917 (COMMON_LDFLAGS): Add -melf64_sparc.
11918 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11919 (grubof_SOURCES): Use cache.S instead of cache.c.
11920 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11921 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11922 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11924 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11925 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11926 (linux_mod_CFLAGS): Commented out.
11927 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11928 out because module isn't built.
11929 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11930 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11931 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11932 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11933 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11934 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11935 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11936 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11937 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11938 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11939 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11940 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11941 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11942 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11944 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11946 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11947 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11948 longer, because HFS should not be used on PC.
11950 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11952 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11953 consistently within the loop.
11955 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
11957 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11958 directory can not be read.
11960 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11962 * configure.ac (AC_INIT): Increase the version number to 1.91.
11964 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11965 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11966 term/i386/pc/serial.c.
11968 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11970 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11971 file size must be permitted.
11973 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11974 between %ah and %al.
11976 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11978 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11980 Call the hook with a NUL-terminated filename.
11981 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11984 * kern/term.c (cursor_state): New variable.
11985 (grub_term_set_current): Reset the cursor state on a new
11987 (grub_setcursor): Rewritten to use CURSOR_STATE.
11988 (grub_getcursor): New function.
11990 * include/grub/term.h (grub_getcursor): New prototype.
11992 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11993 integers on ARM. Reported by Timothy Baldwin
11994 <T.E.Baldwin99@members.leeds.ac.uk>.
11996 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
11998 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12000 (grub_sfs_dir): Likewise.
12002 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
12004 Add support for the SFS filesystem.
12006 * fs/sfs.c: New file.
12008 * DISTLIST: Added `fs/sfs.c'.
12010 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12011 (grub_probefs_SOURCES): Likewise.
12012 (grub_emu_SOURCES): Likewise.
12013 (pkgdata_MODULES): Add `sfs.mod'.
12014 (sfs_mod_SOURCES): New variable.
12015 (sfs_mod_CFLAGS): Likewise.
12016 (sfs_mod_LDFLAGS): Likewise.
12018 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12019 (pkgdata_MODULES): Add `sfs.mod'.
12020 (sfs_mod_SOURCES): New variable.
12021 (sfs_mod_CFLAGS): Likewise.
12023 * util/grub-emu.c (main): Call `grub_sfs_init' and
12026 * include/grub/fs.h (grub_sfs_init): New prototype.
12027 (grub_sfs_fini): Likewise.
12029 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
12031 Add support for the AFFS filesystem.
12033 * fs/affs.c: New file.
12035 * DISTLIST: Added `fs/affs.c'.
12037 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12038 (grub_probefs_SOURCES): Likewise.
12039 (grub_emu_SOURCES): Likewise.
12040 (pkgdata_MODULES): Add `affs.mod'.
12041 (affs_mod_SOURCES): New variable.
12042 (affs_mod_CFLAGS): Likewise.
12043 (affs_mod_LDFLAGS): Likewise.
12045 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12046 (pkgdata_MODULES): Add `affs.mod'.
12047 (affs_mod_SOURCES): New variable.
12048 (affs_mod_CFLAGS): Likewise.
12050 * util/grub-emu.c (main): Call `grub_affs_init' and
12053 * include/grub/fs.h (grub_affs_init): New prototype.
12054 (grub_affs_fini): Likewise.
12056 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12058 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12060 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12062 * configure.ac: Accept `x86_64' as host_cpu. In that case add
12065 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12068 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12069 (COMMON_LDFLAGS): New variable.
12070 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12071 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12072 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12073 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12074 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12075 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12076 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12077 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12078 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12079 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12080 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12081 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12082 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12083 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12084 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12086 (normal_mod_ASFLAGS): Add `-m32'.
12088 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12089 (grub_host_size_t, grub_host_ssize_t): New types.
12090 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
12091 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
12092 `GRUB_HOST_SIZEOF_VOID_P'.
12094 * include/grub/kernel.h (struct grub_module_header): Type of
12095 member offset changed to `grub_host_off_t'. Type of member size
12096 changed to `grub_host_size_t'.
12097 (struct grub_module_info): Type of member offset changed to
12098 `grub_host_off_t'. Type of member size changed to
12099 `grub_host_size_t'.
12101 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
12103 Make GRUB's kernel compliant to Multiboot Specification.
12105 * kern/i386/pc/startup.S (multiboot_header): New label.
12106 (multiboot_entry): Likewise.
12107 (multiboot_trampoline): Likewise.
12109 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12110 Increased to 0x4A0.
12112 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12113 put parentheses after a question mark.
12114 [!GRUB_UTIL] (my_mod): New variable.
12116 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12118 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
12120 Adds support for the XFS filesystem. Btrees are not supported
12123 * fs/xfs.c: New file.
12125 * DISTLIST: Added `fs/xfs.c'.
12127 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12128 (grub_probefs_SOURCES): Likewise.
12129 (grub_emu_SOURCES): Likewise.
12130 (pkgdata_MODULES): Add `xfs.mod'.
12131 (xfs_mod_SOURCES): New variable.
12132 (xfs_mod_CFLAGS): Likewise.
12134 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12135 (pkgdata_MODULES): Add `xfs.mod'.
12136 (xfs_mod_SOURCES): New variable.
12137 (xfs_mod_CFLAGS): Likewise.
12139 * util/grub-emu.c (main): Call `grub_xfs_init' and
12142 * include/grub/fs.h (grub_xfs_init): New prototype.
12143 (grub_xfs_fini): Likewise.
12146 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12148 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12149 color modes, allow greater than 16 colors to be configured as
12152 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12154 * normal/completion.c (complete_arguments): Add the qualifier
12155 const into OPTIONS.
12157 From Omniflux <omniflux+lists@omniflux.com>:
12158 * include/grub/terminfo.h: New file.
12159 * include/grub/tparm.h: Likewise.
12160 * include/grub/i386/pc/serial.h: Likewise.
12161 * term/terminfo.c: Likewise.
12162 * term/tparm.c: Likewise.
12163 * term/i386/pc/serial.c: Likewise.
12164 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12166 (terminfo_mod_SOURCES): New variable.
12167 (terminfo_mod_CFLAGS): Likewise.
12168 (serial_mod_SOURCES): Likewise.
12169 (serial_mod_CFLAGS): Likewise.
12171 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12173 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12174 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12175 and kern/powerpc/ieee1275/cmain.c, respectively.
12177 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12178 * kern/powerpc/ieee1275/crt0.S: ... here.
12180 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12181 * kern/powerpc/ieee1275/cmain.c: ... here.
12183 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12184 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12185 instead of boot/powerpc/ieee1275/crt0.S and
12186 boot/powerpc/ieee1275/cmain.c, respectively.
12188 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12189 sectors. It was not used anyway.
12191 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12193 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12194 `unused parameter' warning.
12196 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12198 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12200 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12203 2005-08-28 Marco Gerards <metgerards@student.han.nl>
12205 * include/grub/normal.h (enum grub_completion_type): Added
12206 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12208 * normal/cmdline.c (print_completion): Handle
12209 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12210 * normal/menu_entry.c (store_completion): Likewise.
12212 * normal/completion.c (complete_arguments): New function.
12213 (grub_normal_do_completion): Call `complete_arguments' when the
12214 current words start with a dash.
12216 2005-08-27 Marco Gerards <metgerards@student.han.nl>
12218 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12219 `gzio.mod' instead of `io.mod').
12221 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12223 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12224 (DISTDIRS): Added io and video.
12225 Rewrite the search routine to make an output consistently.
12227 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12228 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12229 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12230 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12231 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12232 util/powerpc/ieee1275/misc.c.
12234 * include/grub/gzio.h: New file.
12235 * io/gzio.c: Likewise.
12237 * kern/file.c (grub_file_close): Call grub_device_close only if
12238 FILE->DEVICE is not NULL.
12240 * include/grub/mm.h [!NULL] (NULL): New macro.
12242 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12244 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12245 (pkgdata_MODULES): Added gzio.mod.
12246 (gzio_mod_SOURCES): New variable.
12247 (gzio_mod_CFLAGS): Likewise.
12249 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12250 (pkgdata_MODULES): Added gzio.mod.
12251 (gzio_mod_SOURCES): New variable.
12252 (gzio_mod_CFLAGS): Likewise.
12254 * commands/cat.c: Include grub/gzio.h.
12255 (grub_cmd_cat): Use grub_gzfile_open instead of
12258 * commands/cmp.c: Include grub/gzio.h.
12259 (grub_cmd_cmp): Use grub_gzfile_open instead of
12262 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12263 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12265 (grub_rescue_cmd_module): Likewise.
12267 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12269 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12270 kern/sparc64/ieee1275/init.c because it contains _start.
12271 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12273 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12275 * configure.ac: Add support for sparc64 host with ieee1275
12277 * configure: Generated from configure.ac.
12278 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12280 (grub_ofdisk_read): Likewise.
12281 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12282 pointers as (void *) to remove a warning.
12283 (grub_ofdisk_close): Likewise.
12284 (grub_ofdisk_read): Likewise.
12285 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12286 returns, so make it return void to remove a warning.
12287 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12288 Corresponding prototype change.
12289 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12290 values, and cast the pointers as (void *) to remove a warning.
12291 (grub_mm_dump): Likewise.
12292 * conf/sparc64-ieee1275.mk: New file.
12293 * conf/sparc64-ieee1275.rmk: Likewise.
12294 * include/grub/sparc64/setjmp.h: Likewise.
12295 * include/grub/sparc64/types.h: Likewise.
12296 * include/grub/sparc64/ieee1275/console.h: Likewise.
12297 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12298 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12299 * include/grub/sparc64/ieee1275/time.h: Likewise.
12300 * kern/sparc64/cache.c: Likewise.
12301 * kern/sparc64/dl.c: Likewise.
12302 * kern/sparc64/ieee1275/init.c: Likewise.
12303 * kern/sparc64/ieee1275/openfw.c: Likewise.
12305 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12307 * util/console.c (grub_ncurses_putchar): If C is greater than
12308 0x7f, set C to a question mark.
12309 (grub_ncurses_getcharwidth): New function.
12310 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12313 * normal/menu.c (print_entry): Made aware of Unicode. First,
12314 convert TITLE to UCS-4, and predict the cursor position by
12317 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12319 * kern/misc.c (grub_utf16_to_utf8): Likewise.
12321 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12323 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12324 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12327 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12328 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12329 grub_strcpy and grub_strlen. Take it into account that a space
12330 character is inserted as a delimiter.
12332 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12334 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
12335 invalid magic in the error.
12337 * commands/search.c: New file.
12339 * util/grub-emu.c (main): Call grub_search_init and
12342 * kern/rescue.c (grub_rescue_print_disks): Removed.
12343 (grub_rescue_print_devices): New function.
12344 (grub_rescue_cmd_ls): Use grub_device_iterate with
12345 grub_rescue_print_devices instead of grub_disk_dev_iterate with
12346 grub_rescue_print_disks.
12348 * kern/partition.c (grub_partition_iterate): Return the result of
12349 PARTMAP->ITERATE instead of GRUB_ERRNO.
12351 * kern/device.c: Include grub/partition.h.
12352 (grub_device_iterate): New function.
12354 * include/grub/partition.h (grub_partition_iterate): Return int
12355 instead of grub_err_t.
12357 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
12359 [GRUB_UTIL] (grub_search_fini): Likewise.
12361 * include/grub/device.h (grub_device_iterate): New prototype.
12363 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12365 (pkgdata_MODULES): Added search.mod.
12366 (search_mod_SOURCES): New variable.
12367 (search_mod_CFLAGS): Likewise.
12369 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
12370 (pkgdata_MODULES): Added search.mod.
12371 (search_mod_SOURCES): New variable.
12372 (search_mod_CFLAGS): Likewise.
12374 * commands/ls.c (grub_ls_list_disks): Renamed to ...
12375 (grub_ls_list_devices): ... this, and use grub_device_iterate.
12376 All callers changed.
12378 * DISTLIST: Added commands/search.c.
12380 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12382 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
12384 (grub_getcharwidth): New function.
12386 * kern/misc.c (grub_utf8_to_ucs4): New function.
12388 * include/grub/term.h (struct grub_term): Added a new member
12390 (grub_getcharwidth): New prototype.
12392 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
12394 * term/i386/pc/console.c (map_char): New function. Segregated from
12395 grub_console_putchar.
12396 (grub_console_putchar): Use map_char.
12397 (grub_console_getcharwidth): New function.
12398 (grub_console_term): Specified grub_console_getcharwidth as
12401 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12402 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12404 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12406 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12407 on grub_strtoul completely.
12408 (write_char): Declare local variables in the beginning of the
12410 (grub_vesafb_getcharwidth): New function.
12411 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12414 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
12416 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12417 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12418 commands/i386/pc/vbetest.c.
12420 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12421 call grub_vbe_get_controller_info again, because the returned
12422 information is volatile.
12423 (grub_vbe_set_video_mode): Mostly rewritten.
12424 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12425 grub_vbe_status_t correctly.
12426 (grub_vbe_get_video_mode_info): Likewise.
12427 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12428 several if statements.
12430 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12431 * commands/i386/pc/vbeinfo.c: ... this.
12433 * commands/i386/pc/vbe_test.c: Renamed to ...
12434 * commands/i386/pc/vbetest.c: ... this.
12436 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12438 (grub_cmd_vbeinfo): ... this. Save video modes before
12439 iterating. Skip a video mode, if it is not available, not enough
12440 information is given or it is monochrome. Show the memory
12441 model. Leave the interpretation of MODEVAR to grub_strtoul
12443 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12444 (GRUB_MOD_FINI): Likewise.
12446 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12447 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12448 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12449 duplicated grub_env_get. Leave the interpretation of MODEVAR to
12450 grub_strtoul completely.
12451 (real2pm): Removed.
12452 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12453 (GRUB_MOD_FINI): Likewise.
12455 * normal/misc.c: Include grub/mm.h.
12457 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12458 vbe_list_modes with vbetest.mod and vbeinfo.mod.
12459 (vbe_list_modes_mod_SOURCES): Removed.
12460 (vbe_list_modes_mod_CFLAGS): Likewise.
12461 (vbe_test_mod_SOURCES): Likewise.
12462 (vbe_test_mod_CFLAGS): Likewise.
12463 (vbeinfo_mod_SOURCES): New variable.
12464 (vbeinfo_mod_CFLAGS): Likewise.
12465 (vbetest_mod_SOURCES): Likewise.
12466 (vbetest_mod_CFLAGS): Likewise.
12468 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
12470 * normal/misc.c: New file.
12472 * DISTLIST: Added normal/misc.c.
12474 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12475 DISK to HOOK. Call HOOK with DISK.
12476 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12477 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12478 * partmap/sun.c (sun_partition_map_iterate): Likewise.
12480 * normal/menu_entry.c (struct screen): Added a new member
12481 "completion_shown".
12482 (completion_buffer): New global variable.
12483 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12484 (store_completion): New function.
12485 (complete): Likewise.
12486 (clear_completions): Likewise.
12487 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12488 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12489 a tab, call complete.
12491 * normal/completion.c (disk_dev): Removed.
12492 (print_simple_completion): Likewise.
12493 (print_partition_completion): Likewise.
12494 (print_func): New global variable.
12495 (add_completion): Do not take the arguments WHAT or PRINT any
12496 longer. Added a new argument TYPE. Instead of printing directly,
12497 call PRINT_FUNC if not NULL.
12498 All callers changed.
12499 (complete_device): Use a local variable DEV instead of
12500 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12501 (grub_normal_do_completion): Take a new argument HOOK. Do not
12502 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12503 empty string, return NULL instead.
12504 All callers changed.
12506 * normal/cmdline.c (print_completion): New function.
12508 * kern/partition.c (grub_partition_iterate): Add an argument DISK
12510 All callers changed.
12512 * kern/disk.c (grub_print_partinfo): Removed.
12514 * include/grub/partition.h (struct grub_partition_map): Add a new
12515 argument DISK into HOOK of ITERATE.
12516 (grub_partition_iterate): Add a new argument DISK to HOOK.
12518 * include/grub/normal.h (enum grub_completion_type): New enum.
12519 (grub_completion_type_t): New type.
12520 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12521 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12522 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12523 (GRUB_COMPLETION_TYPE_FILE): Likewise.
12524 (grub_normal_do_completion): Added a new argument HOOK.
12525 (grub_normal_print_device_info): New prototype.
12527 * include/grub/disk.h (grub_print_partinfo): Removed.
12529 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12530 (normal_mod_SOURCES): Likewise.
12531 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12532 (normal_mod_SOURCES): Likewise.
12534 * commands/ls.c (grub_ls_list_disks): Use
12535 grub_normal_print_device_info instead of grub_print_partinfo. Free
12537 (grub_ls_list_files): Use grub_normal_print_device_info instead of
12538 duplicating the code.
12540 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12542 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12543 follow GCS more precisely.
12544 * commands/i386/pc/vbe_test.c: Likewise.
12545 * include/grub/i386/pc/vbe.h: Likewise.
12546 * term/i386/pc/vesafb.c: Likewise.
12547 * video/i386/pc/vbe.c: Likewise.
12549 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12551 * DISTLIST: Added term/i386/pc/vesafb.c
12552 DISTLIST: Added video/i386/pc/vbe.c
12553 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12554 DISTLIST: Added commands/i386/pc/vbe_test.c.
12555 * commands/i386/pc/vbe_list_modes.c: New file.
12556 * commands/i386/pc/vbe_test.c: Likewise.
12557 * term/i386/pc/vesafb.c: Likewise.
12558 * video/i386/pc/vbe.c: Likewise.
12559 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12560 (grub_vbe_probe) Added prototype.
12561 (grub_vbe_set_video_mode) Likewise.
12562 (grub_vbe_get_video_mode) Likewise.
12563 (grub_vbe_get_video_mode_info) Likewise.
12564 (grub_vbe_set_pixel_rgb) Likewise.
12565 (grub_vbe_set_pixel_index) Likewise.
12566 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12567 (pkgdata_MODULES): Added vesafb.mod.
12568 (pkgdata_MODULES): Added vbe_list_modes.mod.
12569 (pkgdata_MODULES): Added vbe_test.mod.
12570 (vbe_mod_SOURCES): Added.
12571 (vbe_mod_CFLAGS): Likewise.
12572 (vesafb_mod_SOURCES): Likewise.
12573 (vesafb_mod_CFLAGS): Likewise.
12574 (vbe_list_modes_mod_SOURCES): Likewise.
12575 (vbe_list_modes_mod_CFLAGS): Likewise.
12576 (vbe_test_mod_SOURCES): Likewise.
12577 (vbe_test_mod_CFLAGS): Likewise.
12579 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12581 * normal/command.c (grub_command_execute): If INTERACTIVE is
12582 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12583 CMDLINE. Disable the pager if INTERACTIVE is true.
12584 All callers are changed.
12586 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12587 before reading a config file.
12588 * normal/main.c (read_config_file): Even if a command is not
12589 found, register it if it is within an entry.
12591 * util/grub-emu.c: Include sys/types.h and unistd.h.
12592 (options): Added --hold.
12593 (struct arguments): Added a new member "hold".
12594 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12596 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12597 cleared by a debugger, if it is not zero.
12599 * include/grub/normal.h (grub_command_execute): Add an argument
12602 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12604 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12606 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12608 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12609 program with another one, because the old one didn't detect a bug
12610 in gcc-3.4. Always use regparm 2, because the new test is still
12611 not enough for gcc-4.0. Someone must investigate a simple test
12612 case which detects a bug in gcc-4.0.
12614 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12616 * DISTLIST: Added normal/completion.c.
12618 * normal/completion.c: New file.
12620 * term/i386/pc/console.c (grub_console_getwh): New function.
12621 (grub_console_term): Assign grub_console_getwh to getwh.
12623 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12624 function is defined in normal/completion.c as
12625 grub_normal_do_completion.
12626 (grub_cmdline_get): Use grub_normal_do_completion instead of
12629 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12630 returns non-zero, otherwise return 0.
12631 (grub_partition_iterate): First, probe the partition map. Then,
12632 call ITERATE only for this partition map.
12634 * kern/misc.c (grub_strncmp): Rewritten.
12636 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12637 returns non-zero. Otherwise return 0.
12639 * include/grub/partition.h (grub_partition_map_iterate): Return
12640 int instead of void.
12642 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12644 * include/grub/misc.h (grub_strncmp): Change the type of N to
12647 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12650 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12651 unsigned explicitly before comparing it with I.
12653 * kern/main.c (grub_env_write_root): Add the attribute unused into
12656 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12657 normal/completion.c.
12658 (normal_mod_SOURCES): Likewise.
12659 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12660 (normal_mod_SOURCES): Likewise.
12662 * normal/command.c (grub_iterate_commands): If ITERATE returns
12663 non-zero, return one immediately.
12665 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12667 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12668 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12670 (grub_vbe_get_controller_info): New function.
12671 (grub_vbe_get_mode_info): Likewise.
12672 (grub_vbe_set_mode): Likewise.
12673 (grub_vbe_get_mode): Likewise.
12674 (grub_vbe_set_memory_window): Likewise.
12675 (grub_vbe_get_memory_window): Likewise.
12676 (grub_vbe_set_scanline_length): Likewise.
12677 (grub_vbe_get_scanline_length): Likewise.
12678 (grub_vbe_set_display_start): Likewise.
12679 (grub_vbe_get_display_start): Likewise.
12680 (grub_vbe_set_palette_data): Likewise.
12681 * include/grub/i386/pc/vbe.h: New file.
12683 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12685 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12686 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12687 * DISTLIST: Likewise.
12688 * kern/ieee1275/of.c: Moved to ...
12689 * kern/ieee1275/ieee1275.c: ... here.
12691 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12693 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12694 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12695 Pass 0 as `end' parameter to grub_strtoul().
12697 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12699 * include/grub/powerpc/ieee1275/console.h: Do not include
12700 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12702 (grub_console_cur_color): Remove i386-specific prototype.
12703 (grub_console_real_putchar): Likewise.
12704 (grub_console_checkkey): Likewise.
12705 (grub_console_getkey): Likewise.
12706 (grub_console_getxy): Likewise.
12707 (grub_console_gotoxy): Likewise.
12708 (grub_console_cls): Likewise.
12709 (grub_console_setcursor): Likewise.
12710 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12711 Include <grub/machine/console.h>.
12712 * term/ieee1275/ofconsole.c: Likewise.
12714 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12716 * Makefile.in (LIBLZO): New variable.
12718 * configure.ac: Check for LZO version 2.
12720 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12721 lzo/lzo1x.h instead of lzo1x.h.
12723 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12726 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12727 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12729 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12730 copying the data from PARTITION to P.
12732 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12734 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12735 negative, unload the module.
12737 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12738 map is "pc_partition_map" but not "pc".
12739 (usage): Fix the description. The options are --boot-image and
12740 --core-image but not --boot-file or --core-file.
12741 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12742 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12745 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12746 --core-file. Specify INSTALL_DEVICE as an argument.
12748 * util/console.c: Include config.h.
12749 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12750 [HAVE_NCURSES_H]: Include ncurses.h.
12751 [HAVE_CURSES_H]: Include curses.h.
12752 [!A_NORMAL] (A_NORMAL): Defined as zero.
12753 [!A_STANDOUT] (A_STANDOUT): Likewise.
12755 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12757 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12759 * configure.ac: Check for curses libraries and headers.
12761 * Makefile.in (LIBCURSES): New variable.
12763 * genmk.rb (Script::rule): Set the executable bits.
12765 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12766 name of the PC partition map is "pc_partition_map" but not "pc".
12768 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12770 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12771 (modules): Likewise.
12772 (usage): Added descriptions for --modules and --grub-probefs.
12773 Handle --modules and --grub-probefs. Save the arguments in MODULES
12774 and GRUB_PROBEFS, respectively.
12775 Auto-detect a filesystem module against GRUBDIR. If the result is
12776 empty and modules are not specified explicitly, abort the
12777 installation. Add the result to MODULES.
12779 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12780 disk/powerpc/ieee1275/ofdisk.c,
12781 include/grub/powerpc/ieee1275/init.h and
12782 term/powerpc/ieee1275/ofconsole.c.
12783 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12784 term/ieee1275/ofconsole.c.
12786 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12788 * COPYING: Upgraded to the latest version. Only the address of the
12789 FSF office has changed.
12791 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12793 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12794 kern/ieee1275.c with kern/ieee1275/of.c.
12796 * kern/ieee1275.c: Moved to ...
12797 * kern/ieee1275/of.c: ... here.
12799 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12801 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
12804 * config.guess: Updated to the latest version from gnulib.
12805 * config.sub: Likewise.
12806 * install.sh: Likewise.
12807 * mkinstalldirs: Likewise.
12809 * include/grub/console.h: Removed. This file is arch-specific. Do
12810 not put this in include/grub.
12812 * include/grub/i386/pc/console.h: Resurrected.
12814 * util/console.c: Include grub/machine/console.h instead of
12816 * util/grub-emu.c: Likewise.
12818 2005-08-04 Marco Gerards <metgerards@student.han.nl>
12820 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12823 From Vincent Pelletier <subdino2004@yahoo.fr>
12824 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12825 Redefined to use grub_getwh.
12826 (grub_term): New member named getwh.
12827 (grub_getwh): New prototype.
12828 * kern/term.c (grub_getwh): New function.
12829 * term/i386/pc/console.c (grub_console_getwh): New function.
12830 (grub_console_term): New member `getwh'.
12831 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12832 (grub_vga_term): New member `getwh'.
12833 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
12835 (grub_ofconsole_getw): New function.
12836 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12837 (grub_ofconsole_term): New field named getwh and new initial
12840 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12842 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12843 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12844 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12845 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12846 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12847 of <grub/machine/ieee1275.h>.
12848 * commands/ieee1275/reboot.c: Likewise.
12849 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12850 * kern/ieee1275.c: ... to here. All users updated. Change all
12851 parameter structs to use new type `grub_ieee1275_cell_t'.
12852 * term/powerpc/ieee1275/ofconsole.c: Move ...
12853 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12854 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12855 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12856 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12858 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12859 Remove unused prototypes. All users updated.
12860 * include/grub/powerpc/ieee1275/console.h: Removed.
12861 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12862 `grub_ieee1275_cell_t'.
12863 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12864 Cast comparisons with -1 to the correct type.
12865 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12866 type to match `grub_ieee1275_entry_fn'.
12868 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12870 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12872 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12873 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12875 (grub_probefs_SOURCES): New variable.
12877 * util/i386/pc/grub-probefs.c: New file.
12879 * util/i386/pc/grub-setup.c (main): Call
12880 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12881 grub_hfs_init and grub_jfs_init to initialize the system. Call
12882 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12883 grub_pc_partition_map_fini to finish the system.
12885 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12887 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12889 (grub_multiboot_load_elf32): Likewise.
12890 (grub_multiboot_is_elf64): Likewise.
12891 (grub_multiboot_load_elf64): Likewise.
12892 (grub_multiboot_load_elf): Likewise.
12893 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12894 an ELF32 or ELF64 file.
12895 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12897 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12898 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12899 NULL before calling FS->LABEL.
12900 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12901 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12902 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12903 before calling FS->LABEL.
12905 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12907 * util/i386/pc/grub-install.in (datadir): New variable.
12909 (pkgdatadir): New variable.
12910 (pkglibdir): Removed.
12912 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12914 * DISTLIST: Added util/i386/pc/grub-install.in.
12916 * util/i386/pc/grub-install.in: New file.
12918 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12919 (grub_install_SOURCES): Likewise.
12921 * genmk.rb: Added support for scripts.
12922 (Script): New class.
12923 (scripts): New variable.
12925 * Makefile.in (install-local): Install sbin_SCRIPTS by
12927 (uninstall): Remove sbin_SCRIPTS.
12929 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12930 device, try to get a GRUB device by
12931 grub_util_biosdisk_get_grub_dev.
12934 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12935 description for --device-map.
12937 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12939 Change the semantics of variable hooks. They now return strings
12940 instead of error values.
12942 * util/i386/pc/grub-setup.c: Include grub/env.h.
12943 (setup): Use grub_device_set_root instead of grub_env_set.
12945 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12946 grub_env_get instead of grub_device_set_root and
12947 grub_device_get_root, respectively.
12949 * kern/main.c (grub_env_write_root): New function.
12950 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12951 grub_env_set instead of grub_device_set_root.
12953 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12955 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12956 rather than calling ENV->WRITE_HOOK afterwards.
12957 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12958 passing a pointer of a pointer.
12959 (grub_register_variable_hook): Change the types of "read_hook" and
12960 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12962 Allocate the default empty string on the heap, because this string
12963 may be freed later.
12965 * kern/device.c: Include grub/env.h.
12966 (grub_device_set_root): Removed.
12967 (grub_device_get_root): Likewise.
12968 (grub_device_open): Use grub_env_get instead of
12969 grub_device_get_root.
12971 * include/grub/env.h (grub_env_read_hook_t): New type.
12972 (grub_env_write_hook_t): Likewise.
12973 (grub_env_var): Change the types of "read_hook" and "write_hook"
12974 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12975 (grub_register_variable_hook): Likewise.
12977 * include/grub/device.h (grub_device_set_root): Removed.
12978 (grub_device_set_root): Likewise.
12980 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12981 make sure that DIRNAME terminates with '/', so that
12982 grub_fat_find_dir will fail if PATH is not a directory.
12984 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12986 Use the qualifier auto for print_files and print_files_long.
12987 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12989 Put a newline only if there is no error.
12990 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12993 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12995 * kern/partition.c (grub_partition_probe): Initialize PART to
12996 NULL. Otherwise, when no partition map is registered, this returns
12999 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13001 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13002 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13005 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13007 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13008 information on each device, if it does not have partitions. Print
13009 "Device" instead of "Disk", because this function is not specific
13012 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13013 static to ensure that it is put on the memory rather than a
13016 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13018 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13019 (grub_cat_init): Likewise.
13020 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13021 (options): Likewise.
13022 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13023 (grub_configfile_init): Likewise.
13024 * font/manager.c (GRUB_MOD_INIT): Likewise.
13025 * commands/help.c (GRUB_MOD_INIT): Likewise.
13026 (grub_help_init): Likewise.
13027 * normal/command.c (grub_command_init): Likewise.
13028 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13029 * disk/loopback.c (grub_loop_init): Likewise.
13030 (GRUB_MOD_INIT): Likewise.
13031 * commands/ls.c (grub_ls_init): Likewise.
13032 (GRUB_MOD_INIT): Likewise.
13033 (options): Likewise.
13034 * commands/boot.c (grub_boot_init): Likewise.
13035 (GRUB_MOD_INIT): Likewise.
13036 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13037 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13038 (GRUB_MOD_INIT): Likewise.
13039 * commands/cmp.c (grub_cmp_init): Likewise.
13040 (GRUB_MOD_INIT): Likewise.
13042 * normal/arg.c: Use <> instead of "" to include header files.
13043 (SHORT_ARG_HELP): New macro.
13044 (SHORT_ARG_USAGE): Likewise.
13045 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13046 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13048 (find_short): Check if C is 'h' or 'u' explicitly.
13049 (grub_arg_show_help): Use space characters instead of tabs. Treat
13050 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13051 are shown with --help and --usage only if they are not used for
13052 the command itself.
13053 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13056 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13057 const into "longarg". Change the type of "shortarg" to int.
13059 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13061 * boot/i386/pc/boot.S (boot_drive_check): New label.
13063 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13066 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13067 which do not pass a boot drive correctly. Copied from GRUB Legacy.
13069 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13071 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13072 When turning off Gate A20, skip the check and return immediately,
13073 because this is not fatal usually.
13075 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13077 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13078 be 0x7C00 instead of 0x8000.
13080 * boot/i386/pc/pxeboot.S: Rewritten.
13082 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13084 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13087 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13089 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13090 robustness. This routine now supports a BIOS call and System
13091 Control Port A to modify the gate A20.
13093 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13094 Increased to 0x440.
13096 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
13098 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13099 device path and resulting ihandle.
13100 (grub_ofdisk_close): dprintf the ihandle being closed.
13101 (grub_ofdisk_read): dprintf function parameters.
13102 * kern/mm.c (grub_mm_init_region): Likewise.
13103 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13104 (grub_linux_boot): dprintf the Linux entry point, initrd address and
13105 size, and boot arguments.
13106 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13107 before loading into memory.
13108 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13109 before loading into memory.
13111 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
13113 * kern/mm.c: Added much documentation.
13114 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13115 8, set to 5 instead of 8.
13117 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13119 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13121 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13122 (grub_mkdevicemap_SOURCES): New variable.
13124 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13125 lib/device.c of GRUB Legacy.
13127 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13129 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13130 instead of PATH is NULL.
13132 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
13134 * commands/cmp.c (BUFFER_SIZE): New macro.
13135 (grub_cmd_cmp): Close the right file at the right time. Compare
13136 only data just read. Don't report files of different size as
13137 identical. Dynamically allocate buffers. Move variable
13138 declarations at the beginning of function.
13140 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
13142 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13145 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
13147 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13148 when backspace is pressed at beginning of line.
13150 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
13152 * DISTLIST: Added genfslist.sh.
13154 * normal/main.c (fs_module_list): New variable.
13155 (autoload_fs_module): New function.
13156 (read_fs_list): Likewise.
13157 (grub_normal_execute): Call read_fs_list.
13159 * kern/fs.c (grub_fs_autoload_hook): New variable.
13160 (grub_fs_probe): Added support for auto-loading.
13162 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13163 (grub_fs_module_list_t): New type.
13165 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13166 (grub_fs_autoload_hook): New prototype.
13168 * genfslist.sh: New file.
13170 * genmk.rb: Added a rule to generate a filesystem list.
13172 2005-06-30 Marco Gerards <metgerards@student.han.nl>
13174 * configure.ac: Fix the test for cross-compiling.
13176 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13177 define GRUB_UTIL anymore.
13179 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13180 so this function works on other systems than just big endian.
13181 (load_modules): Likewise.
13182 (add_segments): Likewise.
13184 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13186 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13187 contains `l' modifier, get a long from va_arg().
13189 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13191 * kern/mm.c (grub_free): If the next free block which is being
13192 merged is the first free block, set the first block to the block
13194 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13196 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13198 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13199 `grub_ieee1275_chosen'.
13201 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13203 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13204 (grub_ieee1275_chosen): New variable.
13205 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13207 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13208 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13209 Rename first argument to `phandle' for consistency.
13210 (grub_ieee1275_get_property_length): Likewise.
13211 (grub_ieee1275_next_property): Likewise. Change type of first argument
13212 to grub_ieee1275_phandle_t.
13213 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13214 Move export next to declaration.
13215 (grub_ieee1275_chosen): New variable.
13216 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13217 Correct cosmetic typo.
13218 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13219 `grub_ieee1275_chosen'.
13220 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13221 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13222 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13223 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13224 `grub_ieee1275_chosen'.
13226 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13228 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13230 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13231 /chosen/bootargs as "variable=value" pairs.
13233 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13235 * include/grub/misc.h (grub_dprintf): New macro.
13236 (grub_real_dprintf): New prototype.
13237 (grub_strword): Likewise.
13238 (grub_iswordseparator): Likewise.
13239 * kern/misc.c (grub_real_dprintf): New function.
13240 (grub_strword): Likewise.
13241 (grub_iswordseparator): Likewise.
13243 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13245 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13246 (roundup): Remove macro.
13247 (grub_ieee1275_flags): Make static.
13248 (grub_ieee1275_realmode): Remove.
13249 (grub_ieee1275_test_flag): New function.
13250 (grub_ieee1275_set_flag): Likewise.
13251 (find_options): Rename to `grub_ieee1275_find_options'; update
13252 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13253 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13254 (cmain): New prototype.
13255 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13256 `grub_ieee1275_flags' directly.
13257 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13258 machine/biosdisk.h.
13259 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13260 Don't include grub/machine/init.h.
13261 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13262 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13264 (grub_ieee1275_realmode): Likewise.
13265 (grub_ieee1275_flag): New enum.
13266 (grub_ieee1275_test_flag): New prototype.
13267 (grub_ieee1275_set_flag): New prototype.
13268 * include/grub/powerpc/ieee1275/init.h: Remove file.
13269 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13270 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13271 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13272 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13274 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13275 `grub_ieee1275_test_flag'.
13276 (grub_ieee1275_encode_devname): Likewise.
13278 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13280 * include/grub/powerpc/ieee1275/ieee1275.h
13281 (grub_ieee1275_encode_devname): New prototype.
13282 (grub_ieee1275_get_filename): Likewise.
13283 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13285 (grub_set_prefix): Likewise.
13286 (grub_machine_init): Call grub_set_prefix.
13287 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13288 (grub_parse_type): New enum.
13289 (grub_ieee1275_get_devargs): New function.
13290 (grub_ieee1275_get_devname): Likewise.
13291 (grub_ieee1275_parse_args): Likewise.
13292 (grub_ieee1275_get_filename): Likewise.
13293 (grub_ieee1275_encode_devname): Likewise.
13295 2005-03-30 Marco Gerards <metgerards@student.han.nl>
13297 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13298 `grub_loader_unset'.
13300 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13302 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13303 instead of grub_ieee1275_interpret.
13304 (grub_halt_init): New function.
13305 (grub_halt_fini): Likewise.
13306 (GRUB_MOD_INIT): Correct message grammar.
13307 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13308 instead of grub_ieee1275_interpret.
13309 (grub_reboot_init): New function.
13310 (grub_reboot_fini): Likewise.
13311 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13312 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13313 util/i386/pc/misc.c with commands/ieee1275/halt.c,
13314 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13315 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13317 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13319 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13321 (grub_halt): Likewise.
13322 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13323 (cmain): Remove __attribute__((unused)).
13324 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13325 (grub_heap_len): Likewise.
13326 (grub_machine_fini): New function.
13327 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13328 (grub_halt): Likewise.
13329 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13331 * util/powerpc/ieee1275/misc.c: New file.
13333 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13335 * DISTLIST: New file.
13336 * gendistlist.sh: Likewise.
13338 * Makefile.in (COMMON_DISTFILES): Removed.
13339 (BOOT_DISTFILES): Likewise.
13340 (CONF_DISTFILES): Likewise.
13341 (DISK_DISTFILES): Likewise.
13342 (FS_DISTFILES): Likewise.
13343 (INCLUDE_DISTFILES): Likewise.
13344 (KERN_DISTFILES): Likewise.
13345 (LOADER_DISTFILES): Likewise.
13346 (TERM_DISTFILES): Likewise.
13347 (UTIL_DISTFILES): Likewise.
13348 (DISTFILES): Likewise.
13349 (uninstall): Uninstall files in $(pkgdata_DATA).
13350 (DISTLIST): New target.
13351 (distdir): Use the contents of the file DISTLIST to get a list of
13354 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13356 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
13357 descriptor. This is ported from GRUB Legacy.
13359 * gencmdlist.sh: Added an extra semicolon to make it work with
13360 old sed versions. Reported by Robert Bihlmeyer
13361 <robbe@orcus.priv.at>.
13363 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
13365 Automatic loading of commands is supported.
13367 * normal/main.c (read_command_list): New function.
13368 (grub_normal_execute): Call read_command_list.
13370 * normal/command.c (grub_register_command): Return zero or CMD.
13371 Allocate CMD->NAME from the heap.
13372 Initialize CMD->MODULE_NAME to zero.
13373 Find the same name as well. If the same command is found and it is
13374 a dummy command, overwrite members. If it is not a dummy command,
13376 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
13377 (grub_command_find): If a dummy command is found, load a module
13378 and retry to find a command only once.
13380 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
13381 make sure that each command is loaded.
13383 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
13385 (struct grub_command): Remove const from the member `name'.
13386 Add a new member `module_name'.
13387 (grub_register_command): Return grub_command_t.
13389 * commands/help.c (grub_cmd_help): Call grub_command_find to make
13390 sure that each command is loaded.
13392 * genmk.rb (PModule::rule): Specify a module name without the
13393 suffix ".mod" to gencmdlist.sh.
13395 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13397 * gencmdlist.sh: New file.
13399 * genmk.rb (PModule::rule): Generate a rule for a command list.
13401 Generate command.lst from $(COMMANDFILES).
13403 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13404 (DATA): Added $(pkgdata_DATA).
13405 (install-local): Install files in $(pkgdata_DATA).
13407 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13409 * term/i386/pc/vga.c (debug_command): Removed.
13410 (GRUB_MOD_INIT): Do not register the command "debug".
13412 From Hollis Blanchard:
13413 * commands/configfile.c: New file.
13414 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13415 commands/configfile.c.
13416 (pkgdata_MODULES): Added configfile.mod.
13417 (configfile_mod_SOURCES): New variable.
13418 (configfile_mod_CFLAGS): Likewise.
13419 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13420 commands/configfile.c.
13421 (pkgdata_MODULES): Added configfile.mod.
13422 (configfile_mod_SOURCES): New variable.
13423 (configfile_mod_CFLAGS): Likewise.
13424 * util/grub-emu.c (main): Call grub_configfile_init and
13425 grub_configfile_fini.
13426 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13428 [GRUB_UTIL] (grub_configfile_fini): Likewise.
13430 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13432 * normal/arg.c (grub_arg_show_help): Do not show the bug report
13435 * commands/help.c (grub_cmd_help): Do not print newlines after
13436 the last command in print_command_help.
13438 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13440 * commands/default.h: New file.
13441 * commands/timeout.h: Likewise.
13442 * normal/context.c: Likewise.
13444 * util/misc.c: Do not include sys/times.h.
13445 Include sys/time.h and grub/machine/time.h.
13446 (grub_get_rtc): Rewritten with gettimeofday.
13448 * util/grub-emu.c (main): Call grub_default_init and
13449 grub_timeout_init before grub_normal_init, and call
13450 grub_timeout_fini and grub_default_fini after grub_main.
13452 * util/console.c (grub_ncurses_checkkey): Return the read
13455 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13458 * normal/main.c (read_config_file): Push MENU. If this fails,
13459 print an error and wait for a user input.
13460 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13461 If a menu is empty or an error occurs, pop MENU.
13462 (grub_normal_execute): Pop and free MENU after grub_menu_run
13465 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13467 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13469 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13471 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13473 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13476 * include/grub/normal.h (struct grub_menu_list): New struct.
13477 (grub_menu_list_t): New type.
13478 (struct grub_context): New struct.
13479 (grub_context_t): New type.
13480 (grub_register_command): Got rid of EXPORT_FUNC.
13481 (grub_unregister_command): Likewise.
13482 (grub_context_get): New prototype.
13483 (grub_context_get_current_menu): Likewise.
13484 (grub_context_push_menu): Likewise.
13485 (grub_context_pop_menu): Likewise.
13486 [GRUB_UTIL] (grub_default_init): Likewise.
13487 [GRUB_UTIL] (grub_default_fini): Likewise.
13488 [GRUB_UTIL] (grub_timeout_init): Likewise.
13489 [GRUB_UTIL] (grub_timeout_fini): Likewise.
13491 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13492 commands/timeout.c and normal/context.c.
13493 (pkgdata_MODULES): Added default.mod and timeout.mod.
13494 (normal_mod_SOURCES): Added normal/context.c.
13495 (default_mod_SOURCES): New variable.
13496 (default_mod_CFLAGS): Likewise.
13497 (timeout_mod_SOURCES): Likewise.
13498 (timeout_mod_CFLAGS): Likewise.
13499 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13501 (pkgdata_MODULES): Added default.mod and timeout.mod.
13502 (normal_mod_SOURCES): Added normal/context.c.
13503 (default_mod_SOURCES): New variable.
13504 (default_mod_CFLAGS): Likewise.
13505 (timeout_mod_SOURCES): Likewise.
13506 (timeout_mod_CFLAGS): Likewise.
13508 * Makefile.in (all-local): Added $(MKFILES).
13510 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
13512 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13513 (grub_emu_SOURCES): Likewise.
13514 (pkgdata_MODULES): Add `sun.mod'.
13515 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13516 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13518 (pkgdata_MODULES): Add `sun.mod'.
13519 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13520 * include/grub/partition.h (grub_sun_partition_map_init): New
13522 (grub_sun_partition_map_fini): Likewise.
13523 * partmap/sun.c: New file.
13524 * util/grub-emu.c (main): Initialize and de-initialize the sun
13525 partitionmap support.
13527 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
13529 This implements an Emacs-like menu entry editor.
13531 * normal/menu_entry.c: New file.
13533 * util/console.c (grub_ncurses_putchar): Translate some Unicode
13534 characters to ASCII.
13535 (saved_char): New variable.
13536 (grub_ncurses_checkkey): Rewritten completely.
13537 (grub_ncurses_getkey): Likewise.
13538 (grub_ncurses_init): Call raw instead of cbreak.
13540 * normal/menu.c (print_entry): Do not put a space.
13541 (init_page): Renamed to ...
13542 (grub_menu_init_page): ... this. All callers changed.
13543 (edit_menu_entry): Removed.
13544 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13546 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13548 * kern/misc.c (grub_vprintf): Call grub_refresh.
13550 * normal/menu.c (DISP_LEFT): Renamed to ...
13551 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13552 * normal/menu.c (DISP_UP): Renamed to ...
13553 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13554 * normal/menu.c (DISP_RIGHT): Renamed to ...
13555 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13556 * normal/menu.c (DISP_DOWN): Renamed to ...
13557 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13558 * normal/menu.c (DISP_HLINE): Renamed to ...
13559 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13560 * normal/menu.c (DISP_VLINE): Renamed to ...
13561 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13562 * normal/menu.c (DISP_UL): Renamed to ...
13563 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13564 * normal/menu.c (DISP_UR): Renamed to ...
13565 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13566 * normal/menu.c (DISP_LL): Renamed to ...
13567 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13568 * normal/menu.c (DISP_LR): Renamed to ...
13569 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13570 * normal/menu.c (TERM_WIDTH): Renamed to ...
13571 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13572 * normal/menu.c (TERM_HEIGHT): Renamed to ...
13573 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13574 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13575 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13576 * normal/menu.c (TERM_MARGIN): Renamed to ...
13577 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13578 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13579 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13580 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13581 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13582 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13583 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13584 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13585 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13586 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13587 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13588 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13589 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13590 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13591 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13592 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13593 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13594 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13595 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13596 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13597 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13598 All callers changed.
13600 * include/grub/normal.h: New prototype.
13602 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13603 normal/menu_entry.c.
13604 (normal_mod_SOURCES): Likewise.
13605 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13606 (normal_mod_SOURCES): Likewise.
13608 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13610 * include/grub/normal.h (grub_halt_init): New prototype.
13611 (grub_halt_fini): Likewise.
13612 (grub_reboot_init): Likewise.
13613 (grub_reboot_fini): Likewise.
13615 * util/grub-emu.c: Include signal.h.
13616 (main_env): New global variable.
13617 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13619 (grub_machine_fini): New function.
13620 (main): Call grub_halt_init and grub_reboot_init before
13621 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13622 Call setjmp with MAIN_ENV to go back afterwards.
13623 Call grub_machine_fini right before return.
13625 * include/grub/util/misc.h: Include setjmp.h.
13626 (main_env): New prototype.
13628 * include/grub/kernel.h (grub_machine_fini): New prototype.
13629 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13630 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13632 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13633 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13634 * term/i386/pc/console.c (grub_console_fini): Likewise.
13636 * util/i386/pc/misc.c: New file.
13638 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13639 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13640 commands/i386/pc/reboot.c.
13642 2005-02-14 Guillem Jover <guillem@hadrons.org>
13644 * include/grub/dl.h (grub_dl_check_header): New prototype.
13645 (grub_arch_dl_check_header): Change return type to grub_err_t,
13646 remove size parameter and export function. Update all callers.
13647 * kern/dl.c (grub_dl_check_header): New function.
13648 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13649 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13650 are inside the core.
13651 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13652 independent ELF header checks.
13653 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13654 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13655 `grub_dl_check_header' instead of explicit checks. Check for the
13657 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13658 `grub_dl_check_header' instead of explicit checks. Remove arch
13659 specific ELF header checks.
13661 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13664 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13666 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13667 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13669 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13671 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13672 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13673 (part_map_iterate): Clear `grub_errno' and return 0 if
13674 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13675 * partmap/amiga.c (amiga_partition_map_iterate): Return
13676 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13677 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13679 2005-02-01 Guillem Jover <guillem@hadrons.org>
13681 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13684 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13686 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13688 (grub_rescue_cmd_linux): New prototype.
13689 (grub_rescue_cmd_initrd): Likewise.
13690 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13692 (grub_linux_release_mem): Release the memory for the initrd.
13693 (grub_load_linux): Renamed from this...
13694 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13695 Changed `entry' not to be static. Loop over memory regions to
13696 find another one when the default fails.
13697 (grub_rescue_cmd_initrd): New function.
13698 (grub_linux_init): Remove function.
13699 (grub_linux_fini): Likewise.
13700 (GRUB_MOD_INIT): Register `initrd'.
13701 (GRUB_MOD_FINI): Unregister `initrd'.
13702 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13704 (grub_linux_normal_fini): Likewise.
13705 (GRUB_MOD_INIT): Register `initrd'.
13706 (GRUB_MOD_FINI): Unregister `initrd'.
13708 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13710 * commands/help.c: New file.
13711 * normal/arg.c (show_help): Renamed to...
13712 (grub_arg_show_help): ... this.
13713 * commands/i386/pc/halt.c: New file.
13714 * commands/i386/pc/reboot.c: Likewise.
13715 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13716 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13717 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13718 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13720 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13722 (pkgdata_MODULES): Add `help.mod'.
13723 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13724 * grub/i386/pc/init.h (grub_reboot): New prototype.
13725 (grub_halt): Likewise.
13726 * include/grub/normal.h (grub_arg_show_help): New prototype.
13727 (grub_help_init): Likewise.
13728 (grub_help_fini): Likewise.
13729 * util/grub-emu.c (main): Initialize and deinitialize the help
13732 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13734 * normal/command.c (grub_command_init): Fixed the description of
13735 the `set' and `unset' commands.
13737 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13739 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13741 * commands/ieee1275/halt.c: New file.
13742 * commands/ieee1275/reboot.c: Likewise.
13743 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13744 `__attribute__ ((unused))'. Some GCS related fixed.
13745 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13746 (grub_suspend_fini): Likewise.
13747 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13749 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13750 (halt_mod_CFLAGS): New variables.
13751 * include/grub/powerpc/ieee1275/ieee1275.h
13752 (grub_ieee1275_interpret): New prototype.
13754 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13756 * include/grub/misc.h (memmove): New prototype.
13757 (memcpy): Likewise.
13759 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13761 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13762 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13764 2005-01-22 Marco Gerards <metgerards@student.han.nl>
13766 * kern/misc.c (grub_strndup): Function rewritten.
13768 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13770 * normal/menu.c (TERM_WIDTH): Macro redefined.
13771 (TERM_TOP_BORDER_Y): Likewise.
13772 (draw_border): Replaced while-loop by a for-loop. Make the number
13773 of lines consistent with the number of lines displayed in
13774 print_entries. Added a margin below the rectangle.
13775 (print_entry): Make the entry fit in the rectangle.
13776 (print_entries): Display the scroll arrows next to the right
13779 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13781 * fs/minix.c (grub_minix_find_file): Reserve more space for
13782 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13783 `grub_strncpy' to copy `path' into it.
13785 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13787 Add the loopback device, a device via which files can be accessed
13790 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13791 (pkgdata_MODULES): Add loopback.mod.
13792 (loopback_mod_SOURCES): New variable.
13793 (loopback_mod_CFLAGS): Likewise.
13794 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13796 (pkgdata_MODULES): Add loopback.mod.
13797 (loopback_mod_SOURCES): New variable.
13798 (loopback_mod_CFLAGS): Likewise.
13799 * disk/loopback.c: new file.
13800 * include/grub/normal.h (grub_loop_init): New prototype.
13801 (grub_loop_fini): New prototype.
13802 * util/grub-emu.c (main): Initialize and de-initialize loopback
13804 * include/grub/disk.h (grub_disk_dev_id): Add
13805 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13807 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13809 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13811 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13812 (suspend_mod_SOURCES): New variable.
13813 (suspend_mod_CFLAGS): Likewise.
13814 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13816 * commands/ieee1275/suspend.c: New file.
13818 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13820 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
13821 ((unused))' to `__attribute__ ((used))'.
13822 (GRUB_MOD_FINI): Likewise.
13823 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13824 * genmk.rb (PModule): Assign space to common symbols when linking
13827 2005-01-20 Marco Gerards <metgerards@student.han.nl>
13829 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13830 `unsigned' arguments to `grub_size_t'.
13831 (grub_malloc): Likewise.
13832 (grub_realloc): Likewise.
13833 (grub_memalign): Likewise.
13834 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13835 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13836 * util/misc.c (grub_malloc): Likewise.
13837 (grub_realloc): Likewise.
13838 * kern/mm.c (get_header_from_pointer): Change the casts to
13839 `unsigned' into a cast to `grub_size_t'.
13841 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13842 point to `currnode' when `currnode' is changed.
13844 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13845 Schottelius <nico-linux@schottelius.org>.
13847 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13849 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13850 (note_path): Remove variable.
13851 (GRUB_IEEE1275_NOTE_NAME): New macro.
13852 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13853 (grub_ieee1275_note_hdr): New structure.
13854 (grub_ieee1275_note_desc): Likewise.
13855 (grub_ieee1275_note): Likewise.
13856 (load_note): Remove `dir' argument. All callers updated. Remove
13857 `note_img' and `path'. Do not load a file from `note_path'.
13858 Initialize a struct grub_ieee1275_note and write that to `out'.
13859 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13861 2005-01-05 Marco Gerards <metgerards@student.han.nl>
13863 * util/misc.c (grub_util_read_image): Revert last change. It
13864 called `grub_util_read_at', which seeks from the beginning of the
13867 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13869 * TODO: Add note about endianness in grub-mkimage.
13870 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13872 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13873 (grub_mkimage_SOURCES): New target.
13874 * include/grub/kernel.h (grub_start_addr): Remove variable.
13875 (grub_end_addr): Likewise.
13876 (grub_total_module_size): Likewise.
13877 (grub_kernel_image_size): Likewise.
13878 (GRUB_MODULE_MAGIC): New constant.
13879 (grub_module_info): New structure.
13880 (grub_arch_modules_addr): New prototype.
13881 (grub_get_end_addr): Remove prototype.
13882 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13883 * include/grub/powerpc/ieee1275/kernel.h: New file.
13884 * include/grub/util/misc.h (grub_util_get_fp_size): New
13886 (grub_util_read_at): Likewise.
13887 (grub_util_write_image_at): Likewise.
13888 * kern/main.c (grub_get_end_addr): Remove function.
13889 (grub_load_modules): Call grub_arch_modules_addr instead of using
13890 grub_end_addr. Look for a grub_module_info struct in memory. Use
13891 the grub_module_info fields instead of calling grub_get_end_addr
13892 as loop conditions. Move grub_add_unused_region code here.
13893 (grub_add_unused_region): Remove function.
13894 * kern/i386/pc/init.c: Include grub/cache.h.
13895 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13896 one call to add_mem_region.
13897 (grub_arch_modules_addr): New function.
13898 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13899 (grub_total_module_size): Likewise.
13900 Include grub/machine/kernel.h.
13901 (grub_arch_modules_addr): New function.
13902 * util/grub-emu.c (grub_end_addr): Remove variable.
13903 (grub_total_module_size): Likewise.
13904 (grub_arch_modules_addr): New function.
13905 * util/misc.c: Include unistd.h.
13906 (grub_util_get_fp_size): New function.
13907 (grub_util_read_at): Likewise.
13908 (grub_util_write_image_at): Likewise.
13909 (grub_util_read_image): Call grub_util_read_at.
13910 (grub_util_write_image): Call grub_util_write_image_at.
13911 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13912 additional memory in kernel_img for a struct grub_module_info.
13913 Fill in that grub_module_info.
13914 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13916 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13918 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13920 * include/grub/powerpc/ieee1275/ieee1275.h
13921 (grub_ieee1275_milliseconds): New prototype.
13922 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13924 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13925 grub_ieee1275_milliseconds.
13927 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13929 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13931 (find_options): New function.
13932 (cmain): Call find_options.
13933 * include/grub/powerpc/ieee1275/ieee1275.h
13934 (grub_ieee1275_realmode): New extern variable.
13935 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13936 grub_map if grub_ieee1275_realmode is false.
13938 2004-12-29 Marco Gerards <metgerards@student.han.nl>
13940 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13941 lines are inserted and make it work like readline. Reported by
13942 Vincent Pelletier <subdino2004@yahoo.fr>.
13944 2004-12-28 Marco Gerards <metgerards@student.han.nl>
13946 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13948 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13949 `kern/powerpc/cache.S'.
13951 2004-12-27 Marco Gerards <metgerards@student.han.nl>
13953 * genmk.rb: Handle the `Program' class in the main loop. Written
13954 by Johan Rydberg <jrydberg@gnu.org>.
13955 (Program): New class.
13956 (programs): New variable.
13957 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13958 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13959 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13960 (help_arch): Function removed.
13961 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13962 `powerpc/libgcc.h' and `loader.h'.
13963 (pkgdata_PROGRAMS): New variable.
13964 (sbin_UTILITIES): Variable removed.
13965 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13966 (grubof_SOURCES): Variable re-defined so it only includes the
13967 core functionality.
13968 (grubof_CFLAGS): Remove `-DGRUBOF'.
13969 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13970 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13971 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13972 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13973 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13974 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13975 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13976 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13977 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13978 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13979 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13980 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13981 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13982 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13983 (pc_mod_CFLAGS): New variables.
13984 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13985 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13986 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13987 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13989 * include/grub/i386/pc/init.h (grub_os_area_addr)
13990 (rub_os_area_size): ... to here.
13991 * include/grub/powerpc/ieee1275/ieee1275.h
13992 (grub_ieee1275_entry_fn): Export symbol.
13993 * include/grub/powerpc/ieee1275/init.h: New file.
13994 * include/grub/powerpc/libgcc.h: Likewise.
13995 * include/grub/cache.h: Likewise.
13996 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13997 <hollis@penguinppc.org>.
13998 * kern/dl.c: Include <grub/cache.h>.
13999 (grub_dl_flush_cache): New function.
14000 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14002 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14003 (grub_console_init): Removed prototypes.
14004 (grub_machine_init): Don't initialize the modules anymore.
14005 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14007 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14008 Macro undef removed.
14009 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14010 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14011 relocation `R_PPC_REL32'. Return an error when the relocation is
14013 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14014 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14015 * util/misc.c (grub_arch_sync_caches): Likewise.
14017 2004-12-19 Marco Gerards <metgerards@student.han.nl>
14019 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14020 `symlist.c', add `grubof_symlist.c'.
14021 (symlist.c): Variable removed.
14022 (grubof_HEADERS): Variable added.
14023 (grubof_symlist.c): New target.
14024 (kernel_syms.lst): Use `grubof_HEADERS' instead of
14025 `kernel_img_HEADERS'.
14026 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14027 * kern/powerpc/dl.c: New file.
14028 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14030 (grub_arch_dl_relocate_symbols): Likewise.
14031 (grub_register_exported_symbols): Likewise.
14033 2004-12-13 Marco Gerards <metgerards@student.han.nl>
14035 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14036 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
14037 to fail instead. Reported by Vincent Pelletier
14038 <subdino2004@yahoo.fr>.
14040 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14041 it is not allocated. Reported by Vincent Pelletier
14042 <subdino2004@yahoo.fr>.
14044 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14045 output so the output looks better.
14047 2004-12-04 Marco Gerards <metgerards@student.han.nl>
14049 Modulize the partition map support and add support for the amiga
14052 * commands/ls.c: Include <grub/partition.h> instead of
14053 <grub/machine/partition.h>.
14054 * kern/disk.c: Likewise.
14055 * kern/rescue.c: Likewise.
14056 * loader/i386/pc/chainloader.c: Likewise.
14057 * normal/cmdline.c: Likewise.
14058 * kern/powerpc/ieee1275/init.c: Likewise.
14059 (grub_machine_init): Call `grub_pc_partition_map_init',
14060 `grub_amiga_partition_map_init' and
14061 `grub_apple_partition_map_init'.
14062 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14063 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
14064 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
14065 `partition.h' and `pc_partition.h'.
14066 (grub_setup_SOURCES): Remove
14067 `disk/i386/pc/partition.c'. Add `kern/partition.c',
14068 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14069 (grub_emu_SOURCES): Likewise.
14070 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14071 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14072 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14073 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14074 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14075 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14076 (grubof_SOURCES): Likewise.
14077 * disk/i386/pc/partition.c: File removed.
14078 * disk/powerpc/ieee1275/partition.c: Likewise.
14079 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14080 * include/grub/i386/pc/partition.h: Likewise.
14081 * kern/partition.c: New file.
14082 * partmap/amiga.c: Likewise.
14083 * partmap/apple.c: Likewise.
14084 * partmap/pc.c: Likewise.
14085 * include/grub/partition.h: Likewise..
14086 * include/grub/pc_partition.h: Likewise.
14087 * util/grub-emu.c: Include <grub/partition.h> instead of
14088 <grub/machine/partition.h>.
14089 (main): Call `grub_pc_partition_map_init',
14090 `grub_amiga_partition_map_init' and
14091 `grub_apple_partition_map_init' and deinitialize afterwards.
14092 * util/i386/pc/biosdisk.c: Include `#include
14093 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14094 `<grub/machine/partition.h>'.
14095 * util/i386/pc/grub-setup.c: Likewise.
14096 * util/i386/pc/biosdisk.c: Likewise.
14097 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14098 partition information in case of a PC partition.
14099 * util/i386/pc/grub-setup.c: Include `#include
14100 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14101 `<grub/machine/partition.h>'.
14102 (setup): Only access the PC specific partition information in case
14105 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
14107 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14108 (grub_longjmp): Likewise.
14109 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14111 * normal/powerpc/setjmp.S: New file.
14112 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14113 `normal/powerpc/setjmp.S'.
14114 (grubof_CFLAGS): Add `-DGRUBOF'.
14115 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14116 [GRUB_UTIL && !GRUBOF].
14118 2004-11-16 Marco Gerards <metgerards@student.han.nl>
14120 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14121 property named `name'. Correctly handle the error returned by
14122 `grub_ieee1275_finddevice' if a device can not be opened.
14124 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
14126 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14127 `actual' for negativity.
14128 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14131 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14133 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14134 (PAGE_OFFSET): New macro.
14135 (CRTC_ADDR_PORT): Likewise.
14136 (CRTC_DATA_PORT): Likewise.
14137 (START_ADDR_HIGH_REGISTER): Likewise.
14138 (START_ADDR_LOW_REGISTER): Likewise.
14139 (GRAPHICS_ADDR_PORT): Likewise.
14140 (GRAPHICS_DATA_PORT): Likewise.
14141 (READ_MAP_REGISTER): Likewise.
14142 (INPUT_STATUS1_REGISTER): Likewise.
14143 (INPUT_STATUS1_VERTR_BIT): Likewise.
14144 (page): New variable.
14145 (wait_vretrace): New function.
14146 (set_read_map): Likewise.
14147 (set_start_address): Likewise.
14148 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14150 (check_vga_mem): Take the page into account.
14151 (write_char): Likewise.
14152 (write_cursor): Likewise.
14153 (scroll_up): Likewise. Copy the page to the page that is not
14154 shown and switch between both pages.
14155 (grub_vga_putchar): Fix off by one error.
14156 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14159 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14161 Add support for iso9660 (including rockridge).
14163 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14164 (iso9660_mod_SOURCES): New variable.
14165 (iso9660_mod_CFLAGS): Likewise.
14166 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14167 * include/grub/fs.h (grub_iso9660_init): New prototype.
14168 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14169 * fs/iso9660.c: New file.
14171 * include/grub/misc.h (grub_strncat): New prototype.
14172 * kern/misc.c (grub_strncat): New function.
14174 * fs/hfs.c (grub_hfs_mount): Translate the error
14175 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14176 * fs/jfs.c (grub_jfs_mount): Likewise.
14177 * fs/ufs.c (grub_ufs_mount): Likewise.
14179 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14181 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14182 which initialized BAT registers.
14183 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14184 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14186 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14187 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14189 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14190 (grub_mapclaim): Likewise.
14191 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14192 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14195 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14197 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14198 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14199 -ffreestanding and -msoft-float.
14201 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14203 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14204 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14205 set in grub_ieee1275_flags.
14207 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14209 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14211 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14212 grub_console_init first.
14213 Change the memory range used for grub_ieee1275_claim and
14214 grub_mm_init_region.
14215 Print an error message if the claim fails.
14216 Include <grub/misc.h>.
14218 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14220 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14221 Call grub_children_iterate for device nodes of type `scsi',
14223 (grub_ofdisk_open): Remove manual device alias resolution.
14224 Fix memory leak when device cannot be opened.
14225 * include/grub/powerpc/ieee1275/ieee1275.h
14226 (grub_children_iterate): New prototype.
14227 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14229 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14230 Return -1 if args.size was -1.
14232 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14234 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14235 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14236 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14237 Open Firmware's memory for it; claim memory from _start to _end.
14238 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14239 (_end): New extern.
14240 (_start): Zero BSS from __bss_start to _end.
14241 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14243 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14245 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14247 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14248 -1 if args.base was -1.
14250 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14252 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14253 escape sequence instead of a literal ^L. Also call
14254 grub_ofconsole_gotoxy.
14256 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14258 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14259 void * arguments to grub_addr_t. All callers updated. Also make
14260 the `result' argument optional.
14261 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14262 All callers updated.
14264 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14266 * commands/ls.c (grub_ls_list_files): Use the string following the
14267 initial ')', if present, as the filesystem path.
14268 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14270 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14272 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14274 Make the source code of the menu interface more readable.
14276 * normal/menu.c: Include grub/mm.h.
14277 (TERM_WIDTH): New macro.
14278 (TERM_HEIGHT): Likewise.
14279 (TERM_INFO_HEIGHT): Likewise.
14280 (TERM_MARGIN): Likewise.
14281 (TERM_SCROLL_WIDTH): Likewise.
14282 (TERM_TOP_BORDER_Y): Likewise.
14283 (TERM_LEFT_BORDER_X): Likewise.
14284 (TERM_BORDER_WIDTH): Likewise.
14285 (TERM_MESSAGE_HEIGHT): Likewise.
14286 (TERM_BORDER_HEIGHT): Likewise.
14287 (TERM_NUM_ENTRIES): Likewise.
14288 (TERM_FIRST_ENTRY_Y): Likewise.
14289 (TERM_ENTRY_WIDTH): Likewise.
14290 (TERM_CURSOR_X): Likewise.
14291 (draw_border): Use macros instead of magic numbers.
14292 (print_entry): Likewise.
14293 (print_entries): Likewise.
14294 (run_menu): Likewise. Also, handle the key 'e'.
14295 (run_menu_entry): Ignore empty command lines.
14296 (print_message): Added a new argument EDIT. If EDIT is true,
14297 print a different message.
14298 (init_page): Likewise.
14299 (edit_menu_entry): New function. Not implemented yet.
14301 2004-09-17 Marco Gerards <metgerards@student.han.nl>
14303 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14304 can be loaded from normal mode.
14306 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14308 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14309 (multiboot_mod_CFLAGS): New variables.
14310 * loader/i386/pc/linux_normal.c: New file.
14311 * loader/i386/pc/multiboot_normal.c: Likewise.
14313 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14314 attribute `unused'.
14316 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
14317 `fdiro' to read the mode information from instead of `diro'.
14319 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14320 looking up a symlink.
14322 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14324 * normal/command.c (grub_command_execute): Don't parse the
14325 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14326 flags of the command.
14328 * normal/menu.c (grub_menu_run): Fix typo.
14330 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
14332 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14334 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14335 `y + 1' instead of `y - 1'.
14337 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
14339 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
14341 From Hollis Blanchard <hollis@penguinppc.org>:
14342 * kern/misc.c (memmove): New alias for grub_memmove.
14343 (memcmp): New alias for grub_memcmp.
14344 (memset): New alias for grub_memset.
14345 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14346 Change "int handle" to "grub_ieee1275_phandle_t handle".
14347 * include/grub/powerpc/ieee1275/ieee1275.h
14348 (grub_ieee1275_get_property): Likewise.
14350 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
14352 Added normal mode command `chainloader' as module chain.mod, which
14353 depends on normal.mod and _chain.mod.
14355 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
14356 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
14357 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
14359 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
14360 but arguments parsing moved to ...
14361 (grub_chainloader_cmd): ... here. New function.
14362 * include/grub/i386/pc/chainloader.h: New file.
14363 * loader/i386/pc/chainloader_normal.c: Likewise.
14365 2004-09-11 Marco Gerards <metgerards@student.han.nl>
14367 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
14368 (grub_mkimage_LDFLAGS): Likewise.
14369 (grub_emu_SOURCES): Likewise.
14370 (kernel_img_HEADERS): Added fshelp.h.
14371 * fs/ext2.c: Include <grub/fshelp.h>.
14372 (FILETYPE_REG): New macro.
14373 (FILETYPE_INO_REG): Likewise.
14374 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
14376 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
14378 (grub_fshelp_node): New struct.
14379 (grub_ext2_data): Added member `diropen'. Changed member `inode'
14381 (grub_ext2_get_file_block): Removed function.
14382 (grub_ext2_read_block): New function.
14383 (grub_ext2_read_file): Replaced parameter `data' by `node'.
14384 This function was written.
14385 (grub_ext2_mount): Read the root inode. Create a diropen struct.
14386 (grub_ext2_find_file): Removed function.
14387 (grub_ext2_read_symlink): New function.
14388 (grub_ext2_iterate_dir): Likewise.
14389 (grub_ext2_open): Rewritten.
14390 (grub_ext2_dir): Rewritten.
14391 * include/grub/fshelp.h: New file.
14392 * fs/fshelp.c: Likewise.
14394 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
14396 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
14397 (print_message): Add a missing newline.
14398 (run_menu): Added timeout support.
14399 (run_menu_entry): New local function.
14400 (grub_menu_run): Added support for booting.
14402 * kern/loader.c (grub_loader_is_loaded): New function.
14404 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14405 (grub_get_rtc): Exported.
14407 * include/grub/i386/pc/time.h: Include grub/symbol.h.
14408 (grub_get_rtc): Exported.
14410 * include/grub/normal.h (struct grub_command_list): Remove
14411 constant from the member `command'.
14413 * include/grub/loader.h (grub_loader_is_loaded): Declared.
14415 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14417 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14419 2004-08-28 Marco Gerards <metgerards@student.han.nl>
14421 Add support for the JFS filesystem.
14423 * fs/jfs.c: New file.
14424 * include/grub/fs.h (grub_jfs_init): New prototype.
14425 (grub_jfs_fini): New prototype.
14426 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14427 (grub_emu_SOURCES): Likewise.
14428 (pkgdata_MODULES): Add jfs.mod.
14429 (jfs_mod_SOURCES): New variable.
14430 (jfs_mod_CFLAGS): Likewise.
14431 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14432 (grubof_SOURCES): Likewise.
14433 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14435 * fs/fat.c (grub_fat_find_dir): Convert the filename little
14436 endian to the host endian.
14437 (grub_fat_utf16_to_utf8): Move function from there...
14438 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
14439 the endianness of the source string anymore.
14440 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14442 2004-08-24 Marco Gerards <metgerards@student.han.nl>
14444 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14445 (grub_boot_fini) [GRUB_UTIL]: Likewise.
14446 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14447 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14449 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14450 (grub_hfs_iterate_dir): Make the function static. Add prototypes
14451 for `node_found' and `it_dir'.
14452 (grub_hfs_dir): Add prototype for `dir_hook'.
14454 * fs/minix.c (grub_minix_get_file_block): Add prototype for
14455 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
14456 and `indir32' to silence a gcc warning.
14458 * include/grub/fs.h (grub_hfs_init): New prototype.
14459 (grub_hfs_fini): Likewise.
14462 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14464 Each disk device has its own id now. This is useful to make use
14465 of multiple disk devices.
14467 * include/grub/disk.h (grub_disk_dev_id): New enum.
14468 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14469 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14471 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14472 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14474 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14475 GRUB_DISK_DEVICE_OFDISK_ID as an id.
14477 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14478 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14480 * include/grub/disk.h (struct grub_disk_dev): Added a new member
14481 "id" which is used by the cache manager.
14483 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14486 2004-08-18 Marco Gerards <metgerards@student.han.nl>
14488 * fs/hfs.c: New file.
14489 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14490 (grub_emu_SOURCES): Likewise.
14491 (pkgdata_MODULES): Add hfs.mod.
14492 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14493 (grubof_SOURCES): Likewise.
14494 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14496 * include/grub/misc.h (grub_strncasecmp): Add prototype.
14497 * kern/misc.c (grub_strncasecmp): Add function.
14499 2004-08-14 Marco Gerards <metgerards@student.han.nl>
14501 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14504 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14505 (grub_ext2_dir): In case the directory entry type is unknown, read
14508 2004-08-02 Peter Bruin <pjbruin@dds.nl>
14510 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14511 grub_load_linux instead of grub_rescue_cmd_linux as second
14512 argument of grub_rescue_register_command.
14514 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14516 2004-07-27 Marco Gerards <metgerards@student.han.nl>
14518 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14520 * commands/boot.c: Remove the check for `GRUB_UTIL'.
14521 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14522 `loader/powerpc/ieee1275/linux.c',
14523 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14524 * include/grub/powerpc/ieee1275/ieee1275.h
14525 (grub_ieee1275_release): New prototype.
14526 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14527 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14528 normal, boot, linux and linux_normal.
14529 * loader/powerpc/ieee1275/linux.c: New file.
14530 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14532 2004-07-12 Marco Gerards <metgerards@student.han.nl>
14534 * normal/arg.c (grub_arg_parse): Correct error handling after
14535 reallocating the argumentlist (check if `argl' is not null instead
14536 of checking if `args' is not null).
14537 * kern/mm.c (grub_realloc): Return the same pointer when using the
14538 same region, instead of returning the header address.
14540 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14542 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14543 one block instead of two when looking for the initial partition.
14544 (grub_partition_probe): Initialize the local variable `p' with 0.
14545 Use base 10 for the grub_strtoul call.
14546 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
14547 need for one local variable.
14548 (grub_strtoul): Don't add the new value to `num', instead of that
14551 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14553 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14554 (pxeboot_img_SOURCES): New variable.
14555 (pxeboot_img_ASFLAGS): Likewise.
14556 (pxeboot_img_LDFLAGS): Likewise.
14557 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
14558 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
14559 <lode_leroy@hotmail.com>.
14561 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14563 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14564 there was no input.
14566 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14568 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
14569 the history buffer logic.
14571 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14573 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14574 (FILETYPE_INO_SYMLINK): New macros.
14575 (grub_ext2_find_file): Check if the node is a directory using the
14576 inode stat information instead of using the filetype in the
14577 dirent. Exclude the first character of an absolute symlink.
14578 (grub_ext2_dir): Mask out the filetype part of the mode member of
14581 2004-05-24 Marco Gerards <metgerards@student.han.nl>
14583 Add support for UFS version 1 and 2. Add support for the minix
14584 filesystem version 1 and 2, both the variants with 14 and 30 long
14587 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14589 (grub_emu_SOURCES): Likewise.
14590 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14591 (ufs_mod_SOURCES): New variable.
14592 (ufs_mod_CFLAGS): Likewise.
14593 (minix_mod_SOURCES): Likewise.
14594 (minix_mod_CFLAGS): Likewise.
14595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14597 (grubof_SOURCES): Likewise.
14598 * fs/ufs.c: New file.
14599 * fs/minix.c: New file.
14600 * include/grub/fs.h (grub_ufs_init): New prototype.
14601 (grub_ufs_fini): Likewise.
14602 (grub_minix_init): Likewise.
14603 (grub_minix_fini): Likewise.
14604 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14607 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14609 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14610 commands/ls.c, commands/terminal.c, commands/boot.c,
14611 commands/cmp.c and commands/cat.c.
14612 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14614 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14617 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14619 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14620 and grub_, respectively. Because the conversion is trivial and
14621 mechanical, I omit the details here. Please refer to the CVS
14622 if you need more information.
14624 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14626 * include/pupa: Renamed to ...
14627 * include/grub: ... this.
14628 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14629 * util/i386/pc/grub-mkimage.c: ... this.
14630 * util/i386/pc/pupa-setup.c: Renamed to ...
14631 * util/i386/pc/grub-setup.c: ... this.
14632 * util/pupa-emu.c: Renamed to ...
14633 * util/grub-emu.c: ... this.
14635 2004-03-29 Marco Gerards <metgerards@student.han.nl>
14637 Add support for the newworld apple macintosh (PPC). This has been
14638 tested on the powerbook 2000 only. It only adds support for
14639 generic ieee1275 functions, console and disk support. This should
14640 be easy to port to other architectures with support for Open
14643 * configure.ac: Accept the powerpc as host_cpu. In the case of
14644 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14645 specific tests are only executed while building for the i386.
14646 Inverse test for crosscompile.
14647 * genmk.rb (Utility): Allow assembler files.
14648 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14649 * conf/powerpc-ieee1275.rmk: New file.
14650 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14651 * disk/powerpc/ieee1275/partition.c: Likewise.
14652 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14653 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14654 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14655 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14656 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14657 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14658 * include/pupa/powerpc/ieee1275/loader.h
14659 * include/pupa/powerpc/setjmp.h: Likewise.
14660 * include/pupa/powerpc/types.h: Likewise.
14661 * kern/powerpc/ieee1275/init.c: Likewise.
14662 * kern/powerpc/ieee1275/openfw.c: Likewise.
14663 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14665 These files were written by Johan Rydberg
14666 (jrydberg@night.trouble.net) and I only modified them slightly.
14668 * boot/powerpc/ieee1275/cmain.c: New file.
14669 * boot/powerpc/ieee1275/crt0.S: Likewise.
14670 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14671 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14673 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14675 * Makefile.in: Update copyright.
14676 * genmodsrc.sh: Likewise.
14677 * gensymlist.sh: Likewise.
14678 * term/i386/pc/vga.c: Indent correctly.
14680 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14681 bugreporting address.
14682 * util/i386/pc/pupa-setup.c (usage): Likewise,
14683 (main): Call pupa_ext2_init and pupa_ext2_fini.
14685 * fs/fat.c (log2): Renamed to ...
14686 (fat_log2): ... this.
14687 All callers changed.
14688 * kern/misc.c (memcpy): Alias to pupa_memmove.
14689 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14691 * util/console.c (pupa_ncurses_fini): Return 0.
14693 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14694 Move fail label here.
14695 [__GNU__]: Don't warn when using stat.
14696 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14697 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14698 long int. Use strtol instead of strtoul.
14700 2004-03-14 Marco Gerards <metgerards@student.han.nl>
14702 * commands/boot.c: New file.
14703 * commands/cat.c: Likewise.
14704 * commands/cmp.c: Likewise.
14705 * commands/ls.c: Likewise.
14706 * commands/terminal.c: Likewise.
14707 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14708 (pupa_register_command): Changed interface to match the new
14710 (pupa_command_execute): Changed (almost rewritten) so it uses
14711 pupa_split_command. Added support for setting variables using the
14713 (rescue_command): Changed to work with the new argument parser.
14714 (terminal_command): Moved from here to commands/terminal.c.
14715 (set_command): New function.
14716 (unset_command): New function.
14717 (insmod_command): New function.
14718 (rmmod_command): New function.
14719 (lsmod_command): New function.
14720 (pupa_command_init): Don't initialize the command terminal
14721 anymore. Initialize the commands set, unset, insmod, rmmod and
14723 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14724 (kernel_img_HEADERS): Add arg.h and env.h.
14725 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14726 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14727 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14729 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14731 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14732 (boot_mod_SOURCES): New variable.
14733 (terminal_mod_SOURCES): Likewise.
14734 (ls_mod_SOURCES): Likewise.
14735 (cmp_mod_SOURCES): Likewise.
14736 (cat_mod_SOURCES): Likewise.
14738 * normal/arg.c: New file.
14739 * kern/env.c: Likewise.
14740 * include/pupa/arg.h: Likewise.
14741 * include/pupa/env.h: Likewise.
14742 * font/manager.c (font_command): Changed to match argument parsing
14744 (PUPA_MOD_INIT): Likewise.
14745 * hello/hello.c (pupa_cmd_hello): Likewise.
14746 (PUPA_MOD_INIT): Likewise.
14747 * include/pupa/disk.h: Include <pupa/device.h>.
14748 (pupa_print_partinfo): New prototype.
14749 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14750 (pupa_dl_get_prefix): Likewise.
14751 * include/pupa/misc.h: Include <pupa/err.h>.
14752 (pupa_isgraph): New prototype.
14753 (pupa_isdigit): Likewise.
14754 (pupa_split_cmdline): Likewise.
14755 * include/pupa/normal.h: Include <pupa/arg.h>.
14756 (pupa_command): Changed the prototype of the member `func' to
14757 match the argument parsing interface. Added member `options'.
14758 (pupa_register_command): Updated to match function.
14759 (pupa_arg_parse): New prototype.
14760 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14761 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14762 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14763 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14764 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14765 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14766 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14767 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14768 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14769 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14770 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14771 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14772 * kern/disk.c: Include <pupa/file.h>.
14773 (pupa_print_partinfo): New function.
14774 * kern/dl.c: Include <pupa/env.h>.
14775 (pupa_dl_dir): Variable removed.
14776 (pupa_dl_load): Use the environment variable `prefix' instead of
14777 the variable pupa_dl_dir.
14778 (pupa_dl_set_prefix): Function removed.
14779 (pupa_dl_get_prefix): Likewise.
14780 * kern/i386/pc/init.c: Include <pupa/env.h>.
14781 (pupa_machine_init): Use the environment variable `prefix' instead of
14782 using pupa_dl_set_prefix to set the prefix.
14783 * kern/main.c: Include <pupa/env.h>.
14784 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14785 using pupa_dl_get_prefix to get the prefix.
14786 * kern/misc.c: Include <pupa/env.h>.
14787 (pupa_isdigit): New function.
14788 (pupa_isgraph): Likewise.
14789 (pupa_ftoa): Likewise.
14790 (pupa_vsprintf): Added support for printing values of the type
14791 `double'. Make it possible to format variable output when using
14792 formatting like `%1.2%f'.
14793 (pupa_split_cmdline): New function.
14794 * kern/rescue.c: Include <pupa/env.h>.
14795 (next_word): Removed function.
14796 (pupa_rescue_cmd_prefix): Likewise.
14797 (pupa_rescue_cmd_set): New function.
14798 (pupa_rescue_cmd_unset): New function.
14799 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14800 split the command line instead of splitting it here. Added
14801 support for setting variables using the syntax `foo=bar'. Don't
14802 initialize the prefix command anymore. Initialized the set and
14804 * normal/cmdline.c: Include <pupa/env.h>.
14805 (pupa_tab_complete): Added prototypes for print_simple_completion,
14806 print_partition_completion, add_completion, iterate_commands,
14807 iterate_dev, iterate_part and iterate_dir. Moved code to print
14808 partition information from here to kern/disk.c.
14809 (pupa_cmdline_run): Don't check if the function exists anymore.
14810 * normal/main.c: Include <pupa/env.h>.
14811 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14812 instead of using pupa_dl_get_prefix to get the prefix.
14813 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14814 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14816 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14817 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14818 ((unused))' to silence a gcc warning.
14819 (pupa_vga_setcolor): Likewise.
14820 (debug_command): Changed to match argument parsing
14822 * util/pupa-emu.c: Include <pupa/env.h>.
14823 (options): Added 0's for unused fields to silence a gcc warning.
14825 (main): Use the environment variable `prefix' instead of using
14826 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14827 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14830 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14831 * util/misc.c: Include <malloc.h>.
14832 (pupa_malloc): Rewritten so errors are correctly reported.
14833 (pupa_realloc): Likewise.
14834 (pupa_memalign): Likewise.
14835 (pupa_mm_init_region): Declare unused variables with
14836 `__attribute__ ((unused))' to silence a gcc warning.
14837 * normal/i386/setjmp.S: Remove tab at the end of the file to
14838 silence a gcc warning.
14839 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14840 variables with `__attribute__ ((unused))' to silence a gcc
14842 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14843 local variable i unsigned to silence a gcc warning.
14845 * kern/term.c: Include <pupa/misc.h>.
14846 (pupa_more_lines): New variable.
14847 (pupa_more): Likewise.
14848 (pupa_putcode): When the pager is active pause at the end of every
14850 (pupa_set_more): New function.
14851 * include/pupa/term.h (pupa_set_more): New prototype.
14854 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14856 Now this project is GRUB 2 rather than PUPA. The location of
14857 the CVS repository was moved to GRUB's.
14859 * configure.ac: Use bug-grub as the reporting address.
14860 Use GRUB instead of PUPA.
14861 Change the version number to 1.90.
14863 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14865 * genkernsyms.sh: Updated copyright information.
14866 * genmk.rb: Likewise.
14867 * genmodsrc.sh: Likewise.
14868 * gensymlist.sh: Likewise.
14869 * boot/i386/pc/boot.S: Likewise.
14870 * boot/i386/pc/diskboot.S: Likewise.
14871 * disk/i386/pc/biosdisk.c: Likewise.
14872 * disk/i386/pc/partition.c: Likewise.
14873 * font/manager.c: Likewise.
14874 * fs/ext2.c: Likewise.
14875 * fs/fat.c: Likewise.
14876 * include/pupa/boot.h: Likewise.
14877 * include/pupa/device.h: Likewise.
14878 * include/pupa/disk.h: Likewise.
14879 * include/pupa/dl.h: Likewise.
14880 * include/pupa/elf.h: Likewise.
14881 * include/pupa/err.h: Likewise.
14882 * include/pupa/file.h: Likewise.
14883 * include/pupa/font.h: Likewise.
14884 * include/pupa/fs.h: Likewise.
14885 * include/pupa/kernel.h: Likewise.
14886 * include/pupa/loader.h: Likewise.
14887 * include/pupa/misc.h: Likewise.
14888 * include/pupa/mm.h: Likewise.
14889 * include/pupa/net.h: Likewise.
14890 * include/pupa/normal.h: Likewise.
14891 * include/pupa/rescue.h: Likewise.
14892 * include/pupa/setjmp.h: Likewise.
14893 * include/pupa/symbol.h: Likewise.
14894 * include/pupa/term.h: Likewise.
14895 * include/pupa/types.h: Likewise.
14896 * include/pupa/i386/setjmp.h: Likewise.
14897 * include/pupa/i386/types.h: Likewise.
14898 * include/pupa/i386/pc/biosdisk.h: Likewise.
14899 * include/pupa/i386/pc/boot.h: Likewise.
14900 * include/pupa/i386/pc/console.h: Likewise.
14901 * include/pupa/i386/pc/init.h: Likewise.
14902 * include/pupa/i386/pc/kernel.h: Likewise.
14903 * include/pupa/i386/pc/linux.h: Likewise.
14904 * include/pupa/i386/pc/loader.h: Likewise.
14905 * include/pupa/i386/pc/memory.h: Likewise.
14906 * include/pupa/i386/pc/multiboot.h: Likewise.
14907 * include/pupa/i386/pc/partition.h: Likewise.
14908 * include/pupa/i386/pc/time.h: Likewise.
14909 * include/pupa/i386/pc/vga.h: Likewise.
14910 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14911 * include/pupa/util/getroot.h: Likewise.
14912 * include/pupa/util/misc.h: Likewise.
14913 * include/pupa/util/resolve.h: Likewise.
14914 * kern/device.c: Likewise.
14915 * kern/disk.c: Likewise.
14916 * kern/dl.c: Likewise.
14917 * kern/err.c: Likewise.
14918 * kern/file.c: Likewise.
14919 * kern/fs.c: Likewise.
14920 * kern/loader.c: Likewise.
14921 * kern/main.c: Likewise.
14922 * kern/misc.c: Likewise.
14923 * kern/mm.c: Likewise.
14924 * kern/rescue.c: Likewise.
14925 * kern/term.c: Likewise.
14926 * kern/i386/dl.c: Likewise.
14927 * kern/i386/pc/init.c: Likewise.
14928 * kern/i386/pc/lzo1x.S: Likewise.
14929 * kern/i386/pc/startup.S: Likewise.
14930 * loader/i386/pc/chainloader.c: Likewise.
14931 * loader/i386/pc/linux.c: Likewise.
14932 * loader/i386/pc/multiboot.c: Likewise.
14933 * normal/cmdline.c: Likewise.
14934 * normal/command.c: Likewise.
14935 * normal/main.c: Likewise.
14936 * normal/menu.c: Likewise.
14937 * normal/i386/setjmp.S: Likewise.
14938 * term/i386/pc/console.c: Likewise.
14939 * term/i386/pc/vga.c: Likewise.
14940 * util/console.c: Likewise.
14941 * util/genmoddep.c: Likewise.
14942 * util/misc.c: Likewise.
14943 * util/pupa-emu.c: Likewise.
14944 * util/resolve.c: Likewise.
14945 * util/unifont2pff.rb: Likewise.
14946 * util/i386/pc/biosdisk.c: Likewise.
14947 * util/i386/pc/getroot.c: Likewise.
14948 * util/i386/pc/pupa-mkimage.c: Likewise.
14949 * util/i386/pc/pupa-setup.c: Likewise.
14951 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14953 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14954 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14955 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14956 reading and reset it after reading.
14957 (pupa_ext2_close): Return PUPA_ERR_NONE.
14959 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14961 (struct linux_kernel_header): Add kernel_version and
14963 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14964 pupa_file_read succeeds.
14965 (pupa_rescue_cmd_initrd): Implement.
14967 2003-12-03 Marco Gerards <metgerards@student.han.nl>
14969 * fs/ext2.c (pupa_ext2_label): New function.
14970 (pupa_ext2_fs): Added label.
14971 * fs/fat.c (pupa_fat_label): New function.
14972 (pupa_fat_fs): Added label.
14973 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14975 * kern/misc.c (pupa_strndup): New function.
14976 * include/pupa/misc.h (pupa_strndup): New prototype.
14978 * include/pupa/normal.h: Include <pupa/err.h>.
14979 (pupa_set_history): New prototype.
14980 (pupa_iterate_commands): New prototype.
14981 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14982 <pupa/disk.h>, <pupa/file.h>.
14983 (hist_size): New variable.
14984 (hist_lines): Likewise.
14985 (hist_end): Likewise.
14986 (hist_used): Likewise.
14987 (pupa_set_history): New function.
14988 (pupa_history_get): Likewise.
14989 (pupa_history_add): Likewise.
14990 (pupa_history_replace): Likewise.
14991 (pupa_tab_complete): Likewise.
14992 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14993 completion shows partitionnames while completing partitions, this
14994 feature was suggested by Jeff Bailey.
14995 * normal/command.c (pupa_iterate_commands): New function.
14996 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14997 (pupa_normal_init): Initialize history buffer.
14998 (PUPA_MOD_INIT): Likewise.
14999 (pupa_normal_fini): Free the history buffer.
15000 (PUPA_MOD_FINI): Likewise.
15002 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15005 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15006 * configure.ac [i386]: Check for regparam bug.
15007 (NESTED_FUNC_ATTR) [! i386]: Defined.
15009 2003-11-17 Marco Gerards <metgerards@student.han.nl>
15011 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15012 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15013 (pupa_emu_SOURCES): New variable.
15014 (pupa_emu_LDFLAGS): Likewise.
15015 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15016 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15017 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15018 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15019 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15020 (pupa_jmp_buf): New typedef.
15021 (pupa_setjmp) [PUPA_UTIL]: New macro.
15022 (pupa_longjmp) [PUPA_UTIL]: Likewise.
15023 * include/pupa/term.h (struct pupa_term): New member `refresh'.
15024 (pupa_refresh): New prototype.
15025 * include/pupa/util/getroot.h: New file.
15026 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15028 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15029 (pupa_rescue_cmd_cat): Likewise.
15030 (pupa_rescue_cmd_ls): Likewise.
15031 (pupa_rescue_cmd_testload): Likewise.
15032 (pupa_rescue_cmd_lsmod): Likewise.
15033 * normal/cmdline.c (pupa_cmdline_get): Likewise.
15034 * normal/menu.c (run_menu): Likewise.
15035 * kern/term.c (pupa_cls): Likewise.
15036 (pupa_refresh): New function.
15037 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15038 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15039 * util/console.c: New file.
15041 * util/i386/pc/getroot.c: New file.
15042 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15043 (pupa_putchar): New function.
15044 (pupa_refresh): Likewise.
15045 (xgetcwd): Function moved to ...
15046 (strip_extra_slashes): Likewise.
15047 (get_prefix): Likewise.
15048 * util/i386/pc/getroot.c: ... here.
15049 (find_root_device): Function moved and renamed to...
15050 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15051 Changed all callers.
15052 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15054 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15055 Changed all callers.
15056 * util/misc.c (pupa_memalign): New function.
15057 (pupa_mm_init_region): Likewise.
15058 (pupa_register_exported_symbols): Likewise.
15059 (pupa_putchar): Function removed.
15060 * util/pupa-emu.c: New file.
15062 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
15064 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15065 (_multiboot_mod_SOURCES): New variable.
15066 (_multiboot_mod_CFLAGS): Likewise.
15067 * loader/i386/pc/multiboot.c: New file.
15068 * include/pupa/i386/pc/multiboot.h: Likewise.
15069 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15070 (pupa_multiboot_real_boot): New function.
15071 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15072 (pupa_multiboot_real_boot): New prototype.
15073 (pupa_rescue_cmd_multiboot): Likewise
15074 (pupa_rescue_cmd_module): Likewise.
15076 * kern/loader.c (pupa_loader_set): Continue when
15077 pupa_loader_unload_func() fails.
15078 (pupa_loader_unset): New function.
15079 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15081 * kern/misc.c (pupa_stpcpy): New function.
15082 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15084 2003-11-12 Marco Gerards <metgerards@student.han.nl>
15086 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15087 for available extensions.
15089 * include/pupa/i386/pc/time.h: New file.
15090 * kern/disk.c: Include <pupa/machine/time.h>.
15091 (PUPA_CACHE_TIMEOUT): New macro.
15092 (pupa_last_time): New variable.
15093 (pupa_disk_open): Flush the cache when there was a timeout.
15094 (pupa_disk_close): Reset the timer.
15095 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15097 * util/misc.c: Include <sys/times.h>
15098 (pupa_get_rtc): New function.
15100 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15102 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15104 (pupa_ext2_get_file_block): Use blocks member.
15106 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15107 first block. Return -1 instead of pupa_errno on error.
15109 2003-10-27 Marco Gerards <metgerards@student.han.nl>
15111 * README: In the pupa-mkimage example use _chain instead of chain
15112 and ext2 instead of fat.
15113 * TODO: Replace ext2fs with jfs as an example. Add an item for
15114 adding journal playback for ext2fs.
15115 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15116 (pkgdata_MODULES): Added ext2.mod.
15117 (ext2_mod_SOURCES): New variable.
15118 (ext2_mod_CFLAGS): Likewise.
15119 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15120 * include/pupa/misc.h (pupa_strncpy): New prototype.
15121 (pupa_strcat): Likewise.
15122 (pupa_strncmp): Likewise.
15123 * kern/misc.c (pupa_strcat): Enable function.
15124 (pupa_strncpy): New function.
15125 (pupa_strncmp): Likewise.
15126 * fs/ext2.c: New file.
15128 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15129 when the read failed before retrying.
15130 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15131 (_FILE_OFFSET_BITS): Likewise.
15132 * configure.ac: Added AC_SYS_LARGEFILE.
15134 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15136 * genmk.rb (PModule#rule): Make sure to get only symbol names
15137 from the output of nm.
15138 Reported by Robert Millan <zeratul2@wanadoo.es>.
15140 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15142 I forgot to check in these changes for a long time. This adds
15143 incomplete support for VGA console, and this is still very
15144 buggy. Also, a lot of consideration is required for I18N,
15145 UNICODE, and VGA font issues. Therefore, assume that this is
15146 such that "better than nothing".
15148 * font/manager.c: New file.
15149 * include/pupa/font.h: Likewise.
15150 * include/pupa/i386/pc/vga.h: Likewise.
15151 * term/i386/pc/vga.c: Likewise.
15152 * util/unifont2pff.rb: Likewise.
15154 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15155 (pkgdata_MODULES): Added vga.mod and font.mod.
15156 (vga_mod_SOURCES): New variables.
15157 (vga_mod_CFLAGS): Likewise.
15158 (font_mod_SOURCES): Likewise.
15159 (font_mod_CFLAGS): Likewise.
15161 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15163 * include/pupa/term.h: Include pupa/err.h.
15164 (struct pupa_term): Added init and fini.
15165 Changed the argument of putchar to pupa_uint32_t.
15167 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15168 (pupa_console_real_putchar): New prototype.
15169 (pupa_console_putchar): Removed.
15170 (pupa_console_checkkey): Exported.
15171 (pupa_console_getkey): Likewise.
15173 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15176 * kern/term.c (pupa_term_set_current): Rewritten.
15177 (pupa_putchar): Likewise.
15178 (pupa_putcode): New function.
15180 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15181 (pupa_console_real_putchar): ... this.
15182 (pupa_vga_set_mode): New function.
15183 (pupa_vga_get_font): Likewise.
15185 * normal/command.c: Include pupa/term.h.
15186 (terminal_command): New function.
15187 (pupa_command_init): Register the command "terminal".
15189 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15190 (DISP_UP): Likewise.
15191 (DISP_RIGHT): Likewise.
15192 (DISP_DOWN): Likewise.
15193 (DISP_HLINE): Likewise.
15194 (DISP_VLINE): Likewise.
15195 (DISP_UL): Likewise.
15196 (DISP_UR): Likewise.
15197 (DISP_LL): Likewise.
15198 (DISP_LR): Likewise.
15200 * term/i386/pc/console.c (pupa_console_putchar): New function.
15202 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15204 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15205 FIX. Reverse the path_list.
15207 * include/pupa/normal.h: Export pupa_register_command and
15208 pupa_unregister_command.
15210 * hello/hello.c (pupa_cmd_hello): New module.
15211 * conf/i386-pc.rmk: Added hello.mod.
15213 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15215 * kern/i386/pc/lzo1x.S: New file.
15217 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15218 (compress_kernel): New variable.
15219 (generate_image): Heavily modified to support compressing a
15220 large part of the core image.
15222 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15224 (pupa_util_load_image): New function.
15226 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15227 (pupa_compressed_size): New variable.
15228 (codestart): Enable Gate A20 here.
15229 Decompress the compressed part of the core image.
15230 Rearrange the code to put functions and variables which are
15231 required for initialization in the non-compressed part.
15234 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15237 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15239 * include/pupa/i386/pc/kernel.h
15240 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15241 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15242 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15243 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15244 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15246 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15248 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15249 (Utility#rule): Likewise.
15251 * configure.ac: Check if LZO is available.
15253 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15255 * include/pupa/normal.h: New file.
15256 * include/pupa/setjmp.h: Likewise.
15257 * include/pupa/i386/setjmp.h: Likewise.
15258 * normal/cmdline.c: Likewise.
15259 * normal/command.c: Likewise.
15260 * normal/main.c: Likewise.
15261 * normal/menu.c: Likewise.
15262 * normal/i386/setjmp.S: Likewise.
15264 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15265 (pupa_rescue_cmd_initrd): Likewise.
15267 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15270 * kern/i386/pc/startup.S (translation_table): New variable.
15271 (translate_keycode): New function.
15272 (pupa_console_getkey): Call translate_keycode.
15274 * kern/rescue.c (attempt_normal_mode): New function.
15275 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15276 it failed, print a message.
15278 * kern/mm.c (pupa_real_malloc): Print more information when a
15279 free magic is broken.
15280 (pupa_free): If the first free header is not free actually, set
15283 * kern/main.c (pupa_load_normal_mode): Just load the module
15285 (pupa_main): Don't print the message
15286 "Entering into rescue mode..." here.
15288 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15290 (pupa_rescue_cmd_initrd): Likewise.
15291 (pupa_rescue_cmd_initrd): Likewise.
15293 * include/pupa/symbol.h (FUNCTION): Specify the type.
15294 (VARIABLE): Likewise.
15296 * include/pupa/err.h (pupa_err_t): Added
15297 PUPA_ERR_UNKNOWN_COMMAND.
15299 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15300 (pupa_dl_get_prefix): Likewise.
15302 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15303 Added _chain.mod and _linux.mod instead of chain.mod and
15305 (chain_mod_SOURCES): Renamed to ...
15306 (_chain_mod_SOURCES): ... this.
15307 (chain_mod_CFLAGS): Renamed to ...
15308 (_chain_mod_CFLAGS): ... this.
15309 (linux_mod_SOURCES): Renamed to ...
15310 (_linux_mod_SOURCES): ... this.
15311 (linux_mod_CFLAGS): Renamed to ...
15312 (_linux_mod_CFLAGS): ... this.
15313 (normal_mod_SOURCES): New variable.
15314 (normal_mod_CFLAGS): Likewise.
15315 (normal_mod_ASFLAGS): Likewise.
15317 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
15319 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15322 * kern/dl.c (pupa_dl_ref): Refer depending modules
15324 (pupa_dl_unref): Unrefer depending modules recursively.
15325 Don't call pupa_dl_unload implicitly, because PUPA can crash if
15326 a module is unloaded before one depending on that module is
15328 (pupa_dl_unload): Unload depending modules explicitly,
15331 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
15333 * include/pupa/i386/pc/linux.h: New file.
15334 * loader/i386/pc/linux.c: Likewise.
15336 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15338 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15339 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
15340 of PUPA_CHAINLOADER_BOOT_SECTOR.
15342 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
15343 (pupa_linux_prot_size): New variable.
15344 (pupa_linux_tmp_addr): Likewise.
15345 (pupa_linux_real_addr): Likewise.
15346 (pupa_linux_boot_zimage): New function.
15347 (pupa_linux_boot_bzimage): Likewise.
15349 * kern/i386/pc/init.c (struct mem_region): New structure.
15350 (MAX_REGIONS): New macro.
15351 (mem_regions): New variable.
15352 (num_regions): Likewise.
15353 (pupa_os_area_addr): Likewise.
15354 (pupa_os_area_size): Likewise.
15355 (pupa_lower_mem): Likewise.
15356 (pupa_upper_mem): Likewise.
15357 (add_mem_region): New function.
15358 (compact_mem_regions): Likewise.
15359 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
15360 the size of the conventional memory and that of so-called upper
15361 memory (before the first memory hole).
15362 Instead of adding each found region to free memory, use
15363 add_mem_region and add them after removing overlaps.
15364 Also, add only 1/4 of the upper memory to free memory. The rest
15365 is used for loading OS images. Maybe this is ad hoc, but this
15366 makes it much easier to relocate OS images when booting.
15368 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
15369 (pupa_enter_rescue_mode): Don't register initrd and module.
15371 * kern/mm.c: Include pupa/dl.h.
15373 * kern/main.c: Include pupa/file.h and pupa/device.h.
15375 * kern/loader.c (pupa_loader_load_module_func): Removed.
15376 (pupa_loader_load_module): Likewise.
15378 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
15381 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
15382 (pupa_linux_tmp_addr): Likewise.
15383 (pupa_linux_real_addr): Likewise.
15384 (pupa_linux_boot_zimage): Likewise.
15385 (pupa_linux_boot_bzimage): Likewise.
15387 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
15388 (pupa_upper_mem): Likewise.
15389 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
15390 module is too dangerous.
15392 * include/pupa/loader.h (pupa_os_area_addr): Declared.
15393 (pupa_os_area_size): Likewise.
15394 (pupa_loader_set): Remove the first argument. Loader doesn't
15395 manage modules or initrd any longer.
15396 (pupa_loader_load_module): Removed.
15398 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15399 (linux_mod_SOURCES): New variable.
15400 (linux_mod_CFLAGS): Likewise.
15402 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
15404 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15405 the length of a blocklist correctly.
15407 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15408 Use ioctl only if the OS file is a block device.
15409 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15410 not very useful for normal files.
15412 * kern/main.c (pupa_set_root_dev): New function.
15413 (pupa_load_normal_mode): Likewise.
15414 (pupa_main): Call those above.
15416 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15419 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15421 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
15423 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15424 (setup): Configure the installed partition information and the
15427 * loader/i386/pc/chainloader.c (my_mod): New variable.
15428 (pupa_chainloader_unload): New function.
15429 (pupa_rescue_cmd_chainloader): Refer itself.
15430 (PUPA_MOD_INIT): Save its own module in MY_MOD.
15432 * kern/i386/pc/startup.S (install_partition): Removed.
15433 (version_string): Likewise.
15434 (config_file): Likewise.
15435 (pupa_install_dos_part): New variable.
15436 (pupa_install_bsd_part): Likewise.
15437 (pupa_prefix): Likewise.
15438 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15440 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15442 (make_install_device): New function.
15443 (pupa_machine_init): Set the dl prefix.
15445 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15446 (buf): Renamed to ...
15447 (linebuf): ... this.
15448 (pupa_rescue_cmd_prefix): New function.
15449 (pupa_rescue_cmd_insmod): Likewise.
15450 (pupa_rescue_cmd_rmmod): Likewise.
15451 (pupa_rescue_cmd_lsmod): Likewise.
15452 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15455 * kern/mm.c (pupa_memalign): If failed even after invalidating
15456 disk caches, unload unneeded modules and retry.
15458 * kern/misc.c (pupa_memmove): New function.
15459 (pupa_memcpy): Removed.
15460 (pupa_strcpy): New function.
15461 (pupa_itoa): Made static.
15463 * kern/dl.c (pupa_dl_iterate): New function.
15464 (pupa_dl_ref): Likewise.
15465 (pupa_dl_unref): Likewise.
15466 (pupa_dl_unload): Return if succeeded or not.
15467 (pupa_dl_unload_unneeded): New function.
15468 (pupa_dl_unload_all): Likewise.
15469 (pupa_dl_init): Renamed to ...
15470 (pupa_dl_set_prefix): ... this.
15471 (pupa_dl_get_prefix): New function.
15473 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15474 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15475 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15476 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15477 (pupa_install_dos_part): Declared.
15478 (pupa_install_bsd_part): Likewise.
15479 (pupa_prefix): Likewise.
15480 (pupa_boot_drive): Likewise.
15482 * include/pupa/types.h: Fix a typo.
15484 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15486 (pupa_memmove): Declared.
15487 (pupa_strcpy): Likewise.
15489 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15490 pupa_mod_init takes one argument, its own module.
15491 (pupa_dl_unload_unneeded): Declared.
15492 (pupa_dl_unload_all): Likewise.
15493 (pupa_dl_ref): Likewise.
15494 (pupa_dl_unref): Likewise.
15495 (pupa_dl_iterate): Likewise.
15496 (pupa_dl_init): Renamed to ...
15497 (pupa_dl_set_prefix): ... this.
15498 (pupa_dl_get_prefix): Declared.
15500 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15501 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15503 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15504 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15506 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15507 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15509 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15511 * util/i386/pc/pupa-setup.c (setup): Define the internal
15512 function find_first_partition_start at the top level, because GCC
15513 3.0.x cannot compile internal functions in deeper scopes
15515 (find_root_device): Use lstat instead of stat.
15516 Don't follow symbolic links.
15517 Fix the path-constructing code.
15519 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15520 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15521 by a BLKGETSIZE ioctl first, because block devices don't fill
15522 the member st_mode of the structure stat on Linux.
15523 [__linux__] (linux_find_partition): Use a temporary buffer
15524 REAL_DEV for the working space. Copy it to DEV before returning.
15525 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15526 buffer cache consistent.
15527 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15528 strncmp. The previous value was merely wrong.
15529 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15531 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15532 FAT size is 12. The previous value was merely wrong.
15534 * kern/main.c (pupa_main): Don't split the starting message from
15537 * kern/term.c (pupa_putchar): Put CR after LF instead of before
15538 LF, because BIOS goes crazy about character attributes in this
15541 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15543 * include/i386/pc/util/biosdisk.h: New file.
15544 * util/i386/pc/biosdisk.c: Likewise.
15545 * util/i386/pc/pupa-setup.c: Likewise.
15547 * Makefile.in (INCLUDE_DISTFILES): Added
15548 include/pupa/i386/pc/util/biosdisk.h.
15549 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15550 directory util/i386/pc.
15551 (install-local): Added a rule for sbin_UTILITIES.
15552 (uninstall): Likewise.
15554 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15556 * util/misc.c (xrealloc): New function.
15557 (pupa_malloc): Likewise.
15558 (pupa_free): Likewise.
15559 (pupa_realloc): Likewise.
15560 (pupa_stop): Likewise.
15561 (pupa_putchar): Likewise.
15563 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15565 * include/pupa/util/misc.h (xrealloc): Declared.
15567 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15569 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15570 (PUPA_BOOT_MACHINE_BPB_END): ... this.
15572 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15573 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15575 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15576 way should be implemented.
15577 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15579 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15580 the size of NAME for safety.
15581 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15584 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15585 (pupa_setup_SOURCES): Likewise.
15587 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15589 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15591 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15592 bunch of pushl's from pusha, because this destroys the return
15595 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15597 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15598 This means that any missing prototypes could be fatal. Also, you
15599 must take care when writing assembly code. See the comments at
15600 the beginning of startup.S, for more details.
15602 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15603 compilation mechanism.
15604 (pupa_chainloader_real_boot): Likewise.
15605 (pupa_biosdisk_rw_int13_extensions): Likewise.
15606 (pupa_biosdisk_rw_standard): Likewise.
15607 (pupa_biosdisk_check_int13_extensions): Likewise.
15608 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15609 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15610 (pupa_get_memsize): Likewise.
15611 (pupa_get_mmap_entry): Likewise.
15612 (pupa_console_putchar): Likewise.
15613 (pupa_console_setcursor): Likewise.
15614 (pupa_getrtsecs): Use pushl instead of push.
15616 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15617 memory instead of the stack for a mmap entry, because some
15618 BIOSes may ignore the maximum size and overflow.
15620 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15622 * genmk.rb (PModule#rule): Compile automatically generated
15623 sources with module-specific CFLAGS as well as other sources.
15625 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15627 * configure.ac: Check ld.
15628 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15629 respectively, before checking endianness and sizes.
15631 * Makefile.in (LD): New variable.
15633 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15635 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15637 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15639 * Changelog: New file.