1 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3 * INSTALL: Add that `./autogen.sh' needs to be run before
6 2009-04-14 Bean <bean123ch@gmail.com>
8 * Makefile.in (pkglib_DATA): Add handler.lst.
9 (handler.lst): New rule.
11 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
12 * conf/i386-coreboot.rmk: Likewise.
13 * conf/i386-ieee1275.rmk: Likewise.
14 * conf/i386-efi.rmk: Likewise.
15 * conf/x86_64-efi.rmk: Likewise.
16 * conf/powerpc-ieee1275.rmk: Likewise.
17 * conf/sparc64-ieee1275.rmk: Likewise.
19 * genhandlerlist.sh: New file.
21 * genmk.rb: Add rules to generate handler.lst.
23 * include/grub/normal.h (grub_file_getline): New function definition.
24 (read_handler_list): Likewise.
25 (free_handler_list): Likewise.
27 * include/grub/term.h (grub_term_register_input): Add name parameter
28 for auto generation of handler.lst.
29 (grub_term_register_output): Likewise.
31 * normal/handler.c: New file.
33 * normal/main.c (get_line): Renamed to grub_file_getline.
34 (read_config_file): Use the newly renamed grub_file_getline.
35 (read_command_list): Likewise.
36 (read_fs_list): Likewise.
37 (grub_normal_execute): Call read_handler_list to parse handler.lst.
38 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
40 * term/efi/console.c (grub_console_init): Add name parameter for auto
41 generation of handler.lst.
42 * term/gfxterm.c: Likewise.
43 * term/i386/pc/at_keyboard.c: Likewise.
44 * term/i386/pc/console.c: Likewise.
45 * term/i386/pc/serial.c: Likewise.
46 * term/i386/pc/vesafb.c: Likewise.
47 * term/i386/pc/vga.c: Likewise.
48 * term/i386/pc/vga_text.c: Likewise.
49 * term/ieee1275/ofconsole.c: Likewise.
50 * term/usb_keyboard.c: Likewise.
52 2009-04-14 Bean <bean123ch@gmail.com>
54 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
55 properly with null character.
57 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
60 * config.h.in: Likewise.
61 * stamp-h.in: Likewise.
63 * conf/common.mk: Likewise.
64 * conf/i386-coreboot.mk: Likewise.
65 * conf/i386-efi.mk: Likewise.
66 * conf/i386-ieee1275.mk: Likewise.
67 * conf/i386.mk: Likewise.
68 * conf/i386-pc.mk: Likewise.
69 * conf/powerpc-ieee1275.mk: Likewise.
70 * conf/sparc64-ieee1275.mk: Likewise.
71 * conf/x86_64-efi.mk: Likewise.
73 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
76 2009-04-14 John Stanley <jpsinthemix@verizon.net>
77 David S. Miller <davem@davemloft.net>
79 * util/hostdisk.c (make_device_name): Fix buffer length
82 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
84 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
85 <sys/param.h> and <sys/sysctl.h>.
86 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
87 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
88 opening the device and reset them afterwards.
90 2009-04-13 Pavel Roskin <proski@gnu.org>
92 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
93 Reported by John Stanley <jpsinthemix@verizon.net>
95 2009-04-13 Robert Millan <rmh@aybabtu.com>
97 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
98 that name for menuentries when appropiate.
100 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
102 * util/grub.d/10_freebsd.in: Add a missing `fi'.
104 2009-04-13 Robert Millan <rmh@aybabtu.com>
106 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
107 to Linux, simply abort telling the user it's no longer supported.
109 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
111 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
112 doestn't exist. Check also for /boot/kernel/kernel.gz. Print
113 `freebsd_loadenv' only when devices.hints exist.
115 2009-04-13 Pavel Roskin <proski@gnu.org>
117 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
119 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
121 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
123 (grub_drive): Likewise.
125 2009-04-13 David S. Miller <davem@davemloft.net>
127 * kern/sparc64/ieee1275/ieee1275.c: New file.
128 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
129 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
130 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
131 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
132 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
133 grub_ieee1275_alloc_physmem): Declare new exported functions.
135 * include/grub/sparc64/ieee1275/loader.h: New file.
136 * include/grub/sparc64/ieee1275/memory.h: Likewise.
137 * include/grub/sparc64/kernel.h: Likewise.
138 * loader/sparc64/ieee1275/linux.c: Likewise.
140 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
141 (grub_fstest_SOURCES): Likewise.
143 * util/hostdisk.c (make_device_name): Do not make any assumptions
144 about the length of drive names.
146 * kern/dl.c (grub_dl_load_file): Close file immediately when
147 we are done using it.
149 2009-04-12 David S. Miller <davem@davemloft.net>
151 * kern/misc.c (grub_ltoa): Fix cast when handling negative
152 values. Noticed by Pavel Roskin.
154 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
157 * genmk.rb: Add more flexible image type specification, also
158 pass --strip-unneeded to objcopy.
159 * conf/i386-pc.rmk: Use *_FORMAT.
160 * conf/i386-pc.mk: Rebuilt.
162 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
163 (OFDISK_HASH_SZ): Define.
164 (ofdisk_hash): New hash table.
165 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
166 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
167 instead of device phandle which is not unique.
169 * kern/sparc64/ieee1275/init.c: Delete, replace with...
170 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
171 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
172 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
173 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
174 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
175 GRUB_KERNEL_MACHINE_DATA_END): Define.
176 (grub_kernel_image_size, grub_total_module_size): Declare.
178 2009-04-12 Pavel Roskin <proski@gnu.org>
180 * configure.ac: Change the logic when we check for target tools.
181 Do it when the target is specified and it's different from the
182 specified value of the host.
184 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
186 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
187 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
188 GNU/kFreeBSD. Check if a device is a character device. Use
189 DIOCGMEDIASIZE to get the size.
190 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
191 support for GNU/kFreeBSD.
192 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
193 is a character device instead of a block device. Add support for
194 FreeBSD device names.
196 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
197 is a character device instead of a block device.
199 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
200 is a character device instead of a block device.
202 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
204 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
205 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
206 FreeBSD. Check if a device is a character device. Use
207 DIOCGMEDIASIZE to get the size.
208 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
210 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
211 is a character device instead of a block device. Add support for
212 FreeBSD device names.
214 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
215 a character device instead of a block device.
216 (grub_util_check_char_device): New function.
218 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
219 a character device instead of a block device.
221 * include/grub/util/getroot.h (grub_util_check_char_device): New
224 2009-04-11 David S. Miller <davem@davemloft.net>
226 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
228 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
229 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
230 function, if present.
231 (__bswapdi2): Likewise.
233 * include/grub/sparc64/ieee1275/boot.h: New file.
234 * boot/sparc64/ieee1275/boot.S: Likewise.
235 * boot/sparc64/ieee1275/diskboot.S: Likewise.
237 * kern/misc.c (grub_ltoa): New function.
238 (grub_vsprintf): Use it to format 'long' integers.
240 2009-04-10 David S. Miller <davem@davemloft.net>
242 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
243 slots are of type grub_ieee1275_cell_t.
244 (grub_nand_read): Likewise.
245 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
246 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
247 macros are used to compare values in arg/ret block of the call.
248 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
249 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
250 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
251 grub_ieee1275_instance_to_path, grub_ieee1275_write,
252 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
253 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
254 grub_ieee1275_close, grub_ieee1275_set_property,
255 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
256 grub_ieee1275_cell_t.
257 * kern/ieee1275/openfw.c (grub_map): Likewise.
258 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
259 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
261 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
262 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
263 (grub_devalias_iterate): Likewise.
265 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
269 * fs/ufs.c (INODE_NBLOCKS): new definition
270 (struct grub_ufs_dirent): added fields for non-BSD dirents
271 (grub_ufs_get_file_block): fixed double indirect handling
272 (grub_ufs_lookup_symlink): use more robust way to determine whether
274 (grub_ufs_find_file): support for non-BSD dirents
275 (grub_ufs_dir): support for non-BSD dirents
277 2009-04-10 Bean <bean123ch@gnail.com>
279 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
280 attribute, otherwise the size would be wrong for i386 platform.
282 * include/grub/pci.h (grub_pci_read_word): New inline function.
283 (grub_pci_read_byte): Likewise.
284 (grub_pci_write): Likewise.
285 (grub_pci_write_word): Likewise.
286 (grub_pci_write_byte): Likewise.
288 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
290 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
291 (find_framebuf): Scan pci to locate the frame buffer address.
293 * commands/efi/fixvideo.c: New file.
295 * commands/efi/loadbios.c: Likewise.
297 * commands/memrw.c: Likewise.
299 * util/grub-dumpbios.in: Likewise.
301 * conf/common.rmk (grub-dumpbios): New utility.
302 (pkglib_MODULES): New module memrw.mod.
303 (memrw_mod_SOURCE): New macro.
304 (memrw_mod_CFLAGS): Likewise.
305 (memrw_mod_LDFLAGS): Likewise.
307 * conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
309 (loadbios_mod_SOURCE): New macro.
310 (loadbios_mod_CFLAGS): Likewise.
311 (loadbios_mod_LDFLAGS): Likewise.
312 (fixvideo_mod_SOURCE): Likewise.
313 (fixvideo_mod_CFLAGS): Likewise.
314 (fixvideo_mod_LDFLAGS): Likewise.
316 * conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
318 (loadbios_mod_SOURCE): New macro.
319 (loadbios_mod_CFLAGS): Likewise.
320 (loadbios_mod_LDFLAGS): Likewise.
321 (fixvideo_mod_SOURCE): Likewise.
322 (fixvideo_mod_CFLAGS): Likewise.
323 (fixvideo_mod_LDFLAGS): Likewise.
325 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
327 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
329 2009-04-07 David S. Miller <davem@davemloft.net>
331 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
332 support for R_SPARC_OLO10 relocations. Fix compile warning for
333 R_SPARC_WDISP30 case.
334 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
336 2009-04-06 Pavel Roskin <proski@gnu.org>
338 * include/grub/misc.h (ARRAY_SIZE): New macro.
339 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
341 * loader/i386/linux.c (allocate_pages): Use free_pages().
342 (grub_linux_unload): Don't use free_pages().
343 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
344 wrong index. Treat all other modes as text modes.
345 (grub_cmd_linux): Initialize vid_mode unconditionally to
346 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
348 * commands/help.c (print_command_help): Use cmd->prio, not
349 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
351 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
355 * parttool/pcpart.c: new file
356 * commands/parttool.c: likewise
357 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
358 (parttool_mod_SOURCES): new variable
359 (parttool_mod_CFLAGS): likewise
360 (parttool_mod_LDFLAGS): likewise
361 (pcpart_mod_SOURCES): likewise
362 (pcpart_mod_CFLAGS): likewise
363 (pcpart_mod_LDFLAGS): likewise
364 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
365 and parttool/pcpart.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-ieee1275.rmk: likewise
373 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
375 Support for mtime and further expandability of dir command
377 * include/grub/lib/datetime.h: moved to ...
378 * include/grub/datetime.h: ... moved here and added
379 declaration of grub_unixtime2datetime. All users updated
380 * include/grub/fs.h: new syntax for dir and mtime functionin
382 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
383 and GRUB_FSHELP_FLAGS_MASK
384 * commands/ls.c (grub_ls_list_files): Write mtime in long format
385 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
386 (grub_ext2_mtime): new function
387 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
388 (grub_hfsplus_mtime): new function
389 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
390 (GRUB_UFS_ATTR_FILE): likewise
391 (GRUB_UFS_ATTR_LNK): likewise
392 (struct grub_ufs_sblock): new fields mtime
393 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
395 (grub_ufs_dir): mtime support
396 (grub_ufs_mtime): new function
397 * fs/affs.c (grub_affs_dir): use new dir syntax
398 * fs/afs.c (grub_afs_dir): likewise
399 * fs/cpio.c (grub_cpio_dir): likewise
400 * fs/fat.c (grub_fat_find_dir): likewise
401 * fs/hfs.c (grub_hfs_dir): likewise
402 * fs/iso9660.c (grub_iso9660_dir): likewise
403 * fs/jfs.c (grub_jfs_dir): likewise
404 * fs/minix.c (grub_minix_dir): likewise
405 * fs/ntfs.c (grub_ntfs_dir): likewise
406 * fs/reiserfs.c (grub_reiserfs_dir): likewise
407 * fs/sfs.c (grub_sfs_dir): likewise
408 * fs/xfs.c (grub_xfs_dir): likewise
409 * util/hostfs.c (grub_hostfs_dir): likewise
410 * lib/datetime.c: moved to ...
411 * normal/datetime.c: ... moved here
412 (grub_unixtime2datetime): new function
413 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
414 * normal/completition.c (iterate_dir): use new dir syntax
415 * normal/misc.c (grub_normal_print_device_info): tell the
416 last modification time of a volume
417 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
418 * conf/common.rmk: added lib/datetime.c to ls.mod
419 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
420 (normal_mod_SOURCES): likewise
421 (datetime_mod_SOURCES): Removed lib/datetime.c
422 * conf/i386-efi.rmk: likewise
423 * conf/i386-ieee1275.rmk: likewise
424 * conf/i386-pc.rmk: likewise
425 * conf/powerpc-ieee1275.rmk: likewise
426 * conf/sparc64-ieee1275.rmk: likewise
427 * conf/x86_64-efi.rmk: likewise
429 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
431 Trim trailing spaces in FAT label and support mtools-like labels
433 * fs/fat.c (grub_fat_iterate_dir): New function based
435 (grub_fat_find_dir): use grub_fat_iterate_dir
436 (grub_fat_label): likewise
438 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
440 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
442 remove extraneous kernel_elf_HEADERS
444 2009-04-04 Bean <bean123ch@gnail.com>
446 * include/grub/util/misc.h: Add dummy function fsync for mingw.
448 * util/misc.c: Likewise.
450 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
452 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
453 instead of grub_printf.
455 2009-04-03 Robert Millan <rmh@aybabtu.com>
457 * loader/i386/linux.c (grub_linux_setup_video): Fill
458 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
459 values from `mode info' structure instead of hardcoded
462 2009-04-01 Pavel Roskin <proski@gnu.org>
464 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
466 * genmk.rb: Likewise.
467 * configure.ac: Likewise.
469 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
471 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
472 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
474 2009-04-01 David S. Miller <davem@davemloft.net>
476 * normal/sparc64/setjmp.S: Fix setjmp implementation.
477 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
478 (grub_setjmp): Mark with 'returns_twice' attribute.
479 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
480 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
481 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
483 2009-04-01 Robert Millan <rmh@aybabtu.com>
485 Reapply fix from 2008-07-28 which was accidentally reverted; also
486 perform the same fix to a similar check in same function.
488 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
489 with the same number are found, just use issue a warning with
490 grub_dprintf(), as this error has been reported to be non-fatal.
492 2009-03-31 Pavel Roskin <proski@gnu.org>
494 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
495 for cross-compilation.
497 2009-03-30 Robert Millan <rmh@aybabtu.com>
499 Fix i386-ieee1275 build.
501 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
504 2009-03-30 Pavel Roskin <proski@gnu.org>
506 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
507 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
508 zero-terminated, rely only on the strlen value. Fix comparison
509 of strings differing in length.
511 2009-03-30 Robert Millan <rmh@aybabtu.com>
513 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
514 checking for abi version. Improve error messages on BIOS to notify
515 user about `linux16' command.
517 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
521 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
523 * disk/scsi.c (grub_scsi_open): free scsi in case of error
525 2009-03-29 Robert Millan <rmh@aybabtu.com>
527 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
528 set `vid_mode' accordingly.
529 (grub_linux_boot): Process `vid_mode' and set video mode.
531 2009-03-29 Robert Millan <rmh@aybabtu.com>
533 * util/grub.d/10_linux.in (linux_entry): New function.
534 Factorize generation of Linux boot entries.
536 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
538 Make the format of Environment Block plain text. The boot loader
539 part is not tested well yet.
541 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
544 (usage): Remove "info" and "clear". Add "unset". Update the
545 description of "set", as this does not delete variables any
547 (create_envblk_file): Complete rewrite.
548 (open_envblk_file): Likewise.
550 (cmd_list): Likewise.
552 (cmd_clear): Likewise.
553 (list_variables): New function.
554 (write_envblk): Likewise.
555 (set_variables): Likewise.
556 (unset_variables): Likewise.
557 (main): Complete rewrite.
559 * commands/loadenv.c (buffer): Removed.
561 (open_envblk_file): New function.
562 (read_envblk_file): Complete rewrite.
563 (grub_cmd_load_env): Likewise.
564 (grub_cmd_list_env): Likewise.
565 (struct blocklist): New struct.
566 (free_blocklists): New function.
567 (check_blocklists): Likewise.
568 (write_blocklists): Likewise.
569 (grub_cmd_save_env): Complete rewrite.
571 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
572 a plain text signature.
573 (GRUB_ENVBLK_MAXLEN): Removed.
574 (struct grub_envblk): Complete rewrite.
575 (grub_envblk_find): Removed.
576 (grub_envblk_insert): Likewise.
577 (grub_envblk_open): New prototype.
578 (grub_envblk_set): Likewise.
579 (grub_envblk_delete): Put const to VALUE.
580 (grub_envblk_iterate): Put const to NAME and VALUE.
581 (grub_envblk_close): New prototype.
582 (grub_envblk_buffer): New inline function.
583 (grub_envblk_size): Likewise.
585 * lib/envblk.c: Include grub/mm.h.
586 (grub_env_find): Removed.
587 (grub_envblk_open): New function.
588 (grub_envblk_close): Likewise.
589 (escaped_value_len): Likewise.
590 (find_next_line): Likewise.
591 (grub_envblk_insert): Removed.
592 (grub_envblk_set): New function.
593 (grub_envblk_delete): Complete rewrite.
594 (grub_envblk_iterate): Likewise.
596 2009-03-28 Robert Millan <rmh@aybabtu.com>
598 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
599 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
600 variables. Use 16-bit loader.
601 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
603 * kern/i386/loader.S (grub_linux_boot): Rename to ...
604 (grub_linux16_boot): ... this. Update all users.
605 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
606 (grub_linux_boot): ... this. Update all users.
608 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
609 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
610 commands to `linux16' and `initrd16'.
611 (GRUB_MOD_FINI(linux)): Rename to ...
612 (GRUB_MOD_FINI(linux16)): ... this.
614 2009-03-24 Pavel Roskin <proski@gnu.org>
616 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
617 not just for compilation.
619 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
621 Move multiboot helper out of kernel
623 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
624 `loader/i386/multiboot_helper.S'.
625 * conf/i386-coreboot.rmk: Likewise
626 * conf/i386-ieee1275.rmk: Likewise
628 * kern/i386/loader.S: Move multiboot helpers from here...
629 * loader/i386/multiboot_helper.S: ...moved here
630 * include/grub/i386/loader.h: Move declarations of multiboot
632 * include/grub/i386/multiboot.h: ...moved here
633 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
635 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
637 * kern/env.c (grub_env_context_open): Added an argument to specify
638 whether a new context inherits exported variables from current
639 one. This is useful when making a sandbox to interpret a config
643 * include/grub/env.h (grub_env_context_open): Updated the prototype.
645 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
647 * kern/env.c (grub_env_context_close): Fix memory leaks.
649 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
651 * normal/main.c (grub_normal_execute): Added an argument
652 BATCH to specify if an interactive interface should be provided
653 after reading a config file.
655 (read_command_list): Prevent being executed twice.
656 (read_fs_list): Likewise.
658 * include/grub/normal.h (grub_normal_execute): Updated the
661 2009-03-22 Pavel Roskin <proski@gno.org>
663 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
665 * kern/i386/pc/startup.S: Likewise.
666 * kern/i386/efi/startup.S: Likewise.
667 * kern/i386/ieee1275/startup.S: Likewise.
668 * kern/i386/coreboot/startup.S: Likewise.
669 * kern/x86_64/efi/startup.S: Likewise.
671 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
672 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
673 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
675 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
677 Bugfixes in multiboot for bugs uncovered by solaris kernel.
679 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
681 Use vaddr of correct segment for entry_point.
683 2009-03-21 Bean <bean123ch@gmail.com>
685 * commands/blocklist.c: Add include file <grub/command.h>, remove
686 <grub/normal.h> and <grub/arg.h>.
687 (grub_cmd_blocklist): Use the new command interface.
688 (GRUB_MOD_INIT): Likewise.
689 (GRUB_MOD_FINI): Likewise.
690 * commands/boot.c: Likewise.
691 * commands/cat.c: Likewise.
692 * commands/cmp.c: Likewise.
693 * commands/configfile.c: Likewise.
694 * commands/crc.c: Likewise.
695 * commands/echo.c: Likewise.
696 * commands/halt.c: Likewise.
697 * commands/handler.c: Likewise.
698 * commands/hdparm.c: Likewise.
699 * commands/help.c: Likewise.
700 * commands/hexdump.c: Likewise.
701 * commands/loadenv.c: Likewise.
702 * commands/ls.c: Likewise.
703 * commands/lsmmap.c: Likewise.
704 * commands/lspci.c: Likewise.
705 * commands/loadenv.c: Likewise.
706 * commands/read.c: Likewise.
707 * commands/reboot.c: Likewise.
708 * commands/search.c: Likewise.
709 * commands/sleep.c: Likewise.
710 * commands/test.c: Likewise.
711 * commands/usbtest.c: Likewise.
712 * commands/videotest.c: Likewise.
713 * commands/i386/cpuid.c: Likewise.
714 * commands/i386/pc/halt.c: Likewise.
715 * commands/i386/pc/play.c: Likewise.
716 * commands/i386/pc/pxecmd.c: Likewise.
717 * commands/i386/pc/vbeinfo.c: Likewise.
718 * commands/i386/pc/vbetest.c: Likewise.
719 * commands/ieee1275/suspend.c: Likewise.
720 * disk/loopback.c: Likewise.
721 * font/font_cmd.c: Likewise.
722 * hello/hello.c: Likewise.
723 * loader/efi/appleloader.c: Likewise.
724 * loader/efi/chainloader.c: Likewise.
725 * loader/i386/bsd.c: Likewise.
726 * loader/i386/efi/linux.c: Likewise.
727 * loader/i386/ieee1275/linux.c: Likewise.
728 * loader/i386/linux.c: Likewise.
729 * loader/i386/pc/chainloader.c: Likewise.
730 * loader/i386/pc/linux.c: Likewise.
731 * loader/powerpc/ieee1275/linux.c: Likewise.
732 * loader/multiboot_loader.c: Likewise.
733 * term/gfxterm.c: Likewise.
734 * term/i386/pc/serial.c: Likewise.
735 * term/terminfo.c: Likewise.
737 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
738 * term/i386/pc/vga.c: Likewise.
739 * video/readers/jpeg.c: Likewise.
740 * video/readers/png.c: Likewise.
741 * video/readers/tga.c: Likewise.
743 * util/grub-fstest (cmd_loopback): Removed.
744 (cmd_blocklist): Likewise.
746 (grub_register_command): Likewise.
747 (grub_unregister_command): Likewise.
748 (execute_command): Use grub_command_find to locate command and execute
751 * include/grub/efi/chainloader.h: Removed.
752 * loader/efi/chainloader_normal.c: Likewise.
753 * loader/i386/bsd_normal.c: Likewise.
754 * loader/i386/pc/chainloader_normal.c: Likewise.
755 * loader/i386/pc/multiboot_normal.c: Likewise.
756 * loader/linux_normal.c: Likewise.
757 * loader/multiboot_loader_normal.c: Likewise.
758 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
760 * gencmdlist.sh: Scan new registration command grub_register_extcmd
761 and grub_register_command_p1.
763 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
764 kern/command.c, lib/arg.c and commands/extcmd.c.
765 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
766 (minicmd_mod_SOURCES): New variable.
767 (minicmd_mod_CFLAGS): Likewise.
768 (minicmd_mod_LDFLAGS): Likewise.
769 (extcmd_mod_SOURCES): Likewise.
770 (extcmd_mod_CFLAGS): Likewise.
771 (extcmd_mod_LDFLAGS): Likewise.
772 (boot_mod_SOURCES): Removed.
773 (boot_mod_CFLAGS): Likewise.
774 (boot_mod_LDFLAGS): Likewise.
776 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
778 (kernel_img_HEADERS): Add command.h.
779 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
780 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
782 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
783 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
784 remove the corresponding normal mode command.
785 (normal_mod_SOURCES): Remove normal/arg.c.
786 * conf/i386-coreboot.rmk: Likewise.
787 * conf/i386-efi.rmk: Likewise.
788 * conf/i386-ieee1275.rmk: Likewise.
789 * conf/powerpc-ieee1275.rmk: Likewise.
790 * conf/x86_64-efi.rmk: Likewise.
792 * include/grub/arg.h: Move from here ...
793 * include/grub/lib/arg.h: ... to here.
795 * normal/arg.c: Move from here ...
796 * lib/arg.c: ... to here.
798 * commands/extcmd.c: New file.
799 * commands/minicmd.c: Likewise.
800 * include/grub/command.h: Likewise.
801 * include/grub/extcmd.h: Likewise.
802 * kern/command.c: Likewise.
803 * kern/corecmd.c: Likewise.
805 * kern/list.c (grub_list_iterate): Return int instead of void.
806 (grub_list_insert): New function.
807 (grub_prio_list_insert): Likewise.
809 * kern/rescue.c (grub_rescue_command): Removed.
810 (grub_rescue_command_list): Likewise.
811 (grub_rescue_register_command): Likewise.
812 (grub_rescue_unregister_command): Likewise.
813 (grub_rescue_cmd_boot): Move to minicmd.c
814 (grub_rescue_cmd_help): Likewise.
815 (grub_rescue_cmd_info): Likewise.
816 (grub_rescue_cmd_boot): Likewise.
817 (grub_rescue_cmd_testload): Likewise.
818 (grub_rescue_cmd_dump): Likewise.
819 (grub_rescue_cmd_rmmod): Likewise.
820 (grub_rescue_cmd_lsmod): Likewise.
821 (grub_rescue_cmd_exit): Likewise.
822 (grub_rescue_print_devices): Moved to corecmd.c.
823 (grub_rescue_print_files): Likewise.
824 (grub_rescue_cmd_ls): Likewise.
825 (grub_rescue_cmd_insmod): Likewise.
826 (grub_rescue_cmd_set): Likewise.
827 (grub_rescue_cmd_unset): Likewise.
828 (attempt_normal_mode): Use grub_command_find to get normal module.
829 (grub_enter_rescue_mode): Use grub_register_core_commands to register
830 commands, remove grub_rescue_register_command calls.
832 * normal/command.c (grub_register_command): Removed.
833 (grub_unregister_command): Likewise.
834 (grub_command_find): Likewise.
835 (grub_iterate_commands): Likewise.
836 (rescue_command): Likewise.
837 (export_command): Moved to corecmd.c.
838 (set_command): Removed.
839 (unset_command): Likewise.
840 (insmod_command): Likewise.
841 (rmmod_command): Likewise.
842 (lsmod_command): Likewise.
843 (grub_command_init): Likewise.
845 * normal/completion.c (iterate_command): Use cmd->prio to check for
847 (complete_arguments): Use grub_extcmd_t structure to find options.
848 (grub_normal_do_completion): Change function grub_iterate_commands to
849 grub_command_iterate.
851 * normal/execute.c (grub_script_execute_cmd): No need to parse
854 * normal/main.c (grub_dyncmd_dispatcher): New function.
855 (read_command_list): Register unload commands as dyncmd.
856 (grub_cmd_normal): Use new command interface, register rescue,
857 unregister normal at entry, register normal, unregister rescue at exit.
859 * include/grub/list.h (grub_list_test_t): New type.
860 (grub_list_iterate): Return int instead of void.
861 (grub_list_insert): New function.
862 (GRUB_AS_NAMED_LIST_P): New macro.
863 (GRUB_AS_PRIO_LIST): Likewise.
864 (GRUB_AS_PRIO_LIST_P): Likewise.
865 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
866 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
867 (grub_prio_list): New structure.
868 (grub_prio_list_insert): New function.
869 (grub_prio_list_remove): New inline function.
871 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
872 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
873 (GRUB_COMMAND_FLAG_MENU): Likewise.
874 (GRUB_COMMAND_FLAG_BOTH): Likewise.
875 (GRUB_COMMAND_FLAG_TITLE): Likewise.
876 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
877 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
878 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
879 (grub_command): Likewise.
880 (grub_register_command): Likewise.
881 (grub_command_find): Likewise.
882 (grub_iterate_commands): Likewise.
883 (grub_command_init): Likewise.
884 (grub_arg_parse): Likewise.
885 (grub_arg_show_help): Likewise.
887 * include/grub/rescue.h (grub_rescue_register_command): Removed.
888 (grub_rescue_unregister_command): Likewise.
890 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
891 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
892 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
894 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
895 grub_rescue_cmd_initrd.
896 * include/grub/i386/loader.h: Likewise.
897 * include/grub/x86_64/loader.h: Likewise.
899 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
901 2009-03-21 Bean <bean123ch@gmail.com>
903 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
904 instead of stat in mingw environment.
906 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
908 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
910 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
913 2009-03-21 Bean <bean123ch@gmail.com>
915 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
918 2009-03-18 Michel Dänzer <michel@daenzer.net>
920 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
921 checking inode flags for EXT4_EXTENTS_FLAG.
923 2009-03-18 Robert Millan <rmh@aybabtu.com>
925 * loader/i386/linux.c: Include `<grub/video.h>' and
926 `<grub/i386/pc/vbe.h>'..
927 (grub_linux_setup_video): New function. Loosely based on the EFI one.
928 (grub_linux32_boot): Attempt to configure video settings with
929 grub_linux_setup_video().
930 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
931 to avoid grub_console_fini() which would step out of graphical mode
934 2009-03-14 Robert Millan <rmh@aybabtu.com>
936 Fix build on powerpc.
937 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
939 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
941 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
942 background image command.
944 2009-03-12 Colin D Bennett <colin@gibibit.com>
946 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
947 (grub_gfxterm_putchar): Extract pairs of identical calls to
948 draw_cursor out of conditional blocks.
950 2009-03-11 Pavel Roskin <proski@gnu.org>
952 * fs/hfs.c (grub_hfs_strncasecmp): New function.
953 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
955 2009-03-11 Robert Millan <rmh@aybabtu.com>
957 * loader/i386/multiboot_elfxx.c
958 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
960 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
962 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
965 2009-03-11 Robert Millan <rmh@aybabtu.com>
967 * loader/i386/multiboot.c (code_size): New variable.
968 (grub_multiboot): Define offsets by adding to `code_size' rather
969 than subtracting from `grub_multiboot_payload_size'. Provide
970 4-byte alignment to MBI and others by increasing
971 `boot_loader_name_length' appropriately.
973 * loader/i386/multiboot_elfxx.c
974 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
976 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
978 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
981 2009-03-08 Robert Millan <rmh@aybabtu.com>
983 Make loader/i386/linux.c usable on i386-pc again.
985 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
987 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
990 2009-03-07 Bean <bean123ch@gmail.com>
992 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
995 2009-03-06 Robert Millan <rmh@aybabtu.com>
997 Fix display issue on terminals with screen size other than 80x25
998 (e.g. gfxterm with resolution higher than 640x480).
1000 * normal/main.c (grub_normal_init_page): Display title text in a
1001 position relative to the center of the terminal instead of relying
1002 on a hardcoded offset.
1004 2009-03-04 Robert Millan <rmh@aybabtu.com>
1006 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1009 * Makefile.in (host_kernel): New variable.
1010 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1011 scripts instead of just the windows one.
1012 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1014 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1016 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1018 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1019 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1020 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1021 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1022 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1023 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1025 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1027 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1028 or if there's no space for the disk label and print the partition number on a
1031 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1033 * util/misc.c: Include <time.h>.
1034 (grub_millisleep): New function.
1036 2009-03-04 Bean <bean123ch@gmail.com>
1038 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1039 another option -mno-red-zone.
1041 * commands/handler.c: Change module description.
1043 * kern/handler.c: Add missing space at the end of description line.
1045 * kern/list.c: Likewise.
1047 2009-03-03 Robert Millan <rmh@aybabtu.com>
1049 Move more components to the relocation area, and fix mbi pointer
1050 handling to use the destination rather than the origin (thanks to
1051 Vladimir Serbinenko for spotting).
1053 * loader/i386/multiboot.c (mbi_dest): New variable.
1054 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1055 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1058 2009-03-01 Bean <bean123ch@gmail.com>
1060 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
1061 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1062 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1063 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1065 * loader/i386/efi/linux.c (acpi_guid): New variable.
1066 (acpi_guid): Likewise.
1067 (EBDA_SEG_ADDR): New constant.
1068 (LOW_MEM_ADDR): Likewise.
1069 (FAKE_EBDA_SEG): Likewise.
1070 (fake_bios_data): New function.
1071 (grub_linux_boot): Call fake_bios_data.
1073 2009-03-01 Bean <bean123ch@gmail.com>
1075 * commands/terminal.c: Removed.
1077 * commands/handler.c: New file.
1079 * include/grub/list.h: Likewise.
1081 * include/grub/handler.h: Likewise.
1083 * kern/list.c: Likewise.
1085 * kern/handler.c: Likewise.
1087 * kern/term.h: Include header file <grub/handler.h>.
1088 (grub_term_input): Move next field to the beginning.
1089 (grub_term_output): Likewise.
1090 (grub_term_input_class): New variable.
1091 (grub_term_output_class): Likewise.
1092 (grub_term_register_input): Changed to inline function.
1093 (grub_term_register_output): Likewise.
1094 (grub_term_unregister_input): Likewise.
1095 (grub_term_unregister_output): Likewise.
1096 (grub_term_set_current_input): Likewise.
1097 (grub_term_set_current_output): Likewise.
1098 (grub_term_get_current_input): Likewise.
1099 (grub_term_get_current_output): Likewise.
1100 (grub_term_iterate_input): Removed.
1101 (grub_term_iterate_output): Likewise.
1103 * kern/term.c (grub_term_list_input): Removed.
1104 (grub_term_list_output): Likewise.
1105 (grub_term_input_class): New variable.
1106 (grub_term_output_class): Likewise.
1107 (grub_cur_term_input): Change variable as macro.
1108 (grub_cur_term_output): Likewise.
1109 (grub_term_register_input): Removed.
1110 (grub_term_register_output): Likewise.
1111 (grub_term_unregister_input): Likewise.
1112 (grub_term_unregister_output): Likewise.
1113 (grub_term_set_current_input): Likewise.
1114 (grub_term_set_current_output): Likewise.
1115 (grub_term_iterate_input): Likewise.
1116 (grub_term_iterate_output): Likewise.
1117 (grub_term_get_current_input): Likewise.
1118 (grub_term_get_current_output): Likewise.
1120 * util/grub-editenv.c: Include header file <grub/handler.h>.
1121 (grub_term_get_current_input): Removed.
1122 (grub_term_get_current_output): Likewise.
1123 (grub_term_input_class): New variable.
1124 (grub_term_output_class): Likewise.
1126 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1127 (grub_term_get_current_output): Likewise.
1128 (grub_term_input_class): New variable.
1129 (grub_term_output_class): Likewise.
1131 * util/grub-probe.c (grub_term_get_current_input): Removed.
1132 (grub_term_get_current_output): Likewise.
1133 (grub_term_input_class): New variable.
1134 (grub_term_output_class): Likewise.
1136 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1137 (grub_term_get_current_output): Likewise.
1138 (grub_term_input_class): New variable.
1139 (grub_term_output_class): Likewise.
1141 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1142 (terminal_mod_SOURCES): Likewise.
1143 (terminal_mod_CFLAGS): Likewise.
1144 (terminal_mod_LDFLAGS): Likewise.
1146 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1148 (kernel_img_SOURCES): Add list.c and handler.c.
1149 (kernel_img_HEADERS): Add list.h and handler.h.
1151 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1153 (kernel_mod_SOURCES): Add list.c and handler.c.
1154 (kernel_mod_HEADERS): Add list.h and handler.h.
1156 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1158 (kernel_elf_SOURCES): Add list.c and handler.c.
1159 (kernel_elf_HEADERS): Add list.h and handler.h.
1161 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1163 (kernel_elf_SOURCES): Add list.c and handler.c.
1164 (kernel_elf_HEADERS): Add list.h and handler.h.
1166 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1168 (kernel_mod_SOURCES): Add list.c and handler.c.
1169 (kernel_mod_HEADERS): Add list.h and handler.h.
1171 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1173 (kernel_elf_SOURCES): Add list.c and handler.c.
1174 (kernel_elf_HEADERS): Add list.h and handler.h.
1176 2009-02-27 Robert Millan <rmh@aybabtu.com>
1178 Factorize elf32 / elf64 code in Multiboot loader. This will
1179 prevent it from getting out of sync again.
1181 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1182 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1183 grub_multiboot_load_elf64): Move from here ...
1184 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1185 grub_multiboot_load_elf): ... to here (new file).
1187 2009-02-27 Robert Millan <rmh@aybabtu.com>
1189 * util/grub.d/10_linux.in: Rename "single-user mode" to
1192 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
1194 Don't leak in SCSI code.
1195 * disk/scsi.c (grub_scsi_close): free `scsi'.
1197 2009-02-27 Robert Millan <rmh@aybabtu.com>
1199 * loader/i386/pc/multiboot.c: Move from here ...
1200 * loader/i386/multiboot.c: ... to here. Update all users.
1202 2009-02-27 Robert Millan <rmh@aybabtu.com>
1204 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1205 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1207 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
1209 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1212 2009-02-27 Robert Millan <rmh@aybabtu.com>
1214 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1215 `0x' qualifier as 0 when base is specified as parameter).
1217 2009-02-24 Bean <bean123ch@gmail.com>
1219 * configure.ac: Check for -mcmodel=large in x86_64 target.
1221 * include/grub/efi/api.h (efi_call_10): New macro.
1222 (efi_wrap_10): New function.
1224 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1225 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1226 (GRUB_PE32_REL_BASED_LOW): Likewise.
1227 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1228 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1229 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1230 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1231 (GRUB_PE32_REL_BASED_REL): Likewise.
1232 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1233 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1234 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1236 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1239 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1240 (efi_wrap_10): New function.
1242 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1244 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1245 MB/MBP model (NV chipset).
1246 (devdata_devs): Add devpath_5 to the list.
1248 * load/i386/efi/linux.c (video_base): Remove variable.
1249 (RGB_MASK): New macro.
1250 (RGB_MAGIC): Likewise.
1251 (LINE_MIN): Likewise.
1252 (LINE_MAX): Likewise.
1253 (FBTEST_STEP): Likewise.
1254 (FBTEST_COUNT): Likewise.
1255 (fb_list): New variable.
1256 (grub_find_video_card): Remove function.
1257 (find_framebuf): New function.
1258 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1261 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1264 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1266 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1268 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1271 2009-02-22 Robert Millan <rmh@aybabtu.com>
1273 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1274 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1275 in our relocation, instead of using it directly from heap. Also
1276 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1278 2009-02-21 Robert Millan <rmh@aybabtu.com>
1280 Implement USB keyboard support (based on patch by Marco Gerards)
1282 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1283 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1284 (usb_keyboard_mod_LDFLAGS): New variables.
1286 * term/usb_keyboard.c: New file.
1288 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1290 Corrected wrong declaration
1292 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1294 2009-02-14 Christian Franke <franke@computer.org>
1296 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1297 (grub_lspci_iter): Print class code and programming interface byte.
1299 2009-02-14 Christian Franke <franke@computer.org>
1301 * gendistlist.sh: Ignore `.svn' directories.
1303 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
1305 * fs/fat.c: Add 2009 to Copyright line.
1307 2009-02-14 Christian Franke <franke@computer.org>
1309 * commands/hdparm.c: New file. Provides `hdparm' command
1310 which sends ATA commands via grub_disk_ata_pass_through ().
1312 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1314 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1315 and <grub/cpu/io.h> to include/grub/ata.h.
1316 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1317 (GRUB_CDROM_SECTOR_SIZE): Remove.
1318 (GRUB_ATA_*): Move to include/grub/ata.h.
1319 (GRUB_ATAPI_*): Likewise.
1320 (enum grub_ata_commands): Likewise.
1321 (enum grub_ata_timeout_milliseconds): Likewise.
1322 (struct grub_ata_device): Likewise.
1323 (grub_ata_regset): Likewise.
1324 (grub_ata_regget): Likewise.
1325 (grub_ata_regset2): Likewise.
1326 (grub_ata_regget2): Likewise.
1327 (grub_ata_check_ready): Likewise.
1328 (grub_ata_wait_not_busy): Remove static, exported in
1330 (grub_ata_wait_drq): Likewise.
1331 (grub_ata_pio_read): Likewise.
1333 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1334 function for hdparm.mod.
1336 * include/grub/ata.h: New file, contains declarations from
1338 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1340 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1341 (grub_disk_ata_pass_through): New exported variable.
1343 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1345 2009-02-13 Colin D Bennett <colin@gibibit.com>
1347 Support multiple fallback entries, and provide an API to support
1348 executing default+fallback menu entries. Renamed the `terminal' menu
1351 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1352 variable declaration.
1353 (grub_menu_execute_callback): New structure declaration.
1354 (grub_menu_execute_callback_t): New typedef.
1355 (grub_menu_execute_with_fallback): New function declaration.
1356 (grub_menu_get_entry): Likewise.
1357 (grub_menu_get_timeout): Likewise.
1358 (grub_menu_set_timeout): Likewise.
1360 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1362 * normal/menu.c (grub_wait_after_message): Moved to
1363 `normal/menu_text.c'.
1364 (draw_border): Likewise.
1365 (print_message): Likewise.
1366 (print_entry): Likewise.
1367 (print_entries): Likewise.
1368 (grub_menu_init_page): Likewise.
1369 (get_entry_number): Likewise.
1370 (print_timeout): Likewise.
1371 (run_menu): Likewise.
1372 (grub_menu_execute_entry): Likewise.
1373 (show_text_menu): Likewise.
1374 (get_and_remove_first_entry_number): New function.
1375 (grub_menu_execute_with_fallback): Likewise.
1376 (get_entry): Renamed to ...
1377 (grub_menu_get_entry): .. this and made it global.
1378 (get_timeout): Renamed to ...
1379 (grub_menu_get_timeout): ... this and made it global.
1380 (set_timeout): Renamed to ...
1381 (grub_menu_set_timeout): ... this and made it global.
1382 (grub_normal_terminal_menu_viewer): Renamed to ...
1383 (grub_normal_text_menu_viewer): ... this.
1385 * normal/menu_text.c: New file. Extracted text-menu-specific code
1388 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1389 (normal_mod_SOURCES): Likewise.
1391 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1392 (normal_mod_SOURCES): Likewise.
1394 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1395 (normal_mod_SOURCES): Likewise.
1397 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
1398 (normal_mod_SOURCES): Likewise.
1400 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1401 (normal_mod_SOURCES): Likewise.
1403 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1404 (normal_mod_SOURCES): Likewise.
1406 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1407 (normal_mod_SOURCES): Likewise.
1409 2009-02-11 Robert Millan <rmh@aybabtu.com>
1411 * util/grub.d/00_header.in: Update old reference to `font' command.
1413 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
1415 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
1417 Based on patch from Javier MartÃn.
1419 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1421 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
1422 to avoid false positives with FAT.
1423 (grub_fstest_SOURCES): Likewise.
1424 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1425 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1426 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1427 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1428 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1429 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1431 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1433 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
1434 bpb.version_specific.fat12_or_fat16.fstype and
1435 bpb.version_specific.fat32.fstype.
1437 2009-02-08 Robert Millan <rmh@aybabtu.com>
1439 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
1441 2009-02-08 Robert Millan <rmh@aybabtu.com>
1443 * Makefile.in (host_os, host_cpu): New variables.
1444 (target_os): Remove. Update all users.
1446 2009-02-08 Marco Gerards <marco@gnu.org>
1448 * Makefile.in (enable_grub_emu_usb): New variable.
1449 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
1450 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
1451 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
1452 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
1453 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1454 `usbtest.mod' and `usbms.mod'.
1455 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1456 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1457 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1458 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1459 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1462 * disk/usbms.c: New file.
1464 * include/grub/usb.h: Likewise.
1466 * include/grub/usbtrans.h: Likewise.
1468 * include/grub/usbdesc.h: Likewise.
1470 * bus/usb/usbtrans.c: Likewise.
1472 * bus/usb/ohci.c: Likewise.
1474 * bus/usb/uhci.c: Likewise.
1476 * bus/usb/usbhub.c: Likewise.
1478 * bus/usb/usb.c: Likewise.
1480 * commands/usbtest.c: Likewise.
1482 * util/usb.c: Likewise.
1484 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1486 * configure.ac: Test for libusb presence.
1488 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1490 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
1492 * kern/mm.c: Add more comments.
1494 2009-02-08 Robert Millan <rmh@aybabtu.com>
1496 Patch from Javier MartÃn.
1497 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1498 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1500 2009-02-08 Robert Millan <rmh@aybabtu.com>
1502 * fs/cpio.c: Split tar functionality to ...
1503 * fs/tar.c: ... here (new file). Update all users.
1505 2009-02-07 Robert Millan <rmh@aybabtu.com>
1507 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1508 backward-incompatible features.
1510 Based on patch from Javier MartÃn, with some adjustments.
1512 2009-02-07 Michael Scherer <misc@mandriva.org>
1514 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1516 2009-02-07 Robert Millan <rmh@aybabtu.com>
1518 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1519 position of `disk/lvm.c' to ensure grub_init_all() always picks it
1520 after the RAID stuff.
1522 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
1524 Fixes problem when running vbetest command as reported by
1525 Vladimir Serbinenko <phcoder@gmail.com>.
1527 * (grub_vbe_set_video_mode): Fixed problem with text modes.
1529 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
1531 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1532 /dev/md/NpN style mdraid devices.
1534 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1536 * util/unifont2pff.rb: Remove.
1538 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1540 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1543 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1545 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1546 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1547 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1548 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1549 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1550 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1551 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1553 2009-02-02 Christian Franke <franke@computer.org>
1555 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1557 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
1559 * INSTALL: Note that we now require at least autoconf 2.59 and
1560 that LZO is optional.
1562 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1564 Base on patch on bug #24154 created by Tomas Tintera
1567 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1569 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1571 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1572 <bero@arklinux.org>.
1574 * normal/parser.y (script_init): Add missing semicolon.
1576 2009-01-31 Colin D Bennett <colin@gibibit.com>
1578 * normal/main.c: Add include to grub/menu_viewer.h.
1579 (free_menu_entry_classes): Added.
1580 (grub_normal_menu_addentry): Added class property handling.
1581 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1582 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1584 * normal/menu_viewer.c: New file.
1586 * normal/menu.c (run_menu_entry): Renamed to ...
1587 (grub_menu_execute_entry): ... this and made it as global.
1588 (grub_menu_run): Renamed to ...
1589 (show_text_menu): ... this and made it local.
1590 (show_text_menu): Adapt to new function names.
1591 (grub_normal_terminal_menu_viewer): New global variable.
1593 * include/grub/menu.h: New file.
1595 * include/grub/menu_viewer.h: New file.
1597 * include/grub/normal.h: Added include to grub/menu.h.
1598 (grub_menu_entry): Moved to include/grub/menu.h.
1599 (grub_menu_entry_t): Likewise.
1600 (grub_menu): Likewise.
1601 (grub_menu_t): Likewise.
1602 (grub_normal_terminal_menu_viewer): Added.
1603 (grub_menu_execute_entry): Likewise.
1604 (grub_menu_run): Removed.
1606 * DISTLIST: Added include/grub/menu.h.
1607 Added include/grub/menu_viewer.h.
1608 Added normal/menu_viewer.c.
1610 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
1612 * normal/execute.c (grub_script_execute_menuentry): Changed to use
1613 arglist for menutitle arguments.
1615 * normal/main.c (grub_normal_menu_addentry): Likewise.
1617 * normal/parser.y (menuentry): Likewise.
1619 * normal/script.c (grub_script_create_cmdmenu): Likewise.
1621 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1622 (grub_script_create_cmdmenu): Likewise.
1624 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1626 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1629 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1631 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1633 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1635 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1637 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1639 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1641 2009-01-30 Christian Franke <franke@computer.org>
1643 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1644 in option help text.
1646 2009-01-27 Pavel Roskin <proski@gnu.org>
1648 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1650 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1652 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1654 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1656 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1657 unregister function.
1659 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1661 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1663 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1665 * util/grub-mkfont.c (usage): Fix typo.
1667 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1669 2009-01-26 Daniel Mierswa <impulze@impulze.org>
1671 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1673 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1675 * kern/misc.c (grub_strcasecmp): New function.
1676 (grub_strcasecmp): Use grub_size_t instead of int for length.
1678 * include/grub/misc.h: Update function prototypes.
1680 2009-01-26 Robert Millan <rmh@aybabtu.com>
1682 * configure.ac: Fix cross-compilation check.
1684 2009-01-22 Christian Franke <franke@computer.org>
1686 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1687 (precision) digit string. Allow `.format2' without `format1' (width).
1688 Limit input chars for `%s' output to `format2' if specified. This is
1689 compatible with standard printf ().
1691 2009-01-22 Christian Franke <franke@computer.org>
1693 * disk/ata.c (grub_ata_wait_status): Replace by ...
1694 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1695 other status bits may be invalid while BSY is asserted.
1696 (grub_ata_check_ready): New function.
1697 (grub_ata_cmd): Removed.
1698 (grub_ata_wait_drq): New function.
1699 (grub_ata_strncpy): Remove inline.
1700 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1701 and error check now done by grub_ata_wait_drq ().
1702 (grub_ata_pio_write): Likewise.
1703 (grub_atapi_identify): Set DEV before check for !BSY. Use
1704 grub_ata_wait_drq () to wait for data.
1705 (grub_ata_device_initialize): Add status register check to
1706 detect missing SATA slave devices. Add debug messages.
1707 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1708 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1709 transfer loop by grub_ata_pio_write ().
1710 (grub_ata_identify): Set DEV before check for !BSY. Use
1711 grub_ata_wait_drq () to wait for data.
1712 (grub_ata_setaddress): Set DEV before check for !BSY.
1713 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1714 read/write in one loop. Fix invalid command on write. Fix incomplete
1715 command on (size % batch) == 0. Add missing error check after write of
1716 last block. Add debug messages.
1717 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1719 2009-01-19 Christian Franke <franke@computer.org>
1721 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1722 (GRUB_ATAPI_IREASON_*): Likewise.
1723 (grub_ata_pio_write): Fix timeout error return.
1724 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1725 (grub_atapi_wait_drq): New function.
1726 (grub_atapi_packet): New parameter `size'.
1727 Use grub_atapi_wait_drq () and direct write instead of
1728 grub_ata_pio_write ().
1729 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1730 reads the number of bytes requested by the device for each DRQ
1732 (grub_atapi_write): Remove old implementation, return not
1733 implemented instead.
1735 2009-01-19 Christian Franke <franke@computer.org>
1737 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1738 of 512 to calculate data size.
1739 (grub_scsi_read12): Likewise.
1740 (grub_scsi_write10): Likewise.
1741 (grub_scsi_write12): Likewise.
1742 (grub_scsi_read): Adjust size according to blocksize.
1743 Add checks for invalid blocksize and unaligned transfer.
1745 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1747 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1749 * term/gfxterm.c (write_char): Fix background rendering for wide
1752 2009-01-19 Robert Millan <rmh@aybabtu.com>
1754 * config.guess: Update to latest version from config git.
1755 * config.sub: Likewise.
1757 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
1759 * Makefile.in: Change font compilation to use new grub-mkfont instead
1762 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1763 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1764 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1765 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1766 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1767 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1768 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1769 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1770 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1772 2009-01-16 Christian Franke <franke@computer.org>
1774 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1775 (enum grub_ata_timeout_milliseconds): New enum.
1776 (grub_ata_wait_status): Add parameter milliseconds.
1777 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1778 recovery from timed-out commands.
1779 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1780 return grub_errno instead of REG_ERROR.
1781 (grub_ata_pio_write): Add parameter milliseconds.
1782 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1783 Pass milliseconds to grub_ata_wait_status () and
1784 grub_ata_pio_read ().
1785 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1786 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1787 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1788 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1789 It is not suitable for device detection, because DEV bit is ignored,
1790 the command may run too long, and not all devices set the signature
1792 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1793 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1794 Fix device selection, DEV bit must be set first to address the registers
1795 of the correct device.
1796 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1797 grub_ata_pio_read/write ().
1798 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1799 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1801 2009-01-13 Carles Pina i Estany <carles@pina.cat>
1803 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1805 2009-01-13 Bean <bean123ch@gmail.com>
1807 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1809 2009-01-13 Bean <bean123ch@gmail.com>
1811 * Makefile.in: (enable_grub_mkfont): New variable.
1812 (freetype_cflags): Likewise.
1813 (freetype_libs): Likewise.
1815 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1816 (grub_mkfont_SOURCES): New variable.
1817 (grub_mkfont_CFLAGS): Likewise.
1818 (grub_mkfont_LDFLAGS): Likewise.
1820 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1821 library if `--enable-grub-mkfont' is requested.
1822 (enable_grub_mkfont): New variable.
1823 (freetype_cflags): Likewise.
1824 (freetype_libs): Likewise.
1826 * util/grub-mkfont.c: New file.
1828 2009-01-12 Christian Franke <franke@computer.org>
1830 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1831 mode check. Fix setting of compat_use[].
1833 2009-01-10 Robert Millan <rmh@aybabtu.com>
1835 Update a few copyright years which we forgot to do in 2008 (only for
1836 files whose changes made in 2008 were copyright-significant)
1838 * Makefile.in: Add 2008 to Copyright line.
1839 * disk/ieee1275/ofdisk.c: Likewise.
1840 * disk/efi/efidisk.c: Likewise.
1841 * kern/dl.c: Likewise.
1842 * kern/sparc64/ieee1275/init.c: Likewise.
1843 * kern/mm.c: Likewise.
1844 * kern/efi/mm.c: Likewise.
1845 * boot/i386/pc/boot.S: Likewise.
1846 * genfslist.sh: Likewise.
1847 * fs/iso9660.c: Likewise.
1848 * fs/hfs.c: Likewise.
1849 * fs/jfs.c: Likewise.
1850 * fs/minix.c: Likewise.
1851 * fs/ufs.c: Likewise.
1852 * gensymlist.sh.in: Likewise.
1853 * genkernsyms.sh.in: Likewise.
1854 * include/grub/misc.h: Likewise.
1855 * include/grub/types.h: Likewise.
1856 * include/grub/symbol.h: Likewise.
1857 * include/grub/elf.h: Likewise.
1858 * include/grub/kernel.h: Likewise.
1859 * include/grub/disk.h: Likewise.
1860 * include/grub/dl.h: Likewise.
1861 * include/grub/i386/linux.h: Likewise.
1862 * include/grub/i386/pc/biosdisk.h: Likewise.
1863 * include/grub/efi/api.h: Likewise.
1864 * include/grub/efi/pe32.h: Likewise.
1865 * include/grub/util/misc.h: Likewise.
1866 * normal/execute.c: Likewise.
1867 * normal/arg.c: Likewise.
1868 * normal/completion.c: Likewise.
1869 * normal/lexer.c: Likewise.
1870 * normal/parser.y: Likewise.
1871 * normal/misc.c: Likewise.
1872 * commands/i386/pc/vbeinfo.c: Likewise.
1873 * commands/hexdump.c: Likewise.
1874 * commands/terminal.c: Likewise.
1875 * commands/ls.c: Likewise.
1876 * commands/help.c: Likewise.
1877 * partmap/pc.c: Likewise.
1878 * loader/efi/chainloader.c: Likewise.
1879 * loader/multiboot_loader.c: Likewise.
1880 * loader/i386/pc/multiboot2.c: Likewise.
1881 * term/efi/console.c: Likewise.
1882 * term/i386/pc/serial.c: Likewise.
1883 * util/lvm.c: Likewise.
1884 * util/console.c: Likewise.
1885 * util/i386/efi/grub-mkimage.c: Likewise.
1886 * util/raid.c: Likewise.
1888 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1890 * commands/videotest.c: Removed include to grub/machine/memory.h.
1892 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1893 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1894 (video_mod_SOURCES): Removed.
1895 (video_mod_CFLAGS): Likewise.
1896 (video_mod_LDFLAGS): Likewise.
1897 (gfxterm_mod_SOURCES): Likewise.
1898 (gfxterm_mod_CFLAGS): Likewise.
1899 (gfxterm_mod_LDFLAGS): Likewise.
1900 (videotest_mod_SOURCES): Likewise.
1901 (videotest_mod_CFLAGS): Likewise.
1902 (videotest_mod_LDFLAGS): Likewise.
1903 (bitmap_mod_SOURCES): Likewise.
1904 (bitmap_mod_CFLAGS): Likewise.
1905 (bitmap_mod_LDFLAGS): Likewise.
1906 (tga_mod_SOURCES): Likewise.
1907 (tga_mod_CFLAGS): Likewise.
1908 (tga_mod_LDFLAGS): Likewise.
1909 (jpeg_mod_SOURCES): Likewise.
1910 (jpeg_mod_CFLAGS): Likewise.
1911 (jpeg_mod_LDFLAGS): Likewise.
1912 (png_mod_SOURCES): Likewise.
1913 (png_mod_CFLAGS): Likewise.
1914 (png_mod_LDFLAGS): Likewise.
1916 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1917 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1918 (video_mod_SOURCES): Added.
1919 (video_mod_CFLAGS): Likewise.
1920 (video_mod_LDFLAGS): Likewise.
1921 (videotest_mod_SOURCES): Likewise.
1922 (videotest_mod_CFLAGS): Likewise.
1923 (videotest_mod_LDFLAGS): Likewise.
1924 (bitmap_mod_SOURCES): Likewise.
1925 (bitmap_mod_CFLAGS): Likewise.
1926 (bitmap_mod_LDFLAGS): Likewise.
1927 (tga_mod_SOURCES): Likewise.
1928 (tga_mod_CFLAGS): Likewise.
1929 (tga_mod_LDFLAGS): Likewise.
1930 (jpeg_mod_SOURCES): Likewise.
1931 (jpeg_mod_CFLAGS): Likewise.
1932 (jpeg_mod_LDFLAGS): Likewise.
1933 (png_mod_SOURCES): Likewise.
1934 (png_mod_CFLAGS): Likewise.
1935 (png_mod_LDFLAGS): Likewise.
1936 (gfxterm_mod_SOURCES): Likewise.
1937 (gfxterm_mod_CFLAGS): Likewise.
1938 (gfxterm_mod_LDFLAGS): Likewise.
1940 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1941 grub/machine/console.h.
1943 2009-01-04 Jerone Young <jerone@gmail.com>
1945 Make on screen instructions clearer
1947 Based on patch created by Jidanni <jidanni@jidanni.org>
1949 * normal/menu.c: print clearer instructions on the screen
1951 2009-01-02 Colin D Bennett <colin@gibibit.com>
1955 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1956 build system and fixed gfxterm.c to work with different sized fonts.
1958 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
1960 * configure: Re-generated.
1962 * DISTLIST: Removed font/manager.c.
1964 Added font/font_cmd.c.
1966 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1969 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
1971 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1973 * kern/term.c: Changed users of grub_utf8_to_ucs4.
1975 * normal/menu.c: Likewise.
1977 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1978 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1980 * include/grub/font.h: Replaced with new file.
1982 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1983 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1984 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1985 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1986 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1987 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1988 fg_red, fg_green, fg_blue, fg_alpha.
1989 (grub_video_adapter): Removed blit_glyph.
1990 (grub_video_blit_glyph): Removed.
1992 * font/manager.c: Removed file.
1994 * font/font.c: New file.
1996 * font/font_cmd.c: Likewise.
1998 * video/video.c (grub_video_blit_glyph): Removed.
2000 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2001 (grub_video_vbe_map_rgba): Likewise.
2002 (grub_video_vbe_unmap_color_int): Likewise.
2003 (grub_video_vbe_blit_glyph): Removed.
2004 (grub_video_vbe_adapter): Removed blit_glyph.
2006 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2007 (get_pixel): Likewise.
2008 (set_pixel): Likewise.
2010 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
2012 * term/gfxterm.c: Adapted to new font engine.
2014 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
2016 * term/i386/pc/vga.c: Likewise.
2018 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
2020 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2022 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2024 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2026 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2028 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2030 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2032 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2034 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2036 * util/grub.d/00_header.in: Changed to use new loadfont command.
2038 * util/grub-mkconfig_lib.in: Changed font extension.
2040 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
2042 * util/getroot.c (grub_util_get_grub_dev): Add support for
2043 /dev/md/dNNpNN style partitionable mdraid devices.
2045 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
2047 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2048 at a time limit of the PXE TFTP API correctly.
2049 (grub_pxefs_close): Likewise.
2051 2008-11-29 Robert Millan <rmh@aybabtu.com>
2053 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
2054 grub_ata_device_initialize() calls.
2056 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
2058 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2060 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2062 2008-11-28 Robert Millan <rmh@aybabtu.com>
2064 Fix build on powerpc-ieee1275. Based on patch created by
2065 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2066 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2067 `kern/ieee1275/mmap.c'.
2068 * include/grub/powerpc/ieee1275/memory.h: New file.
2070 Provide grub-install on coreboot.
2071 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2072 (grub_install_SOURCES): New variable.
2073 * util/i386/pc/grub-install.in: Add a few condition checks to make it
2076 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
2078 * util/grub-fstest.c (grub_term_get_current_input): Change return type
2079 to `grub_term_input_t'.
2080 (grub_term_get_current_output): Change return type to
2081 `grub_term_output_t'.
2083 2008-11-22 Robert Millan <rmh@aybabtu.com>
2085 Fix breakage on coreboot due to declaration mismatch.
2086 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2087 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2088 grub_vga_text_cls().
2090 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
2091 comments. Avoid copying one more byte than necessary (just in case).
2093 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2094 to 0x200000 (avoids trouble with some OFW implementations, and matches
2095 with the one in Yaboot).
2096 Reported by Manoel Abranches
2098 2008-11-20 Robert Millan <rmh@aybabtu.com>
2100 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2101 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2103 * util/grub-mkconfig_lib.in (grub_warn): New function.
2104 (convert_system_path_to_grub_path): Use grub_warn() when issuing
2105 warnings, to obtain consistent formatting.
2106 * util/grub.d/00_header.in: Likewise.
2107 * util/update-grub_lib.in: Likewise.
2109 * loader/i386/linux.c (allocate_pages): Fix a warning.
2110 Move comment text to `#error' stanza.
2112 Harmonize ieee1275's grub_available_iterate() with the generic
2113 grub_machine_mmap_iterate() interface (fixes a recently-introduced
2114 build problem on i386-ieee1275):
2115 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2116 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
2117 parameter `type'. Update all users of this function.
2118 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2119 `kern/ieee1275/mmap.c'.
2120 * kern/ieee1275/init.c
2121 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2123 (grub_machine_mmap_iterate): ... this.
2124 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2125 return type to `grub_err_t'. Update all implementations of this
2127 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2130 Add `lsmmap' command (lists firmware-provided memory map):
2131 * commands/lsmmap.c: New file.
2132 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2133 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2135 * conf/powerpc-ieee1275.rmk: Likewise.
2136 * conf/i386-coreboot.rmk: Likewise.
2137 * conf/i386-ieee1275.rmk: Likewise.
2139 2008-11-19 Robert Millan <rmh@aybabtu.com>
2141 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
2142 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2143 constraints to initrd allocation (based on code from
2144 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2145 for Linux to find it.
2147 2008-11-14 Robert Millan <rmh@aybabtu.com>
2149 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2150 order to cope with duplicate slashes.
2152 2008-11-14 Robert Millan <rmh@aybabtu.com>
2154 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2155 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
2156 don't want to mess with lower memory, because it is used in the Linux
2159 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
2160 an appropriate place in lower memory, between 0x10000 and 0x90000,
2161 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
2162 is in our heap (probably as a result of it being corrupted during
2163 decompression). Add #error instance with comment to explain why this
2164 loader isn't currently usable on PC/BIOS.
2166 2008-11-14 Robert Millan <rmh@aybabtu.com>
2168 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
2169 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
2171 2008-11-12 Robert Millan <rmh@aybabtu.com>
2173 Make loader/i386/linux.c buildable on i386-pc (although disabled).
2175 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2176 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2178 * include/grub/i386/pc/memory.h: ... to here.
2180 2008-11-12 Robert Millan <rmh@aybabtu.com>
2182 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2185 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2186 (grub_console_cur_color, grub_console_real_putchar)
2187 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2188 (grub_console_setcolorstate, grub_console_setcolor)
2189 (grub_console_getcolor): Move from here ...
2190 * include/grub/i386/vga_common.h: ... to here (new file).
2192 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2193 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2195 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2196 `<grub/i386/vga_common.h>'.
2198 2008-11-12 Robert Millan <rmh@aybabtu.com>
2200 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2201 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2202 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2204 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2205 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2207 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2208 grub_console_init() with call to grub_vga_text_init().
2209 (grub_machine_fini): Replace call to
2210 grub_console_fini() with call to grub_vga_text_fini() and
2211 grub_at_keyboard_fini().
2213 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2214 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2215 (grub_console_setcolorstate, grub_console_setcolor)
2216 (grub_console_getcolor): New function prototypes.
2218 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2219 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2220 (grub_vga_text_setcursor): Static-ize.
2221 (grub_vga_text_term): New structure.
2222 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2224 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2225 (grub_console_cur_color, grub_console_standard_color)
2226 (grub_console_normal_color, grub_console_highlight_color)
2227 (map_char, grub_console_putchar, grub_console_getcharwidth)
2228 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2229 (grub_console_getcolor): Move from here ...
2230 * term/i386/vga_common.c: ... to here (same function names).
2232 2008-11-12 Robert Millan <rmh@aybabtu.com>
2234 Use newly-added Multiboot support in coreboot.
2236 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2237 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2239 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2240 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2241 (codestart): Store the MBI in `startup_multiboot_info' when we're
2242 being loaded using Multiboot.
2244 * kern/i386/coreboot/init.c (grub_machine_init): Move
2245 grub_at_keyboard_init() call to beginning of function (useful for
2246 debugging). Call grub_machine_mmap_init() before attempting to use
2247 grub_machine_mmap_iterate().
2248 (grub_lower_mem, grub_upper_mem): Move from here ...
2249 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2252 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2255 2008-11-12 Robert Millan <rmh@aybabtu.com>
2257 Fix a regression introduced by the at_keyboard.mod split. Because
2258 some terminals are default on some platforms and non-default on
2259 others, the first terminal being registered determines which is
2260 going to be default.
2262 * kern/term.c (grub_term_register_input): If this is the first
2263 terminal being registered, set it as the current one.
2264 (grub_term_register_output): Likewise.
2266 * term/efi/console.c (grub_console_init): Do not call
2267 grub_term_set_current_output() or grub_term_set_current_input().
2268 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2269 * term/i386/pc/console.c (grub_console_init): Likewise.
2270 (grub_console_fini): Do not call grub_term_set_current_input()
2271 (but leave grub_term_set_current_output() to restore text mode).
2273 2008-11-10 Robert Millan <rmh@aybabtu.com>
2275 * util/grub.d/00_header.in: Add backward compatibility check for
2276 versions of terminal.mod that don't understand `terminal_input' or
2279 2008-11-09 Robert Millan <rmh@aybabtu.com>
2281 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2282 `terminal_input' / `terminal_output', not `terminal'.
2284 2008-11-08 Robert Millan <rmh@aybabtu.com>
2286 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2287 (DISTCLEANFILES): Add `build_env.mk'.
2289 2008-11-08 Robert Millan <rmh@aybabtu.com>
2291 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
2292 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2293 members. Update all users.
2294 * util/console.c (grub_ncurses_term): Split in ...
2295 (grub_ncurses_term_input): ... this, and ...
2296 (grub_ncurses_term_output): ... this. Update all users.
2297 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
2299 2008-11-08 Robert Millan <rmh@aybabtu.com>
2301 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2302 (PKGDATA): Add $(pkgdata_SRCDIR).
2303 (pkglib_BUILDDIR): New variable.
2304 (pkgdata_SRCDIR): New variable.
2305 (build_env.mk): New target.
2306 (include_DATA): New variable.
2307 (install-local): Install $(include_DATA) files in $(includedir).
2309 2008-11-07 Pavel Roskin <proski@gnu.org>
2311 * gendistlist.sh: Use C locale for sorting to ensure consistent
2312 output on all systems.
2314 * util/grub.d/00_header.in: Remove incorrect space before
2317 2008-11-07 Robert Millan <rmh@aybabtu.com>
2319 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2321 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2322 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2323 (based on find_multi_boot1_header).
2324 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2325 using find_multi_boot2_header(), and abort if neither Multiboot or
2326 Multiboot headers were found.
2328 2008-11-07 Robert Millan <rmh@aybabtu.com>
2330 Modularize at_keyboard.mod:
2332 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2333 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2334 (at_keyboard_mod_LDFLAGS): New variables.
2336 Actual terminal split:
2338 * include/grub/term.h (struct grub_term): Split in ...
2339 (struct grub_term_input): ... this, and ...
2340 (struct grub_term_output): ... this. Update all users.
2341 (grub_term_set_current): Split in ...
2342 (grub_term_set_current_input): ... this, and ...
2343 (grub_term_set_current_output): ... this.
2344 (grub_term_get_current): Split in ...
2345 (grub_term_get_current_input): ... this, and ...
2346 (grub_term_get_current_output): ... this.
2347 (grub_term_register): Split in ...
2348 (grub_term_register_input): ... this, and ...
2349 (grub_term_register_output): ... this.
2350 (grub_term_unregister): Split in ...
2351 (grub_term_unregister_input): ... this, and ...
2352 (grub_term_unregister_output): ... this.
2353 (grub_term_iterate): Split in ...
2354 (grub_term_iterate_input): ... this, and ...
2355 (grub_term_iterate_output): ... this.
2357 * kern/term.c (grub_term_list): Split in ...
2358 (grub_term_list_input): ... this, and ...
2359 (grub_term_list_output): ... this. Update all users.
2360 (grub_cur_term): Split in ...
2361 (grub_cur_term_input): ... this, and ...
2362 (grub_cur_term_output): ... this. Update all users.
2363 (grub_term_set_current): Split in ...
2364 (grub_term_set_current_input): ... this, and ...
2365 (grub_term_set_current_output): ... this.
2366 (grub_term_get_current): Split in ...
2367 (grub_term_get_current_input): ... this, and ...
2368 (grub_term_get_current_output): ... this.
2369 (grub_term_register): Split in ...
2370 (grub_term_register_input): ... this, and ...
2371 (grub_term_register_output): ... this.
2372 (grub_term_unregister): Split in ...
2373 (grub_term_unregister_input): ... this, and ...
2374 (grub_term_unregister_output): ... this.
2375 (grub_term_iterate): Split in ...
2376 (grub_term_iterate_input): ... this, and ...
2377 (grub_term_iterate_output): ... this.
2379 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2380 a check for input and one for output (and only attempt to get keys
2381 from user when input works).
2383 * util/grub-probe.c (grub_term_get_current): Split in ...
2384 (grub_term_get_current_input): ... this, and ...
2385 (grub_term_get_current_output): ... this.
2386 * util/grub-fstest.c: Likewise.
2387 * util/i386/pc/grub-setup.c: Likewise.
2388 * util/grub-editenv.c: Likewise.
2390 Portability adjustments:
2392 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2393 `term/i386/pc/at_keyboard.c'.
2394 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2395 grub_keyboard_controller_init() (now handled by terminal .init).
2396 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
2397 grub_at_keyboard_init().
2398 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
2399 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
2400 at_keyboard.mod via input terminal interface).
2401 * include/grub/i386/coreboot/console.h: Convert into a stub for
2402 `<grub/i386/pc/console.h>'.
2404 Migrate full terminals to new API:
2406 * term/efi/console.c (grub_console_term): Split into ...
2407 (grub_console_term_input): ... this, and ...
2408 (grub_console_term_output): ... this. Update all users.
2409 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
2410 (grub_ofconsole_init): Split into ...
2411 (grub_ofconsole_init_input): ... this, and ...
2412 (grub_ofconsole_init_output): ... this.
2413 (grub_ofconsole_term): Split into ...
2414 (grub_ofconsole_term_input): ... this, and ...
2415 (grub_ofconsole_term_output): ... this. Update all users.
2416 * term/i386/pc/serial.c (grub_serial_term): Split into ...
2417 (grub_serial_term_input): ... this, and ...
2418 (grub_serial_term_output): ... this. Update all users.
2419 * term/i386/pc/console.c (grub_console_term): Split into ...
2420 (grub_console_term_input): ... this, and ...
2421 (grub_console_term_output): ... this. Update all users.
2422 (grub_console_term_input): Only enable it on PC/BIOS platform.
2423 (grub_console_init): Remove grub_keyboard_controller_init() call.
2425 Migrate input terminals to new API:
2427 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
2428 `i386' and `i386/pc' to enable build on x86_64 (this driver is
2429 i386-specific anyway).
2430 (grub_console_checkkey): Rename to ...
2431 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
2433 (grub_keyboard_controller_orig): New variable.
2434 (grub_console_getkey): Rename to ...
2435 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
2437 (grub_keyboard_controller_init): Static-ize. Save original
2438 controller value so that it can be restored ...
2439 (grub_keyboard_controller_fini): ... here (new function).
2440 (grub_at_keyboard_term): New structure.
2441 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
2444 Migrate output terminals to new API:
2446 * term/i386/pc/vga.c (grub_vga_term): Change type to
2447 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2448 members. Update all users.
2449 * term/gfxterm.c (grub_video_term): Change type to
2450 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2451 members. Update all users.
2452 * include/grub/i386/pc/console.h (grub_console_checkkey)
2453 (grub_console_getkey): Do not export (no longer needed by gfxterm,
2456 Migrate `terminal' command and userland tools to new API:
2458 * commands/terminal.c (grub_cmd_terminal): Split into ...
2459 (grub_cmd_terminal_input): ... this, and ...
2460 (grub_cmd_terminal_output): ... this.
2461 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2462 `terminal_input' and `terminal_output'.
2463 * util/grub.d/00_header.in: Adjust `terminal' calls to new
2464 `terminal_input' / `terminal_output' API.
2465 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2466 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2467 provided ${GRUB_TERMINAL}, convert it).
2469 2008-11-04 Robert Millan <rmh@aybabtu.com>
2471 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
2473 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2475 2008-11-03 Bean <bean123ch@gmail.com>
2477 * kern/elf.c (grub_elf32_load): Revert to previous code.
2478 (grub_elf64_load): Likewise.
2480 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2482 2008-11-01 Robert Millan <rmh@aybabtu.com>
2484 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2485 (TARGET_CPPFLAGS): Likewise.
2486 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2488 2008-11-01 Carles Pina i Estany <carles@pina.cat>
2490 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2492 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2494 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2495 addition of objects until the code is not going to be able to fail.
2497 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2499 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2500 (add a missing NULL check, and correct them by moving the pointer
2501 operations after the actual check).
2503 2008-10-29 Robert Millan <rmh@aybabtu.com>
2505 * util/i386/pc/grub-install.in: Handle empty string as output from
2506 make_system_path_relative_to_its_root().
2508 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
2510 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2511 circular metadata worst case scenario. If the metadata is circular
2512 then copy the wrap in place.
2513 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2514 project lib/format_text/layout.h
2515 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2517 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2519 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2521 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2523 * util/update-grub_lib.in: Mention filename in warning message.
2525 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2527 * NEWS: Update for rename of update-grub to grub-mkconfig.
2529 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2531 * util/update-grub_lib.in: Copy to ...
2532 * util/grub-mkconfig_lib.in: ... this. Update all users.
2533 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2534 * util/update-grub.in: Rename to ...
2535 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
2536 option. Add `--output' option to allow users to specify the generated
2537 configuration file. Default to stdout.
2538 (update_grub_dir): Rename to ...
2539 (grub_mkconfig_dir): ... this.
2540 (grub_cfg): Default to an empty string.
2541 * conf/common.rmk (update-grub): Rename to ...
2542 (grub-mkconfig): ... this.
2543 (update-grub_lib): Copy to ...
2544 (grub-mkconfig_lib): ... this.
2545 (update-grub_SCRIPTS): Copy to ...
2546 (grub-mkconfig_SCRIPTS): ... this. Update all users.
2547 (update-grub_DATA): Rename to ...
2548 (grub-mkconfig_DATA): ... this.
2550 2008-09-28 Robert Millan <rmh@aybabtu.com>
2552 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2553 to `modified'. Add the real `created' field.
2554 (grub_iso9660_uuid): Use `modified' rather than `created' for
2555 constructing the UUID.
2557 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
2559 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2560 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2562 2008-09-28 Bean <bean123ch@gmail.com>
2564 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2565 Thanks to Christian Franke for finding this bug.
2567 2008-09-25 Robert Millan <rmh@aybabtu.com>
2569 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2570 instances of grub_util_get_disk_name() (see previous commit).
2572 2008-09-25 Robert Millan <rmh@aybabtu.com>
2574 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2575 `util/i386/get_disk_name.c'.
2576 * conf/i386-efi.rmk: Likewise.
2577 * conf/x86_64-efi.rmk: Likewise.
2578 * conf/i386-coreboot.rmk: Likewise.
2579 * conf/i386-ieee1275.rmk: Likewise.
2580 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2581 `util/ieee1275/get_disk_name.c'.
2582 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2583 * util/ieee1275/get_disk_name.c: Remove file.
2584 * util/i386/get_disk_name.c: Remove file.
2585 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2586 "hd%d" for device.map entries, rather than using
2587 grub_util_get_disk_name().
2589 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2591 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2593 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2595 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2597 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2599 (GRUB_TERM_PPAGE): Changed to 0x4900.
2601 2008-09-24 Robert Millan <rmh@aybabtu.com>
2603 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2604 macros (they were i386-pc specific).
2605 * include/grub/sparc64/ieee1275/console.h: Likewise.
2606 * include/grub/efi/console.h: Likewise.
2608 2008-09-22 Bean <bean123ch@gmail.com>
2610 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2611 resident and in attribute list.
2613 * include/grub/ntfs.h (BMP_LEN): Removed.
2615 2008-09-22 Bean <bean123ch@gmail.com>
2617 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2618 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2620 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2621 error occurs, as grub_disk_open will call grub_disk_close, which will
2622 call p->close (scsi).
2624 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2626 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2627 (AC_PREREQ): Bumped to 2.59.
2628 (AC_TRY_COMPILE): Replace obsolete macro with ...
2629 (AC_COMPILE_IFELSE): ... this.
2630 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2631 (AC_LINK_IFELSE): ... this.
2633 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2635 * autogen.sh: Add a call to `gendistlist.sh'.
2637 2008-09-19 Christian Franke <franke@computer.org>
2639 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2640 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2641 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2642 Export __enable_execute_stack() to modules.
2643 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2646 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2648 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2651 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2653 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2654 #include <grub/util/hostdisk.h>.
2656 2008-09-08 Robert Millan <rmh@aybabtu.com>
2658 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2659 segments when their filesz is zero (grub_file_read() interprets
2660 zero-size as "read until EOF", which results in memory corruption).
2661 Use `lowest_segment' rather than 0 for calculating the current
2662 segment load address.
2664 2008-09-08 Robert Millan <rmh@aybabtu.com>
2666 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2667 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2668 clobbered useful information.
2670 2008-09-08 Robert Millan <rmh@aybabtu.com>
2672 * include/grub/util/biosdisk.h: Move to ...
2673 * include/grub/util/hostdisk.h: ... here. Update all users.
2674 * util/biosdisk.c: Move to ...
2675 * util/hostdisk.c: ... here. Update all users.
2677 2008-09-07 Robert Millan <rmh@aybabtu.com>
2679 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2681 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2682 and length can be stored directly in the `mbi->mmap_addr' and
2683 `mbi->mmap_length' struct fields.
2685 2008-09-07 Robert Millan <rmh@aybabtu.com>
2687 * conf/i386.rmk: New file. Provides declaration for building
2689 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2690 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2692 Include `conf/i386.mk'.
2693 * conf/i386-efi.rmk: Likewise.
2694 * conf/x86_64-efi.rmk: Likewise.
2695 * conf/i386-coreboot.rmk: Likewise.
2696 * conf/i386-ieee1275.rmk: Likewise.
2698 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2700 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2701 Adds optimization support for BGR based modes.
2703 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2704 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2705 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2706 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2707 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2708 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2709 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2710 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2711 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2712 (grub_video_i386_vbeblit_index_index): Likewise.
2713 (grub_video_i386_vbeblit_replace_directN): Added.
2714 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2715 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2716 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2717 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2718 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2719 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2720 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2721 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2722 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2723 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2724 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2725 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2726 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2728 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2729 (grub_video_i386_vbefill_R8G8B8): Likewise.
2730 (grub_video_i386_vbefill_index): Likewise.
2731 (grub_video_i386_vbefill_direct32): Added.
2732 (grub_video_i386_vbefill_direct24): Likewise.
2733 (grub_video_i386_vbefill_direct16): Likewise.
2734 (grub_video_i386_vbefill_direct8): Likewise.
2736 * include/grub/video.h (grub_video_blit_format): Removed
2737 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2738 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2739 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2740 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2741 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2743 * video/video.c (grub_video_get_blit_format): Updated to use new
2744 blit formats. Added handling for 16 bit color modes.
2746 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2748 (common_blitter): Updated to use new blitters.
2750 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2752 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2753 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2754 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2755 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2756 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2757 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2758 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2759 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2760 (grub_video_i386_vbeblit_index_index): Likewise.
2761 (grub_video_i386_vbeblit_replace_directN): Added.
2762 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2763 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2764 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2765 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2766 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2767 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2768 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2769 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2770 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2771 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2772 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2773 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2774 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2776 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2777 (grub_video_i386_vbefill_R8G8B8): Likewise.
2778 (grub_video_i386_vbefill_index): Likewise.
2779 (grub_video_i386_vbefill_direct32): Added.
2780 (grub_video_i386_vbefill_direct24): Likewise.
2781 (grub_video_i386_vbefill_direct16): Likewise.
2782 (grub_video_i386_vbefill_direct8): Likewise.
2784 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2787 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2790 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2793 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2796 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2798 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2801 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2803 * fs/iso9660.c (grub_iso9660_date): New structure.
2804 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2805 (grub_iso9660_uuid): New function.
2807 2008-09-05 Bean <bean123ch@gmail.com>
2809 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2811 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2812 insensitive bit for names in Win32 and Win32 & DOS namespace.
2814 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2816 * include/grub/types.h (LONG_MAX): Likewise.
2818 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2820 * util/getroot.c: Include <config.h>.
2821 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2822 add support for /dev/md/N devices and handle LVM double dash escaping.
2824 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2826 * config.guess: Update to latest version from config git.
2827 * config.sub: Likewise.
2829 2008-09-03 Robert Millan <rmh@aybabtu.com>
2831 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2832 `disk->total_sectors'.
2834 2008-09-01 Colin D Bennett <colin@gibibit.com>
2836 * include/grub/normal.h: Fixed incorrect comment for
2837 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2839 2008-09-01 Colin D Bennett <colin@gibibit.com>
2841 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2842 values with defines.
2844 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2845 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2846 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2847 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2848 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2849 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2850 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2851 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2852 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2853 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2854 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2855 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2856 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2857 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2858 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2859 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2860 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2861 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2862 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2864 2008-08-31 Robert Millan <rmh@aybabtu.com>
2866 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2868 (grub_multiboot): Fix a few warnings.
2870 2008-08-31 Robert Millan <rmh@aybabtu.com>
2872 * loader/i386/pc/multiboot.c: Update comment not to say that
2873 boot_device support is unimplemented.
2875 2008-08-31 Robert Millan <rmh@aybabtu.com>
2877 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2878 or memory map support are unimplemented.
2880 2008-08-31 Colin D Bennett <colin@gibibit.com>
2882 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2884 2008-08-31 Colin D Bennett <colin@gibibit.com>
2886 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2887 total video memory in 'vbeinfo' output; show color format details for
2890 2008-08-30 Pavel Roskin <proski@gnu.org>
2892 * util/genmoddep.c: Remove for real this time.
2893 * DISTLIST: Remove util/genmoddep.c.
2895 2008-08-30 Robert Millan <rmh@aybabtu.com>
2897 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2898 as required by Multiboot spec (it was already 4-byte aligned, but
2901 2008-08-29 Pavel Roskin <proski@gnu.org>
2903 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2904 * kern/powerpc/ieee1275/startup.S: ... this.
2905 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2906 * DISTLIST: Likewise.
2908 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2909 grub/cpu/kernel.h. Add start label for consistency with other
2910 platforms. Add grub_prefix immediately after start. Add jump
2911 to the code after grub_prefix.
2912 * include/grub/powerpc/kernel.h: Provide valid values for
2913 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2915 2008-08-29 Bean <bean123ch@gmail.com>
2917 * configure.ac: Change host_os to cygwin for mingw.
2918 (asprintf): New check for function.
2920 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2921 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2923 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2924 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2925 sync, sleep and grub_util_get_disk_size for mingw.
2927 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2928 to get size in mingw.
2929 (open_device): Use flag O_BINARY if it's defined.
2930 (find_root_device): Add dummy code for mingw.
2932 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2933 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2934 (get_scsi_disk_name): Return 0 for mingw.
2936 * util/hostfs.c: #include <grub/util/misc.h>.
2937 (grub_hostfs_open): Use "rb" flag to open file, use
2938 grub_util_get_disk_size to get disk size for mingw.
2940 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2941 (asprintf): New function if HAVE_ASPRINTF is not set.
2942 (sync): New function for mingw.
2944 (grub_util_get_disk_size): Likewise.
2946 2008-08-28 Pavel Roskin <proski@gnu.org>
2948 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2951 2008-08-28 Robert Millan <rmh@aybabtu.com>
2953 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2955 2008-08-28 Robert Millan <rmh@aybabtu.com>
2957 Change find_grub_drive() syntax so it doesn't prevent it from
2958 detecting NULL names as errors.
2960 * util/biosdisk.c (find_grub_drive): Move free slot search code
2962 (find_free_slot): ... to here.
2963 (read_device_map): Use find_free_slot() to search for free slots.
2965 2008-08-27 Marco Gerards <marco@gnu.org>
2967 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2968 (scsi_mod_SOURCES): New variable.
2969 (scsi_mod_CFLAGS): Likewise
2970 (scsi_mod_LDFLAGS): Likewise.
2972 * disk/scsi.c: New file.
2974 * include/grub/scsi.h: Likewise.
2976 * include/grub/scsicmd.h: Likewise.
2978 * disk/ata.c: Include <grub/scsi.h>.
2979 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2981 (grub_ata_iterate): Skip ATAPI devices.
2982 (grub_ata_open): Only handle ATAPI devices.
2983 (struct grub_atapi_read): Removed.
2984 (grub_atapi_readsector): Likewise.
2985 (grub_ata_read): No longer handle ATAPI devices.
2986 (grub_ata_write): Likewise.
2987 (grub_atapi_iterate): New function.
2988 (grub_atapi_read): Likewise.
2989 (grub_atapi_write): Likewise.
2990 (grub_atapi_open): Likewise.
2991 (grub_atapi_close): Likewise.
2992 (grub_atapi_dev): New variable.
2993 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2994 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2996 * include/grub/disk.h (enum grub_disk_dev_id): Add
2997 `GRUB_DISK_DEVICE_SCSI_ID'.
2999 2008-08-26 Robert Millan <rmh@aybabtu.com>
3001 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3002 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3005 2008-08-23 Bean <bean123ch@gmail.com>
3007 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3008 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3009 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3010 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3012 (raid5rec_mod_SOURCES): New macro.
3013 (raid5rec_mod_CFLAGS): Likewise.
3014 (raid5rec_mod_LDFLAGS): Likewise.
3015 (raid6rec_mod_SOURCES): Likewise.
3016 (raid6rec_mod_CFLAGS): Likewise.
3017 (raid6rec_mod_LDFLAGS): Likewise.
3018 (mdraid_mod_SOURCES): Likewise.
3019 (mdraid_mod_CFLAGS): Likewise.
3020 (mdraid_mod_LDFLAGS): Likewise.
3021 (dm_nv_mod_SOURCES): Likewise.
3022 (dm_nv_mod_CFLAGS): Likewise.
3023 (dm_nv_mod_LDFLAGS): Likewise.
3025 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3026 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3027 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3029 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3030 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3032 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3034 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3036 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3038 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3040 * disk/raid5_recover.c: New file.
3042 * disk/raid6_recover.c: Likewise.
3044 * disk/mdraid_linux.c: Likewise.
3046 * disk/dmraid_nvidia.c: Likewise.
3048 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3051 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3052 calculate the size of raid device.
3053 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3054 different layout of raid5.
3055 (grub_raid_scan_device): Remove code specific to mdraid.
3056 (grub_raid_list): New variable.
3057 (free_array): New function.
3058 (grub_raid_register): Likewise.
3059 (grub_raid_unregister): Likewise.
3060 (grub_raid_rescan): Likewise.
3061 (GRUB_MOD_INIT): Don't iterate device here.
3062 (GRUB_MOD_FINI): Use free_array to release resource.
3064 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3065 (grub_raid5_recover_func_t): New function variable type.
3066 (grub_raid6_recover_func_t): Likewise.
3067 (grub_raid5_recover_func): New variable.
3068 (grub_raid6_recover_func): Likewise.
3069 (grub_raid_register): New function.
3070 (grub_raid_unregister): Likewise.
3071 (grub_raid_rescan): Likewise.
3072 (grub_raid_block_xor): Likewise.
3074 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3075 (CMD_CRC): New macro.
3077 (read_file): Handle device as well as file.
3078 (cmd_crc): New function.
3079 (fstest): Handle multiple disks.
3080 (options): Remove part, raw and long, add root and diskcount.
3081 (usage): Add crc, remove -p, -r, -l, add -r and -c.
3082 (main): Find the first non option entry and ignore subsequent options,
3083 add handling for the new options, support multiple disks.
3085 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3087 2008-08-23 Bean <bean123ch@gmail.com>
3089 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3091 * genfslist.sh: Ignore kernel.mod.
3093 * genpartmaplist.sh: Likewise.
3095 2008-08-23 Robert Millan <rmh@aybabtu.com>
3097 * util/getroot.c (find_root_device): Skip anything that starts with
3098 a dot, not just directories. This avoids things like /dev/.tmp.md0.
3100 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
3102 * util/update-grub.in (GRUB_GFXMODE): Export variable.
3103 * util/grub.d/00_header.in: Allow the administrator to change default
3104 gfxmode via ${GRUB_GFXMODE}.
3106 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
3108 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3110 2008-08-21 Robert Millan <rmh@aybabtu.com>
3112 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
3114 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3115 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3117 2008-08-20 Carles Pina i Estany <carles@pina.cat>
3119 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3120 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3122 2008-08-19 Robert Millan <rmh@aybabtu.com>
3124 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3125 (struct grub_virtual_screen): Remove `cursor_color'.
3126 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3128 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3130 2008-08-18 Robert Millan <rmh@aybabtu.com>
3132 Unify (identical) linux_normal.c files.
3133 * loader/i386/efi/linux_normal.c: Move from here ...
3134 * loader/linux_normal.c: ... to here. Update all users.
3135 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3136 * loader/i386/ieee1275/linux_normal.c: Likewise.
3138 2008-08-18 Robert Millan <rmh@aybabtu.com>
3140 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3141 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3142 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3143 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3144 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3146 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3147 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3148 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3149 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3150 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3151 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3152 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3153 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3154 Initialize `params->video_cursor_x' and `params->video_cursor_y'
3155 portably using grub_getxy().
3156 Replace `-EFI' with `-bzImage' in boot message.
3158 2008-08-17 Robert Millan <rmh@aybabtu.com>
3160 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3162 2008-08-17 Robert Millan <rmh@aybabtu.com>
3164 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3166 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3167 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3168 (grub_machine_mmap_iterate): New function declaration.
3169 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3171 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3174 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3175 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3176 Move e820 parsing from here ...
3177 * kern/i386/pc/mmap.c: New file.
3178 (grub_machine_mmap_iterate): ... to here.
3180 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3181 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3182 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
3183 (grub_available_iterate): Redeclare to return `void', and redeclare
3184 its hook to use grub_uint64_t as addr and size parameters, and rename
3186 (grub_machine_mmap_iterate): ... this. Update all users.
3188 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3189 to make it more readable. Rename to ...
3190 (grub_machine_mmap_iterate): ... this.
3192 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3193 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3194 (grub_multiboot): Allocate an extra region after the payload, and fill
3195 it with a Multiboot memory map. Adjust a.out loader to calculate size
3196 with the extra space.
3197 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3198 with the extra space.
3200 2008-08-17 Carles Pina i Estany <carles@pina.cat>
3202 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
3204 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
3206 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3207 mdate-sh to the list `find' searches for.
3208 * DISTLIST: Regenerated.
3210 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
3212 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3213 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
3214 genmoddep.awk, gensymlist.sh.in.
3215 (DISTDIRS): Add bus, docs, hook, lib.
3216 * DISTLIST: Regenerated.
3217 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
3219 2008-08-16 Robert Millan <rmh@aybabtu.com>
3221 * disk/raid.c (grub_raid_init): Handle/report errors set by
3222 grub_device_iterate().
3223 * disk/lvm.c (grub_lvm_init): Likewise.
3225 2008-08-15 Bean <bean123ch@gmail.com>
3227 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3229 (datetime_mod_SOURCES): New macro.
3230 (datetime_mod_CFLAGS): Likewise.
3231 (datetime_mod_LDFLAGS): Likewise.
3232 (date_mod_SOURCES): Likewise.
3233 (date_mod_CFLAGS): Likewise.
3234 (date_mod_LDFLAGS): Likewise.
3235 (datehook_mod_SOURCES): Likewise.
3236 (datehook_mod_CFLAGS): Likewise.
3237 (datehook_mod_LDFLAGS): Likewise.
3239 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3241 (datetime_mod_SOURCES): New macro.
3242 (datetime_mod_CFLAGS): Likewise.
3243 (datetime_mod_LDFLAGS): Likewise.
3244 (date_mod_SOURCES): Likewise.
3245 (date_mod_CFLAGS): Likewise.
3246 (date_mod_LDFLAGS): Likewise.
3247 (datehook_mod_SOURCES): Likewise.
3248 (datehook_mod_CFLAGS): Likewise.
3249 (datehook_mod_LDFLAGS): Likewise.
3251 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3253 (datetime_mod_SOURCES): New macro.
3254 (datetime_mod_CFLAGS): Likewise.
3255 (datetime_mod_LDFLAGS): Likewise.
3256 (date_mod_SOURCES): Likewise.
3257 (date_mod_CFLAGS): Likewise.
3258 (date_mod_LDFLAGS): Likewise.
3259 (datehook_mod_SOURCES): Likewise.
3260 (datehook_mod_CFLAGS): Likewise.
3261 (datehook_mod_LDFLAGS): Likewise.
3263 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3265 (datetime_mod_SOURCES): New macro.
3266 (datetime_mod_CFLAGS): Likewise.
3267 (datetime_mod_LDFLAGS): Likewise.
3268 (date_mod_SOURCES): Likewise.
3269 (date_mod_CFLAGS): Likewise.
3270 (date_mod_LDFLAGS): Likewise.
3271 (datehook_mod_SOURCES): Likewise.
3272 (datehook_mod_CFLAGS): Likewise.
3273 (datehook_mod_LDFLAGS): Likewise.
3275 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3277 (datetime_mod_SOURCES): New macro.
3278 (datetime_mod_CFLAGS): Likewise.
3279 (datetime_mod_LDFLAGS): Likewise.
3280 (date_mod_SOURCES): Likewise.
3281 (date_mod_CFLAGS): Likewise.
3282 (date_mod_LDFLAGS): Likewise.
3283 (datehook_mod_SOURCES): Likewise.
3284 (datehook_mod_CFLAGS): Likewise.
3285 (datehook_mod_LDFLAGS): Likewise.
3287 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3289 * commands/date.c: New file.
3291 * hook/datehook.c: Likewise.
3293 * include/grub/lib/datetime.h: Likewise.
3295 * include/grub/i386/cmos.h: Likewise.
3297 * lib/datetime.c: Likewise.
3299 * lib/i386/datetime.c: Likewise.
3301 * lib/efi/datetime.c: Likewise.
3303 2008-08-14 Robert Millan <rmh@aybabtu.com>
3305 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3306 (grub_mkelfimage_SOURCES): New variable.
3307 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3309 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3310 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3311 * conf/powerpc-ieee1275.rmk: Likewise.
3312 * conf/i386-ieee1275.rmk: Likewise.
3314 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3315 * kern/i386/coreboot/init.c: Likewise.
3317 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3318 with `<grub/cpu/kernel.h>'.
3319 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3321 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3322 * kern/i386/coreboot/startup.S: Likewise.
3324 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3325 (GRUB_MOD_GAP): Remove.
3326 * include/grub/powerpc/kernel.h: New file.
3327 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3328 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3329 * include/grub/i386/kernel.h: New file.
3330 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3331 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3332 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3334 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3336 Use --directory when invoking grub_mkimage.
3338 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3339 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3340 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3341 and GRUB_KERNEL_CPU_PREFIX.
3343 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
3345 * include/grub/err.h (grub_err_printf): New function prototype.
3346 * util/misc.c (grub_err_printf): New function.
3347 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3349 * kern/err.c (grub_print_error): Use grub_err_printf.
3351 2008-08-13 Robert Millan <rmh@aybabtu.com>
3353 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3355 2008-08-13 Robert Millan <rmh@aybabtu.com>
3357 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3360 2008-08-12 Robert Millan <rmh@aybabtu.com>
3362 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3363 of the relocation code from here ...
3364 (grub_multiboot): ... to here.
3365 (forward_relocator, backward_relocator): Move from here ...
3366 * kern/i386/loader.S (grub_multiboot_forward_relocator)
3367 (grub_multiboot_backward_relocator): ... to here.
3368 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
3369 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
3370 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3371 (grub_multiboot_forward_relocator_end)
3372 (grub_multiboot_backward_relocator)
3373 (grub_multiboot_backward_relocator_end): New variables.
3375 2008-08-12 Bean <bean123ch@gmail.com>
3377 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3379 2008-08-11 Robert Millan <rmh@aybabtu.com>
3381 * kern/i386/linuxbios/startup.S: Move from here ...
3382 * kern/i386/coreboot/startup.S: ... to here.
3384 * kern/i386/linuxbios/init.c: Move from here ...
3385 * kern/i386/coreboot/init.c: ... to here.
3387 * kern/i386/linuxbios/table.c: Move from here ...
3388 * kern/i386/coreboot/mmap.c: ... to here.
3390 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3392 2008-08-11 Robert Millan <rmh@aybabtu.com>
3394 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3395 errors. Leave it to the upper layer to handle them.
3397 2008-08-09 Christian Franke <franke@computer.org>
3399 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
3400 * conf/common.rmk: Install `grub-pe2elf' only if requested.
3401 Install `grub.d/10_windows' only on Cygwin.
3402 * configure.ac: Add subst of `target_os'.
3403 Check `target_os' also before setting TARGET_OBJ2ELF.
3404 Add `--enable-grub-pe2elf'.
3406 2008-08-08 Robert Millan <rmh@aybabtu.com>
3408 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3409 (grub_last_time): Change type to grub_uint64_t.
3410 (grub_disk_open): Migrate code from to using grub_get_time_ms().
3411 (grub_disk_close): Likewise.
3413 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3414 (run_menu): Migrate code from to using grub_get_time_ms().
3416 * util/misc.c (grub_get_time_ms): New function.
3418 2008-08-08 Marco Gerards <marco@gnu.org>
3420 * disk/ata.c (grub_ata_regget): Change return type to
3422 (grub_ata_regget2): Likewise.
3423 (grub_ata_wait_status): New function.
3424 (grub_ata_wait_busy): Removed function, updated all users to use
3425 `grub_ata_wait_status'.
3426 (grub_ata_wait_drq): Likewise.
3427 (grub_ata_cmd): New function.
3428 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
3430 (grub_ata_pio_write): Add error handling.
3431 (grub_atapi_identify): Likewise.
3432 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
3434 (grub_ata_identify): Use `grub_ata_cmd' and improve error
3435 handling. Actually use the detected registers. Reorder the
3436 detection logic such that it is easier to read.
3437 (grub_ata_pciinit): Do not assign the same ID to each controller.
3438 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
3440 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
3442 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
3444 2008-08-08 Marco Gerards <marco@gnu.org>
3448 2008-08-07 Bean <bean123ch@gmail.com>
3450 * include/grub/x86_64/pci.h: New file.
3452 2008-08-07 Christian Franke <franke@computer.org>
3454 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3455 (TIMER2_GATE): Likewise.
3456 (grub_pit_wait): Add enable/disable of the timer2 gate
3457 bit of port 0x61. This fixes a possible infinite loop.
3459 2008-08-07 Bean <bean123ch@gmail.com>
3461 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3462 kern/i386/tsc.c and kern/i386/pit.c.
3464 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3467 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3470 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3472 2008-08-07 Bean <bean123ch@gmail.com>
3474 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3476 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3478 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3479 multiple inclusion. Add #include <grub/types.h>.
3481 2008-08-06 Christian Franke <franke@computer.org>
3483 * conf/common.rmk: Build and install `10_windows'.
3484 * util/grub.d/10_windows.in: New script.
3486 2008-08-06 Pavel Roskin <proski@gnu.org>
3488 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3490 2008-08-06 Robert Millan <rmh@aybabtu.com>
3492 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3493 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3495 2008-08-06 Bean <bean123ch@gmail.com>
3497 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3498 (grub_pxefs_fs_int): Remove dummy definition.
3499 (grub_pxefs_open): Use data->block_size to store the current block
3501 (grub_pxefs_read): Use block size stored in data->block_size. As the
3502 value of grub_pxe_blksize can be changed after the file is opened.
3504 2008-08-06 Bean <bean123ch@gmail.com>
3506 * fs/i386/pc/pxe.c (curr_file): new variable.
3507 (grub_pxefs_open): Simply the handling of pxe file system. Don't
3508 require the dummy internal file system anymore.
3509 (grub_pxefs_read): Removed.
3510 (grub_pxefs_close): Likewise.
3511 (grub_pxefs_fs_int): Likewise.
3512 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3513 connection when we switch file.
3514 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3516 2008-08-06 Robert Millan <rmh@aybabtu.com>
3518 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3520 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3521 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3523 * kern/i386/halt.c: New file.
3524 * kern/i386/reboot.c: Likewise.
3525 * include/grub/i386/reboot.h: Likewise.
3526 * include/grub/i386/halt.h: Likewise.
3528 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3529 Include `<grub/cpu/halt.h>'.
3530 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3531 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3533 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3534 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3535 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3536 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3537 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3538 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3540 * include/grub/i386/at_keyboard.h: ... to here.
3542 2008-08-05 Robert Millan <rmh@aybabtu.com>
3544 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3545 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3546 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3547 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3548 `kern/generic/millisleep.c'.
3550 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3551 instead of grub_get_rtc().
3552 (grub_tsc_init): Initialize `tsc_boot_time'.
3554 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3555 (grub_machine_init): Use grub_tsc_init() rather than
3556 installing an RTC-based handler via grub_install_get_time_ms().
3558 * kern/i386/pit.c: New file.
3559 * include/grub/i386/pit.h: Likewise.
3561 2008-08-05 Bean <bean123ch@gmail.com>
3563 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3565 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3566 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3567 (pxe_mod_SOURCES): New macro.
3568 (pxe_mod_CFLAGS): Likewise.
3569 (pxe_mod_LDFLAGS): Likewise.
3570 (pxecmd_mod_SOURCES): Likewise.
3571 (pxecmd_mod_CFLAGS): Likewise.
3572 (pxecmd_mod_LDFLAGS): Likewise.
3574 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3575 (grub_pxe_call): Likewise.
3577 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3579 * commands/i386/pc/pxecmd.c: New file.
3581 * fs/i386/pc/pxe.c: Likewise.
3583 * include/grub/i386/pc/pxe.h: Likewise.
3585 2008-08-05 Bean <bean123ch@gmail.com>
3587 * util/console.c (grub_console_cur_color): New variable.
3588 (grub_console_standard_color): Likewise.
3589 (grub_console_normal_color): Likewise.
3590 (grub_console_highlight_color): Likewise.
3591 (color_map): Likewise.
3592 (use_color): Likewise.
3593 (NUM_COLORS): New macro.
3594 (grub_ncurses_setcolorstate): Handle color properly.
3595 (grub_ncurses_setcolor): Don't change color here, just remember the
3596 settings, color will be set in grub_ncurses_setcolorstate.
3597 (grub_ncurses_getcolor): New function.
3598 (grub_ncurses_init): Initialize color pairs.
3599 (grub_ncurses_term): New member grub_ncurses_getcolor.
3601 2008-08-05 Colin D Bennett <colin@gibibit.com>
3603 High resolution timer support. Implemented for x86 CPUs using TSC.
3604 Extracted generic grub_millisleep() so it's linked in only as needed.
3605 This requires a Pentium compatible CPU; if the RDTSC instruction is
3606 not supported, then it falls back on the generic grub_get_time_ms()
3607 implementation that uses the machine's RTC.
3609 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3610 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3611 `kern/generic/millisleep.c'.
3613 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3614 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3616 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3617 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3619 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3621 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3622 `kern/generic/millisleep.c'.
3624 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3626 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3628 * kern/generic/rtc_get_time_ms.c: New file.
3630 * kern/generic/millisleep.c: New file.
3632 * kern/misc.c: Don't include
3633 <kern/time.h> anymore.
3634 (grub_millisleep_generic): Removed.
3636 * commands/sleep.c (grub_interruptible_millisleep): Uses
3637 grub_get_time_ms() instead of grub_get_rtc().
3639 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3641 (grub_cpu_is_cpuid_supported): New inline function.
3642 (grub_cpu_is_tsc_supported): New inline function.
3643 (grub_tsc_init): New function prototype.
3644 (grub_tsc_get_time_ms): New function prototype.
3646 * kern/i386/tsc.c (grub_get_time_ms): New file.
3648 * include/grub/time.h: Include <grub/types.h.
3649 (grub_millisleep_generic): Removed.
3650 (grub_get_time_ms): New prototype.
3651 (grub_install_get_time_ms): New prototype.
3652 (grub_rtc_get_time_ms): New prototype.
3654 * kern/time.c (grub_get_time_ms): New function.
3655 (grub_install_get_time_ms): New function.
3657 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3658 <grub/time.h> anymore.
3659 (grub_millisleep): Removed.
3660 (grub_machine_init): Call grub_tsc_init.
3662 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3663 get_time_ms() implementation.
3665 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3666 (ieee1275_get_time_ms): New function.
3667 (grub_machine_init): Install get_time_ms() implementation.
3669 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3670 (grub_machine_init): Call grub_tsc_init().
3671 (grub_millisleep): Removed.
3673 * kern/ieee1275/init.c (grub_millisleep): Removed.
3674 (grub_machine_init): Install ieee1275_get_time_ms()
3676 (ieee1275_get_time_ms): New function.
3677 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3680 2008-08-05 Marco Gerards <marco@gnu.org>
3682 * disk/ata.c: Include <grub/pci.h>.
3683 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3684 (grub_ata_initialize): Rewritten.
3685 (grub_ata_device_initialize): New function.
3687 2008-08-04 Pavel Roskin <proski@gnu.org>
3689 * kern/main.c: Include grub/mm.h.
3691 2008-08-04 Robert Millan <rmh@aybabtu.com>
3693 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3694 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3695 corruption problem).
3697 2008-08-04 Robert Millan <rmh@aybabtu.com>
3699 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3700 warnings introduced in my last commit.
3702 2008-08-03 Robert Millan <rmh@aybabtu.com>
3704 Make PCI available on all i386 architectures.
3706 * include/grub/i386/pc/pci.h: Move from here ...
3707 * include/grub/i386/pci.h: ... to here.
3709 * include/grub/i386/pc/pci.h: Remove.
3710 * include/grub/i386/efi/pci.h: Remove.
3711 * include/grub/x86_64/efi/pci.h: Remove.
3713 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3716 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3717 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3718 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3720 * conf/i386-ieee1275.rmk: Likewise.
3722 2008-08-03 Robert Millan <rmh@aybabtu.com>
3724 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3725 (grub_console_setcursor): Make it possible to set cursor off.
3727 2008-08-03 Robert Millan <rmh@aybabtu.com>
3729 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3730 of modules instead of assuming which platform provides what.
3731 * util/update-grub.in: Likewise.
3733 2008-08-03 Robert Millan <rmh@aybabtu.com>
3735 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3736 instead of `grub_install_dos_part' to determine whether a drive needs
3737 to be prepended to prefix (`grub_install_dos_part' is not reliable,
3738 because it can be overridden when loading GRUB via Multiboot).
3740 2008-08-02 Robert Millan <rmh@aybabtu.com>
3742 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3744 2008-08-02 Robert Millan <rmh@aybabtu.com>
3746 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3747 of informational grub_dprintf() calls.
3749 2008-08-02 Robert Millan <rmh@aybabtu.com>
3751 * disk/memdisk.c (memdisk_size): Don't initialize.
3752 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3754 * include/grub/i386/pc/kernel.h
3755 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3756 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3757 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3758 (grub_arch_memdisk_size): Remove.
3760 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3761 field (was only used to transfer a constant). Add `type' field to
3762 support multiple module types.
3763 (grub_module_iterate): New function.
3765 * kern/device.c (grub_device_open): Do not hide error messages
3766 when grub_disk_open() fails. Use grub_print_error() instead.
3768 * kern/i386/pc/init.c (grub_arch_modules_addr)
3769 (grub_arch_memdisk_size): Remove functions.
3770 (grub_arch_modules_addr): Return the module address in high memory
3771 (now that it isn't copied anymore).
3773 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3774 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3775 decompression routine (grub_total_module_size already includes that
3776 now). Don't copy modules back to low memory.
3778 * kern/main.c: Include `<grub/mm.h>'.
3779 (grub_load_modules): Split out (and use) ...
3780 (grub_module_iterate): ... this function, which iterates through
3781 module objects and runs a hook.
3782 Comment out grub_mm_init_region() call, as it would cause non-ELF
3783 modules to be overwritten.
3785 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3786 the memdisk image in its own region, make it part of the module list.
3787 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3788 (main): Parse --memdisk|-m option, and pass user-provided path as
3789 parameter to generate_image().
3790 (add_segments): Pass `memdisk_path' down to load_modules().
3791 (load_modules): Embed memdisk image in module section when requested.
3792 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3793 `header.type' instead of `header.offset'.
3795 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3796 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3797 (memdisk_mod_LDFLAGS): New variables.
3798 * conf/i386-coreboot.rmk: Likewise.
3799 * conf/i386-ieee1275.rmk: Likewise.
3801 2008-08-02 Robert Millan <rmh@aybabtu.com>
3803 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3804 (backward_relocator): New variables. Used to allocate and relocate
3805 the payload, respectively.
3806 (grub_multiboot_load_elf32): Load into heap instead of requested
3807 address, install the appropriate relocator code in each bound of
3808 the payload, and set the entry point such that
3809 grub_multiboot_real_boot() will jump to one of them.
3811 * kern/i386/loader.S (grub_multiboot_payload_size)
3812 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3813 (grub_multiboot_payload_entry_offset): New variables.
3814 (grub_multiboot_real_boot): Set cpu context to what the relocator
3815 expects, and jump to the relocator instead of the payload.
3817 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3818 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3819 (grub_multiboot_payload_entry_offset): Export.
3821 2008-08-01 Bean <bean123ch@gmail.com>
3823 * normal/menu_entry.c (editor_getline): Don't return the original
3824 string as result, as it will be released by lexer once it has done
3827 2008-08-01 Robert Millan <rmh@aybabtu.com>
3829 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3830 within menuentries, not before them.
3831 util/grub.d/10_hurd.in: Likewise.
3833 2008-08-01 Bean <bean123ch@gmail.com>
3835 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3836 (bufio_mod_SOURCES): New macro.
3837 (bufio_mod_CFLAGS): Likewise.
3838 (bufio_mod_LDFLAGS): Likewise.
3840 * include/grub/bufio.h: New file.
3842 * io/bufio.c: Likewise.
3844 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3845 (grub_video_reader_png): Use grub_buffile_open to open file.
3847 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3848 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3850 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3851 (grub_video_reader_tga): Use grub_buffile_open to open file.
3853 * font/manager.c: Include <grub/bufio.h>.
3854 (add_font): Use grub_buffile_open to open file.
3856 2008-07-31 Robert Millan <rmh@aybabtu.com>
3858 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3859 ELF segments, use a macro for arbitrarily accessing any of them instead
3860 of preparing a pointer that allows access to one at a time.
3861 (grub_multiboot_load_elf64): Likewise.
3863 2008-07-31 Bean <bean123ch@gmail.com>
3865 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3866 GRUB_KERNEL_MACHINE_DATA_END.
3868 2008-07-30 Robert Millan <rmh@aybabtu.com>
3870 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3871 Increase from 0x50 to 0x60.
3872 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3873 use UUIDs to identify the root drive for them. If that's not
3875 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3876 check, for cross-disk installs.
3878 2008-07-30 Robert Millan <rmh@aybabtu.com>
3880 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3881 is non-empty, use it to set the `prefix' environment variable instead
3882 of the usual approach.
3883 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3884 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3885 environment variable instead of dummy make_install_device().
3887 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3888 (start): Insert a data section, with `grub_prefix' variable.
3889 * kern/i386/linuxbios/startup.S: Likewise.
3891 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3892 New variable reference.
3893 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3894 New macro. Defines offset of `grub_prefix' within startup.S (relative
3896 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3897 section within startup.S (relative to `start').
3898 * include/grub/i386/coreboot/kernel.h: Likewise.
3900 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3901 Overwrite grub_prefix with its contents, at the beginning of the
3903 (main): Understand -p|--prefix.
3905 2008-07-30 Robert Millan <rmh@aybabtu.com>
3907 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3909 2008-07-30 Robert Millan <rmh@aybabtu.com>
3911 * term/i386/pc/vga_text.c (grub_console_cls): Use
3912 grub_console_gotoxy() to go back to beginning of the screen.
3913 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3915 2008-07-29 Christian Franke <franke@computer.org>
3917 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3918 Add conversion of emulated mount points on Cygwin.
3920 2008-07-29 Christian Franke <franke@computer.org>
3922 * util/update-grub.in: Add a check for admin
3924 Remove old `grub.cfg.new' before creation.
3925 Add `-f' to `mv' to handle the different filesystem
3926 semantics of Windows.
3928 2008-07-29 Bean <bean123ch@gmail.com>
3930 * normal/main.c (get_line): Fix buffer overflow bug.
3932 2008-07-28 Robert Millan <rmh@aybabtu.com>
3934 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3935 (struct grub_apple_header): New struct. Describes the layout of
3937 (apple_partition_map_iterate): Check the header magic as well as the
3938 partition magic (which was already being checked).
3940 2008-07-28 Pavel Roskin <proski@gnu.org>
3942 * genmk.rb: Add a warning to the beginning of the output that
3943 it's a generated file and should not be edited.
3945 2008-07-28 Robert Millan <rmh@aybabtu.com>
3947 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3948 with the same number are found, just use issue a warning with
3949 grub_dprintf(), as this error has been reported to be non-fatal.
3951 2008-07-27 Robert Millan <rmh@aybabtu.com>
3953 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3956 2008-07-27 Bean <bean123ch@gmail.com>
3958 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3959 (grub_fat_find_dir): Ignore case when comparing filename.
3961 2008-07-27 Bean <bean123ch@gmail.com>
3963 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3964 smallino, as it's more descriptive, and i8count can be confused with
3965 the other field count.
3966 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3969 2008-07-27 Bean <bean123ch@gmail.com>
3971 * commands/crc.c: New file.
3973 * lib/crc.c: Likewise.
3975 * include/grub/lib/crc.h: Likewise.
3977 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3979 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3980 (hexdump): Move this function to ...
3982 * lib/hexdump.c: ... here.
3984 * include/grub/hexdump.h: Renamed to ...
3986 * include/grub/lib/hexdump.h: ... this.
3988 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3990 * util/grub-editenv.c: Likewise.
3992 * include/envblk.h: Renamed to ...
3994 * include/lib/envblk.h: ... this.
3996 * util/envblk.c: Renamed to ...
3998 * lib/envblk.c: ... this.
4000 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4002 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4003 (pkglib_MODULES): Add crc.mod.
4004 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4005 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4006 (crc_mod_SOURCES): New macro.
4007 (crc_mod_CFLAGS): Likewise.
4008 (crc_mod_LDFLAGS): Likewise.
4010 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4012 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4014 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4016 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4018 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4020 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
4022 * commands/help.c: Include <grub/term.h>.
4023 (TERM_WIDTH): Removed. Updated all users.
4025 2008-07-27 Pavel Roskin <proski@gnu.org>
4027 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4028 spurious warnings about a comment within a comment.
4030 2008-07-25 Robert Millan <rmh@aybabtu.com>
4032 * util/getroot.c (find_root_device): Skip devices that match
4033 /dev/dm-[0-9]. This lets the real device be found for any type of
4034 abstraction (LVM, EVMS, RAID..).
4035 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4036 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4037 device is found first, find_root_device() will now skip it.
4039 2008-07-24 Pavel Roskin <proski@gnu.org>
4041 * include/grub/types.h: Use __builtin_bswap32() and
4042 __builtin_bswap64() with gcc 4.3 and newer.
4044 2008-07-24 Christian Franke <franke@computer.org>
4046 * util/i386/pc/grub-install.in: If `--debug' is specified,
4047 pass `--verbose' to grub-setup.
4048 Abort script if make_system_path_relative_to_its_root() fails.
4050 2008-07-24 Bean <bean123ch@gmail.com>
4052 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4053 variable `target_platform' should be `platform'.
4055 2008-07-24 Bean <bean123ch@gmail.com>
4057 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
4058 (grub_png_init_fixed_block): New function.
4059 (grub_png_decode_image_data): Handle fixed huffman code compression.
4061 2008-07-24 Bean <bean123ch@gmail.com>
4063 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4064 (grub_pe2elf_SOURCES): New macro.
4065 (CLEANFILES): Add grub-pe2elf.
4067 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4068 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4069 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4070 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4071 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4072 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4073 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4074 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4075 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4076 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4077 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4078 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4079 (GRUB_PE32_DT_FUNCTION): Likewise.
4080 (GRUB_PE32_REL_I386_DIR32): Likewise.
4081 (GRUB_PE32_REL_I386_REL32): Likewise.
4082 (grub_pe32_symbol): New structure.
4083 (grub_pe32_reloc): Likewise.
4085 * util/grub-pe2elf.c: New file.
4087 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4088 start symbol in non pc platform.
4090 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4092 The following patches are from Christian Franke.
4094 * include/grub/dl.h: Remove .previous, gas supports this only
4097 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4098 Remove .type, gas supports this only for ELF format.
4100 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4101 nullbytes in symbol table. This fixes an infinite loop if table is
4104 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4105 TARGET_IMG_LDFLAGS and EXEEXT.
4107 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4108 TARGET_IMG_LDFLAGS_AC.
4109 (grub_CHECK_STACK_ARG_PROBE): New function.
4111 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4113 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4115 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4116 to set TARGET_IMG_LD* accordingly.
4117 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4118 Add call to grub_CHECK_STACK_ARG_PROBE.
4119 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4121 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4123 * genmk.rb: Add EXEEXT to CLEANFILES.
4125 2008-07-23 Robert Millan <rmh@aybabtu.com>
4127 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4128 define the codes for arrows and lines used for the menu).
4129 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4132 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4133 fonts, because the latter are too slow.
4135 2008-07-21 Bean <bean123ch@gmail.com>
4137 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4138 a20. Run keyboard test last, as it will cause macbook to halt.
4140 2008-07-18 Pavel Roskin <proski@gnu.org>
4142 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4143 load foreign architecture modules correctly anyway. Keep
4144 support for loading host architecture modules, whether we
4145 compile them or not.
4147 2008-07-17 Pavel Roskin <proski@gnu.org>
4149 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4150 change target_cpu. The compiler default can mismatch target_cpu
4153 * disk/efi/efidisk.c: Fix format warnings on x86_64.
4154 * kern/efi/efi.c: Likewise.
4156 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
4157 target compiler is functional.
4158 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4161 * configure.ac: Default to efi platform for x86_64-apple. Allow
4162 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
4163 adjustments from the rest, only do them if target is not
4164 explicitly given. Merge other adjustments with the final sanity
4165 check. Remove an extraneous check for supported CPU. Be
4166 specific which CPU and which platform is not supported.
4168 * configure.ac: Default to pc platform for x86_64.
4170 2008-07-17 Robert Millan <rmh@aybabtu.com>
4172 Partial LinuxBIOS -> Coreboot rename.
4174 * conf/i386-linuxbios.rmk: Renamed to ...
4175 * conf/i386-coreboot.rmk: ... this.
4176 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4177 * configure.ac: Accept "coreboot" as input platform (but maintain
4178 compatibility with "linuxbios").
4179 * include/grub/i386/linuxbios: Renamed to ...
4180 * include/grub/i386/coreboot: ... this.
4182 2008-07-17 Bean <bean123ch@gmail.com>
4184 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
4185 (appleldr_mod_SOURCE): New variable.
4186 (appleldr_mod_CFLAGS): Likewise.
4187 (appleldr_mod_LDFLAGS): Likewise.
4188 (pci_mod_SOURCES): Likewise.
4189 (pci_mod_CFLAGS): Likewise.
4190 (pci_mod_LDFLAGS): Likewise.
4191 (lspci_mod_SOURCES): Likewise.
4192 (lspci_mod_CFLAGS): Likewise.
4193 (lspci_mod_LDFLAGS): Likewise.
4195 * conf/x86_64-efi.rmk: New file.
4197 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4199 (grub_efidisk_write): Likewise.
4201 * include/efi/api.h (efi_call_0): New macro.
4202 (efi_call_1): Likewise.
4203 (efi_call_2): Likewise.
4204 (efi_call_3): Likewise.
4205 (efi_call_4): Likewise.
4206 (efi_call_5): Likewise.
4207 (efi_call_6): Likewise.
4209 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4210 grub_rescue_cmd_chainloader.
4212 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4213 (grub_pe32_optional_header): Change some fields based on i386 or
4215 (GRUB_PE32_PE32_MAGIC): Likewise.
4217 * include/grub/efi/uga_draw.h: New file.
4219 * include/grub/elf.h (STN_ABS): New constant.
4220 (R_X86_64_NONE): Relocation constant for x86_64.
4221 (R_X86_64_64): Likewise.
4222 (R_X86_64_PC32): Likewise.
4223 (R_X86_64_GOT32): Likewise.
4224 (R_X86_64_PLT32): Likewise.
4225 (R_X86_64_COPY): Likewise.
4226 (R_X86_64_GLOB_DAT): Likewise.
4227 (R_X86_64_JUMP_SLOT): Likewise.
4228 (R_X86_64_RELATIVE): Likewise.
4229 (R_X86_64_GOTPCREL): Likewise.
4230 (R_X86_64_32): Likewise.
4231 (R_X86_64_32S): Likewise.
4232 (R_X86_64_16): Likewise.
4233 (R_X86_64_PC16): Likewise.
4234 (R_X86_64_8): Likewise.
4235 (R_X86_64_PC8): Likewise.
4237 * include/grub/i386/efi/pci.h: New file.
4239 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4240 Change it value based on platform.
4241 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4242 (GRUB_E820_RAM): Likewise.
4243 (GRUB_E820_RESERVED): Likewise.
4244 (GRUB_E820_ACPI): Likewise.
4245 (GRUB_E820_NVS): Likewise.
4246 (GRUB_E820_EXEC_CODE): Likewise.
4247 (GRUB_E820_MAX_ENTRY): Likewise.
4248 (grub_e820_mmap): New structure.
4249 (linux_kernel_header): Change the efi field according to different
4250 kernel version, also field from linux_kernel_header.
4252 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4254 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4255 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4256 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4257 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4258 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4259 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4260 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4261 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4262 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4263 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4265 * include/grub/x86_64/efi/kernel.h: New file.
4267 * include/grub/x86_64/efi/loader.h: Likewise.
4269 * include/grub/x86_64/efi/machine.h: Likewise.
4271 * include/grub/x86_64/efi/pci.h: Likewise.
4273 * include/grub/x86_64/efi/time.h: Likewise.
4275 * include/grub/x86_64/linux.h: Likewise.
4277 * include/grub/x86_64/setjmp.h: Likewise.
4279 * include/grub/x86_64/time.h: Likewise.
4281 * include/grub/x86_64/types.h: Likewise.
4283 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4284 GRUB_TARGET_SIZEOF_VOID_P.
4286 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4287 (grub_efi_locate_handle): Likewise.
4288 (grub_efi_open_protocol): Likewise.
4289 (grub_efi_set_text_mode): Likewise.
4290 (grub_efi_stall): Likewise.
4291 (grub_exit): Likewise.
4292 (grub_reboot): Likewise.
4293 (grub_halt): Likewise.
4294 (grub_efi_exit_boot_services): Likewise.
4295 (grub_get_rtc): Likewise.
4297 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4298 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4299 (grub_efi_allocate_pages): Wrap efi calls.
4300 (grub_efi_free_pages): Wrap efi calls.
4301 (grub_efi_get_memory_map): Wrap efi calls.
4303 * kern/x86_64/dl.c: New file.
4305 * kern/x86_64/efi/callwrap.S: Likewise.
4307 * kern/x86_64/efi/startup.S: Likewise.
4309 * loader/efi/appleloader.c: Likewise.
4311 * loader/efi/chainloader.c (cmdline): New variable.
4312 (grub_chainloader_unload): Wrap efi calls.
4313 (grub_chainloader_boot): Likewise.
4314 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4317 * loader/efi/chainloader_normal.c (chainloader_command):
4318 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4321 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4323 (grub_e820_add_region): New function.
4324 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4326 (grub_find_video_card): New function.
4327 (grub_linux_setup_video): New function.
4328 (grub_rescue_cmd_linux): Probe for video information.
4330 * normal/x86_64/setjmp.S: New file.
4332 * term/efi/console.c (map_char): New function.
4333 (grub_console_putchar): Map unicode char.
4334 (grub_console_checkkey): Wrap efi calls.
4335 (grub_console_getkey): Likewise.
4336 (grub_console_getwh): Likewise.
4337 (grub_console_gotoxy): Likewise.
4338 (grub_console_cls): Likewise.
4339 (grub_console_setcolorstate): Likewise.
4340 (grub_console_setcursor): Likewise.
4342 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4344 2008-07-16 Pavel Roskin <proski@gnu.org>
4346 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4349 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4350 pointer, not an integer. This fixes a warning and prevents
4351 precision loss on 64-bit systems.
4352 (relocate_addresses): Remove unneeded cast.
4354 2008-07-15 Pavel Roskin <proski@gnu.org>
4356 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4358 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4360 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4361 Fix comparison between signed and unsigned.
4363 * include/grub/i386/ieee1275/console.h: Declare
4364 grub_console_init() and grub_console_fini().
4366 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4367 It's empty and unused.
4369 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4370 beginning to avoid warnings with some compilers.
4372 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4373 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4375 2008-07-14 Pavel Roskin <proski@gnu.org>
4377 * kern/env.c (grub_register_variable_hook): Don't copy empty
4378 string, it leaks memory. Pass "" to grub_env_set(), it should
4379 handle constant strings.
4381 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4382 * commands/cmp.c (grub_cmd_cmp): Likewise.
4383 * kern/dl.c (grub_dl_flush_cache): Likewise.
4384 (grub_dl_load_core): Likewise.
4385 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4386 (grub_elf64_load_phdrs): Likewise.
4388 2008-07-13 Pavel Roskin <proski@gnu.org>
4390 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4391 between signed and unsigned.
4392 (LzmaEnc_Finish): Fix warning about an unused parameter.
4394 2008-07-13 Bean <bean123ch@gmail.com>
4396 * Makefile.in (enable_lzo): New rule.
4398 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
4400 * configure.ac (ENABLE_LZO): New option --enable-lzo.
4402 * boot/i386/pc/lnxboot.S: #include <config.h>.
4404 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
4405 its value according to the compression algorithm used, lzo or lzma.
4407 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
4408 compression algorithm according to configure macro.
4410 * kern/i386/pc/startup.S (codestart): Likewise.
4412 * kern/i386/pc/lzma_decode.S: New file.
4414 * include/grub/lib/LzFind.h: Likewise.
4416 * include/grub/lib/LzHash.h: Likewise.
4418 * include/grub/lib/LzmaDec.h: Likewise.
4420 * include/grub/lib/LzmaEnc.h: Likewise.
4422 * include/grub/lib/LzmaTypes.h: Likewise.
4424 * lib/LzFind.c: Likewise.
4426 * lib/LzmaDec.c: Likewise.
4428 * lib/LzmaEnc.c: Likewise.
4430 2008-07-13 Bean <bean123ch@gmail.com>
4432 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
4433 (grub_ext4_extent_header): New structure.
4434 (grub_ext4_extent): Likewise.
4435 (grub_ext4_extent_idx): Likewise.
4436 (grub_ext4_find_leaf): New function.
4437 (grub_ext2_read_block): Handle extents.
4439 2008-07-12 Robert Millan <rmh@aybabtu.com>
4441 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
4443 2008-07-11 Robert Millan <rmh@aybabtu.com>
4445 * util/grub.d/40_custom.in: New file. Example on how to add custom
4446 entries to /etc/grub.d.
4447 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
4448 40_custom (implicitly, by merging all the grub.d rules).
4450 2008-07-11 Pavel Roskin <proski@gnu.org>
4452 * commands/read.c (grub_getline): Fix invalid memory access.
4453 Don't add newline to the variable value.
4455 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4456 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4457 (serial_hw_get_port): Check validity of the port number.
4458 (grub_cmd_serial): Check return value of serial_hw_get_port().
4460 2008-07-07 Pavel Roskin <proski@gnu.org>
4462 * boot/i386/pc/diskboot.S (notification_string): Replace
4463 "Loading kernel" with just "loading". This is shorter, less
4464 confusing and saves a few bytes for possible future changes.
4466 2008-07-05 Pavel Roskin <proski@gnu.org>
4468 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4469 size for ATAPI devices, they are undefined. Output sector
4470 number in decimal form.
4472 * disk/ata.c: Use named constants for status bits.
4474 2008-07-04 Pavel Roskin <proski@gnu.org>
4476 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4477 grub_addr_t before casting it to the void pointer to fix a
4478 warning. Non-addressable regions are discarded earlier.
4479 (grub_arch_modules_addr): Cast _end to grub_addr_t.
4480 * kern/i386/linuxbios/table.c: Include grub/misc.h.
4481 (check_signature): Don't shadow table_header.
4482 (grub_linuxbios_table_iterate): Cast numeric constants to
4483 grub_linuxbios_table_header_t.
4484 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4487 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4490 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4491 pointer, which can cause warnings. Support 64-bit addresses.
4493 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4494 of sizeof(long). This fixes PowerPC image generation on x86_64.
4496 2008-07-04 Robert Millan <rmh@aybabtu.com>
4498 This fixes a performance issue when pc & gpt partmap iterators
4499 didn't abort iteration even after our hook found what it was
4500 looking for (often causing expensive probes of non-existent drives).
4502 Some callers relied on previous buggy behaviour, since they would
4503 raise an error when their own hooks caused early abortion of its
4506 * kern/device.c (grub_device_open): Improve error message.
4507 * disk/lvm.c (grub_lvm_open): Likewise.
4508 * disk/raid.c (grub_raid_open): Likewise.
4510 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4511 when hook requests it, independently of grub_errno.
4512 (pc_partition_map_probe): Do not fail when find_func() caused
4513 early abortion of pc_partition_map_iterate().
4515 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4516 when hook requests it, independently of grub_errno.
4517 (gpt_partition_map_probe): Do not fail when find_func() caused
4518 early abortion of gpt_partition_map_iterate().
4520 * kern/partition.c (grub_partition_iterate): Abort parent iteration
4521 when hook requests it, independently of grub_errno. Do not fail when
4522 part_map_iterate_hook() caused early abortion of p->iterate().
4524 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4525 when grub_partition_iterate() returned with non-zero.
4527 2008-07-03 Pavel Roskin <proski@gnu.org>
4529 * disk/ata.c (grub_ata_pio_write): Check status before writing,
4530 like we do in grub_ata_pio_read().
4531 (grub_ata_readwrite): Always write individual sectors. Fix the
4532 sector count for the remainder.
4533 (grub_ata_write): Enable writing to ATA devices. Correctly
4534 report error for ATAPI devices.
4536 2008-07-02 Pavel Roskin <proski@gnu.org>
4538 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4541 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4542 for every read sector, we already increment it for the whole
4543 batch. This fixes reading more than 256 sectors at once.
4545 * util/grub-editenv.c (cmd_info): Cast argument to long
4546 explicitly. ptrdiff_t reduces to int on i386.
4548 * util/grub-editenv.c (main): Be specific which parameter is
4551 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4552 (memdisk): Make memdisk_orig_addr a pointer.
4554 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4555 for file offsets, use grub_off_t instead. Fix printf format
4558 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4559 there. Real unexpected warnings should not drown in the noise
4560 about known problems.
4562 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4563 grub_disk_addr_t for memory addresses.
4565 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4566 explicitly to fix a warning.
4568 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4570 * Makefile.in (MODULE_LDFLAGS): New variable.
4571 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
4572 the linker accepts --build-id=none.
4573 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
4575 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4577 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4578 those in Linux XFS code. Provide a way to access 64-bit parent
4580 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
4581 the end of struct grub_xfs_dir_header.
4583 2008-07-02 Bean <bean123ch@gmail.com>
4585 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4586 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4587 and GRUB_IEEE1275_FLAG_NO_ANSI.
4589 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4590 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4591 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4593 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4594 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4596 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4597 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4599 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4600 esc sequence on non ANSI terminal.
4601 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4603 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4606 2008-07-02 Bean <bean123ch@gmail.com>
4608 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4609 (grub_editenv_SOURCES): New variable.
4610 (pkglib_MODULES): Add loadenv.mod.
4611 (loadenv_mod_SOURCES): New variable.
4612 (loadenv_mod_CFLAGS): Likewise.
4613 (loadenv_mod_LDFLAGS): Likewise.
4615 * include/grub/envblk.h: New file.
4617 * util/envblk.c: New file.
4619 * util/grub-editenv.c: New file.
4621 * commands/loadenv.c: New file.
4623 2008-07-01 Pavel Roskin <proski@gnu.org>
4625 * include/multiboot2.h (struct multiboot_tag_module): Use char,
4626 not unsigned char. This fixes warnings and is consistent with
4629 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4631 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4633 * term/tparm.c (analyze): Always set *popcount.
4635 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4636 cast to fix a warning.
4638 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4639 cast to suppress a warning.
4641 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4642 grub_fshelp_read_file() expects.
4644 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4645 write uuid as a 32-bit value in CPU byte order, so declare and
4648 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4649 long if the format specifier expects it.
4650 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4651 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4652 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4653 long to fix a warning.
4654 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4655 grub_dprintf() arguments to fix warnings.
4657 2008-06-30 Pavel Roskin <proski@gnu.org>
4659 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4660 install_bsd_part immediately before core.img is embedded or
4661 modified on disk. This fixes core.img verification if core.img
4664 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4665 core_path to calculate the blocklist.
4666 Patch from Javier MartÃn <lordhabbit@gmail.com>
4668 2008-06-29 Robert Millan <rmh@aybabtu.com>
4670 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4671 block to disk block.
4672 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4673 Patch from Niels Böhm <bitbucket@arcor.de>
4675 2008-06-29 Robert Millan <rmh@aybabtu.com>
4677 * util/update-grub_lib.in (font_path): Search for fonts in
4678 /boot/grub first, which is more likely to be readable (we aren't
4679 deciding where fonts live, just looking for them).
4681 2008-06-26 Pavel Roskin <proski@gnu.org>
4683 * util/biosdisk.c (read_device_map): Don't leave dead map
4684 entries for devices failing stat() check.
4686 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4687 core_path_dev for the core.img path on the target device.
4689 2008-06-26 Robert Millan <rmh@aybabtu.com>
4691 * disk/fs_uuid.c: New file.
4692 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4693 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4694 (fs_uuid_mod_LDFLAGS): New variables.
4695 * include/grub/disk.h (grub_disk_dev_id): Add
4696 `GRUB_DISK_DEVICE_UUID_ID'.
4697 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4698 implement iterate().
4700 2008-06-26 Robert Millan <rmh@aybabtu.com>
4702 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4703 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4704 Linux image includes no initrd.
4706 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
4708 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4709 call to resolve the core image location that effectively appended the
4712 2008-06-21 Robert Millan <rmh@aybabtu.com>
4714 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4717 * util/grub.d/10_hurd.in: ... to here ...
4718 * util/grub.d/10_linux.in: ... and here.
4720 2008-06-19 Robert Millan <rmh@aybabtu.com>
4722 * kern/main.c (grub_main): Export `prefix' variable immediately
4723 after it has been set by grub_machine_set_prefix().
4725 2008-06-19 Robert Millan <rmh@aybabtu.com>
4727 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4728 search result when not saving to variable, not the other way around.
4729 When saving to variable, abort iteration as soon as a match is found.
4731 2008-06-19 Robert Millan <rmh@aybabtu.com>
4733 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4734 check for partition that provides /boot/grub. Its logic is flawed,
4735 as it prevents prepare_grub_to_access_device() from being called
4738 2008-06-19 Robert Millan <rmh@aybabtu.com>
4740 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4741 "insmod" command directly when abstraction modules are needed,
4742 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4743 since it had already been processed).
4745 2008-06-19 Pavel Roskin <proski@gnu.org>
4747 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4748 changed. This is needed in case GRUB_LIBDIR changes.
4749 * conf/i386-ieee1275.rmk: Likewise.
4750 * conf/i386-linuxbios.rmk: Likewise.
4751 * conf/i386-pc.rmk: Likewise.
4752 * conf/powerpc-ieee1275.rmk: Likewise.
4754 2008-06-18 Pavel Roskin <proski@gnu.org>
4756 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4757 kernel_elf_symlist.c to symlist.c for consistency with other
4758 architectures. Update all users.
4759 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4761 2008-06-18 Robert Millan <rmh@aybabtu.com>
4763 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4766 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4767 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4768 a RAID device, run setup() for all members independently on whether
4769 LVM abstraction is being used.
4770 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4771 If grub-mkimage has set `*install_dos_part == -2', don't override this
4773 Perform *install_dos_part adjustments independently on whether
4774 we're embedding or not.
4775 Clarify error message when image is too big for embedding.
4776 Remove duplicate *install_dos_part stanza.
4778 2008-06-17 Robert Millan <rmh@aybabtu.com>
4780 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4781 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4783 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4784 values in grub_ofconsole_normal_color and
4785 grub_ofconsole_highlight_color (they're not directly related to
4786 background and foreground).
4787 (grub_ofconsole_setcolorstate): Extract background and foreground
4788 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4790 2008-06-17 Robert Millan <rmh@aybabtu.com>
4792 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4793 /boot/grub for the check in last commit, not /boot (they could be
4794 different partitions).
4796 2008-06-16 Robert Millan <rmh@aybabtu.com>
4798 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4799 asked to setup access for the same partition that provides /boot,
4800 don't bother using UUIDs since our root already has the value we
4803 2008-06-16 Robert Millan <rmh@aybabtu.com>
4805 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4807 Patch from Sven Mueller <sven@debian.org>.
4809 2008-06-16 Robert Millan <rmh@aybabtu.com>
4811 * util/update-grub.in: Check for $EUID instead of $UID.
4812 Reported by Vincent Zweije.
4814 2008-06-16 Bean <bean123ch@gmail.com>
4816 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
4817 (grub_ext2_read_block): Likewise.
4818 (grub_ext2_read_inode): Likewise.
4819 (grub_ext2_mount): Likewise.
4820 (grub_ext2_close): Likewise.
4821 (grub_ext3_get_journal): Removed.
4823 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
4824 (grub_reiserfs_read_symlink): Likewise.
4825 (grub_reiserfs_mount): Likewise.
4826 (grub_reiserfs_open): Likewise.
4827 (grub_reiserfs_read): Likewise.
4828 (grub_reiserfs_close): Likewise.
4829 (grub_reiserfs_get_journal): Removed.
4831 * fs/fshelp.c (grub_fshelp_read): Removed.
4832 (grub_fshelp_map_block): Likewise.
4834 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4835 (grub_fshelp_journal): Likewise.
4836 (grub_fshelp_read): Likewise.
4837 (grub_fshelp_map_block): Likewise.
4839 2008-06-16 Pavel Roskin <proski@gnu.org>
4841 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4842 floating point anymore.
4843 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4845 2008-06-15 Pavel Roskin <proski@gnu.org>
4847 * commands/ls.c (grub_ls_list_files): Use integer calculations
4848 for human readable format, avoid floating point use.
4849 * kern/misc.c (grub_ftoa): Remove.
4850 (grub_vsprintf): Remove floating point support.
4852 2008-06-15 Robert Millan <rmh@aybabtu.com>
4854 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
4856 Reported by Max Vozeler.
4858 2008-06-15 Robert Millan <rmh@aybabtu.com>
4860 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4861 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4863 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4864 the beginning of the prefix.
4866 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4867 It is assumed that if we have a memdisk, grub-mkimage has set
4868 grub_prefix to include the "(memdisk)" drive in it.
4870 2008-06-15 Robert Millan <rmh@aybabtu.com>
4872 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4873 Initialize keyboard controller after registering the terminal, so that
4874 grub_printf() can be called from grub_keyboard_controller_init().
4876 2008-06-15 Robert Millan <rmh@aybabtu.com>
4878 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4879 extent-btree which is written as big endian on disk.
4880 Reported by Alain Greppin <al@chilibi.org>.
4882 2008-06-14 Robert Millan <rmh@aybabtu.com>
4884 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4885 * util/i386/pc/grub-install.in (modules): Likewise.
4887 2008-06-13 Pavel Roskin <proski@gnu.org>
4889 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4891 2008-06-13 Bean <bean123ch@gmail.com>
4893 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4895 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4897 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4898 to indicate sparse block.
4900 2008-06-12 Pavel Roskin <proski@gnu.org>
4902 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4903 number, grub_fshelp_read() does it for us.
4905 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4906 linear disk read with journal translation.
4907 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4908 * include/grub/fshelp.h: Declare grub_fshelp_read().
4910 2008-06-09 Pavel Roskin <proski@gnu.org>
4912 * fs/minix.c (grub_minix_mount): Handle error reading
4915 2008-06-08 Robert Millan <rmh@aybabtu.com>
4917 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4918 don't append the RAID prefix afterwards.
4919 Reported by Clint Adams.
4921 2008-06-08 Robert Millan <rmh@aybabtu.com>
4923 Based on description from Pavel:
4924 * kern/disk.c (grub_disk_check_range): Rename to ...
4925 (grub_disk_adjust_range): ... this. Add a comment explaining the
4926 tasks performed by this function.
4928 2008-06-08 Robert Millan <rmh@aybabtu.com>
4930 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4931 `num_serial' (for consistency with other variables).
4932 (struct grub_ntfs_data): Add `uuid' member.
4933 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4934 (grub_ntfs_uuid): New function.
4935 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4937 2008-06-07 Pavel Roskin <proski@gnu.org>
4939 * util/biosdisk.c (open_device): Revert last change to the
4940 function, it broke installation. The sector needs to be
4941 different dependent on which device is opened.
4943 2008-06-06 Robert Millan <rmh@aybabtu.com>
4945 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4946 rest of GRUB, and breakage doesn't happen if its value were modified.
4948 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4949 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4950 a constant (same value).
4951 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4952 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4954 2008-06-06 Robert Millan <rmh@aybabtu.com>
4956 * util/biosdisk.c (open_device): Do not modify sector offset when
4957 accessing a partition. kern/disk.c already handles this for us.
4959 2008-06-06 Robert Millan <rmh@aybabtu.com>
4961 * util/grub-emu.c (grub_machine_init): Move code in this function from
4963 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4964 segfault in case grub_printf() is called).
4966 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4967 grub_probe. Update all users not to explicitly add it again.
4968 (grub_device): New variable; contains corresponding device for grubdir.
4969 (fs_module, partmap_module, devabstraction_module): Pass
4970 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4973 2008-06-05 Robert Millan <rmh@aybabtu.com>
4975 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4976 is found, print it (same layout as with labels).
4978 2008-06-04 Robert Millan <rmh@aybabtu.com>
4980 * util/biosdisk.c (get_drive): Rename to ...
4981 (find_grub_drive): ... this. Update all users.
4983 (get_os_disk): Rename to ...
4984 (convert_system_partition_to_system_disk): ... this. Update all users.
4986 (find_drive): Rename to ...
4987 (find_system_device): ... this. Update all users.
4989 2008-06-04 Robert Millan <rmh@aybabtu.com>
4991 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4992 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4993 (make_device_map): Likewise.
4995 2008-06-01 Robert Millan <rmh@aybabtu.com>
4997 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4998 before dereferencing it.
5000 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5001 union with fat12/fat16-specific ones. Add some new fields, including
5002 `num_serial' for both versions.
5003 (struct grub_fat_data): Add `uuid' member.
5004 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5005 names. Initialize `data->uuid' using `num_serial'.
5006 (grub_fat_uuid): New function.
5007 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5009 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5010 (grub_reiserfs_uuid): New function.
5011 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5014 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5015 (grub_xfs_uuid): New function.
5016 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5018 2008-06-01 Robert Millan <rmh@aybabtu.com>
5020 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5021 code that is backward compatible with pre-uuid search command.
5023 2008-05-31 Robert Millan <rmh@aybabtu.com>
5025 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5026 floppies after everything else, to ensure floppy drive isn't accessed
5027 unnecessarily (patch from Bean).
5029 2008-05-31 Robert Millan <rmh@aybabtu.com>
5031 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5032 not print device names when we were asked to set a variable.
5034 2008-05-31 Robert Millan <rmh@aybabtu.com>
5036 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5037 using "cursor-on" and "cursor-off" commands (understood at least by
5038 the Open Firmware flavour on OLPC).
5040 2008-05-31 Michael Gorven <michael@gorven.za.net>
5042 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5043 on and off sequences.
5045 2008-05-31 Robert Millan <rmh@aybabtu.com>
5047 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5048 * util/update-grub.in: Likewise.
5050 2008-05-30 Pavel Roskin <proski@gnu.org>
5052 * util/biosdisk.c (linux_find_partition): Simplify logic and
5053 make the code more universal. Keep special processing for
5054 devfs, but use a simple rule for all other devices. If the
5055 device ends with a number, append 'p' and the partition number.
5056 Otherwise, append only the partition number.
5058 2008-05-30 Robert Millan <rmh@aybabtu.com>
5060 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5061 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5062 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5063 the `root' parameter to Linux.
5065 2008-05-30 Robert Millan <rmh@aybabtu.com>
5067 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5068 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5069 --fs_uuid with --fs-uuid.
5070 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5071 all filesystems support them).
5073 2008-05-30 Robert Millan <rmh@aybabtu.com>
5075 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
5076 grub_printf() flags, since we're printing in units of 2 bytes.
5078 2008-05-30 Robert Millan <rmh@aybabtu.com>
5080 * util/grub.d/00_header.in: Remove obsolete comment referencing
5081 convert_system_path_to_grub_path().
5082 * util/update-grub.in: Likewise.
5083 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5084 (convert_system_path_to_grub_path): Add a warning message explaining
5085 that this function is deprecated. Rely on is_path_readable_by_grub()
5086 for the readability checks.
5087 (font_path): Use is_path_readable_by_grub() for the readability
5088 check rather than convert_system_path_to_grub_path().
5090 2008-05-30 Robert Millan <rmh@aybabtu.com>
5092 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5093 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5094 converting it first.
5095 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5096 grub.cfg for access to font file, and afterwards call it again to set
5099 2008-05-30 Robert Millan <rmh@aybabtu.com>
5101 * commands/search.c (options): Add --fs_uuid option.
5102 (search_fs_uuid): New function.
5103 (grub_cmd_search): Fix --set argument passing.
5104 Use search_fs_uuid() when requested via --fs_uuid.
5105 (grub_search_init): Update help message.
5106 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5107 and redeclare it as an array of 16-bit words.
5108 (grub_ext2_uuid): New function.
5109 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5110 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5111 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5112 (GRUB_DEVICE_BOOT_UUID): New variables.
5113 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5114 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5116 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
5117 just assume `root' variable has the right value.
5118 * util/grub.d/10_linux.in: Likewise.
5119 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5121 (main): Recognise `-t fs_uuid' argument.
5123 2008-05-30 Robert Millan <rmh@aybabtu.com>
5125 * util/biosdisk.c (map): Redefine structure to hold information
5126 about GRUB drive name.
5127 (get_drive): Reimplement without assuming (and verifying) BIOS-like
5129 (call_hook): Remove.
5130 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5131 member. Assume drive has partitions.
5132 (grub_util_biosdisk_open): Access device names via `.device' struct
5134 (open_device): Likewise.
5135 (find_drive): Likewise.
5136 (read_device_map): Adjust map[] usage to match the new struct
5137 definition. Don't check for duplicates (still possible, but not cheap
5139 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5140 (make_device_name): Remove assumption of BIOS-like drive names.
5142 2008-05-30 Pavel Roskin <proski@gnu.org>
5144 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5145 compiling execute.c doesn't need grub_script.tab.h anymore.
5146 (normal/command.c_DEPENDENCIES): Likewise.
5147 (normal/function.c_DEPENDENCIES): Likewise.
5148 * conf/i386-ieee1275.rmk: Likewise.
5149 * conf/i386-linuxbios.rmk: Likewise.
5150 * conf/i386-pc.rmk: Likewise.
5151 * conf/powerpc-ieee1275.rmk: Likewise.
5152 * conf/sparc64-ieee1275.rmk: Likewise.
5154 2008-05-29 Pavel Roskin <proski@gnu.org>
5156 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5157 when scanning metadata for volume group name.
5159 * include/grub/script.h: Don't include grub_script.tab.h. It's
5160 a generated file, which may only be included from the files with
5161 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
5162 use union YYSTYPE, as the later allows forward declaration.
5163 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5165 2008-05-29 Robert Millan <rmh@aybabtu.com>
5167 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5168 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5169 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5170 (grub_console_checkkey): Add grub_dprintf() call to report unknown
5173 2008-05-29 Robert Millan <rmh@aybabtu.com>
5175 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5176 control key combinations.
5178 2008-05-29 Robert Millan <rmh@aybabtu.com>
5180 * util/powerpc/ieee1275/grub-install.in: Move from here ...
5181 * util/ieee1275/grub-install.in: ... to here.
5182 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5183 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5184 (grub_install_SOURCES): Likewise.
5186 2008-05-29 Robert Millan <rmh@aybabtu.com>
5188 * fs/affs.c: Update copyright year.
5189 * fs/ext2.c: Likewise.
5190 * fs/fshelp.c: Likewise.
5191 * fs/hfsplus.c: Likewise.
5192 * fs/ntfs.c: Likewise.
5193 * fs/xfs.c: Likewise.
5194 * include/grub/fshelp.h: Likewise.
5195 * util/grub-mkdevicemap.c: Likewise.
5197 2008-05-28 Robert Millan <rmh@aybabtu.com>
5199 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5200 might need to be fatfs to support some firmware implementations
5203 2008-05-28 Robert Millan <rmh@aybabtu.com>
5205 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5207 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5208 (make_device_map): Likewise.
5210 2008-05-20 Bean <bean123ch@gmail.com>
5212 * fs/fshelp.c (grub_fshelp_map_block): New function.
5213 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5214 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5216 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5217 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5218 (grub_fshelp_journal): New structure.
5219 (grub_fshelp_map_block): New function prototype.
5220 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5221 (grub_fshelp_map_block): Likewise.
5223 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5224 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5225 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5226 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5227 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5228 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5229 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5230 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5231 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5232 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5233 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5234 (grub_ext2_sblock): New members for journal support.
5235 (grub_ext3_journal_header): New structure.
5236 (grub_ext3_journal_revoke_header): Likewise.
5237 (grub_ext3_journal_block_tag): Likewise.
5238 (grub_ext3_journal_sblock): Likewise.
5239 (grub_fshelp_node): New members logfile and journal.
5240 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5241 grub_fshelp_map_block to get real block number.
5242 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5244 (grub_ext2_read_inode): Likewise.
5245 (grub_ext3_get_journal): New function.
5246 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5247 (grub_ext2_close): Release memory used by journal.
5249 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5250 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5251 (grub_reiserfs_transaction_header): Renamed to
5252 grub_reiserfs_description_block, replace field data with real_blocks.
5253 (grub_reiserfs_commit_block): New structure.
5254 (grub_reiserfs_data): New member journal.
5255 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5257 (grub_reiserfs_read_symlink): Likewise.
5258 (grub_reiserfs_iterate_dir): Likewise.
5259 (grub_reiserfs_open): Likewise.
5260 (grub_reiserfs_read): Likewise.
5261 (grub_reiserfs_get_journal): New function.
5262 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5263 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5264 using grub_reiserfs_get_journal.
5265 (grub_reiserfs_close): Release memory used by journal.
5267 * fs/affs.c (grub_affs_read_block): Change block type to
5268 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5270 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5272 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5274 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5276 * fs/udf.c (grub_udf_read_block): Change block type to
5277 grub_disk_addr_t. Use type cast to avoid warning.
5279 * fs/xfs.c (grub_xfs_read_block): Likewise.
5281 2008-05-16 Christian Franke <franke@computer.org>
5283 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5284 to ensure that break with ESC will always work.
5285 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5286 Remove ESC from keyboard queue.
5288 2008-05-16 Christian Franke <franke@computer.org>
5290 * util/biosdisk.c: [__CYGWIN__] Add includes.
5291 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5292 (get_os_disk): Move variable declarations to OS specific
5293 parts to avoid warning.
5294 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5295 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5296 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5298 * util/getroot.c: [__CYGWIN__] Add includes.
5299 (strip_extra_slashes): Fix "/" case.
5300 [__CYGWIN__] (get_win32_path): New function.
5301 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5302 [__CYGWIN__] (find_root_device): Disable.
5303 [__CYGWIN__] (get_bootsec_serial): New function.
5304 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5305 [__linux__] (grub_guess_root_device): Add early returns to simplify
5307 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5308 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5309 check for Linux only.
5311 2008-05-15 Bean <bean123ch@gmail.com>
5313 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5314 keyboard hang problem in apple's intel mac.
5316 2008-05-09 Robert Millan <rmh@aybabtu.com>
5318 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5320 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5321 (make_device_map): Likewise.
5322 Reported by Aurelien Jarno <aurel32@debian.org>
5324 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
5326 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5327 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5328 (make_device_map): Output entries for xvd type disks.
5330 2008-05-07 Robert Millan <rmh@aybabtu.com>
5332 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5334 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5335 (make_device_map): Likewise.
5336 Reported by Roland Dreier <rdreier@cisco.com>
5338 2008-05-07 Robert Millan <rmh@aybabtu.com>
5340 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5341 grub_strstr() call. Correct a few mistakes in failure path handling.
5343 2008-05-06 Robert Millan <rmh@aybabtu.com>
5345 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5346 Do not print a trailing slash (therefore, the root directory is an
5348 (convert_system_path_to_grub_path): Do not remove trailing slash
5349 from make_system_path_relative_to_its_root() output.
5351 * util/i386/pc/grub-install.in: Add trailing slash to output from
5352 make_system_path_relative_to_its_root().
5354 2008-05-06 Robert Millan <rmh@aybabtu.com>
5356 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5357 ensures that output lines aren't intermangled with those sent to
5358 stderr (via grub_util_info()).
5359 * util/grub-probe.c (grub_refresh): Likewise.
5360 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5362 2008-05-05 Christian Franke <franke@computer.org>
5364 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5365 Add Cygwin device names.
5366 (get_ide_disk_name) [__CYGWIN__]: Likewise.
5367 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5368 (check_device): Return error instead of success on empty name.
5369 (make_device_map): Move label inside linux specific code to
5370 prevent compiler warning.
5372 2008-04-30 Robert Millan <rmh@aybabtu.com>
5374 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5375 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5377 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5379 2008-04-29 Robert Millan <rmh@aybabtu.com>
5381 * docs/grub.cfg: New file (example GRUB configuration).
5383 2008-04-26 Robert Millan <rmh@aybabtu.com>
5385 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
5386 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5387 and `disk/ieee1275/nand.c'.
5389 2008-04-25 Bean <bean123ch@gmail.com>
5391 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5394 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5395 change the buffer size to 4096 for cdrom device.
5397 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
5399 (_linux_mod_SOURCES): New variable.
5400 (_linux_mod_CFLAGS): Likewise.
5401 (_linux_mod_LDFLAGS): Likewise.
5402 (linux_mod_SOURCES): Likewise.
5403 (linux_mod_CFLAGS): Likewise.
5404 (linux_mod_LDFLAGS): Likewise.
5405 (nand_mod_SOURCES): Likewise.
5406 (nand_mod_CFLAGS): Likewise.
5407 (nand_mod_LDFLAGS): Likewise.
5409 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
5410 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
5411 type property. (nand device in olpc don't have this property)
5413 * include/grub/disk.h (grub_disk_dev_id): New macro
5414 GRUB_DISK_DEVICE_NAND_ID.
5416 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
5418 (grub_rescue_cmd_initrd): Likewise.
5420 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
5421 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
5422 ofw_cif_handler and ofw_idt, adjust padding number.
5424 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
5425 GRUB_MACHINE_IEEE1275 is defined.
5427 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
5428 Use NESTED_FUNC_ATTR attribute on the hook parameter.
5430 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
5431 on nested function heap_init.
5432 (grub_upper_mem): New variable for i386-ieee1275.
5433 (grub_get_extended_memory): New function for i386-ieee1275.
5434 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
5436 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
5437 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
5440 * loader/i386/ieee1275/linux.c: New file.
5442 * loader/i386/ieee1275/linux_normal.c: New file.
5444 * disk/ieee1275/nand.c: New file.
5446 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
5448 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
5450 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
5452 2008-04-18 Robert Millan <rmh@aybabtu.com>
5454 Restructures early code path on ieee1275 to unify grub_main() as
5455 the first C function that is executed in every platform.
5457 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5458 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5460 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5461 * kern/ieee1275/cmain.c (cmain): Rename to ...
5462 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5463 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5466 2008-04-18 Robert Millan <rmh@aybabtu.com>
5468 * util/update-grub.in: Fix syntax error when setting
5469 `GRUB_PRELOAD_MODULES'.
5470 Reported by Stephane Chazelas <stephane@artesyncp.com>
5472 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
5474 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5475 section into account, newer toolchains generate unique build ids
5476 * configure.ac: remove the test for --build-id=none acceptance,
5477 we want build ids to be preserved
5478 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5479 far from other sections don't cause the raw binary images grow
5482 2008-04-15 Robert Millan <rmh@aybabtu.com>
5484 * disk/lvm.c: Update copyright year.
5485 * kern/misc.c: Likewise.
5487 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5489 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5490 there is no memory left for physical volume name.
5492 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5494 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5495 volume name mapping to support bigger than 9 character names properly.
5497 2008-04-13 Robert Millan <rmh@aybabtu.com>
5499 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5500 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5502 2008-04-13 Christian Franke <franke@computer.org>
5504 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5505 to create a floppy emulation boot CD when non emulation mode
5507 Enable Joliet CD filesystem extension.
5509 2008-04-13 Robert Millan <rmh@aybabtu.com>
5511 * kern/misc.c (grub_strncat): Fix off-by-one error.
5512 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5514 * kern/env.c (grub_env_context_close): Clear current context, not
5516 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5518 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5520 2008-04-13 Robert Millan <rmh@aybabtu.com>
5522 Improve robustness when handling LVM.
5524 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5525 (and leave `*p' unmodified).
5526 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5528 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5529 iterating through it.
5530 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5532 (grub_lvm_scan_device): Check the return value (and fail gracefully
5533 when due) on each grub_lvm_getvalue() or grub_strstr() call.
5534 Don't assume `vg->pvs != NULL' when iterating through it.
5536 2008-04-13 Robert Millan <rmh@aybabtu.com>
5538 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5539 * genmk.rb (partmap): New variable.
5540 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5541 (#{partmap}): New target rule.
5542 * genpartmaplist.sh: New file.
5543 * Makefile.in (pkglib_DATA): Add partmap.lst.
5544 (partmap.lst): New target rule.
5545 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5546 modules (including all partition maps), instead of preloading them.
5548 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
5550 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5551 `linux-boot-prober' (if installed) to detect other operating
5552 systems which are installed on the computer and add them to
5554 * conf/common.rmk: Build and install 30_os-prober.
5556 2008-04-12 Robert Millan <rmh@aybabtu.com>
5558 * kern/powerpc/ieee1275/init.c: Move from here ...
5559 * kern/ieee1275/init.c: ... to here. Update all users.
5561 * kern/powerpc/ieee1275/cmain.c: Move from here ...
5562 * kern/ieee1275/cmain.c: ... to here. Update all users.
5564 * kern/powerpc/ieee1275/openfw.c: Move from here ...
5565 * kern/ieee1275/openfw.c: ... to here. Update all users.
5567 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5568 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
5570 2008-04-10 Pavel Roskin <proski@gnu.org>
5572 * configure.ac: Always use "_cv_" in cache variables for
5573 compatibility with Autoconf 2.62.
5575 2008-04-07 Robert Millan <rmh@aybabtu.com>
5577 Revert grub/machine/init.h addition by Pavel (since it breaks on
5578 i386-ieee1275 and others):
5579 * util/i386/pc/misc.c: Remove grub/machine/init.h.
5580 * util/powerpc/ieee1275/misc.c: Likewise.
5582 2008-04-07 Robert Millan <rmh@aybabtu.com>
5584 * util/grub-probe.c (probe): Improve error message.
5586 2008-04-07 Robert Millan <rmh@aybabtu.com>
5588 * util/biosdisk.c (read_device_map): Skip devices that don't exist
5589 (this prevents the presence of a bogus entry from ruining the whole
5592 2008-04-06 Pavel Roskin <proski@gnu.org>
5594 * util/biosdisk.c: Include grub/util/biosdisk.h.
5595 * util/grub-fstest.c (execute_command): Make static.
5596 * util/grub-mkdevicemap.c (check_device): Likewise.
5597 * util/i386/pc/misc.c: Include grub/machine/init.h.
5598 * util/powerpc/ieee1275/misc.c: Likewise.
5599 * util/lvm.c: Include grub/util/lvm.h.
5600 * util/misc.c: Include grub/kernel.h, grub/misc.h and
5602 * util/raid.c: Include grub/util/raid.h.
5603 (grub_util_getdiskname): Make static.
5605 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5606 grub_hostfs_fini(), as they are called from grub_init_all() and
5607 grub_fini_all() respectively. This fixes an infinite loop in
5608 grub-fstest due to double registration of hostfs.
5609 Reported by Christian Franke <Christian.Franke@t-online.de>
5611 2008-04-05 Pavel Roskin <proski@gnu.org>
5613 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5614 all 8 functions. Otherwise, probe function 0 only.
5616 2008-04-04 Pavel Roskin <proski@gnu.org>
5618 * commands/lspci.c (grub_lspci_iter): Print the bus number
5621 * commands/lspci.c (grub_pci_classes): Fix typos.
5622 (grub_lspci_iter): Don't print func twice. Print vendor ID
5623 before device ID, as it's normally done.
5625 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5626 Fix signedness warnings.
5627 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5629 * util/ieee1275/get_disk_name.c: Include config.h so that
5630 _GNU_SOURCE is defined and getline() is declared. Mark an
5631 unused argument as such. Fix a signedness warning.
5633 2008-04-02 Pavel Roskin <proski@gnu.org>
5635 * genkernsyms.sh.in: Use more robust assignments for CC and
5636 srcdir. Quote srcdir.
5637 * gensymlist.sh.in: Likewise. Assert at the compile time that
5638 the symbol table is not empty.
5640 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5641 * fs/cpio.c (grub_cpio_read): Likewise.
5643 2008-04-01 Pavel Roskin <proski@gnu.org>
5645 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5646 * disk/host.c (grub_host_open): Likewise.
5647 * disk/loopback.c (grub_loopback_open): Likewise.
5648 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5649 disk->id as in disk/host.c, not a multi-character constant.
5651 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5652 later is obsolete, potentially dangerous and sets a bad example.
5653 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5654 * util/misc.c (grub_util_get_image_size): Likewise.
5656 * disk/loopback.c (options): Improve help for "--partitions".
5658 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5659 options to align them with the short options, e.g. "echo -e".
5661 2008-03-31 Bean <bean123ch@gmail.com>
5663 * video/reader/png.c (grub_png_data): New member is_16bit and
5665 (grub_png_decode_image_header): Detect 16 bit png image.
5666 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5667 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5668 (grub_video_reader_png): Release memory occupied by image_data.
5670 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5672 (grub_nfs_mount): Skip the test for sector per cluster.
5674 * include/grub/ntfs.h (MAX_SPC): Removed.
5676 2008-03-31 Bean <bean123ch@gmail.com>
5678 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5679 (grub_probe_SOURCES): Add fs/afs.c.
5680 (grub_fstest_SOURCES): Likewise.
5681 (afs_mod_SOURCES): New variable.
5682 (afs_mod_CFLAGS): Likewise.
5683 (afs_mod_LDFLAGS): Likewise.
5685 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5686 (grub_emu_SOURCES): Likewise.
5688 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5690 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5692 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5694 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5696 * fs/afs.c: New file.
5698 2008-03-30 Pavel Roskin <proski@gnu.org>
5700 * disk/host.c: Include grub/misc.h to fix a warning.
5701 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5702 warnings about implicit declarations.
5704 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5706 * include/grub/i386/loader.h: Change declaration of
5707 grub_linux_boot() to match what grub_loader_set() expects.
5708 * util/getroot.c (grub_guess_root_device): Return const char* to
5710 * util/grub-probe.c (probe): Fix a warning about uninitialized
5711 abstraction_name variable.
5712 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5713 second argument as unused to fix a warning.
5715 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5716 missing grub_error() call.
5718 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5719 2.60 and newer uses it to define datadir.
5721 * commands/sleep.c: Fix warning about implicit declaration.
5722 * disk/memdisk.c: Likewise.
5723 * loader/aout.c: Likewise.
5724 * loader/i386/bsd_normal.c: Likewise.
5725 * util/grub-probe.c: Likewise.
5727 * commands/i386/cpuid.c (has_longmode): Make static.
5728 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5729 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5731 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5732 GDT. This is more robust, as %ds can change.
5733 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5734 calling real_to_prot().
5735 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5737 2008-03-28 Pavel Roskin <proski@gnu.org>
5739 * kern/i386/pc/startup.S: Assert that uncompressed functions
5740 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5741 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5742 code, as they push parts of the code (error handlers) beyond
5743 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5744 code as correctness and size.
5746 2008-03-28 Pavel Roskin <proski@gnu.org>
5748 * kern/i386/pc/startup.S
5749 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5750 data block address to the real mode, keep offset minimal. This
5751 works around a bug in AWARD BIOS on old Athlon systems, which
5752 makes CD detection hang.
5754 2008-03-26 Pavel Roskin <proski@gnu.org>
5756 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5758 * include/grub/normal.h: Add grub_parse_color_name_pair()
5761 2008-03-24 Bean <bean123ch@gmail.com>
5763 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5764 (cd_count): Removed.
5765 (cd_drive): New variable.
5766 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5767 (grub_biosdisk_call_hook): Likewise.
5768 (grub_biosdisk_iterate): Change cdrom detection method.
5769 (grub_biosdisk_open): Replace cd_start with cd_drive.
5770 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5771 detect cdrom device.
5773 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5775 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5776 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5777 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5778 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5779 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5780 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5781 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5782 (grub_biosdisk_cdrp): New structure.
5783 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5785 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5787 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5790 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5793 2008-03-20 Robert Millan <rmh@aybabtu.com>
5795 Remove 2 TiB limit in ata.mod.
5796 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5797 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5798 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5799 grub_uint64_t instead of grub_uint32_t.
5801 2008-03-05 Bean <bean123ch@gmail.com>
5803 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5804 (grub_multiboot): Set boot device.
5806 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5808 2008-03-02 Bean <bean123ch@gmail.com>
5810 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5813 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5815 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5818 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5821 * docs/fdl.texi: New file.
5823 * docs/mdate-sh: New file. Copied from gnulib.
5824 * docs/texinfo.tex: Likewise.
5826 * config.guess: Updated from gnulib.
5827 * install-sh: Likewise.
5829 2008-02-28 Robert Millan <rmh@aybabtu.com>
5831 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5832 (aout_mod_SOURCES): New variable.
5833 (aout_mod_CFLAGS): Likewise.
5834 (aout_mod_LDFLAGS): Likewise.
5836 * conf/i386-ieee1275.rmk: Likewise.
5838 2008-02-28 Robert Millan <rmh@aybabtu.com>
5840 * util/update-grub.in: Reorganise terminal validity check. Accept
5841 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5842 Based on suggestion by Franklin PIAT.
5844 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5846 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5848 * util/getroot.c (grub_util_check_block_device): New function that
5849 returns the given argument if it is a block device and returns NULL else.
5850 * util/grub-probe.c (argument_is_device): New variable.
5851 (probe): Promote device_name from a variable to an argument. Receive
5852 device_name from grub_util_check_block_device() if path is NULL and from
5853 grub_guess_root_device() else. Do not free() device_name anymore.
5854 (options): Introduce new parameter '-d, --device'.
5855 (main): Add description of the new parameter to the help screen.
5856 Rename path variable to argument. Set argument_is_device if the '-d'
5857 option is given. Pass argument to probe() depending on
5860 2008-02-24 Bean <bean123ch@gmail.com>
5862 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5863 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5864 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5865 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5866 (GRUB_ISO9660_VOLDESC_END): Likewise.
5867 (grub_iso9660_primary_voldesc): New member escape.
5868 (grub_iso9660_data): New member joliet.
5869 (grub_iso9660_convert_string): New function.
5870 (grub_iso9660_mount): Detect joliet extension.
5871 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5872 (grub_iso9660_iso9660_label): Likewise.
5874 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5875 (grub_setup_SOURCES): Add fs/udf.c.
5876 (grub_fstest_SOURCES): Likewise.
5877 (udf_mod_SOURCES): New variable.
5878 (udf_mod_CFLAGS): Likewise.
5879 (udf_mod_LDFLAGS): Likewise.
5881 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5882 (grub_emu_SOURCES): Likewise.
5884 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5886 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5888 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5890 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5892 * fs/udf.c: New file.
5894 2008-02-24 Robert Millan <rmh@aybabtu.com>
5896 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5897 (normal/lexer.c_DEPENDENCIES): New variables.
5898 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5899 (normal/lexer.c_DEPENDENCIES): Likewise.
5900 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5901 (normal/lexer.c_DEPENDENCIES): Likewise.
5902 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5903 (normal/lexer.c_DEPENDENCIES): Likewise.
5904 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5905 (normal/lexer.c_DEPENDENCIES): Likewise.
5906 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5907 (normal/lexer.c_DEPENDENCIES): Likewise.
5909 2008-02-23 Robert Millan <rmh@aybabtu.com>
5911 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5912 since they were intended to be in hex. This didn't break previously
5913 because of a bug in gpt_partition_map_iterate() (see below).
5915 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5916 when checking the validity of GPT header.
5917 Remove `partno', since it always provides the same information as `i'.
5919 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5921 * include/grub/efi/time.h: Fix a wrong comment.
5923 2008-02-19 Pavel Roskin <proski@gnu.org>
5925 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5928 2008-02-19 Bean <bean123ch@gmail.com>
5930 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5931 (aout_mod_SOURCES): New variable.
5932 (aout_mod_CFLAGS): Likewise.
5933 (aout_mod_LDFLAGS): Likewise.
5934 (_bsd_mod_SOURCES): New variable.
5935 (_bsd_mod_CFLAGS): Likewise.
5936 (_bsd_mod_LDFLAGS): Likewise.
5937 (bsd_mod_SOURCES): New variable.
5938 (bsd_mod_CFLAGS): Likewise.
5939 (bsd_mod_LDFLAGS): Likewise.
5941 * include/grub/aout.h: New file.
5943 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5945 * include/grub/i386/bsd.h: New file.
5947 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5950 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5951 function is called, so that it's possible to change it inside the hook.
5952 (grub_elf64_load): Likewise.
5953 (grub_elf_file): Don't close the file if elf header is not found.
5954 (grub_elf_close): Close the file if grub_elf_file fails (The new
5955 grub_elf_file won't close it).
5956 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5957 (grub_elf64_size): Likewise.
5959 * kern/i386/loader.S (grub_unix_real_boot): New function.
5961 * loader/aout.c: New file.
5963 * loader/i386/bsd.c: New file.
5965 * loader/i386/bsd_normal.c: New file.
5967 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5969 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
5970 can test other formats.
5972 2008-02-19 Robert Millan <rmh@aybabtu.com>
5974 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5975 (grub_gpt_partition_type_empty): Redefine with macro from
5976 `<grub/gpt_partition.h>'.
5977 (gpt_partition_map_iterate): Adjust partition type comparison.
5979 Export `entry' as partmap-specific `part.data' struct.
5980 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5982 * include/grub/gpt_partition.h (grub_gpt_header)
5983 (grub_gpt_partentry): ... to here (new file).
5985 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5987 (grub_gpt_partition_type_bios_boot): New const variable, defined
5988 with macro from `<grub/gpt_partition.h>'.
5990 (setup): Replace `first_start' with `embed_region', which keeps
5991 track of the embed region (and is partmap-agnostic).
5993 Replace find_first_partition_start() with find_usable_region(),
5994 which finds a usable region for embedding using partmap-specific
5995 knowledge (supports PC/MSDOS and GPT).
5997 Fix all assumptions that the embed region start at sector 1, using
5998 `embed_region.start' from now on. Similarly, use `embed_region.end'
5999 rather than `first_start' to calculate available size.
6001 In grub_util_info() message, replace "into after the MBR" with an
6002 indication of the specific sector our embed region starts at.
6004 2008-02-19 Robert Millan <rmh@aybabtu.com>
6006 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6007 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6008 `commands/reboot.c'.
6009 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6010 (halt_mod_SOURCES): Likewise.
6011 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6012 (halt_mod_SOURCES): Likewise.
6014 2008-02-17 Christian Franke <franke@computer.org>
6016 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6018 2008-02-17 Robert Millan <rmh@aybabtu.com>
6020 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6021 set `first_start' to 0 for non-PC/MSDOS partition maps.
6023 2008-02-16 Robert Millan <rmh@aybabtu.com>
6025 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6026 do not assume partition map is PC/MSDOS before performing checks that
6027 are specific to that layout.
6029 2008-02-13 Robert Millan <rmh@aybabtu.com>
6031 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6032 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6033 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6035 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6037 * configure.ac: Only a cosmetic change on the handling of
6038 -fno-stack-protector.
6040 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
6042 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6043 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6045 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6046 (halt_mod_SOURCES): New variable.
6047 (halt_mod_CFLAGS): Likewise.
6048 (halt_mod_LDFLAGS): Likewise.
6049 (reboot_mod_SOURCES): Likewise.
6050 (reboot_mod_CFLAGS): Likewise.
6051 (reboot_mod_LDFLAGS): Likewise.
6053 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6054 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6056 (halt_mod_SOURCES): Likewise.
6057 (reboot_mod_SOURCES): Likewise.
6059 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6060 commands/i386/pc/reboot.c by commands/reboot.c.
6061 (reboot_mod_SOURCES): Likewise.
6063 * commands/i386/pc/reboot.c: merge this file ...
6065 * commands/ieee1275/reboot.c: ... and this file ...
6067 * commands/reboot.c: ... to this file.
6068 Add some precompiler directive to include the correct header for
6071 * commands/ieee1275/halt.c: move this file ...
6073 * commands/halt.c: ... to here.
6074 Add some precompiler directive to include the correct header for
6077 * include/grub/efi/efi.h (grub_reboot): New function declaration.
6078 (grub_halt): Likewise.
6080 * kern/efi/efi.c (grub_reboot): New function.
6081 (grub_halt): Likewise.
6083 2008-02-12 Robert Millan <rmh@aybabtu.com>
6085 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6086 /dev (like it is done for /dev/mapper). This doesn't provide support
6087 for EVMS, but at least it is now easy to identify the problem when it
6090 2008-02-11 Robert Millan <rmh@aybabtu.com>
6092 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6093 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6094 comparing it with -1, not 0.
6096 2008-02-10 Robert Millan <rmh@aybabtu.com>
6098 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6100 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6101 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6103 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6104 `disk/lvm.c' to the end of the list.
6105 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6106 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6108 2008-02-10 Robert Millan <rmh@aybabtu.com>
6110 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
6111 grub_print_error() instead. This will let user know why we're entering
6113 Based on suggestions from Sam Morris.
6115 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
6117 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6118 on remaining N args, instead of "--" arg N times.
6120 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
6122 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6123 (fill_with_default_glyph): Changed to use unknown_glyph for fill
6124 pattern for unknown glyphs.
6126 2008-02-09 Robert Millan <rmh@aybabtu.com>
6128 * configure.ac: Probe for `help2man'.
6129 * Makefile.in (builddir): New variable.
6130 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6131 or otherwise add a few flags/options to it.
6132 (install-local): For every executable utility or script that is
6133 installed, invoke $(HELP2MAN) to install a manpage based on --help
6136 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6137 that it doesn't prevent --help from working in build tree.
6139 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6140 with `bug-grub@gnu.org'.
6141 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6142 * util/update-grub.in (usage): New function.
6143 Implement proper argument check, with support for --help and --version
6144 (as well as existing -y).
6146 2008-02-09 Christian Franke <franke@computer.org>
6148 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6149 avoid overwriting previous output.
6150 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6152 2008-02-09 Robert Millan <rmh@aybabtu.com>
6154 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6157 2008-02-09 Robert Millan <rmh@aybabtu.com>
6159 * commands/sleep.c: New file.
6160 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6161 (sleep_mod_SOURCES): New variable.
6162 (sleep_mod_CFLAGS): Likewise.
6163 (sleep_mod_LDFLAGS): Likewise.
6165 2008-02-09 Robert Millan <rmh@aybabtu.com>
6167 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6168 situations in which we can deduce the RAID size and the superblock
6171 2008-02-09 Robert Millan <rmh@aybabtu.com>
6173 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
6174 and return a grub_diskmemberlist_t composed of LVM physical volumes.
6175 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6177 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
6178 and return a grub_diskmemberlist_t composed of physical array members.
6179 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6181 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6183 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6184 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6185 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6187 * util/grub-probe.c (probe): Move partmap probing code from here ...
6188 (probe_partmap): ... to here.
6189 (probe): Use probe_partmap() once for the disk we're probing, and
6190 additionally, when such disk contains a memberlist() struct member,
6191 once for each disk that is contained in the structure returned by
6194 2008-02-09 Robert Millan <rmh@aybabtu.com>
6196 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6197 environment variable to 'all' in order to obtain debug output from
6199 * util/i386/pc/grub-setup.c (main): Likewise.
6201 2008-02-08 Robert Millan <rmh@aybabtu.com>
6203 * disk/raid.c (grub_raid_scan_device): Check for
6204 `array->device[sb.this_disk.number]' rather than for
6205 `array->device[sb.this_disk.number]->name', since the latter is not
6206 guaranteed to be accessible.
6208 2008-02-08 Robert Millan <rmh@aybabtu.com>
6210 * disk/raid.c: Update copyright.
6211 * fs/cpio.c: Likewise.
6212 * include/grub/raid.h: Likewise.
6213 * loader/i386/pc/multiboot.c: Likewise.
6214 * util/hostfs.c: Likewise.
6216 2008-02-08 Robert Millan <rmh@aybabtu.com>
6218 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6219 to a grub_disk_t array.
6220 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6222 (grub_raid_scan_device): Replace `device[x].name' accesses with
6223 `device[x]->name'. Simplify initialization of `array->device[x]'.
6225 2008-02-08 Robert Millan <rmh@aybabtu.com>
6227 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6228 grub_dprintf() calls.
6229 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6232 2008-02-07 Christian Franke <franke@computer.org>
6234 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6235 instead of fseek and ftell to support large files.
6236 (grub_hostfs_read): Likewise.
6238 2008-02-07 Robert Millan <rmh@aybabtu.com>
6240 Patch from Jeroen Dekkers.
6241 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
6242 failure, since successfully reading all array members might not be
6245 2008-02-06 Robert Millan <rmh@aybabtu.com>
6247 * util/grub-probe.c (probe): Simplify partmap probing (with the
6248 assumption that the first word up to the underscore equals to
6251 2008-02-06 Christian Franke <franke@computer.org>
6253 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6254 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6255 last block of a cpio or tar stream.
6256 Check for "TRAILER!!!" instead of any empty data
6257 block to detect last block of a cpio stream.
6258 (grub_cpio_dir): Fix constness of variable np.
6259 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6260 cpio or tar trailer is detected. This fixes a crash
6261 on open of a non existing file.
6263 2008-02-05 Bean <bean123ch@gmail.com>
6265 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6267 (grub_multiboot_load_elf64): Likewise.
6268 (grub_multiboot): Initialize mbi structure.
6270 * util/grub-fstest.c: Don't include unused header file script.h.
6272 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
6274 (grub_fstest_SOURCES): Likewise.
6276 2008-02-05 Robert Millan <rmh@aybabtu.com>
6278 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6279 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6280 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6281 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6283 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6284 (translation_table): Replace hardcoded values with macros
6285 provided by `<grub/term.h>'.
6287 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6288 (keyboard_map): Correct/add a few values, with macros provided
6290 (keyboard_map_shift): Zero values that don't differ from their
6291 `keyboard_map' equivalents.
6292 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6293 Discard the second scan code that is always sent by Caps lock.
6294 Only use `keyboard_map_shift' when it provides a non-zero value,
6295 otherwise fallback to `keyboard_map'.
6297 2008-02-04 Bean <bean123ch@gmail.com>
6299 * Makefile.in (enable_grub_fstest): New variable.
6301 * conf/common.rmk (grub_fstest_init.lst): New rule.
6302 (grub_fstest_init.h): Likewise.
6303 (grub_fstest_init.c): Likewise.
6304 (util/grub-fstest.c_DEPENDENCIES): New variable.
6305 (grub_fstest_SOURCES): Likewise.
6307 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6309 * util/grub-fstest.c: New file.
6311 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6313 Make grub-setup handle a separate root device.
6315 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6316 so that the root device can be compared with the destination
6318 When embedding the core image, if the root and destination devices
6319 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6321 When not embedding, set ROOT_DRIVE to 0xFF.
6323 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6325 Add support for having a grub directory in a different drive. This
6326 is still only the data handling part.
6328 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6329 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6330 (grub_root_drive): New variable.
6332 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6333 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6334 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6337 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6339 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6341 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6343 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6344 is bogus, because PXE booting does not specify any drive
6347 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6348 am not sure if this is really correct.
6350 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6351 is always identical to the boot drive when booting from a CD.
6353 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6355 (root_drive): New variable.
6356 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6357 (setup_sectors): Push %dx right after popping it, because %dh will
6359 (copy_buffer): Restore %dx.
6361 2008-02-03 Robert Millan <rmh@aybabtu.com>
6363 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6364 use `cdboot.img' for cdrom images.
6366 2008-02-03 Robert Millan <rmh@aybabtu.com>
6368 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6369 only setup gfxterm when `font' command has succeeded.
6371 2008-02-03 Robert Millan <rmh@aybabtu.com>
6373 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6374 (grub_rescue_cmd_multiboot_loader)
6375 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6377 2008-02-03 Pavel Roskin <proski@gnu.org>
6379 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
6380 %edx and %esi from stack only after grub_gate_a20() is called.
6381 grub_gate_a20() clobbers %edx.
6383 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6385 * configure.ac (AC_INIT): Bumped to 1.96.
6387 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6388 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6389 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6390 video/readers/png.c.
6392 2008-02-03 Bean <bean123ch@gmail.com>
6394 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6395 (cdboot_img_SOURCES): New variable.
6396 (cdboot_img_ASFLAGS): New variable.
6397 (cdboot_img_LDFLAGS): New variable.
6399 * boot/i386/pc/cdboot.S: New file.
6401 * disk/i386/pc/biosdisk.c (cd_start): New variable.
6402 (cd_count): Likewise.
6403 (grub_biosdisk_get_drive): Add support for cd device.
6404 (grub_biosdisk_call_hook): Likewise.
6405 (grub_biosdisk_iterate): Likewise.
6406 (grub_biosdisk_open): Likewise.
6407 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
6408 (grub_biosdisk_rw): Support reading from cd device.
6409 (GRUB_MOD_INIT): Iterate cd devices.
6411 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
6412 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
6413 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
6415 * kern/i386/pc/init.c (make_install_device): Check for cd device.
6417 2008-02-02 Robert Millan <rmh@aybabtu.com>
6419 * commands/read.c: New file.
6420 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
6421 (read_mod_SOURCES): New variable.
6422 (read_mod_CFLAGS): Likewise.
6423 (read_mod_LDFLAGS): Likewise.
6425 2008-02-02 Robert Millan <rmh@aybabtu.com>
6427 * normal/main.c (grub_normal_execute): Check for `menu->size' when
6428 determining whether menu has to be displayed.
6430 2008-02-02 Marco Gerards <marco@gnu.org>
6432 * bus/pci.c: New file.
6434 * include/grub/pci.h: Likewise.
6436 * include/grub/i386/pc/pci.h: Likewise.
6438 * commands/lspci.c: Likewise.
6440 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
6442 (pci_mod_SOURCES): New variable.
6443 (pci_mod_CFLAGS): Likewise.
6444 (pci_mod_LDFLAGS): Likewise.
6445 (lspci_mod_SOURCES): Likewise.
6446 (lspci_mod_CFLAGS): Likewise.
6447 (lspci_mod_LDFLAGS): Likewise.
6449 2008-02-02 Bean <bean123ch@gmail.com>
6451 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
6452 (grub_ufs_get_file_block): Fix indirect block calculation problem.
6454 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6455 (grub_xfs_btree_node): New structure.
6456 (grub_xfs_btree_root): New structure.
6457 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6458 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6459 (GRUB_XFS_EXTENT_BLOCK): Likewise.
6460 (GRUB_XFS_EXTENT_SIZE): Likewise.
6461 (grub_xfs_read_block): Support btree format type.
6462 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6463 Use directory block as basic unit.
6465 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6467 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6468 __attribute__ ((__regparm__ (1))).
6470 2008-02-01 Robert Millan <rmh@aybabtu.com>
6472 Correct a mistake in previous commit.
6474 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6476 (normal/command.c_DEPENDENCIES): New variable.
6478 2008-02-01 Robert Millan <rmh@aybabtu.com>
6480 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6482 (normal/command.c_DEPENDENCIES): New variable.
6483 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6484 * conf/i386-ieee1275.rmk: Likewise.
6485 * conf/i386-linuxbios.rmk: Likewise.
6486 * conf/i386-pc.rmk: Likewise.
6487 * conf/sparc64-ieee1275.rmk: Likewise.
6488 * conf/powerpc-ieee1275.rmk: Likewise.
6489 (grub_emu_SOURCES): Add `fs/fshelp.c'.
6491 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6493 2008-02-01 Robert Millan <rmh@aybabtu.com>
6495 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6496 call at beginning of function.
6498 2008-01-31 Pavel Roskin <proski@gnu.org>
6500 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6501 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6502 (grub_mkrescue_SOURCES): Likewise.
6503 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6505 2008-01-30 Robert Millan <rmh@aybabtu.com>
6507 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6508 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6509 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6510 (grub_probe_SOURCES): ... to here.
6512 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6513 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6514 * conf/i386-ieee1275.rmk: Likewise.
6515 * conf/i386-linuxbios.rmk: Likewise.
6516 * conf/powerpc-ieee1275.rmk: Likewise.
6518 2008-01-30 Tristan Gingold <gingold@free.fr>
6520 * kern/rescue.c: Silently accept empty lines.
6522 2008-01-29 Bean <bean123ch@gmail.com>
6524 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6525 (real_code_2): Code cleanup and change comment style.
6526 (move_memory): Avoid using 32-bit address mode.
6528 2008-01-29 Bean <bean123ch@gmail.com>
6530 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6531 (png_mod_SOURCES): New variable.
6532 (png_mod_CFLAGS): Likewise.
6533 (png_mod_LDFLAGS): Likewise.
6535 * video/readers/png.c: New file.
6537 2008-01-28 Robert Millan <rmh@aybabtu.com>
6539 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6540 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6541 `ifndef GRUB_MOD_GAP' hack.
6542 * util/elf/grub-mkimage.c (add_segments): Likewise.
6544 2008-01-27 Robert Millan <rmh@aybabtu.com>
6546 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6547 `GRUB_MOD_GAP' for platforms in which it's not defined.
6548 * util/elf/grub-mkimage.c (add_segments): Likewise.
6550 2008-01-27 Robert Millan <rmh@aybabtu.com>
6552 Get grub-emu to build again (including parallel builds).
6554 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6556 (util/grub-emu.c_DEPENDENCIES): ... this, ...
6557 (normal/execute.c_DEPENDENCIES): ... this, ...
6558 (grub-emu_DEPENDENCIES): ... and this.
6560 * conf/i386-efi.rmk: Likewise.
6561 * conf/i386-linuxbios.rmk: Likewise.
6562 * conf/i386-ieee1275.rmk: Likewise.
6563 * conf/powerpc-ieee1275.rmk: Likewise.
6564 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6566 2008-01-27 Robert Millan <rmh@aybabtu.com>
6568 * NEWS: Add a few items.
6570 2008-01-27 Robert Millan <rmh@aybabtu.com>
6572 Fix parallel builds with grub-emu. Based on earlier commit for
6573 grub-probe and grub-setup.
6575 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6576 (util/grub-emu.c_DEPENDENCIES): ... this.
6577 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6578 (util/grub-emu.c_DEPENDENCIES): ... this.
6579 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6580 (util/grub-emu.c_DEPENDENCIES): ... this.
6581 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6582 (util/grub-emu.c_DEPENDENCIES): ... this.
6583 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6584 (util/grub-emu.c_DEPENDENCIES): ... this.
6586 2008-01-27 Pavel Roskin <proski@gnu.org>
6588 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6589 to create a gap between _end and the modules added to the image
6590 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
6591 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6592 * util/elf/grub-mkimage.c (add_segments): Likewise.
6594 2008-01-26 Pavel Roskin <proski@gnu.org>
6596 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6597 just return an error.
6599 2008-01-26 Bean <bean123ch@gmail.com>
6601 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6602 (grub_reiserfs_get_item): Save offset of the next item.
6603 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6605 2008-01-25 Robert Millan <rmh@aybabtu.com>
6607 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6608 make all filesystem sources appear together (possibly fixing omissions
6610 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6611 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6612 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6613 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6615 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
6617 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6618 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6619 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6620 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6622 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6623 (probe): Add a sanity check to make sure of our ability to read
6624 requested files when probing for filesystem type.
6626 * genmk.rb: Update copyright year (2007).
6628 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6629 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6630 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6631 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6632 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6633 : Remove function prototypes.
6635 2008-01-25 Robert Millan <rmh@aybabtu.com>
6637 Revert my previous commits (based on wrong assumption of how grub_errno
6640 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6641 * kern/file.c (grub_file_open): Likewise.
6643 2008-01-24 Pavel Roskin <proski@gnu.org>
6645 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6646 that hang if GRUB tries to setup colors.
6647 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6648 colors for firmwares that don't support it.
6649 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6650 Recognize Open Hack'Ware, set flags to work around its
6653 2008-01-24 Robert Millan <rmh@aybabtu.com>
6655 * kern/file.c (grub_file_open): Do not account previous failures of
6656 unrelated functions when grub_errno is checked for.
6657 Reported by Oleg Strikov.
6659 2008-01-24 Bean <bean123ch@gmail.com>
6661 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6662 (grub_ufs_sblock): New member volume name.
6663 (grub_ufs_find_file): Fix string copy bug.
6664 (grub_ufs_label): Implement this function properly.
6666 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6667 (grub_hfs_iterate_records): Use the correct file number for extents
6668 and catalog file. Fix problem in next index calculation.
6669 (grub_hfs_find_node): Replace recursive function call with loop.
6670 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6672 2008-01-23 Robert Millan <rmh@aybabtu.com>
6674 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6675 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6676 (grub_multiboot2_real_boot): New function prototype.
6678 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6679 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6681 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6682 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6684 2008-01-23 Robert Millan <rmh@aybabtu.com>
6686 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6687 #ifdef'ed out grub_printf().
6689 2008-01-23 Robert Millan <rmh@aybabtu.com>
6691 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6692 grub_dprintf calls, since they make "debug=all" mode unusable.
6693 (grub_console_checkkey): Likewise.
6695 2008-01-23 Robert Millan <rmh@aybabtu.com>
6697 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6698 `term/i386/pc/at_keyboard.c'.
6699 (pkglib_MODULES): Add `serial.mod'.
6700 (serial_mod_SOURCES): New variable.
6701 (serial_mod_CFLAGS): Likewise.
6702 (serial_mod_LDFLAGS): Likewise.
6704 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6705 `<grub/powerpc/ieee1275/console.h>'.
6706 (grub_keyboard_controller_init): New function prototype.
6707 (grub_console_checkkey): Likewise.
6708 (grub_console_getkey): Likewise.
6710 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6713 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6714 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6716 2008-01-23 Robert Millan <rmh@aybabtu.com>
6718 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6719 present, "(memdisk)/boot/grub" becomes the default prefix.
6721 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6722 a memdisk tarball with all the modules. Add --overlay=DIR option that
6723 allows users to overlay additional files into the image.
6725 2008-01-23 Robert Millan <rmh@aybabtu.com>
6727 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6728 and `machine/memory.h'.
6729 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6730 (_multiboot_mod_SOURCES): New variable.
6731 (_multiboot_mod_CFLAGS): Likewise.
6732 (_multiboot_mod_LDFLAGS): Likewise.
6733 (multiboot_mod_SOURCES): Likewise.
6734 (multiboot_mod_CFLAGS): Likewise.
6735 (multiboot_mod_LDFLAGS): Likewise.
6737 * include/grub/i386/ieee1275/loader.h: New file.
6739 * include/grub/i386/ieee1275/machine.h: Likewise.
6741 * include/grub/i386/ieee1275/memory.h: Likewise.
6743 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6744 variable declaration.
6745 (grub_os_area_size): Likewise.
6747 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6748 (grub_lower_mem, grub_upper_mem): New variables.
6749 (grub_stop_floppy): New function (just to make
6750 grub_multiboot2_real_boot() happy).
6752 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6753 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6754 (grub_stop): New function.
6755 Include `"../realmode.S"' and `"../loader.S"'.
6757 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6758 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6760 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6761 rely on grub_multiboot2_real_boot() for final boot.
6763 2008-01-22 Robert Millan <rmh@aybabtu.com>
6765 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6766 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6767 device that doesn't look like an SD card.
6768 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6769 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6770 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6771 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6774 2008-01-22 Robert Millan <rmh@aybabtu.com>
6776 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6777 avoid claiming over our own code.
6779 2008-01-22 Bean <bean123ch@gmail.com>
6781 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6782 (jpeg_mod_SOURCES): New variable.
6783 (jpeg_mod_CFLAGS): Likewise.
6784 (jpeg_mod_LDFLAGS): Likewise.
6786 * video/readers/jpeg.c : New file.
6788 2008-01-22 Bean <bean123ch@gmail.com>
6790 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6791 there are no more items.
6793 2008-01-21 Robert Millan <rmh@aybabtu.com>
6795 * kern/mm.c (grub_mm_init_region): Improve debug message.
6797 2008-01-21 Robert Millan <rmh@aybabtu.com>
6799 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6800 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6802 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6804 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6805 Indicates start of upper memory.
6806 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6807 (generate_image): Abort when image size is big enough to corrupt
6810 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6811 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6812 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6813 instead of hardcoding 0xA0000.
6814 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6815 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6816 instead of hardcoding 0xA0000.
6818 2008-01-21 Robert Millan <rmh@aybabtu.com>
6820 * disk/memdisk.c (memdisk_size): New variable.
6821 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6823 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6824 image to dynamic memory.
6825 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6826 `memdisk_size'. Free memdisk block.
6828 2008-01-21 Robert Millan <rmh@aybabtu.com>
6830 Fix detection of very small filesystems (like tar).
6832 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6833 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6834 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6835 a problem with this disk).
6837 2008-01-21 Robert Millan <rmh@aybabtu.com>
6839 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6840 on grub_biosdisk_rw_standard() error.
6842 2008-01-21 Robert Millan <rmh@aybabtu.com>
6844 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6846 * kern/elf.c: Likewise.
6847 * kern/ieee1275/ieee1275.c: Likewise.
6848 * kern/powerpc/ieee1275/openfw.c: Likewise.
6849 * term/ieee1275/ofconsole.c: Likewise.
6851 2008-01-21 Robert Millan <rmh@aybabtu.com>
6853 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6855 * include/grub/kernel.h (grub_arch_memdisk_addr)
6856 (grub_arch_memdisk_size): Moved from here ...
6858 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6859 (grub_arch_memdisk_size): ... to here.
6861 2008-01-21 Robert Millan <rmh@aybabtu.com>
6863 Mostly based on bugfix from Bean.
6865 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6866 attribute with hook() parameter.
6867 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6869 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6870 attribute with hook() parameter.
6871 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6874 2008-01-21 Robert Millan <rmh@aybabtu.com>
6876 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6877 (pkglib_MODULES): Add `memdisk.mod'.
6878 (memdisk_mod_SOURCES): New variable.
6879 (memdisk_mod_CFLAGS): Likewise.
6880 (memdisk_mod_LDFLAGS): Likewise.
6882 * disk/memdisk.c: New file.
6884 * include/grub/disk.h (grub_disk_dev_id): Add
6885 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6887 * include/grub/i386/pc/kernel.h
6888 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6889 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6890 (grub_kernel_image_size): New variable declaration.
6891 (grub_total_module_size): Likewise.
6892 (grub_memdisk_image_size): Likewise.
6894 * include/grub/i386/pc/memory.h
6895 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6897 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6898 (grub_arch_memdisk_addr): New variable declaration.
6899 (grub_arch_memdisk_size): Likewise.
6901 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6902 (grub_arch_memdisk_size): Likewise.
6904 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6905 (codestart): Replace hardcoded `0x100000' with
6906 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6908 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6909 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6910 not NULL, append the contents of the file it refers to, at the end of
6911 the compressed kernel image. Initialize `grub_memdisk_image_size'
6912 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6913 (options): Add "memdisk"|'m' option.
6914 (main): Parse --memdisk|-m option, and pass user-provided path as
6915 parameter to generate_image().
6917 2008-01-20 Robert Millan <rmh@aybabtu.com>
6919 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6920 grub_dprintf() calls from here ...
6921 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6923 2008-01-20 Robert Millan <rmh@aybabtu.com>
6925 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6927 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6929 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6930 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6931 `GRUB_IEEE1275_FLAG_REAL_MODE'.
6932 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6934 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6935 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6937 2008-01-19 Robert Millan <rmh@aybabtu.com>
6939 Get rid of confusing function (superseded by
6940 `grub_ieee1275_get_integer_property')
6941 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6943 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6945 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6946 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
6947 in native endianness from grub_ieee1275_get_integer_property().
6949 2008-01-19 Robert Millan <rmh@aybabtu.com>
6951 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6952 command after "shut-down", since implementations differ on which
6953 the command for halt is.
6955 2008-01-19 Robert Millan <rmh@aybabtu.com>
6957 * include/grub/i386/linuxbios/console.h: Add header protection.
6958 (grub_keyboard_controller_init): New function prototype.
6959 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6960 (KEYBOARD_COMMAND_READ): Likewise.
6961 (KEYBOARD_COMMAND_WRITE): Likewise.
6962 (KEYBOARD_SCANCODE_SET1): Likewise.
6963 (grub_keyboard_controller_write): New function.
6964 (grub_keyboard_controller_read): Likewise.
6965 (grub_keyboard_controller_init): Likewise.
6967 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6968 (grub_console_init): On coreboot/LinuxBIOS, call
6969 grub_keyboard_controller_init().
6971 2008-01-19 Robert Millan <rmh@aybabtu.com>
6973 PowerPC changes provided by Pavel Roskin.
6975 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6976 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6977 don't rely on cmain() doing it.
6978 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6979 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6981 2008-01-16 Robert Millan <rmh@aybabtu.com>
6983 * include/grub/i386/linuxbios/memory.h
6984 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6985 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6986 receive `table_header' as argument. Instead, probe for it in the
6987 known memory ranges where it can be present.
6988 (grub_available_iterate): Do not pass a fixed `table_header' address
6989 to grub_linuxbios_table_iterate().
6991 2008-01-15 Robert Millan <rmh@aybabtu.com>
6993 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6994 * conf/i386-ieee1275.rmk: New file.
6995 * include/grub/i386/ieee1275/console.h: Likewise.
6996 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6997 * include/grub/i386/ieee1275/kernel.h: Likewise.
6998 * include/grub/i386/ieee1275/time.h: Likewise.
6999 * kern/i386/ieee1275/init.c: Likewise.
7000 * kern/i386/ieee1275/startup.S: Likewise.
7002 2008-01-15 Robert Millan <rmh@aybabtu.com>
7004 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7005 when pointers are 32-bit (but still do set it to one when they are
7008 2008-01-15 Robert Millan <rmh@aybabtu.com>
7010 * include/grub/ieee1275/ieee1275.h
7011 (grub_ieee1275_get_integer_property): New function prototype.
7013 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7014 (grub_ieee1275_get_integer_property): New function. Wraps around
7015 grub_ieee1275_get_property() to handle endianness.
7017 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7018 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
7020 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7021 (grub_map): Likewise.
7022 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7024 2008-01-15 Bean <bean123ch@gmail.com>
7026 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7027 (grub_script_execute_cmdline): Reset grub_errno.
7029 * normal/main.c (read_config_file): Reset grub_errno.
7031 * normal/parse.y (script_init): New.
7032 (script): Move function and menuentry here.
7034 (command): Add delimiter at the end of command.
7035 (commands): Adjust to match the new command.
7036 (commandblock): Remove grub_script_lexer_record_start.
7037 (menuentry): Add grub_script_lexer_record_start, use the new commands.
7038 (if): Use the new commands.
7040 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7042 2008-01-15 Robert Millan <rmh@aybabtu.com>
7044 * normal/menu.c (run_menu): Move timeout message from here ...
7045 (print_timeout): ... to here.
7046 (run_menu): Use print_timeout() once during initial draw to print
7047 the whole message, and again in every clock tick to update only
7048 the number of seconds.
7050 2008-01-15 Robert Millan <rmh@aybabtu.com>
7052 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7053 actual size of `available' from grub_ieee1275_get_property(), and
7054 restrict parsing to that bound.
7056 2008-01-15 Christian Franke <franke@computer.org>
7058 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7059 (argp_program_version): Remove variable.
7060 (argp_program_bug_address): Likewise.
7061 (options): Convert from struct argp_option to struct option.
7062 (struct arguments): Remove.
7063 (parse_opt): Remove.
7064 (usage): New function.
7065 (main): Replace struct args members by simple variables.
7066 Replace argp_parse() by getopt_long().
7067 Add switch to evaluate options.
7068 Add missing "(...)" around root_dev in prefix string.
7070 2008-01-14 Robert Millan <rmh@aybabtu.com>
7072 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7073 for grub_ieee1275_exit(), in order to improve portability.
7075 2008-01-14 Robert Millan <rmh@aybabtu.com>
7077 * util/grub.d/10_linux.in (prefix): Define.
7078 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
7080 2008-01-13 Pavel Roskin <proski@gnu.org>
7082 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7083 grub_errno if no errors have been detected.
7085 2008-01-12 Robert Millan <rmh@aybabtu.com>
7087 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7088 (grub_util_get_dev_abstraction): New function prototype.
7090 * util/getroot.c: Include `<grub/util/getroot.h>'
7091 (grub_util_get_grub_dev): Move detection of abstraction type to ...
7092 (grub_util_get_dev_abstraction): ... here (new function).
7094 * util/grub-probe.c: Convert PRINT_* to an enum. Add
7095 `PRINT_ABSTRACTION'.
7096 (probe): Probe for abstraction type when requested.
7097 (main): Understand `--target=abstraction'.
7099 * util/i386/efi/grub-install.in: Add abstraction module to core
7100 image when it is found to be necessary.
7101 * util/i386/pc/grub-install.in: Likewise.
7102 * util/powerpc/ieee1275/grub-install.in: Likewise.
7104 * util/update-grub_lib.in (font_path): Return system path without
7105 converting to GRUB path.
7106 * util/update-grub.in: Convert system path returned by font_path()
7107 to a GRUB path. Use `grub-probe -t abstraction' to determine what
7108 abstraction module is needed for loading fonts (if any). Export
7109 that as `GRUB_PRELOAD_MODULES'.
7110 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7113 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
7115 Remove some unused code from reiserfs.
7117 * fs/reiserfs.c (struct grub_reiserfs_key)
7118 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7119 (struct grub_reiserfs_node_body): Removed.
7120 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7122 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7124 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7126 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7128 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7130 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7132 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7133 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7134 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7136 2008-01-10 Robert Millan <rmh@aybabtu.com>
7138 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7139 Determines if a file is garbage left by packaging systems, etc.
7140 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7141 for processing /etc/grub.d scripts.
7142 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7143 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7144 as a condition for processing Linux images.
7146 2008-01-10 Pavel Roskin <proski@gnu.org>
7148 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7149 to compile reiserfs.c on PowerPC.
7151 2008-01-10 Robert Millan <rmh@aybabtu.com>
7153 * kern/device.c (grub_device_iterate): Do not abort device iteration
7154 when one of the devices cannot be opened.
7155 * kern/disk.c (grub_disk_open): Do not account previous failures of
7156 unrelated functions when grub_errno is checked for.
7158 2008-01-08 Robert Millan <rmh@aybabtu.com>
7160 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7161 `! grub_linux_is_bzimage', change order of address comparison to make
7162 it more intuitive, and improve "too big zImage" error message.
7164 2008-01-08 Robert Millan <rmh@aybabtu.com>
7166 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7167 `$(update-grub_DATA)'.
7168 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7171 2008-01-07 Robert Millan <rmh@aybabtu.com>
7173 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7174 which instruction is modified by grub-setup during installation
7175 (since it wasn't obvious by only looking at this file).
7177 2008-01-07 Robert Millan <rmh@aybabtu.com>
7179 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
7180 listing actual TODO items.
7182 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7184 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7186 (grub_reiserfs_get_key_offset): Likewise.
7187 (grub_reiserfs_set_key_offset): Likewise.
7188 (grub_reiserfs_set_key_type): Likewise.
7189 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
7191 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7192 better to remove the bitfield version completely.
7194 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7196 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7197 allocated from the heap, due to the fshelp implementation.
7198 (grub_reiserfs_dir): Free NODE, due to the same reason.
7200 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7202 Mostly from Vincent Pelletier:
7204 * fs/reiserfs.c: New file.
7206 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7207 (reiserfs_mod_SOURCES): New variable.
7208 (reiserfs_mod_CFLAGS): Likewise.
7209 (reiserfs_mod_LDFLAGS): Likewise.
7211 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7212 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7213 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7216 2008-01-06 Robert Millan <rmh@aybabtu.com>
7218 * normal/color.c: Remove `<grub/env.h>'.
7220 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7222 * include/grub/normal.h: Include <grub/env.h>.
7224 2008-01-05 Robert Millan <rmh@aybabtu.com>
7226 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7227 usage example with `(hd0,1)'.
7228 Reported by Samuel Thibault.
7230 2008-01-05 Robert Millan <rmh@aybabtu.com>
7232 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7233 (grub_linux_boot_zimage): Rename to ...
7234 (grub_linux_boot): ... this.
7235 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7236 (grub_linux_boot_zimage): Conditionalize zImage copy.
7238 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7239 (grub_linux_boot_bzimage): Remove prototype.
7240 (grub_linux_boot_zimage): Rename to ...
7241 (grub_linux_boot): ... this.
7243 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7244 (grub_linux_boot): Remove function.
7246 2008-01-05 Robert Millan <rmh@aybabtu.com>
7248 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7249 (grub_env_write_color_highlight): Likewise.
7250 (grub_wait_after_message): Likewise.
7252 * normal/color.c: New file.
7254 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7255 (normal_mod_DEPENDENCIES): Likewise.
7257 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7258 (normal_mod_DEPENDENCIES): Likewise.
7260 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7261 (normal_mod_DEPENDENCIES): Likewise.
7263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7264 (normal_mod_DEPENDENCIES): Likewise.
7266 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7267 for waiting after a message is printed.
7268 * normal/main.c (read_config_file): Likewise.
7269 (grub_normal_init): Register grub_env_write_color_normal() and
7270 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7271 `color_highlight' variables as global.
7273 * normal/menu.c (grub_wait_after_message): New function.
7274 (grub_color_menu_normal): New variable. Replaces ...
7275 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7276 (grub_color_menu_highlight): New variable. Replaces ...
7277 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7278 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7279 `GRUB_TERM_COLOR_STANDARD'.
7280 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7281 `normal_code' and `highlight_code' to `old_color_normal' and
7282 `old_color_highlight', respectively.
7283 (grub_menu_init_page): Update colors when drawing the menu, based on
7284 `menu_color_normal' and `menu_color_highlight' variables.
7285 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7286 a message is printed.
7288 2008-01-05 Robert Millan <rmh@aybabtu.com>
7290 * kern/env.c (grub_env_context_open): Propagate hooks for global
7291 variables to new context.
7293 * kern/main.c (grub_set_root_dev): Export `root' variable.
7295 2008-01-05 Robert Millan <rmh@aybabtu.com>
7297 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
7298 discs unconditionally, since udev and others have options to provide
7301 2008-01-05 Robert Millan <rmh@aybabtu.com>
7303 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7305 2008-01-04 Christian Franke <franke@computer.org>
7307 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7310 2008-01-03 Pavel Roskin <proski@gnu.org>
7312 * kern/i386/linuxbios/init.c: Put "void" to all function
7313 declarations with no arguments.
7314 * kern/powerpc/ieee1275/init.c: Likewise.
7315 * term/i386/pc/at_keyboard.c: Likewise.
7316 * term/i386/pc/vga_text.c: Likewise.
7317 * util/grub-mkdevicemap.c: Likewise.
7319 2008-01-02 Robert Millan <rmh@aybabtu.com>
7321 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7322 message when loaded image is out of bounds.
7323 (grub_multiboot_load_elf64): Likewise.
7325 2008-01-02 Pavel Roskin <proski@gnu.org>
7327 * util/grub.d/10_linux.in: Try version without ".old" when
7328 looking for initrd. It's better to use initrd from the newer
7329 kernel of the same version than no initrd at all.
7331 2008-01-01 Robert Millan <rmh@aybabtu.com>
7333 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7335 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7337 * include/grub/video.h: Added grub_video_unmap_color and
7338 grub_video_get_active_render_target.
7339 (grub_video_adapter): Added unmap_color and get_active_render_target.
7341 * video/video.c: Added grub_video_unmap_color and
7342 grub_video_get_active_render_target.
7343 (grub_video_get_info): Changed method to accept NULL pointer as an
7344 argument to allow detection of active video adapter.
7346 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7347 grub_video_vbe_unmap_color_int.
7348 Added grub_video_vbe_unmap_color and
7349 grub_video_vbe_get_active_render_target.
7350 (grub_video_vbe_adapter): Added unmap_color and
7351 get_active_render_target.
7353 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
7354 with grub_video_vbe_unmap_color_int.
7356 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7357 (DEFAULT_NORMAL_COLOR): Likewise.
7358 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7359 (DEFAULT_FG_COLOR): Removed.
7360 (DEFAULT_BG_COLOR): Likewise.
7361 (DEFAULT_CURSOR_COLOR): Changed value.
7362 (grub_virtual_screen): Added standard_color_setting,
7363 normal_color_setting, highlight_color_setting and term_color.
7364 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7365 (bitmap_width): Added.
7366 (bitmap_height): Likewise.
7368 (set_term_color): Likewise.
7369 (grub_virtual_screen_setup): Changed to use new terminal coloring
7371 (grub_gfxterm_init): Added init for bitmap.
7372 (grub_gfxterm_fini): Added destroy for bitmap.
7373 (redraw_screen_rect): Updated to use background bitmap and new
7375 (scroll_up): Added optimization for case when there is no bitmap.
7376 (grub_gfxterm_cls): Fixed to use correct background color.
7377 (grub_virtual_screen_setcolorstate): Changed to use new terminal
7379 (grub_virtual_screen_setcolor): Likewise.
7380 (grub_virtual_screen_getcolor): Added.
7381 (grub_gfxterm_background_image_cmd): Likewise.
7382 (grub_video_term): Added setcolor and getcolor.
7383 (MOD_INIT): Added registration of background_image command.
7384 (MOD_TERM): Added unregistration for background_image command.
7386 2007-12-30 Pavel Roskin <proski@gnu.org>
7388 * loader/multiboot_loader.c: Fix multiboot command
7389 unregistration. Fix all typos in the word "multiboot".
7391 2007-12-29 Pavel Roskin <proski@gnu.org>
7393 * util/grub.d/10_linux.in: Refactor search for initrd. Add
7394 support for initrd names used in Fedora.
7396 2007-12-26 Bean <bean123ch@gmail.com>
7398 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
7399 (cpio_mod_SOURCES): New variable.
7400 (cpio_mod_CFLAGS): Likewise.
7401 (cpio_mod_LDFLAGS): Likewise.
7403 * fs/cpio.c: New file.
7405 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
7407 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7409 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7411 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7413 2007-12-25 Robert Millan <rmh@aybabtu.com>
7415 * include/grub/term.h (struct grub_term): Add `getcolor' function.
7416 (grub_getcolor): New function.
7418 * kern/term.c (grub_getcolor): New function.
7419 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
7420 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
7421 (print_entry): Set normal and highlight colors to
7422 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
7423 respectively, before printing and restore them to old
7425 (grub_menu_init_page): Likewise. Fill an additional colored space
7426 that would otherwise be left blank.
7428 * term/efi/console.c (grub_console_getcolor): New function.
7429 (struct grub_console_term.getcolor): New variable.
7430 * term/i386/pc/console.c (grub_console_getcolor): New function.
7431 (struct grub_console_term.getcolor): New variable.
7432 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
7433 (struct grub_console_term.getcolor): New variable.
7435 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
7436 (struct grub_console_term.setcolor): Remove variable.
7437 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
7438 (struct grub_console_term.setcolor): Remove variable.
7439 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
7440 (struct grub_console_term.setcolor): Remove variable.
7441 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
7442 (struct grub_console_term.setcolor): Remove variable.
7444 2007-12-25 Robert Millan <rmh@aybabtu.com>
7446 * configure.ac: Search for possible unifont.hex locations, and
7447 define UNIFONT_HEX if found.
7449 * Makefile.in (UNIFONT_HEX): Define variable.
7450 (DATA): Rename to ...
7451 (PKGLIB): ... this. Update all users.
7452 (PKGDATA): New variable.
7453 (pkgdata_IMAGES): Rename to ...
7454 (pkglib_IMAGES): ... this. Update all users.
7455 (pkgdata_MODULES): Rename to ...
7456 (pkglib_MODULES): ... this. Update all users.
7457 (pkgdata_PROGRAMS): Rename to ...
7458 (pkglib_PROGRAMS): ... this. Update all users.
7459 (pkgdata_DATA): Rename to ...
7460 (pkglib_DATA): ... this. Update all users.
7461 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7462 (unicode.pff, ascii.pff): New rules.
7463 (all-local): Add `$(PKGDATA)' dependency.
7464 (install-local): Process `$(PKGDATA)'.
7466 * util/update-grub_lib.in (font_path): Search for *.pff files in
7467 a few more locations, including `${pkgdata}'.
7469 2007-12-23 Robert Millan <rmh@aybabtu.com>
7471 Patch from Bean <bean123ch@gmail.com>:
7472 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7475 2007-12-21 Bean <bean123ch@gmail.com>
7477 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7478 (ntfscomp_mod_SOURCES): New variable.
7479 (ntfscomp_mod_CFLAGS): Likewise.
7480 (ntfscomp_mod_LDFLAGS): Likewise.
7482 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7483 (grub_probe_SOURCES): Likewise.
7484 (grub_emu_SOURCES): Likewise.
7486 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7487 (grub_emu_SOURCES): Likewise.
7489 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7490 (grub_emu_SOURCES): Likewise.
7492 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7493 (grub_emu_SOURCES): Likewise.
7495 * fs/ntfs.c (grub_ntfscomp_func): New variable.
7496 (read_run_list): Renamed to grub_ntfs_read_run_list.
7497 (decomp_nextvcn): Moved to ntfscomp.c.
7498 (decomp_getch): Likewise.
7499 (decomp_get16): Likewise.
7500 (decomp_block): Likewise.
7501 (read_block): Likewise.
7502 (read_data): Partially moved to ntfscomp.c.
7503 (fixup): Change unsigned to grub_uint16_t.
7504 (read_mft): Change unsigned long to grub_uint32_t.
7505 (read_attr): Likewise.
7506 (read_data): Likewise.
7507 (read_run_data): Likewise.
7508 (read_run_list): Likewise.
7509 (read_mft): Likewise.
7511 * fs/ntfscomp.c: New file.
7513 * include/grub/ntfs.h: New file.
7515 2007-12-16 Robert Millan <rmh@aybabtu.com>
7517 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7518 IDE disk check, since Linux is known to support 20 IDE disks.
7519 Reported by Colin Watson.
7521 2007-12-15 Bean <bean123ch@gmail.com>
7523 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7524 (lnxboot_img_SOURCES): New variable.
7525 (lnxboot_img_ASFLAGS): Likewise.
7526 (lnxboot_img_LDFLAGS): Likewise.
7528 * boot/i386/pc/lnxboot.S: New file.
7530 2007-11-24 Pavel Roskin <proski@gnu.org>
7532 * configure.ac: Test if '--build-id=none' is supported by the
7533 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
7534 objcopy to generate incorrect binary files (binutils
7535 2.17.50.0.18-1 as shipped by Fedora 8).
7536 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7537 linking, so that build ID doesn't break the test.
7539 2007-11-24 Pavel Roskin <proski@gnu.org>
7541 * include/grub/i386/time.h: use "void" in the argument list
7543 * include/grub/powerpc/time.h: Likewise.
7544 * include/grub/sparc64/time.h: Likewise.
7546 2007-11-18 Christian Franke <franke@computer.org>
7548 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7549 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7550 This fixes the problem that function keys did not work in grub-emu.
7552 2007-11-18 Christian Franke <franke@computer.org>
7554 * disk/host.c (grub_host_open): Remove attribute unused from
7555 name parameter. Add check for "host". This fixes the problem
7556 that grub-emu does not find partitions.
7558 2007-11-18 Christian Franke <franke@computer.org>
7560 * util/hostfs.c (is_dir): New function.
7561 (grub_hostfs_dir): Handle missing dirent.d_type case.
7562 (grub_hostfs_read): Add missing fseek().
7563 (grub_hostfs_label): Clear label pointer. This fixes a crash
7564 of grub-emu on "ls (host)".
7566 2007-11-18 Christian Franke <franke@computer.org>
7568 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7569 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7570 to 64 bit boundary by default.
7572 2007-11-18 Bean <bean123ch@gmail.com>
7574 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7575 (hexdump_mod_SOURCES): New variable.
7576 (hexdump_mod_CFLAGS): Likewise.
7577 (hexdump_mod_LDFLAGS): Likewise.
7579 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7581 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7583 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7585 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7587 * include/grub/hexdump.h: New file.
7589 * commands/hexdump.c: New file.
7591 2007-11-10 Robert Millan <rmh@aybabtu.com>
7593 * commands/i386/pc/play.c (beep_off): Switch order of arguments
7594 in grub_outb() calls.
7595 (beep_on): Likewise.
7597 2007-11-10 Christian Franke <franke@computer.org>
7599 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7600 (grub_menu_run): Likewise.
7602 2007-11-10 Robert Millan <rmh@aybabtu.com>
7604 * include/grub/i386/efi/machine.h: New file.
7605 * include/grub/i386/linuxbios/machine.h: Likewise.
7606 * include/grub/i386/pc/machine.h: Likewise.
7607 * include/grub/powerpc/ieee1275/machine.h: Likewise.
7608 * include/grub/sparc64/ieee1275/machine.h: Likewise.
7610 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7611 (serial_hw_io_addr): New variable.
7612 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7613 instead of `(unsigned short *) 0x400'.
7615 2007-11-10 Bean <bean123ch@gmail.com>
7617 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7619 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7621 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7622 (vga_mod_SOURCES): Added.
7623 (vga_mod_CFLAGS): Likewise.
7624 (vga_mod_LDFLAGS): Likewise.
7626 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7628 (set_map_mask): Likewise.
7629 (set_read_map): Likewise.
7630 (set_read_address): Likewise.
7631 (vga_font): Removed variable.
7632 (get_vga_glyph): Removed function.
7633 (invalidate_char): Likewise.
7634 (write_char): Changed to use grub_font_get_glyph() for font
7636 (grub_vga_putchar): Likewise.
7637 (grub_vga_getcharwidth): Likewise.
7639 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7641 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7643 (pxeboot_img_LDFLAGS): Likewise.
7644 (diskboot_img_LDFLAGS): Likewise.
7645 (kernel_img_LDFLAGS): Likewise.
7647 2007-11-06 Robert Millan <rmh@aybabtu.com>
7649 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7650 in grub_outb() calls.
7651 (serial_hw_init): Likewise.
7653 2007-11-05 Robert Millan <rmh@aybabtu.com>
7655 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7656 spaces. Skip non-regular files.
7658 2007-11-05 Robert Millan <rmh@aybabtu.com>
7660 * kern/disk.c (grub_disk_firmware_fini)
7661 (grub_disk_firmware_is_tainted): New variables.
7663 * include/grub/disk.h (grub_disk_firmware_fini)
7664 (grub_disk_firmware_is_tainted): Likewise.
7666 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7667 (grub_disk_biosdisk_fini): ... to here.
7668 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7669 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7670 is set. Register grub_disk_biosdisk_fini() in
7671 `grub_disk_firmware_fini'.
7673 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7674 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7675 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7676 to finish existing firmware disk interface.
7678 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7679 (ata_mod_SOURCES): New variable.
7680 (ata_mod_CFLAGS): Likewise.
7681 (ata_mod_LDFLAGS): Likewise.
7683 2007-11-05 Robert Millan <rmh@aybabtu.com>
7685 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7686 (grub_ata_wait): Reimplement using grub_millisleep().
7688 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7689 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7691 2007-11-03 Marco Gerards <marco@gnu.org>
7693 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7694 (CRTC_ADDR_PORT): New macro.
7695 (CRTC_DATA_PORT): Likewise.
7696 (CRTC_CURSOR): Likewise.
7697 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7698 (CRTC_CURSOR_ADDR_LOW): Likewise.
7699 (update_cursor): New function.
7700 (grub_console_real_putchar): Call `update_cursor'.
7701 (grub_console_gotoxy): Likewise.
7702 (grub_console_cls): Set the default color when clearing the
7704 (grub_console_setcursor): Implemented.
7706 2007-11-03 Marco Gerards <marco@gnu.org>
7708 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7710 (grub_ata_pio_write): Likewise.
7712 (grub_atapi_identify): Wait after issuing an ATA command.
7713 (grub_atapi_packet): Likewise.
7714 (grub_ata_identify): Likewise.
7715 (grub_ata_readwrite): Likewise.
7717 2007-11-03 Marco Gerards <marco@gnu.org>
7719 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7720 (grub_ata_pio_write): Likewise.
7721 (grub_ata_readwrite): Use `grub_error', instead of
7722 returning `grub_errno'.
7724 2007-11-03 Marco Gerards <marco@gnu.org>
7726 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7727 grub_ata_pio_write once for every single sector, instead of for
7730 2007-10-31 Robert Millan <rmh@aybabtu.com>
7732 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7734 * conf/i386-linuxbios.rmk: New file.
7736 * kern/i386/pc/hardware.c: Likewise.
7737 * term/i386/pc/at_keyboard.c: Likewise.
7738 * term/i386/pc/vga_text.c: Likewise.
7740 * include/grub/i386/linuxbios/boot.h: Likewise.
7741 * include/grub/i386/linuxbios/console.h: Likewise.
7742 * include/grub/i386/linuxbios/init.h: Likewise.
7743 * include/grub/i386/linuxbios/kernel.h: Likewise.
7744 * include/grub/i386/linuxbios/loader.h: Likewise.
7745 * include/grub/i386/linuxbios/memory.h: Likewise.
7746 * include/grub/i386/linuxbios/serial.h: Likewise.
7747 * include/grub/i386/linuxbios/time.h: Likewise.
7749 * kern/i386/linuxbios/init.c: Likewise.
7750 * kern/i386/linuxbios/startup.S: Likewise.
7751 * kern/i386/linuxbios/table.c: Likewise.
7753 2007-10-31 Marco Gerards <marco@gnu.org>
7755 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7756 (ata_mod_SOURCES): New variable.
7757 (ata_mod_CFLAGS): Likewise.
7758 (ata_mod_LDFLAGS): Likewise.
7760 * disk/ata.c: New file.
7762 * include/grub/disk.h (grub_disk_dev_id): Add
7763 `GRUB_DISK_DEV_ATA_ID'.
7765 2007-10-31 Robert Millan <rmh@aybabtu.com>
7767 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7768 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7770 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7771 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7773 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7776 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7778 2007-10-27 Robert Millan <rmh@aybabtu.com>
7780 * include/grub/types.h (ULONG_MAX): Define macro.
7782 2007-10-22 Robert Millan <rmh@aybabtu.com>
7784 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7786 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7788 2007-10-22 Robert Millan <rmh@aybabtu.com>
7790 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7791 (pkgdata_MODULES): Add `biosdisk.mod'.
7792 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7795 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7796 (grub_biosdisk_init): Replace with ...
7797 (GRUB_MOD_INIT(biosdisk)): ... this.
7798 (grub_biosdisk_fini): Replace with ...
7799 (GRUB_MOD_FINI(biosdisk)): ... this.
7801 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7802 (grub_machine_init): Remove call to grub_biosdisk_init().
7803 (grub_machine_fini): Remove call to grub_machine_fini().
7805 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7807 2007-10-22 Robert Millan <rmh@aybabtu.com>
7809 * include/grub/time.h: New file.
7810 * include/grub/i386/time.h: Likewise.
7811 * include/grub/powerpc/time.h: Likewise.
7812 * include/grub/sparc64/time.h: Likewise.
7814 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7816 (KERNEL_MACHINE_TIME_HEADER): ... this.
7817 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7819 (KERNEL_MACHINE_TIME_HEADER): ... this.
7820 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7822 (KERNEL_MACHINE_TIME_HEADER): ... this.
7824 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7825 (grub_millisleep): New function.
7826 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7827 (grub_millisleep): New function.
7828 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7829 Remove `grub/machine/time.h' include.
7830 (grub_millisleep): New function.
7831 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7832 Remove `grub/machine/time.h' include.
7833 (grub_millisleep): New function.
7835 * include/grub/misc.h (grub_div_roundup): New function.
7837 * kern/misc.c: Include `<grub/time.h>'.
7838 (grub_millisleep_generic): New function.
7840 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7842 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7844 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7845 `machine/time.h'. Add `time.h'.
7846 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7848 2007-10-21 Robert Millan <rmh@aybabtu.com>
7850 * include/grub/misc.h (grub_max): New function.
7852 2007-10-21 Robert Millan <rmh@aybabtu.com>
7854 * util/misc.c (grub_util_info): Call fflush() before returning.
7856 2007-10-20 Robert Millan <rmh@aybabtu.com>
7858 * genmk.rb (Image): Copy `extra_flags' from here ...
7859 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7861 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7862 to `argc' and `args' arguments.
7864 2007-10-17 Robert Millan <rmh@aybabtu.com>
7866 * kern/i386/loader.S: New file.
7868 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7869 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7870 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7871 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7872 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7873 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7874 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7875 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7876 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7877 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7878 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7879 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7880 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7881 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7883 * kern/i386/realmode.S: New file.
7885 * kern/i386/pc/startup.S (protstack): Moved from here ...
7886 * kern/i386/realmode.S (protstack)... to here.
7887 * kern/i386/pc/startup.S (gdt): Moved from here ...
7888 * kern/i386/realmode.S (gdt)... to here.
7889 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7890 * kern/i386/realmode.S (prot_to_real)... to here.
7892 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7893 `kern/i386/realmode.S'.
7895 2007-10-17 Robert Millan <rmh@aybabtu.com>
7897 * include/grub/i386/loader.h: New file.
7899 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7900 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7901 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7902 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7903 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7904 * include/grub/i386/loader.h (grub_linux_prot_size)
7905 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7906 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7907 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7908 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7910 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7912 2007-10-15 Robert Millan <rmh@aybabtu.com>
7914 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7915 filesystem when dev->disk is unset.
7916 Do probe for filesystem even when dev->disk->has_partitions is set.
7917 In case a filesystem is found, always report it.
7918 In case it isn't, if dev->disk->has_partitions is set, report that
7919 a partition table was found instead of reporting that no filesystem
7920 could be identified.
7922 2007-10-12 Robert Millan <rmh@aybabtu.com>
7924 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7925 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7927 * include/grub/types.h (grub_host_to_target16): New macro.
7928 (grub_host_to_target32): Likewise.
7929 (grub_host_to_target64): Likewise.
7930 (grub_target_to_host16): Likewise.
7931 (grub_target_to_host32): Likewise.
7932 (grub_target_to_host64): Likewise.
7934 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7936 (GRUB_MOD_ALIGN): ...this. Update all users.
7938 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7939 grub_host_to_target32.
7940 Replace grub_be_to_cpu32 with grub_target_to_host32.
7941 (load_modules): Likewise.
7942 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7943 Replace grub_be_to_cpu32 with grub_target_to_host32.
7944 Replace grub_cpu_to_be16 with grub_host_to_target16.
7945 Replace grub_cpu_to_be32 grub_host_to_target32.
7947 2007-10-12 Robert Millan <rmh@aybabtu.com>
7949 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7950 * util/elf/grub-mkimage.c: ... here.
7952 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7953 `util/powerpc/ieee1275/grub-mkimage.c'.
7955 2007-10-07 Robert Millan <rmh@aybabtu.com>
7957 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7958 and make it easier to figure out.
7959 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7960 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7961 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7962 leave us with less than HEAP_MIN_SIZE total heap.
7963 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
7965 2007-10-03 Robert Millan <rmh@aybabtu.com>
7967 * include/grub/i386/io.h: New file.
7968 * commands/i386/pc/play.c (inb): Removed.
7970 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7972 * term/i386/pc/serial.c (inb): Removed.
7974 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7976 * term/i386/pc/vga.c (inb): Removed.
7978 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7981 2007-10-02 Robert Millan <rmh@aybabtu.com>
7983 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7984 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7985 Reported by Marcin Kurek.
7987 2007-09-07 Robert Millan <rmh@aybabtu.com>
7989 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7990 SmartFirmware version updates (as released by Sven Luther), and avoid
7991 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7992 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7995 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7998 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7999 when merging two regions.
8001 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8003 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8004 * normal/completion.c (grub_normal_do_completion): Likewise.
8005 Reported by Hitoshi Ozeki.
8007 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8009 Do not use devices at boot in chainloading.
8011 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8012 (boot_part_addr): Likewise.
8013 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8014 with BOOT_DRIVE and BOOT_PART_ADDR.
8015 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8016 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8018 2007-08-29 Robert Millan <rmh@aybabtu.com>
8020 Patch from Simon Peter <dn.tlp@gmx.net>:
8021 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8022 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8023 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8024 util/i386/pc/grub-setup.c_DEPENDENCIES.
8025 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8026 util/grub-probe.c_DEPENDENCIES.
8027 * conf/powerpc-ieee1275.rmk: Likewise.
8029 2007-08-28 Robert Millan <rmh@aybabtu.com>
8031 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8032 to tell grub-mkdevicemap how to name devices.
8033 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8036 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8037 util/i386/get_disk_name.c.
8038 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8039 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8040 util/ieee1275/get_disk_name.c.
8042 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8044 * DISTLIST: Add util/i386/get_disk_name.c and
8045 util/ieee1275/get_disk_name.c.
8047 * util/grub-mkdevicemap.c: Replace device naming logic with
8048 grub_util_get_disk_name() calls.
8050 2007-08-20 Robert Millan <rmh@aybabtu.com>
8052 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8053 (so that it works for both plural and singular quantities).
8055 2007-08-05 Robert Millan <rmh@aybabtu.com>
8057 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8058 so that [xz] isn't taken into account when determining order.
8060 2007-08-02 Marco Gerards <marco@gnu.org>
8062 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8063 `include/multiboot2.h', `include/grub/elfload.h',
8064 `include/multiboot.h', `include/grub/multiboot.h',
8065 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8066 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8067 `kern/elf.c', `loader/multiboot_loader.c',
8068 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8069 `loader/i386/pc/multiboot2.c',
8070 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8071 `util/i386/pc/grub-mkrescue.in'. Remove
8072 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8073 `include/grub/i386/pc/util/biosdisk.h' and
8074 `include/grub/powerpc/ieee1275/multiboot.h'.
8076 2007-08-02 Bean <bean123ch@gmail.com>
8078 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8079 (ntfs_mod_SOURCES): New variable.
8080 (ntfs_mod_CFLAGS): Likewise.
8081 (ntfs_mod_LDFLAGS): Likewise.
8083 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8084 (grub_probe_SOURCES): Likewise.
8085 (grub_emu_SOURCES): Likewise.
8087 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8088 (grub_emu_SOURCES): Likewise.
8090 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8091 (grub_emu_SOURCES): Likewise.
8093 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8095 * fs/ntfs.c: New file.
8097 2007-08-02 Bean <bean123ch@gmail.com>
8099 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8101 * file.h (grub_file): Likewise.
8103 * fshelp.h (grub_fshelp_read_file): Likewise.
8105 * util/i386/pc/grub-setup.c (setup): Likewise.
8106 (save_first_sector): Likewise.
8107 (save_blocklists): Likewise.
8109 * fs/affs.c (grub_affs_read_file): Likewise.
8111 * fs/ext2.c (grub_ext2_read_file): Likewise.
8113 * fs/fat.c (grub_fat_read_data): Likewise.
8115 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8117 * fs/hfs.c (grub_hfs_read_file): Likewise.
8119 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8121 * fs/jfs.c (grub_jfs_read_file): Likewise.
8123 * fs/minix.c (grub_minix_read_file): Likewise.
8125 * fs/sfs.c (grub_sfs_read_file): Likewise.
8127 * fs/ufs.c (grub_ufs_read_file): Likewise.
8129 * fs/xfs.c (grub_xfs_read_file): Likewise.
8131 * command/blocklist.c (read_blocklist): Likewise.
8132 (print_blocklist): Likewise.
8134 2007-08-02 Marco Gerards <marco@gnu.org>
8136 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8139 * disk/host.c: New file.
8141 * util/hostfs.c: Likewise.
8143 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8144 return `GRUB_ERR_BAD_FS'.
8145 * fs/sfs.c (grub_sfs_mount): Likewise.
8146 * fs/xfs.c (grub_xfs_mount): Likewise.
8148 * include/grub/disk.h (enum grub_disk_dev_id): Add
8149 `GRUB_DISK_DEVICE_HOST_ID'.
8151 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8153 2007-07-24 Jerone Young <jerone@gmail.com>
8155 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
8156 modules for compilation.
8157 * conf/powerpc-ieee1275.rmk: Likewise.
8159 * include/multiboot.h: Move multiboot definitions to one file. Rename
8160 many definitions to not get grub specific.
8161 * include/multiboot2.h: Create header with multiboot 2 definitions.
8162 * include/grub/multiboot.h: Header for grub specific function
8163 prototypes and definitions.
8164 * include/grub/multiboot2.h: Likewise.
8165 * include/grub/multiboot_loader.h: Likewise.
8166 * include/grub/i386/pc/multiboot.h: Removed.
8167 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8169 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8170 and 2 to allow for one multiboot and module commands.
8171 * loader/multiboot2.c: Add multiboot2 functionality.
8172 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8173 and definition names.
8174 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8176 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8177 ieee1275 specific multiboot2 code.
8179 * kern/i386/pc/startup.S: Change headers and definition names for
8180 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8182 2007-07-22 Robert Millan <rmh@aybabtu.com>
8184 * geninitheader.sh: Process file specified in first parameter rather
8185 than hardcoding grub_modules_init.lst.
8186 * geninit.sh: Likewise. Also, construct header name dynamically rather
8187 than hardcoding grub_modules_init.h.
8189 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8190 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
8191 grub_probe_init.[ch] and grub_setup_init.[ch].
8193 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8194 grub_modules_init.h with grub_emu_init.h.
8195 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8196 grub_probe_init.[ch] files.
8197 * conf/i386-efi.rmk: Likewise.
8198 * conf/i386-pc.rmk: Likewise.
8199 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8200 grub_setup_init.[ch] files.
8202 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8203 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8204 to initialize modules rather than a list of hardcoded functions.
8205 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8206 grub_init_all() to initialize modules rather than a list of hardcoded
8209 2007-07-22 Robert Millan <rmh@aybabtu.com>
8211 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8212 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8214 2007-07-22 Robert Millan <rmh@aybabtu.com>
8216 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8217 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8218 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8219 flag when running on SmartFirmware.
8220 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8221 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8224 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8225 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8226 rather than decreasing it.
8228 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8229 there's not enough space to do it, fail in the same way as when it
8230 can't be done because there are no partitions.
8232 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8233 when nvsetenv failed.
8235 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8237 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8238 because this rule is automatically generated.
8239 (grub-mkrescue): Removed for the same reason as above.
8241 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8243 Migrate to GNU General Public License Version 3.
8245 * COPYING: Replaced with the plain text version of GPLv3.
8247 * config.guess: Updated from gnulib.
8248 * config.sub: Likewise.
8250 * geninit.sh: Output a GPLv3 copyright notice.
8251 * geninitheader.sh: Likewise.
8252 * genmodsrc.sh: Likewise.
8253 * gensymlist.sh.in: Likewise.
8255 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8256 * boot/i386/pc/diskboot.S: Likewise.
8257 * boot/i386/pc/pxeboot.S: Likewise.
8258 * commands/blocklist.c: Likewise.
8259 * commands/boot.c: Likewise.
8260 * commands/cat.c: Likewise.
8261 * commands/cmp.c: Likewise.
8262 * commands/configfile.c: Likewise.
8263 * commands/echo.c: Likewise.
8264 * commands/help.c: Likewise.
8265 * commands/ls.c: Likewise.
8266 * commands/search.c: Likewise.
8267 * commands/terminal.c: Likewise.
8268 * commands/test.c: Likewise.
8269 * commands/videotest.c: Likewise.
8270 * commands/i386/cpuid.c: Likewise.
8271 * commands/i386/pc/halt.c: Likewise.
8272 * commands/i386/pc/play.c: Likewise.
8273 * commands/i386/pc/reboot.c: Likewise.
8274 * commands/i386/pc/vbeinfo.c: Likewise.
8275 * commands/i386/pc/vbetest.c: Likewise.
8276 * commands/ieee1275/halt.c: Likewise.
8277 * commands/ieee1275/reboot.c: Likewise.
8278 * commands/ieee1275/suspend.c: Likewise.
8279 * disk/loopback.c: Likewise.
8280 * disk/lvm.c: Likewise.
8281 * disk/raid.c: Likewise.
8282 * disk/efi/efidisk.c: Likewise.
8283 * disk/i386/pc/biosdisk.c: Likewise.
8284 * disk/ieee1275/ofdisk.c: Likewise.
8285 * font/manager.c: Likewise.
8286 * fs/affs.c: Likewise.
8287 * fs/ext2.c: Likewise.
8288 * fs/fat.c: Likewise.
8289 * fs/fshelp.c: Likewise.
8290 * fs/hfs.c: Likewise.
8291 * fs/hfsplus.c: Likewise.
8292 * fs/iso9660.c: Likewise.
8293 * fs/jfs.c: Likewise.
8294 * fs/minix.c: Likewise.
8295 * fs/sfs.c: Likewise.
8296 * fs/ufs.c: Likewise.
8297 * fs/xfs.c: Likewise.
8298 * hello/hello.c: Likewise.
8299 * include/grub/acorn_filecore.h: Likewise.
8300 * include/grub/arg.h: Likewise.
8301 * include/grub/bitmap.h: Likewise.
8302 * include/grub/boot.h: Likewise.
8303 * include/grub/cache.h: Likewise.
8304 * include/grub/device.h: Likewise.
8305 * include/grub/disk.h: Likewise.
8306 * include/grub/dl.h: Likewise.
8307 * include/grub/elfload.h: Likewise.
8308 * include/grub/env.h: Likewise.
8309 * include/grub/err.h: Likewise.
8310 * include/grub/file.h: Likewise.
8311 * include/grub/font.h: Likewise.
8312 * include/grub/fs.h: Likewise.
8313 * include/grub/fshelp.h: Likewise.
8314 * include/grub/gzio.h: Likewise.
8315 * include/grub/hfs.h: Likewise.
8316 * include/grub/kernel.h: Likewise.
8317 * include/grub/loader.h: Likewise.
8318 * include/grub/lvm.h: Likewise.
8319 * include/grub/misc.h: Likewise.
8320 * include/grub/mm.h: Likewise.
8321 * include/grub/net.h: Likewise.
8322 * include/grub/normal.h: Likewise.
8323 * include/grub/parser.h: Likewise.
8324 * include/grub/partition.h: Likewise.
8325 * include/grub/pc_partition.h: Likewise.
8326 * include/grub/raid.h: Likewise.
8327 * include/grub/rescue.h: Likewise.
8328 * include/grub/script.h: Likewise.
8329 * include/grub/setjmp.h: Likewise.
8330 * include/grub/symbol.h: Likewise.
8331 * include/grub/term.h: Likewise.
8332 * include/grub/terminfo.h: Likewise.
8333 * include/grub/tparm.h: Likewise.
8334 * include/grub/types.h: Likewise.
8335 * include/grub/video.h: Likewise.
8336 * include/grub/efi/api.h: Likewise.
8337 * include/grub/efi/chainloader.h: Likewise.
8338 * include/grub/efi/console.h: Likewise.
8339 * include/grub/efi/console_control.h: Likewise.
8340 * include/grub/efi/disk.h: Likewise.
8341 * include/grub/efi/efi.h: Likewise.
8342 * include/grub/efi/pe32.h: Likewise.
8343 * include/grub/efi/time.h: Likewise.
8344 * include/grub/i386/linux.h: Likewise.
8345 * include/grub/i386/setjmp.h: Likewise.
8346 * include/grub/i386/types.h: Likewise.
8347 * include/grub/i386/efi/kernel.h: Likewise.
8348 * include/grub/i386/efi/loader.h: Likewise.
8349 * include/grub/i386/efi/time.h: Likewise.
8350 * include/grub/i386/pc/biosdisk.h: Likewise.
8351 * include/grub/i386/pc/boot.h: Likewise.
8352 * include/grub/i386/pc/chainloader.h: Likewise.
8353 * include/grub/i386/pc/console.h: Likewise.
8354 * include/grub/i386/pc/init.h: Likewise.
8355 * include/grub/i386/pc/kernel.h: Likewise.
8356 * include/grub/i386/pc/loader.h: Likewise.
8357 * include/grub/i386/pc/memory.h: Likewise.
8358 * include/grub/i386/pc/multiboot.h: Likewise.
8359 * include/grub/i386/pc/serial.h: Likewise.
8360 * include/grub/i386/pc/time.h: Likewise.
8361 * include/grub/i386/pc/vbe.h: Likewise.
8362 * include/grub/i386/pc/vbeblit.h: Likewise.
8363 * include/grub/i386/pc/vbefill.h: Likewise.
8364 * include/grub/i386/pc/vbeutil.h: Likewise.
8365 * include/grub/i386/pc/vga.h: Likewise.
8366 * include/grub/ieee1275/ieee1275.h: Likewise.
8367 * include/grub/ieee1275/ofdisk.h: Likewise.
8368 * include/grub/powerpc/libgcc.h: Likewise.
8369 * include/grub/powerpc/setjmp.h: Likewise.
8370 * include/grub/powerpc/types.h: Likewise.
8371 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8372 * include/grub/powerpc/ieee1275/console.h: Likewise.
8373 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8374 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8375 * include/grub/powerpc/ieee1275/loader.h: Likewise.
8376 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8377 * include/grub/powerpc/ieee1275/time.h: Likewise.
8378 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8379 * include/grub/sparc64/libgcc.h: Likewise.
8380 * include/grub/sparc64/setjmp.h: Likewise.
8381 * include/grub/sparc64/types.h: Likewise.
8382 * include/grub/sparc64/ieee1275/console.h: Likewise.
8383 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8384 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8385 * include/grub/sparc64/ieee1275/time.h: Likewise.
8386 * include/grub/util/biosdisk.h: Likewise.
8387 * include/grub/util/getroot.h: Likewise.
8388 * include/grub/util/lvm.h: Likewise.
8389 * include/grub/util/misc.h: Likewise.
8390 * include/grub/util/raid.h: Likewise.
8391 * include/grub/util/resolve.h: Likewise.
8392 * io/gzio.c: Likewise.
8393 * kern/device.c: Likewise.
8394 * kern/disk.c: Likewise.
8395 * kern/dl.c: Likewise.
8396 * kern/elf.c: Likewise.
8397 * kern/env.c: Likewise.
8398 * kern/err.c: Likewise.
8399 * kern/file.c: Likewise.
8400 * kern/fs.c: Likewise.
8401 * kern/loader.c: Likewise.
8402 * kern/main.c: Likewise.
8403 * kern/misc.c: Likewise.
8404 * kern/mm.c: Likewise.
8405 * kern/parser.c: Likewise.
8406 * kern/partition.c: Likewise.
8407 * kern/rescue.c: Likewise.
8408 * kern/term.c: Likewise.
8409 * kern/efi/efi.c: Likewise.
8410 * kern/efi/init.c: Likewise.
8411 * kern/efi/mm.c: Likewise.
8412 * kern/i386/dl.c: Likewise.
8413 * kern/i386/efi/init.c: Likewise.
8414 * kern/i386/efi/startup.S: Likewise.
8415 * kern/i386/pc/init.c: Likewise.
8416 * kern/i386/pc/lzo1x.S: Likewise.
8417 * kern/i386/pc/startup.S: Likewise.
8418 * kern/ieee1275/ieee1275.c: Likewise.
8419 * kern/powerpc/cache.S: Likewise.
8420 * kern/powerpc/dl.c: Likewise.
8421 * kern/powerpc/ieee1275/cmain.c: Likewise.
8422 * kern/powerpc/ieee1275/crt0.S: Likewise.
8423 * kern/powerpc/ieee1275/init.c: Likewise.
8424 * kern/powerpc/ieee1275/openfw.c: Likewise.
8425 * kern/sparc64/cache.S: Likewise.
8426 * kern/sparc64/dl.c: Likewise.
8427 * kern/sparc64/ieee1275/init.c: Likewise.
8428 * kern/sparc64/ieee1275/openfw.c: Likewise.
8429 * loader/efi/chainloader.c: Likewise.
8430 * loader/efi/chainloader_normal.c: Likewise.
8431 * loader/i386/efi/linux.c: Likewise.
8432 * loader/i386/efi/linux_normal.c: Likewise.
8433 * loader/i386/pc/chainloader.c: Likewise.
8434 * loader/i386/pc/chainloader_normal.c: Likewise.
8435 * loader/i386/pc/linux.c: Likewise.
8436 * loader/i386/pc/linux_normal.c: Likewise.
8437 * loader/i386/pc/multiboot.c: Likewise.
8438 * loader/i386/pc/multiboot_normal.c: Likewise.
8439 * loader/powerpc/ieee1275/linux.c: Likewise.
8440 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8441 * normal/arg.c: Likewise.
8442 * normal/cmdline.c: Likewise.
8443 * normal/command.c: Likewise.
8444 * normal/completion.c: Likewise.
8445 * normal/execute.c: Likewise.
8446 * normal/function.c: Likewise.
8447 * normal/lexer.c: Likewise.
8448 * normal/main.c: Likewise.
8449 * normal/menu.c: Likewise.
8450 * normal/menu_entry.c: Likewise.
8451 * normal/misc.c: Likewise.
8452 * normal/parser.y: Likewise.
8453 * normal/script.c: Likewise.
8454 * normal/i386/setjmp.S: Likewise.
8455 * normal/powerpc/setjmp.S: Likewise.
8456 * normal/sparc64/setjmp.S: Likewise.
8457 * partmap/acorn.c: Likewise.
8458 * partmap/amiga.c: Likewise.
8459 * partmap/apple.c: Likewise.
8460 * partmap/gpt.c: Likewise.
8461 * partmap/pc.c: Likewise.
8462 * partmap/sun.c: Likewise.
8463 * term/gfxterm.c: Likewise.
8464 * term/terminfo.c: Likewise.
8465 * term/efi/console.c: Likewise.
8466 * term/i386/pc/console.c: Likewise.
8467 * term/i386/pc/serial.c: Likewise.
8468 * term/i386/pc/vesafb.c: Likewise.
8469 * term/i386/pc/vga.c: Likewise.
8470 * term/ieee1275/ofconsole.c: Likewise.
8471 * util/biosdisk.c: Likewise.
8472 * util/console.c: Likewise.
8473 * util/genmoddep.c: Likewise.
8474 * util/getroot.c: Likewise.
8475 * util/grub-emu.c: Likewise.
8476 * util/grub-mkdevicemap.c: Likewise.
8477 * util/grub-probe.c: Likewise.
8478 * util/lvm.c: Likewise.
8479 * util/misc.c: Likewise.
8480 * util/raid.c: Likewise.
8481 * util/resolve.c: Likewise.
8482 * util/update-grub.in: Likewise.
8483 * util/update-grub_lib.in: Likewise.
8484 * util/grub.d/00_header.in: Likewise.
8485 * util/grub.d/10_hurd.in: Likewise.
8486 * util/grub.d/10_linux.in: Likewise.
8487 * util/i386/efi/grub-install.in: Likewise.
8488 * util/i386/efi/grub-mkimage.c: Likewise.
8489 * util/i386/pc/grub-install.in: Likewise.
8490 * util/i386/pc/grub-mkimage.c: Likewise.
8491 * util/i386/pc/grub-mkrescue.in: Likewise.
8492 * util/i386/pc/grub-setup.c: Likewise.
8493 * util/i386/pc/misc.c: Likewise.
8494 * util/powerpc/ieee1275/grub-install.in: Likewise.
8495 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8496 * util/powerpc/ieee1275/misc.c: Likewise.
8497 * video/bitmap.c: Likewise.
8498 * video/video.c: Likewise.
8499 * video/i386/pc/vbe.c: Likewise.
8500 * video/i386/pc/vbeblit.c: Likewise.
8501 * video/i386/pc/vbefill.c: Likewise.
8502 * video/i386/pc/vbeutil.c: Likewise.
8503 * video/readers/tga.c: Likewise.
8505 2007-07-02 Robert Millan <rmh@aybabtu.com>
8507 * conf/i386-efi.rmk: Replace obsolete reference to
8508 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8509 with util/getroot.c.
8510 * conf/powerpc-ieee1275.rmk: Likewise.
8511 * conf/sparc64-ieee1275.rmk: Likewise.
8513 * util/grub-emu.c (main): Fix unchecked pointer handling.
8515 2007-07-02 Robert Millan <rmh@aybabtu.com>
8517 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8518 invocation to fail, in order to support partition-less media.
8520 * util/i386/pc/grub-install.in: Likewise.
8522 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8523 which fs or partmap modules are needed (akin to its sister scripts).
8525 Also use grub-probe to get rid of unportable /proc/mounts check.
8527 Print the same informational message that the other scripts do, before
8530 2007-06-23 Robert Millan <rmh@aybabtu.com>
8532 * util/update-grub_lib.in (font_path): New function. Determine whether
8533 a font file can be found and, if so, echo the GRUB path to it.
8535 * util/update-grub.in: Handle multiple terminals depending on user
8536 input, platform availability and font file presence. Propagate
8537 variables of our findings to /etc/grub.d/ children.
8539 * util/grub.d/00_header.in: Handle multiple terminals, based on
8540 environment setup by update-grub.
8542 2007-06-23 Robert Millan <rmh@aybabtu.com>
8544 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8546 2007-06-21 Robert Millan <rmh@aybabtu.com>
8548 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8549 indicate end of data section in kernel image.
8550 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8551 GRUB_KERNEL_MACHINE_DATA_END.
8553 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8555 * kern/i386/efi/startup.S: Likewise.
8557 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8558 during image generation. Implement --prefix option to override this
8560 * util/i386/efi/grub-mkimage.c: Likewise.
8562 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8563 code to make path relative to its root into a separate function.
8565 * util/i386/pc/grub-install.in: Use newly provided
8566 make_system_path_relative_to_its_root() to convert ${grubdir}, then
8567 pass the result to grub-install --prefix.
8569 2007-06-13 Robert Millan <rmh@aybabtu.com>
8571 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8573 * util/grub-emu.c: Use above definitions from misc.h instead of
8575 * util/grub-mkdevicemap.c: Likewise.
8576 * util/i386/pc/grub-setup.c: Likewise.
8577 * util/grub-probe.c: Likewise.
8578 (probe): Abort with grub_util_error() when either
8579 grub_guess_root_device or grub_util_get_grub_dev fails.
8581 2007-06-12 Robert Millan <rmh@aybabtu.com>
8583 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8585 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8587 * util/grub-probe.c (probe): Likewise for "drive_name".
8589 2007-06-11 Robert Millan <rmh@aybabtu.com>
8591 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8592 not just the cdrom one.
8594 2007-06-11 Robert Millan <rmh@aybabtu.com>
8596 * util/i386/pc/grub-mkrescue.in: Add "set -e".
8597 Add --pkglibdir=DIR option to override pkglibdir.
8598 Mention --image-type=TYPE in help output.
8599 Fix --grub-mkimage (it was a no-op).
8600 Abort gracefully when no parameter is given.
8602 2007-06-11 Robert Millan <rmh@aybabtu.com>
8604 * util/i386/pc/grub-mkrescue.in: New file.
8605 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
8606 * Makefile.in: Handle bin_SCRIPTS.
8608 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
8610 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8611 list of video modes.
8613 2007-06-06 Robert Millan <rmh@aybabtu.com>
8615 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8616 file doesn't exist, or if it is in a filesystem grub can't read.
8618 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
8619 not abort if GRUB_DRIVE could not be defined. Rearrange generated
8620 header comment to fit in 80 columns when the variables are resolved.
8622 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8623 could be identified by update-grub. Remove redundant check for
8624 unifont.pff existence (since convert_system_path_to_grub_path now
8627 2007-06-04 Robert Millan <rmh@aybabtu.com>
8629 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8631 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8633 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8635 2007-06-04 Robert Millan <rmh@aybabtu.com>
8637 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8639 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8640 grub_apple_partition_map_fini.
8643 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8644 to access >2 TiB disks).
8646 Print disk->total_sectors with %llu instead of %lu, since this
8647 variable is always 64-bit (prevents wrong disk size from being displayed
8648 on either >2 TiB disk or big-endian CPU).
8650 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8651 into a generic case that supports all (sane) partition maps.
8653 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8656 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8657 and grub_apple_partition_map_fini() after that.
8659 2007-06-01 Robert Millan <rmh@aybabtu.com>
8661 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8663 * util/grub.d/00_header.in: Only enable gfxterm when
8664 convert_system_path_to_grub_path() succeeds.
8666 2007-05-20 Robert Millan <rmh@aybabtu.com>
8668 * util/update-grub_lib.in: New file.
8669 * DISTLIST: Add update-grub_lib.in.
8670 * conf/common.rmk: Generate update-grub_lib and install it in
8672 * Makefile.in: Add install routine for $(lib_DATA).
8674 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8675 function provided by update-grub_lib to support arbitrary paths of
8677 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8678 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8680 2007-05-19 Robert Millan <rmh@aybabtu.com>
8682 * commands/i386/cpuid.c: New module.
8684 * conf/i386-efi.rmk: Enable cpuid.mod.
8685 * conf/i386-pc.rmk: Likewise.
8687 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8689 * kern/disk.c (grub_disk_read): Check return value of
8692 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8694 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8696 * disk/raid.c (grub_raid_open): Likewise.
8698 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8700 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8701 stack instead of on the heap.
8703 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8704 before doing a read on it.
8706 * configure.ac: Only use -fno-stack-protector for the target
8709 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8711 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8712 __attribute_ ((unused)) to mode_type argument.
8714 * util/getroot.c (grub_guess_root_device): Fix #endif.
8716 * kern/misc.c (memcmp): Fix prototype.
8718 * include/grub/partition.h [GRUB_UTIL]
8719 (grub_gpt_partition_map_init): Add prototype.
8720 (grub_gpt_partition_map_fini): Likewise.
8722 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8725 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8726 (grub_fat_read_data): Likewise.
8727 (grub_fat_find_dir): Likewise.
8729 * font/manager.c (find_glyph): Make table a const.
8730 (grub_font_get_glyph): Remove bitmap from if statement.
8732 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8734 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8735 code, first search for device in /dev/mapper, then in /dev.
8736 (grub_util_get_grub_dev): New function.
8737 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8739 * util/grub-probe.c (probe): Remove check for RAID, call
8740 grub_util_get_grub_dev() instead of
8741 grub_util_biosdisk_get_grub_dev().
8742 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8743 grub_util_biosdisk_get_grub_dev().
8744 * util/i386/pc/grub-setup.c (main): Likewise.
8746 2007-05-16 Robert Millan <rmh@aybabtu.com>
8748 * DISTLIST: Update for the latest changes.
8749 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8750 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8751 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8752 grub/util/biosdisk.h.
8753 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8754 grub/util/biosdisk.h.
8756 2007-05-16 Robert Millan <rmh@aybabtu.com>
8758 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8760 2007-05-16 Robert Millan <rmh@aybabtu.com>
8762 * util/i386/efi/grub-install.in: New.
8763 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8764 newly added grub-install.
8765 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8767 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8768 grub/util/biosdisk.h.
8769 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8770 grub/util/biosdisk.h.
8772 2007-05-16 Robert Millan <rmh@aybabtu.com>
8774 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8775 * include/grub/util/biosdisk.h: ... here.
8776 * util/i386/pc/biosdisk.c: Moved to ...
8777 * util/biosdisk.c: ... here.
8778 * util/i386/pc/getroot.c: Moved to ...
8779 * util/getroot.c: ... here.
8780 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8781 * util/grub-mkdevicemap.c: ... here.
8782 * util/i386/pc/grub-probe.c: Moved to ...
8783 * util/grub-probe.c: ... here.
8785 2007-05-15 Robert Millan <rmh@aybabtu.com>
8787 * util/update-grub.in: Remove duplicated line in grub.cfg header
8790 2007-05-13 Robert Millan <rmh@aybabtu.com>
8792 * util/update-grub.in: Fix a few assumptions about the devices holding
8793 /, /boot and /boot/grub being the same.
8794 * util/grub.d/00_header.in: Likewise.
8795 * util/grub.d/10_hurd.in: Likewise.
8796 * util/grub.d/10_linux.in: Likewise.
8798 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8799 patterns. Use that to define the `.old' suffix as older than `'.
8801 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8803 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8804 the grub.cfg header message.
8806 2007-05-11 Robert Millan <rmh@aybabtu.com>
8808 * util/update-grub.in: Create device.map if it doesn't already exist,
8809 before attempting to run grub-probe.
8810 Check for grub-probe and grub-mkdevicemap with the same code
8811 grub-install is using.
8814 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8816 * Makefile.in: Add the datarootdir autoconf variable.
8818 2007-05-09 Robert Millan <rmh@aybabtu.com>
8820 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
8821 fail gracefully if dev->disk->partition == NULL.
8823 2007-05-07 Robert Millan <rmh@aybabtu.com>
8825 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8826 determine partition map module.
8827 * util/i386/pc/grub-install.in: Use this feature to decide which
8828 partition module to load, instead of hardcoding pc and gpt.
8830 2007-05-07 Robert Millan <rmh@aybabtu.com>
8832 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8833 source directory differs from build directory.
8835 2007-05-05 Robert Millan <rmh@aybabtu.com>
8837 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8840 2007-05-05 Robert Millan <rmh@aybabtu.com>
8842 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8844 2007-05-05 Robert Millan <rmh@aybabtu.com>
8846 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8847 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8849 2007-05-05 Robert Millan <rmh@aybabtu.com>
8851 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8852 (grub_probe_SOURCES): Likewise.
8853 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8854 GPT and initialize dos_part and bsd_part accordingly.
8855 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8857 (main): Activate gpt module for use during partition identification,
8858 and deactivate it afterwards.
8859 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8860 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8861 partition identification, and deactivate it afterwards.
8863 2007-05-05 Robert Millan <rmh@aybabtu.com>
8865 * term/i386/pc/console.c (grub_console_fini): Call
8866 grub_term_set_current() before grub_term_unregister().
8868 2007-05-04 Robert Millan <rmh@aybabtu.com>
8870 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8871 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8872 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8873 and update-grub_DATA.
8874 * conf/common.rmk: Build and install update-grub components.
8875 * conf/common.mk: Regenerate.
8876 * util/update-grub.in: New. Core of update-grub.
8877 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8878 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8879 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8880 * util/grub.d/README: New. Document grub.d directory layout.
8882 2007-05-01 Robert Millan <rmh@aybabtu.com>
8884 * util/grub-emu.c: Move initialization functions
8885 grub_util_biosdisk_init() and grub_init_all() before
8886 grub_util_biosdisk_get_grub_dev(), which relies on them.
8888 2007-04-19 Robert Millan <rmh@aybabtu.com>
8890 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8893 2007-04-18 Jerone Young <jerone@gmail.com>
8895 * kernel/elf.c: Add missing parenthesis for conditional statement
8898 2007-04-10 Jerone Young <jerone@gmail.com>
8900 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8901 continue on and look for device node with real device name.
8903 2007-04-10 Jerone Young <jerone@gmail.com>
8905 * configure.ac: Add argument for autoconf to use transformation
8907 * Makefile.in: Add autoconf package transformation code.
8908 * util/i386/pc/grub-install.in: Likewise.
8909 * util/powerpc/ieee1275/grub-install.in: Likewise.
8911 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8913 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8914 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8915 (EXT2_REVISION): Likewise.
8916 (EXT2_INODE_SIZE): Likewise.
8917 (struct grub_ext2_block_group): Added a missing member
8919 (grub_ext2_read_inode): Divide by the inode size in a superblock
8920 instead of 128 to obtain INODES_PER_BLOCK.
8921 Use the macro EXT2_INODE_SIZE instead of directly using
8924 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8926 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8927 superblock instead of the structure size to compute an
8928 offset. This fixes the problem that GRUB could not read a
8929 filesystem when inode size is different from 128-byte.
8931 2007-03-05 Marco Gerards <marco@gnu.org>
8933 * normal/main.c (read_config_file): When "menu" is not set, create
8936 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8938 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8939 (HEAP_LIMIT): New macro.
8940 (grub_claim_heap): Claim memory up to `heaplimit'.
8942 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8944 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8945 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8947 (grub_arch_modules_addr): Return address after `_end'.
8948 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8949 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8950 (add_segments): Calculate `_end' from phdr size and location.
8951 (ALIGN_UP): Moved to ...
8952 * include/grub/misc.h: here.
8953 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8955 (GRUB_IEEE1275_MODULE_BASE): Removed.
8957 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8959 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8962 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8964 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8966 (grub_elf64_load_hook_t): Likewise.
8967 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8970 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8972 * kern/mm.c: Update copyright.
8973 (grub_mm_debug): Correct syntax error.
8974 (grub_mm_dump_free): New function.
8975 (grub_debug_free): Call `grub_free'.
8976 * include/grub/mm.h: Update copyright.
8977 (grub_mm_dump_free): Add declaration.
8979 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8981 * include/grub/ieee1275/ieee1275.h: Update copyright.
8982 * kern/powerpc/ieee1275/init.c: Likewise.
8983 * kern/powerpc/ieee1275/openfw.c: Likewise.
8985 * loader/powerpc/ieee1275/linux.c: Likewise.
8986 * include/grub/elfload.h: Likewise.
8987 * kern/elf.c: Likewise.
8988 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8990 (grub_elf64_load): Likewise.
8991 (grub_elf32_load_segment): Move to a nested function.
8992 (grub_elf64_load_segment): Likewise.
8994 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8996 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8998 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8999 (grub_heap_len): Likewise.
9000 (HEAP_SIZE): New macro.
9001 (grub_claim_heap): New function.
9002 (grub_machine_init): Don't claim heap directly. Call
9004 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9005 (grub_available_iterate): New function.
9007 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9009 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9010 * configure.ac: Use it for testing the HOST and TARGET compilers.
9012 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9014 * Makefile.in (enable_grub_emu): New variable.
9015 * configure.ac (--enable-grub-emu): New option.
9016 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9017 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9018 * conf/i386-pc.rmk: Likewise.
9019 * conf/powerpc-ieee1275.rmk: Likewise.
9020 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9022 2006-12-12 Marco Gerards <marco@gnu.org>
9024 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9026 * kern/env.c (grub_env_unset): Don't free the member `value' when
9027 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9030 * normal/main.c (current_menu): Removed.
9031 (free_menu): Unset the `menu' environment variable.
9032 (grub_normal_menu_addentry): Make use of the environment variable
9033 `menu', instead of using the global `current_menu'. Allocate
9034 memory for the sourcecode of this entry.
9035 (read_config_file): New argument `nested', changed all callers.
9036 Only in the case of a new context, initialize a new menu. Set the
9037 `menu' environment variable.
9038 (grub_normal_execute): Don't set and unset the environment
9039 variable `menu' here anymore. Only free the menu when leaving the
9042 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9045 2006-12-11 Marco Gerards <marco@gnu.org>
9047 * normal/menu_entry.c (run): Fix off by one bug so the last line
9048 is executed. Move the loader check to outside the loop.
9050 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9052 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9054 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9056 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9057 the number of sectors. Reported by Andrey Shuvikov
9058 <mr_hyro@yahoo.com>.
9060 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9062 * kern/disk.c (grub_disk_read): When there is a read error, always
9063 try to read only the necessary data.
9065 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9067 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9069 [GRUB_UTIL] (grub_raid_fini): Likewise.
9070 [GRUB_UTIL] (grub_lvm_init): Likewise.
9071 [GRUB_UTIL] (grub_lvm_fini): Likewise.
9072 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9073 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9074 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9075 and grub_raid_fini().
9077 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9079 * include/grub/types.h (__unused): Rename to UNUSED.
9080 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9081 (grub_elf64_size): Likewise.
9083 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9085 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9086 grub_error_push and grub_error_pop in the error-handling path.
9087 (grub_elf32_load_segment): Only call grub_file_read with non-zero
9090 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9092 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9093 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9095 (kernel_elf_SOURCES): Likewise.
9096 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9097 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9098 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9099 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9100 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9101 (elf_mod_SOURCES): New variable.
9102 (elf_mod_CFLAGS): Likewise.
9103 (elf_mod_LDFLAGS): Likewise.
9104 * include/grub/types.h (__unused): New macro.
9105 * include/grub/elfload.h: New file.
9106 * kern/elf.c: Likewise.
9107 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9108 (ELF32_LOADMASK): New macro.
9109 (ELF64_LOADMASK): Likewise.
9111 (grub_linux_load32): New function.
9112 (grub_linux_load64): Likewise.
9113 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9114 Use grub_elf_t instead of grub_file_t.
9116 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
9118 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9119 `catch_result' to struct set_color_args.
9121 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9123 * normal/menu.c: Include grub/script.h.
9124 * normal/menu_entry.c: Likewise.
9125 * include/grub/normal.h: Do not include grub/script.h.
9127 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9129 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9131 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9133 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9135 (grub_disk_close): Print debug messages when closing a disk.
9136 (grub_disk_read): Print debug messages when disk read fails.
9137 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9139 * kern/partition.c: Include misc.h.
9140 (grub_partition_iterate): Print debug messages when detecting
9143 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9145 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9147 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9149 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9151 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9152 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9154 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
9156 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9157 instead of sizeof(lv). Patch by Michael Guntsche.
9159 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
9161 * disk/lvm.c: Rename VGS to VG_LIST.
9162 (grub_lvm_iterate): Change VGS->LV to VG-LV.
9163 (grub_lvm_open): Likewise.
9164 Thanks to Michael Guntsche for finding this bug.
9166 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9168 * configure.ac (AC_INIT): Bumped to 1.95.
9170 2006-10-14 Robert Millan <rmh@aybabtu.com>
9172 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9173 with "/dev/.static/dev/md".
9175 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9177 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9178 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9179 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9180 DRIVE_NAME are always freed.
9182 * util/i386/pc/biosdisk.c (make_device_name): Add one into
9183 DOS_PART, as a DOS partition is counted from one instead of zero
9184 now. Reported by Robert Millan.
9186 2006-10-14 Robert Millan <rmh@aybabtu.com>
9188 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9189 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9190 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9191 string returned by grub_guess_root_device.
9192 * util/i386/pc/grub-setup.c: Likewise.
9193 * util/i386/pc/grub-probefs.c: Likewise.
9195 * util/i386/pc/grub-probefs.c: Rename to ...
9196 * util/i386/pc/grub-probe.c: ... this.
9197 * DISTLIST: Remove grub-probefs, add grub-probe.
9198 * conf/i386-efi.rmk: Likewise.
9199 * conf/i386-pc.rmk: Likewise.
9200 * util/i386/pc/grub-install.in: Likewise.
9202 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9203 choose which information we want to print.
9205 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9207 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9208 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9209 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9210 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9211 video/readers/tga.c and video/i386/pc/vbeutil.c.
9213 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9215 Added support for RAID and LVM.
9217 * disk/lvm.c: New file.
9218 * disk/raid.c: Likewise.
9219 * include/grub/lvm.h: Likewise.
9220 * include/grub/raid.h: Likewise.
9221 * include/grub/util/lvm.h: Likewise.
9222 * include/grub/util/raid.h: Likewise.
9223 * util/lvm.c: Likewise.
9224 * util/raid.c: Likewise.
9226 * include/grub/disk.h (grub_disk_dev_id): Add
9227 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9228 (grub_disk_get_size): New prototype.
9229 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9230 returns a partition.
9231 (grub_disk_get_size): New function.
9233 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9234 verbatim if grub_install_dos_part is -2.
9236 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9239 * util/i386/pc/grub-setup.c (setup): New argument
9240 MUST_EMBED. Force embedding of GRUB when the argument is
9241 true. Close FILE before returning.
9242 (main): Add support for RAID and LVM.
9244 * conf/common.rmk: Add RAID and LVM modules.
9245 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9247 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9249 * kern/misc.c (grub_strstr): New function.
9250 * include/grub/misc.h (grub_strstr): New prototype.
9252 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9254 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9256 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9258 * kern/misc.c (grub_strtoull): Guess the base only if not
9261 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9263 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9266 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9268 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9270 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9271 Remove `flags' argument. All callers changed.
9272 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9273 (IEEE1275_IHANDLE_INVALID): New variable.
9274 (IEEE1275_CELL_INVALID): New variable.
9275 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9276 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9277 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9278 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9279 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9280 codes from Open Firmware. All callers updated.
9281 (grub_ieee1275_next_property): Directly return Open Firmware return
9283 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9284 Standardize error checking from `grub_ieee1275_get_property'.
9285 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9286 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9288 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9290 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9291 `instance_to_package_args' to `instance_to_path_args'.
9293 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9294 `grub_ieee1275_chosen'.
9296 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9297 `grub_ieee1275_interpret'.
9299 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9301 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9303 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9305 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9306 (__cmpdi): Likewise.
9308 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9309 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9312 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
9314 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9315 to type `grub_ssize_t'.
9316 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9318 2006-09-22 Marco Gerards <marco@gnu.org>
9320 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9323 2006-09-22 Marco Gerards <marco@gnu.org>
9325 * commands/echo.c: New file.
9327 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9329 * conf/common.rmk (echo_mod_SOURCES): New variable.
9330 (echo_mod_CFLAGS): Likewise.
9331 (echo_mod_LDFLAGS): Likewise.
9333 2006-09-22 Marco Gerards <marco@gnu.org>
9335 * normal/main.c (get_line): Malloc memory instead of using
9336 preallocated memory. Removed the arguments `cmdline' and
9337 `max_len'. Updated all callers.
9339 2006-09-22 Marco Gerards <marco@gnu.org>
9341 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9342 (normal_mod_DEPENDENCIES): Likewise.
9344 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9345 (normal_mod_DEPENDENCIES): Likewise.
9347 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9349 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
9351 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9353 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9354 (normal_mod_DEPENDENCIES): Likewise.
9355 * conf/i386-pc.mk: Regenerate.
9356 * conf/i386-efi.mk: Likewise
9357 * conf/common.mk: Likewise.
9358 * conf/powerpc-ieee1275.mk: Likewise.
9359 * conf/sparc64-ieee1275.mk: Likewise.
9361 2006-09-22 Robert Millan <rmh@aybabtu.com>
9363 Sync with i386 version.
9364 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9365 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9367 2006-09-21 Robert Millan <rmh@aybabtu.com>
9369 Import from GRUB Legacy (lib/device.c):
9370 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9371 (init_device_map) [__linux__]: Add support for I2O devices.
9373 2006-09-14 Marco Gerards <marco@gnu.org>
9375 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9378 2006-09-14 Robert Millan <rmh@aybabtu.com>
9380 * util/i386/pc/grub-install.in: Skip menu.lst when removing
9383 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
9385 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9386 before adding it to device.map.
9388 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
9390 * genmk.rb: Let GCC generate dependencies the first time it
9391 compiles a file; using the -MD option.
9392 * conf/common.mk: Regenerate.
9393 * conf/i386-pc.mk: Likewise.
9394 * conf/i386-efi.mk: Likewise.
9395 * conf/powerpc-ieee1275.mk: Likewise.
9396 * conf/sparc64-ieee1275.mk: Likewise.
9398 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
9400 Move the prototypes of grub_setjmp and grub_longjmp to
9401 cpu/setjmp.h, so that each architecture may specify different
9404 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
9405 (grub_longjmp): Likewise.
9406 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
9407 (grub_longjmp): Likewise.
9408 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
9409 (grub_longjmp): Likewise.
9411 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
9412 [!GRUB_UTIL] (grub_longjmp): Removed.
9414 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
9416 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
9417 "color!" method does not return any value.
9419 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9421 * include/grub/bitmap.h: New file.
9423 * include/grub/i386/pc/vbeutil.h: Likewise.
9425 * video/bitmap.c: Likewise.
9427 * video/readers/tga.c: Likewise.
9429 * video/i386/pc/vbeutil.c: Likewise.
9431 * commands/videotest.c: Code cleanup and updated to reflect to new
9434 * term/gfxterm.c: Likewise.
9436 * video/video.c: Likewise.
9438 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
9439 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
9440 (bitmap_mod_SOURCES): New entry.
9441 (bitmap_mod_CFLAGS): Likewise.
9442 (bitmap_mod_LDFLAGS): Likewise.
9443 (tga_mod_SOURCES): Likewise.
9444 (tga_mod_CFLAGS): Likewise.
9445 (tga_mod_LDFLAGS): Likewise.
9447 * include/grub/video.h (grub_video_blit_operators): New enum type.
9448 (grub_video_render_target): Changed as forward declaration and moved
9449 actual definition to be video driver specific.
9450 (grub_video_adapter.blit_bitmap): Added blitting operator.
9451 (grub_video_adapter.blit_render_target): Likewise.
9452 (grub_video_blit_bitmap): Likewise.
9453 (grub_video_blit_render_target): Likewise.
9455 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9456 driver specific render target definition.
9457 (grub_video_vbe_map_rgba): Added driver internal helper.
9458 (grub_video_vbe_unmap_color): Updated to use
9459 grub_video_i386_vbeblit_info.
9460 (grub_video_vbe_get_video_ptr): Likewise.
9462 * include/grub/i386/pc/vbeblit.h
9463 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9464 grub_video_i386_vbeblit_info.
9465 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9466 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9467 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9468 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9469 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9470 (grub_video_i386_vbeblit_index_index): Likewise.
9471 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9472 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9473 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9474 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9476 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9479 * video/i386/pc/vbeblit.c: Updated to reflect changes on
9480 include/grub/i386/pc/vbeblit.h.
9482 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9483 Updated to use grub_video_i386_vbeblit_info.
9484 (grub_video_i386_vbefill_R8G8B8): Likewise.
9485 (grub_video_i386_vbefill_index): Likewise.
9486 (grub_video_i386_vbefill): Added generic filler.
9488 * video/i386/pc/vbefill.c: Updated to reflect changes on
9489 include/grub/i386/pc/vbefill.h.
9491 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9492 grub_video_i386_vbeblit_info.
9493 (grub_video_vbe_unmap_color): Likewise.
9494 (grub_video_vbe_blit_glyph): Likewise.
9495 (grub_video_vbe_scroll): Likewise.
9496 (grub_video_vbe_draw_pixel): Removed function.
9497 (grub_video_vbe_get_pixel): Likewise.
9498 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9499 updated code to use it.
9500 (common_blitter): Added common blitter for render target and bitmap.
9501 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9502 (grub_video_vbe_blit_render_target): Likewise.
9504 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
9506 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9507 is in text mode if there is no console control protocol instance
9510 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9512 * include/grub/video.h: Code cleanup.
9514 * include/grub/i386/pc/vbe.h: Likewise.
9516 * video/i386/pc/vbe.c: Likewise.
9518 * video/i386/pc/vbeblit.c: Likewise.
9520 * video/i386/pc/vbefill.c: Likewise.
9522 * video/video.c: Likewise. Also added more comments.
9524 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9526 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9527 (struct grub_biosdisk_dap): Likewise.
9529 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
9530 linkage settings for all functions.
9532 2006-07-12 Marco Gerards <marco@gnu.org>
9534 * configure.ac (--enable-mm-debug): Fix typo.
9536 * genkernsyms.sh.in: Use proper quoting for `CC'.
9538 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
9540 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9541 (normal_mod_ASFLAGS): Remove "-m32".
9543 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
9545 * util/misc.c: Include config.h.
9546 [!HAVE_MEMALIGN]: Do not include malloc.h.
9547 (grub_memalign): Use posix_memalign, if present. Then, use
9548 memalign, if present. Otherwise, emit an error.
9550 * util/grub-emu.c: Do not include malloc.h.
9552 * include/grub/util/misc.h: Include unistd.h. This is required for
9553 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9554 D. Eades III <hde@foobar-qux.org>.
9556 * configure.ac (AC_GNU_SOURCE): Added.
9557 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9560 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
9562 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9563 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9565 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
9567 * include/grub/types.h (grub_host_addr_t): Rename to
9569 (grub_host_off_t): Rename to grub_target_off_t.
9570 (grub_host_size_t): Rename to grub_target_size_t.
9571 (grub_host_ssize_t): Rename to grub_target_ssize_t.
9572 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9574 * include/grub/kernel.h (struct grub_module_header): Change type
9575 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9576 (grub_module_info): Likewise.
9578 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9580 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9581 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9582 Velazquez <jesus.velazquez@gmail.com>.
9584 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9586 Count partitions from 1 instead of 0 in the string representation
9587 of partitions. Still use 0-based internally.
9589 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9590 (sun_partition_map_iterate): Use grub_partition_t instead of
9591 struct grub_partition *. Cast DESC->START_CYLINDER to
9592 grub_uint64_t after converting the endian.
9593 (sun_partition_map_probe): Subtract 1 for PARTNUM.
9594 (sun_partition_map_get_name): Add 1 to P->INDEX.
9596 * partmap/pc.c (grub_partition_parse): Subtract 1 for
9598 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9600 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9601 zero instead of one.
9602 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9603 (gpt_partition_map_get_name): Add 1 into P->INDEX.
9605 * partmap/apple.c (apple_partition_map_iterate): Change the type
9607 (apple_partition_map_probe): Subtract 1 for PARTNUM.
9608 (apple_partition_map_get_name): Add 1 into P->INDEX.
9610 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9612 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9613 calculate the offset of a partition.
9614 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9615 (amiga_partition_map_get_name): Add 1 into P->INDEX.
9617 * partmap/acorn.c (acorn_partition_map_find): Change the type of
9618 SECTOR to grub_disk_addr_t.
9619 (acorn_partition_map_iterate): Likewise.
9620 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9621 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9623 (acorn_partition_map_get_name): Add 1 into P->INDEX.
9625 * kern/i386/pc/init.c (make_install_device): Add 1 into
9626 GRUB_INSTALL_DOS_PART.
9628 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9631 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9633 Clean up the code to support 64-bit addressing in disks and
9634 files. This change is not enough for filesystems yet.
9636 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9637 type of "start" to grub_uint64_t.
9638 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9639 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9640 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9643 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9644 to grub_disk_addr_t.
9646 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9649 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9651 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9654 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9656 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9658 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9660 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9661 to grub_off_t, to detect an error from grub_file_seek.
9662 (grub_multiboot_load_elf32): Likewise.
9664 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9665 maximum unsigned long value when an overflow is detected.
9666 (grub_strtoull): New function.
9667 (grub_divmod64): Likewise.
9668 (grub_lltoa): use grub_divmod64.
9670 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9672 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9673 the pointer to next character. Use grub_strtoull instead of
9675 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9676 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9679 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9680 return value is signed.
9681 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9682 test if OFFSET is less than zero, as OFFSET is unsigned now.
9684 * kern/disk.c (struct grub_disk_cache): Change the type of
9685 "sector" to grub_disk_addr_t.
9686 (grub_disk_cache_get_index): Change the type of SECTOR to
9687 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9688 unsigned after shifting.
9689 (grub_disk_cache_invalidate): Change the type of SECTOR to
9691 (grub_disk_cache_unlock): Likewise.
9692 (grub_disk_cache_store): Likewise.
9693 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9694 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9695 grub_disk_addr_t and grub_uint64_t, respectively.
9696 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9697 body, as the value of OFFSET is tweaked by
9698 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9699 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9701 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9702 body, as the value of OFFSET is tweaked by
9703 grub_disk_check_range. Change the types of LEN and N to
9706 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9707 and "saved_offset" to grub_off_t.
9708 (test_header): Cast BUF to char *.
9709 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9711 (grub_gzio_read): Change the types of OFFSET and SIZE to
9712 grub_off_t and grub_size_t, respectively.
9714 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9716 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9717 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9718 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9719 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9720 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9722 * include/grub/types.h (grub_off_t): Unconditionally set to
9724 (grub_disk_addr_t): Changed to grub_uint64_t.
9726 * include/grub/partition.h (struct grub_partition): Change the
9727 types of "start", "len" and "offset" to grub_disk_addr_t,
9728 grub_uint64_t and grub_disk_addr_t, respectively.
9729 (grub_partition_get_start): Return grub_disk_addr_t.
9730 (grub_partition_get_len): Return grub_uint64_t.
9732 * include/grub/misc.h (grub_strtoull): New prototype.
9733 (grub_divmod64): Likewise.
9735 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9736 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9737 grub_off_t, respectively.
9738 All callers and references changed.
9740 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9741 grub_size_t in "read".
9742 All callers and references changed.
9744 * include/grub/file.h (struct grub_file): Change the types of
9745 "offset" and "size" to grub_off_t and grub_off_t,
9746 respectively. Change the type of SECTOR to grub_disk_addr_t in
9748 (grub_file_read): Change the type of LEN to grub_size_t.
9749 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9751 (grub_file_size): Return grub_off_t.
9752 (grub_file_tell): Likewise.
9753 All callers and references changed.
9755 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9756 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9758 (struct grub_disk): Change the type of "total_sectors" to
9759 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
9761 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9762 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9763 (grub_disk_write): Likewise.
9764 All callers and references changed.
9766 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9767 char * for grub_strncmp to silence gcc.
9768 (grub_iso9660_mount): Likewise.
9769 (grub_iso9660_mount): Likewise.
9770 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9772 (grub_iso9660_iterate_dir): Likewise.
9773 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9775 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9776 LEN to grub_disk_addr_t and grub_size_t, respectively.
9778 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9780 * fs/jfs.c (grub_jfs_read_file): Likewise.
9782 * fs/minix.c (grub_jfs_read_file): Likewise.
9784 * fs/sfs.c (grub_jfs_read_file): Likewise.
9786 * fs/ufs.c (grub_jfs_read_file): Likewise.
9788 * fs/xfs.c (grub_jfs_read_file): Likewise.
9790 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9791 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9794 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9795 BLKNR to -1 instead of returning GRUB_ERRNO.
9796 (grub_ext2_read_file): Change the types of SECTOR and
9797 LEN to grub_disk_addr_t and grub_size_t, respectively.
9799 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9800 LEN to grub_disk_addr_t and grub_size_t, respectively.
9802 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9805 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9806 string. Do not cast SECTOR explicitly.
9808 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9809 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9810 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9811 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9812 over 2TB and LBA mode is not supported, raise an error.
9813 (get_safe_sectors): New function.
9814 (grub_biosdisk_read): Use get_safe_sectors.
9815 (grub_biosdisk_write): Likewise.
9817 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9818 (grub_efidisk_write): Likewise.
9820 * disk/loopback.c (delete_loopback): Cosmetic changes.
9821 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9823 (grub_loopback_open): Likewise.
9824 (grub_loopback_read): Likewise. Also, change the type of POS to
9825 grub_off_t, and fix the usage of grub_memset.
9827 * commands/i386/pc/play.c: Include grub/machine/time.h.
9829 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9832 * commands/configfile.c: Include grub/env.h.
9834 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9835 GRUB_ERRNO directly instead. Change the type of POS to
9836 grub_off_t. Follow the coding standard.
9838 * commands/blocklist.c: Include grub/partition.h.
9839 (grub_cmd_blocklist): Return an error if the underlying device is
9840 not a disk. Take the starting sector of a partition into account,
9841 if a partition is used.
9843 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9845 (lba_mode): Support 64-bit addresses.
9846 (chs_mode): Likewise.
9847 (copy_buffer): Adapted to the new offsets of a length field and a
9849 (blocklist_default_start): Allocate 64-bit space.
9851 * boot/i386/pc/boot.S (force_lba): Removed.
9852 (boot_drive): Moved to under KERNEL_SECTOR.
9853 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
9855 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9857 (lba_mode): Refactored to support a 64-bit address. More size
9859 (setup_sectors): Likewise.
9861 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9863 * DISTLIST: Added include/grub/i386/linux.h. Removed
9864 include/grub/i386/pc/linux.h
9866 * configure.ac (AC_INIT): Bumped to 1.94.
9868 * config.guess: Updated from gnulib.
9869 * config.sub: Likewise.
9870 * install-sh: Likewise.
9871 * mkinstalldirs: Likewise.
9873 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9875 * conf/common.rmk (grub_modules_init.lst): Depended on
9876 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9879 * genmk.rb (PModule::rule): Reverted the previous change.
9881 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9883 * conf/common.rmk (grub_modules_init.lst): Depends on
9884 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9885 that the target does not exist before producing.
9886 (grub_modules_init.h): Remove the target before generating.
9887 (grub_emu_init.c): Likewise.
9889 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9891 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9893 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9894 for the target-specific tests. Make sure that we also have the
9895 up-to-date target variables for those tests.
9897 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9899 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9900 (PModule::rule): Likewise.
9902 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9904 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9905 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9906 target-specific flags should be prefixed.
9907 (PModule::rule): Likewise.
9909 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9911 * configure.ac (CMP): Check if cmp is available explicitly.
9913 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9915 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9916 (target_cpu): New variable.
9917 (pkglibdir): Use target_cpu instead of host_cpu.
9919 * util/i386/pc/grub-install.in (host_cpu): Removed.
9920 (target_cpu): New variable.
9921 (pkglibdir): Use target_cpu instead of host_cpu.
9923 * util/genmoddep.c: Removed.
9925 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9926 instead of GRUB_HOST_SIZEOF_VOID_P.
9927 * kern/dl.c: Likewise.
9929 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9931 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9932 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9933 (GRUB_TARGET_SIZEOF_LONG): ... this.
9934 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9935 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9936 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9938 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9939 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9940 (GRUB_TARGET_SIZEOF_LONG): ... this.
9941 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9942 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9943 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9945 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9946 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9947 (GRUB_TARGET_SIZEOF_LONG): ... this.
9948 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9949 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9951 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9952 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9953 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9954 instead of GRUB_HOST_SIZEOF_LONG.
9955 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9956 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9957 GRUB_CPU_WORDS_BIGENDIAN.
9958 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9959 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9962 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9963 (genmoddep_SOURCES): Likewise.
9964 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9965 (genmoddep_SOURCES): Likewise.
9966 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9967 (genmoddep_SOURCES): Likewise.
9968 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9970 (genmoddep_SOURCES): Likewise.
9972 * genmoddep.awk: New file.
9974 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9975 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9976 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9977 (PModule::rule): Likewise.
9978 (Program::rule): Likewise.
9979 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9980 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9983 * configure.ac: Rewritten intensively to use host and target
9984 instead of build and host, respectively.
9986 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9987 (host_cpu): Removed.
9988 (target_cpu): New variable.
9989 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9990 (BUILD_CC): Removed.
9991 (BUILD_CFLAGS): Likewise.
9992 (BUILD_CPPFLAGS): Likewise.
9993 (TARGET_CC): New variable.
9994 (TARGET_CFLAGS): Likewise.
9995 (TARGET_CPPFLAGS): Likewise.
9996 (TARGET_LDFLAGS): Likewise.
9998 (include): Use target_cpu instead of host_cpu.
9999 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
10001 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10003 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10005 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10006 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10007 field 'false' to 'exec_on_false'.
10008 (grub_script_create_cmdif): Renamed argument names to reflect above
10011 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10013 * normal/script.c (grub_script_create_cmdif): Likewise.
10015 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10017 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10019 (grub_hfsplus_btree_recptr): Likewise.
10020 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10021 FILEBLOCK both to pass a block number and store next block
10023 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10024 overflow file correctly. Specify errors appropriately, because
10025 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10026 grub_hfsplus_btree_recptr to get the pointer to a found key.
10027 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10030 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10032 (_linux_mod_SOURCES): New variable.
10033 (_linux_mod_CFLAGS): Likewise.
10034 (_linux_mod_LDFLAGS): Likewise.
10035 (linux_mod_SOURCES): Likewise.
10036 (linux_mod_CFLAGS): Likewise.
10037 (linux_mod_LDFLAGS): Likewise.
10039 * DISTLIST: Added loader/i386/efi/linux.c,
10040 loader/i386/efi/linux_normal.c and
10041 include/grub/i386/efi/loader.h.
10043 * loader/i386/efi/linux.c: New file.
10044 * loader/i386/efi/linux_normal.c: Likewise.
10045 * include/grub/i386/efi/loader.h: Likewise.
10047 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10049 * commands/blocklist.c: New file.
10051 * DISTLIST: Added commands/blocklist.c.
10053 * term/efi/console.c (grub_console_highlight_color): Use a lighter
10054 color for the background, and a darker color for the foreground.
10055 (grub_console_checkkey): Return READ_KEY.
10056 (grub_console_cls): Set the background to
10057 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10059 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10061 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10062 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10064 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10067 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10068 BG. The spec is wrong again.
10070 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10072 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10074 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10075 commands/blocklist.c.
10076 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10078 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10079 (blocklist_mod_SOURCES): New variable.
10080 (blocklist_mod_CFLAGS): Likewise.
10081 (blocklist_mod_LDFLAGS): Likewise.
10083 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
10085 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10087 (lba_mode): Use %eax more intensively to reduce the code size.
10089 2006-05-20 Marco Gerards <marco@gnu.org>
10091 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10093 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
10095 (script): Accept leading newlines.
10096 (newlines): New rule to describe 0 or more newlines.
10097 (commands): Accept `command' with trailing newline. Fixed the
10098 order in which arguments were passed to `grub_script_add_cmd'.
10099 Accept commands separated by newlines.
10100 (function): Changed to accept newlines.
10101 (menuentry) Rewritten.
10103 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10104 front of the list, instead of to the end.
10106 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
10108 * util/i386/pc/grub-install.in (bindir): New variable.
10109 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10110 Shaver <lbgwjl@gmail.com>.
10112 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
10114 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10115 grub/machine/linux.h
10116 * loader/i386/pc/linux.c: Likewise.
10118 * include/grub/i386/pc/linux.h: Moved to ...
10119 * include/grub/i386/linux.h: ... here.
10121 * include/grub/i386/linux.h (struct linux_kernel_params): New
10124 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
10126 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10128 (grub_video_vbe_blit_glyph): Likewise.
10129 (grub_video_vbe_blit_bitmap): Likewise.
10130 (grub_video_vbe_blit_render_target): Likewise.
10132 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10134 * configure.ac (--with-platform): Properly quote the square
10137 2006-05-08 Marco Gerards <marco@gnu.org>
10139 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10141 (kernel_elf_HEADERS): ...to this. Updated all users.
10142 (grubof_symlist.c): Renamed from this...
10143 (kernel_elf_symlist.c): ...to this. Updated all users.
10144 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10145 (grubof_SOURCES): Renamed from this...
10146 (kernel_elf_SOURCES): ...to this.
10147 (grubof_HEADERS): Renamed from this...
10148 (kernel_elf_HEADERS): ...to this.
10149 (grubof_CFLAGS): Renamed from this...
10150 (kernel_elf_CFLAGS): ...to this.
10151 (grubof_ASFLAGS): Renamed from this...
10152 (kernel_elf_ASFLAGS): ...to this.
10153 (grubof_LDFLAGS): Renamed from this...
10154 (kernel_elf_LDFLAGS): ...to this.
10156 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10158 (kernel_elf_HEADERS): ...to this. Updated all users.
10159 (grubof_symlist.c): Renamed from this...
10160 (kernel_elf_symlist.c): ...to this. Updated all users.
10161 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10162 (grubof_SOURCES): Renamed from this...
10163 (kernel_elf_SOURCES): ...to this.
10164 (grubof_HEADERS): Renamed from this...
10165 (kernel_elf_HEADERS): ...to this.
10166 (grubof_CFLAGS): Renamed from this...
10167 (kernel_elf_CFLAGS): ...to this.
10168 (grubof_ASFLAGS): Renamed from this...
10169 (kernel_elf_ASFLAGS): ...to this.
10170 (grubof_LDFLAGS): Renamed from this...
10171 (kernel_elf_LDFLAGS): ...to this.
10173 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10174 `kernel.elf' instead of `grubof'.
10176 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
10178 Add --with-platform to configure. Use pkglibdir instead of
10179 pkgdatadir. This is reported by Roger Leigh.
10181 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10182 (host_vendor): Likewise.
10183 (host_os): Likewise.
10184 (pkgdatadir): Likewise.
10185 (platform): New variable.
10186 (pkglibdir): Likewise.
10187 Use PKGLIBDIR instead of PKGDATADIR.
10189 * util/i386/pc/grub-install.in (datadir): Removed.
10190 (host_vendor): Likewise.
10191 (host_os): Likewise.
10192 (pkgdatadir): Likewise.
10193 (platform): New variable.
10194 (pkglibdir): Likewise.
10195 Use PKGLIBDIR instead of PKGDATADIR.
10197 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10198 instead of GRUB_DATADIR.
10200 * util/i386/pc/grub-mkimage.c (usage): Likewise.
10202 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10205 * configure.ac (--with-platform): New option.
10206 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10208 * Makefile.in: Include a makefile based on PLATFORM instead of
10210 (pkgdatadir): Not appended by the machine type.
10211 (pkglibdir): Appended by the machine type.
10212 (host_vendor): Removed.
10213 (platform): New variable.
10214 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10215 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10216 (uninstall): Likewise.
10218 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10220 Use the environment context in the menu. Remove the commands
10221 "default" and "timeout", and use variables instead.
10223 * normal/menu.c: Include grub/env.h.
10224 (print_entry): Cast TITLE to silence gcc.
10225 (get_timeout): New function.
10226 (set_timeout): Likewise.
10227 (get_entry_number): Likewise.
10228 (run_menu): Use a default entry, a fallback entry and a timeout
10229 in the environment variables "default", "fallback" and
10230 "timeout". Also, tweak the default entry if it is not within the
10231 current menu entries.
10232 (grub_menu_run): Use a fallback entry in the environment variable
10235 * normal/main.c (read_config_file): Do not initialize
10236 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10238 (grub_normal_execute): Use a data slot to store the menu.
10240 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10241 fallback_entry and timeout.
10242 (struct grub_menu_list): Removed.
10243 (grub_menu_list_t): Likewise.
10244 (struct grub_context): Likewise.
10245 (grub_context_t): Likewise.
10246 (grub_context_get): Likewise.
10247 (grub_context_get_current_menu): Likewise.
10248 (grub_context_push_menu): Likewise.
10249 (grub_context_pop_menu): Likewise.
10250 (grub_default_init): Likewise.
10251 (grub_default_fini): Likewise.
10252 (grub_timeout_init): Likewise.
10253 (grub_timeout_fini): Likewise.
10255 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10257 (normal_mod_SOURCES): Removed normal/context.c.
10259 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10260 commands/default.c, commands/timeout.c and normal/context.c.
10261 (normal_mod_SOURCES): Removed normal/context.c.
10263 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10264 commands/timeout.c and normal/context.c.
10265 (normal_mod_SOURCES): Removed normal/context.c.
10267 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10268 commands/default.c, commands/timeout.c and normal/context.c.
10269 (normal_mod_SOURCES): Removed normal/context.c.
10271 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10273 (default_mod_SOURCES): Removed.
10274 (default_mod_CFLAGS): Likewise.
10275 (default_mod_LDFLAGS): Likewise.
10276 (timeout_mod_SOURCES): Removed.
10277 (timeout_mod_CFLAGS): Likewise.
10278 (timeout_mod_LDFLAGS): Likewise.
10280 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10283 * commands/default.c: Removed.
10284 * commands/timeout.c: Likewise.
10285 * normal/context.c: Likewise.
10287 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10289 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10291 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10293 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10294 "next" to "prev" for readability.
10295 (struct grub_env_sorted_var): New struct.
10296 (grub_env_context): Renamed to ...
10297 (initial_context): ... this.
10298 (grub_env_var_context): Renamed to ...
10299 (current_context): ... this.
10300 (grub_env_find): Look only at CURRENT_CONTEXT.
10301 (grub_env_context_open): Rewritten to copy exported variables from
10303 (grub_env_context_close): Rewritten according to the new
10304 scheme. Also, add an assertion to prevent the initial context from
10306 (grub_env_insert): Removed the code for the sorted list.
10307 (grub_env_remove): Likewise.
10308 (grub_env_export): Simply mark the variable with
10309 GRUB_ENV_VAR_GLOBAL.
10310 (grub_env_set): A cosmetic change for naming consistency.
10311 (grub_env_get): Likewise.
10312 (grub_env_unset): Likewise.
10313 (grub_env_iterate): Rewritten to sort variables within this
10315 (grub_register_variable_hook): Fixed for naming consistency. Call
10316 grub_env_find again, only if NAME is not found at the first time.
10317 (mangle_data_slot_name): New function.
10318 (grub_env_set_data_slot): Likewise.
10319 (grub_env_get_data_slot): Likewise.
10320 (grub_env_unset_data_slot): Likewise.
10322 * include/grub/env.h (grub_env_var_type): New enum.
10323 (GRUB_ENV_VAR_LOCAL): New constant.
10324 (GRUB_ENV_VAR_GLOBAL): Likewise.
10325 (GRUB_ENV_VAR_DATA): Likewise.
10326 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10328 (grub_env_set): Replace VAR with NAME for consistency.
10329 (grub_register_variable_hook): Likewise.
10330 (grub_env_export): Specify the name of the argument.
10331 (grub_env_set_data_slot): New prototype.
10332 (grub_env_get_data_slot): Likewise.
10333 (grub_env_unset_data_slot): Likewise.
10335 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10337 Extend the loader so that GRUB can accept a loader which comes
10338 back to GRUB when a loaded image exits. Also, this change adds
10339 support for a chainloader on EFI.
10341 * term/efi/console.c: Include grub/misc.h.
10342 (grub_console_checkkey): Display a scan code on the top for
10343 debugging. This will be removed once the EFI port gets stable.
10344 Correct the scan code mapping.
10346 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10347 allocate memory from larger regions, in order to reduce the number
10348 of allocated regions. Otherwise, the MacOSX loader panics.
10349 (filter_memory_map): Avoid less than 1MB for compatibility with
10351 (add_memory_regions): Allocate from the tail of a region, if
10352 possible, to avoid allocating a region near to 1MB, for the MacOSX
10355 * kern/efi/init.c (grub_efi_set_prefix): Specify
10356 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10358 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10359 argument IMAGE_HANDLE and specify it to get a loaded image.
10360 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10361 grub_efi_get_loaded_image.
10362 (grub_efi_get_filename): Divide the length by the size of
10364 (grub_efi_get_device_path): New function.
10365 (grub_efi_print_device_path): Print End Device Path nodes. Divide
10366 the length by the size of grub_efi_char16_t for a file path device
10369 * kern/loader.c (grub_loader_noreturn): New variable.
10370 (grub_loader_set): Accept a new argument NORETURN. Set
10371 GRUB_LOADER_NORETURN to NORETURN.
10372 All callers changed.
10373 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10376 * include/grub/efi/efi.h (grub_efi_get_device_path): New
10378 (grub_efi_get_loaded_image): Take an argument to specify an image
10381 * include/grub/loader.h (grub_loader_set): Added one more argument
10384 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10385 instead of grub_efi_open_protocol.
10386 (grub_efidisk_get_device_name): Likewise.
10387 (grub_efidisk_close): Print a newline.
10388 (grub_efidisk_get_device_handle): Fixed to use
10389 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10390 GRUB_EFI_DEVICE_PATH_TYPE.
10392 * disk/efi/efidisk.c (device_path_guid): Moved to ...
10393 * kern/efi/efi.c (device_path_guid): ... here.
10395 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
10397 (kernel_mod_HEADERS): Added efi/disk.h.
10398 (_chain_mod_SOURCES): New variable.
10399 (_chain_mod_CFLAGS): Likewise.
10400 (_chain_mod_LDFLAGS): Likewise.
10401 (chain_mod_SOURCES): Likewise.
10402 (chain_mod_CFLAGS): Likewise.
10403 (chain_mod_LDFLAGS): Likewise.
10405 * DISTLIST: Added include/grub/efi/chainloader.h,
10406 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
10408 * include/grub/efi/chainloader.h: New file.
10409 * loader/efi/chainloader.c: Likewise.
10410 * loader/efi/chainloader_normal.c: Likewise.
10412 2006-04-30 Marco Gerards <marco@gnu.org>
10414 * commands/configfile.c (grub_cmd_source): New function.
10415 (GRUB_MOD_INIT): Register the commands `source' and `.'.
10416 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
10418 2006-04-30 Marco Gerards <marco@gnu.org>
10420 * normal/execute.c (grub_script_execute_cmd): Change the return
10421 type to `grub_err_t'. Correctly return the error.
10422 (grub_script_execute_cmdline): In case a command line is not a
10423 command or a function, try to interpret it as an assignment.
10425 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10427 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
10428 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
10429 skip a node whose name is obviously invalid as UTF-16,
10430 i.e. contains a NUL character. Stop the iteration when the last
10431 directory entry is found. Instead of using the return value of
10432 grub_hfsplus_btree_iterate_node, store the value in RET and use
10433 it, because the iterator can be stopped by the last directory
10436 2006-04-30 Marco Gerards <marco@gnu.org>
10438 * include/grub/env.h (grub_env_export): New prototype. Reported
10439 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
10441 2006-04-30 Marco Gerards <marco@gnu.org>
10443 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
10444 size of the extents in a catalog file record.
10446 2006-04-29 Marco Gerards <marco@gnu.org>
10448 * commands/configfile.c (grub_cmd_configfile): Execute the
10449 configfile within its own context.
10451 * include/grub/env.h (grub_env_context_open): New prototype.
10452 (grub_env_context_close): Likewise.
10454 * kern/env.c (grub_env): Removed.
10455 (grub_env_sorted): Likewise.
10456 (grub_env_context): New variable.
10457 (grub_env_var_context): Likewise.
10458 (grub_env_find): Search both the active context and the global
10460 (grub_env_context_open): New function.
10461 (grub_env_context_close): Likewise.
10462 (grub_env_insert): Likewise.
10463 (grub_env_remove): Likewise.
10464 (grub_env_export): Likewise.
10465 (grub_env_set): Changed to use helper functions to avoid code
10467 (grub_env_iterate): Rewritten so both the current context and the
10468 global context are being used.
10470 * normal/command.c (export_command): New function.
10471 (grub_command_init): Register the `export' function.
10473 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
10475 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10476 explicitly to suppress gcc's warnings.
10477 * fs/fat.c (grub_fat_find_dir): Likewise.
10478 (grub_fat_label): Likewise.
10479 * fs/xfs.c (grub_xfs_read_inode): Likewise.
10480 (grub_xfs_mount): Likewise.
10481 (grub_xfs_label): Likewise.
10482 * fs/affs.c (grub_affs_mount): Likewise.
10483 (grub_affs_label): Likewise.
10484 (grub_affs_iterate_dir): Likewise.
10485 * fs/sfs.c (grub_sfs_mount): Likewise.
10486 (grub_sfs_iterate_dir): Likewise.
10487 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10488 * fs/hfs.c (grub_hfs_mount): Likewise.
10489 (grub_hfs_cmp_catkeys): Likewise.
10490 (grub_hfs_find_dir): Likewise.
10491 (grub_hfs_dir): Likewise.
10492 (grub_hfs_label): Likewise.
10493 * fs/jfs.c (grub_jfs_mount): Likewise.
10494 (grub_jfs_opendir): Likewise.
10495 (grub_jfs_getent): Likewise.
10496 (grub_jfs_lookup_symlink): Likewise.
10497 (grub_jfs_label): Likewise.
10498 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10499 (grub_hfsplus_iterate_dir): Likewise.
10500 (grub_hfsplus_btree_iterate_node): Made static.
10502 * util/grub-emu.c (prefix): New variable.
10503 (grub_machine_set_prefix): New function.
10504 (main): Do not set the environment variable "prefix" here. Only
10505 set PREFIX, which is used later by grub_machine_set_prefix.
10507 * include/grub/video.h: Do not include grub/symbol.h.
10508 (grub_video_register): Not exported. This symbol is not defined in
10510 (grub_video_unregister): Likewise.
10511 (grub_video_iterate): Likewise.
10512 (grub_video_setup): Likewise.
10513 (grub_video_restore): Likewise.
10514 (grub_video_get_info): Likewise.
10515 (grub_video_get_blit_format): Likewise.
10516 (grub_video_set_palette): Likewise.
10517 (grub_video_get_palette): Likewise.
10518 (grub_video_set_viewport): Likewise.
10519 (grub_video_get_viewport): Likewise.
10520 (grub_video_map_color): Likewise.
10521 (grub_video_map_rgb): Likewise.
10522 (grub_video_map_rgba): Likewise.
10523 (grub_video_fill_rect): Likewise.
10524 (grub_video_blit_glyph): Likewise.
10525 (grub_video_blit_bitmap): Likewise.
10526 (grub_video_blit_render_target): Likewise.
10527 (grub_video_scroll): Likewise.
10528 (grub_video_swap_buffers): Likewise.
10529 (grub_video_create_render_target): Likewise.
10530 (grub_video_delete_render_target): Likewise.
10531 (grub_video_set_active_render_target): Likewise.
10533 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10535 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10537 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10538 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10539 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10540 instead of $(srcdir)/genkernsyms.sh.
10542 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10543 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10544 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10545 instead of $(srcdir)/genkernsyms.sh.
10547 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10548 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10549 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10550 instead of $(srcdir)/genkernsyms.sh.
10552 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10553 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10554 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10555 instead of $(srcdir)/genkernsyms.sh.
10557 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10560 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10562 (gensymlist.sh): New target.
10563 (genkernsyms.sh): Likewise.
10565 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10566 genkernsyms.sh.in and gensymlist.sh.in.
10568 * genkernsyms.sh: Removed.
10569 * gensymlist.sh: Likewise.
10571 * genkernsyms.sh.in: New file.
10572 * gensymlist.sh.in: Likewise.
10574 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10576 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10577 clobber "prefix", since we may have already set it manually.
10579 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10581 * kern/misc.c (abort): New alias for grub_abort.
10583 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
10585 A new machine-specific function "grub_machine_set_prefix" is
10586 defined. This is called after loading modules, so that a prefix
10587 initialization can use modules. Also, this change adds an
10588 intensive debugging feature for the memory manager via the
10589 configure option "--enable-mm-debug".
10591 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10594 * kern/sparc64/ieee1275/init.c (abort): Removed.
10595 (grub_stop): Likewise.
10596 (grub_exit): New function.
10597 (grub_set_prefix): Renamed to ...
10598 (grub_machine_set_prefix): ... this.
10599 (grub_machine_init): Do not call grub_set_prefix.
10601 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10602 (grub_machine_set_prefix): ... this.
10603 (grub_machine_init): Do not call grub_set_prefix.
10605 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10606 (grub_machine_init): Do not set the prefix here.
10608 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10610 * kern/efi/init.c: Include grub/mm.h.
10611 (grub_efi_set_prefix): New function.
10613 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10614 (grub_efi_get_filename): New function.
10615 (grub_print_device_path): Renamed to ...
10616 (grub_efi_print_device_path): ... this.
10618 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10619 [MM_DEBUG] (grub_realloc): Likewise.
10620 [MM_DEBUG] (grub_free): Likewise.
10621 [MM_DEBUG] (grub_memalign): Likewise.
10622 [MM_DEBUG] (grub_mm_debug): New variable.
10623 [MM_DEBUG] (grub_debug_malloc): New function.
10624 [MM_DEBUG] (grub_debug_free): New function.
10625 [MM_DEBUG] (grub_debug_realloc): New function.
10626 [MM_DEBUG] (grub_debug_memalign): New function.
10628 * kern/misc.c (grub_abort): Print a newline to distinguish
10631 * kern/main.c (grub_main): Call grub_machine_set_prefix and
10632 grub_set_root_dev after loading modules. This is necessary when
10633 setting a prefix depends on modules.
10635 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10636 (grub_efi_print_device_path): ... this.
10637 (grub_efi_get_filename): New prototype.
10638 (grub_efi_set_prefix): Likewise.
10640 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10642 (grub_efidisk_get_device_handle): New prototype.
10643 (grub_efidisk_get_device_name): Likewise.
10645 * include/grub/mm.h: Include config.h.
10646 (MM_DEBUG): Removed.
10647 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10648 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10649 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10650 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10651 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10652 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10653 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10654 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10655 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10657 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10659 * disk/efi/efidisk.c: Include grub/partition.h.
10660 (iterate_child_devices): New function.
10661 (add_device): First, compare only last device path nodes, so that
10662 devices are sorted by the types.
10663 (grub_efidisk_get_device_handle): New function.
10664 (grub_efidisk_get_device_name): Likewise.
10666 * configure.ac (--enable-mm-debug): New option to enable the
10667 memory manager debugging feature. This makes the binary much
10668 bigger, so is disabled by default.
10670 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10672 Use grub_abort instead of grub_stop, and grub_exit must be
10673 define in each architecture now. Also, this change adds support
10676 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10677 (grub_getkey): New function.
10678 (grub_term_get_current): Likewise.
10680 * util/i386/pc/grub-setup.c: Include grub/term.h.
10681 (grub_getkey): New function.
10682 (grub_term_get_current): Likewise.
10684 * util/misc.c (grub_stop): Renamed to ...
10685 (grub_exit): ... this.
10687 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10688 (grub_exit): ... this.
10689 (grub_machine_init): Use grub_abort instead of abort.
10690 (grub_stop): Removed.
10692 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10695 * kern/i386/pc/startup.S (grub_exit): New function.
10696 (cold_reboot): New label.
10698 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10699 (grub_efi_init): Call grub_efidisk_init.
10700 (grub_efi_fini): Call grub_efidisk_fini.
10702 * kern/efi/efi.c: Include grub/mm.h.
10703 (grub_efi_console_control_guid): Renamed to ...
10704 (console_control_guid): ... this.
10705 (grub_efi_loaded_image_guid): Renamed to ...
10706 (loaded_image_guid): ... this.
10707 (grub_efi_locate_handle): New function.
10708 (grub_efi_open_protocol): Likewise.
10709 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10710 GRUB_EFI_CONSOLE_CONTROL_GUID.
10711 (grub_efi_exit): Removed.
10712 (grub_stop): Likewise.
10713 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10714 (grub_exit): New function.
10715 (grub_print_device_path): Likewise.
10717 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10718 (grub_enter_rescue_mode): Register "exit".
10720 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10721 (grub_abort): New function.
10723 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10725 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10727 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10729 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10730 (grub_print_device_path): New prototype.
10731 (grub_efi_locate_handle): Likewise.
10732 (grub_efi_open_protocol): Likewise.
10734 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10735 * disk/efi/efidisk.c: Likewise.
10737 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10739 * include/grub/efi/console_control.h
10740 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10742 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10743 last 8 bytes as an array.
10744 (GRUB_EFI_DISK_IO_GUID): New macro.
10745 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10746 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10747 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10749 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10750 (struct grub_efi_device_path): Rename the member "sub_type" to
10752 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10753 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10754 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10755 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10756 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10757 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10758 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10759 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10760 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10761 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10762 (struct grub_efi_pci_device_path): New structure.
10763 (grub_efi_pci_device_path_t): New type.
10764 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10765 (struct grub_efi_pccard_device_path): New structure.
10766 (grub_efi_pccard_device_path_t): New type.
10767 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10768 (struct grub_efi_memory_mapped_device_path): New structure.
10769 (grub_efi_memory_mapped_device_path_t): New type.
10770 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10771 (struct grub_efi_vendor_device_path): New structure.
10772 (grub_efi_vendor_device_path_t): New type.
10773 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10774 (struct grub_efi_controller_device_path): New structure.
10775 (grub_efi_controller_device_path_t): New type.
10776 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10777 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10778 (struct grub_efi_acpi_device_path): New structure.
10779 (grub_efi_acpi_device_path_t): New type.
10780 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10781 (struct grub_efi_expanded_acpi_device_path): New structure.
10782 (grub_efi_expanded_acpi_device_path_t): New type.
10783 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10784 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10785 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10786 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10787 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10788 (struct grub_efi_atapi_device_path): New structure.
10789 (grub_efi_atapi_device_path_t): New type.
10790 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10791 (struct grub_efi_fibre_channel_device_path): New structure.
10792 (grub_efi_fibre_channel_device_path_t): New type.
10793 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10794 (struct grub_efi_1394_device_path): New structure.
10795 (grub_efi_1394_device_path_t): New type.
10796 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10797 (struct grub_efi_usb_device_path): New structure.
10798 (grub_efi_usb_device_path_t): New type.
10799 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10800 (struct grub_efi_usb_class_device_path): New structure.
10801 (grub_efi_usb_class_device_path_t): New type.
10802 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10803 (struct grub_efi_i2o_device_path): New structure.
10804 (grub_efi_i2o_device_path_t): New type.
10805 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10806 (struct grub_efi_mac_address_device_path): New structure.
10807 (grub_efi_mac_address_device_path_t): New type.
10808 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10809 (struct grub_efi_ipv4_device_path): New structure.
10810 (grub_efi_ipv4_device_path_t): New type.
10811 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10812 (struct grub_efi_ipv6_device_path): New structure.
10813 (grub_efi_ipv6_device_path_t): New type.
10814 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10815 (struct grub_efi_infiniband_device_path): New structure.
10816 (grub_efi_infiniband_device_path_t): New type.
10817 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10818 (struct grub_efi_uart_device_path): New structure.
10819 (grub_efi_uart_device_path_t): New type.
10820 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10821 (struct grub_efi_vendor_messaging_device_path): New structure.
10822 (grub_efi_vendor_messaging_device_path_t): New type.
10823 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10824 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10825 (struct grub_efi_hard_drive_device_path): New structure.
10826 (grub_efi_hard_drive_device_path_t): New type.
10827 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10828 (struct grub_efi_cdrom_device_path): New structure.
10829 (grub_efi_cdrom_device_path_t): New type.
10830 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10831 (struct grub_efi_vendor_media_device_path): New structure.
10832 (grub_efi_vendor_media_device_path_t): New type.
10833 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10834 (struct grub_efi_file_path_device_path): New structure.
10835 (grub_efi_file_path_device_path_t): New type.
10836 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10837 (struct grub_efi_protocol_device_path): New structure.
10838 (grub_efi_protocol_device_path_t): New type.
10839 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10840 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10841 (struct grub_efi_bios_device_path): New structure.
10842 (grub_efi_bios_device_path_t): New type.
10843 (struct grub_efi_disk_io): New structure.
10844 (grub_efi_disk_io_t): New type.
10845 (struct grub_efi_block_io_media): New structure.
10846 (grub_efi_block_io_media_t): New type.
10847 (struct grub_efi_block_io): New structure.
10848 (grub_efi_block_io_t): New type.
10850 * include/grub/misc.h (grub_stop): Removed.
10851 (grub_exit): New prototype.
10852 (grub_abort): Likewise.
10854 * include/grub/disk.h (enum grub_disk_dev_id): Added
10855 GRUB_DISK_DEVICE_EFIDISK_ID.
10857 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10858 disk/efi/efidisk.c.
10859 (kernel_syms.lst): Remove the target if an error occurs.
10861 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10863 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10864 as it was simply too buggy.
10866 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10868 * kern/misc.c (grub_lltoa): New function.
10869 (grub_vsprintf): Added support for the long long suffix,
10872 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10874 * Makefile.in (LDFLAGS): Add variable.
10875 (LD): Remove variable.
10876 * configure.ac: Add -m32 to LDFLAGS.
10877 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10878 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10879 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10880 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10881 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10883 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10884 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10885 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10887 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10889 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10890 length for unknown glyph.
10892 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10894 Add support for pre-loaded modules into the EFI port.
10896 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10897 completely. Accept one more argument DIR. The caller has changed.
10899 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10901 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10902 (grub_efi_loaded_image_guid): New variable.
10903 (grub_efi_get_loaded_image): New function.
10904 (grub_arch_modules_addr): Likewise.
10906 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10909 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10910 (struct grub_efi_loaded_image): New structure.
10911 (grub_efi_loaded_image_t): New type.
10913 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10915 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10916 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10917 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10919 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10921 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10923 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10925 * DISTLIST: Added include/grub/efi/console.h,
10926 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10927 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10929 * include/grub/efi/console.h: New file.
10930 * include/grub/efi/time.h: Likewise.
10931 * include/grub/i386/efi/kernel.h: Likewise.
10932 * kern/efi/init.c: Likewise.
10933 * kern/efi/mm.c: Likewise.
10934 * term/efi/console.c: Likewise.
10936 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10937 (grub_stop): Removed.
10938 (grub_get_rtc): Likewise.
10939 (grub_machine_init): Simply call grub_efi_init.
10940 (grub_machine_fini): Call grub_efi_fini.
10942 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10943 (grub_efi_output_string): Removed.
10944 (grub_efi_stall): New function.
10945 (grub_stop): Likewise.
10946 (grub_get_rtc): Likewise.
10948 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10949 (grub_efi_stall): New prototype.
10950 (grub_efi_allocate_pages): Likewise.
10951 (grub_efi_free_pages): Likewise.
10952 (grub_efi_get_memory_map): Likewise.
10953 (grub_efi_mm_init): Likewise.
10954 (grub_efi_mm_fini): Likewise.
10955 (grub_efi_init): Likewise.
10956 (grub_efi_fini): Likewise.
10958 * include/grub/i386/efi/time.h: Do not include
10959 grub/symbol.h. Include grub/efi/time.h.
10960 (GRUB_TICKS_PER_SECOND): Removed.
10961 (grub_get_rtc): Likewise.
10963 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10964 Added padding. The EFI spec is buggy.
10965 (GRUB_EFI_BLACK): New macro.
10966 (GRUB_EFI_BLUE): Likewise.
10967 (GRUB_EFI_GREEN): Likewise.
10968 (GRUB_EFI_CYAN): Likewise.
10969 (GRUB_EFI_RED): Likewise.
10970 (GRUB_EFI_MAGENTA): Likewise.
10971 (GRUB_EFI_BROWN): Likewise.
10972 (GRUB_EFI_LIGHTGRAY): Likewise.
10973 (GRUB_EFI_BRIGHT): Likewise.
10974 (GRUB_EFI_DARKGRAY): Likewise.
10975 (GRUB_EFI_LIGHTBLUE): Likewise.
10976 (GRUB_EFI_LIGHTGREEN): Likewise.
10977 (GRUB_EFI_LIGHTCYAN): Likewise.
10978 (GRUB_EFI_LIGHTRED): Likewise.
10979 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10980 (GRUB_EFI_YELLOW): Likewise.
10981 (GRUB_EFI_WHITE): Likewise.
10982 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10983 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10984 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10985 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10986 (GRUB_EFI_BACKGROUND_RED): Likewise.
10987 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10988 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10989 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10990 (GRUB_EFI_TEXT_ATTR): Likewise.
10992 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10993 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10994 (kernel_mod_HEADERS): Added efi/time.h.
10996 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10998 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10999 include/grub/efi/api.h, include/grub/efi/console_control.h,
11000 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11001 include/grub/i386/efi/time.h, kern/efi/efi.c,
11002 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11003 and util/i386/efi/grub-mkimage.c.
11005 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11007 * genmk.rb (PModule#rule): Do not export symbols if
11008 #{prefix}_EXPORTS is set to "no".
11010 * conf/i386-efi.mk: New file.
11011 * conf/i386-efi.rmk: Likewise.
11012 * include/grub/efi/api.h: Likewise.
11013 * include/grub/efi/console_control.h: Likewise.
11014 * include/grub/efi/efi.h: Likewise.
11015 * include/grub/efi/pe32.h: Likewise.
11016 * include/grub/i386/efi/time.h: Likewise.
11017 * kern/efi/efi.c: Likewise.
11018 * kern/i386/efi/init.c: Likewise.
11019 * kern/i386/efi/startup.S: Likewise.
11020 * util/i386/efi/grub-mkimage.c: Likewise.
11022 2006-04-17 Marco Gerards <marco@gnu.org>
11024 * include/grub/script.h: Include <grub/parser.h> and
11025 "grub_script.tab.h".
11026 (struct grub_lexer_param): New struct.
11027 (struct grub_parser_param): Likewise.
11028 (grub_script_create_arglist): Pass the state in an argument.
11029 (grub_script_add_arglist): Likewise.
11030 (grub_script_create_cmdline): Likewise.
11031 (grub_script_create_cmdblock): Likewise.
11032 (grub_script_create_cmdif): Likewise.
11033 (grub_script_create_cmdmenu): Likewise.
11034 (grub_script_add_cmd): Likewise.
11035 (grub_script_arg_add): Likewise.
11036 (grub_script_lexer_ref): Likewise.
11037 (grub_script_lexer_deref): Likewise.
11038 (grub_script_lexer_record_start): Likewise.
11039 (grub_script_lexer_record_stop): Likewise.
11040 (grub_script_mem_record): Likewise.
11041 (grub_script_mem_record_stop): Likewise.
11042 (grub_script_malloc): Likewise.
11043 (grub_script_yylex): Likewise.
11044 (grub_script_yyparse): Likewise.
11045 (grub_script_yyerror): Likewise.
11046 (grub_script_yylex): Likewise.
11047 (grub_script_lexer_init): Return the state.
11049 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11050 (grub_script_lexer_done): Likewise.
11051 (grub_script_lexer_getline): Likewise.
11052 (grub_script_lexer_refs): Likewise.
11053 (script): Likewise.
11054 (newscript): Likewise.
11055 (record): Likewise.
11056 (recording): Likewise.
11057 (recordpos): Likewise.
11058 (recordlen): Likewise.
11059 (grub_script_lexer_init): Return the state instead of setting
11061 (grub_script_lexer_ref): Use the newly added argument for state
11062 instead of globals.
11063 (grub_script_lexer_deref): Likewise.
11064 (grub_script_lexer_record_start): Likewise.
11065 (grub_script_lexer_record_stop): Likewise.
11066 (recordchar): Likewise.
11067 (nextchar): Likewise.
11068 (grub_script_yylex2): Likewise.
11069 (grub_script_yylex): Likewise.
11070 (grub_script_yyerror): Likewise.
11072 * normal/parser.y (func_mem): Removed variable.
11073 (menu_entry): Likewise.
11075 (%lex-param): New parser option.
11076 (%parse-param): Likewise.
11077 (script): Always return the AST.
11078 (argument): Pass the state around.
11079 (arguments): Likewise.
11080 (grubcmd): Likewise.
11081 (commands): Likewise.
11082 (function): Likewise.
11083 (menuentry): Likewise.
11084 (if_statement): Likewise.
11087 * normal/script.c (grub_script_memused): Removed variable.
11088 (grub_script_parsed): Likewise.
11089 (grub_script_malloc): Added a state argument. Use that instead of
11091 (grub_script_mem_record): Likewise.
11092 (grub_script_mem_record_stop): Likewise.
11093 (grub_script_arg_add): Likewise.
11094 (grub_script_add_arglist): Likewise.
11095 (grub_script_create_cmdline): Likewise.
11096 (grub_script_create_cmdif): Likewise.
11097 (grub_script_create_cmdmenu): Likewise.
11098 (grub_script_add_cmd): Likewise.
11099 (grub_script_parse): Setup the state before calling the parser.
11101 2006-04-16 Marco Gerards <marco@gnu.org>
11103 * normal/command.c (grub_command_init): Remove the title command.
11105 * normal/lexer.c (grub_script_yylex): Renamed from this...
11106 (grub_script_yylex2): ... to this.
11107 (grub_script_yylex): New function. Temporary
11108 introduced to filter some tokens.
11109 (grub_script_yyerror): Print a newline.
11111 * normal/main.c (read_config_file): Output information about the
11112 lines that contain errors. Wait for a key after all lines have
11113 been processed. Don't return an empty menu.
11115 * normal/parser.y (func_mem): Don't initialize.
11116 (menu_entry): Likewise.
11117 (err): New variable.
11118 (script): Don't return anything when an error was encountered.
11119 (ws, returns): Removed rules.
11120 (argument): Disabled concatenated variable support.
11121 (arguments): Remove explicit separators.
11122 (grubcmd): Likewise.
11123 (function): Likewise.
11124 (menuentry): Likewise.
11126 (commands): Likewise. Add error handling.
11128 * normal/script.c (grub_script_create_cmdline): If
11129 `grub_script_parsed' is 0, assume the parser encountered an error.
11131 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11133 * configure.ac: Add support for EFI. Fix the typo
11134 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11136 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11138 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11139 foreign multibyte characters should be shown correctly.
11141 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11143 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11145 (read_config_file): Made it to close file before returning.
11147 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11149 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11150 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11151 video/i386/pc/vbefill.c.
11153 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11154 video/i386/pc/vbefill.c.
11156 * include/grub/video.h (grub_video_blit_format): New enum.
11157 (grub_video_mode_info): Added new member blit_format.
11158 (grub_video_get_blit_format): New function prototype.
11160 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11161 function prototype.
11162 (grub_video_vbe_map_rgb): Likewise.
11163 (grub_video_vbe_unmap_color): Likewise.
11165 * include/grub/i386/pc/vbeblit.h: New file.
11167 * include/grub/i386/pc/vbefill.h: New file.
11169 * video/video.c (grub_video_get_blit_format): New function.
11170 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11171 (grub_video_vbe_map_rgb): Likewise.
11172 (grub_video_vbe_unmap_color): Likewise.
11174 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11176 (grub_video_vbe_blit_render_target): Changed to use more optimized
11178 (grub_video_vbe_setup): Added detection for optimized settings.
11179 (grub_video_vbe_create_render_target): Likewise.
11181 * video/i386/pc/vbeblit.c: New file.
11183 * video/i386/pc/vbefill.c: New file.
11185 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
11187 * font/manager.c (grub_font_get_glyph): Removed font fixup from
11190 * util/unifont2pff.rb: ... and moved it to here. Improved argument
11191 parsing to support both hex and dec ranges. If filename was missing
11192 show usage information.
11194 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
11196 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11197 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
11199 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11200 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
11201 (video_mod_SOURCES): Added.
11202 (video_mod_CFLAGS): Likewise.
11203 (video_mod_LDFLAGS): Likewise.
11204 (gfxterm_mod_SOURCES): Likewise.
11205 (gfxterm_mod_CFLAGS): Likewise.
11206 (gfxterm_mod_LDFLAGS): Likewise.
11207 (videotest_mod_SOURCES): Likewise.
11208 (videotest_mod_CFLAGS): Likewise.
11209 (videotest_mod_LDFLAGS): Likewise.
11210 (vesafb_mod_SOURCES): Removed.
11211 (vesafb_mod_CFLAGS): Likewise.
11212 (vesafb_mod_LDFLAGS): Likewise.
11213 (vga_mod_SOURCES): Likewise.
11214 (vga_mod_CFLAGS): Likewise.
11215 (vga_mod_LDFLAGS): Likewise.
11217 * commands/videotest.c: New file.
11219 * font/manager.c (fill_with_default_glyph): Modified to use
11221 (grub_font_get_glyph): Likewise.
11222 (fontmanager): Renamed from this...
11223 (font_manager): ... to this.
11225 * include/grub/font.h (grub_font_glyph): Added new structure.
11226 (grub_font_get_glyph): Modified to use grub_font_glyph.
11228 * include/grub/misc.h (grub_abs): Added as inline function.
11230 * include/grub/video.h: New file.
11232 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11233 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11234 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11235 (grub_vbe_get_controller_info): Renamed from this...
11236 (grub_vbe_bios_get_controller_info): ... to this.
11237 (grub_vbe_get_mode_info): Renamed from this...
11238 (grub_vbe_bios_get_mode_info): ... to this.
11239 (grub_vbe_set_mode): Renamed from this...
11240 (grub_vbe_bios_set_mode): ... to this.
11241 (grub_vbe_get_mode): Renamed from this...
11242 (grub_vbe_bios_get_mode): ... to this.
11243 (grub_vbe_set_memory_window): Renamed from this...
11244 (grub_vbe_bios_set_memory_window): ... to this.
11245 (grub_vbe_get_memory_window): Renamed from this...
11246 (grub_vbe_bios_get_memory_window): ... to this.
11247 (grub_vbe_set_scanline_length): Renamed from this...
11248 (grub_vbe_set_scanline_length): ... to this.
11249 (grub_vbe_get_scanline_length): Renamed from this...
11250 (grub_vbe_bios_get_scanline_length): ... to this.
11251 (grub_vbe_set_display_start): Renamed from this...
11252 (grub_vbe_bios_set_display_start): ... to this.
11253 (grub_vbe_get_display_start): Renamed from this...
11254 (grub_vbe_bios_get_display_start): ... to this.
11255 (grub_vbe_set_palette_data): Renamed from this...
11256 (grub_vbe_bios_set_palette_data): ... to this.
11257 (grub_vbe_set_pixel_rgb): Removed.
11258 (grub_vbe_set_pixel_index): Likewise.
11260 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11262 (grub_vbe_bios_get_controller_info): ... to this.
11263 (grub_vbe_get_mode_info): Renamed from this...
11264 (grub_vbe_bios_get_mode_info): ... to this.
11265 (grub_vbe_set_mode): Renamed from this...
11266 (grub_vbe_bios_set_mode): ... to this.
11267 (grub_vbe_get_mode): Renamed from this...
11268 (grub_vbe_bios_get_mode): ... to this.
11269 (grub_vbe_set_memory_window): Renamed from this...
11270 (grub_vbe_bios_set_memory_window): ... to this.
11271 (grub_vbe_get_memory_window): Renamed from this...
11272 (grub_vbe_bios_get_memory_window): ... to this.
11273 (grub_vbe_set_scanline_length): Renamed from this...
11274 (grub_vbe_set_scanline_length): ... to this.
11275 (grub_vbe_get_scanline_length): Renamed from this...
11276 (grub_vbe_bios_get_scanline_length): ... to this.
11277 (grub_vbe_set_display_start): Renamed from this...
11278 (grub_vbe_bios_set_display_start): ... to this.
11279 (grub_vbe_get_display_start): Renamed from this...
11280 (grub_vbe_bios_get_display_start): ... to this.
11281 (grub_vbe_set_palette_data): Renamed from this...
11282 (grub_vbe_bios_set_palette_data): ... to this.
11283 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11284 getting corrupted after calling it. Added more pushes and pops.
11285 (grub_vbe_bios_set_mode): Likewise.
11286 (grub_vbe_bios_get_mode): Likewise.
11287 (grub_vbe_bios_get_memory_window): Likewise.
11288 (grub_vbe_bios_set_scanline_length): Likewise.
11289 (grub_vbe_bios_get_scanline_length): Likewise.
11290 (grub_vbe_bios_get_display_start): Likewise.
11291 (grub_vbe_bios_set_palette_data): Likewise.
11293 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11294 (cl_insert): Likewise.
11295 (cl_delete): Likewise.
11297 * term/gfxterm.c: New file.
11299 * term/i386/pc/vesafb.c: Removed file.
11301 * video/video.c: New file.
11303 * video/i386/pc/vbe.c (real2pm): Added new function.
11304 (grub_video_vbe_draw_pixel): Likewise.
11305 (grub_video_vbe_get_video_ptr): Likewise.
11306 (grub_video_vbe_get_pixel): Likewise
11307 (grub_video_vbe_init): Likewise.
11308 (grub_video_vbe_fini): Likewise.
11309 (grub_video_vbe_setup): Likewise.
11310 (grub_video_vbe_get_info): Likewise.
11311 (grub_video_vbe_set_palette): Likewise.
11312 (grub_video_vbe_get_palette): Likewise.
11313 (grub_video_vbe_set_viewport): Likewise.
11314 (grub_video_vbe_get_viewport): Likewise.
11315 (grub_video_vbe_map_color): Likewise.
11316 (grub_video_vbe_map_rgb): Likewise.
11317 (grub_video_vbe_map_rgba): Likewise.
11318 (grub_video_vbe_unmap_color): Likewise.
11319 (grub_video_vbe_fill_rect): Likewise.
11320 (grub_video_vbe_blit_glyph): Likewise.
11321 (grub_video_vbe_blit_bitmap): Likewise.
11322 (grub_video_vbe_blit_render_target): Likewise.
11323 (grub_video_vbe_scroll): Likewise.
11324 (grub_video_vbe_swap_buffers): Likewise.
11325 (grub_video_vbe_create_render_target): Likewise.
11326 (grub_video_vbe_delete_render_target): Likewise.
11327 (grub_video_vbe_set_active_render_target): Likewise.
11328 (grub_vbe_set_pixel_rgb): Remove function.
11329 (grub_vbe_set_pixel_index): Likewise.
11330 (index_color_mode): Remove static variable.
11331 (active_mode): Likewise.
11332 (framebuffer): Likewise.
11333 (bytes_per_scan_line): Likewise.
11334 (grub_video_vbe_adapter): Added new static variable.
11335 (framebuffer): Likewise.
11336 (render_target): Likewise.
11337 (initial_mode): Likewise.
11338 (mode_in_use): Likewise.
11339 (mode_list): Likewise.
11341 2006-03-10 Marco Gerards <marco@gnu.org>
11343 * configure.ac (AC_INIT): Bumped to 1.93.
11345 * DISTLIST: Added `include/grub/hfs.h'.
11347 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11349 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11350 18H, which might help the BIOS falling back to next boot media.
11352 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11354 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11355 Poe Chen <poe.poechen@gmail.com>.
11357 2006-01-17 Marco Gerards <marco@gnu.org>
11359 * include/grub/normal.h: Include <grub/script.h>.
11360 (grub_command_list): Removed struct.
11361 (grub_command_list_t): Removed type.
11362 (grub_menu_entry): Remove members `num' and `command_list'. Add
11363 members `commands' and `sourcecode'.
11364 * include/grub/script.h: Add inclusion guards.
11365 (grub_script_cmd_menuentry): New struct.
11366 (grub_script_execute_menuentry): New prototype.
11367 (grub_script_lexer_record_start): Likewise.
11368 (grub_script_lexer_record_stop): Likewise.
11369 * normal/execute.c (grub_script_execute_menuentry): New function.
11370 * normal/lexer.c (record, recording, recordpos, recordlen): New
11372 (grub_script_lexer_record_start): New function.
11373 (grub_script_lexer_record_stop): Likewise.
11374 (recordchar): Likewise.
11375 (nextchar): Likewise.
11376 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
11377 2048 as the buffer size. Add the tokens `menuentry' and `@'.
11378 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11379 (current_menu): New variable.
11380 (free_menu): Mainly rewritten.
11381 (grub_normal_menu_addentry): New function.
11382 (read_config_file): Rewritten.
11383 * normal/menu.c (run_menu_entry): Mainly rewritten.
11384 * normal/menu_entry.c (make_screen): Rewritten the code to insert
11386 (run): Mainly rewritten.
11387 * normal/parser.y (menu_entry): New variable.
11388 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11389 (menuentry): New rule.
11390 (command): Add `menuentry'.
11391 (if_statement): Allow additional returns before `fi'.
11392 * normal/script.c (grub_script_create_cmdmenu): New function.
11394 2006-01-03 Marco Gerards <marco@gnu.org>
11396 * INSTALL: GNU Bison is required.
11397 * configure.ac: Rewritten the test to detect Bison.
11398 * Makefile.in (YACC): New variable. Reported by Xun Sun
11399 <xun.sun.cn@gmail.com>.
11401 2006-01-03 Marco Gerards <marco@gnu.org>
11403 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
11404 the HFS+ filesystem to filesystem blocks.
11405 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
11406 GCC warning is silenced.
11408 2006-01-03 Marco Gerards <marco@gnu.org>
11410 * partmap/apple.c (apple_partition_map_iterate): Convert the data
11411 read from disk from big endian to host byte order.
11413 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
11415 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
11417 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
11418 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
11419 embedded HFS+ filesystem.
11420 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
11421 (grub_hfs_sblock): Move from here...
11422 * include/grub/hfs.h: To here... New file.
11423 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
11425 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
11427 (grub_hfsplus_volheader): Change type of member `magic' to
11429 (grub_hfsplus_data): Add new member `embedded_offset'.
11430 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
11432 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
11433 Calculate the offset.
11435 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11437 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
11439 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
11441 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11443 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
11444 ENV->NAME is NULL after allocating ENV->VALUE.
11446 2005-12-25 Marco Gerards <marco@gnu.org>
11448 * kern/env.c (grub_env_set): Rewritten the error handling code.
11450 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11452 * geninit.sh: Made more robust, and more portable.
11454 2005-12-25 Marco Gerards <marco@gnu.org>
11456 Add support for Apple HFS+ filesystems.
11458 * fs/hfsplus.c: New file.
11460 * DISTLIST: Added `fs/hfsplus.c'.
11462 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11463 (hfsplus_mod_SOURCES): New variable.
11464 (hfsplus_mod_CFLAGS): Likewise.
11465 (hfsplus_mod_LDFLAGS): Likewise.
11466 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11467 (grub_setup_SOURCES): Likewise.
11468 (grub_mkdevicemap_SOURCES): Likewise.
11469 (grub_emu_SOURCES): Likewise.
11470 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11472 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11474 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11476 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11478 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11479 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11480 include/grub/parser.h, include/grub/script.h, kern/parser.c,
11481 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11482 normal/lexer.c, normal/parser.y, normal/script.c, and
11484 Removed kern/sparc64/cache.c.
11486 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11487 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11490 * configure.ac (AC_INIT): Bumped to 1.92.
11492 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
11494 * kern/err.c (grub_error_push): Added new function to support error
11496 (grub_error_pop): Likewise.
11497 (grub_error_stack_items): New local variable to support error stacks.
11498 (grub_error_stack_pos): Likewise.
11499 (grub_error_stack_assert): Likewise.
11500 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11502 (grub_print_error): Added support to print errors from error stack.
11504 * include/grub/err.h (grub_error_push): Added function prototype.
11505 (grub_error_pop): Likewise.
11507 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
11509 * configure.ac: Accept `powerpc64' as host_cpu.
11510 (amd64): Rename to `biarch32'.
11512 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11513 non-cacheline-aligned addresses.
11515 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11516 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11517 if `size' is non-zero.
11519 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
11521 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11522 and `cd' to make sure the filename is not prefixed with a
11524 (pkgdata_MODULES): Add `gpt.mod'.
11525 (gpt_mod_SOURCES): New variable.
11526 (gpt_mod_CFLAGS): Likewise.
11527 (gpt_mod_LDFLAGS): Likewise.
11529 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11531 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11534 * partmap/gpt.c: New file.
11536 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11537 GPT partition map is detected.
11539 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
11541 * commands/i386/pc/play.c: New file.
11542 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11543 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11546 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
11548 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11549 ((unused))' to silence gcc warning.
11551 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
11553 * configure.ac: Correct `AC_PROG_YACC' test.
11555 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11557 * util/powerpc/ieee1275/grub-install.in: Run the mount point
11558 check before installing files.
11560 2005-11-22 Mike Small <smallm@panix.com>
11562 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11563 number regex so multidigit numbers are recognized correctly.
11565 2005-11-22 Mike Small <smallm@panix.com>
11567 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11568 debugging message before attempting to claim memory.
11569 (grub_rescue_cmd_initrd): Add a claim debugging message and try
11570 multiple addresses in case of failure.
11572 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11574 * term/tparm.c (get_space): Remove empty `if' statement.
11576 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11578 * kern/parser.c (check_varstate): Rename `state' to 's'.
11580 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11582 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
11583 variable definitions to the beginning of each function. Sort stack
11585 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
11586 `buf' argument to `char *'.
11588 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11590 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11591 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11592 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11593 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11594 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11595 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11596 configfile.mod, search.mod, gzio.mod and test.mod.
11597 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11598 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11599 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11600 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11601 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11602 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11603 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11604 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11605 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11606 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11607 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11608 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11609 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11610 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11611 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11612 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11613 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11614 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11615 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11616 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11617 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11618 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11619 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11621 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11623 (pkgdata_MODULES): Add test.mod.
11625 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11627 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
11628 appending to variables with "+=".
11629 (PModule): Use full pathname to generate *.lst filenames.
11631 * Makefile.in: Fixed list rules moved from genmk.rb.
11632 (.DELETE_ON_ERROR): New special target.
11633 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11635 * conf/i386-pc.rmk: Include conf/common.mk.
11636 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11637 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11638 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11639 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11640 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11641 configfile.mod, search.mod, gzio.mod and test.mod.
11642 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11643 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11644 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11645 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11646 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11647 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11648 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11649 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11650 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11651 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11652 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11653 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11654 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11655 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11656 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11657 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11658 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11659 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11660 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11661 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11662 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11663 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11664 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11666 * conf/common.rmk: ... to here. New file.
11668 * conf/common.mk: New file.
11670 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11672 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11673 (grub_script.tab.c): ... here.
11675 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11676 (grub_script.tab.c): ... here.
11678 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11679 (grub_script.tab.c): ... here.
11681 * normal/command.c (grub_command_find): Fixed a memory leak of
11682 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11684 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11686 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11687 "@" which marks the start of a comment on ARM.
11688 (VARIABLE): Likewise.
11690 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11692 Add support for Linux/ADFS partition tables.
11694 * partmap/acorn.c: New file.
11696 * include/grub/acorn_filecore.h: Likewise.
11698 * DISTLIST: Added `partmap/acorn.c' and
11699 `include/grub/acorn_filecore.h'.
11701 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11703 (pkgdata_MODULES): Add `acorn.mod'.
11704 (acorn_mod_SOURCES): New variable.
11705 (acorn_mod_CFLAGS): Likewise.
11707 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11709 (pkgdata_MODULES): Add `acorn.mod'.
11710 (acorn_mod_SOURCES): New variable.
11711 (acorn_mod_CFLAGS): Likewise.
11713 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11714 (pkgdata_MODULES): Add `acorn.mod'.
11715 (acorn_mod_SOURCES): New variable.
11716 (acorn_mod_CFLAGS): Likewise.
11717 (acorn_mod_LDFLAGS): Likewise.
11719 * include/types.h (grub_disk_addr_t): New typedef.
11721 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
11723 * geninit.sh: New file.
11725 * geninitheader.sh: Likewise.
11727 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11728 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11729 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11730 * commands/configfile.c (grub_configfile_init)
11731 (grub_configfile_fini): Likewise.
11732 * commands/default.c (grub_default_init, grub_default_fini):
11734 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11735 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11736 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11737 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11739 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11740 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11742 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11743 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11745 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11747 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11749 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11750 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11751 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11752 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11753 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11754 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11755 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11756 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11757 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11758 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11759 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11760 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11761 * partmap/amiga.c (grub_amiga_partition_map_init)
11762 (grub_amiga_partition_map_fini): Likewise.
11763 * partmap/apple.c (grub_apple_partition_map_init)
11764 (grub_apple_partition_map_fini): Likewise.
11765 * partmap/pc.c (grub_pc_partition_map_init)
11766 (grub_pc_partition_map_fini): Likewise.
11767 * partmap/sun.c (grub_sun_partition_map_init,
11768 grub_sun_partition_map_fini): Likewise.
11769 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11772 * util/grub-emu.c: Include <grub_modules_init.h>.
11773 (main): Don't initialize and de-initialize any modules directly,
11774 use `grub_init_all' and `grub_fini_all' instead.
11776 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11777 `grub_vesafb_mod_init'.
11778 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11780 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11781 `grub_vga_mod_init'. Updated all users.
11782 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
11784 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11785 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11788 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11789 Generate a function to initialize the module in utilities.
11790 Updated all callers.
11791 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11792 initialize the module in utilities. Updated all callers.
11794 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11796 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11797 escape sequence and a literal ^L to clear the screen.
11799 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11800 when returning from Open Firmware.
11802 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11804 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11805 (grub_ofconsole_height): Likewise.
11806 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11807 manually insert a '\n'.
11808 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11809 `grub_ofconsole_height'. Return early if these are already set.
11811 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11813 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11814 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11815 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11816 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11817 and `normal/script.c'.
11818 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11819 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11820 (test_mod_SOURCES): New variable.
11821 (test_mod_CFLAGS): Likewise.
11822 (test_mod_LDFLAGS): Likewise.
11823 (pkgdata_MODULES): Add `test.mod'.
11824 (grub_script.tab.c): New rule.
11825 (grub_script.tab.h): Likewise.
11827 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
11829 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11830 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11831 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11832 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11833 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11834 (test_mod_SOURCES): New variable.
11835 (test_mod_CFLAGS): Likewise.
11836 (pkgdata_MODULES): Add `test.mod'.
11837 (grub_script.tab.c): New rule.
11838 (grub_script.tab.h): Likewise.
11840 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
11842 Add initial scripting support.
11844 * commands/test.c: New file.
11845 * include/grub/script.h: Likewise.
11846 * normal/execute.c: Likewise.
11847 * normal/function.c: Likewise.
11848 * normal/lexer.c: Likewise.
11849 * normal/parser.y: Likewise.
11850 * normal/script.c: Likewise.
11852 * configure.ac: Add `AC_PROG_YACC' test.
11854 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11855 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11856 `normal/function.c' and `normal/script.c'.
11857 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11858 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11859 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11861 (pkgdata_MODULES): Add `test.mod'.
11862 (grub_script.tab.c): New rule.
11863 (grub_script.tab.h): Likewise.
11865 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11867 * include/grub/normal.h (grub_test_init): New prototype.
11868 (grub_test_fini): Likewise.
11870 * normal/command.c: Include <grub/script.h>.
11871 (grub_command_execute): Rewritten.
11873 * util/grub-emu.c (main): Call `grub_test_init' and
11876 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11878 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11880 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11881 there are no pending characters.
11883 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11885 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11886 `grub_strndup' to drop device arguments. Replace unnecessary
11887 `grub_strndup' with `grub_strdup'.
11889 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11891 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11892 `debug' environment variable has been set.
11894 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
11896 * Makefile.in (install-local): Use $(DATA).
11897 (uninstall): Likewise.
11898 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11899 (sbin_UTILITIES): ... to here.
11900 (sbin_SCRIPTS): New variable.
11901 (grub_install_SOURCES): New variable.
11902 * util/powerpc/ieee1275/grub-install.in: New file.
11903 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11905 (add_segments): Call `grub_util_get_path'.
11907 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11909 From Timothy Baldwin:
11910 * commands/ls.c (grub_ls_list_files): Close FILE with
11912 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11914 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
11916 * include/grub/parser.h: New file.
11918 * kern/parser.c: Likewise.
11920 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11921 (grub_setup_SOURCES): Likewise.
11922 (grub_probefs_SOURCES): Likewise.
11923 (grub_emu_SOURCES): Likewise.
11924 (kernel_img_HEADERS): Add `parser.h'.
11926 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11927 (grub_emu_SOURCES): Add `kern/parser.c'.
11928 (grubof_SOURCES): Likewise.
11930 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11931 (grubof_SOURCES): Add `kern/parser.c'.
11933 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11935 * kern/misc.c (grub_split_cmdline): Removed function.
11937 * kern/rescue.c: Include <grub/parser.h>.
11938 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11939 of `grub_split_cmdline'.
11941 * normal/command.c: Include <grub/parser.h>.
11942 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11943 of `grub_split_cmdline'.
11945 * normal/completion.c: Include <grub/parser.h>.
11946 (cmdline_state): New variable.
11947 (iterate_dir): End the filename with a quote depending on the
11948 command line state.
11949 (get_state): new function.
11950 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11951 split the arguments and determine the current argument. When the
11952 argument string is not quoted, escape all spaces.
11954 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11956 * normal/sparc64/setjmp.S: New file.
11958 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11960 * include/grub/sparc64/libgcc.h: New file.
11961 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11962 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11963 normal/sparc64/setjmp.c.
11965 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11967 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11968 * kern/sparc64/cache.S: New file.
11969 * kern/sparc64/cache.c: Removed.
11970 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11971 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11973 (COMMON_LDFLAGS): Add -melf64_sparc.
11974 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11975 (grubof_SOURCES): Use cache.S instead of cache.c.
11976 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11977 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11978 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11980 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11981 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11982 (linux_mod_CFLAGS): Commented out.
11983 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11984 out because module isn't built.
11985 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11986 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11987 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11988 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11989 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11990 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11991 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11992 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11993 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11994 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11995 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11996 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11997 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11998 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12000 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12002 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12003 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12004 longer, because HFS should not be used on PC.
12006 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12008 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12009 consistently within the loop.
12011 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
12013 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12014 directory can not be read.
12016 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12018 * configure.ac (AC_INIT): Increase the version number to 1.91.
12020 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12021 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12022 term/i386/pc/serial.c.
12024 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12026 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12027 file size must be permitted.
12029 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12030 between %ah and %al.
12032 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12034 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12036 Call the hook with a NUL-terminated filename.
12037 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12040 * kern/term.c (cursor_state): New variable.
12041 (grub_term_set_current): Reset the cursor state on a new
12043 (grub_setcursor): Rewritten to use CURSOR_STATE.
12044 (grub_getcursor): New function.
12046 * include/grub/term.h (grub_getcursor): New prototype.
12048 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12049 integers on ARM. Reported by Timothy Baldwin
12050 <T.E.Baldwin99@members.leeds.ac.uk>.
12052 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
12054 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12056 (grub_sfs_dir): Likewise.
12058 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
12060 Add support for the SFS filesystem.
12062 * fs/sfs.c: New file.
12064 * DISTLIST: Added `fs/sfs.c'.
12066 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12067 (grub_probefs_SOURCES): Likewise.
12068 (grub_emu_SOURCES): Likewise.
12069 (pkgdata_MODULES): Add `sfs.mod'.
12070 (sfs_mod_SOURCES): New variable.
12071 (sfs_mod_CFLAGS): Likewise.
12072 (sfs_mod_LDFLAGS): Likewise.
12074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12075 (pkgdata_MODULES): Add `sfs.mod'.
12076 (sfs_mod_SOURCES): New variable.
12077 (sfs_mod_CFLAGS): Likewise.
12079 * util/grub-emu.c (main): Call `grub_sfs_init' and
12082 * include/grub/fs.h (grub_sfs_init): New prototype.
12083 (grub_sfs_fini): Likewise.
12085 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
12087 Add support for the AFFS filesystem.
12089 * fs/affs.c: New file.
12091 * DISTLIST: Added `fs/affs.c'.
12093 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12094 (grub_probefs_SOURCES): Likewise.
12095 (grub_emu_SOURCES): Likewise.
12096 (pkgdata_MODULES): Add `affs.mod'.
12097 (affs_mod_SOURCES): New variable.
12098 (affs_mod_CFLAGS): Likewise.
12099 (affs_mod_LDFLAGS): Likewise.
12101 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12102 (pkgdata_MODULES): Add `affs.mod'.
12103 (affs_mod_SOURCES): New variable.
12104 (affs_mod_CFLAGS): Likewise.
12106 * util/grub-emu.c (main): Call `grub_affs_init' and
12109 * include/grub/fs.h (grub_affs_init): New prototype.
12110 (grub_affs_fini): Likewise.
12112 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12114 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12116 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12118 * configure.ac: Accept `x86_64' as host_cpu. In that case add
12121 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12124 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12125 (COMMON_LDFLAGS): New variable.
12126 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12127 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12128 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12129 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12130 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12131 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12132 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12133 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12134 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12135 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12136 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12137 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12138 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12139 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12140 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12142 (normal_mod_ASFLAGS): Add `-m32'.
12144 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12145 (grub_host_size_t, grub_host_ssize_t): New types.
12146 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
12147 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
12148 `GRUB_HOST_SIZEOF_VOID_P'.
12150 * include/grub/kernel.h (struct grub_module_header): Type of
12151 member offset changed to `grub_host_off_t'. Type of member size
12152 changed to `grub_host_size_t'.
12153 (struct grub_module_info): Type of member offset changed to
12154 `grub_host_off_t'. Type of member size changed to
12155 `grub_host_size_t'.
12157 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
12159 Make GRUB's kernel compliant to Multiboot Specification.
12161 * kern/i386/pc/startup.S (multiboot_header): New label.
12162 (multiboot_entry): Likewise.
12163 (multiboot_trampoline): Likewise.
12165 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12166 Increased to 0x4A0.
12168 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12169 put parentheses after a question mark.
12170 [!GRUB_UTIL] (my_mod): New variable.
12172 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12174 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
12176 Adds support for the XFS filesystem. Btrees are not supported
12179 * fs/xfs.c: New file.
12181 * DISTLIST: Added `fs/xfs.c'.
12183 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12184 (grub_probefs_SOURCES): Likewise.
12185 (grub_emu_SOURCES): Likewise.
12186 (pkgdata_MODULES): Add `xfs.mod'.
12187 (xfs_mod_SOURCES): New variable.
12188 (xfs_mod_CFLAGS): Likewise.
12190 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12191 (pkgdata_MODULES): Add `xfs.mod'.
12192 (xfs_mod_SOURCES): New variable.
12193 (xfs_mod_CFLAGS): Likewise.
12195 * util/grub-emu.c (main): Call `grub_xfs_init' and
12198 * include/grub/fs.h (grub_xfs_init): New prototype.
12199 (grub_xfs_fini): Likewise.
12202 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12204 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12205 color modes, allow greater than 16 colors to be configured as
12208 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12210 * normal/completion.c (complete_arguments): Add the qualifier
12211 const into OPTIONS.
12213 From Omniflux <omniflux+lists@omniflux.com>:
12214 * include/grub/terminfo.h: New file.
12215 * include/grub/tparm.h: Likewise.
12216 * include/grub/i386/pc/serial.h: Likewise.
12217 * term/terminfo.c: Likewise.
12218 * term/tparm.c: Likewise.
12219 * term/i386/pc/serial.c: Likewise.
12220 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12222 (terminfo_mod_SOURCES): New variable.
12223 (terminfo_mod_CFLAGS): Likewise.
12224 (serial_mod_SOURCES): Likewise.
12225 (serial_mod_CFLAGS): Likewise.
12227 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12229 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12230 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12231 and kern/powerpc/ieee1275/cmain.c, respectively.
12233 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12234 * kern/powerpc/ieee1275/crt0.S: ... here.
12236 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12237 * kern/powerpc/ieee1275/cmain.c: ... here.
12239 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12240 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12241 instead of boot/powerpc/ieee1275/crt0.S and
12242 boot/powerpc/ieee1275/cmain.c, respectively.
12244 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12245 sectors. It was not used anyway.
12247 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12249 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12250 `unused parameter' warning.
12252 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12254 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12256 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12259 2005-08-28 Marco Gerards <metgerards@student.han.nl>
12261 * include/grub/normal.h (enum grub_completion_type): Added
12262 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12264 * normal/cmdline.c (print_completion): Handle
12265 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12266 * normal/menu_entry.c (store_completion): Likewise.
12268 * normal/completion.c (complete_arguments): New function.
12269 (grub_normal_do_completion): Call `complete_arguments' when the
12270 current words start with a dash.
12272 2005-08-27 Marco Gerards <metgerards@student.han.nl>
12274 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12275 `gzio.mod' instead of `io.mod').
12277 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12279 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12280 (DISTDIRS): Added io and video.
12281 Rewrite the search routine to make an output consistently.
12283 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12284 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12285 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12286 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12287 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12288 util/powerpc/ieee1275/misc.c.
12290 * include/grub/gzio.h: New file.
12291 * io/gzio.c: Likewise.
12293 * kern/file.c (grub_file_close): Call grub_device_close only if
12294 FILE->DEVICE is not NULL.
12296 * include/grub/mm.h [!NULL] (NULL): New macro.
12298 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12300 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12301 (pkgdata_MODULES): Added gzio.mod.
12302 (gzio_mod_SOURCES): New variable.
12303 (gzio_mod_CFLAGS): Likewise.
12305 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12306 (pkgdata_MODULES): Added gzio.mod.
12307 (gzio_mod_SOURCES): New variable.
12308 (gzio_mod_CFLAGS): Likewise.
12310 * commands/cat.c: Include grub/gzio.h.
12311 (grub_cmd_cat): Use grub_gzfile_open instead of
12314 * commands/cmp.c: Include grub/gzio.h.
12315 (grub_cmd_cmp): Use grub_gzfile_open instead of
12318 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12319 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12321 (grub_rescue_cmd_module): Likewise.
12323 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12325 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12326 kern/sparc64/ieee1275/init.c because it contains _start.
12327 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12329 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12331 * configure.ac: Add support for sparc64 host with ieee1275
12333 * configure: Generated from configure.ac.
12334 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12336 (grub_ofdisk_read): Likewise.
12337 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12338 pointers as (void *) to remove a warning.
12339 (grub_ofdisk_close): Likewise.
12340 (grub_ofdisk_read): Likewise.
12341 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12342 returns, so make it return void to remove a warning.
12343 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12344 Corresponding prototype change.
12345 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12346 values, and cast the pointers as (void *) to remove a warning.
12347 (grub_mm_dump): Likewise.
12348 * conf/sparc64-ieee1275.mk: New file.
12349 * conf/sparc64-ieee1275.rmk: Likewise.
12350 * include/grub/sparc64/setjmp.h: Likewise.
12351 * include/grub/sparc64/types.h: Likewise.
12352 * include/grub/sparc64/ieee1275/console.h: Likewise.
12353 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12354 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12355 * include/grub/sparc64/ieee1275/time.h: Likewise.
12356 * kern/sparc64/cache.c: Likewise.
12357 * kern/sparc64/dl.c: Likewise.
12358 * kern/sparc64/ieee1275/init.c: Likewise.
12359 * kern/sparc64/ieee1275/openfw.c: Likewise.
12361 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12363 * util/console.c (grub_ncurses_putchar): If C is greater than
12364 0x7f, set C to a question mark.
12365 (grub_ncurses_getcharwidth): New function.
12366 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12369 * normal/menu.c (print_entry): Made aware of Unicode. First,
12370 convert TITLE to UCS-4, and predict the cursor position by
12373 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12375 * kern/misc.c (grub_utf16_to_utf8): Likewise.
12377 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12379 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12380 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12383 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12384 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12385 grub_strcpy and grub_strlen. Take it into account that a space
12386 character is inserted as a delimiter.
12388 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12390 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
12391 invalid magic in the error.
12393 * commands/search.c: New file.
12395 * util/grub-emu.c (main): Call grub_search_init and
12398 * kern/rescue.c (grub_rescue_print_disks): Removed.
12399 (grub_rescue_print_devices): New function.
12400 (grub_rescue_cmd_ls): Use grub_device_iterate with
12401 grub_rescue_print_devices instead of grub_disk_dev_iterate with
12402 grub_rescue_print_disks.
12404 * kern/partition.c (grub_partition_iterate): Return the result of
12405 PARTMAP->ITERATE instead of GRUB_ERRNO.
12407 * kern/device.c: Include grub/partition.h.
12408 (grub_device_iterate): New function.
12410 * include/grub/partition.h (grub_partition_iterate): Return int
12411 instead of grub_err_t.
12413 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
12415 [GRUB_UTIL] (grub_search_fini): Likewise.
12417 * include/grub/device.h (grub_device_iterate): New prototype.
12419 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12421 (pkgdata_MODULES): Added search.mod.
12422 (search_mod_SOURCES): New variable.
12423 (search_mod_CFLAGS): Likewise.
12425 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
12426 (pkgdata_MODULES): Added search.mod.
12427 (search_mod_SOURCES): New variable.
12428 (search_mod_CFLAGS): Likewise.
12430 * commands/ls.c (grub_ls_list_disks): Renamed to ...
12431 (grub_ls_list_devices): ... this, and use grub_device_iterate.
12432 All callers changed.
12434 * DISTLIST: Added commands/search.c.
12436 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12438 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
12440 (grub_getcharwidth): New function.
12442 * kern/misc.c (grub_utf8_to_ucs4): New function.
12444 * include/grub/term.h (struct grub_term): Added a new member
12446 (grub_getcharwidth): New prototype.
12448 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
12450 * term/i386/pc/console.c (map_char): New function. Segregated from
12451 grub_console_putchar.
12452 (grub_console_putchar): Use map_char.
12453 (grub_console_getcharwidth): New function.
12454 (grub_console_term): Specified grub_console_getcharwidth as
12457 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12458 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12460 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12462 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12463 on grub_strtoul completely.
12464 (write_char): Declare local variables in the beginning of the
12466 (grub_vesafb_getcharwidth): New function.
12467 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12470 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
12472 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12473 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12474 commands/i386/pc/vbetest.c.
12476 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12477 call grub_vbe_get_controller_info again, because the returned
12478 information is volatile.
12479 (grub_vbe_set_video_mode): Mostly rewritten.
12480 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12481 grub_vbe_status_t correctly.
12482 (grub_vbe_get_video_mode_info): Likewise.
12483 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12484 several if statements.
12486 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12487 * commands/i386/pc/vbeinfo.c: ... this.
12489 * commands/i386/pc/vbe_test.c: Renamed to ...
12490 * commands/i386/pc/vbetest.c: ... this.
12492 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12494 (grub_cmd_vbeinfo): ... this. Save video modes before
12495 iterating. Skip a video mode, if it is not available, not enough
12496 information is given or it is monochrome. Show the memory
12497 model. Leave the interpretation of MODEVAR to grub_strtoul
12499 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12500 (GRUB_MOD_FINI): Likewise.
12502 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12503 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12504 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12505 duplicated grub_env_get. Leave the interpretation of MODEVAR to
12506 grub_strtoul completely.
12507 (real2pm): Removed.
12508 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12509 (GRUB_MOD_FINI): Likewise.
12511 * normal/misc.c: Include grub/mm.h.
12513 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12514 vbe_list_modes with vbetest.mod and vbeinfo.mod.
12515 (vbe_list_modes_mod_SOURCES): Removed.
12516 (vbe_list_modes_mod_CFLAGS): Likewise.
12517 (vbe_test_mod_SOURCES): Likewise.
12518 (vbe_test_mod_CFLAGS): Likewise.
12519 (vbeinfo_mod_SOURCES): New variable.
12520 (vbeinfo_mod_CFLAGS): Likewise.
12521 (vbetest_mod_SOURCES): Likewise.
12522 (vbetest_mod_CFLAGS): Likewise.
12524 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
12526 * normal/misc.c: New file.
12528 * DISTLIST: Added normal/misc.c.
12530 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12531 DISK to HOOK. Call HOOK with DISK.
12532 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12533 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12534 * partmap/sun.c (sun_partition_map_iterate): Likewise.
12536 * normal/menu_entry.c (struct screen): Added a new member
12537 "completion_shown".
12538 (completion_buffer): New global variable.
12539 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12540 (store_completion): New function.
12541 (complete): Likewise.
12542 (clear_completions): Likewise.
12543 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12544 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12545 a tab, call complete.
12547 * normal/completion.c (disk_dev): Removed.
12548 (print_simple_completion): Likewise.
12549 (print_partition_completion): Likewise.
12550 (print_func): New global variable.
12551 (add_completion): Do not take the arguments WHAT or PRINT any
12552 longer. Added a new argument TYPE. Instead of printing directly,
12553 call PRINT_FUNC if not NULL.
12554 All callers changed.
12555 (complete_device): Use a local variable DEV instead of
12556 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12557 (grub_normal_do_completion): Take a new argument HOOK. Do not
12558 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12559 empty string, return NULL instead.
12560 All callers changed.
12562 * normal/cmdline.c (print_completion): New function.
12564 * kern/partition.c (grub_partition_iterate): Add an argument DISK
12566 All callers changed.
12568 * kern/disk.c (grub_print_partinfo): Removed.
12570 * include/grub/partition.h (struct grub_partition_map): Add a new
12571 argument DISK into HOOK of ITERATE.
12572 (grub_partition_iterate): Add a new argument DISK to HOOK.
12574 * include/grub/normal.h (enum grub_completion_type): New enum.
12575 (grub_completion_type_t): New type.
12576 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12577 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12578 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12579 (GRUB_COMPLETION_TYPE_FILE): Likewise.
12580 (grub_normal_do_completion): Added a new argument HOOK.
12581 (grub_normal_print_device_info): New prototype.
12583 * include/grub/disk.h (grub_print_partinfo): Removed.
12585 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12586 (normal_mod_SOURCES): Likewise.
12587 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12588 (normal_mod_SOURCES): Likewise.
12590 * commands/ls.c (grub_ls_list_disks): Use
12591 grub_normal_print_device_info instead of grub_print_partinfo. Free
12593 (grub_ls_list_files): Use grub_normal_print_device_info instead of
12594 duplicating the code.
12596 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12598 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12599 follow GCS more precisely.
12600 * commands/i386/pc/vbe_test.c: Likewise.
12601 * include/grub/i386/pc/vbe.h: Likewise.
12602 * term/i386/pc/vesafb.c: Likewise.
12603 * video/i386/pc/vbe.c: Likewise.
12605 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12607 * DISTLIST: Added term/i386/pc/vesafb.c
12608 DISTLIST: Added video/i386/pc/vbe.c
12609 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12610 DISTLIST: Added commands/i386/pc/vbe_test.c.
12611 * commands/i386/pc/vbe_list_modes.c: New file.
12612 * commands/i386/pc/vbe_test.c: Likewise.
12613 * term/i386/pc/vesafb.c: Likewise.
12614 * video/i386/pc/vbe.c: Likewise.
12615 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12616 (grub_vbe_probe) Added prototype.
12617 (grub_vbe_set_video_mode) Likewise.
12618 (grub_vbe_get_video_mode) Likewise.
12619 (grub_vbe_get_video_mode_info) Likewise.
12620 (grub_vbe_set_pixel_rgb) Likewise.
12621 (grub_vbe_set_pixel_index) Likewise.
12622 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12623 (pkgdata_MODULES): Added vesafb.mod.
12624 (pkgdata_MODULES): Added vbe_list_modes.mod.
12625 (pkgdata_MODULES): Added vbe_test.mod.
12626 (vbe_mod_SOURCES): Added.
12627 (vbe_mod_CFLAGS): Likewise.
12628 (vesafb_mod_SOURCES): Likewise.
12629 (vesafb_mod_CFLAGS): Likewise.
12630 (vbe_list_modes_mod_SOURCES): Likewise.
12631 (vbe_list_modes_mod_CFLAGS): Likewise.
12632 (vbe_test_mod_SOURCES): Likewise.
12633 (vbe_test_mod_CFLAGS): Likewise.
12635 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12637 * normal/command.c (grub_command_execute): If INTERACTIVE is
12638 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12639 CMDLINE. Disable the pager if INTERACTIVE is true.
12640 All callers are changed.
12642 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12643 before reading a config file.
12644 * normal/main.c (read_config_file): Even if a command is not
12645 found, register it if it is within an entry.
12647 * util/grub-emu.c: Include sys/types.h and unistd.h.
12648 (options): Added --hold.
12649 (struct arguments): Added a new member "hold".
12650 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12652 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12653 cleared by a debugger, if it is not zero.
12655 * include/grub/normal.h (grub_command_execute): Add an argument
12658 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12660 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12662 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12664 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12665 program with another one, because the old one didn't detect a bug
12666 in gcc-3.4. Always use regparm 2, because the new test is still
12667 not enough for gcc-4.0. Someone must investigate a simple test
12668 case which detects a bug in gcc-4.0.
12670 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12672 * DISTLIST: Added normal/completion.c.
12674 * normal/completion.c: New file.
12676 * term/i386/pc/console.c (grub_console_getwh): New function.
12677 (grub_console_term): Assign grub_console_getwh to getwh.
12679 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12680 function is defined in normal/completion.c as
12681 grub_normal_do_completion.
12682 (grub_cmdline_get): Use grub_normal_do_completion instead of
12685 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12686 returns non-zero, otherwise return 0.
12687 (grub_partition_iterate): First, probe the partition map. Then,
12688 call ITERATE only for this partition map.
12690 * kern/misc.c (grub_strncmp): Rewritten.
12692 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12693 returns non-zero. Otherwise return 0.
12695 * include/grub/partition.h (grub_partition_map_iterate): Return
12696 int instead of void.
12698 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12700 * include/grub/misc.h (grub_strncmp): Change the type of N to
12703 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12706 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12707 unsigned explicitly before comparing it with I.
12709 * kern/main.c (grub_env_write_root): Add the attribute unused into
12712 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12713 normal/completion.c.
12714 (normal_mod_SOURCES): Likewise.
12715 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12716 (normal_mod_SOURCES): Likewise.
12718 * normal/command.c (grub_iterate_commands): If ITERATE returns
12719 non-zero, return one immediately.
12721 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12723 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12724 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12726 (grub_vbe_get_controller_info): New function.
12727 (grub_vbe_get_mode_info): Likewise.
12728 (grub_vbe_set_mode): Likewise.
12729 (grub_vbe_get_mode): Likewise.
12730 (grub_vbe_set_memory_window): Likewise.
12731 (grub_vbe_get_memory_window): Likewise.
12732 (grub_vbe_set_scanline_length): Likewise.
12733 (grub_vbe_get_scanline_length): Likewise.
12734 (grub_vbe_set_display_start): Likewise.
12735 (grub_vbe_get_display_start): Likewise.
12736 (grub_vbe_set_palette_data): Likewise.
12737 * include/grub/i386/pc/vbe.h: New file.
12739 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12741 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12742 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12743 * DISTLIST: Likewise.
12744 * kern/ieee1275/of.c: Moved to ...
12745 * kern/ieee1275/ieee1275.c: ... here.
12747 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12749 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12750 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12751 Pass 0 as `end' parameter to grub_strtoul().
12753 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12755 * include/grub/powerpc/ieee1275/console.h: Do not include
12756 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12758 (grub_console_cur_color): Remove i386-specific prototype.
12759 (grub_console_real_putchar): Likewise.
12760 (grub_console_checkkey): Likewise.
12761 (grub_console_getkey): Likewise.
12762 (grub_console_getxy): Likewise.
12763 (grub_console_gotoxy): Likewise.
12764 (grub_console_cls): Likewise.
12765 (grub_console_setcursor): Likewise.
12766 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12767 Include <grub/machine/console.h>.
12768 * term/ieee1275/ofconsole.c: Likewise.
12770 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12772 * Makefile.in (LIBLZO): New variable.
12774 * configure.ac: Check for LZO version 2.
12776 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12777 lzo/lzo1x.h instead of lzo1x.h.
12779 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12782 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12783 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12785 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12786 copying the data from PARTITION to P.
12788 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12790 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12791 negative, unload the module.
12793 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12794 map is "pc_partition_map" but not "pc".
12795 (usage): Fix the description. The options are --boot-image and
12796 --core-image but not --boot-file or --core-file.
12797 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12798 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12801 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12802 --core-file. Specify INSTALL_DEVICE as an argument.
12804 * util/console.c: Include config.h.
12805 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12806 [HAVE_NCURSES_H]: Include ncurses.h.
12807 [HAVE_CURSES_H]: Include curses.h.
12808 [!A_NORMAL] (A_NORMAL): Defined as zero.
12809 [!A_STANDOUT] (A_STANDOUT): Likewise.
12811 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12813 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12815 * configure.ac: Check for curses libraries and headers.
12817 * Makefile.in (LIBCURSES): New variable.
12819 * genmk.rb (Script::rule): Set the executable bits.
12821 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12822 name of the PC partition map is "pc_partition_map" but not "pc".
12824 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12826 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12827 (modules): Likewise.
12828 (usage): Added descriptions for --modules and --grub-probefs.
12829 Handle --modules and --grub-probefs. Save the arguments in MODULES
12830 and GRUB_PROBEFS, respectively.
12831 Auto-detect a filesystem module against GRUBDIR. If the result is
12832 empty and modules are not specified explicitly, abort the
12833 installation. Add the result to MODULES.
12835 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12836 disk/powerpc/ieee1275/ofdisk.c,
12837 include/grub/powerpc/ieee1275/init.h and
12838 term/powerpc/ieee1275/ofconsole.c.
12839 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12840 term/ieee1275/ofconsole.c.
12842 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12844 * COPYING: Upgraded to the latest version. Only the address of the
12845 FSF office has changed.
12847 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12849 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12850 kern/ieee1275.c with kern/ieee1275/of.c.
12852 * kern/ieee1275.c: Moved to ...
12853 * kern/ieee1275/of.c: ... here.
12855 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12857 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
12860 * config.guess: Updated to the latest version from gnulib.
12861 * config.sub: Likewise.
12862 * install.sh: Likewise.
12863 * mkinstalldirs: Likewise.
12865 * include/grub/console.h: Removed. This file is arch-specific. Do
12866 not put this in include/grub.
12868 * include/grub/i386/pc/console.h: Resurrected.
12870 * util/console.c: Include grub/machine/console.h instead of
12872 * util/grub-emu.c: Likewise.
12874 2005-08-04 Marco Gerards <metgerards@student.han.nl>
12876 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12879 From Vincent Pelletier <subdino2004@yahoo.fr>
12880 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12881 Redefined to use grub_getwh.
12882 (grub_term): New member named getwh.
12883 (grub_getwh): New prototype.
12884 * kern/term.c (grub_getwh): New function.
12885 * term/i386/pc/console.c (grub_console_getwh): New function.
12886 (grub_console_term): New member `getwh'.
12887 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12888 (grub_vga_term): New member `getwh'.
12889 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
12891 (grub_ofconsole_getw): New function.
12892 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12893 (grub_ofconsole_term): New field named getwh and new initial
12896 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12898 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12899 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12900 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12901 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12902 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12903 of <grub/machine/ieee1275.h>.
12904 * commands/ieee1275/reboot.c: Likewise.
12905 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12906 * kern/ieee1275.c: ... to here. All users updated. Change all
12907 parameter structs to use new type `grub_ieee1275_cell_t'.
12908 * term/powerpc/ieee1275/ofconsole.c: Move ...
12909 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12910 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12911 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12912 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12914 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12915 Remove unused prototypes. All users updated.
12916 * include/grub/powerpc/ieee1275/console.h: Removed.
12917 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12918 `grub_ieee1275_cell_t'.
12919 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12920 Cast comparisons with -1 to the correct type.
12921 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12922 type to match `grub_ieee1275_entry_fn'.
12924 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12926 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12928 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12929 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12931 (grub_probefs_SOURCES): New variable.
12933 * util/i386/pc/grub-probefs.c: New file.
12935 * util/i386/pc/grub-setup.c (main): Call
12936 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12937 grub_hfs_init and grub_jfs_init to initialize the system. Call
12938 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12939 grub_pc_partition_map_fini to finish the system.
12941 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12943 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12945 (grub_multiboot_load_elf32): Likewise.
12946 (grub_multiboot_is_elf64): Likewise.
12947 (grub_multiboot_load_elf64): Likewise.
12948 (grub_multiboot_load_elf): Likewise.
12949 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12950 an ELF32 or ELF64 file.
12951 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12953 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12954 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12955 NULL before calling FS->LABEL.
12956 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12957 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12958 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12959 before calling FS->LABEL.
12961 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12963 * util/i386/pc/grub-install.in (datadir): New variable.
12965 (pkgdatadir): New variable.
12966 (pkglibdir): Removed.
12968 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12970 * DISTLIST: Added util/i386/pc/grub-install.in.
12972 * util/i386/pc/grub-install.in: New file.
12974 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12975 (grub_install_SOURCES): Likewise.
12977 * genmk.rb: Added support for scripts.
12978 (Script): New class.
12979 (scripts): New variable.
12981 * Makefile.in (install-local): Install sbin_SCRIPTS by
12983 (uninstall): Remove sbin_SCRIPTS.
12985 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12986 device, try to get a GRUB device by
12987 grub_util_biosdisk_get_grub_dev.
12990 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12991 description for --device-map.
12993 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12995 Change the semantics of variable hooks. They now return strings
12996 instead of error values.
12998 * util/i386/pc/grub-setup.c: Include grub/env.h.
12999 (setup): Use grub_device_set_root instead of grub_env_set.
13001 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13002 grub_env_get instead of grub_device_set_root and
13003 grub_device_get_root, respectively.
13005 * kern/main.c (grub_env_write_root): New function.
13006 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13007 grub_env_set instead of grub_device_set_root.
13009 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13011 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13012 rather than calling ENV->WRITE_HOOK afterwards.
13013 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13014 passing a pointer of a pointer.
13015 (grub_register_variable_hook): Change the types of "read_hook" and
13016 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13018 Allocate the default empty string on the heap, because this string
13019 may be freed later.
13021 * kern/device.c: Include grub/env.h.
13022 (grub_device_set_root): Removed.
13023 (grub_device_get_root): Likewise.
13024 (grub_device_open): Use grub_env_get instead of
13025 grub_device_get_root.
13027 * include/grub/env.h (grub_env_read_hook_t): New type.
13028 (grub_env_write_hook_t): Likewise.
13029 (grub_env_var): Change the types of "read_hook" and "write_hook"
13030 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13031 (grub_register_variable_hook): Likewise.
13033 * include/grub/device.h (grub_device_set_root): Removed.
13034 (grub_device_set_root): Likewise.
13036 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13037 make sure that DIRNAME terminates with '/', so that
13038 grub_fat_find_dir will fail if PATH is not a directory.
13040 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13042 Use the qualifier auto for print_files and print_files_long.
13043 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13045 Put a newline only if there is no error.
13046 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13049 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13051 * kern/partition.c (grub_partition_probe): Initialize PART to
13052 NULL. Otherwise, when no partition map is registered, this returns
13055 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13057 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13058 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13061 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13063 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13064 information on each device, if it does not have partitions. Print
13065 "Device" instead of "Disk", because this function is not specific
13068 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13069 static to ensure that it is put on the memory rather than a
13072 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13074 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13075 (grub_cat_init): Likewise.
13076 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13077 (options): Likewise.
13078 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13079 (grub_configfile_init): Likewise.
13080 * font/manager.c (GRUB_MOD_INIT): Likewise.
13081 * commands/help.c (GRUB_MOD_INIT): Likewise.
13082 (grub_help_init): Likewise.
13083 * normal/command.c (grub_command_init): Likewise.
13084 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13085 * disk/loopback.c (grub_loop_init): Likewise.
13086 (GRUB_MOD_INIT): Likewise.
13087 * commands/ls.c (grub_ls_init): Likewise.
13088 (GRUB_MOD_INIT): Likewise.
13089 (options): Likewise.
13090 * commands/boot.c (grub_boot_init): Likewise.
13091 (GRUB_MOD_INIT): Likewise.
13092 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13093 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13094 (GRUB_MOD_INIT): Likewise.
13095 * commands/cmp.c (grub_cmp_init): Likewise.
13096 (GRUB_MOD_INIT): Likewise.
13098 * normal/arg.c: Use <> instead of "" to include header files.
13099 (SHORT_ARG_HELP): New macro.
13100 (SHORT_ARG_USAGE): Likewise.
13101 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13102 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13104 (find_short): Check if C is 'h' or 'u' explicitly.
13105 (grub_arg_show_help): Use space characters instead of tabs. Treat
13106 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13107 are shown with --help and --usage only if they are not used for
13108 the command itself.
13109 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13112 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13113 const into "longarg". Change the type of "shortarg" to int.
13115 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13117 * boot/i386/pc/boot.S (boot_drive_check): New label.
13119 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13122 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13123 which do not pass a boot drive correctly. Copied from GRUB Legacy.
13125 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13127 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13128 When turning off Gate A20, skip the check and return immediately,
13129 because this is not fatal usually.
13131 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13133 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13134 be 0x7C00 instead of 0x8000.
13136 * boot/i386/pc/pxeboot.S: Rewritten.
13138 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13140 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13143 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13145 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13146 robustness. This routine now supports a BIOS call and System
13147 Control Port A to modify the gate A20.
13149 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13150 Increased to 0x440.
13152 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
13154 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13155 device path and resulting ihandle.
13156 (grub_ofdisk_close): dprintf the ihandle being closed.
13157 (grub_ofdisk_read): dprintf function parameters.
13158 * kern/mm.c (grub_mm_init_region): Likewise.
13159 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13160 (grub_linux_boot): dprintf the Linux entry point, initrd address and
13161 size, and boot arguments.
13162 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13163 before loading into memory.
13164 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13165 before loading into memory.
13167 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
13169 * kern/mm.c: Added much documentation.
13170 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13171 8, set to 5 instead of 8.
13173 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13175 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13177 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13178 (grub_mkdevicemap_SOURCES): New variable.
13180 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13181 lib/device.c of GRUB Legacy.
13183 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13185 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13186 instead of PATH is NULL.
13188 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
13190 * commands/cmp.c (BUFFER_SIZE): New macro.
13191 (grub_cmd_cmp): Close the right file at the right time. Compare
13192 only data just read. Don't report files of different size as
13193 identical. Dynamically allocate buffers. Move variable
13194 declarations at the beginning of function.
13196 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
13198 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13201 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
13203 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13204 when backspace is pressed at beginning of line.
13206 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
13208 * DISTLIST: Added genfslist.sh.
13210 * normal/main.c (fs_module_list): New variable.
13211 (autoload_fs_module): New function.
13212 (read_fs_list): Likewise.
13213 (grub_normal_execute): Call read_fs_list.
13215 * kern/fs.c (grub_fs_autoload_hook): New variable.
13216 (grub_fs_probe): Added support for auto-loading.
13218 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13219 (grub_fs_module_list_t): New type.
13221 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13222 (grub_fs_autoload_hook): New prototype.
13224 * genfslist.sh: New file.
13226 * genmk.rb: Added a rule to generate a filesystem list.
13228 2005-06-30 Marco Gerards <metgerards@student.han.nl>
13230 * configure.ac: Fix the test for cross-compiling.
13232 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13233 define GRUB_UTIL anymore.
13235 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13236 so this function works on other systems than just big endian.
13237 (load_modules): Likewise.
13238 (add_segments): Likewise.
13240 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13242 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13243 contains `l' modifier, get a long from va_arg().
13245 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13247 * kern/mm.c (grub_free): If the next free block which is being
13248 merged is the first free block, set the first block to the block
13250 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13252 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13254 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13255 `grub_ieee1275_chosen'.
13257 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13259 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13260 (grub_ieee1275_chosen): New variable.
13261 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13263 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13264 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13265 Rename first argument to `phandle' for consistency.
13266 (grub_ieee1275_get_property_length): Likewise.
13267 (grub_ieee1275_next_property): Likewise. Change type of first argument
13268 to grub_ieee1275_phandle_t.
13269 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13270 Move export next to declaration.
13271 (grub_ieee1275_chosen): New variable.
13272 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13273 Correct cosmetic typo.
13274 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13275 `grub_ieee1275_chosen'.
13276 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13277 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13278 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13279 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13280 `grub_ieee1275_chosen'.
13282 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13284 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13286 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13287 /chosen/bootargs as "variable=value" pairs.
13289 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13291 * include/grub/misc.h (grub_dprintf): New macro.
13292 (grub_real_dprintf): New prototype.
13293 (grub_strword): Likewise.
13294 (grub_iswordseparator): Likewise.
13295 * kern/misc.c (grub_real_dprintf): New function.
13296 (grub_strword): Likewise.
13297 (grub_iswordseparator): Likewise.
13299 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13301 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13302 (roundup): Remove macro.
13303 (grub_ieee1275_flags): Make static.
13304 (grub_ieee1275_realmode): Remove.
13305 (grub_ieee1275_test_flag): New function.
13306 (grub_ieee1275_set_flag): Likewise.
13307 (find_options): Rename to `grub_ieee1275_find_options'; update
13308 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13309 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13310 (cmain): New prototype.
13311 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13312 `grub_ieee1275_flags' directly.
13313 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13314 machine/biosdisk.h.
13315 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13316 Don't include grub/machine/init.h.
13317 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13318 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13320 (grub_ieee1275_realmode): Likewise.
13321 (grub_ieee1275_flag): New enum.
13322 (grub_ieee1275_test_flag): New prototype.
13323 (grub_ieee1275_set_flag): New prototype.
13324 * include/grub/powerpc/ieee1275/init.h: Remove file.
13325 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13326 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13327 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13328 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13330 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13331 `grub_ieee1275_test_flag'.
13332 (grub_ieee1275_encode_devname): Likewise.
13334 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13336 * include/grub/powerpc/ieee1275/ieee1275.h
13337 (grub_ieee1275_encode_devname): New prototype.
13338 (grub_ieee1275_get_filename): Likewise.
13339 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13341 (grub_set_prefix): Likewise.
13342 (grub_machine_init): Call grub_set_prefix.
13343 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13344 (grub_parse_type): New enum.
13345 (grub_ieee1275_get_devargs): New function.
13346 (grub_ieee1275_get_devname): Likewise.
13347 (grub_ieee1275_parse_args): Likewise.
13348 (grub_ieee1275_get_filename): Likewise.
13349 (grub_ieee1275_encode_devname): Likewise.
13351 2005-03-30 Marco Gerards <metgerards@student.han.nl>
13353 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13354 `grub_loader_unset'.
13356 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13358 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13359 instead of grub_ieee1275_interpret.
13360 (grub_halt_init): New function.
13361 (grub_halt_fini): Likewise.
13362 (GRUB_MOD_INIT): Correct message grammar.
13363 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13364 instead of grub_ieee1275_interpret.
13365 (grub_reboot_init): New function.
13366 (grub_reboot_fini): Likewise.
13367 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13368 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13369 util/i386/pc/misc.c with commands/ieee1275/halt.c,
13370 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13371 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13373 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13375 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13377 (grub_halt): Likewise.
13378 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13379 (cmain): Remove __attribute__((unused)).
13380 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13381 (grub_heap_len): Likewise.
13382 (grub_machine_fini): New function.
13383 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13384 (grub_halt): Likewise.
13385 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13387 * util/powerpc/ieee1275/misc.c: New file.
13389 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13391 * DISTLIST: New file.
13392 * gendistlist.sh: Likewise.
13394 * Makefile.in (COMMON_DISTFILES): Removed.
13395 (BOOT_DISTFILES): Likewise.
13396 (CONF_DISTFILES): Likewise.
13397 (DISK_DISTFILES): Likewise.
13398 (FS_DISTFILES): Likewise.
13399 (INCLUDE_DISTFILES): Likewise.
13400 (KERN_DISTFILES): Likewise.
13401 (LOADER_DISTFILES): Likewise.
13402 (TERM_DISTFILES): Likewise.
13403 (UTIL_DISTFILES): Likewise.
13404 (DISTFILES): Likewise.
13405 (uninstall): Uninstall files in $(pkgdata_DATA).
13406 (DISTLIST): New target.
13407 (distdir): Use the contents of the file DISTLIST to get a list of
13410 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13412 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
13413 descriptor. This is ported from GRUB Legacy.
13415 * gencmdlist.sh: Added an extra semicolon to make it work with
13416 old sed versions. Reported by Robert Bihlmeyer
13417 <robbe@orcus.priv.at>.
13419 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
13421 Automatic loading of commands is supported.
13423 * normal/main.c (read_command_list): New function.
13424 (grub_normal_execute): Call read_command_list.
13426 * normal/command.c (grub_register_command): Return zero or CMD.
13427 Allocate CMD->NAME from the heap.
13428 Initialize CMD->MODULE_NAME to zero.
13429 Find the same name as well. If the same command is found and it is
13430 a dummy command, overwrite members. If it is not a dummy command,
13432 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
13433 (grub_command_find): If a dummy command is found, load a module
13434 and retry to find a command only once.
13436 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
13437 make sure that each command is loaded.
13439 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
13441 (struct grub_command): Remove const from the member `name'.
13442 Add a new member `module_name'.
13443 (grub_register_command): Return grub_command_t.
13445 * commands/help.c (grub_cmd_help): Call grub_command_find to make
13446 sure that each command is loaded.
13448 * genmk.rb (PModule::rule): Specify a module name without the
13449 suffix ".mod" to gencmdlist.sh.
13451 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13453 * gencmdlist.sh: New file.
13455 * genmk.rb (PModule::rule): Generate a rule for a command list.
13457 Generate command.lst from $(COMMANDFILES).
13459 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13460 (DATA): Added $(pkgdata_DATA).
13461 (install-local): Install files in $(pkgdata_DATA).
13463 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13465 * term/i386/pc/vga.c (debug_command): Removed.
13466 (GRUB_MOD_INIT): Do not register the command "debug".
13468 From Hollis Blanchard:
13469 * commands/configfile.c: New file.
13470 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13471 commands/configfile.c.
13472 (pkgdata_MODULES): Added configfile.mod.
13473 (configfile_mod_SOURCES): New variable.
13474 (configfile_mod_CFLAGS): Likewise.
13475 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13476 commands/configfile.c.
13477 (pkgdata_MODULES): Added configfile.mod.
13478 (configfile_mod_SOURCES): New variable.
13479 (configfile_mod_CFLAGS): Likewise.
13480 * util/grub-emu.c (main): Call grub_configfile_init and
13481 grub_configfile_fini.
13482 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13484 [GRUB_UTIL] (grub_configfile_fini): Likewise.
13486 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13488 * normal/arg.c (grub_arg_show_help): Do not show the bug report
13491 * commands/help.c (grub_cmd_help): Do not print newlines after
13492 the last command in print_command_help.
13494 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13496 * commands/default.h: New file.
13497 * commands/timeout.h: Likewise.
13498 * normal/context.c: Likewise.
13500 * util/misc.c: Do not include sys/times.h.
13501 Include sys/time.h and grub/machine/time.h.
13502 (grub_get_rtc): Rewritten with gettimeofday.
13504 * util/grub-emu.c (main): Call grub_default_init and
13505 grub_timeout_init before grub_normal_init, and call
13506 grub_timeout_fini and grub_default_fini after grub_main.
13508 * util/console.c (grub_ncurses_checkkey): Return the read
13511 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13514 * normal/main.c (read_config_file): Push MENU. If this fails,
13515 print an error and wait for a user input.
13516 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13517 If a menu is empty or an error occurs, pop MENU.
13518 (grub_normal_execute): Pop and free MENU after grub_menu_run
13521 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13523 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13525 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13527 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13529 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13532 * include/grub/normal.h (struct grub_menu_list): New struct.
13533 (grub_menu_list_t): New type.
13534 (struct grub_context): New struct.
13535 (grub_context_t): New type.
13536 (grub_register_command): Got rid of EXPORT_FUNC.
13537 (grub_unregister_command): Likewise.
13538 (grub_context_get): New prototype.
13539 (grub_context_get_current_menu): Likewise.
13540 (grub_context_push_menu): Likewise.
13541 (grub_context_pop_menu): Likewise.
13542 [GRUB_UTIL] (grub_default_init): Likewise.
13543 [GRUB_UTIL] (grub_default_fini): Likewise.
13544 [GRUB_UTIL] (grub_timeout_init): Likewise.
13545 [GRUB_UTIL] (grub_timeout_fini): Likewise.
13547 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13548 commands/timeout.c and normal/context.c.
13549 (pkgdata_MODULES): Added default.mod and timeout.mod.
13550 (normal_mod_SOURCES): Added normal/context.c.
13551 (default_mod_SOURCES): New variable.
13552 (default_mod_CFLAGS): Likewise.
13553 (timeout_mod_SOURCES): Likewise.
13554 (timeout_mod_CFLAGS): Likewise.
13555 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13557 (pkgdata_MODULES): Added default.mod and timeout.mod.
13558 (normal_mod_SOURCES): Added normal/context.c.
13559 (default_mod_SOURCES): New variable.
13560 (default_mod_CFLAGS): Likewise.
13561 (timeout_mod_SOURCES): Likewise.
13562 (timeout_mod_CFLAGS): Likewise.
13564 * Makefile.in (all-local): Added $(MKFILES).
13566 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
13568 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13569 (grub_emu_SOURCES): Likewise.
13570 (pkgdata_MODULES): Add `sun.mod'.
13571 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13572 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13574 (pkgdata_MODULES): Add `sun.mod'.
13575 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13576 * include/grub/partition.h (grub_sun_partition_map_init): New
13578 (grub_sun_partition_map_fini): Likewise.
13579 * partmap/sun.c: New file.
13580 * util/grub-emu.c (main): Initialize and de-initialize the sun
13581 partitionmap support.
13583 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
13585 This implements an Emacs-like menu entry editor.
13587 * normal/menu_entry.c: New file.
13589 * util/console.c (grub_ncurses_putchar): Translate some Unicode
13590 characters to ASCII.
13591 (saved_char): New variable.
13592 (grub_ncurses_checkkey): Rewritten completely.
13593 (grub_ncurses_getkey): Likewise.
13594 (grub_ncurses_init): Call raw instead of cbreak.
13596 * normal/menu.c (print_entry): Do not put a space.
13597 (init_page): Renamed to ...
13598 (grub_menu_init_page): ... this. All callers changed.
13599 (edit_menu_entry): Removed.
13600 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13602 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13604 * kern/misc.c (grub_vprintf): Call grub_refresh.
13606 * normal/menu.c (DISP_LEFT): Renamed to ...
13607 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13608 * normal/menu.c (DISP_UP): Renamed to ...
13609 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13610 * normal/menu.c (DISP_RIGHT): Renamed to ...
13611 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13612 * normal/menu.c (DISP_DOWN): Renamed to ...
13613 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13614 * normal/menu.c (DISP_HLINE): Renamed to ...
13615 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13616 * normal/menu.c (DISP_VLINE): Renamed to ...
13617 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13618 * normal/menu.c (DISP_UL): Renamed to ...
13619 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13620 * normal/menu.c (DISP_UR): Renamed to ...
13621 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13622 * normal/menu.c (DISP_LL): Renamed to ...
13623 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13624 * normal/menu.c (DISP_LR): Renamed to ...
13625 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13626 * normal/menu.c (TERM_WIDTH): Renamed to ...
13627 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13628 * normal/menu.c (TERM_HEIGHT): Renamed to ...
13629 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13630 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13631 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13632 * normal/menu.c (TERM_MARGIN): Renamed to ...
13633 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13634 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13635 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13636 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13637 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13638 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13639 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13640 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13641 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13642 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13643 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13644 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13645 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13646 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13647 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13648 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13649 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13650 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13651 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13652 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13653 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13654 All callers changed.
13656 * include/grub/normal.h: New prototype.
13658 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13659 normal/menu_entry.c.
13660 (normal_mod_SOURCES): Likewise.
13661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13662 (normal_mod_SOURCES): Likewise.
13664 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13666 * include/grub/normal.h (grub_halt_init): New prototype.
13667 (grub_halt_fini): Likewise.
13668 (grub_reboot_init): Likewise.
13669 (grub_reboot_fini): Likewise.
13671 * util/grub-emu.c: Include signal.h.
13672 (main_env): New global variable.
13673 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13675 (grub_machine_fini): New function.
13676 (main): Call grub_halt_init and grub_reboot_init before
13677 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13678 Call setjmp with MAIN_ENV to go back afterwards.
13679 Call grub_machine_fini right before return.
13681 * include/grub/util/misc.h: Include setjmp.h.
13682 (main_env): New prototype.
13684 * include/grub/kernel.h (grub_machine_fini): New prototype.
13685 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13686 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13688 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13689 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13690 * term/i386/pc/console.c (grub_console_fini): Likewise.
13692 * util/i386/pc/misc.c: New file.
13694 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13695 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13696 commands/i386/pc/reboot.c.
13698 2005-02-14 Guillem Jover <guillem@hadrons.org>
13700 * include/grub/dl.h (grub_dl_check_header): New prototype.
13701 (grub_arch_dl_check_header): Change return type to grub_err_t,
13702 remove size parameter and export function. Update all callers.
13703 * kern/dl.c (grub_dl_check_header): New function.
13704 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13705 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13706 are inside the core.
13707 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13708 independent ELF header checks.
13709 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13710 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13711 `grub_dl_check_header' instead of explicit checks. Check for the
13713 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13714 `grub_dl_check_header' instead of explicit checks. Remove arch
13715 specific ELF header checks.
13717 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13720 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13722 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13723 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13725 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13727 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13728 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13729 (part_map_iterate): Clear `grub_errno' and return 0 if
13730 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13731 * partmap/amiga.c (amiga_partition_map_iterate): Return
13732 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13733 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13735 2005-02-01 Guillem Jover <guillem@hadrons.org>
13737 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13740 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13742 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13744 (grub_rescue_cmd_linux): New prototype.
13745 (grub_rescue_cmd_initrd): Likewise.
13746 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13748 (grub_linux_release_mem): Release the memory for the initrd.
13749 (grub_load_linux): Renamed from this...
13750 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13751 Changed `entry' not to be static. Loop over memory regions to
13752 find another one when the default fails.
13753 (grub_rescue_cmd_initrd): New function.
13754 (grub_linux_init): Remove function.
13755 (grub_linux_fini): Likewise.
13756 (GRUB_MOD_INIT): Register `initrd'.
13757 (GRUB_MOD_FINI): Unregister `initrd'.
13758 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13760 (grub_linux_normal_fini): Likewise.
13761 (GRUB_MOD_INIT): Register `initrd'.
13762 (GRUB_MOD_FINI): Unregister `initrd'.
13764 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13766 * commands/help.c: New file.
13767 * normal/arg.c (show_help): Renamed to...
13768 (grub_arg_show_help): ... this.
13769 * commands/i386/pc/halt.c: New file.
13770 * commands/i386/pc/reboot.c: Likewise.
13771 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13772 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13773 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13774 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13778 (pkgdata_MODULES): Add `help.mod'.
13779 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13780 * grub/i386/pc/init.h (grub_reboot): New prototype.
13781 (grub_halt): Likewise.
13782 * include/grub/normal.h (grub_arg_show_help): New prototype.
13783 (grub_help_init): Likewise.
13784 (grub_help_fini): Likewise.
13785 * util/grub-emu.c (main): Initialize and deinitialize the help
13788 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13790 * normal/command.c (grub_command_init): Fixed the description of
13791 the `set' and `unset' commands.
13793 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13795 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13797 * commands/ieee1275/halt.c: New file.
13798 * commands/ieee1275/reboot.c: Likewise.
13799 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13800 `__attribute__ ((unused))'. Some GCS related fixed.
13801 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13802 (grub_suspend_fini): Likewise.
13803 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13805 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13806 (halt_mod_CFLAGS): New variables.
13807 * include/grub/powerpc/ieee1275/ieee1275.h
13808 (grub_ieee1275_interpret): New prototype.
13810 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13812 * include/grub/misc.h (memmove): New prototype.
13813 (memcpy): Likewise.
13815 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13817 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13818 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13820 2005-01-22 Marco Gerards <metgerards@student.han.nl>
13822 * kern/misc.c (grub_strndup): Function rewritten.
13824 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13826 * normal/menu.c (TERM_WIDTH): Macro redefined.
13827 (TERM_TOP_BORDER_Y): Likewise.
13828 (draw_border): Replaced while-loop by a for-loop. Make the number
13829 of lines consistent with the number of lines displayed in
13830 print_entries. Added a margin below the rectangle.
13831 (print_entry): Make the entry fit in the rectangle.
13832 (print_entries): Display the scroll arrows next to the right
13835 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13837 * fs/minix.c (grub_minix_find_file): Reserve more space for
13838 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13839 `grub_strncpy' to copy `path' into it.
13841 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13843 Add the loopback device, a device via which files can be accessed
13846 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13847 (pkgdata_MODULES): Add loopback.mod.
13848 (loopback_mod_SOURCES): New variable.
13849 (loopback_mod_CFLAGS): Likewise.
13850 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13852 (pkgdata_MODULES): Add loopback.mod.
13853 (loopback_mod_SOURCES): New variable.
13854 (loopback_mod_CFLAGS): Likewise.
13855 * disk/loopback.c: new file.
13856 * include/grub/normal.h (grub_loop_init): New prototype.
13857 (grub_loop_fini): New prototype.
13858 * util/grub-emu.c (main): Initialize and de-initialize loopback
13860 * include/grub/disk.h (grub_disk_dev_id): Add
13861 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13863 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13865 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13867 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13868 (suspend_mod_SOURCES): New variable.
13869 (suspend_mod_CFLAGS): Likewise.
13870 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13872 * commands/ieee1275/suspend.c: New file.
13874 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13876 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
13877 ((unused))' to `__attribute__ ((used))'.
13878 (GRUB_MOD_FINI): Likewise.
13879 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13880 * genmk.rb (PModule): Assign space to common symbols when linking
13883 2005-01-20 Marco Gerards <metgerards@student.han.nl>
13885 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13886 `unsigned' arguments to `grub_size_t'.
13887 (grub_malloc): Likewise.
13888 (grub_realloc): Likewise.
13889 (grub_memalign): Likewise.
13890 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13891 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13892 * util/misc.c (grub_malloc): Likewise.
13893 (grub_realloc): Likewise.
13894 * kern/mm.c (get_header_from_pointer): Change the casts to
13895 `unsigned' into a cast to `grub_size_t'.
13897 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13898 point to `currnode' when `currnode' is changed.
13900 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13901 Schottelius <nico-linux@schottelius.org>.
13903 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13905 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13906 (note_path): Remove variable.
13907 (GRUB_IEEE1275_NOTE_NAME): New macro.
13908 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13909 (grub_ieee1275_note_hdr): New structure.
13910 (grub_ieee1275_note_desc): Likewise.
13911 (grub_ieee1275_note): Likewise.
13912 (load_note): Remove `dir' argument. All callers updated. Remove
13913 `note_img' and `path'. Do not load a file from `note_path'.
13914 Initialize a struct grub_ieee1275_note and write that to `out'.
13915 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13917 2005-01-05 Marco Gerards <metgerards@student.han.nl>
13919 * util/misc.c (grub_util_read_image): Revert last change. It
13920 called `grub_util_read_at', which seeks from the beginning of the
13923 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13925 * TODO: Add note about endianness in grub-mkimage.
13926 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13928 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13929 (grub_mkimage_SOURCES): New target.
13930 * include/grub/kernel.h (grub_start_addr): Remove variable.
13931 (grub_end_addr): Likewise.
13932 (grub_total_module_size): Likewise.
13933 (grub_kernel_image_size): Likewise.
13934 (GRUB_MODULE_MAGIC): New constant.
13935 (grub_module_info): New structure.
13936 (grub_arch_modules_addr): New prototype.
13937 (grub_get_end_addr): Remove prototype.
13938 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13939 * include/grub/powerpc/ieee1275/kernel.h: New file.
13940 * include/grub/util/misc.h (grub_util_get_fp_size): New
13942 (grub_util_read_at): Likewise.
13943 (grub_util_write_image_at): Likewise.
13944 * kern/main.c (grub_get_end_addr): Remove function.
13945 (grub_load_modules): Call grub_arch_modules_addr instead of using
13946 grub_end_addr. Look for a grub_module_info struct in memory. Use
13947 the grub_module_info fields instead of calling grub_get_end_addr
13948 as loop conditions. Move grub_add_unused_region code here.
13949 (grub_add_unused_region): Remove function.
13950 * kern/i386/pc/init.c: Include grub/cache.h.
13951 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13952 one call to add_mem_region.
13953 (grub_arch_modules_addr): New function.
13954 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13955 (grub_total_module_size): Likewise.
13956 Include grub/machine/kernel.h.
13957 (grub_arch_modules_addr): New function.
13958 * util/grub-emu.c (grub_end_addr): Remove variable.
13959 (grub_total_module_size): Likewise.
13960 (grub_arch_modules_addr): New function.
13961 * util/misc.c: Include unistd.h.
13962 (grub_util_get_fp_size): New function.
13963 (grub_util_read_at): Likewise.
13964 (grub_util_write_image_at): Likewise.
13965 (grub_util_read_image): Call grub_util_read_at.
13966 (grub_util_write_image): Call grub_util_write_image_at.
13967 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13968 additional memory in kernel_img for a struct grub_module_info.
13969 Fill in that grub_module_info.
13970 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13972 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13974 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13976 * include/grub/powerpc/ieee1275/ieee1275.h
13977 (grub_ieee1275_milliseconds): New prototype.
13978 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13980 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13981 grub_ieee1275_milliseconds.
13983 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13985 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13987 (find_options): New function.
13988 (cmain): Call find_options.
13989 * include/grub/powerpc/ieee1275/ieee1275.h
13990 (grub_ieee1275_realmode): New extern variable.
13991 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13992 grub_map if grub_ieee1275_realmode is false.
13994 2004-12-29 Marco Gerards <metgerards@student.han.nl>
13996 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13997 lines are inserted and make it work like readline. Reported by
13998 Vincent Pelletier <subdino2004@yahoo.fr>.
14000 2004-12-28 Marco Gerards <metgerards@student.han.nl>
14002 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14004 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14005 `kern/powerpc/cache.S'.
14007 2004-12-27 Marco Gerards <metgerards@student.han.nl>
14009 * genmk.rb: Handle the `Program' class in the main loop. Written
14010 by Johan Rydberg <jrydberg@gnu.org>.
14011 (Program): New class.
14012 (programs): New variable.
14013 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14014 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14015 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14016 (help_arch): Function removed.
14017 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14018 `powerpc/libgcc.h' and `loader.h'.
14019 (pkgdata_PROGRAMS): New variable.
14020 (sbin_UTILITIES): Variable removed.
14021 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14022 (grubof_SOURCES): Variable re-defined so it only includes the
14023 core functionality.
14024 (grubof_CFLAGS): Remove `-DGRUBOF'.
14025 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14026 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14027 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14028 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14029 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14030 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14031 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14032 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14033 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14034 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14035 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14036 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14037 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14038 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14039 (pc_mod_CFLAGS): New variables.
14040 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14041 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14042 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14043 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14045 * include/grub/i386/pc/init.h (grub_os_area_addr)
14046 (rub_os_area_size): ... to here.
14047 * include/grub/powerpc/ieee1275/ieee1275.h
14048 (grub_ieee1275_entry_fn): Export symbol.
14049 * include/grub/powerpc/ieee1275/init.h: New file.
14050 * include/grub/powerpc/libgcc.h: Likewise.
14051 * include/grub/cache.h: Likewise.
14052 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14053 <hollis@penguinppc.org>.
14054 * kern/dl.c: Include <grub/cache.h>.
14055 (grub_dl_flush_cache): New function.
14056 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14058 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14059 (grub_console_init): Removed prototypes.
14060 (grub_machine_init): Don't initialize the modules anymore.
14061 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14063 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14064 Macro undef removed.
14065 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14066 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14067 relocation `R_PPC_REL32'. Return an error when the relocation is
14069 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14070 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14071 * util/misc.c (grub_arch_sync_caches): Likewise.
14073 2004-12-19 Marco Gerards <metgerards@student.han.nl>
14075 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14076 `symlist.c', add `grubof_symlist.c'.
14077 (symlist.c): Variable removed.
14078 (grubof_HEADERS): Variable added.
14079 (grubof_symlist.c): New target.
14080 (kernel_syms.lst): Use `grubof_HEADERS' instead of
14081 `kernel_img_HEADERS'.
14082 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14083 * kern/powerpc/dl.c: New file.
14084 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14086 (grub_arch_dl_relocate_symbols): Likewise.
14087 (grub_register_exported_symbols): Likewise.
14089 2004-12-13 Marco Gerards <metgerards@student.han.nl>
14091 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14092 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
14093 to fail instead. Reported by Vincent Pelletier
14094 <subdino2004@yahoo.fr>.
14096 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14097 it is not allocated. Reported by Vincent Pelletier
14098 <subdino2004@yahoo.fr>.
14100 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14101 output so the output looks better.
14103 2004-12-04 Marco Gerards <metgerards@student.han.nl>
14105 Modulize the partition map support and add support for the amiga
14108 * commands/ls.c: Include <grub/partition.h> instead of
14109 <grub/machine/partition.h>.
14110 * kern/disk.c: Likewise.
14111 * kern/rescue.c: Likewise.
14112 * loader/i386/pc/chainloader.c: Likewise.
14113 * normal/cmdline.c: Likewise.
14114 * kern/powerpc/ieee1275/init.c: Likewise.
14115 (grub_machine_init): Call `grub_pc_partition_map_init',
14116 `grub_amiga_partition_map_init' and
14117 `grub_apple_partition_map_init'.
14118 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14119 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
14120 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
14121 `partition.h' and `pc_partition.h'.
14122 (grub_setup_SOURCES): Remove
14123 `disk/i386/pc/partition.c'. Add `kern/partition.c',
14124 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14125 (grub_emu_SOURCES): Likewise.
14126 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14127 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14128 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14129 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14130 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14131 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14132 (grubof_SOURCES): Likewise.
14133 * disk/i386/pc/partition.c: File removed.
14134 * disk/powerpc/ieee1275/partition.c: Likewise.
14135 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14136 * include/grub/i386/pc/partition.h: Likewise.
14137 * kern/partition.c: New file.
14138 * partmap/amiga.c: Likewise.
14139 * partmap/apple.c: Likewise.
14140 * partmap/pc.c: Likewise.
14141 * include/grub/partition.h: Likewise..
14142 * include/grub/pc_partition.h: Likewise.
14143 * util/grub-emu.c: Include <grub/partition.h> instead of
14144 <grub/machine/partition.h>.
14145 (main): Call `grub_pc_partition_map_init',
14146 `grub_amiga_partition_map_init' and
14147 `grub_apple_partition_map_init' and deinitialize afterwards.
14148 * util/i386/pc/biosdisk.c: Include `#include
14149 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14150 `<grub/machine/partition.h>'.
14151 * util/i386/pc/grub-setup.c: Likewise.
14152 * util/i386/pc/biosdisk.c: Likewise.
14153 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14154 partition information in case of a PC partition.
14155 * util/i386/pc/grub-setup.c: Include `#include
14156 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14157 `<grub/machine/partition.h>'.
14158 (setup): Only access the PC specific partition information in case
14161 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
14163 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14164 (grub_longjmp): Likewise.
14165 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14167 * normal/powerpc/setjmp.S: New file.
14168 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14169 `normal/powerpc/setjmp.S'.
14170 (grubof_CFLAGS): Add `-DGRUBOF'.
14171 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14172 [GRUB_UTIL && !GRUBOF].
14174 2004-11-16 Marco Gerards <metgerards@student.han.nl>
14176 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14177 property named `name'. Correctly handle the error returned by
14178 `grub_ieee1275_finddevice' if a device can not be opened.
14180 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
14182 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14183 `actual' for negativity.
14184 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14187 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14189 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14190 (PAGE_OFFSET): New macro.
14191 (CRTC_ADDR_PORT): Likewise.
14192 (CRTC_DATA_PORT): Likewise.
14193 (START_ADDR_HIGH_REGISTER): Likewise.
14194 (START_ADDR_LOW_REGISTER): Likewise.
14195 (GRAPHICS_ADDR_PORT): Likewise.
14196 (GRAPHICS_DATA_PORT): Likewise.
14197 (READ_MAP_REGISTER): Likewise.
14198 (INPUT_STATUS1_REGISTER): Likewise.
14199 (INPUT_STATUS1_VERTR_BIT): Likewise.
14200 (page): New variable.
14201 (wait_vretrace): New function.
14202 (set_read_map): Likewise.
14203 (set_start_address): Likewise.
14204 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14206 (check_vga_mem): Take the page into account.
14207 (write_char): Likewise.
14208 (write_cursor): Likewise.
14209 (scroll_up): Likewise. Copy the page to the page that is not
14210 shown and switch between both pages.
14211 (grub_vga_putchar): Fix off by one error.
14212 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14215 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14217 Add support for iso9660 (including rockridge).
14219 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14220 (iso9660_mod_SOURCES): New variable.
14221 (iso9660_mod_CFLAGS): Likewise.
14222 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14223 * include/grub/fs.h (grub_iso9660_init): New prototype.
14224 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14225 * fs/iso9660.c: New file.
14227 * include/grub/misc.h (grub_strncat): New prototype.
14228 * kern/misc.c (grub_strncat): New function.
14230 * fs/hfs.c (grub_hfs_mount): Translate the error
14231 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14232 * fs/jfs.c (grub_jfs_mount): Likewise.
14233 * fs/ufs.c (grub_ufs_mount): Likewise.
14235 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14237 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14238 which initialized BAT registers.
14239 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14240 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14242 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14243 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14245 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14246 (grub_mapclaim): Likewise.
14247 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14248 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14251 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14253 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14254 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14255 -ffreestanding and -msoft-float.
14257 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14259 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14260 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14261 set in grub_ieee1275_flags.
14263 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14265 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14267 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14268 grub_console_init first.
14269 Change the memory range used for grub_ieee1275_claim and
14270 grub_mm_init_region.
14271 Print an error message if the claim fails.
14272 Include <grub/misc.h>.
14274 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14276 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14277 Call grub_children_iterate for device nodes of type `scsi',
14279 (grub_ofdisk_open): Remove manual device alias resolution.
14280 Fix memory leak when device cannot be opened.
14281 * include/grub/powerpc/ieee1275/ieee1275.h
14282 (grub_children_iterate): New prototype.
14283 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14285 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14286 Return -1 if args.size was -1.
14288 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14290 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14291 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14292 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14293 Open Firmware's memory for it; claim memory from _start to _end.
14294 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14295 (_end): New extern.
14296 (_start): Zero BSS from __bss_start to _end.
14297 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14299 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14301 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14303 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14304 -1 if args.base was -1.
14306 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14308 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14309 escape sequence instead of a literal ^L. Also call
14310 grub_ofconsole_gotoxy.
14312 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14314 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14315 void * arguments to grub_addr_t. All callers updated. Also make
14316 the `result' argument optional.
14317 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14318 All callers updated.
14320 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14322 * commands/ls.c (grub_ls_list_files): Use the string following the
14323 initial ')', if present, as the filesystem path.
14324 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14326 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14328 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14330 Make the source code of the menu interface more readable.
14332 * normal/menu.c: Include grub/mm.h.
14333 (TERM_WIDTH): New macro.
14334 (TERM_HEIGHT): Likewise.
14335 (TERM_INFO_HEIGHT): Likewise.
14336 (TERM_MARGIN): Likewise.
14337 (TERM_SCROLL_WIDTH): Likewise.
14338 (TERM_TOP_BORDER_Y): Likewise.
14339 (TERM_LEFT_BORDER_X): Likewise.
14340 (TERM_BORDER_WIDTH): Likewise.
14341 (TERM_MESSAGE_HEIGHT): Likewise.
14342 (TERM_BORDER_HEIGHT): Likewise.
14343 (TERM_NUM_ENTRIES): Likewise.
14344 (TERM_FIRST_ENTRY_Y): Likewise.
14345 (TERM_ENTRY_WIDTH): Likewise.
14346 (TERM_CURSOR_X): Likewise.
14347 (draw_border): Use macros instead of magic numbers.
14348 (print_entry): Likewise.
14349 (print_entries): Likewise.
14350 (run_menu): Likewise. Also, handle the key 'e'.
14351 (run_menu_entry): Ignore empty command lines.
14352 (print_message): Added a new argument EDIT. If EDIT is true,
14353 print a different message.
14354 (init_page): Likewise.
14355 (edit_menu_entry): New function. Not implemented yet.
14357 2004-09-17 Marco Gerards <metgerards@student.han.nl>
14359 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14360 can be loaded from normal mode.
14362 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14364 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14365 (multiboot_mod_CFLAGS): New variables.
14366 * loader/i386/pc/linux_normal.c: New file.
14367 * loader/i386/pc/multiboot_normal.c: Likewise.
14369 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14370 attribute `unused'.
14372 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
14373 `fdiro' to read the mode information from instead of `diro'.
14375 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14376 looking up a symlink.
14378 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14380 * normal/command.c (grub_command_execute): Don't parse the
14381 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14382 flags of the command.
14384 * normal/menu.c (grub_menu_run): Fix typo.
14386 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
14388 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14390 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14391 `y + 1' instead of `y - 1'.
14393 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
14395 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
14397 From Hollis Blanchard <hollis@penguinppc.org>:
14398 * kern/misc.c (memmove): New alias for grub_memmove.
14399 (memcmp): New alias for grub_memcmp.
14400 (memset): New alias for grub_memset.
14401 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14402 Change "int handle" to "grub_ieee1275_phandle_t handle".
14403 * include/grub/powerpc/ieee1275/ieee1275.h
14404 (grub_ieee1275_get_property): Likewise.
14406 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
14408 Added normal mode command `chainloader' as module chain.mod, which
14409 depends on normal.mod and _chain.mod.
14411 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
14412 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
14413 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
14415 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
14416 but arguments parsing moved to ...
14417 (grub_chainloader_cmd): ... here. New function.
14418 * include/grub/i386/pc/chainloader.h: New file.
14419 * loader/i386/pc/chainloader_normal.c: Likewise.
14421 2004-09-11 Marco Gerards <metgerards@student.han.nl>
14423 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
14424 (grub_mkimage_LDFLAGS): Likewise.
14425 (grub_emu_SOURCES): Likewise.
14426 (kernel_img_HEADERS): Added fshelp.h.
14427 * fs/ext2.c: Include <grub/fshelp.h>.
14428 (FILETYPE_REG): New macro.
14429 (FILETYPE_INO_REG): Likewise.
14430 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
14432 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
14434 (grub_fshelp_node): New struct.
14435 (grub_ext2_data): Added member `diropen'. Changed member `inode'
14437 (grub_ext2_get_file_block): Removed function.
14438 (grub_ext2_read_block): New function.
14439 (grub_ext2_read_file): Replaced parameter `data' by `node'.
14440 This function was written.
14441 (grub_ext2_mount): Read the root inode. Create a diropen struct.
14442 (grub_ext2_find_file): Removed function.
14443 (grub_ext2_read_symlink): New function.
14444 (grub_ext2_iterate_dir): Likewise.
14445 (grub_ext2_open): Rewritten.
14446 (grub_ext2_dir): Rewritten.
14447 * include/grub/fshelp.h: New file.
14448 * fs/fshelp.c: Likewise.
14450 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
14452 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
14453 (print_message): Add a missing newline.
14454 (run_menu): Added timeout support.
14455 (run_menu_entry): New local function.
14456 (grub_menu_run): Added support for booting.
14458 * kern/loader.c (grub_loader_is_loaded): New function.
14460 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14461 (grub_get_rtc): Exported.
14463 * include/grub/i386/pc/time.h: Include grub/symbol.h.
14464 (grub_get_rtc): Exported.
14466 * include/grub/normal.h (struct grub_command_list): Remove
14467 constant from the member `command'.
14469 * include/grub/loader.h (grub_loader_is_loaded): Declared.
14471 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14473 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14475 2004-08-28 Marco Gerards <metgerards@student.han.nl>
14477 Add support for the JFS filesystem.
14479 * fs/jfs.c: New file.
14480 * include/grub/fs.h (grub_jfs_init): New prototype.
14481 (grub_jfs_fini): New prototype.
14482 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14483 (grub_emu_SOURCES): Likewise.
14484 (pkgdata_MODULES): Add jfs.mod.
14485 (jfs_mod_SOURCES): New variable.
14486 (jfs_mod_CFLAGS): Likewise.
14487 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14488 (grubof_SOURCES): Likewise.
14489 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14491 * fs/fat.c (grub_fat_find_dir): Convert the filename little
14492 endian to the host endian.
14493 (grub_fat_utf16_to_utf8): Move function from there...
14494 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
14495 the endianness of the source string anymore.
14496 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14498 2004-08-24 Marco Gerards <metgerards@student.han.nl>
14500 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14501 (grub_boot_fini) [GRUB_UTIL]: Likewise.
14502 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14503 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14505 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14506 (grub_hfs_iterate_dir): Make the function static. Add prototypes
14507 for `node_found' and `it_dir'.
14508 (grub_hfs_dir): Add prototype for `dir_hook'.
14510 * fs/minix.c (grub_minix_get_file_block): Add prototype for
14511 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
14512 and `indir32' to silence a gcc warning.
14514 * include/grub/fs.h (grub_hfs_init): New prototype.
14515 (grub_hfs_fini): Likewise.
14518 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14520 Each disk device has its own id now. This is useful to make use
14521 of multiple disk devices.
14523 * include/grub/disk.h (grub_disk_dev_id): New enum.
14524 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14525 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14527 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14528 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14530 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14531 GRUB_DISK_DEVICE_OFDISK_ID as an id.
14533 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14534 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14536 * include/grub/disk.h (struct grub_disk_dev): Added a new member
14537 "id" which is used by the cache manager.
14539 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14542 2004-08-18 Marco Gerards <metgerards@student.han.nl>
14544 * fs/hfs.c: New file.
14545 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14546 (grub_emu_SOURCES): Likewise.
14547 (pkgdata_MODULES): Add hfs.mod.
14548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14549 (grubof_SOURCES): Likewise.
14550 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14552 * include/grub/misc.h (grub_strncasecmp): Add prototype.
14553 * kern/misc.c (grub_strncasecmp): Add function.
14555 2004-08-14 Marco Gerards <metgerards@student.han.nl>
14557 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14560 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14561 (grub_ext2_dir): In case the directory entry type is unknown, read
14564 2004-08-02 Peter Bruin <pjbruin@dds.nl>
14566 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14567 grub_load_linux instead of grub_rescue_cmd_linux as second
14568 argument of grub_rescue_register_command.
14570 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14572 2004-07-27 Marco Gerards <metgerards@student.han.nl>
14574 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14576 * commands/boot.c: Remove the check for `GRUB_UTIL'.
14577 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14578 `loader/powerpc/ieee1275/linux.c',
14579 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14580 * include/grub/powerpc/ieee1275/ieee1275.h
14581 (grub_ieee1275_release): New prototype.
14582 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14583 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14584 normal, boot, linux and linux_normal.
14585 * loader/powerpc/ieee1275/linux.c: New file.
14586 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14588 2004-07-12 Marco Gerards <metgerards@student.han.nl>
14590 * normal/arg.c (grub_arg_parse): Correct error handling after
14591 reallocating the argumentlist (check if `argl' is not null instead
14592 of checking if `args' is not null).
14593 * kern/mm.c (grub_realloc): Return the same pointer when using the
14594 same region, instead of returning the header address.
14596 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14598 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14599 one block instead of two when looking for the initial partition.
14600 (grub_partition_probe): Initialize the local variable `p' with 0.
14601 Use base 10 for the grub_strtoul call.
14602 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
14603 need for one local variable.
14604 (grub_strtoul): Don't add the new value to `num', instead of that
14607 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14609 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14610 (pxeboot_img_SOURCES): New variable.
14611 (pxeboot_img_ASFLAGS): Likewise.
14612 (pxeboot_img_LDFLAGS): Likewise.
14613 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
14614 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
14615 <lode_leroy@hotmail.com>.
14617 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14619 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14620 there was no input.
14622 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14624 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
14625 the history buffer logic.
14627 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14629 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14630 (FILETYPE_INO_SYMLINK): New macros.
14631 (grub_ext2_find_file): Check if the node is a directory using the
14632 inode stat information instead of using the filetype in the
14633 dirent. Exclude the first character of an absolute symlink.
14634 (grub_ext2_dir): Mask out the filetype part of the mode member of
14637 2004-05-24 Marco Gerards <metgerards@student.han.nl>
14639 Add support for UFS version 1 and 2. Add support for the minix
14640 filesystem version 1 and 2, both the variants with 14 and 30 long
14643 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14645 (grub_emu_SOURCES): Likewise.
14646 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14647 (ufs_mod_SOURCES): New variable.
14648 (ufs_mod_CFLAGS): Likewise.
14649 (minix_mod_SOURCES): Likewise.
14650 (minix_mod_CFLAGS): Likewise.
14651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14653 (grubof_SOURCES): Likewise.
14654 * fs/ufs.c: New file.
14655 * fs/minix.c: New file.
14656 * include/grub/fs.h (grub_ufs_init): New prototype.
14657 (grub_ufs_fini): Likewise.
14658 (grub_minix_init): Likewise.
14659 (grub_minix_fini): Likewise.
14660 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14663 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14666 commands/ls.c, commands/terminal.c, commands/boot.c,
14667 commands/cmp.c and commands/cat.c.
14668 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14670 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14673 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14675 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14676 and grub_, respectively. Because the conversion is trivial and
14677 mechanical, I omit the details here. Please refer to the CVS
14678 if you need more information.
14680 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14682 * include/pupa: Renamed to ...
14683 * include/grub: ... this.
14684 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14685 * util/i386/pc/grub-mkimage.c: ... this.
14686 * util/i386/pc/pupa-setup.c: Renamed to ...
14687 * util/i386/pc/grub-setup.c: ... this.
14688 * util/pupa-emu.c: Renamed to ...
14689 * util/grub-emu.c: ... this.
14691 2004-03-29 Marco Gerards <metgerards@student.han.nl>
14693 Add support for the newworld apple macintosh (PPC). This has been
14694 tested on the powerbook 2000 only. It only adds support for
14695 generic ieee1275 functions, console and disk support. This should
14696 be easy to port to other architectures with support for Open
14699 * configure.ac: Accept the powerpc as host_cpu. In the case of
14700 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14701 specific tests are only executed while building for the i386.
14702 Inverse test for crosscompile.
14703 * genmk.rb (Utility): Allow assembler files.
14704 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14705 * conf/powerpc-ieee1275.rmk: New file.
14706 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14707 * disk/powerpc/ieee1275/partition.c: Likewise.
14708 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14709 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14710 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14711 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14712 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14713 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14714 * include/pupa/powerpc/ieee1275/loader.h
14715 * include/pupa/powerpc/setjmp.h: Likewise.
14716 * include/pupa/powerpc/types.h: Likewise.
14717 * kern/powerpc/ieee1275/init.c: Likewise.
14718 * kern/powerpc/ieee1275/openfw.c: Likewise.
14719 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14721 These files were written by Johan Rydberg
14722 (jrydberg@night.trouble.net) and I only modified them slightly.
14724 * boot/powerpc/ieee1275/cmain.c: New file.
14725 * boot/powerpc/ieee1275/crt0.S: Likewise.
14726 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14727 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14729 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14731 * Makefile.in: Update copyright.
14732 * genmodsrc.sh: Likewise.
14733 * gensymlist.sh: Likewise.
14734 * term/i386/pc/vga.c: Indent correctly.
14736 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14737 bugreporting address.
14738 * util/i386/pc/pupa-setup.c (usage): Likewise,
14739 (main): Call pupa_ext2_init and pupa_ext2_fini.
14741 * fs/fat.c (log2): Renamed to ...
14742 (fat_log2): ... this.
14743 All callers changed.
14744 * kern/misc.c (memcpy): Alias to pupa_memmove.
14745 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14747 * util/console.c (pupa_ncurses_fini): Return 0.
14749 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14750 Move fail label here.
14751 [__GNU__]: Don't warn when using stat.
14752 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14753 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14754 long int. Use strtol instead of strtoul.
14756 2004-03-14 Marco Gerards <metgerards@student.han.nl>
14758 * commands/boot.c: New file.
14759 * commands/cat.c: Likewise.
14760 * commands/cmp.c: Likewise.
14761 * commands/ls.c: Likewise.
14762 * commands/terminal.c: Likewise.
14763 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14764 (pupa_register_command): Changed interface to match the new
14766 (pupa_command_execute): Changed (almost rewritten) so it uses
14767 pupa_split_command. Added support for setting variables using the
14769 (rescue_command): Changed to work with the new argument parser.
14770 (terminal_command): Moved from here to commands/terminal.c.
14771 (set_command): New function.
14772 (unset_command): New function.
14773 (insmod_command): New function.
14774 (rmmod_command): New function.
14775 (lsmod_command): New function.
14776 (pupa_command_init): Don't initialize the command terminal
14777 anymore. Initialize the commands set, unset, insmod, rmmod and
14779 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14780 (kernel_img_HEADERS): Add arg.h and env.h.
14781 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14782 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14783 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14785 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14787 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14788 (boot_mod_SOURCES): New variable.
14789 (terminal_mod_SOURCES): Likewise.
14790 (ls_mod_SOURCES): Likewise.
14791 (cmp_mod_SOURCES): Likewise.
14792 (cat_mod_SOURCES): Likewise.
14794 * normal/arg.c: New file.
14795 * kern/env.c: Likewise.
14796 * include/pupa/arg.h: Likewise.
14797 * include/pupa/env.h: Likewise.
14798 * font/manager.c (font_command): Changed to match argument parsing
14800 (PUPA_MOD_INIT): Likewise.
14801 * hello/hello.c (pupa_cmd_hello): Likewise.
14802 (PUPA_MOD_INIT): Likewise.
14803 * include/pupa/disk.h: Include <pupa/device.h>.
14804 (pupa_print_partinfo): New prototype.
14805 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14806 (pupa_dl_get_prefix): Likewise.
14807 * include/pupa/misc.h: Include <pupa/err.h>.
14808 (pupa_isgraph): New prototype.
14809 (pupa_isdigit): Likewise.
14810 (pupa_split_cmdline): Likewise.
14811 * include/pupa/normal.h: Include <pupa/arg.h>.
14812 (pupa_command): Changed the prototype of the member `func' to
14813 match the argument parsing interface. Added member `options'.
14814 (pupa_register_command): Updated to match function.
14815 (pupa_arg_parse): New prototype.
14816 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14817 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14818 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14819 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14820 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14821 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14822 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14823 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14824 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14825 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14826 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14827 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14828 * kern/disk.c: Include <pupa/file.h>.
14829 (pupa_print_partinfo): New function.
14830 * kern/dl.c: Include <pupa/env.h>.
14831 (pupa_dl_dir): Variable removed.
14832 (pupa_dl_load): Use the environment variable `prefix' instead of
14833 the variable pupa_dl_dir.
14834 (pupa_dl_set_prefix): Function removed.
14835 (pupa_dl_get_prefix): Likewise.
14836 * kern/i386/pc/init.c: Include <pupa/env.h>.
14837 (pupa_machine_init): Use the environment variable `prefix' instead of
14838 using pupa_dl_set_prefix to set the prefix.
14839 * kern/main.c: Include <pupa/env.h>.
14840 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14841 using pupa_dl_get_prefix to get the prefix.
14842 * kern/misc.c: Include <pupa/env.h>.
14843 (pupa_isdigit): New function.
14844 (pupa_isgraph): Likewise.
14845 (pupa_ftoa): Likewise.
14846 (pupa_vsprintf): Added support for printing values of the type
14847 `double'. Make it possible to format variable output when using
14848 formatting like `%1.2%f'.
14849 (pupa_split_cmdline): New function.
14850 * kern/rescue.c: Include <pupa/env.h>.
14851 (next_word): Removed function.
14852 (pupa_rescue_cmd_prefix): Likewise.
14853 (pupa_rescue_cmd_set): New function.
14854 (pupa_rescue_cmd_unset): New function.
14855 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14856 split the command line instead of splitting it here. Added
14857 support for setting variables using the syntax `foo=bar'. Don't
14858 initialize the prefix command anymore. Initialized the set and
14860 * normal/cmdline.c: Include <pupa/env.h>.
14861 (pupa_tab_complete): Added prototypes for print_simple_completion,
14862 print_partition_completion, add_completion, iterate_commands,
14863 iterate_dev, iterate_part and iterate_dir. Moved code to print
14864 partition information from here to kern/disk.c.
14865 (pupa_cmdline_run): Don't check if the function exists anymore.
14866 * normal/main.c: Include <pupa/env.h>.
14867 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14868 instead of using pupa_dl_get_prefix to get the prefix.
14869 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14870 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14872 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14873 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14874 ((unused))' to silence a gcc warning.
14875 (pupa_vga_setcolor): Likewise.
14876 (debug_command): Changed to match argument parsing
14878 * util/pupa-emu.c: Include <pupa/env.h>.
14879 (options): Added 0's for unused fields to silence a gcc warning.
14881 (main): Use the environment variable `prefix' instead of using
14882 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14883 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14886 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14887 * util/misc.c: Include <malloc.h>.
14888 (pupa_malloc): Rewritten so errors are correctly reported.
14889 (pupa_realloc): Likewise.
14890 (pupa_memalign): Likewise.
14891 (pupa_mm_init_region): Declare unused variables with
14892 `__attribute__ ((unused))' to silence a gcc warning.
14893 * normal/i386/setjmp.S: Remove tab at the end of the file to
14894 silence a gcc warning.
14895 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14896 variables with `__attribute__ ((unused))' to silence a gcc
14898 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14899 local variable i unsigned to silence a gcc warning.
14901 * kern/term.c: Include <pupa/misc.h>.
14902 (pupa_more_lines): New variable.
14903 (pupa_more): Likewise.
14904 (pupa_putcode): When the pager is active pause at the end of every
14906 (pupa_set_more): New function.
14907 * include/pupa/term.h (pupa_set_more): New prototype.
14910 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14912 Now this project is GRUB 2 rather than PUPA. The location of
14913 the CVS repository was moved to GRUB's.
14915 * configure.ac: Use bug-grub as the reporting address.
14916 Use GRUB instead of PUPA.
14917 Change the version number to 1.90.
14919 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14921 * genkernsyms.sh: Updated copyright information.
14922 * genmk.rb: Likewise.
14923 * genmodsrc.sh: Likewise.
14924 * gensymlist.sh: Likewise.
14925 * boot/i386/pc/boot.S: Likewise.
14926 * boot/i386/pc/diskboot.S: Likewise.
14927 * disk/i386/pc/biosdisk.c: Likewise.
14928 * disk/i386/pc/partition.c: Likewise.
14929 * font/manager.c: Likewise.
14930 * fs/ext2.c: Likewise.
14931 * fs/fat.c: Likewise.
14932 * include/pupa/boot.h: Likewise.
14933 * include/pupa/device.h: Likewise.
14934 * include/pupa/disk.h: Likewise.
14935 * include/pupa/dl.h: Likewise.
14936 * include/pupa/elf.h: Likewise.
14937 * include/pupa/err.h: Likewise.
14938 * include/pupa/file.h: Likewise.
14939 * include/pupa/font.h: Likewise.
14940 * include/pupa/fs.h: Likewise.
14941 * include/pupa/kernel.h: Likewise.
14942 * include/pupa/loader.h: Likewise.
14943 * include/pupa/misc.h: Likewise.
14944 * include/pupa/mm.h: Likewise.
14945 * include/pupa/net.h: Likewise.
14946 * include/pupa/normal.h: Likewise.
14947 * include/pupa/rescue.h: Likewise.
14948 * include/pupa/setjmp.h: Likewise.
14949 * include/pupa/symbol.h: Likewise.
14950 * include/pupa/term.h: Likewise.
14951 * include/pupa/types.h: Likewise.
14952 * include/pupa/i386/setjmp.h: Likewise.
14953 * include/pupa/i386/types.h: Likewise.
14954 * include/pupa/i386/pc/biosdisk.h: Likewise.
14955 * include/pupa/i386/pc/boot.h: Likewise.
14956 * include/pupa/i386/pc/console.h: Likewise.
14957 * include/pupa/i386/pc/init.h: Likewise.
14958 * include/pupa/i386/pc/kernel.h: Likewise.
14959 * include/pupa/i386/pc/linux.h: Likewise.
14960 * include/pupa/i386/pc/loader.h: Likewise.
14961 * include/pupa/i386/pc/memory.h: Likewise.
14962 * include/pupa/i386/pc/multiboot.h: Likewise.
14963 * include/pupa/i386/pc/partition.h: Likewise.
14964 * include/pupa/i386/pc/time.h: Likewise.
14965 * include/pupa/i386/pc/vga.h: Likewise.
14966 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14967 * include/pupa/util/getroot.h: Likewise.
14968 * include/pupa/util/misc.h: Likewise.
14969 * include/pupa/util/resolve.h: Likewise.
14970 * kern/device.c: Likewise.
14971 * kern/disk.c: Likewise.
14972 * kern/dl.c: Likewise.
14973 * kern/err.c: Likewise.
14974 * kern/file.c: Likewise.
14975 * kern/fs.c: Likewise.
14976 * kern/loader.c: Likewise.
14977 * kern/main.c: Likewise.
14978 * kern/misc.c: Likewise.
14979 * kern/mm.c: Likewise.
14980 * kern/rescue.c: Likewise.
14981 * kern/term.c: Likewise.
14982 * kern/i386/dl.c: Likewise.
14983 * kern/i386/pc/init.c: Likewise.
14984 * kern/i386/pc/lzo1x.S: Likewise.
14985 * kern/i386/pc/startup.S: Likewise.
14986 * loader/i386/pc/chainloader.c: Likewise.
14987 * loader/i386/pc/linux.c: Likewise.
14988 * loader/i386/pc/multiboot.c: Likewise.
14989 * normal/cmdline.c: Likewise.
14990 * normal/command.c: Likewise.
14991 * normal/main.c: Likewise.
14992 * normal/menu.c: Likewise.
14993 * normal/i386/setjmp.S: Likewise.
14994 * term/i386/pc/console.c: Likewise.
14995 * term/i386/pc/vga.c: Likewise.
14996 * util/console.c: Likewise.
14997 * util/genmoddep.c: Likewise.
14998 * util/misc.c: Likewise.
14999 * util/pupa-emu.c: Likewise.
15000 * util/resolve.c: Likewise.
15001 * util/unifont2pff.rb: Likewise.
15002 * util/i386/pc/biosdisk.c: Likewise.
15003 * util/i386/pc/getroot.c: Likewise.
15004 * util/i386/pc/pupa-mkimage.c: Likewise.
15005 * util/i386/pc/pupa-setup.c: Likewise.
15007 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15009 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15010 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15011 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15012 reading and reset it after reading.
15013 (pupa_ext2_close): Return PUPA_ERR_NONE.
15015 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15017 (struct linux_kernel_header): Add kernel_version and
15019 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15020 pupa_file_read succeeds.
15021 (pupa_rescue_cmd_initrd): Implement.
15023 2003-12-03 Marco Gerards <metgerards@student.han.nl>
15025 * fs/ext2.c (pupa_ext2_label): New function.
15026 (pupa_ext2_fs): Added label.
15027 * fs/fat.c (pupa_fat_label): New function.
15028 (pupa_fat_fs): Added label.
15029 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15031 * kern/misc.c (pupa_strndup): New function.
15032 * include/pupa/misc.h (pupa_strndup): New prototype.
15034 * include/pupa/normal.h: Include <pupa/err.h>.
15035 (pupa_set_history): New prototype.
15036 (pupa_iterate_commands): New prototype.
15037 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15038 <pupa/disk.h>, <pupa/file.h>.
15039 (hist_size): New variable.
15040 (hist_lines): Likewise.
15041 (hist_end): Likewise.
15042 (hist_used): Likewise.
15043 (pupa_set_history): New function.
15044 (pupa_history_get): Likewise.
15045 (pupa_history_add): Likewise.
15046 (pupa_history_replace): Likewise.
15047 (pupa_tab_complete): Likewise.
15048 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15049 completion shows partitionnames while completing partitions, this
15050 feature was suggested by Jeff Bailey.
15051 * normal/command.c (pupa_iterate_commands): New function.
15052 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15053 (pupa_normal_init): Initialize history buffer.
15054 (PUPA_MOD_INIT): Likewise.
15055 (pupa_normal_fini): Free the history buffer.
15056 (PUPA_MOD_FINI): Likewise.
15058 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15061 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15062 * configure.ac [i386]: Check for regparam bug.
15063 (NESTED_FUNC_ATTR) [! i386]: Defined.
15065 2003-11-17 Marco Gerards <metgerards@student.han.nl>
15067 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15068 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15069 (pupa_emu_SOURCES): New variable.
15070 (pupa_emu_LDFLAGS): Likewise.
15071 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15072 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15073 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15074 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15075 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15076 (pupa_jmp_buf): New typedef.
15077 (pupa_setjmp) [PUPA_UTIL]: New macro.
15078 (pupa_longjmp) [PUPA_UTIL]: Likewise.
15079 * include/pupa/term.h (struct pupa_term): New member `refresh'.
15080 (pupa_refresh): New prototype.
15081 * include/pupa/util/getroot.h: New file.
15082 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15084 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15085 (pupa_rescue_cmd_cat): Likewise.
15086 (pupa_rescue_cmd_ls): Likewise.
15087 (pupa_rescue_cmd_testload): Likewise.
15088 (pupa_rescue_cmd_lsmod): Likewise.
15089 * normal/cmdline.c (pupa_cmdline_get): Likewise.
15090 * normal/menu.c (run_menu): Likewise.
15091 * kern/term.c (pupa_cls): Likewise.
15092 (pupa_refresh): New function.
15093 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15094 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15095 * util/console.c: New file.
15097 * util/i386/pc/getroot.c: New file.
15098 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15099 (pupa_putchar): New function.
15100 (pupa_refresh): Likewise.
15101 (xgetcwd): Function moved to ...
15102 (strip_extra_slashes): Likewise.
15103 (get_prefix): Likewise.
15104 * util/i386/pc/getroot.c: ... here.
15105 (find_root_device): Function moved and renamed to...
15106 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15107 Changed all callers.
15108 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15110 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15111 Changed all callers.
15112 * util/misc.c (pupa_memalign): New function.
15113 (pupa_mm_init_region): Likewise.
15114 (pupa_register_exported_symbols): Likewise.
15115 (pupa_putchar): Function removed.
15116 * util/pupa-emu.c: New file.
15118 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
15120 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15121 (_multiboot_mod_SOURCES): New variable.
15122 (_multiboot_mod_CFLAGS): Likewise.
15123 * loader/i386/pc/multiboot.c: New file.
15124 * include/pupa/i386/pc/multiboot.h: Likewise.
15125 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15126 (pupa_multiboot_real_boot): New function.
15127 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15128 (pupa_multiboot_real_boot): New prototype.
15129 (pupa_rescue_cmd_multiboot): Likewise
15130 (pupa_rescue_cmd_module): Likewise.
15132 * kern/loader.c (pupa_loader_set): Continue when
15133 pupa_loader_unload_func() fails.
15134 (pupa_loader_unset): New function.
15135 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15137 * kern/misc.c (pupa_stpcpy): New function.
15138 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15140 2003-11-12 Marco Gerards <metgerards@student.han.nl>
15142 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15143 for available extensions.
15145 * include/pupa/i386/pc/time.h: New file.
15146 * kern/disk.c: Include <pupa/machine/time.h>.
15147 (PUPA_CACHE_TIMEOUT): New macro.
15148 (pupa_last_time): New variable.
15149 (pupa_disk_open): Flush the cache when there was a timeout.
15150 (pupa_disk_close): Reset the timer.
15151 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15153 * util/misc.c: Include <sys/times.h>
15154 (pupa_get_rtc): New function.
15156 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15158 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15160 (pupa_ext2_get_file_block): Use blocks member.
15162 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15163 first block. Return -1 instead of pupa_errno on error.
15165 2003-10-27 Marco Gerards <metgerards@student.han.nl>
15167 * README: In the pupa-mkimage example use _chain instead of chain
15168 and ext2 instead of fat.
15169 * TODO: Replace ext2fs with jfs as an example. Add an item for
15170 adding journal playback for ext2fs.
15171 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15172 (pkgdata_MODULES): Added ext2.mod.
15173 (ext2_mod_SOURCES): New variable.
15174 (ext2_mod_CFLAGS): Likewise.
15175 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15176 * include/pupa/misc.h (pupa_strncpy): New prototype.
15177 (pupa_strcat): Likewise.
15178 (pupa_strncmp): Likewise.
15179 * kern/misc.c (pupa_strcat): Enable function.
15180 (pupa_strncpy): New function.
15181 (pupa_strncmp): Likewise.
15182 * fs/ext2.c: New file.
15184 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15185 when the read failed before retrying.
15186 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15187 (_FILE_OFFSET_BITS): Likewise.
15188 * configure.ac: Added AC_SYS_LARGEFILE.
15190 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15192 * genmk.rb (PModule#rule): Make sure to get only symbol names
15193 from the output of nm.
15194 Reported by Robert Millan <zeratul2@wanadoo.es>.
15196 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15198 I forgot to check in these changes for a long time. This adds
15199 incomplete support for VGA console, and this is still very
15200 buggy. Also, a lot of consideration is required for I18N,
15201 UNICODE, and VGA font issues. Therefore, assume that this is
15202 such that "better than nothing".
15204 * font/manager.c: New file.
15205 * include/pupa/font.h: Likewise.
15206 * include/pupa/i386/pc/vga.h: Likewise.
15207 * term/i386/pc/vga.c: Likewise.
15208 * util/unifont2pff.rb: Likewise.
15210 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15211 (pkgdata_MODULES): Added vga.mod and font.mod.
15212 (vga_mod_SOURCES): New variables.
15213 (vga_mod_CFLAGS): Likewise.
15214 (font_mod_SOURCES): Likewise.
15215 (font_mod_CFLAGS): Likewise.
15217 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15219 * include/pupa/term.h: Include pupa/err.h.
15220 (struct pupa_term): Added init and fini.
15221 Changed the argument of putchar to pupa_uint32_t.
15223 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15224 (pupa_console_real_putchar): New prototype.
15225 (pupa_console_putchar): Removed.
15226 (pupa_console_checkkey): Exported.
15227 (pupa_console_getkey): Likewise.
15229 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15232 * kern/term.c (pupa_term_set_current): Rewritten.
15233 (pupa_putchar): Likewise.
15234 (pupa_putcode): New function.
15236 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15237 (pupa_console_real_putchar): ... this.
15238 (pupa_vga_set_mode): New function.
15239 (pupa_vga_get_font): Likewise.
15241 * normal/command.c: Include pupa/term.h.
15242 (terminal_command): New function.
15243 (pupa_command_init): Register the command "terminal".
15245 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15246 (DISP_UP): Likewise.
15247 (DISP_RIGHT): Likewise.
15248 (DISP_DOWN): Likewise.
15249 (DISP_HLINE): Likewise.
15250 (DISP_VLINE): Likewise.
15251 (DISP_UL): Likewise.
15252 (DISP_UR): Likewise.
15253 (DISP_LL): Likewise.
15254 (DISP_LR): Likewise.
15256 * term/i386/pc/console.c (pupa_console_putchar): New function.
15258 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15260 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15261 FIX. Reverse the path_list.
15263 * include/pupa/normal.h: Export pupa_register_command and
15264 pupa_unregister_command.
15266 * hello/hello.c (pupa_cmd_hello): New module.
15267 * conf/i386-pc.rmk: Added hello.mod.
15269 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15271 * kern/i386/pc/lzo1x.S: New file.
15273 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15274 (compress_kernel): New variable.
15275 (generate_image): Heavily modified to support compressing a
15276 large part of the core image.
15278 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15280 (pupa_util_load_image): New function.
15282 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15283 (pupa_compressed_size): New variable.
15284 (codestart): Enable Gate A20 here.
15285 Decompress the compressed part of the core image.
15286 Rearrange the code to put functions and variables which are
15287 required for initialization in the non-compressed part.
15290 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15293 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15295 * include/pupa/i386/pc/kernel.h
15296 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15297 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15298 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15299 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15300 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15302 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15304 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15305 (Utility#rule): Likewise.
15307 * configure.ac: Check if LZO is available.
15309 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15311 * include/pupa/normal.h: New file.
15312 * include/pupa/setjmp.h: Likewise.
15313 * include/pupa/i386/setjmp.h: Likewise.
15314 * normal/cmdline.c: Likewise.
15315 * normal/command.c: Likewise.
15316 * normal/main.c: Likewise.
15317 * normal/menu.c: Likewise.
15318 * normal/i386/setjmp.S: Likewise.
15320 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15321 (pupa_rescue_cmd_initrd): Likewise.
15323 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15326 * kern/i386/pc/startup.S (translation_table): New variable.
15327 (translate_keycode): New function.
15328 (pupa_console_getkey): Call translate_keycode.
15330 * kern/rescue.c (attempt_normal_mode): New function.
15331 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15332 it failed, print a message.
15334 * kern/mm.c (pupa_real_malloc): Print more information when a
15335 free magic is broken.
15336 (pupa_free): If the first free header is not free actually, set
15339 * kern/main.c (pupa_load_normal_mode): Just load the module
15341 (pupa_main): Don't print the message
15342 "Entering into rescue mode..." here.
15344 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15346 (pupa_rescue_cmd_initrd): Likewise.
15347 (pupa_rescue_cmd_initrd): Likewise.
15349 * include/pupa/symbol.h (FUNCTION): Specify the type.
15350 (VARIABLE): Likewise.
15352 * include/pupa/err.h (pupa_err_t): Added
15353 PUPA_ERR_UNKNOWN_COMMAND.
15355 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15356 (pupa_dl_get_prefix): Likewise.
15358 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15359 Added _chain.mod and _linux.mod instead of chain.mod and
15361 (chain_mod_SOURCES): Renamed to ...
15362 (_chain_mod_SOURCES): ... this.
15363 (chain_mod_CFLAGS): Renamed to ...
15364 (_chain_mod_CFLAGS): ... this.
15365 (linux_mod_SOURCES): Renamed to ...
15366 (_linux_mod_SOURCES): ... this.
15367 (linux_mod_CFLAGS): Renamed to ...
15368 (_linux_mod_CFLAGS): ... this.
15369 (normal_mod_SOURCES): New variable.
15370 (normal_mod_CFLAGS): Likewise.
15371 (normal_mod_ASFLAGS): Likewise.
15373 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
15375 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15378 * kern/dl.c (pupa_dl_ref): Refer depending modules
15380 (pupa_dl_unref): Unrefer depending modules recursively.
15381 Don't call pupa_dl_unload implicitly, because PUPA can crash if
15382 a module is unloaded before one depending on that module is
15384 (pupa_dl_unload): Unload depending modules explicitly,
15387 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
15389 * include/pupa/i386/pc/linux.h: New file.
15390 * loader/i386/pc/linux.c: Likewise.
15392 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15394 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15395 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
15396 of PUPA_CHAINLOADER_BOOT_SECTOR.
15398 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
15399 (pupa_linux_prot_size): New variable.
15400 (pupa_linux_tmp_addr): Likewise.
15401 (pupa_linux_real_addr): Likewise.
15402 (pupa_linux_boot_zimage): New function.
15403 (pupa_linux_boot_bzimage): Likewise.
15405 * kern/i386/pc/init.c (struct mem_region): New structure.
15406 (MAX_REGIONS): New macro.
15407 (mem_regions): New variable.
15408 (num_regions): Likewise.
15409 (pupa_os_area_addr): Likewise.
15410 (pupa_os_area_size): Likewise.
15411 (pupa_lower_mem): Likewise.
15412 (pupa_upper_mem): Likewise.
15413 (add_mem_region): New function.
15414 (compact_mem_regions): Likewise.
15415 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
15416 the size of the conventional memory and that of so-called upper
15417 memory (before the first memory hole).
15418 Instead of adding each found region to free memory, use
15419 add_mem_region and add them after removing overlaps.
15420 Also, add only 1/4 of the upper memory to free memory. The rest
15421 is used for loading OS images. Maybe this is ad hoc, but this
15422 makes it much easier to relocate OS images when booting.
15424 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
15425 (pupa_enter_rescue_mode): Don't register initrd and module.
15427 * kern/mm.c: Include pupa/dl.h.
15429 * kern/main.c: Include pupa/file.h and pupa/device.h.
15431 * kern/loader.c (pupa_loader_load_module_func): Removed.
15432 (pupa_loader_load_module): Likewise.
15434 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
15437 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
15438 (pupa_linux_tmp_addr): Likewise.
15439 (pupa_linux_real_addr): Likewise.
15440 (pupa_linux_boot_zimage): Likewise.
15441 (pupa_linux_boot_bzimage): Likewise.
15443 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
15444 (pupa_upper_mem): Likewise.
15445 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
15446 module is too dangerous.
15448 * include/pupa/loader.h (pupa_os_area_addr): Declared.
15449 (pupa_os_area_size): Likewise.
15450 (pupa_loader_set): Remove the first argument. Loader doesn't
15451 manage modules or initrd any longer.
15452 (pupa_loader_load_module): Removed.
15454 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15455 (linux_mod_SOURCES): New variable.
15456 (linux_mod_CFLAGS): Likewise.
15458 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
15460 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15461 the length of a blocklist correctly.
15463 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15464 Use ioctl only if the OS file is a block device.
15465 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15466 not very useful for normal files.
15468 * kern/main.c (pupa_set_root_dev): New function.
15469 (pupa_load_normal_mode): Likewise.
15470 (pupa_main): Call those above.
15472 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15475 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15477 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
15479 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15480 (setup): Configure the installed partition information and the
15483 * loader/i386/pc/chainloader.c (my_mod): New variable.
15484 (pupa_chainloader_unload): New function.
15485 (pupa_rescue_cmd_chainloader): Refer itself.
15486 (PUPA_MOD_INIT): Save its own module in MY_MOD.
15488 * kern/i386/pc/startup.S (install_partition): Removed.
15489 (version_string): Likewise.
15490 (config_file): Likewise.
15491 (pupa_install_dos_part): New variable.
15492 (pupa_install_bsd_part): Likewise.
15493 (pupa_prefix): Likewise.
15494 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15496 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15498 (make_install_device): New function.
15499 (pupa_machine_init): Set the dl prefix.
15501 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15502 (buf): Renamed to ...
15503 (linebuf): ... this.
15504 (pupa_rescue_cmd_prefix): New function.
15505 (pupa_rescue_cmd_insmod): Likewise.
15506 (pupa_rescue_cmd_rmmod): Likewise.
15507 (pupa_rescue_cmd_lsmod): Likewise.
15508 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15511 * kern/mm.c (pupa_memalign): If failed even after invalidating
15512 disk caches, unload unneeded modules and retry.
15514 * kern/misc.c (pupa_memmove): New function.
15515 (pupa_memcpy): Removed.
15516 (pupa_strcpy): New function.
15517 (pupa_itoa): Made static.
15519 * kern/dl.c (pupa_dl_iterate): New function.
15520 (pupa_dl_ref): Likewise.
15521 (pupa_dl_unref): Likewise.
15522 (pupa_dl_unload): Return if succeeded or not.
15523 (pupa_dl_unload_unneeded): New function.
15524 (pupa_dl_unload_all): Likewise.
15525 (pupa_dl_init): Renamed to ...
15526 (pupa_dl_set_prefix): ... this.
15527 (pupa_dl_get_prefix): New function.
15529 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15530 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15531 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15532 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15533 (pupa_install_dos_part): Declared.
15534 (pupa_install_bsd_part): Likewise.
15535 (pupa_prefix): Likewise.
15536 (pupa_boot_drive): Likewise.
15538 * include/pupa/types.h: Fix a typo.
15540 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15542 (pupa_memmove): Declared.
15543 (pupa_strcpy): Likewise.
15545 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15546 pupa_mod_init takes one argument, its own module.
15547 (pupa_dl_unload_unneeded): Declared.
15548 (pupa_dl_unload_all): Likewise.
15549 (pupa_dl_ref): Likewise.
15550 (pupa_dl_unref): Likewise.
15551 (pupa_dl_iterate): Likewise.
15552 (pupa_dl_init): Renamed to ...
15553 (pupa_dl_set_prefix): ... this.
15554 (pupa_dl_get_prefix): Declared.
15556 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15557 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15559 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15560 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15562 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15563 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15565 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15567 * util/i386/pc/pupa-setup.c (setup): Define the internal
15568 function find_first_partition_start at the top level, because GCC
15569 3.0.x cannot compile internal functions in deeper scopes
15571 (find_root_device): Use lstat instead of stat.
15572 Don't follow symbolic links.
15573 Fix the path-constructing code.
15575 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15576 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15577 by a BLKGETSIZE ioctl first, because block devices don't fill
15578 the member st_mode of the structure stat on Linux.
15579 [__linux__] (linux_find_partition): Use a temporary buffer
15580 REAL_DEV for the working space. Copy it to DEV before returning.
15581 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15582 buffer cache consistent.
15583 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15584 strncmp. The previous value was merely wrong.
15585 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15587 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15588 FAT size is 12. The previous value was merely wrong.
15590 * kern/main.c (pupa_main): Don't split the starting message from
15593 * kern/term.c (pupa_putchar): Put CR after LF instead of before
15594 LF, because BIOS goes crazy about character attributes in this
15597 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15599 * include/i386/pc/util/biosdisk.h: New file.
15600 * util/i386/pc/biosdisk.c: Likewise.
15601 * util/i386/pc/pupa-setup.c: Likewise.
15603 * Makefile.in (INCLUDE_DISTFILES): Added
15604 include/pupa/i386/pc/util/biosdisk.h.
15605 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15606 directory util/i386/pc.
15607 (install-local): Added a rule for sbin_UTILITIES.
15608 (uninstall): Likewise.
15610 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15612 * util/misc.c (xrealloc): New function.
15613 (pupa_malloc): Likewise.
15614 (pupa_free): Likewise.
15615 (pupa_realloc): Likewise.
15616 (pupa_stop): Likewise.
15617 (pupa_putchar): Likewise.
15619 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15621 * include/pupa/util/misc.h (xrealloc): Declared.
15623 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15625 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15626 (PUPA_BOOT_MACHINE_BPB_END): ... this.
15628 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15629 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15631 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15632 way should be implemented.
15633 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15635 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15636 the size of NAME for safety.
15637 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15640 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15641 (pupa_setup_SOURCES): Likewise.
15643 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15645 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15647 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15648 bunch of pushl's from pusha, because this destroys the return
15651 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15653 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15654 This means that any missing prototypes could be fatal. Also, you
15655 must take care when writing assembly code. See the comments at
15656 the beginning of startup.S, for more details.
15658 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15659 compilation mechanism.
15660 (pupa_chainloader_real_boot): Likewise.
15661 (pupa_biosdisk_rw_int13_extensions): Likewise.
15662 (pupa_biosdisk_rw_standard): Likewise.
15663 (pupa_biosdisk_check_int13_extensions): Likewise.
15664 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15665 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15666 (pupa_get_memsize): Likewise.
15667 (pupa_get_mmap_entry): Likewise.
15668 (pupa_console_putchar): Likewise.
15669 (pupa_console_setcursor): Likewise.
15670 (pupa_getrtsecs): Use pushl instead of push.
15672 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15673 memory instead of the stack for a mmap entry, because some
15674 BIOSes may ignore the maximum size and overflow.
15676 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15678 * genmk.rb (PModule#rule): Compile automatically generated
15679 sources with module-specific CFLAGS as well as other sources.
15681 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15683 * configure.ac: Check ld.
15684 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15685 respectively, before checking endianness and sizes.
15687 * Makefile.in (LD): New variable.
15689 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15691 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15693 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15695 * Changelog: New file.