1 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
4 that no multiple data or metadata areas are supported and `Unknown
7 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
9 Move loader out of the kernel
11 * kern/loader.c: moved to ...
12 * commands/boot.c: ... moved here
13 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
14 * commands/boot.c (grub_cmd_boot): moved here. All users updated
15 * include/grub/kernel.h (grub_machine_fini): export
16 * include/grub/loader.h (grub_loader_is_loaded): update declaration
17 (grub_loader_set): likewise
18 (grub_loader_unset): likewise
19 (grub_loader_boot): likewise
20 * conf/common.rmk: new module boot.mod
21 (pkglib_MODULES): add boot.mod
22 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
23 (grub_emu_SOURCES): likewise
24 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
25 (grub_emu_SOURCES): likewise
26 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
27 (grub_emu_SOURCES): likewise
28 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
29 (grub_emu_SOURCES): likewise
30 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
31 (grub_emu_SOURCES): likewise
32 * conf/sparcs64-ieee1275.rmk (kernel_elf_SOURCES): likewise
33 (grub_emu_SOURCES): likewise
34 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
35 (grub_emu_SOURCES): likewise
37 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
39 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
41 * kern/misc.c (grub_itoa): Removed function
43 (grub_vsprintf): use grub_lltoa
45 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
49 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
50 * conf/i386-coreboot.rmk: likewise
51 * conf/i386-ieee1275.rmk: likewise
52 * conf/powerpc-ieee1275.rmk: likewise
54 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
56 * INSTALL: Add that `./autogen.sh' needs to be run before
59 2009-04-14 Bean <bean123ch@gmail.com>
61 * Makefile.in (pkglib_DATA): Add handler.lst.
62 (handler.lst): New rule.
64 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
65 * conf/i386-coreboot.rmk: Likewise.
66 * conf/i386-ieee1275.rmk: Likewise.
67 * conf/i386-efi.rmk: Likewise.
68 * conf/x86_64-efi.rmk: Likewise.
69 * conf/powerpc-ieee1275.rmk: Likewise.
70 * conf/sparc64-ieee1275.rmk: Likewise.
72 * genhandlerlist.sh: New file.
74 * genmk.rb: Add rules to generate handler.lst.
76 * include/grub/normal.h (grub_file_getline): New function definition.
77 (read_handler_list): Likewise.
78 (free_handler_list): Likewise.
80 * include/grub/term.h (grub_term_register_input): Add name parameter
81 for auto generation of handler.lst.
82 (grub_term_register_output): Likewise.
84 * normal/handler.c: New file.
86 * normal/main.c (get_line): Renamed to grub_file_getline.
87 (read_config_file): Use the newly renamed grub_file_getline.
88 (read_command_list): Likewise.
89 (read_fs_list): Likewise.
90 (grub_normal_execute): Call read_handler_list to parse handler.lst.
91 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
93 * term/efi/console.c (grub_console_init): Add name parameter for auto
94 generation of handler.lst.
95 * term/gfxterm.c: Likewise.
96 * term/i386/pc/at_keyboard.c: Likewise.
97 * term/i386/pc/console.c: Likewise.
98 * term/i386/pc/serial.c: Likewise.
99 * term/i386/pc/vesafb.c: Likewise.
100 * term/i386/pc/vga.c: Likewise.
101 * term/i386/pc/vga_text.c: Likewise.
102 * term/ieee1275/ofconsole.c: Likewise.
103 * term/usb_keyboard.c: Likewise.
105 2009-04-14 Bean <bean123ch@gmail.com>
107 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
108 properly with null character.
110 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
113 * config.h.in: Likewise.
114 * stamp-h.in: Likewise.
115 * DISTLIST: Likewise.
116 * conf/common.mk: Likewise.
117 * conf/i386-coreboot.mk: Likewise.
118 * conf/i386-efi.mk: Likewise.
119 * conf/i386-ieee1275.mk: Likewise.
120 * conf/i386.mk: Likewise.
121 * conf/i386-pc.mk: Likewise.
122 * conf/powerpc-ieee1275.mk: Likewise.
123 * conf/sparc64-ieee1275.mk: Likewise.
124 * conf/x86_64-efi.mk: Likewise.
126 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
129 2009-04-14 John Stanley <jpsinthemix@verizon.net>
130 David S. Miller <davem@davemloft.net>
132 * util/hostdisk.c (make_device_name): Fix buffer length
135 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
137 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
138 <sys/param.h> and <sys/sysctl.h>.
139 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
140 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
141 opening the device and reset them afterwards.
143 2009-04-13 Pavel Roskin <proski@gnu.org>
145 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
146 Reported by John Stanley <jpsinthemix@verizon.net>
148 2009-04-13 Robert Millan <rmh@aybabtu.com>
150 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
151 that name for menuentries when appropiate.
153 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
155 * util/grub.d/10_freebsd.in: Add a missing `fi'.
157 2009-04-13 Robert Millan <rmh@aybabtu.com>
159 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
160 to Linux, simply abort telling the user it's no longer supported.
162 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
164 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
165 doestn't exist. Check also for /boot/kernel/kernel.gz. Print
166 `freebsd_loadenv' only when devices.hints exist.
168 2009-04-13 Pavel Roskin <proski@gnu.org>
170 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
172 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
174 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
176 (grub_drive): Likewise.
178 2009-04-13 David S. Miller <davem@davemloft.net>
180 * kern/sparc64/ieee1275/ieee1275.c: New file.
181 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
182 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
183 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
184 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
185 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
186 grub_ieee1275_alloc_physmem): Declare new exported functions.
188 * include/grub/sparc64/ieee1275/loader.h: New file.
189 * include/grub/sparc64/ieee1275/memory.h: Likewise.
190 * include/grub/sparc64/kernel.h: Likewise.
191 * loader/sparc64/ieee1275/linux.c: Likewise.
193 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
194 (grub_fstest_SOURCES): Likewise.
196 * util/hostdisk.c (make_device_name): Do not make any assumptions
197 about the length of drive names.
199 * kern/dl.c (grub_dl_load_file): Close file immediately when
200 we are done using it.
202 2009-04-12 David S. Miller <davem@davemloft.net>
204 * kern/misc.c (grub_ltoa): Fix cast when handling negative
205 values. Noticed by Pavel Roskin.
207 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
210 * genmk.rb: Add more flexible image type specification, also
211 pass --strip-unneeded to objcopy.
212 * conf/i386-pc.rmk: Use *_FORMAT.
213 * conf/i386-pc.mk: Rebuilt.
215 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
216 (OFDISK_HASH_SZ): Define.
217 (ofdisk_hash): New hash table.
218 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
219 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
220 instead of device phandle which is not unique.
222 * kern/sparc64/ieee1275/init.c: Delete, replace with...
223 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
224 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
225 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
226 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
227 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
228 GRUB_KERNEL_MACHINE_DATA_END): Define.
229 (grub_kernel_image_size, grub_total_module_size): Declare.
231 2009-04-12 Pavel Roskin <proski@gnu.org>
233 * configure.ac: Change the logic when we check for target tools.
234 Do it when the target is specified and it's different from the
235 specified value of the host.
237 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
239 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
240 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
241 GNU/kFreeBSD. Check if a device is a character device. Use
242 DIOCGMEDIASIZE to get the size.
243 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
244 support for GNU/kFreeBSD.
245 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
246 is a character device instead of a block device. Add support for
247 FreeBSD device names.
249 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
250 is a character device instead of a block device.
252 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
253 is a character device instead of a block device.
255 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
257 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
258 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
259 FreeBSD. Check if a device is a character device. Use
260 DIOCGMEDIASIZE to get the size.
261 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
263 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
264 is a character device instead of a block device. Add support for
265 FreeBSD device names.
267 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
268 a character device instead of a block device.
269 (grub_util_check_char_device): New function.
271 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
272 a character device instead of a block device.
274 * include/grub/util/getroot.h (grub_util_check_char_device): New
277 2009-04-11 David S. Miller <davem@davemloft.net>
279 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
281 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
282 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
283 function, if present.
284 (__bswapdi2): Likewise.
286 * include/grub/sparc64/ieee1275/boot.h: New file.
287 * boot/sparc64/ieee1275/boot.S: Likewise.
288 * boot/sparc64/ieee1275/diskboot.S: Likewise.
290 * kern/misc.c (grub_ltoa): New function.
291 (grub_vsprintf): Use it to format 'long' integers.
293 2009-04-10 David S. Miller <davem@davemloft.net>
295 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
296 slots are of type grub_ieee1275_cell_t.
297 (grub_nand_read): Likewise.
298 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
299 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
300 macros are used to compare values in arg/ret block of the call.
301 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
302 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
303 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
304 grub_ieee1275_instance_to_path, grub_ieee1275_write,
305 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
306 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
307 grub_ieee1275_close, grub_ieee1275_set_property,
308 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
309 grub_ieee1275_cell_t.
310 * kern/ieee1275/openfw.c (grub_map): Likewise.
311 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
312 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
314 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
315 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
316 (grub_devalias_iterate): Likewise.
318 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
322 * fs/ufs.c (INODE_NBLOCKS): new definition
323 (struct grub_ufs_dirent): added fields for non-BSD dirents
324 (grub_ufs_get_file_block): fixed double indirect handling
325 (grub_ufs_lookup_symlink): use more robust way to determine whether
327 (grub_ufs_find_file): support for non-BSD dirents
328 (grub_ufs_dir): support for non-BSD dirents
330 2009-04-10 Bean <bean123ch@gnail.com>
332 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
333 attribute, otherwise the size would be wrong for i386 platform.
335 * include/grub/pci.h (grub_pci_read_word): New inline function.
336 (grub_pci_read_byte): Likewise.
337 (grub_pci_write): Likewise.
338 (grub_pci_write_word): Likewise.
339 (grub_pci_write_byte): Likewise.
341 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
343 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
344 (find_framebuf): Scan pci to locate the frame buffer address.
346 * commands/efi/fixvideo.c: New file.
348 * commands/efi/loadbios.c: Likewise.
350 * commands/memrw.c: Likewise.
352 * util/grub-dumpbios.in: Likewise.
354 * conf/common.rmk (grub-dumpbios): New utility.
355 (pkglib_MODULES): New module memrw.mod.
356 (memrw_mod_SOURCE): New macro.
357 (memrw_mod_CFLAGS): Likewise.
358 (memrw_mod_LDFLAGS): Likewise.
360 * conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
362 (loadbios_mod_SOURCE): New macro.
363 (loadbios_mod_CFLAGS): Likewise.
364 (loadbios_mod_LDFLAGS): Likewise.
365 (fixvideo_mod_SOURCE): Likewise.
366 (fixvideo_mod_CFLAGS): Likewise.
367 (fixvideo_mod_LDFLAGS): Likewise.
369 * conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
371 (loadbios_mod_SOURCE): New macro.
372 (loadbios_mod_CFLAGS): Likewise.
373 (loadbios_mod_LDFLAGS): Likewise.
374 (fixvideo_mod_SOURCE): Likewise.
375 (fixvideo_mod_CFLAGS): Likewise.
376 (fixvideo_mod_LDFLAGS): Likewise.
378 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
380 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
382 2009-04-07 David S. Miller <davem@davemloft.net>
384 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
385 support for R_SPARC_OLO10 relocations. Fix compile warning for
386 R_SPARC_WDISP30 case.
387 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
389 2009-04-06 Pavel Roskin <proski@gnu.org>
391 * include/grub/misc.h (ARRAY_SIZE): New macro.
392 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
394 * loader/i386/linux.c (allocate_pages): Use free_pages().
395 (grub_linux_unload): Don't use free_pages().
396 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
397 wrong index. Treat all other modes as text modes.
398 (grub_cmd_linux): Initialize vid_mode unconditionally to
399 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
401 * commands/help.c (print_command_help): Use cmd->prio, not
402 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
404 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
408 * parttool/pcpart.c: new file
409 * commands/parttool.c: likewise
410 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
411 (parttool_mod_SOURCES): new variable
412 (parttool_mod_CFLAGS): likewise
413 (parttool_mod_LDFLAGS): likewise
414 (pcpart_mod_SOURCES): likewise
415 (pcpart_mod_CFLAGS): likewise
416 (pcpart_mod_LDFLAGS): likewise
417 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
418 and parttool/pcpart.c
419 * conf/i386-efi.rmk: likewise
420 * conf/i386-ieee1275.rmk: likewise
421 * conf/i386-pc.rmk: likewise
422 * conf/powerpc-ieee1275.rmk: likewise
423 * conf/sparc64-ieee1275.rmk: likewise
424 * conf/x86_64-ieee1275.rmk: likewise
426 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
428 Support for mtime and further expandability of dir command
430 * include/grub/lib/datetime.h: moved to ...
431 * include/grub/datetime.h: ... moved here and added
432 declaration of grub_unixtime2datetime. All users updated
433 * include/grub/fs.h: new syntax for dir and mtime functionin
435 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
436 and GRUB_FSHELP_FLAGS_MASK
437 * commands/ls.c (grub_ls_list_files): Write mtime in long format
438 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
439 (grub_ext2_mtime): new function
440 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
441 (grub_hfsplus_mtime): new function
442 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
443 (GRUB_UFS_ATTR_FILE): likewise
444 (GRUB_UFS_ATTR_LNK): likewise
445 (struct grub_ufs_sblock): new fields mtime
446 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
448 (grub_ufs_dir): mtime support
449 (grub_ufs_mtime): new function
450 * fs/affs.c (grub_affs_dir): use new dir syntax
451 * fs/afs.c (grub_afs_dir): likewise
452 * fs/cpio.c (grub_cpio_dir): likewise
453 * fs/fat.c (grub_fat_find_dir): likewise
454 * fs/hfs.c (grub_hfs_dir): likewise
455 * fs/iso9660.c (grub_iso9660_dir): likewise
456 * fs/jfs.c (grub_jfs_dir): likewise
457 * fs/minix.c (grub_minix_dir): likewise
458 * fs/ntfs.c (grub_ntfs_dir): likewise
459 * fs/reiserfs.c (grub_reiserfs_dir): likewise
460 * fs/sfs.c (grub_sfs_dir): likewise
461 * fs/xfs.c (grub_xfs_dir): likewise
462 * util/hostfs.c (grub_hostfs_dir): likewise
463 * lib/datetime.c: moved to ...
464 * normal/datetime.c: ... moved here
465 (grub_unixtime2datetime): new function
466 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
467 * normal/completition.c (iterate_dir): use new dir syntax
468 * normal/misc.c (grub_normal_print_device_info): tell the
469 last modification time of a volume
470 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
471 * conf/common.rmk: added lib/datetime.c to ls.mod
472 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
473 (normal_mod_SOURCES): likewise
474 (datetime_mod_SOURCES): Removed lib/datetime.c
475 * conf/i386-efi.rmk: likewise
476 * conf/i386-ieee1275.rmk: likewise
477 * conf/i386-pc.rmk: likewise
478 * conf/powerpc-ieee1275.rmk: likewise
479 * conf/sparc64-ieee1275.rmk: likewise
480 * conf/x86_64-efi.rmk: likewise
482 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
484 Trim trailing spaces in FAT label and support mtools-like labels
486 * fs/fat.c (grub_fat_iterate_dir): New function based
488 (grub_fat_find_dir): use grub_fat_iterate_dir
489 (grub_fat_label): likewise
491 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
493 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
495 remove extraneous kernel_elf_HEADERS
497 2009-04-04 Bean <bean123ch@gnail.com>
499 * include/grub/util/misc.h: Add dummy function fsync for mingw.
501 * util/misc.c: Likewise.
503 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
505 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
506 instead of grub_printf.
508 2009-04-03 Robert Millan <rmh@aybabtu.com>
510 * loader/i386/linux.c (grub_linux_setup_video): Fill
511 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
512 values from `mode info' structure instead of hardcoded
515 2009-04-01 Pavel Roskin <proski@gnu.org>
517 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
519 * genmk.rb: Likewise.
520 * configure.ac: Likewise.
522 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
524 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
525 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
527 2009-04-01 David S. Miller <davem@davemloft.net>
529 * normal/sparc64/setjmp.S: Fix setjmp implementation.
530 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
531 (grub_setjmp): Mark with 'returns_twice' attribute.
532 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
533 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
534 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
536 2009-04-01 Robert Millan <rmh@aybabtu.com>
538 Reapply fix from 2008-07-28 which was accidentally reverted; also
539 perform the same fix to a similar check in same function.
541 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
542 with the same number are found, just use issue a warning with
543 grub_dprintf(), as this error has been reported to be non-fatal.
545 2009-03-31 Pavel Roskin <proski@gnu.org>
547 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
548 for cross-compilation.
550 2009-03-30 Robert Millan <rmh@aybabtu.com>
552 Fix i386-ieee1275 build.
554 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
557 2009-03-30 Pavel Roskin <proski@gnu.org>
559 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
560 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
561 zero-terminated, rely only on the strlen value. Fix comparison
562 of strings differing in length.
564 2009-03-30 Robert Millan <rmh@aybabtu.com>
566 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
567 checking for abi version. Improve error messages on BIOS to notify
568 user about `linux16' command.
570 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
574 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
576 * disk/scsi.c (grub_scsi_open): free scsi in case of error
578 2009-03-29 Robert Millan <rmh@aybabtu.com>
580 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
581 set `vid_mode' accordingly.
582 (grub_linux_boot): Process `vid_mode' and set video mode.
584 2009-03-29 Robert Millan <rmh@aybabtu.com>
586 * util/grub.d/10_linux.in (linux_entry): New function.
587 Factorize generation of Linux boot entries.
589 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
591 Make the format of Environment Block plain text. The boot loader
592 part is not tested well yet.
594 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
597 (usage): Remove "info" and "clear". Add "unset". Update the
598 description of "set", as this does not delete variables any
600 (create_envblk_file): Complete rewrite.
601 (open_envblk_file): Likewise.
603 (cmd_list): Likewise.
605 (cmd_clear): Likewise.
606 (list_variables): New function.
607 (write_envblk): Likewise.
608 (set_variables): Likewise.
609 (unset_variables): Likewise.
610 (main): Complete rewrite.
612 * commands/loadenv.c (buffer): Removed.
614 (open_envblk_file): New function.
615 (read_envblk_file): Complete rewrite.
616 (grub_cmd_load_env): Likewise.
617 (grub_cmd_list_env): Likewise.
618 (struct blocklist): New struct.
619 (free_blocklists): New function.
620 (check_blocklists): Likewise.
621 (write_blocklists): Likewise.
622 (grub_cmd_save_env): Complete rewrite.
624 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
625 a plain text signature.
626 (GRUB_ENVBLK_MAXLEN): Removed.
627 (struct grub_envblk): Complete rewrite.
628 (grub_envblk_find): Removed.
629 (grub_envblk_insert): Likewise.
630 (grub_envblk_open): New prototype.
631 (grub_envblk_set): Likewise.
632 (grub_envblk_delete): Put const to VALUE.
633 (grub_envblk_iterate): Put const to NAME and VALUE.
634 (grub_envblk_close): New prototype.
635 (grub_envblk_buffer): New inline function.
636 (grub_envblk_size): Likewise.
638 * lib/envblk.c: Include grub/mm.h.
639 (grub_env_find): Removed.
640 (grub_envblk_open): New function.
641 (grub_envblk_close): Likewise.
642 (escaped_value_len): Likewise.
643 (find_next_line): Likewise.
644 (grub_envblk_insert): Removed.
645 (grub_envblk_set): New function.
646 (grub_envblk_delete): Complete rewrite.
647 (grub_envblk_iterate): Likewise.
649 2009-03-28 Robert Millan <rmh@aybabtu.com>
651 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
652 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
653 variables. Use 16-bit loader.
654 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
656 * kern/i386/loader.S (grub_linux_boot): Rename to ...
657 (grub_linux16_boot): ... this. Update all users.
658 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
659 (grub_linux_boot): ... this. Update all users.
661 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
662 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
663 commands to `linux16' and `initrd16'.
664 (GRUB_MOD_FINI(linux)): Rename to ...
665 (GRUB_MOD_FINI(linux16)): ... this.
667 2009-03-24 Pavel Roskin <proski@gnu.org>
669 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
670 not just for compilation.
672 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
674 Move multiboot helper out of kernel
676 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
677 `loader/i386/multiboot_helper.S'.
678 * conf/i386-coreboot.rmk: Likewise
679 * conf/i386-ieee1275.rmk: Likewise
681 * kern/i386/loader.S: Move multiboot helpers from here...
682 * loader/i386/multiboot_helper.S: ...moved here
683 * include/grub/i386/loader.h: Move declarations of multiboot
685 * include/grub/i386/multiboot.h: ...moved here
686 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
688 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
690 * kern/env.c (grub_env_context_open): Added an argument to specify
691 whether a new context inherits exported variables from current
692 one. This is useful when making a sandbox to interpret a config
696 * include/grub/env.h (grub_env_context_open): Updated the prototype.
698 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
700 * kern/env.c (grub_env_context_close): Fix memory leaks.
702 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
704 * normal/main.c (grub_normal_execute): Added an argument
705 BATCH to specify if an interactive interface should be provided
706 after reading a config file.
708 (read_command_list): Prevent being executed twice.
709 (read_fs_list): Likewise.
711 * include/grub/normal.h (grub_normal_execute): Updated the
714 2009-03-22 Pavel Roskin <proski@gno.org>
716 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
718 * kern/i386/pc/startup.S: Likewise.
719 * kern/i386/efi/startup.S: Likewise.
720 * kern/i386/ieee1275/startup.S: Likewise.
721 * kern/i386/coreboot/startup.S: Likewise.
722 * kern/x86_64/efi/startup.S: Likewise.
724 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
725 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
726 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
728 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
730 Bugfixes in multiboot for bugs uncovered by solaris kernel.
732 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
734 Use vaddr of correct segment for entry_point.
736 2009-03-21 Bean <bean123ch@gmail.com>
738 * commands/blocklist.c: Add include file <grub/command.h>, remove
739 <grub/normal.h> and <grub/arg.h>.
740 (grub_cmd_blocklist): Use the new command interface.
741 (GRUB_MOD_INIT): Likewise.
742 (GRUB_MOD_FINI): Likewise.
743 * commands/boot.c: Likewise.
744 * commands/cat.c: Likewise.
745 * commands/cmp.c: Likewise.
746 * commands/configfile.c: Likewise.
747 * commands/crc.c: Likewise.
748 * commands/echo.c: Likewise.
749 * commands/halt.c: Likewise.
750 * commands/handler.c: Likewise.
751 * commands/hdparm.c: Likewise.
752 * commands/help.c: Likewise.
753 * commands/hexdump.c: Likewise.
754 * commands/loadenv.c: Likewise.
755 * commands/ls.c: Likewise.
756 * commands/lsmmap.c: Likewise.
757 * commands/lspci.c: Likewise.
758 * commands/loadenv.c: Likewise.
759 * commands/read.c: Likewise.
760 * commands/reboot.c: Likewise.
761 * commands/search.c: Likewise.
762 * commands/sleep.c: Likewise.
763 * commands/test.c: Likewise.
764 * commands/usbtest.c: Likewise.
765 * commands/videotest.c: Likewise.
766 * commands/i386/cpuid.c: Likewise.
767 * commands/i386/pc/halt.c: Likewise.
768 * commands/i386/pc/play.c: Likewise.
769 * commands/i386/pc/pxecmd.c: Likewise.
770 * commands/i386/pc/vbeinfo.c: Likewise.
771 * commands/i386/pc/vbetest.c: Likewise.
772 * commands/ieee1275/suspend.c: Likewise.
773 * disk/loopback.c: Likewise.
774 * font/font_cmd.c: Likewise.
775 * hello/hello.c: Likewise.
776 * loader/efi/appleloader.c: Likewise.
777 * loader/efi/chainloader.c: Likewise.
778 * loader/i386/bsd.c: Likewise.
779 * loader/i386/efi/linux.c: Likewise.
780 * loader/i386/ieee1275/linux.c: Likewise.
781 * loader/i386/linux.c: Likewise.
782 * loader/i386/pc/chainloader.c: Likewise.
783 * loader/i386/pc/linux.c: Likewise.
784 * loader/powerpc/ieee1275/linux.c: Likewise.
785 * loader/multiboot_loader.c: Likewise.
786 * term/gfxterm.c: Likewise.
787 * term/i386/pc/serial.c: Likewise.
788 * term/terminfo.c: Likewise.
790 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
791 * term/i386/pc/vga.c: Likewise.
792 * video/readers/jpeg.c: Likewise.
793 * video/readers/png.c: Likewise.
794 * video/readers/tga.c: Likewise.
796 * util/grub-fstest (cmd_loopback): Removed.
797 (cmd_blocklist): Likewise.
799 (grub_register_command): Likewise.
800 (grub_unregister_command): Likewise.
801 (execute_command): Use grub_command_find to locate command and execute
804 * include/grub/efi/chainloader.h: Removed.
805 * loader/efi/chainloader_normal.c: Likewise.
806 * loader/i386/bsd_normal.c: Likewise.
807 * loader/i386/pc/chainloader_normal.c: Likewise.
808 * loader/i386/pc/multiboot_normal.c: Likewise.
809 * loader/linux_normal.c: Likewise.
810 * loader/multiboot_loader_normal.c: Likewise.
811 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
813 * gencmdlist.sh: Scan new registration command grub_register_extcmd
814 and grub_register_command_p1.
816 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
817 kern/command.c, lib/arg.c and commands/extcmd.c.
818 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
819 (minicmd_mod_SOURCES): New variable.
820 (minicmd_mod_CFLAGS): Likewise.
821 (minicmd_mod_LDFLAGS): Likewise.
822 (extcmd_mod_SOURCES): Likewise.
823 (extcmd_mod_CFLAGS): Likewise.
824 (extcmd_mod_LDFLAGS): Likewise.
825 (boot_mod_SOURCES): Removed.
826 (boot_mod_CFLAGS): Likewise.
827 (boot_mod_LDFLAGS): Likewise.
829 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
831 (kernel_img_HEADERS): Add command.h.
832 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
833 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
835 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
836 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
837 remove the corresponding normal mode command.
838 (normal_mod_SOURCES): Remove normal/arg.c.
839 * conf/i386-coreboot.rmk: Likewise.
840 * conf/i386-efi.rmk: Likewise.
841 * conf/i386-ieee1275.rmk: Likewise.
842 * conf/powerpc-ieee1275.rmk: Likewise.
843 * conf/x86_64-efi.rmk: Likewise.
845 * include/grub/arg.h: Move from here ...
846 * include/grub/lib/arg.h: ... to here.
848 * normal/arg.c: Move from here ...
849 * lib/arg.c: ... to here.
851 * commands/extcmd.c: New file.
852 * commands/minicmd.c: Likewise.
853 * include/grub/command.h: Likewise.
854 * include/grub/extcmd.h: Likewise.
855 * kern/command.c: Likewise.
856 * kern/corecmd.c: Likewise.
858 * kern/list.c (grub_list_iterate): Return int instead of void.
859 (grub_list_insert): New function.
860 (grub_prio_list_insert): Likewise.
862 * kern/rescue.c (grub_rescue_command): Removed.
863 (grub_rescue_command_list): Likewise.
864 (grub_rescue_register_command): Likewise.
865 (grub_rescue_unregister_command): Likewise.
866 (grub_rescue_cmd_boot): Move to minicmd.c
867 (grub_rescue_cmd_help): Likewise.
868 (grub_rescue_cmd_info): Likewise.
869 (grub_rescue_cmd_boot): Likewise.
870 (grub_rescue_cmd_testload): Likewise.
871 (grub_rescue_cmd_dump): Likewise.
872 (grub_rescue_cmd_rmmod): Likewise.
873 (grub_rescue_cmd_lsmod): Likewise.
874 (grub_rescue_cmd_exit): Likewise.
875 (grub_rescue_print_devices): Moved to corecmd.c.
876 (grub_rescue_print_files): Likewise.
877 (grub_rescue_cmd_ls): Likewise.
878 (grub_rescue_cmd_insmod): Likewise.
879 (grub_rescue_cmd_set): Likewise.
880 (grub_rescue_cmd_unset): Likewise.
881 (attempt_normal_mode): Use grub_command_find to get normal module.
882 (grub_enter_rescue_mode): Use grub_register_core_commands to register
883 commands, remove grub_rescue_register_command calls.
885 * normal/command.c (grub_register_command): Removed.
886 (grub_unregister_command): Likewise.
887 (grub_command_find): Likewise.
888 (grub_iterate_commands): Likewise.
889 (rescue_command): Likewise.
890 (export_command): Moved to corecmd.c.
891 (set_command): Removed.
892 (unset_command): Likewise.
893 (insmod_command): Likewise.
894 (rmmod_command): Likewise.
895 (lsmod_command): Likewise.
896 (grub_command_init): Likewise.
898 * normal/completion.c (iterate_command): Use cmd->prio to check for
900 (complete_arguments): Use grub_extcmd_t structure to find options.
901 (grub_normal_do_completion): Change function grub_iterate_commands to
902 grub_command_iterate.
904 * normal/execute.c (grub_script_execute_cmd): No need to parse
907 * normal/main.c (grub_dyncmd_dispatcher): New function.
908 (read_command_list): Register unload commands as dyncmd.
909 (grub_cmd_normal): Use new command interface, register rescue,
910 unregister normal at entry, register normal, unregister rescue at exit.
912 * include/grub/list.h (grub_list_test_t): New type.
913 (grub_list_iterate): Return int instead of void.
914 (grub_list_insert): New function.
915 (GRUB_AS_NAMED_LIST_P): New macro.
916 (GRUB_AS_PRIO_LIST): Likewise.
917 (GRUB_AS_PRIO_LIST_P): Likewise.
918 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
919 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
920 (grub_prio_list): New structure.
921 (grub_prio_list_insert): New function.
922 (grub_prio_list_remove): New inline function.
924 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
925 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
926 (GRUB_COMMAND_FLAG_MENU): Likewise.
927 (GRUB_COMMAND_FLAG_BOTH): Likewise.
928 (GRUB_COMMAND_FLAG_TITLE): Likewise.
929 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
930 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
931 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
932 (grub_command): Likewise.
933 (grub_register_command): Likewise.
934 (grub_command_find): Likewise.
935 (grub_iterate_commands): Likewise.
936 (grub_command_init): Likewise.
937 (grub_arg_parse): Likewise.
938 (grub_arg_show_help): Likewise.
940 * include/grub/rescue.h (grub_rescue_register_command): Removed.
941 (grub_rescue_unregister_command): Likewise.
943 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
944 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
945 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
947 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
948 grub_rescue_cmd_initrd.
949 * include/grub/i386/loader.h: Likewise.
950 * include/grub/x86_64/loader.h: Likewise.
952 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
954 2009-03-21 Bean <bean123ch@gmail.com>
956 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
957 instead of stat in mingw environment.
959 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
961 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
963 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
966 2009-03-21 Bean <bean123ch@gmail.com>
968 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
971 2009-03-18 Michel Dänzer <michel@daenzer.net>
973 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
974 checking inode flags for EXT4_EXTENTS_FLAG.
976 2009-03-18 Robert Millan <rmh@aybabtu.com>
978 * loader/i386/linux.c: Include `<grub/video.h>' and
979 `<grub/i386/pc/vbe.h>'..
980 (grub_linux_setup_video): New function. Loosely based on the EFI one.
981 (grub_linux32_boot): Attempt to configure video settings with
982 grub_linux_setup_video().
983 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
984 to avoid grub_console_fini() which would step out of graphical mode
987 2009-03-14 Robert Millan <rmh@aybabtu.com>
989 Fix build on powerpc.
990 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
992 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
994 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
995 background image command.
997 2009-03-12 Colin D Bennett <colin@gibibit.com>
999 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1000 (grub_gfxterm_putchar): Extract pairs of identical calls to
1001 draw_cursor out of conditional blocks.
1003 2009-03-11 Pavel Roskin <proski@gnu.org>
1005 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1006 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1008 2009-03-11 Robert Millan <rmh@aybabtu.com>
1010 * loader/i386/multiboot_elfxx.c
1011 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1013 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
1015 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1018 2009-03-11 Robert Millan <rmh@aybabtu.com>
1020 * loader/i386/multiboot.c (code_size): New variable.
1021 (grub_multiboot): Define offsets by adding to `code_size' rather
1022 than subtracting from `grub_multiboot_payload_size'. Provide
1023 4-byte alignment to MBI and others by increasing
1024 `boot_loader_name_length' appropriately.
1026 * loader/i386/multiboot_elfxx.c
1027 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1029 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
1031 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1034 2009-03-08 Robert Millan <rmh@aybabtu.com>
1036 Make loader/i386/linux.c usable on i386-pc again.
1038 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1040 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1043 2009-03-07 Bean <bean123ch@gmail.com>
1045 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1048 2009-03-06 Robert Millan <rmh@aybabtu.com>
1050 Fix display issue on terminals with screen size other than 80x25
1051 (e.g. gfxterm with resolution higher than 640x480).
1053 * normal/main.c (grub_normal_init_page): Display title text in a
1054 position relative to the center of the terminal instead of relying
1055 on a hardcoded offset.
1057 2009-03-04 Robert Millan <rmh@aybabtu.com>
1059 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1062 * Makefile.in (host_kernel): New variable.
1063 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1064 scripts instead of just the windows one.
1065 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1067 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1069 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1071 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1072 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1073 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1075 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1076 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1078 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1080 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1081 or if there's no space for the disk label and print the partition number on a
1084 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1086 * util/misc.c: Include <time.h>.
1087 (grub_millisleep): New function.
1089 2009-03-04 Bean <bean123ch@gmail.com>
1091 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1092 another option -mno-red-zone.
1094 * commands/handler.c: Change module description.
1096 * kern/handler.c: Add missing space at the end of description line.
1098 * kern/list.c: Likewise.
1100 2009-03-03 Robert Millan <rmh@aybabtu.com>
1102 Move more components to the relocation area, and fix mbi pointer
1103 handling to use the destination rather than the origin (thanks to
1104 Vladimir Serbinenko for spotting).
1106 * loader/i386/multiboot.c (mbi_dest): New variable.
1107 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1108 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1111 2009-03-01 Bean <bean123ch@gmail.com>
1113 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
1114 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1115 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1116 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1118 * loader/i386/efi/linux.c (acpi_guid): New variable.
1119 (acpi_guid): Likewise.
1120 (EBDA_SEG_ADDR): New constant.
1121 (LOW_MEM_ADDR): Likewise.
1122 (FAKE_EBDA_SEG): Likewise.
1123 (fake_bios_data): New function.
1124 (grub_linux_boot): Call fake_bios_data.
1126 2009-03-01 Bean <bean123ch@gmail.com>
1128 * commands/terminal.c: Removed.
1130 * commands/handler.c: New file.
1132 * include/grub/list.h: Likewise.
1134 * include/grub/handler.h: Likewise.
1136 * kern/list.c: Likewise.
1138 * kern/handler.c: Likewise.
1140 * kern/term.h: Include header file <grub/handler.h>.
1141 (grub_term_input): Move next field to the beginning.
1142 (grub_term_output): Likewise.
1143 (grub_term_input_class): New variable.
1144 (grub_term_output_class): Likewise.
1145 (grub_term_register_input): Changed to inline function.
1146 (grub_term_register_output): Likewise.
1147 (grub_term_unregister_input): Likewise.
1148 (grub_term_unregister_output): Likewise.
1149 (grub_term_set_current_input): Likewise.
1150 (grub_term_set_current_output): Likewise.
1151 (grub_term_get_current_input): Likewise.
1152 (grub_term_get_current_output): Likewise.
1153 (grub_term_iterate_input): Removed.
1154 (grub_term_iterate_output): Likewise.
1156 * kern/term.c (grub_term_list_input): Removed.
1157 (grub_term_list_output): Likewise.
1158 (grub_term_input_class): New variable.
1159 (grub_term_output_class): Likewise.
1160 (grub_cur_term_input): Change variable as macro.
1161 (grub_cur_term_output): Likewise.
1162 (grub_term_register_input): Removed.
1163 (grub_term_register_output): Likewise.
1164 (grub_term_unregister_input): Likewise.
1165 (grub_term_unregister_output): Likewise.
1166 (grub_term_set_current_input): Likewise.
1167 (grub_term_set_current_output): Likewise.
1168 (grub_term_iterate_input): Likewise.
1169 (grub_term_iterate_output): Likewise.
1170 (grub_term_get_current_input): Likewise.
1171 (grub_term_get_current_output): Likewise.
1173 * util/grub-editenv.c: Include header file <grub/handler.h>.
1174 (grub_term_get_current_input): Removed.
1175 (grub_term_get_current_output): Likewise.
1176 (grub_term_input_class): New variable.
1177 (grub_term_output_class): Likewise.
1179 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1180 (grub_term_get_current_output): Likewise.
1181 (grub_term_input_class): New variable.
1182 (grub_term_output_class): Likewise.
1184 * util/grub-probe.c (grub_term_get_current_input): Removed.
1185 (grub_term_get_current_output): Likewise.
1186 (grub_term_input_class): New variable.
1187 (grub_term_output_class): Likewise.
1189 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1190 (grub_term_get_current_output): Likewise.
1191 (grub_term_input_class): New variable.
1192 (grub_term_output_class): Likewise.
1194 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1195 (terminal_mod_SOURCES): Likewise.
1196 (terminal_mod_CFLAGS): Likewise.
1197 (terminal_mod_LDFLAGS): Likewise.
1199 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1201 (kernel_img_SOURCES): Add list.c and handler.c.
1202 (kernel_img_HEADERS): Add list.h and handler.h.
1204 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1206 (kernel_mod_SOURCES): Add list.c and handler.c.
1207 (kernel_mod_HEADERS): Add list.h and handler.h.
1209 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1211 (kernel_elf_SOURCES): Add list.c and handler.c.
1212 (kernel_elf_HEADERS): Add list.h and handler.h.
1214 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1216 (kernel_elf_SOURCES): Add list.c and handler.c.
1217 (kernel_elf_HEADERS): Add list.h and handler.h.
1219 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1221 (kernel_mod_SOURCES): Add list.c and handler.c.
1222 (kernel_mod_HEADERS): Add list.h and handler.h.
1224 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1226 (kernel_elf_SOURCES): Add list.c and handler.c.
1227 (kernel_elf_HEADERS): Add list.h and handler.h.
1229 2009-02-27 Robert Millan <rmh@aybabtu.com>
1231 Factorize elf32 / elf64 code in Multiboot loader. This will
1232 prevent it from getting out of sync again.
1234 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1235 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1236 grub_multiboot_load_elf64): Move from here ...
1237 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1238 grub_multiboot_load_elf): ... to here (new file).
1240 2009-02-27 Robert Millan <rmh@aybabtu.com>
1242 * util/grub.d/10_linux.in: Rename "single-user mode" to
1245 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
1247 Don't leak in SCSI code.
1248 * disk/scsi.c (grub_scsi_close): free `scsi'.
1250 2009-02-27 Robert Millan <rmh@aybabtu.com>
1252 * loader/i386/pc/multiboot.c: Move from here ...
1253 * loader/i386/multiboot.c: ... to here. Update all users.
1255 2009-02-27 Robert Millan <rmh@aybabtu.com>
1257 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1258 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1260 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
1262 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1265 2009-02-27 Robert Millan <rmh@aybabtu.com>
1267 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1268 `0x' qualifier as 0 when base is specified as parameter).
1270 2009-02-24 Bean <bean123ch@gmail.com>
1272 * configure.ac: Check for -mcmodel=large in x86_64 target.
1274 * include/grub/efi/api.h (efi_call_10): New macro.
1275 (efi_wrap_10): New function.
1277 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1278 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1279 (GRUB_PE32_REL_BASED_LOW): Likewise.
1280 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1281 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1282 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1283 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1284 (GRUB_PE32_REL_BASED_REL): Likewise.
1285 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1286 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1287 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1289 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1292 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1293 (efi_wrap_10): New function.
1295 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1297 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1298 MB/MBP model (NV chipset).
1299 (devdata_devs): Add devpath_5 to the list.
1301 * load/i386/efi/linux.c (video_base): Remove variable.
1302 (RGB_MASK): New macro.
1303 (RGB_MAGIC): Likewise.
1304 (LINE_MIN): Likewise.
1305 (LINE_MAX): Likewise.
1306 (FBTEST_STEP): Likewise.
1307 (FBTEST_COUNT): Likewise.
1308 (fb_list): New variable.
1309 (grub_find_video_card): Remove function.
1310 (find_framebuf): New function.
1311 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1314 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1317 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1319 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1321 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1324 2009-02-22 Robert Millan <rmh@aybabtu.com>
1326 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1327 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1328 in our relocation, instead of using it directly from heap. Also
1329 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1331 2009-02-21 Robert Millan <rmh@aybabtu.com>
1333 Implement USB keyboard support (based on patch by Marco Gerards)
1335 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1336 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1337 (usb_keyboard_mod_LDFLAGS): New variables.
1339 * term/usb_keyboard.c: New file.
1341 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1343 Corrected wrong declaration
1345 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1347 2009-02-14 Christian Franke <franke@computer.org>
1349 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1350 (grub_lspci_iter): Print class code and programming interface byte.
1352 2009-02-14 Christian Franke <franke@computer.org>
1354 * gendistlist.sh: Ignore `.svn' directories.
1356 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
1358 * fs/fat.c: Add 2009 to Copyright line.
1360 2009-02-14 Christian Franke <franke@computer.org>
1362 * commands/hdparm.c: New file. Provides `hdparm' command
1363 which sends ATA commands via grub_disk_ata_pass_through ().
1365 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1367 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1368 and <grub/cpu/io.h> to include/grub/ata.h.
1369 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1370 (GRUB_CDROM_SECTOR_SIZE): Remove.
1371 (GRUB_ATA_*): Move to include/grub/ata.h.
1372 (GRUB_ATAPI_*): Likewise.
1373 (enum grub_ata_commands): Likewise.
1374 (enum grub_ata_timeout_milliseconds): Likewise.
1375 (struct grub_ata_device): Likewise.
1376 (grub_ata_regset): Likewise.
1377 (grub_ata_regget): Likewise.
1378 (grub_ata_regset2): Likewise.
1379 (grub_ata_regget2): Likewise.
1380 (grub_ata_check_ready): Likewise.
1381 (grub_ata_wait_not_busy): Remove static, exported in
1383 (grub_ata_wait_drq): Likewise.
1384 (grub_ata_pio_read): Likewise.
1386 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1387 function for hdparm.mod.
1389 * include/grub/ata.h: New file, contains declarations from
1391 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1393 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1394 (grub_disk_ata_pass_through): New exported variable.
1396 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1398 2009-02-13 Colin D Bennett <colin@gibibit.com>
1400 Support multiple fallback entries, and provide an API to support
1401 executing default+fallback menu entries. Renamed the `terminal' menu
1404 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1405 variable declaration.
1406 (grub_menu_execute_callback): New structure declaration.
1407 (grub_menu_execute_callback_t): New typedef.
1408 (grub_menu_execute_with_fallback): New function declaration.
1409 (grub_menu_get_entry): Likewise.
1410 (grub_menu_get_timeout): Likewise.
1411 (grub_menu_set_timeout): Likewise.
1413 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1415 * normal/menu.c (grub_wait_after_message): Moved to
1416 `normal/menu_text.c'.
1417 (draw_border): Likewise.
1418 (print_message): Likewise.
1419 (print_entry): Likewise.
1420 (print_entries): Likewise.
1421 (grub_menu_init_page): Likewise.
1422 (get_entry_number): Likewise.
1423 (print_timeout): Likewise.
1424 (run_menu): Likewise.
1425 (grub_menu_execute_entry): Likewise.
1426 (show_text_menu): Likewise.
1427 (get_and_remove_first_entry_number): New function.
1428 (grub_menu_execute_with_fallback): Likewise.
1429 (get_entry): Renamed to ...
1430 (grub_menu_get_entry): .. this and made it global.
1431 (get_timeout): Renamed to ...
1432 (grub_menu_get_timeout): ... this and made it global.
1433 (set_timeout): Renamed to ...
1434 (grub_menu_set_timeout): ... this and made it global.
1435 (grub_normal_terminal_menu_viewer): Renamed to ...
1436 (grub_normal_text_menu_viewer): ... this.
1438 * normal/menu_text.c: New file. Extracted text-menu-specific code
1441 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1442 (normal_mod_SOURCES): Likewise.
1444 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1445 (normal_mod_SOURCES): Likewise.
1447 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1448 (normal_mod_SOURCES): Likewise.
1450 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
1451 (normal_mod_SOURCES): Likewise.
1453 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1454 (normal_mod_SOURCES): Likewise.
1456 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1457 (normal_mod_SOURCES): Likewise.
1459 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1460 (normal_mod_SOURCES): Likewise.
1462 2009-02-11 Robert Millan <rmh@aybabtu.com>
1464 * util/grub.d/00_header.in: Update old reference to `font' command.
1466 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
1468 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
1470 Based on patch from Javier MartÃn.
1472 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1474 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
1475 to avoid false positives with FAT.
1476 (grub_fstest_SOURCES): Likewise.
1477 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1478 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1479 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1480 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1481 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1482 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1484 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1486 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
1487 bpb.version_specific.fat12_or_fat16.fstype and
1488 bpb.version_specific.fat32.fstype.
1490 2009-02-08 Robert Millan <rmh@aybabtu.com>
1492 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
1494 2009-02-08 Robert Millan <rmh@aybabtu.com>
1496 * Makefile.in (host_os, host_cpu): New variables.
1497 (target_os): Remove. Update all users.
1499 2009-02-08 Marco Gerards <marco@gnu.org>
1501 * Makefile.in (enable_grub_emu_usb): New variable.
1502 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
1503 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
1504 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
1505 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
1506 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1507 `usbtest.mod' and `usbms.mod'.
1508 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1509 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1510 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1511 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1512 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1515 * disk/usbms.c: New file.
1517 * include/grub/usb.h: Likewise.
1519 * include/grub/usbtrans.h: Likewise.
1521 * include/grub/usbdesc.h: Likewise.
1523 * bus/usb/usbtrans.c: Likewise.
1525 * bus/usb/ohci.c: Likewise.
1527 * bus/usb/uhci.c: Likewise.
1529 * bus/usb/usbhub.c: Likewise.
1531 * bus/usb/usb.c: Likewise.
1533 * commands/usbtest.c: Likewise.
1535 * util/usb.c: Likewise.
1537 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1539 * configure.ac: Test for libusb presence.
1541 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1543 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
1545 * kern/mm.c: Add more comments.
1547 2009-02-08 Robert Millan <rmh@aybabtu.com>
1549 Patch from Javier MartÃn.
1550 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1551 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1553 2009-02-08 Robert Millan <rmh@aybabtu.com>
1555 * fs/cpio.c: Split tar functionality to ...
1556 * fs/tar.c: ... here (new file). Update all users.
1558 2009-02-07 Robert Millan <rmh@aybabtu.com>
1560 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1561 backward-incompatible features.
1563 Based on patch from Javier MartÃn, with some adjustments.
1565 2009-02-07 Michael Scherer <misc@mandriva.org>
1567 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1569 2009-02-07 Robert Millan <rmh@aybabtu.com>
1571 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1572 position of `disk/lvm.c' to ensure grub_init_all() always picks it
1573 after the RAID stuff.
1575 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
1577 Fixes problem when running vbetest command as reported by
1578 Vladimir Serbinenko <phcoder@gmail.com>.
1580 * (grub_vbe_set_video_mode): Fixed problem with text modes.
1582 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
1584 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1585 /dev/md/NpN style mdraid devices.
1587 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1589 * util/unifont2pff.rb: Remove.
1591 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1593 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1596 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1598 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1599 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1600 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1601 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1602 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1603 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1604 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1606 2009-02-02 Christian Franke <franke@computer.org>
1608 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1610 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
1612 * INSTALL: Note that we now require at least autoconf 2.59 and
1613 that LZO is optional.
1615 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1617 Base on patch on bug #24154 created by Tomas Tintera
1620 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1622 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1624 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1625 <bero@arklinux.org>.
1627 * normal/parser.y (script_init): Add missing semicolon.
1629 2009-01-31 Colin D Bennett <colin@gibibit.com>
1631 * normal/main.c: Add include to grub/menu_viewer.h.
1632 (free_menu_entry_classes): Added.
1633 (grub_normal_menu_addentry): Added class property handling.
1634 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1635 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1637 * normal/menu_viewer.c: New file.
1639 * normal/menu.c (run_menu_entry): Renamed to ...
1640 (grub_menu_execute_entry): ... this and made it as global.
1641 (grub_menu_run): Renamed to ...
1642 (show_text_menu): ... this and made it local.
1643 (show_text_menu): Adapt to new function names.
1644 (grub_normal_terminal_menu_viewer): New global variable.
1646 * include/grub/menu.h: New file.
1648 * include/grub/menu_viewer.h: New file.
1650 * include/grub/normal.h: Added include to grub/menu.h.
1651 (grub_menu_entry): Moved to include/grub/menu.h.
1652 (grub_menu_entry_t): Likewise.
1653 (grub_menu): Likewise.
1654 (grub_menu_t): Likewise.
1655 (grub_normal_terminal_menu_viewer): Added.
1656 (grub_menu_execute_entry): Likewise.
1657 (grub_menu_run): Removed.
1659 * DISTLIST: Added include/grub/menu.h.
1660 Added include/grub/menu_viewer.h.
1661 Added normal/menu_viewer.c.
1663 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
1665 * normal/execute.c (grub_script_execute_menuentry): Changed to use
1666 arglist for menutitle arguments.
1668 * normal/main.c (grub_normal_menu_addentry): Likewise.
1670 * normal/parser.y (menuentry): Likewise.
1672 * normal/script.c (grub_script_create_cmdmenu): Likewise.
1674 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1675 (grub_script_create_cmdmenu): Likewise.
1677 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1679 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1682 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1684 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1686 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1688 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1690 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1692 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1694 2009-01-30 Christian Franke <franke@computer.org>
1696 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1697 in option help text.
1699 2009-01-27 Pavel Roskin <proski@gnu.org>
1701 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1703 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1705 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1707 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1709 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1710 unregister function.
1712 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1714 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1716 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1718 * util/grub-mkfont.c (usage): Fix typo.
1720 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1722 2009-01-26 Daniel Mierswa <impulze@impulze.org>
1724 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1726 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1728 * kern/misc.c (grub_strcasecmp): New function.
1729 (grub_strcasecmp): Use grub_size_t instead of int for length.
1731 * include/grub/misc.h: Update function prototypes.
1733 2009-01-26 Robert Millan <rmh@aybabtu.com>
1735 * configure.ac: Fix cross-compilation check.
1737 2009-01-22 Christian Franke <franke@computer.org>
1739 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1740 (precision) digit string. Allow `.format2' without `format1' (width).
1741 Limit input chars for `%s' output to `format2' if specified. This is
1742 compatible with standard printf ().
1744 2009-01-22 Christian Franke <franke@computer.org>
1746 * disk/ata.c (grub_ata_wait_status): Replace by ...
1747 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1748 other status bits may be invalid while BSY is asserted.
1749 (grub_ata_check_ready): New function.
1750 (grub_ata_cmd): Removed.
1751 (grub_ata_wait_drq): New function.
1752 (grub_ata_strncpy): Remove inline.
1753 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1754 and error check now done by grub_ata_wait_drq ().
1755 (grub_ata_pio_write): Likewise.
1756 (grub_atapi_identify): Set DEV before check for !BSY. Use
1757 grub_ata_wait_drq () to wait for data.
1758 (grub_ata_device_initialize): Add status register check to
1759 detect missing SATA slave devices. Add debug messages.
1760 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1761 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1762 transfer loop by grub_ata_pio_write ().
1763 (grub_ata_identify): Set DEV before check for !BSY. Use
1764 grub_ata_wait_drq () to wait for data.
1765 (grub_ata_setaddress): Set DEV before check for !BSY.
1766 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1767 read/write in one loop. Fix invalid command on write. Fix incomplete
1768 command on (size % batch) == 0. Add missing error check after write of
1769 last block. Add debug messages.
1770 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1772 2009-01-19 Christian Franke <franke@computer.org>
1774 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1775 (GRUB_ATAPI_IREASON_*): Likewise.
1776 (grub_ata_pio_write): Fix timeout error return.
1777 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1778 (grub_atapi_wait_drq): New function.
1779 (grub_atapi_packet): New parameter `size'.
1780 Use grub_atapi_wait_drq () and direct write instead of
1781 grub_ata_pio_write ().
1782 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1783 reads the number of bytes requested by the device for each DRQ
1785 (grub_atapi_write): Remove old implementation, return not
1786 implemented instead.
1788 2009-01-19 Christian Franke <franke@computer.org>
1790 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1791 of 512 to calculate data size.
1792 (grub_scsi_read12): Likewise.
1793 (grub_scsi_write10): Likewise.
1794 (grub_scsi_write12): Likewise.
1795 (grub_scsi_read): Adjust size according to blocksize.
1796 Add checks for invalid blocksize and unaligned transfer.
1798 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1800 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1802 * term/gfxterm.c (write_char): Fix background rendering for wide
1805 2009-01-19 Robert Millan <rmh@aybabtu.com>
1807 * config.guess: Update to latest version from config git.
1808 * config.sub: Likewise.
1810 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
1812 * Makefile.in: Change font compilation to use new grub-mkfont instead
1815 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1816 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1817 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1818 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1819 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1820 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1821 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1822 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1823 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1825 2009-01-16 Christian Franke <franke@computer.org>
1827 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1828 (enum grub_ata_timeout_milliseconds): New enum.
1829 (grub_ata_wait_status): Add parameter milliseconds.
1830 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1831 recovery from timed-out commands.
1832 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1833 return grub_errno instead of REG_ERROR.
1834 (grub_ata_pio_write): Add parameter milliseconds.
1835 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1836 Pass milliseconds to grub_ata_wait_status () and
1837 grub_ata_pio_read ().
1838 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1839 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1840 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1841 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1842 It is not suitable for device detection, because DEV bit is ignored,
1843 the command may run too long, and not all devices set the signature
1845 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1846 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1847 Fix device selection, DEV bit must be set first to address the registers
1848 of the correct device.
1849 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1850 grub_ata_pio_read/write ().
1851 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1852 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1854 2009-01-13 Carles Pina i Estany <carles@pina.cat>
1856 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1858 2009-01-13 Bean <bean123ch@gmail.com>
1860 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1862 2009-01-13 Bean <bean123ch@gmail.com>
1864 * Makefile.in: (enable_grub_mkfont): New variable.
1865 (freetype_cflags): Likewise.
1866 (freetype_libs): Likewise.
1868 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1869 (grub_mkfont_SOURCES): New variable.
1870 (grub_mkfont_CFLAGS): Likewise.
1871 (grub_mkfont_LDFLAGS): Likewise.
1873 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1874 library if `--enable-grub-mkfont' is requested.
1875 (enable_grub_mkfont): New variable.
1876 (freetype_cflags): Likewise.
1877 (freetype_libs): Likewise.
1879 * util/grub-mkfont.c: New file.
1881 2009-01-12 Christian Franke <franke@computer.org>
1883 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1884 mode check. Fix setting of compat_use[].
1886 2009-01-10 Robert Millan <rmh@aybabtu.com>
1888 Update a few copyright years which we forgot to do in 2008 (only for
1889 files whose changes made in 2008 were copyright-significant)
1891 * Makefile.in: Add 2008 to Copyright line.
1892 * disk/ieee1275/ofdisk.c: Likewise.
1893 * disk/efi/efidisk.c: Likewise.
1894 * kern/dl.c: Likewise.
1895 * kern/sparc64/ieee1275/init.c: Likewise.
1896 * kern/mm.c: Likewise.
1897 * kern/efi/mm.c: Likewise.
1898 * boot/i386/pc/boot.S: Likewise.
1899 * genfslist.sh: Likewise.
1900 * fs/iso9660.c: Likewise.
1901 * fs/hfs.c: Likewise.
1902 * fs/jfs.c: Likewise.
1903 * fs/minix.c: Likewise.
1904 * fs/ufs.c: Likewise.
1905 * gensymlist.sh.in: Likewise.
1906 * genkernsyms.sh.in: Likewise.
1907 * include/grub/misc.h: Likewise.
1908 * include/grub/types.h: Likewise.
1909 * include/grub/symbol.h: Likewise.
1910 * include/grub/elf.h: Likewise.
1911 * include/grub/kernel.h: Likewise.
1912 * include/grub/disk.h: Likewise.
1913 * include/grub/dl.h: Likewise.
1914 * include/grub/i386/linux.h: Likewise.
1915 * include/grub/i386/pc/biosdisk.h: Likewise.
1916 * include/grub/efi/api.h: Likewise.
1917 * include/grub/efi/pe32.h: Likewise.
1918 * include/grub/util/misc.h: Likewise.
1919 * normal/execute.c: Likewise.
1920 * normal/arg.c: Likewise.
1921 * normal/completion.c: Likewise.
1922 * normal/lexer.c: Likewise.
1923 * normal/parser.y: Likewise.
1924 * normal/misc.c: Likewise.
1925 * commands/i386/pc/vbeinfo.c: Likewise.
1926 * commands/hexdump.c: Likewise.
1927 * commands/terminal.c: Likewise.
1928 * commands/ls.c: Likewise.
1929 * commands/help.c: Likewise.
1930 * partmap/pc.c: Likewise.
1931 * loader/efi/chainloader.c: Likewise.
1932 * loader/multiboot_loader.c: Likewise.
1933 * loader/i386/pc/multiboot2.c: Likewise.
1934 * term/efi/console.c: Likewise.
1935 * term/i386/pc/serial.c: Likewise.
1936 * util/lvm.c: Likewise.
1937 * util/console.c: Likewise.
1938 * util/i386/efi/grub-mkimage.c: Likewise.
1939 * util/raid.c: Likewise.
1941 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1943 * commands/videotest.c: Removed include to grub/machine/memory.h.
1945 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1946 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1947 (video_mod_SOURCES): Removed.
1948 (video_mod_CFLAGS): Likewise.
1949 (video_mod_LDFLAGS): Likewise.
1950 (gfxterm_mod_SOURCES): Likewise.
1951 (gfxterm_mod_CFLAGS): Likewise.
1952 (gfxterm_mod_LDFLAGS): Likewise.
1953 (videotest_mod_SOURCES): Likewise.
1954 (videotest_mod_CFLAGS): Likewise.
1955 (videotest_mod_LDFLAGS): Likewise.
1956 (bitmap_mod_SOURCES): Likewise.
1957 (bitmap_mod_CFLAGS): Likewise.
1958 (bitmap_mod_LDFLAGS): Likewise.
1959 (tga_mod_SOURCES): Likewise.
1960 (tga_mod_CFLAGS): Likewise.
1961 (tga_mod_LDFLAGS): Likewise.
1962 (jpeg_mod_SOURCES): Likewise.
1963 (jpeg_mod_CFLAGS): Likewise.
1964 (jpeg_mod_LDFLAGS): Likewise.
1965 (png_mod_SOURCES): Likewise.
1966 (png_mod_CFLAGS): Likewise.
1967 (png_mod_LDFLAGS): Likewise.
1969 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1970 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1971 (video_mod_SOURCES): Added.
1972 (video_mod_CFLAGS): Likewise.
1973 (video_mod_LDFLAGS): Likewise.
1974 (videotest_mod_SOURCES): Likewise.
1975 (videotest_mod_CFLAGS): Likewise.
1976 (videotest_mod_LDFLAGS): Likewise.
1977 (bitmap_mod_SOURCES): Likewise.
1978 (bitmap_mod_CFLAGS): Likewise.
1979 (bitmap_mod_LDFLAGS): Likewise.
1980 (tga_mod_SOURCES): Likewise.
1981 (tga_mod_CFLAGS): Likewise.
1982 (tga_mod_LDFLAGS): Likewise.
1983 (jpeg_mod_SOURCES): Likewise.
1984 (jpeg_mod_CFLAGS): Likewise.
1985 (jpeg_mod_LDFLAGS): Likewise.
1986 (png_mod_SOURCES): Likewise.
1987 (png_mod_CFLAGS): Likewise.
1988 (png_mod_LDFLAGS): Likewise.
1989 (gfxterm_mod_SOURCES): Likewise.
1990 (gfxterm_mod_CFLAGS): Likewise.
1991 (gfxterm_mod_LDFLAGS): Likewise.
1993 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1994 grub/machine/console.h.
1996 2009-01-04 Jerone Young <jerone@gmail.com>
1998 Make on screen instructions clearer
2000 Based on patch created by Jidanni <jidanni@jidanni.org>
2002 * normal/menu.c: print clearer instructions on the screen
2004 2009-01-02 Colin D Bennett <colin@gibibit.com>
2008 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2009 build system and fixed gfxterm.c to work with different sized fonts.
2011 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
2013 * configure: Re-generated.
2015 * DISTLIST: Removed font/manager.c.
2017 Added font/font_cmd.c.
2019 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2022 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
2024 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
2026 * kern/term.c: Changed users of grub_utf8_to_ucs4.
2028 * normal/menu.c: Likewise.
2030 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2031 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
2033 * include/grub/font.h: Replaced with new file.
2035 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2036 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2037 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2038 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2039 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
2040 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
2041 fg_red, fg_green, fg_blue, fg_alpha.
2042 (grub_video_adapter): Removed blit_glyph.
2043 (grub_video_blit_glyph): Removed.
2045 * font/manager.c: Removed file.
2047 * font/font.c: New file.
2049 * font/font_cmd.c: Likewise.
2051 * video/video.c (grub_video_blit_glyph): Removed.
2053 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2054 (grub_video_vbe_map_rgba): Likewise.
2055 (grub_video_vbe_unmap_color_int): Likewise.
2056 (grub_video_vbe_blit_glyph): Removed.
2057 (grub_video_vbe_adapter): Removed blit_glyph.
2059 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2060 (get_pixel): Likewise.
2061 (set_pixel): Likewise.
2063 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
2065 * term/gfxterm.c: Adapted to new font engine.
2067 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
2069 * term/i386/pc/vga.c: Likewise.
2071 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
2073 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2075 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2077 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2079 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2081 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2083 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2085 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2087 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2089 * util/grub.d/00_header.in: Changed to use new loadfont command.
2091 * util/grub-mkconfig_lib.in: Changed font extension.
2093 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
2095 * util/getroot.c (grub_util_get_grub_dev): Add support for
2096 /dev/md/dNNpNN style partitionable mdraid devices.
2098 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
2100 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2101 at a time limit of the PXE TFTP API correctly.
2102 (grub_pxefs_close): Likewise.
2104 2008-11-29 Robert Millan <rmh@aybabtu.com>
2106 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
2107 grub_ata_device_initialize() calls.
2109 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
2111 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2113 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2115 2008-11-28 Robert Millan <rmh@aybabtu.com>
2117 Fix build on powerpc-ieee1275. Based on patch created by
2118 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2119 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2120 `kern/ieee1275/mmap.c'.
2121 * include/grub/powerpc/ieee1275/memory.h: New file.
2123 Provide grub-install on coreboot.
2124 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2125 (grub_install_SOURCES): New variable.
2126 * util/i386/pc/grub-install.in: Add a few condition checks to make it
2129 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
2131 * util/grub-fstest.c (grub_term_get_current_input): Change return type
2132 to `grub_term_input_t'.
2133 (grub_term_get_current_output): Change return type to
2134 `grub_term_output_t'.
2136 2008-11-22 Robert Millan <rmh@aybabtu.com>
2138 Fix breakage on coreboot due to declaration mismatch.
2139 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2140 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2141 grub_vga_text_cls().
2143 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
2144 comments. Avoid copying one more byte than necessary (just in case).
2146 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2147 to 0x200000 (avoids trouble with some OFW implementations, and matches
2148 with the one in Yaboot).
2149 Reported by Manoel Abranches
2151 2008-11-20 Robert Millan <rmh@aybabtu.com>
2153 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2154 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2156 * util/grub-mkconfig_lib.in (grub_warn): New function.
2157 (convert_system_path_to_grub_path): Use grub_warn() when issuing
2158 warnings, to obtain consistent formatting.
2159 * util/grub.d/00_header.in: Likewise.
2160 * util/update-grub_lib.in: Likewise.
2162 * loader/i386/linux.c (allocate_pages): Fix a warning.
2163 Move comment text to `#error' stanza.
2165 Harmonize ieee1275's grub_available_iterate() with the generic
2166 grub_machine_mmap_iterate() interface (fixes a recently-introduced
2167 build problem on i386-ieee1275):
2168 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2169 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
2170 parameter `type'. Update all users of this function.
2171 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2172 `kern/ieee1275/mmap.c'.
2173 * kern/ieee1275/init.c
2174 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2176 (grub_machine_mmap_iterate): ... this.
2177 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2178 return type to `grub_err_t'. Update all implementations of this
2180 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2183 Add `lsmmap' command (lists firmware-provided memory map):
2184 * commands/lsmmap.c: New file.
2185 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2186 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2188 * conf/powerpc-ieee1275.rmk: Likewise.
2189 * conf/i386-coreboot.rmk: Likewise.
2190 * conf/i386-ieee1275.rmk: Likewise.
2192 2008-11-19 Robert Millan <rmh@aybabtu.com>
2194 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
2195 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2196 constraints to initrd allocation (based on code from
2197 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2198 for Linux to find it.
2200 2008-11-14 Robert Millan <rmh@aybabtu.com>
2202 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2203 order to cope with duplicate slashes.
2205 2008-11-14 Robert Millan <rmh@aybabtu.com>
2207 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2208 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
2209 don't want to mess with lower memory, because it is used in the Linux
2212 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
2213 an appropriate place in lower memory, between 0x10000 and 0x90000,
2214 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
2215 is in our heap (probably as a result of it being corrupted during
2216 decompression). Add #error instance with comment to explain why this
2217 loader isn't currently usable on PC/BIOS.
2219 2008-11-14 Robert Millan <rmh@aybabtu.com>
2221 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
2222 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
2224 2008-11-12 Robert Millan <rmh@aybabtu.com>
2226 Make loader/i386/linux.c buildable on i386-pc (although disabled).
2228 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2229 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2231 * include/grub/i386/pc/memory.h: ... to here.
2233 2008-11-12 Robert Millan <rmh@aybabtu.com>
2235 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2238 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2239 (grub_console_cur_color, grub_console_real_putchar)
2240 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2241 (grub_console_setcolorstate, grub_console_setcolor)
2242 (grub_console_getcolor): Move from here ...
2243 * include/grub/i386/vga_common.h: ... to here (new file).
2245 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2246 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2248 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2249 `<grub/i386/vga_common.h>'.
2251 2008-11-12 Robert Millan <rmh@aybabtu.com>
2253 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2254 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2255 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2257 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2258 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2260 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2261 grub_console_init() with call to grub_vga_text_init().
2262 (grub_machine_fini): Replace call to
2263 grub_console_fini() with call to grub_vga_text_fini() and
2264 grub_at_keyboard_fini().
2266 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2267 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2268 (grub_console_setcolorstate, grub_console_setcolor)
2269 (grub_console_getcolor): New function prototypes.
2271 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2272 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2273 (grub_vga_text_setcursor): Static-ize.
2274 (grub_vga_text_term): New structure.
2275 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2277 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2278 (grub_console_cur_color, grub_console_standard_color)
2279 (grub_console_normal_color, grub_console_highlight_color)
2280 (map_char, grub_console_putchar, grub_console_getcharwidth)
2281 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2282 (grub_console_getcolor): Move from here ...
2283 * term/i386/vga_common.c: ... to here (same function names).
2285 2008-11-12 Robert Millan <rmh@aybabtu.com>
2287 Use newly-added Multiboot support in coreboot.
2289 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2290 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2292 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2293 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2294 (codestart): Store the MBI in `startup_multiboot_info' when we're
2295 being loaded using Multiboot.
2297 * kern/i386/coreboot/init.c (grub_machine_init): Move
2298 grub_at_keyboard_init() call to beginning of function (useful for
2299 debugging). Call grub_machine_mmap_init() before attempting to use
2300 grub_machine_mmap_iterate().
2301 (grub_lower_mem, grub_upper_mem): Move from here ...
2302 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2305 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2308 2008-11-12 Robert Millan <rmh@aybabtu.com>
2310 Fix a regression introduced by the at_keyboard.mod split. Because
2311 some terminals are default on some platforms and non-default on
2312 others, the first terminal being registered determines which is
2313 going to be default.
2315 * kern/term.c (grub_term_register_input): If this is the first
2316 terminal being registered, set it as the current one.
2317 (grub_term_register_output): Likewise.
2319 * term/efi/console.c (grub_console_init): Do not call
2320 grub_term_set_current_output() or grub_term_set_current_input().
2321 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2322 * term/i386/pc/console.c (grub_console_init): Likewise.
2323 (grub_console_fini): Do not call grub_term_set_current_input()
2324 (but leave grub_term_set_current_output() to restore text mode).
2326 2008-11-10 Robert Millan <rmh@aybabtu.com>
2328 * util/grub.d/00_header.in: Add backward compatibility check for
2329 versions of terminal.mod that don't understand `terminal_input' or
2332 2008-11-09 Robert Millan <rmh@aybabtu.com>
2334 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2335 `terminal_input' / `terminal_output', not `terminal'.
2337 2008-11-08 Robert Millan <rmh@aybabtu.com>
2339 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2340 (DISTCLEANFILES): Add `build_env.mk'.
2342 2008-11-08 Robert Millan <rmh@aybabtu.com>
2344 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
2345 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2346 members. Update all users.
2347 * util/console.c (grub_ncurses_term): Split in ...
2348 (grub_ncurses_term_input): ... this, and ...
2349 (grub_ncurses_term_output): ... this. Update all users.
2350 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
2352 2008-11-08 Robert Millan <rmh@aybabtu.com>
2354 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2355 (PKGDATA): Add $(pkgdata_SRCDIR).
2356 (pkglib_BUILDDIR): New variable.
2357 (pkgdata_SRCDIR): New variable.
2358 (build_env.mk): New target.
2359 (include_DATA): New variable.
2360 (install-local): Install $(include_DATA) files in $(includedir).
2362 2008-11-07 Pavel Roskin <proski@gnu.org>
2364 * gendistlist.sh: Use C locale for sorting to ensure consistent
2365 output on all systems.
2367 * util/grub.d/00_header.in: Remove incorrect space before
2370 2008-11-07 Robert Millan <rmh@aybabtu.com>
2372 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2374 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2375 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2376 (based on find_multi_boot1_header).
2377 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2378 using find_multi_boot2_header(), and abort if neither Multiboot or
2379 Multiboot headers were found.
2381 2008-11-07 Robert Millan <rmh@aybabtu.com>
2383 Modularize at_keyboard.mod:
2385 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2386 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2387 (at_keyboard_mod_LDFLAGS): New variables.
2389 Actual terminal split:
2391 * include/grub/term.h (struct grub_term): Split in ...
2392 (struct grub_term_input): ... this, and ...
2393 (struct grub_term_output): ... this. Update all users.
2394 (grub_term_set_current): Split in ...
2395 (grub_term_set_current_input): ... this, and ...
2396 (grub_term_set_current_output): ... this.
2397 (grub_term_get_current): Split in ...
2398 (grub_term_get_current_input): ... this, and ...
2399 (grub_term_get_current_output): ... this.
2400 (grub_term_register): Split in ...
2401 (grub_term_register_input): ... this, and ...
2402 (grub_term_register_output): ... this.
2403 (grub_term_unregister): Split in ...
2404 (grub_term_unregister_input): ... this, and ...
2405 (grub_term_unregister_output): ... this.
2406 (grub_term_iterate): Split in ...
2407 (grub_term_iterate_input): ... this, and ...
2408 (grub_term_iterate_output): ... this.
2410 * kern/term.c (grub_term_list): Split in ...
2411 (grub_term_list_input): ... this, and ...
2412 (grub_term_list_output): ... this. Update all users.
2413 (grub_cur_term): Split in ...
2414 (grub_cur_term_input): ... this, and ...
2415 (grub_cur_term_output): ... this. Update all users.
2416 (grub_term_set_current): Split in ...
2417 (grub_term_set_current_input): ... this, and ...
2418 (grub_term_set_current_output): ... this.
2419 (grub_term_get_current): Split in ...
2420 (grub_term_get_current_input): ... this, and ...
2421 (grub_term_get_current_output): ... this.
2422 (grub_term_register): Split in ...
2423 (grub_term_register_input): ... this, and ...
2424 (grub_term_register_output): ... this.
2425 (grub_term_unregister): Split in ...
2426 (grub_term_unregister_input): ... this, and ...
2427 (grub_term_unregister_output): ... this.
2428 (grub_term_iterate): Split in ...
2429 (grub_term_iterate_input): ... this, and ...
2430 (grub_term_iterate_output): ... this.
2432 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2433 a check for input and one for output (and only attempt to get keys
2434 from user when input works).
2436 * util/grub-probe.c (grub_term_get_current): Split in ...
2437 (grub_term_get_current_input): ... this, and ...
2438 (grub_term_get_current_output): ... this.
2439 * util/grub-fstest.c: Likewise.
2440 * util/i386/pc/grub-setup.c: Likewise.
2441 * util/grub-editenv.c: Likewise.
2443 Portability adjustments:
2445 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2446 `term/i386/pc/at_keyboard.c'.
2447 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2448 grub_keyboard_controller_init() (now handled by terminal .init).
2449 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
2450 grub_at_keyboard_init().
2451 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
2452 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
2453 at_keyboard.mod via input terminal interface).
2454 * include/grub/i386/coreboot/console.h: Convert into a stub for
2455 `<grub/i386/pc/console.h>'.
2457 Migrate full terminals to new API:
2459 * term/efi/console.c (grub_console_term): Split into ...
2460 (grub_console_term_input): ... this, and ...
2461 (grub_console_term_output): ... this. Update all users.
2462 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
2463 (grub_ofconsole_init): Split into ...
2464 (grub_ofconsole_init_input): ... this, and ...
2465 (grub_ofconsole_init_output): ... this.
2466 (grub_ofconsole_term): Split into ...
2467 (grub_ofconsole_term_input): ... this, and ...
2468 (grub_ofconsole_term_output): ... this. Update all users.
2469 * term/i386/pc/serial.c (grub_serial_term): Split into ...
2470 (grub_serial_term_input): ... this, and ...
2471 (grub_serial_term_output): ... this. Update all users.
2472 * term/i386/pc/console.c (grub_console_term): Split into ...
2473 (grub_console_term_input): ... this, and ...
2474 (grub_console_term_output): ... this. Update all users.
2475 (grub_console_term_input): Only enable it on PC/BIOS platform.
2476 (grub_console_init): Remove grub_keyboard_controller_init() call.
2478 Migrate input terminals to new API:
2480 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
2481 `i386' and `i386/pc' to enable build on x86_64 (this driver is
2482 i386-specific anyway).
2483 (grub_console_checkkey): Rename to ...
2484 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
2486 (grub_keyboard_controller_orig): New variable.
2487 (grub_console_getkey): Rename to ...
2488 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
2490 (grub_keyboard_controller_init): Static-ize. Save original
2491 controller value so that it can be restored ...
2492 (grub_keyboard_controller_fini): ... here (new function).
2493 (grub_at_keyboard_term): New structure.
2494 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
2497 Migrate output terminals to new API:
2499 * term/i386/pc/vga.c (grub_vga_term): Change type to
2500 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2501 members. Update all users.
2502 * term/gfxterm.c (grub_video_term): Change type to
2503 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2504 members. Update all users.
2505 * include/grub/i386/pc/console.h (grub_console_checkkey)
2506 (grub_console_getkey): Do not export (no longer needed by gfxterm,
2509 Migrate `terminal' command and userland tools to new API:
2511 * commands/terminal.c (grub_cmd_terminal): Split into ...
2512 (grub_cmd_terminal_input): ... this, and ...
2513 (grub_cmd_terminal_output): ... this.
2514 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2515 `terminal_input' and `terminal_output'.
2516 * util/grub.d/00_header.in: Adjust `terminal' calls to new
2517 `terminal_input' / `terminal_output' API.
2518 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2519 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2520 provided ${GRUB_TERMINAL}, convert it).
2522 2008-11-04 Robert Millan <rmh@aybabtu.com>
2524 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
2526 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2528 2008-11-03 Bean <bean123ch@gmail.com>
2530 * kern/elf.c (grub_elf32_load): Revert to previous code.
2531 (grub_elf64_load): Likewise.
2533 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2535 2008-11-01 Robert Millan <rmh@aybabtu.com>
2537 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2538 (TARGET_CPPFLAGS): Likewise.
2539 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2541 2008-11-01 Carles Pina i Estany <carles@pina.cat>
2543 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2545 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2547 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2548 addition of objects until the code is not going to be able to fail.
2550 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2552 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2553 (add a missing NULL check, and correct them by moving the pointer
2554 operations after the actual check).
2556 2008-10-29 Robert Millan <rmh@aybabtu.com>
2558 * util/i386/pc/grub-install.in: Handle empty string as output from
2559 make_system_path_relative_to_its_root().
2561 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
2563 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2564 circular metadata worst case scenario. If the metadata is circular
2565 then copy the wrap in place.
2566 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2567 project lib/format_text/layout.h
2568 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2570 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2572 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2574 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2576 * util/update-grub_lib.in: Mention filename in warning message.
2578 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2580 * NEWS: Update for rename of update-grub to grub-mkconfig.
2582 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2584 * util/update-grub_lib.in: Copy to ...
2585 * util/grub-mkconfig_lib.in: ... this. Update all users.
2586 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2587 * util/update-grub.in: Rename to ...
2588 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
2589 option. Add `--output' option to allow users to specify the generated
2590 configuration file. Default to stdout.
2591 (update_grub_dir): Rename to ...
2592 (grub_mkconfig_dir): ... this.
2593 (grub_cfg): Default to an empty string.
2594 * conf/common.rmk (update-grub): Rename to ...
2595 (grub-mkconfig): ... this.
2596 (update-grub_lib): Copy to ...
2597 (grub-mkconfig_lib): ... this.
2598 (update-grub_SCRIPTS): Copy to ...
2599 (grub-mkconfig_SCRIPTS): ... this. Update all users.
2600 (update-grub_DATA): Rename to ...
2601 (grub-mkconfig_DATA): ... this.
2603 2008-09-28 Robert Millan <rmh@aybabtu.com>
2605 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2606 to `modified'. Add the real `created' field.
2607 (grub_iso9660_uuid): Use `modified' rather than `created' for
2608 constructing the UUID.
2610 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
2612 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2613 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2615 2008-09-28 Bean <bean123ch@gmail.com>
2617 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2618 Thanks to Christian Franke for finding this bug.
2620 2008-09-25 Robert Millan <rmh@aybabtu.com>
2622 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2623 instances of grub_util_get_disk_name() (see previous commit).
2625 2008-09-25 Robert Millan <rmh@aybabtu.com>
2627 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2628 `util/i386/get_disk_name.c'.
2629 * conf/i386-efi.rmk: Likewise.
2630 * conf/x86_64-efi.rmk: Likewise.
2631 * conf/i386-coreboot.rmk: Likewise.
2632 * conf/i386-ieee1275.rmk: Likewise.
2633 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2634 `util/ieee1275/get_disk_name.c'.
2635 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2636 * util/ieee1275/get_disk_name.c: Remove file.
2637 * util/i386/get_disk_name.c: Remove file.
2638 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2639 "hd%d" for device.map entries, rather than using
2640 grub_util_get_disk_name().
2642 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2644 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2646 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2648 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2650 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2652 (GRUB_TERM_PPAGE): Changed to 0x4900.
2654 2008-09-24 Robert Millan <rmh@aybabtu.com>
2656 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2657 macros (they were i386-pc specific).
2658 * include/grub/sparc64/ieee1275/console.h: Likewise.
2659 * include/grub/efi/console.h: Likewise.
2661 2008-09-22 Bean <bean123ch@gmail.com>
2663 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2664 resident and in attribute list.
2666 * include/grub/ntfs.h (BMP_LEN): Removed.
2668 2008-09-22 Bean <bean123ch@gmail.com>
2670 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2671 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2673 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2674 error occurs, as grub_disk_open will call grub_disk_close, which will
2675 call p->close (scsi).
2677 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2679 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2680 (AC_PREREQ): Bumped to 2.59.
2681 (AC_TRY_COMPILE): Replace obsolete macro with ...
2682 (AC_COMPILE_IFELSE): ... this.
2683 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2684 (AC_LINK_IFELSE): ... this.
2686 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2688 * autogen.sh: Add a call to `gendistlist.sh'.
2690 2008-09-19 Christian Franke <franke@computer.org>
2692 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2693 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2694 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2695 Export __enable_execute_stack() to modules.
2696 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2699 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2701 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2704 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2706 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2707 #include <grub/util/hostdisk.h>.
2709 2008-09-08 Robert Millan <rmh@aybabtu.com>
2711 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2712 segments when their filesz is zero (grub_file_read() interprets
2713 zero-size as "read until EOF", which results in memory corruption).
2714 Use `lowest_segment' rather than 0 for calculating the current
2715 segment load address.
2717 2008-09-08 Robert Millan <rmh@aybabtu.com>
2719 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2720 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2721 clobbered useful information.
2723 2008-09-08 Robert Millan <rmh@aybabtu.com>
2725 * include/grub/util/biosdisk.h: Move to ...
2726 * include/grub/util/hostdisk.h: ... here. Update all users.
2727 * util/biosdisk.c: Move to ...
2728 * util/hostdisk.c: ... here. Update all users.
2730 2008-09-07 Robert Millan <rmh@aybabtu.com>
2732 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2734 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2735 and length can be stored directly in the `mbi->mmap_addr' and
2736 `mbi->mmap_length' struct fields.
2738 2008-09-07 Robert Millan <rmh@aybabtu.com>
2740 * conf/i386.rmk: New file. Provides declaration for building
2742 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2743 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2745 Include `conf/i386.mk'.
2746 * conf/i386-efi.rmk: Likewise.
2747 * conf/x86_64-efi.rmk: Likewise.
2748 * conf/i386-coreboot.rmk: Likewise.
2749 * conf/i386-ieee1275.rmk: Likewise.
2751 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2753 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2754 Adds optimization support for BGR based modes.
2756 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2757 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2758 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2759 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2760 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2761 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2762 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2763 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2764 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2765 (grub_video_i386_vbeblit_index_index): Likewise.
2766 (grub_video_i386_vbeblit_replace_directN): Added.
2767 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2768 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2769 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2770 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2771 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2772 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2773 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2774 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2775 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2776 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2777 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2778 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2779 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2781 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2782 (grub_video_i386_vbefill_R8G8B8): Likewise.
2783 (grub_video_i386_vbefill_index): Likewise.
2784 (grub_video_i386_vbefill_direct32): Added.
2785 (grub_video_i386_vbefill_direct24): Likewise.
2786 (grub_video_i386_vbefill_direct16): Likewise.
2787 (grub_video_i386_vbefill_direct8): Likewise.
2789 * include/grub/video.h (grub_video_blit_format): Removed
2790 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2791 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2792 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2793 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2794 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2796 * video/video.c (grub_video_get_blit_format): Updated to use new
2797 blit formats. Added handling for 16 bit color modes.
2799 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2801 (common_blitter): Updated to use new blitters.
2803 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2805 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2806 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2807 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2808 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2809 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2810 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2811 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2812 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2813 (grub_video_i386_vbeblit_index_index): Likewise.
2814 (grub_video_i386_vbeblit_replace_directN): Added.
2815 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2816 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2817 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2818 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2819 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2820 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2821 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2822 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2823 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2824 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2825 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2826 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2827 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2829 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2830 (grub_video_i386_vbefill_R8G8B8): Likewise.
2831 (grub_video_i386_vbefill_index): Likewise.
2832 (grub_video_i386_vbefill_direct32): Added.
2833 (grub_video_i386_vbefill_direct24): Likewise.
2834 (grub_video_i386_vbefill_direct16): Likewise.
2835 (grub_video_i386_vbefill_direct8): Likewise.
2837 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2840 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2843 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2846 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2849 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2851 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2854 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2856 * fs/iso9660.c (grub_iso9660_date): New structure.
2857 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2858 (grub_iso9660_uuid): New function.
2860 2008-09-05 Bean <bean123ch@gmail.com>
2862 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2864 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2865 insensitive bit for names in Win32 and Win32 & DOS namespace.
2867 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2869 * include/grub/types.h (LONG_MAX): Likewise.
2871 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2873 * util/getroot.c: Include <config.h>.
2874 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2875 add support for /dev/md/N devices and handle LVM double dash escaping.
2877 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2879 * config.guess: Update to latest version from config git.
2880 * config.sub: Likewise.
2882 2008-09-03 Robert Millan <rmh@aybabtu.com>
2884 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2885 `disk->total_sectors'.
2887 2008-09-01 Colin D Bennett <colin@gibibit.com>
2889 * include/grub/normal.h: Fixed incorrect comment for
2890 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2892 2008-09-01 Colin D Bennett <colin@gibibit.com>
2894 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2895 values with defines.
2897 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2898 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2899 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2900 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2901 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2902 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2903 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2904 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2905 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2906 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2907 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2908 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2909 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2910 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2911 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2912 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2913 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2914 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2915 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2917 2008-08-31 Robert Millan <rmh@aybabtu.com>
2919 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2921 (grub_multiboot): Fix a few warnings.
2923 2008-08-31 Robert Millan <rmh@aybabtu.com>
2925 * loader/i386/pc/multiboot.c: Update comment not to say that
2926 boot_device support is unimplemented.
2928 2008-08-31 Robert Millan <rmh@aybabtu.com>
2930 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2931 or memory map support are unimplemented.
2933 2008-08-31 Colin D Bennett <colin@gibibit.com>
2935 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2937 2008-08-31 Colin D Bennett <colin@gibibit.com>
2939 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2940 total video memory in 'vbeinfo' output; show color format details for
2943 2008-08-30 Pavel Roskin <proski@gnu.org>
2945 * util/genmoddep.c: Remove for real this time.
2946 * DISTLIST: Remove util/genmoddep.c.
2948 2008-08-30 Robert Millan <rmh@aybabtu.com>
2950 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2951 as required by Multiboot spec (it was already 4-byte aligned, but
2954 2008-08-29 Pavel Roskin <proski@gnu.org>
2956 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2957 * kern/powerpc/ieee1275/startup.S: ... this.
2958 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2959 * DISTLIST: Likewise.
2961 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2962 grub/cpu/kernel.h. Add start label for consistency with other
2963 platforms. Add grub_prefix immediately after start. Add jump
2964 to the code after grub_prefix.
2965 * include/grub/powerpc/kernel.h: Provide valid values for
2966 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2968 2008-08-29 Bean <bean123ch@gmail.com>
2970 * configure.ac: Change host_os to cygwin for mingw.
2971 (asprintf): New check for function.
2973 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2974 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2976 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2977 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2978 sync, sleep and grub_util_get_disk_size for mingw.
2980 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2981 to get size in mingw.
2982 (open_device): Use flag O_BINARY if it's defined.
2983 (find_root_device): Add dummy code for mingw.
2985 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2986 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2987 (get_scsi_disk_name): Return 0 for mingw.
2989 * util/hostfs.c: #include <grub/util/misc.h>.
2990 (grub_hostfs_open): Use "rb" flag to open file, use
2991 grub_util_get_disk_size to get disk size for mingw.
2993 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2994 (asprintf): New function if HAVE_ASPRINTF is not set.
2995 (sync): New function for mingw.
2997 (grub_util_get_disk_size): Likewise.
2999 2008-08-28 Pavel Roskin <proski@gnu.org>
3001 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3004 2008-08-28 Robert Millan <rmh@aybabtu.com>
3006 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3008 2008-08-28 Robert Millan <rmh@aybabtu.com>
3010 Change find_grub_drive() syntax so it doesn't prevent it from
3011 detecting NULL names as errors.
3013 * util/biosdisk.c (find_grub_drive): Move free slot search code
3015 (find_free_slot): ... to here.
3016 (read_device_map): Use find_free_slot() to search for free slots.
3018 2008-08-27 Marco Gerards <marco@gnu.org>
3020 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3021 (scsi_mod_SOURCES): New variable.
3022 (scsi_mod_CFLAGS): Likewise
3023 (scsi_mod_LDFLAGS): Likewise.
3025 * disk/scsi.c: New file.
3027 * include/grub/scsi.h: Likewise.
3029 * include/grub/scsicmd.h: Likewise.
3031 * disk/ata.c: Include <grub/scsi.h>.
3032 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3034 (grub_ata_iterate): Skip ATAPI devices.
3035 (grub_ata_open): Only handle ATAPI devices.
3036 (struct grub_atapi_read): Removed.
3037 (grub_atapi_readsector): Likewise.
3038 (grub_ata_read): No longer handle ATAPI devices.
3039 (grub_ata_write): Likewise.
3040 (grub_atapi_iterate): New function.
3041 (grub_atapi_read): Likewise.
3042 (grub_atapi_write): Likewise.
3043 (grub_atapi_open): Likewise.
3044 (grub_atapi_close): Likewise.
3045 (grub_atapi_dev): New variable.
3046 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3047 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3049 * include/grub/disk.h (enum grub_disk_dev_id): Add
3050 `GRUB_DISK_DEVICE_SCSI_ID'.
3052 2008-08-26 Robert Millan <rmh@aybabtu.com>
3054 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3055 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3058 2008-08-23 Bean <bean123ch@gmail.com>
3060 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3061 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3062 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3063 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3065 (raid5rec_mod_SOURCES): New macro.
3066 (raid5rec_mod_CFLAGS): Likewise.
3067 (raid5rec_mod_LDFLAGS): Likewise.
3068 (raid6rec_mod_SOURCES): Likewise.
3069 (raid6rec_mod_CFLAGS): Likewise.
3070 (raid6rec_mod_LDFLAGS): Likewise.
3071 (mdraid_mod_SOURCES): Likewise.
3072 (mdraid_mod_CFLAGS): Likewise.
3073 (mdraid_mod_LDFLAGS): Likewise.
3074 (dm_nv_mod_SOURCES): Likewise.
3075 (dm_nv_mod_CFLAGS): Likewise.
3076 (dm_nv_mod_LDFLAGS): Likewise.
3078 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3079 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3080 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3082 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3083 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3085 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3087 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3089 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3091 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3093 * disk/raid5_recover.c: New file.
3095 * disk/raid6_recover.c: Likewise.
3097 * disk/mdraid_linux.c: Likewise.
3099 * disk/dmraid_nvidia.c: Likewise.
3101 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3104 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3105 calculate the size of raid device.
3106 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3107 different layout of raid5.
3108 (grub_raid_scan_device): Remove code specific to mdraid.
3109 (grub_raid_list): New variable.
3110 (free_array): New function.
3111 (grub_raid_register): Likewise.
3112 (grub_raid_unregister): Likewise.
3113 (grub_raid_rescan): Likewise.
3114 (GRUB_MOD_INIT): Don't iterate device here.
3115 (GRUB_MOD_FINI): Use free_array to release resource.
3117 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3118 (grub_raid5_recover_func_t): New function variable type.
3119 (grub_raid6_recover_func_t): Likewise.
3120 (grub_raid5_recover_func): New variable.
3121 (grub_raid6_recover_func): Likewise.
3122 (grub_raid_register): New function.
3123 (grub_raid_unregister): Likewise.
3124 (grub_raid_rescan): Likewise.
3125 (grub_raid_block_xor): Likewise.
3127 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3128 (CMD_CRC): New macro.
3130 (read_file): Handle device as well as file.
3131 (cmd_crc): New function.
3132 (fstest): Handle multiple disks.
3133 (options): Remove part, raw and long, add root and diskcount.
3134 (usage): Add crc, remove -p, -r, -l, add -r and -c.
3135 (main): Find the first non option entry and ignore subsequent options,
3136 add handling for the new options, support multiple disks.
3138 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3140 2008-08-23 Bean <bean123ch@gmail.com>
3142 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3144 * genfslist.sh: Ignore kernel.mod.
3146 * genpartmaplist.sh: Likewise.
3148 2008-08-23 Robert Millan <rmh@aybabtu.com>
3150 * util/getroot.c (find_root_device): Skip anything that starts with
3151 a dot, not just directories. This avoids things like /dev/.tmp.md0.
3153 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
3155 * util/update-grub.in (GRUB_GFXMODE): Export variable.
3156 * util/grub.d/00_header.in: Allow the administrator to change default
3157 gfxmode via ${GRUB_GFXMODE}.
3159 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
3161 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3163 2008-08-21 Robert Millan <rmh@aybabtu.com>
3165 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
3167 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3168 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3170 2008-08-20 Carles Pina i Estany <carles@pina.cat>
3172 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3173 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3175 2008-08-19 Robert Millan <rmh@aybabtu.com>
3177 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3178 (struct grub_virtual_screen): Remove `cursor_color'.
3179 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3181 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3183 2008-08-18 Robert Millan <rmh@aybabtu.com>
3185 Unify (identical) linux_normal.c files.
3186 * loader/i386/efi/linux_normal.c: Move from here ...
3187 * loader/linux_normal.c: ... to here. Update all users.
3188 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3189 * loader/i386/ieee1275/linux_normal.c: Likewise.
3191 2008-08-18 Robert Millan <rmh@aybabtu.com>
3193 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3194 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3195 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3196 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3197 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3199 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3200 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3201 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3202 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3203 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3204 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3205 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3206 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3207 Initialize `params->video_cursor_x' and `params->video_cursor_y'
3208 portably using grub_getxy().
3209 Replace `-EFI' with `-bzImage' in boot message.
3211 2008-08-17 Robert Millan <rmh@aybabtu.com>
3213 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3215 2008-08-17 Robert Millan <rmh@aybabtu.com>
3217 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3219 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3220 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3221 (grub_machine_mmap_iterate): New function declaration.
3222 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3224 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3227 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3228 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3229 Move e820 parsing from here ...
3230 * kern/i386/pc/mmap.c: New file.
3231 (grub_machine_mmap_iterate): ... to here.
3233 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3234 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3235 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
3236 (grub_available_iterate): Redeclare to return `void', and redeclare
3237 its hook to use grub_uint64_t as addr and size parameters, and rename
3239 (grub_machine_mmap_iterate): ... this. Update all users.
3241 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3242 to make it more readable. Rename to ...
3243 (grub_machine_mmap_iterate): ... this.
3245 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3246 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3247 (grub_multiboot): Allocate an extra region after the payload, and fill
3248 it with a Multiboot memory map. Adjust a.out loader to calculate size
3249 with the extra space.
3250 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3251 with the extra space.
3253 2008-08-17 Carles Pina i Estany <carles@pina.cat>
3255 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
3257 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
3259 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3260 mdate-sh to the list `find' searches for.
3261 * DISTLIST: Regenerated.
3263 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
3265 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3266 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
3267 genmoddep.awk, gensymlist.sh.in.
3268 (DISTDIRS): Add bus, docs, hook, lib.
3269 * DISTLIST: Regenerated.
3270 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
3272 2008-08-16 Robert Millan <rmh@aybabtu.com>
3274 * disk/raid.c (grub_raid_init): Handle/report errors set by
3275 grub_device_iterate().
3276 * disk/lvm.c (grub_lvm_init): Likewise.
3278 2008-08-15 Bean <bean123ch@gmail.com>
3280 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3282 (datetime_mod_SOURCES): New macro.
3283 (datetime_mod_CFLAGS): Likewise.
3284 (datetime_mod_LDFLAGS): Likewise.
3285 (date_mod_SOURCES): Likewise.
3286 (date_mod_CFLAGS): Likewise.
3287 (date_mod_LDFLAGS): Likewise.
3288 (datehook_mod_SOURCES): Likewise.
3289 (datehook_mod_CFLAGS): Likewise.
3290 (datehook_mod_LDFLAGS): Likewise.
3292 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3294 (datetime_mod_SOURCES): New macro.
3295 (datetime_mod_CFLAGS): Likewise.
3296 (datetime_mod_LDFLAGS): Likewise.
3297 (date_mod_SOURCES): Likewise.
3298 (date_mod_CFLAGS): Likewise.
3299 (date_mod_LDFLAGS): Likewise.
3300 (datehook_mod_SOURCES): Likewise.
3301 (datehook_mod_CFLAGS): Likewise.
3302 (datehook_mod_LDFLAGS): Likewise.
3304 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3306 (datetime_mod_SOURCES): New macro.
3307 (datetime_mod_CFLAGS): Likewise.
3308 (datetime_mod_LDFLAGS): Likewise.
3309 (date_mod_SOURCES): Likewise.
3310 (date_mod_CFLAGS): Likewise.
3311 (date_mod_LDFLAGS): Likewise.
3312 (datehook_mod_SOURCES): Likewise.
3313 (datehook_mod_CFLAGS): Likewise.
3314 (datehook_mod_LDFLAGS): Likewise.
3316 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3318 (datetime_mod_SOURCES): New macro.
3319 (datetime_mod_CFLAGS): Likewise.
3320 (datetime_mod_LDFLAGS): Likewise.
3321 (date_mod_SOURCES): Likewise.
3322 (date_mod_CFLAGS): Likewise.
3323 (date_mod_LDFLAGS): Likewise.
3324 (datehook_mod_SOURCES): Likewise.
3325 (datehook_mod_CFLAGS): Likewise.
3326 (datehook_mod_LDFLAGS): Likewise.
3328 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3330 (datetime_mod_SOURCES): New macro.
3331 (datetime_mod_CFLAGS): Likewise.
3332 (datetime_mod_LDFLAGS): Likewise.
3333 (date_mod_SOURCES): Likewise.
3334 (date_mod_CFLAGS): Likewise.
3335 (date_mod_LDFLAGS): Likewise.
3336 (datehook_mod_SOURCES): Likewise.
3337 (datehook_mod_CFLAGS): Likewise.
3338 (datehook_mod_LDFLAGS): Likewise.
3340 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3342 * commands/date.c: New file.
3344 * hook/datehook.c: Likewise.
3346 * include/grub/lib/datetime.h: Likewise.
3348 * include/grub/i386/cmos.h: Likewise.
3350 * lib/datetime.c: Likewise.
3352 * lib/i386/datetime.c: Likewise.
3354 * lib/efi/datetime.c: Likewise.
3356 2008-08-14 Robert Millan <rmh@aybabtu.com>
3358 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3359 (grub_mkelfimage_SOURCES): New variable.
3360 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3362 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3363 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3364 * conf/powerpc-ieee1275.rmk: Likewise.
3365 * conf/i386-ieee1275.rmk: Likewise.
3367 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3368 * kern/i386/coreboot/init.c: Likewise.
3370 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3371 with `<grub/cpu/kernel.h>'.
3372 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3374 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3375 * kern/i386/coreboot/startup.S: Likewise.
3377 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3378 (GRUB_MOD_GAP): Remove.
3379 * include/grub/powerpc/kernel.h: New file.
3380 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3381 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3382 * include/grub/i386/kernel.h: New file.
3383 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3384 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3385 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3387 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3389 Use --directory when invoking grub_mkimage.
3391 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3392 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3393 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3394 and GRUB_KERNEL_CPU_PREFIX.
3396 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
3398 * include/grub/err.h (grub_err_printf): New function prototype.
3399 * util/misc.c (grub_err_printf): New function.
3400 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3402 * kern/err.c (grub_print_error): Use grub_err_printf.
3404 2008-08-13 Robert Millan <rmh@aybabtu.com>
3406 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3408 2008-08-13 Robert Millan <rmh@aybabtu.com>
3410 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3413 2008-08-12 Robert Millan <rmh@aybabtu.com>
3415 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3416 of the relocation code from here ...
3417 (grub_multiboot): ... to here.
3418 (forward_relocator, backward_relocator): Move from here ...
3419 * kern/i386/loader.S (grub_multiboot_forward_relocator)
3420 (grub_multiboot_backward_relocator): ... to here.
3421 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
3422 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
3423 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3424 (grub_multiboot_forward_relocator_end)
3425 (grub_multiboot_backward_relocator)
3426 (grub_multiboot_backward_relocator_end): New variables.
3428 2008-08-12 Bean <bean123ch@gmail.com>
3430 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3432 2008-08-11 Robert Millan <rmh@aybabtu.com>
3434 * kern/i386/linuxbios/startup.S: Move from here ...
3435 * kern/i386/coreboot/startup.S: ... to here.
3437 * kern/i386/linuxbios/init.c: Move from here ...
3438 * kern/i386/coreboot/init.c: ... to here.
3440 * kern/i386/linuxbios/table.c: Move from here ...
3441 * kern/i386/coreboot/mmap.c: ... to here.
3443 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3445 2008-08-11 Robert Millan <rmh@aybabtu.com>
3447 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3448 errors. Leave it to the upper layer to handle them.
3450 2008-08-09 Christian Franke <franke@computer.org>
3452 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
3453 * conf/common.rmk: Install `grub-pe2elf' only if requested.
3454 Install `grub.d/10_windows' only on Cygwin.
3455 * configure.ac: Add subst of `target_os'.
3456 Check `target_os' also before setting TARGET_OBJ2ELF.
3457 Add `--enable-grub-pe2elf'.
3459 2008-08-08 Robert Millan <rmh@aybabtu.com>
3461 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3462 (grub_last_time): Change type to grub_uint64_t.
3463 (grub_disk_open): Migrate code from to using grub_get_time_ms().
3464 (grub_disk_close): Likewise.
3466 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3467 (run_menu): Migrate code from to using grub_get_time_ms().
3469 * util/misc.c (grub_get_time_ms): New function.
3471 2008-08-08 Marco Gerards <marco@gnu.org>
3473 * disk/ata.c (grub_ata_regget): Change return type to
3475 (grub_ata_regget2): Likewise.
3476 (grub_ata_wait_status): New function.
3477 (grub_ata_wait_busy): Removed function, updated all users to use
3478 `grub_ata_wait_status'.
3479 (grub_ata_wait_drq): Likewise.
3480 (grub_ata_cmd): New function.
3481 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
3483 (grub_ata_pio_write): Add error handling.
3484 (grub_atapi_identify): Likewise.
3485 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
3487 (grub_ata_identify): Use `grub_ata_cmd' and improve error
3488 handling. Actually use the detected registers. Reorder the
3489 detection logic such that it is easier to read.
3490 (grub_ata_pciinit): Do not assign the same ID to each controller.
3491 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
3493 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
3495 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
3497 2008-08-08 Marco Gerards <marco@gnu.org>
3501 2008-08-07 Bean <bean123ch@gmail.com>
3503 * include/grub/x86_64/pci.h: New file.
3505 2008-08-07 Christian Franke <franke@computer.org>
3507 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3508 (TIMER2_GATE): Likewise.
3509 (grub_pit_wait): Add enable/disable of the timer2 gate
3510 bit of port 0x61. This fixes a possible infinite loop.
3512 2008-08-07 Bean <bean123ch@gmail.com>
3514 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3515 kern/i386/tsc.c and kern/i386/pit.c.
3517 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3520 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3523 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3525 2008-08-07 Bean <bean123ch@gmail.com>
3527 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3529 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3531 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3532 multiple inclusion. Add #include <grub/types.h>.
3534 2008-08-06 Christian Franke <franke@computer.org>
3536 * conf/common.rmk: Build and install `10_windows'.
3537 * util/grub.d/10_windows.in: New script.
3539 2008-08-06 Pavel Roskin <proski@gnu.org>
3541 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3543 2008-08-06 Robert Millan <rmh@aybabtu.com>
3545 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3546 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3548 2008-08-06 Bean <bean123ch@gmail.com>
3550 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3551 (grub_pxefs_fs_int): Remove dummy definition.
3552 (grub_pxefs_open): Use data->block_size to store the current block
3554 (grub_pxefs_read): Use block size stored in data->block_size. As the
3555 value of grub_pxe_blksize can be changed after the file is opened.
3557 2008-08-06 Bean <bean123ch@gmail.com>
3559 * fs/i386/pc/pxe.c (curr_file): new variable.
3560 (grub_pxefs_open): Simply the handling of pxe file system. Don't
3561 require the dummy internal file system anymore.
3562 (grub_pxefs_read): Removed.
3563 (grub_pxefs_close): Likewise.
3564 (grub_pxefs_fs_int): Likewise.
3565 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3566 connection when we switch file.
3567 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3569 2008-08-06 Robert Millan <rmh@aybabtu.com>
3571 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3573 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3574 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3576 * kern/i386/halt.c: New file.
3577 * kern/i386/reboot.c: Likewise.
3578 * include/grub/i386/reboot.h: Likewise.
3579 * include/grub/i386/halt.h: Likewise.
3581 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3582 Include `<grub/cpu/halt.h>'.
3583 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3584 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3586 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3587 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3588 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3589 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3590 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3591 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3593 * include/grub/i386/at_keyboard.h: ... to here.
3595 2008-08-05 Robert Millan <rmh@aybabtu.com>
3597 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3598 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3599 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3600 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3601 `kern/generic/millisleep.c'.
3603 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3604 instead of grub_get_rtc().
3605 (grub_tsc_init): Initialize `tsc_boot_time'.
3607 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3608 (grub_machine_init): Use grub_tsc_init() rather than
3609 installing an RTC-based handler via grub_install_get_time_ms().
3611 * kern/i386/pit.c: New file.
3612 * include/grub/i386/pit.h: Likewise.
3614 2008-08-05 Bean <bean123ch@gmail.com>
3616 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3618 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3619 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3620 (pxe_mod_SOURCES): New macro.
3621 (pxe_mod_CFLAGS): Likewise.
3622 (pxe_mod_LDFLAGS): Likewise.
3623 (pxecmd_mod_SOURCES): Likewise.
3624 (pxecmd_mod_CFLAGS): Likewise.
3625 (pxecmd_mod_LDFLAGS): Likewise.
3627 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3628 (grub_pxe_call): Likewise.
3630 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3632 * commands/i386/pc/pxecmd.c: New file.
3634 * fs/i386/pc/pxe.c: Likewise.
3636 * include/grub/i386/pc/pxe.h: Likewise.
3638 2008-08-05 Bean <bean123ch@gmail.com>
3640 * util/console.c (grub_console_cur_color): New variable.
3641 (grub_console_standard_color): Likewise.
3642 (grub_console_normal_color): Likewise.
3643 (grub_console_highlight_color): Likewise.
3644 (color_map): Likewise.
3645 (use_color): Likewise.
3646 (NUM_COLORS): New macro.
3647 (grub_ncurses_setcolorstate): Handle color properly.
3648 (grub_ncurses_setcolor): Don't change color here, just remember the
3649 settings, color will be set in grub_ncurses_setcolorstate.
3650 (grub_ncurses_getcolor): New function.
3651 (grub_ncurses_init): Initialize color pairs.
3652 (grub_ncurses_term): New member grub_ncurses_getcolor.
3654 2008-08-05 Colin D Bennett <colin@gibibit.com>
3656 High resolution timer support. Implemented for x86 CPUs using TSC.
3657 Extracted generic grub_millisleep() so it's linked in only as needed.
3658 This requires a Pentium compatible CPU; if the RDTSC instruction is
3659 not supported, then it falls back on the generic grub_get_time_ms()
3660 implementation that uses the machine's RTC.
3662 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3663 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3664 `kern/generic/millisleep.c'.
3666 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3667 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3669 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3670 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3672 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3674 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3675 `kern/generic/millisleep.c'.
3677 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3679 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3681 * kern/generic/rtc_get_time_ms.c: New file.
3683 * kern/generic/millisleep.c: New file.
3685 * kern/misc.c: Don't include
3686 <kern/time.h> anymore.
3687 (grub_millisleep_generic): Removed.
3689 * commands/sleep.c (grub_interruptible_millisleep): Uses
3690 grub_get_time_ms() instead of grub_get_rtc().
3692 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3694 (grub_cpu_is_cpuid_supported): New inline function.
3695 (grub_cpu_is_tsc_supported): New inline function.
3696 (grub_tsc_init): New function prototype.
3697 (grub_tsc_get_time_ms): New function prototype.
3699 * kern/i386/tsc.c (grub_get_time_ms): New file.
3701 * include/grub/time.h: Include <grub/types.h.
3702 (grub_millisleep_generic): Removed.
3703 (grub_get_time_ms): New prototype.
3704 (grub_install_get_time_ms): New prototype.
3705 (grub_rtc_get_time_ms): New prototype.
3707 * kern/time.c (grub_get_time_ms): New function.
3708 (grub_install_get_time_ms): New function.
3710 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3711 <grub/time.h> anymore.
3712 (grub_millisleep): Removed.
3713 (grub_machine_init): Call grub_tsc_init.
3715 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3716 get_time_ms() implementation.
3718 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3719 (ieee1275_get_time_ms): New function.
3720 (grub_machine_init): Install get_time_ms() implementation.
3722 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3723 (grub_machine_init): Call grub_tsc_init().
3724 (grub_millisleep): Removed.
3726 * kern/ieee1275/init.c (grub_millisleep): Removed.
3727 (grub_machine_init): Install ieee1275_get_time_ms()
3729 (ieee1275_get_time_ms): New function.
3730 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3733 2008-08-05 Marco Gerards <marco@gnu.org>
3735 * disk/ata.c: Include <grub/pci.h>.
3736 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3737 (grub_ata_initialize): Rewritten.
3738 (grub_ata_device_initialize): New function.
3740 2008-08-04 Pavel Roskin <proski@gnu.org>
3742 * kern/main.c: Include grub/mm.h.
3744 2008-08-04 Robert Millan <rmh@aybabtu.com>
3746 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3747 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3748 corruption problem).
3750 2008-08-04 Robert Millan <rmh@aybabtu.com>
3752 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3753 warnings introduced in my last commit.
3755 2008-08-03 Robert Millan <rmh@aybabtu.com>
3757 Make PCI available on all i386 architectures.
3759 * include/grub/i386/pc/pci.h: Move from here ...
3760 * include/grub/i386/pci.h: ... to here.
3762 * include/grub/i386/pc/pci.h: Remove.
3763 * include/grub/i386/efi/pci.h: Remove.
3764 * include/grub/x86_64/efi/pci.h: Remove.
3766 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3769 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3770 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3771 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3773 * conf/i386-ieee1275.rmk: Likewise.
3775 2008-08-03 Robert Millan <rmh@aybabtu.com>
3777 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3778 (grub_console_setcursor): Make it possible to set cursor off.
3780 2008-08-03 Robert Millan <rmh@aybabtu.com>
3782 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3783 of modules instead of assuming which platform provides what.
3784 * util/update-grub.in: Likewise.
3786 2008-08-03 Robert Millan <rmh@aybabtu.com>
3788 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3789 instead of `grub_install_dos_part' to determine whether a drive needs
3790 to be prepended to prefix (`grub_install_dos_part' is not reliable,
3791 because it can be overridden when loading GRUB via Multiboot).
3793 2008-08-02 Robert Millan <rmh@aybabtu.com>
3795 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3797 2008-08-02 Robert Millan <rmh@aybabtu.com>
3799 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3800 of informational grub_dprintf() calls.
3802 2008-08-02 Robert Millan <rmh@aybabtu.com>
3804 * disk/memdisk.c (memdisk_size): Don't initialize.
3805 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3807 * include/grub/i386/pc/kernel.h
3808 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3809 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3810 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3811 (grub_arch_memdisk_size): Remove.
3813 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3814 field (was only used to transfer a constant). Add `type' field to
3815 support multiple module types.
3816 (grub_module_iterate): New function.
3818 * kern/device.c (grub_device_open): Do not hide error messages
3819 when grub_disk_open() fails. Use grub_print_error() instead.
3821 * kern/i386/pc/init.c (grub_arch_modules_addr)
3822 (grub_arch_memdisk_size): Remove functions.
3823 (grub_arch_modules_addr): Return the module address in high memory
3824 (now that it isn't copied anymore).
3826 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3827 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3828 decompression routine (grub_total_module_size already includes that
3829 now). Don't copy modules back to low memory.
3831 * kern/main.c: Include `<grub/mm.h>'.
3832 (grub_load_modules): Split out (and use) ...
3833 (grub_module_iterate): ... this function, which iterates through
3834 module objects and runs a hook.
3835 Comment out grub_mm_init_region() call, as it would cause non-ELF
3836 modules to be overwritten.
3838 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3839 the memdisk image in its own region, make it part of the module list.
3840 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3841 (main): Parse --memdisk|-m option, and pass user-provided path as
3842 parameter to generate_image().
3843 (add_segments): Pass `memdisk_path' down to load_modules().
3844 (load_modules): Embed memdisk image in module section when requested.
3845 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3846 `header.type' instead of `header.offset'.
3848 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3849 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3850 (memdisk_mod_LDFLAGS): New variables.
3851 * conf/i386-coreboot.rmk: Likewise.
3852 * conf/i386-ieee1275.rmk: Likewise.
3854 2008-08-02 Robert Millan <rmh@aybabtu.com>
3856 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3857 (backward_relocator): New variables. Used to allocate and relocate
3858 the payload, respectively.
3859 (grub_multiboot_load_elf32): Load into heap instead of requested
3860 address, install the appropriate relocator code in each bound of
3861 the payload, and set the entry point such that
3862 grub_multiboot_real_boot() will jump to one of them.
3864 * kern/i386/loader.S (grub_multiboot_payload_size)
3865 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3866 (grub_multiboot_payload_entry_offset): New variables.
3867 (grub_multiboot_real_boot): Set cpu context to what the relocator
3868 expects, and jump to the relocator instead of the payload.
3870 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3871 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3872 (grub_multiboot_payload_entry_offset): Export.
3874 2008-08-01 Bean <bean123ch@gmail.com>
3876 * normal/menu_entry.c (editor_getline): Don't return the original
3877 string as result, as it will be released by lexer once it has done
3880 2008-08-01 Robert Millan <rmh@aybabtu.com>
3882 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3883 within menuentries, not before them.
3884 util/grub.d/10_hurd.in: Likewise.
3886 2008-08-01 Bean <bean123ch@gmail.com>
3888 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3889 (bufio_mod_SOURCES): New macro.
3890 (bufio_mod_CFLAGS): Likewise.
3891 (bufio_mod_LDFLAGS): Likewise.
3893 * include/grub/bufio.h: New file.
3895 * io/bufio.c: Likewise.
3897 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3898 (grub_video_reader_png): Use grub_buffile_open to open file.
3900 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3901 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3903 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3904 (grub_video_reader_tga): Use grub_buffile_open to open file.
3906 * font/manager.c: Include <grub/bufio.h>.
3907 (add_font): Use grub_buffile_open to open file.
3909 2008-07-31 Robert Millan <rmh@aybabtu.com>
3911 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3912 ELF segments, use a macro for arbitrarily accessing any of them instead
3913 of preparing a pointer that allows access to one at a time.
3914 (grub_multiboot_load_elf64): Likewise.
3916 2008-07-31 Bean <bean123ch@gmail.com>
3918 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3919 GRUB_KERNEL_MACHINE_DATA_END.
3921 2008-07-30 Robert Millan <rmh@aybabtu.com>
3923 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3924 Increase from 0x50 to 0x60.
3925 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3926 use UUIDs to identify the root drive for them. If that's not
3928 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3929 check, for cross-disk installs.
3931 2008-07-30 Robert Millan <rmh@aybabtu.com>
3933 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3934 is non-empty, use it to set the `prefix' environment variable instead
3935 of the usual approach.
3936 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3937 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3938 environment variable instead of dummy make_install_device().
3940 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3941 (start): Insert a data section, with `grub_prefix' variable.
3942 * kern/i386/linuxbios/startup.S: Likewise.
3944 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3945 New variable reference.
3946 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3947 New macro. Defines offset of `grub_prefix' within startup.S (relative
3949 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3950 section within startup.S (relative to `start').
3951 * include/grub/i386/coreboot/kernel.h: Likewise.
3953 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3954 Overwrite grub_prefix with its contents, at the beginning of the
3956 (main): Understand -p|--prefix.
3958 2008-07-30 Robert Millan <rmh@aybabtu.com>
3960 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3962 2008-07-30 Robert Millan <rmh@aybabtu.com>
3964 * term/i386/pc/vga_text.c (grub_console_cls): Use
3965 grub_console_gotoxy() to go back to beginning of the screen.
3966 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3968 2008-07-29 Christian Franke <franke@computer.org>
3970 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3971 Add conversion of emulated mount points on Cygwin.
3973 2008-07-29 Christian Franke <franke@computer.org>
3975 * util/update-grub.in: Add a check for admin
3977 Remove old `grub.cfg.new' before creation.
3978 Add `-f' to `mv' to handle the different filesystem
3979 semantics of Windows.
3981 2008-07-29 Bean <bean123ch@gmail.com>
3983 * normal/main.c (get_line): Fix buffer overflow bug.
3985 2008-07-28 Robert Millan <rmh@aybabtu.com>
3987 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3988 (struct grub_apple_header): New struct. Describes the layout of
3990 (apple_partition_map_iterate): Check the header magic as well as the
3991 partition magic (which was already being checked).
3993 2008-07-28 Pavel Roskin <proski@gnu.org>
3995 * genmk.rb: Add a warning to the beginning of the output that
3996 it's a generated file and should not be edited.
3998 2008-07-28 Robert Millan <rmh@aybabtu.com>
4000 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4001 with the same number are found, just use issue a warning with
4002 grub_dprintf(), as this error has been reported to be non-fatal.
4004 2008-07-27 Robert Millan <rmh@aybabtu.com>
4006 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4009 2008-07-27 Bean <bean123ch@gmail.com>
4011 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4012 (grub_fat_find_dir): Ignore case when comparing filename.
4014 2008-07-27 Bean <bean123ch@gmail.com>
4016 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4017 smallino, as it's more descriptive, and i8count can be confused with
4018 the other field count.
4019 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4022 2008-07-27 Bean <bean123ch@gmail.com>
4024 * commands/crc.c: New file.
4026 * lib/crc.c: Likewise.
4028 * include/grub/lib/crc.h: Likewise.
4030 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4032 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4033 (hexdump): Move this function to ...
4035 * lib/hexdump.c: ... here.
4037 * include/grub/hexdump.h: Renamed to ...
4039 * include/grub/lib/hexdump.h: ... this.
4041 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4043 * util/grub-editenv.c: Likewise.
4045 * include/envblk.h: Renamed to ...
4047 * include/lib/envblk.h: ... this.
4049 * util/envblk.c: Renamed to ...
4051 * lib/envblk.c: ... this.
4053 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4055 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4056 (pkglib_MODULES): Add crc.mod.
4057 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4058 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4059 (crc_mod_SOURCES): New macro.
4060 (crc_mod_CFLAGS): Likewise.
4061 (crc_mod_LDFLAGS): Likewise.
4063 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4065 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4067 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4069 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4071 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4073 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
4075 * commands/help.c: Include <grub/term.h>.
4076 (TERM_WIDTH): Removed. Updated all users.
4078 2008-07-27 Pavel Roskin <proski@gnu.org>
4080 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4081 spurious warnings about a comment within a comment.
4083 2008-07-25 Robert Millan <rmh@aybabtu.com>
4085 * util/getroot.c (find_root_device): Skip devices that match
4086 /dev/dm-[0-9]. This lets the real device be found for any type of
4087 abstraction (LVM, EVMS, RAID..).
4088 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4089 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4090 device is found first, find_root_device() will now skip it.
4092 2008-07-24 Pavel Roskin <proski@gnu.org>
4094 * include/grub/types.h: Use __builtin_bswap32() and
4095 __builtin_bswap64() with gcc 4.3 and newer.
4097 2008-07-24 Christian Franke <franke@computer.org>
4099 * util/i386/pc/grub-install.in: If `--debug' is specified,
4100 pass `--verbose' to grub-setup.
4101 Abort script if make_system_path_relative_to_its_root() fails.
4103 2008-07-24 Bean <bean123ch@gmail.com>
4105 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4106 variable `target_platform' should be `platform'.
4108 2008-07-24 Bean <bean123ch@gmail.com>
4110 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
4111 (grub_png_init_fixed_block): New function.
4112 (grub_png_decode_image_data): Handle fixed huffman code compression.
4114 2008-07-24 Bean <bean123ch@gmail.com>
4116 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4117 (grub_pe2elf_SOURCES): New macro.
4118 (CLEANFILES): Add grub-pe2elf.
4120 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4121 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4122 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4123 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4124 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4125 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4126 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4127 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4128 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4129 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4130 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4131 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4132 (GRUB_PE32_DT_FUNCTION): Likewise.
4133 (GRUB_PE32_REL_I386_DIR32): Likewise.
4134 (GRUB_PE32_REL_I386_REL32): Likewise.
4135 (grub_pe32_symbol): New structure.
4136 (grub_pe32_reloc): Likewise.
4138 * util/grub-pe2elf.c: New file.
4140 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4141 start symbol in non pc platform.
4143 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4145 The following patches are from Christian Franke.
4147 * include/grub/dl.h: Remove .previous, gas supports this only
4150 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4151 Remove .type, gas supports this only for ELF format.
4153 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4154 nullbytes in symbol table. This fixes an infinite loop if table is
4157 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4158 TARGET_IMG_LDFLAGS and EXEEXT.
4160 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4161 TARGET_IMG_LDFLAGS_AC.
4162 (grub_CHECK_STACK_ARG_PROBE): New function.
4164 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4166 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4168 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4169 to set TARGET_IMG_LD* accordingly.
4170 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4171 Add call to grub_CHECK_STACK_ARG_PROBE.
4172 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4174 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4176 * genmk.rb: Add EXEEXT to CLEANFILES.
4178 2008-07-23 Robert Millan <rmh@aybabtu.com>
4180 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4181 define the codes for arrows and lines used for the menu).
4182 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4185 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4186 fonts, because the latter are too slow.
4188 2008-07-21 Bean <bean123ch@gmail.com>
4190 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4191 a20. Run keyboard test last, as it will cause macbook to halt.
4193 2008-07-18 Pavel Roskin <proski@gnu.org>
4195 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4196 load foreign architecture modules correctly anyway. Keep
4197 support for loading host architecture modules, whether we
4198 compile them or not.
4200 2008-07-17 Pavel Roskin <proski@gnu.org>
4202 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4203 change target_cpu. The compiler default can mismatch target_cpu
4206 * disk/efi/efidisk.c: Fix format warnings on x86_64.
4207 * kern/efi/efi.c: Likewise.
4209 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
4210 target compiler is functional.
4211 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4214 * configure.ac: Default to efi platform for x86_64-apple. Allow
4215 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
4216 adjustments from the rest, only do them if target is not
4217 explicitly given. Merge other adjustments with the final sanity
4218 check. Remove an extraneous check for supported CPU. Be
4219 specific which CPU and which platform is not supported.
4221 * configure.ac: Default to pc platform for x86_64.
4223 2008-07-17 Robert Millan <rmh@aybabtu.com>
4225 Partial LinuxBIOS -> Coreboot rename.
4227 * conf/i386-linuxbios.rmk: Renamed to ...
4228 * conf/i386-coreboot.rmk: ... this.
4229 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4230 * configure.ac: Accept "coreboot" as input platform (but maintain
4231 compatibility with "linuxbios").
4232 * include/grub/i386/linuxbios: Renamed to ...
4233 * include/grub/i386/coreboot: ... this.
4235 2008-07-17 Bean <bean123ch@gmail.com>
4237 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
4238 (appleldr_mod_SOURCE): New variable.
4239 (appleldr_mod_CFLAGS): Likewise.
4240 (appleldr_mod_LDFLAGS): Likewise.
4241 (pci_mod_SOURCES): Likewise.
4242 (pci_mod_CFLAGS): Likewise.
4243 (pci_mod_LDFLAGS): Likewise.
4244 (lspci_mod_SOURCES): Likewise.
4245 (lspci_mod_CFLAGS): Likewise.
4246 (lspci_mod_LDFLAGS): Likewise.
4248 * conf/x86_64-efi.rmk: New file.
4250 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4252 (grub_efidisk_write): Likewise.
4254 * include/efi/api.h (efi_call_0): New macro.
4255 (efi_call_1): Likewise.
4256 (efi_call_2): Likewise.
4257 (efi_call_3): Likewise.
4258 (efi_call_4): Likewise.
4259 (efi_call_5): Likewise.
4260 (efi_call_6): Likewise.
4262 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4263 grub_rescue_cmd_chainloader.
4265 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4266 (grub_pe32_optional_header): Change some fields based on i386 or
4268 (GRUB_PE32_PE32_MAGIC): Likewise.
4270 * include/grub/efi/uga_draw.h: New file.
4272 * include/grub/elf.h (STN_ABS): New constant.
4273 (R_X86_64_NONE): Relocation constant for x86_64.
4274 (R_X86_64_64): Likewise.
4275 (R_X86_64_PC32): Likewise.
4276 (R_X86_64_GOT32): Likewise.
4277 (R_X86_64_PLT32): Likewise.
4278 (R_X86_64_COPY): Likewise.
4279 (R_X86_64_GLOB_DAT): Likewise.
4280 (R_X86_64_JUMP_SLOT): Likewise.
4281 (R_X86_64_RELATIVE): Likewise.
4282 (R_X86_64_GOTPCREL): Likewise.
4283 (R_X86_64_32): Likewise.
4284 (R_X86_64_32S): Likewise.
4285 (R_X86_64_16): Likewise.
4286 (R_X86_64_PC16): Likewise.
4287 (R_X86_64_8): Likewise.
4288 (R_X86_64_PC8): Likewise.
4290 * include/grub/i386/efi/pci.h: New file.
4292 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4293 Change it value based on platform.
4294 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4295 (GRUB_E820_RAM): Likewise.
4296 (GRUB_E820_RESERVED): Likewise.
4297 (GRUB_E820_ACPI): Likewise.
4298 (GRUB_E820_NVS): Likewise.
4299 (GRUB_E820_EXEC_CODE): Likewise.
4300 (GRUB_E820_MAX_ENTRY): Likewise.
4301 (grub_e820_mmap): New structure.
4302 (linux_kernel_header): Change the efi field according to different
4303 kernel version, also field from linux_kernel_header.
4305 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4307 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4308 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4309 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4310 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4311 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4312 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4313 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4314 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4315 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4316 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4318 * include/grub/x86_64/efi/kernel.h: New file.
4320 * include/grub/x86_64/efi/loader.h: Likewise.
4322 * include/grub/x86_64/efi/machine.h: Likewise.
4324 * include/grub/x86_64/efi/pci.h: Likewise.
4326 * include/grub/x86_64/efi/time.h: Likewise.
4328 * include/grub/x86_64/linux.h: Likewise.
4330 * include/grub/x86_64/setjmp.h: Likewise.
4332 * include/grub/x86_64/time.h: Likewise.
4334 * include/grub/x86_64/types.h: Likewise.
4336 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4337 GRUB_TARGET_SIZEOF_VOID_P.
4339 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4340 (grub_efi_locate_handle): Likewise.
4341 (grub_efi_open_protocol): Likewise.
4342 (grub_efi_set_text_mode): Likewise.
4343 (grub_efi_stall): Likewise.
4344 (grub_exit): Likewise.
4345 (grub_reboot): Likewise.
4346 (grub_halt): Likewise.
4347 (grub_efi_exit_boot_services): Likewise.
4348 (grub_get_rtc): Likewise.
4350 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4351 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4352 (grub_efi_allocate_pages): Wrap efi calls.
4353 (grub_efi_free_pages): Wrap efi calls.
4354 (grub_efi_get_memory_map): Wrap efi calls.
4356 * kern/x86_64/dl.c: New file.
4358 * kern/x86_64/efi/callwrap.S: Likewise.
4360 * kern/x86_64/efi/startup.S: Likewise.
4362 * loader/efi/appleloader.c: Likewise.
4364 * loader/efi/chainloader.c (cmdline): New variable.
4365 (grub_chainloader_unload): Wrap efi calls.
4366 (grub_chainloader_boot): Likewise.
4367 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4370 * loader/efi/chainloader_normal.c (chainloader_command):
4371 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4374 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4376 (grub_e820_add_region): New function.
4377 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4379 (grub_find_video_card): New function.
4380 (grub_linux_setup_video): New function.
4381 (grub_rescue_cmd_linux): Probe for video information.
4383 * normal/x86_64/setjmp.S: New file.
4385 * term/efi/console.c (map_char): New function.
4386 (grub_console_putchar): Map unicode char.
4387 (grub_console_checkkey): Wrap efi calls.
4388 (grub_console_getkey): Likewise.
4389 (grub_console_getwh): Likewise.
4390 (grub_console_gotoxy): Likewise.
4391 (grub_console_cls): Likewise.
4392 (grub_console_setcolorstate): Likewise.
4393 (grub_console_setcursor): Likewise.
4395 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4397 2008-07-16 Pavel Roskin <proski@gnu.org>
4399 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4402 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4403 pointer, not an integer. This fixes a warning and prevents
4404 precision loss on 64-bit systems.
4405 (relocate_addresses): Remove unneeded cast.
4407 2008-07-15 Pavel Roskin <proski@gnu.org>
4409 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4411 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4413 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4414 Fix comparison between signed and unsigned.
4416 * include/grub/i386/ieee1275/console.h: Declare
4417 grub_console_init() and grub_console_fini().
4419 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4420 It's empty and unused.
4422 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4423 beginning to avoid warnings with some compilers.
4425 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4426 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4428 2008-07-14 Pavel Roskin <proski@gnu.org>
4430 * kern/env.c (grub_register_variable_hook): Don't copy empty
4431 string, it leaks memory. Pass "" to grub_env_set(), it should
4432 handle constant strings.
4434 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4435 * commands/cmp.c (grub_cmd_cmp): Likewise.
4436 * kern/dl.c (grub_dl_flush_cache): Likewise.
4437 (grub_dl_load_core): Likewise.
4438 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4439 (grub_elf64_load_phdrs): Likewise.
4441 2008-07-13 Pavel Roskin <proski@gnu.org>
4443 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4444 between signed and unsigned.
4445 (LzmaEnc_Finish): Fix warning about an unused parameter.
4447 2008-07-13 Bean <bean123ch@gmail.com>
4449 * Makefile.in (enable_lzo): New rule.
4451 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
4453 * configure.ac (ENABLE_LZO): New option --enable-lzo.
4455 * boot/i386/pc/lnxboot.S: #include <config.h>.
4457 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
4458 its value according to the compression algorithm used, lzo or lzma.
4460 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
4461 compression algorithm according to configure macro.
4463 * kern/i386/pc/startup.S (codestart): Likewise.
4465 * kern/i386/pc/lzma_decode.S: New file.
4467 * include/grub/lib/LzFind.h: Likewise.
4469 * include/grub/lib/LzHash.h: Likewise.
4471 * include/grub/lib/LzmaDec.h: Likewise.
4473 * include/grub/lib/LzmaEnc.h: Likewise.
4475 * include/grub/lib/LzmaTypes.h: Likewise.
4477 * lib/LzFind.c: Likewise.
4479 * lib/LzmaDec.c: Likewise.
4481 * lib/LzmaEnc.c: Likewise.
4483 2008-07-13 Bean <bean123ch@gmail.com>
4485 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
4486 (grub_ext4_extent_header): New structure.
4487 (grub_ext4_extent): Likewise.
4488 (grub_ext4_extent_idx): Likewise.
4489 (grub_ext4_find_leaf): New function.
4490 (grub_ext2_read_block): Handle extents.
4492 2008-07-12 Robert Millan <rmh@aybabtu.com>
4494 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
4496 2008-07-11 Robert Millan <rmh@aybabtu.com>
4498 * util/grub.d/40_custom.in: New file. Example on how to add custom
4499 entries to /etc/grub.d.
4500 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
4501 40_custom (implicitly, by merging all the grub.d rules).
4503 2008-07-11 Pavel Roskin <proski@gnu.org>
4505 * commands/read.c (grub_getline): Fix invalid memory access.
4506 Don't add newline to the variable value.
4508 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4509 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4510 (serial_hw_get_port): Check validity of the port number.
4511 (grub_cmd_serial): Check return value of serial_hw_get_port().
4513 2008-07-07 Pavel Roskin <proski@gnu.org>
4515 * boot/i386/pc/diskboot.S (notification_string): Replace
4516 "Loading kernel" with just "loading". This is shorter, less
4517 confusing and saves a few bytes for possible future changes.
4519 2008-07-05 Pavel Roskin <proski@gnu.org>
4521 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4522 size for ATAPI devices, they are undefined. Output sector
4523 number in decimal form.
4525 * disk/ata.c: Use named constants for status bits.
4527 2008-07-04 Pavel Roskin <proski@gnu.org>
4529 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4530 grub_addr_t before casting it to the void pointer to fix a
4531 warning. Non-addressable regions are discarded earlier.
4532 (grub_arch_modules_addr): Cast _end to grub_addr_t.
4533 * kern/i386/linuxbios/table.c: Include grub/misc.h.
4534 (check_signature): Don't shadow table_header.
4535 (grub_linuxbios_table_iterate): Cast numeric constants to
4536 grub_linuxbios_table_header_t.
4537 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4540 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4543 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4544 pointer, which can cause warnings. Support 64-bit addresses.
4546 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4547 of sizeof(long). This fixes PowerPC image generation on x86_64.
4549 2008-07-04 Robert Millan <rmh@aybabtu.com>
4551 This fixes a performance issue when pc & gpt partmap iterators
4552 didn't abort iteration even after our hook found what it was
4553 looking for (often causing expensive probes of non-existent drives).
4555 Some callers relied on previous buggy behaviour, since they would
4556 raise an error when their own hooks caused early abortion of its
4559 * kern/device.c (grub_device_open): Improve error message.
4560 * disk/lvm.c (grub_lvm_open): Likewise.
4561 * disk/raid.c (grub_raid_open): Likewise.
4563 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4564 when hook requests it, independently of grub_errno.
4565 (pc_partition_map_probe): Do not fail when find_func() caused
4566 early abortion of pc_partition_map_iterate().
4568 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4569 when hook requests it, independently of grub_errno.
4570 (gpt_partition_map_probe): Do not fail when find_func() caused
4571 early abortion of gpt_partition_map_iterate().
4573 * kern/partition.c (grub_partition_iterate): Abort parent iteration
4574 when hook requests it, independently of grub_errno. Do not fail when
4575 part_map_iterate_hook() caused early abortion of p->iterate().
4577 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4578 when grub_partition_iterate() returned with non-zero.
4580 2008-07-03 Pavel Roskin <proski@gnu.org>
4582 * disk/ata.c (grub_ata_pio_write): Check status before writing,
4583 like we do in grub_ata_pio_read().
4584 (grub_ata_readwrite): Always write individual sectors. Fix the
4585 sector count for the remainder.
4586 (grub_ata_write): Enable writing to ATA devices. Correctly
4587 report error for ATAPI devices.
4589 2008-07-02 Pavel Roskin <proski@gnu.org>
4591 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4594 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4595 for every read sector, we already increment it for the whole
4596 batch. This fixes reading more than 256 sectors at once.
4598 * util/grub-editenv.c (cmd_info): Cast argument to long
4599 explicitly. ptrdiff_t reduces to int on i386.
4601 * util/grub-editenv.c (main): Be specific which parameter is
4604 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4605 (memdisk): Make memdisk_orig_addr a pointer.
4607 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4608 for file offsets, use grub_off_t instead. Fix printf format
4611 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4612 there. Real unexpected warnings should not drown in the noise
4613 about known problems.
4615 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4616 grub_disk_addr_t for memory addresses.
4618 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4619 explicitly to fix a warning.
4621 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4623 * Makefile.in (MODULE_LDFLAGS): New variable.
4624 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
4625 the linker accepts --build-id=none.
4626 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
4628 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4630 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4631 those in Linux XFS code. Provide a way to access 64-bit parent
4633 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
4634 the end of struct grub_xfs_dir_header.
4636 2008-07-02 Bean <bean123ch@gmail.com>
4638 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4639 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4640 and GRUB_IEEE1275_FLAG_NO_ANSI.
4642 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4643 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4644 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4646 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4647 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4649 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4650 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4652 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4653 esc sequence on non ANSI terminal.
4654 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4656 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4659 2008-07-02 Bean <bean123ch@gmail.com>
4661 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4662 (grub_editenv_SOURCES): New variable.
4663 (pkglib_MODULES): Add loadenv.mod.
4664 (loadenv_mod_SOURCES): New variable.
4665 (loadenv_mod_CFLAGS): Likewise.
4666 (loadenv_mod_LDFLAGS): Likewise.
4668 * include/grub/envblk.h: New file.
4670 * util/envblk.c: New file.
4672 * util/grub-editenv.c: New file.
4674 * commands/loadenv.c: New file.
4676 2008-07-01 Pavel Roskin <proski@gnu.org>
4678 * include/multiboot2.h (struct multiboot_tag_module): Use char,
4679 not unsigned char. This fixes warnings and is consistent with
4682 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4684 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4686 * term/tparm.c (analyze): Always set *popcount.
4688 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4689 cast to fix a warning.
4691 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4692 cast to suppress a warning.
4694 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4695 grub_fshelp_read_file() expects.
4697 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4698 write uuid as a 32-bit value in CPU byte order, so declare and
4701 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4702 long if the format specifier expects it.
4703 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4704 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4705 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4706 long to fix a warning.
4707 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4708 grub_dprintf() arguments to fix warnings.
4710 2008-06-30 Pavel Roskin <proski@gnu.org>
4712 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4713 install_bsd_part immediately before core.img is embedded or
4714 modified on disk. This fixes core.img verification if core.img
4717 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4718 core_path to calculate the blocklist.
4719 Patch from Javier MartÃn <lordhabbit@gmail.com>
4721 2008-06-29 Robert Millan <rmh@aybabtu.com>
4723 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4724 block to disk block.
4725 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4726 Patch from Niels Böhm <bitbucket@arcor.de>
4728 2008-06-29 Robert Millan <rmh@aybabtu.com>
4730 * util/update-grub_lib.in (font_path): Search for fonts in
4731 /boot/grub first, which is more likely to be readable (we aren't
4732 deciding where fonts live, just looking for them).
4734 2008-06-26 Pavel Roskin <proski@gnu.org>
4736 * util/biosdisk.c (read_device_map): Don't leave dead map
4737 entries for devices failing stat() check.
4739 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4740 core_path_dev for the core.img path on the target device.
4742 2008-06-26 Robert Millan <rmh@aybabtu.com>
4744 * disk/fs_uuid.c: New file.
4745 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4746 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4747 (fs_uuid_mod_LDFLAGS): New variables.
4748 * include/grub/disk.h (grub_disk_dev_id): Add
4749 `GRUB_DISK_DEVICE_UUID_ID'.
4750 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4751 implement iterate().
4753 2008-06-26 Robert Millan <rmh@aybabtu.com>
4755 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4756 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4757 Linux image includes no initrd.
4759 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
4761 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4762 call to resolve the core image location that effectively appended the
4765 2008-06-21 Robert Millan <rmh@aybabtu.com>
4767 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4770 * util/grub.d/10_hurd.in: ... to here ...
4771 * util/grub.d/10_linux.in: ... and here.
4773 2008-06-19 Robert Millan <rmh@aybabtu.com>
4775 * kern/main.c (grub_main): Export `prefix' variable immediately
4776 after it has been set by grub_machine_set_prefix().
4778 2008-06-19 Robert Millan <rmh@aybabtu.com>
4780 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4781 search result when not saving to variable, not the other way around.
4782 When saving to variable, abort iteration as soon as a match is found.
4784 2008-06-19 Robert Millan <rmh@aybabtu.com>
4786 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4787 check for partition that provides /boot/grub. Its logic is flawed,
4788 as it prevents prepare_grub_to_access_device() from being called
4791 2008-06-19 Robert Millan <rmh@aybabtu.com>
4793 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4794 "insmod" command directly when abstraction modules are needed,
4795 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4796 since it had already been processed).
4798 2008-06-19 Pavel Roskin <proski@gnu.org>
4800 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4801 changed. This is needed in case GRUB_LIBDIR changes.
4802 * conf/i386-ieee1275.rmk: Likewise.
4803 * conf/i386-linuxbios.rmk: Likewise.
4804 * conf/i386-pc.rmk: Likewise.
4805 * conf/powerpc-ieee1275.rmk: Likewise.
4807 2008-06-18 Pavel Roskin <proski@gnu.org>
4809 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4810 kernel_elf_symlist.c to symlist.c for consistency with other
4811 architectures. Update all users.
4812 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4814 2008-06-18 Robert Millan <rmh@aybabtu.com>
4816 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4819 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4820 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4821 a RAID device, run setup() for all members independently on whether
4822 LVM abstraction is being used.
4823 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4824 If grub-mkimage has set `*install_dos_part == -2', don't override this
4826 Perform *install_dos_part adjustments independently on whether
4827 we're embedding or not.
4828 Clarify error message when image is too big for embedding.
4829 Remove duplicate *install_dos_part stanza.
4831 2008-06-17 Robert Millan <rmh@aybabtu.com>
4833 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4834 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4836 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4837 values in grub_ofconsole_normal_color and
4838 grub_ofconsole_highlight_color (they're not directly related to
4839 background and foreground).
4840 (grub_ofconsole_setcolorstate): Extract background and foreground
4841 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4843 2008-06-17 Robert Millan <rmh@aybabtu.com>
4845 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4846 /boot/grub for the check in last commit, not /boot (they could be
4847 different partitions).
4849 2008-06-16 Robert Millan <rmh@aybabtu.com>
4851 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4852 asked to setup access for the same partition that provides /boot,
4853 don't bother using UUIDs since our root already has the value we
4856 2008-06-16 Robert Millan <rmh@aybabtu.com>
4858 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4860 Patch from Sven Mueller <sven@debian.org>.
4862 2008-06-16 Robert Millan <rmh@aybabtu.com>
4864 * util/update-grub.in: Check for $EUID instead of $UID.
4865 Reported by Vincent Zweije.
4867 2008-06-16 Bean <bean123ch@gmail.com>
4869 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
4870 (grub_ext2_read_block): Likewise.
4871 (grub_ext2_read_inode): Likewise.
4872 (grub_ext2_mount): Likewise.
4873 (grub_ext2_close): Likewise.
4874 (grub_ext3_get_journal): Removed.
4876 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
4877 (grub_reiserfs_read_symlink): Likewise.
4878 (grub_reiserfs_mount): Likewise.
4879 (grub_reiserfs_open): Likewise.
4880 (grub_reiserfs_read): Likewise.
4881 (grub_reiserfs_close): Likewise.
4882 (grub_reiserfs_get_journal): Removed.
4884 * fs/fshelp.c (grub_fshelp_read): Removed.
4885 (grub_fshelp_map_block): Likewise.
4887 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4888 (grub_fshelp_journal): Likewise.
4889 (grub_fshelp_read): Likewise.
4890 (grub_fshelp_map_block): Likewise.
4892 2008-06-16 Pavel Roskin <proski@gnu.org>
4894 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4895 floating point anymore.
4896 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4898 2008-06-15 Pavel Roskin <proski@gnu.org>
4900 * commands/ls.c (grub_ls_list_files): Use integer calculations
4901 for human readable format, avoid floating point use.
4902 * kern/misc.c (grub_ftoa): Remove.
4903 (grub_vsprintf): Remove floating point support.
4905 2008-06-15 Robert Millan <rmh@aybabtu.com>
4907 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
4909 Reported by Max Vozeler.
4911 2008-06-15 Robert Millan <rmh@aybabtu.com>
4913 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4914 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4916 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4917 the beginning of the prefix.
4919 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4920 It is assumed that if we have a memdisk, grub-mkimage has set
4921 grub_prefix to include the "(memdisk)" drive in it.
4923 2008-06-15 Robert Millan <rmh@aybabtu.com>
4925 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4926 Initialize keyboard controller after registering the terminal, so that
4927 grub_printf() can be called from grub_keyboard_controller_init().
4929 2008-06-15 Robert Millan <rmh@aybabtu.com>
4931 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4932 extent-btree which is written as big endian on disk.
4933 Reported by Alain Greppin <al@chilibi.org>.
4935 2008-06-14 Robert Millan <rmh@aybabtu.com>
4937 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4938 * util/i386/pc/grub-install.in (modules): Likewise.
4940 2008-06-13 Pavel Roskin <proski@gnu.org>
4942 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4944 2008-06-13 Bean <bean123ch@gmail.com>
4946 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4948 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4950 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4951 to indicate sparse block.
4953 2008-06-12 Pavel Roskin <proski@gnu.org>
4955 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4956 number, grub_fshelp_read() does it for us.
4958 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4959 linear disk read with journal translation.
4960 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4961 * include/grub/fshelp.h: Declare grub_fshelp_read().
4963 2008-06-09 Pavel Roskin <proski@gnu.org>
4965 * fs/minix.c (grub_minix_mount): Handle error reading
4968 2008-06-08 Robert Millan <rmh@aybabtu.com>
4970 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4971 don't append the RAID prefix afterwards.
4972 Reported by Clint Adams.
4974 2008-06-08 Robert Millan <rmh@aybabtu.com>
4976 Based on description from Pavel:
4977 * kern/disk.c (grub_disk_check_range): Rename to ...
4978 (grub_disk_adjust_range): ... this. Add a comment explaining the
4979 tasks performed by this function.
4981 2008-06-08 Robert Millan <rmh@aybabtu.com>
4983 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4984 `num_serial' (for consistency with other variables).
4985 (struct grub_ntfs_data): Add `uuid' member.
4986 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4987 (grub_ntfs_uuid): New function.
4988 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4990 2008-06-07 Pavel Roskin <proski@gnu.org>
4992 * util/biosdisk.c (open_device): Revert last change to the
4993 function, it broke installation. The sector needs to be
4994 different dependent on which device is opened.
4996 2008-06-06 Robert Millan <rmh@aybabtu.com>
4998 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4999 rest of GRUB, and breakage doesn't happen if its value were modified.
5001 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5002 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5003 a constant (same value).
5004 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5005 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5007 2008-06-06 Robert Millan <rmh@aybabtu.com>
5009 * util/biosdisk.c (open_device): Do not modify sector offset when
5010 accessing a partition. kern/disk.c already handles this for us.
5012 2008-06-06 Robert Millan <rmh@aybabtu.com>
5014 * util/grub-emu.c (grub_machine_init): Move code in this function from
5016 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5017 segfault in case grub_printf() is called).
5019 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5020 grub_probe. Update all users not to explicitly add it again.
5021 (grub_device): New variable; contains corresponding device for grubdir.
5022 (fs_module, partmap_module, devabstraction_module): Pass
5023 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5026 2008-06-05 Robert Millan <rmh@aybabtu.com>
5028 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5029 is found, print it (same layout as with labels).
5031 2008-06-04 Robert Millan <rmh@aybabtu.com>
5033 * util/biosdisk.c (get_drive): Rename to ...
5034 (find_grub_drive): ... this. Update all users.
5036 (get_os_disk): Rename to ...
5037 (convert_system_partition_to_system_disk): ... this. Update all users.
5039 (find_drive): Rename to ...
5040 (find_system_device): ... this. Update all users.
5042 2008-06-04 Robert Millan <rmh@aybabtu.com>
5044 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5045 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5046 (make_device_map): Likewise.
5048 2008-06-01 Robert Millan <rmh@aybabtu.com>
5050 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5051 before dereferencing it.
5053 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5054 union with fat12/fat16-specific ones. Add some new fields, including
5055 `num_serial' for both versions.
5056 (struct grub_fat_data): Add `uuid' member.
5057 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5058 names. Initialize `data->uuid' using `num_serial'.
5059 (grub_fat_uuid): New function.
5060 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5062 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5063 (grub_reiserfs_uuid): New function.
5064 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5067 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5068 (grub_xfs_uuid): New function.
5069 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5071 2008-06-01 Robert Millan <rmh@aybabtu.com>
5073 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5074 code that is backward compatible with pre-uuid search command.
5076 2008-05-31 Robert Millan <rmh@aybabtu.com>
5078 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5079 floppies after everything else, to ensure floppy drive isn't accessed
5080 unnecessarily (patch from Bean).
5082 2008-05-31 Robert Millan <rmh@aybabtu.com>
5084 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5085 not print device names when we were asked to set a variable.
5087 2008-05-31 Robert Millan <rmh@aybabtu.com>
5089 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5090 using "cursor-on" and "cursor-off" commands (understood at least by
5091 the Open Firmware flavour on OLPC).
5093 2008-05-31 Michael Gorven <michael@gorven.za.net>
5095 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5096 on and off sequences.
5098 2008-05-31 Robert Millan <rmh@aybabtu.com>
5100 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5101 * util/update-grub.in: Likewise.
5103 2008-05-30 Pavel Roskin <proski@gnu.org>
5105 * util/biosdisk.c (linux_find_partition): Simplify logic and
5106 make the code more universal. Keep special processing for
5107 devfs, but use a simple rule for all other devices. If the
5108 device ends with a number, append 'p' and the partition number.
5109 Otherwise, append only the partition number.
5111 2008-05-30 Robert Millan <rmh@aybabtu.com>
5113 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5114 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5115 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5116 the `root' parameter to Linux.
5118 2008-05-30 Robert Millan <rmh@aybabtu.com>
5120 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5121 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5122 --fs_uuid with --fs-uuid.
5123 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5124 all filesystems support them).
5126 2008-05-30 Robert Millan <rmh@aybabtu.com>
5128 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
5129 grub_printf() flags, since we're printing in units of 2 bytes.
5131 2008-05-30 Robert Millan <rmh@aybabtu.com>
5133 * util/grub.d/00_header.in: Remove obsolete comment referencing
5134 convert_system_path_to_grub_path().
5135 * util/update-grub.in: Likewise.
5136 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5137 (convert_system_path_to_grub_path): Add a warning message explaining
5138 that this function is deprecated. Rely on is_path_readable_by_grub()
5139 for the readability checks.
5140 (font_path): Use is_path_readable_by_grub() for the readability
5141 check rather than convert_system_path_to_grub_path().
5143 2008-05-30 Robert Millan <rmh@aybabtu.com>
5145 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5146 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5147 converting it first.
5148 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5149 grub.cfg for access to font file, and afterwards call it again to set
5152 2008-05-30 Robert Millan <rmh@aybabtu.com>
5154 * commands/search.c (options): Add --fs_uuid option.
5155 (search_fs_uuid): New function.
5156 (grub_cmd_search): Fix --set argument passing.
5157 Use search_fs_uuid() when requested via --fs_uuid.
5158 (grub_search_init): Update help message.
5159 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5160 and redeclare it as an array of 16-bit words.
5161 (grub_ext2_uuid): New function.
5162 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5163 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5164 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5165 (GRUB_DEVICE_BOOT_UUID): New variables.
5166 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5167 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5169 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
5170 just assume `root' variable has the right value.
5171 * util/grub.d/10_linux.in: Likewise.
5172 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5174 (main): Recognise `-t fs_uuid' argument.
5176 2008-05-30 Robert Millan <rmh@aybabtu.com>
5178 * util/biosdisk.c (map): Redefine structure to hold information
5179 about GRUB drive name.
5180 (get_drive): Reimplement without assuming (and verifying) BIOS-like
5182 (call_hook): Remove.
5183 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5184 member. Assume drive has partitions.
5185 (grub_util_biosdisk_open): Access device names via `.device' struct
5187 (open_device): Likewise.
5188 (find_drive): Likewise.
5189 (read_device_map): Adjust map[] usage to match the new struct
5190 definition. Don't check for duplicates (still possible, but not cheap
5192 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5193 (make_device_name): Remove assumption of BIOS-like drive names.
5195 2008-05-30 Pavel Roskin <proski@gnu.org>
5197 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5198 compiling execute.c doesn't need grub_script.tab.h anymore.
5199 (normal/command.c_DEPENDENCIES): Likewise.
5200 (normal/function.c_DEPENDENCIES): Likewise.
5201 * conf/i386-ieee1275.rmk: Likewise.
5202 * conf/i386-linuxbios.rmk: Likewise.
5203 * conf/i386-pc.rmk: Likewise.
5204 * conf/powerpc-ieee1275.rmk: Likewise.
5205 * conf/sparc64-ieee1275.rmk: Likewise.
5207 2008-05-29 Pavel Roskin <proski@gnu.org>
5209 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5210 when scanning metadata for volume group name.
5212 * include/grub/script.h: Don't include grub_script.tab.h. It's
5213 a generated file, which may only be included from the files with
5214 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
5215 use union YYSTYPE, as the later allows forward declaration.
5216 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5218 2008-05-29 Robert Millan <rmh@aybabtu.com>
5220 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5221 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5222 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5223 (grub_console_checkkey): Add grub_dprintf() call to report unknown
5226 2008-05-29 Robert Millan <rmh@aybabtu.com>
5228 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5229 control key combinations.
5231 2008-05-29 Robert Millan <rmh@aybabtu.com>
5233 * util/powerpc/ieee1275/grub-install.in: Move from here ...
5234 * util/ieee1275/grub-install.in: ... to here.
5235 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5236 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5237 (grub_install_SOURCES): Likewise.
5239 2008-05-29 Robert Millan <rmh@aybabtu.com>
5241 * fs/affs.c: Update copyright year.
5242 * fs/ext2.c: Likewise.
5243 * fs/fshelp.c: Likewise.
5244 * fs/hfsplus.c: Likewise.
5245 * fs/ntfs.c: Likewise.
5246 * fs/xfs.c: Likewise.
5247 * include/grub/fshelp.h: Likewise.
5248 * util/grub-mkdevicemap.c: Likewise.
5250 2008-05-28 Robert Millan <rmh@aybabtu.com>
5252 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5253 might need to be fatfs to support some firmware implementations
5256 2008-05-28 Robert Millan <rmh@aybabtu.com>
5258 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5260 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5261 (make_device_map): Likewise.
5263 2008-05-20 Bean <bean123ch@gmail.com>
5265 * fs/fshelp.c (grub_fshelp_map_block): New function.
5266 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5267 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5269 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5270 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5271 (grub_fshelp_journal): New structure.
5272 (grub_fshelp_map_block): New function prototype.
5273 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5274 (grub_fshelp_map_block): Likewise.
5276 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5277 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5278 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5279 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5280 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5281 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5282 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5283 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5284 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5285 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5286 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5287 (grub_ext2_sblock): New members for journal support.
5288 (grub_ext3_journal_header): New structure.
5289 (grub_ext3_journal_revoke_header): Likewise.
5290 (grub_ext3_journal_block_tag): Likewise.
5291 (grub_ext3_journal_sblock): Likewise.
5292 (grub_fshelp_node): New members logfile and journal.
5293 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5294 grub_fshelp_map_block to get real block number.
5295 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5297 (grub_ext2_read_inode): Likewise.
5298 (grub_ext3_get_journal): New function.
5299 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5300 (grub_ext2_close): Release memory used by journal.
5302 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5303 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5304 (grub_reiserfs_transaction_header): Renamed to
5305 grub_reiserfs_description_block, replace field data with real_blocks.
5306 (grub_reiserfs_commit_block): New structure.
5307 (grub_reiserfs_data): New member journal.
5308 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5310 (grub_reiserfs_read_symlink): Likewise.
5311 (grub_reiserfs_iterate_dir): Likewise.
5312 (grub_reiserfs_open): Likewise.
5313 (grub_reiserfs_read): Likewise.
5314 (grub_reiserfs_get_journal): New function.
5315 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5316 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5317 using grub_reiserfs_get_journal.
5318 (grub_reiserfs_close): Release memory used by journal.
5320 * fs/affs.c (grub_affs_read_block): Change block type to
5321 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5323 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5325 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5327 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5329 * fs/udf.c (grub_udf_read_block): Change block type to
5330 grub_disk_addr_t. Use type cast to avoid warning.
5332 * fs/xfs.c (grub_xfs_read_block): Likewise.
5334 2008-05-16 Christian Franke <franke@computer.org>
5336 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5337 to ensure that break with ESC will always work.
5338 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5339 Remove ESC from keyboard queue.
5341 2008-05-16 Christian Franke <franke@computer.org>
5343 * util/biosdisk.c: [__CYGWIN__] Add includes.
5344 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5345 (get_os_disk): Move variable declarations to OS specific
5346 parts to avoid warning.
5347 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5348 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5349 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5351 * util/getroot.c: [__CYGWIN__] Add includes.
5352 (strip_extra_slashes): Fix "/" case.
5353 [__CYGWIN__] (get_win32_path): New function.
5354 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5355 [__CYGWIN__] (find_root_device): Disable.
5356 [__CYGWIN__] (get_bootsec_serial): New function.
5357 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5358 [__linux__] (grub_guess_root_device): Add early returns to simplify
5360 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5361 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5362 check for Linux only.
5364 2008-05-15 Bean <bean123ch@gmail.com>
5366 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5367 keyboard hang problem in apple's intel mac.
5369 2008-05-09 Robert Millan <rmh@aybabtu.com>
5371 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5373 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5374 (make_device_map): Likewise.
5375 Reported by Aurelien Jarno <aurel32@debian.org>
5377 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
5379 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5380 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5381 (make_device_map): Output entries for xvd type disks.
5383 2008-05-07 Robert Millan <rmh@aybabtu.com>
5385 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5387 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5388 (make_device_map): Likewise.
5389 Reported by Roland Dreier <rdreier@cisco.com>
5391 2008-05-07 Robert Millan <rmh@aybabtu.com>
5393 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5394 grub_strstr() call. Correct a few mistakes in failure path handling.
5396 2008-05-06 Robert Millan <rmh@aybabtu.com>
5398 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5399 Do not print a trailing slash (therefore, the root directory is an
5401 (convert_system_path_to_grub_path): Do not remove trailing slash
5402 from make_system_path_relative_to_its_root() output.
5404 * util/i386/pc/grub-install.in: Add trailing slash to output from
5405 make_system_path_relative_to_its_root().
5407 2008-05-06 Robert Millan <rmh@aybabtu.com>
5409 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5410 ensures that output lines aren't intermangled with those sent to
5411 stderr (via grub_util_info()).
5412 * util/grub-probe.c (grub_refresh): Likewise.
5413 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5415 2008-05-05 Christian Franke <franke@computer.org>
5417 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5418 Add Cygwin device names.
5419 (get_ide_disk_name) [__CYGWIN__]: Likewise.
5420 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5421 (check_device): Return error instead of success on empty name.
5422 (make_device_map): Move label inside linux specific code to
5423 prevent compiler warning.
5425 2008-04-30 Robert Millan <rmh@aybabtu.com>
5427 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5428 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5430 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5432 2008-04-29 Robert Millan <rmh@aybabtu.com>
5434 * docs/grub.cfg: New file (example GRUB configuration).
5436 2008-04-26 Robert Millan <rmh@aybabtu.com>
5438 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
5439 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5440 and `disk/ieee1275/nand.c'.
5442 2008-04-25 Bean <bean123ch@gmail.com>
5444 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5447 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5448 change the buffer size to 4096 for cdrom device.
5450 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
5452 (_linux_mod_SOURCES): New variable.
5453 (_linux_mod_CFLAGS): Likewise.
5454 (_linux_mod_LDFLAGS): Likewise.
5455 (linux_mod_SOURCES): Likewise.
5456 (linux_mod_CFLAGS): Likewise.
5457 (linux_mod_LDFLAGS): Likewise.
5458 (nand_mod_SOURCES): Likewise.
5459 (nand_mod_CFLAGS): Likewise.
5460 (nand_mod_LDFLAGS): Likewise.
5462 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
5463 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
5464 type property. (nand device in olpc don't have this property)
5466 * include/grub/disk.h (grub_disk_dev_id): New macro
5467 GRUB_DISK_DEVICE_NAND_ID.
5469 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
5471 (grub_rescue_cmd_initrd): Likewise.
5473 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
5474 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
5475 ofw_cif_handler and ofw_idt, adjust padding number.
5477 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
5478 GRUB_MACHINE_IEEE1275 is defined.
5480 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
5481 Use NESTED_FUNC_ATTR attribute on the hook parameter.
5483 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
5484 on nested function heap_init.
5485 (grub_upper_mem): New variable for i386-ieee1275.
5486 (grub_get_extended_memory): New function for i386-ieee1275.
5487 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
5489 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
5490 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
5493 * loader/i386/ieee1275/linux.c: New file.
5495 * loader/i386/ieee1275/linux_normal.c: New file.
5497 * disk/ieee1275/nand.c: New file.
5499 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
5501 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
5503 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
5505 2008-04-18 Robert Millan <rmh@aybabtu.com>
5507 Restructures early code path on ieee1275 to unify grub_main() as
5508 the first C function that is executed in every platform.
5510 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5511 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5513 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5514 * kern/ieee1275/cmain.c (cmain): Rename to ...
5515 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5516 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5519 2008-04-18 Robert Millan <rmh@aybabtu.com>
5521 * util/update-grub.in: Fix syntax error when setting
5522 `GRUB_PRELOAD_MODULES'.
5523 Reported by Stephane Chazelas <stephane@artesyncp.com>
5525 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
5527 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5528 section into account, newer toolchains generate unique build ids
5529 * configure.ac: remove the test for --build-id=none acceptance,
5530 we want build ids to be preserved
5531 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5532 far from other sections don't cause the raw binary images grow
5535 2008-04-15 Robert Millan <rmh@aybabtu.com>
5537 * disk/lvm.c: Update copyright year.
5538 * kern/misc.c: Likewise.
5540 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5542 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5543 there is no memory left for physical volume name.
5545 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5547 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5548 volume name mapping to support bigger than 9 character names properly.
5550 2008-04-13 Robert Millan <rmh@aybabtu.com>
5552 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5553 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5555 2008-04-13 Christian Franke <franke@computer.org>
5557 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5558 to create a floppy emulation boot CD when non emulation mode
5560 Enable Joliet CD filesystem extension.
5562 2008-04-13 Robert Millan <rmh@aybabtu.com>
5564 * kern/misc.c (grub_strncat): Fix off-by-one error.
5565 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5567 * kern/env.c (grub_env_context_close): Clear current context, not
5569 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5571 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5573 2008-04-13 Robert Millan <rmh@aybabtu.com>
5575 Improve robustness when handling LVM.
5577 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5578 (and leave `*p' unmodified).
5579 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5581 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5582 iterating through it.
5583 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5585 (grub_lvm_scan_device): Check the return value (and fail gracefully
5586 when due) on each grub_lvm_getvalue() or grub_strstr() call.
5587 Don't assume `vg->pvs != NULL' when iterating through it.
5589 2008-04-13 Robert Millan <rmh@aybabtu.com>
5591 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5592 * genmk.rb (partmap): New variable.
5593 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5594 (#{partmap}): New target rule.
5595 * genpartmaplist.sh: New file.
5596 * Makefile.in (pkglib_DATA): Add partmap.lst.
5597 (partmap.lst): New target rule.
5598 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5599 modules (including all partition maps), instead of preloading them.
5601 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
5603 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5604 `linux-boot-prober' (if installed) to detect other operating
5605 systems which are installed on the computer and add them to
5607 * conf/common.rmk: Build and install 30_os-prober.
5609 2008-04-12 Robert Millan <rmh@aybabtu.com>
5611 * kern/powerpc/ieee1275/init.c: Move from here ...
5612 * kern/ieee1275/init.c: ... to here. Update all users.
5614 * kern/powerpc/ieee1275/cmain.c: Move from here ...
5615 * kern/ieee1275/cmain.c: ... to here. Update all users.
5617 * kern/powerpc/ieee1275/openfw.c: Move from here ...
5618 * kern/ieee1275/openfw.c: ... to here. Update all users.
5620 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5621 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
5623 2008-04-10 Pavel Roskin <proski@gnu.org>
5625 * configure.ac: Always use "_cv_" in cache variables for
5626 compatibility with Autoconf 2.62.
5628 2008-04-07 Robert Millan <rmh@aybabtu.com>
5630 Revert grub/machine/init.h addition by Pavel (since it breaks on
5631 i386-ieee1275 and others):
5632 * util/i386/pc/misc.c: Remove grub/machine/init.h.
5633 * util/powerpc/ieee1275/misc.c: Likewise.
5635 2008-04-07 Robert Millan <rmh@aybabtu.com>
5637 * util/grub-probe.c (probe): Improve error message.
5639 2008-04-07 Robert Millan <rmh@aybabtu.com>
5641 * util/biosdisk.c (read_device_map): Skip devices that don't exist
5642 (this prevents the presence of a bogus entry from ruining the whole
5645 2008-04-06 Pavel Roskin <proski@gnu.org>
5647 * util/biosdisk.c: Include grub/util/biosdisk.h.
5648 * util/grub-fstest.c (execute_command): Make static.
5649 * util/grub-mkdevicemap.c (check_device): Likewise.
5650 * util/i386/pc/misc.c: Include grub/machine/init.h.
5651 * util/powerpc/ieee1275/misc.c: Likewise.
5652 * util/lvm.c: Include grub/util/lvm.h.
5653 * util/misc.c: Include grub/kernel.h, grub/misc.h and
5655 * util/raid.c: Include grub/util/raid.h.
5656 (grub_util_getdiskname): Make static.
5658 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5659 grub_hostfs_fini(), as they are called from grub_init_all() and
5660 grub_fini_all() respectively. This fixes an infinite loop in
5661 grub-fstest due to double registration of hostfs.
5662 Reported by Christian Franke <Christian.Franke@t-online.de>
5664 2008-04-05 Pavel Roskin <proski@gnu.org>
5666 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5667 all 8 functions. Otherwise, probe function 0 only.
5669 2008-04-04 Pavel Roskin <proski@gnu.org>
5671 * commands/lspci.c (grub_lspci_iter): Print the bus number
5674 * commands/lspci.c (grub_pci_classes): Fix typos.
5675 (grub_lspci_iter): Don't print func twice. Print vendor ID
5676 before device ID, as it's normally done.
5678 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5679 Fix signedness warnings.
5680 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5682 * util/ieee1275/get_disk_name.c: Include config.h so that
5683 _GNU_SOURCE is defined and getline() is declared. Mark an
5684 unused argument as such. Fix a signedness warning.
5686 2008-04-02 Pavel Roskin <proski@gnu.org>
5688 * genkernsyms.sh.in: Use more robust assignments for CC and
5689 srcdir. Quote srcdir.
5690 * gensymlist.sh.in: Likewise. Assert at the compile time that
5691 the symbol table is not empty.
5693 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5694 * fs/cpio.c (grub_cpio_read): Likewise.
5696 2008-04-01 Pavel Roskin <proski@gnu.org>
5698 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5699 * disk/host.c (grub_host_open): Likewise.
5700 * disk/loopback.c (grub_loopback_open): Likewise.
5701 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5702 disk->id as in disk/host.c, not a multi-character constant.
5704 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5705 later is obsolete, potentially dangerous and sets a bad example.
5706 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5707 * util/misc.c (grub_util_get_image_size): Likewise.
5709 * disk/loopback.c (options): Improve help for "--partitions".
5711 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5712 options to align them with the short options, e.g. "echo -e".
5714 2008-03-31 Bean <bean123ch@gmail.com>
5716 * video/reader/png.c (grub_png_data): New member is_16bit and
5718 (grub_png_decode_image_header): Detect 16 bit png image.
5719 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5720 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5721 (grub_video_reader_png): Release memory occupied by image_data.
5723 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5725 (grub_nfs_mount): Skip the test for sector per cluster.
5727 * include/grub/ntfs.h (MAX_SPC): Removed.
5729 2008-03-31 Bean <bean123ch@gmail.com>
5731 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5732 (grub_probe_SOURCES): Add fs/afs.c.
5733 (grub_fstest_SOURCES): Likewise.
5734 (afs_mod_SOURCES): New variable.
5735 (afs_mod_CFLAGS): Likewise.
5736 (afs_mod_LDFLAGS): Likewise.
5738 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5739 (grub_emu_SOURCES): Likewise.
5741 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5743 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5745 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5747 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5749 * fs/afs.c: New file.
5751 2008-03-30 Pavel Roskin <proski@gnu.org>
5753 * disk/host.c: Include grub/misc.h to fix a warning.
5754 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5755 warnings about implicit declarations.
5757 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5759 * include/grub/i386/loader.h: Change declaration of
5760 grub_linux_boot() to match what grub_loader_set() expects.
5761 * util/getroot.c (grub_guess_root_device): Return const char* to
5763 * util/grub-probe.c (probe): Fix a warning about uninitialized
5764 abstraction_name variable.
5765 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5766 second argument as unused to fix a warning.
5768 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5769 missing grub_error() call.
5771 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5772 2.60 and newer uses it to define datadir.
5774 * commands/sleep.c: Fix warning about implicit declaration.
5775 * disk/memdisk.c: Likewise.
5776 * loader/aout.c: Likewise.
5777 * loader/i386/bsd_normal.c: Likewise.
5778 * util/grub-probe.c: Likewise.
5780 * commands/i386/cpuid.c (has_longmode): Make static.
5781 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5782 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5784 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5785 GDT. This is more robust, as %ds can change.
5786 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5787 calling real_to_prot().
5788 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5790 2008-03-28 Pavel Roskin <proski@gnu.org>
5792 * kern/i386/pc/startup.S: Assert that uncompressed functions
5793 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5794 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5795 code, as they push parts of the code (error handlers) beyond
5796 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5797 code as correctness and size.
5799 2008-03-28 Pavel Roskin <proski@gnu.org>
5801 * kern/i386/pc/startup.S
5802 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5803 data block address to the real mode, keep offset minimal. This
5804 works around a bug in AWARD BIOS on old Athlon systems, which
5805 makes CD detection hang.
5807 2008-03-26 Pavel Roskin <proski@gnu.org>
5809 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5811 * include/grub/normal.h: Add grub_parse_color_name_pair()
5814 2008-03-24 Bean <bean123ch@gmail.com>
5816 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5817 (cd_count): Removed.
5818 (cd_drive): New variable.
5819 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5820 (grub_biosdisk_call_hook): Likewise.
5821 (grub_biosdisk_iterate): Change cdrom detection method.
5822 (grub_biosdisk_open): Replace cd_start with cd_drive.
5823 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5824 detect cdrom device.
5826 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5828 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5829 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5830 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5831 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5832 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5833 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5834 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5835 (grub_biosdisk_cdrp): New structure.
5836 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5838 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5840 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5843 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5846 2008-03-20 Robert Millan <rmh@aybabtu.com>
5848 Remove 2 TiB limit in ata.mod.
5849 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5850 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5851 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5852 grub_uint64_t instead of grub_uint32_t.
5854 2008-03-05 Bean <bean123ch@gmail.com>
5856 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5857 (grub_multiboot): Set boot device.
5859 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5861 2008-03-02 Bean <bean123ch@gmail.com>
5863 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5866 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5868 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5871 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5874 * docs/fdl.texi: New file.
5876 * docs/mdate-sh: New file. Copied from gnulib.
5877 * docs/texinfo.tex: Likewise.
5879 * config.guess: Updated from gnulib.
5880 * install-sh: Likewise.
5882 2008-02-28 Robert Millan <rmh@aybabtu.com>
5884 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5885 (aout_mod_SOURCES): New variable.
5886 (aout_mod_CFLAGS): Likewise.
5887 (aout_mod_LDFLAGS): Likewise.
5889 * conf/i386-ieee1275.rmk: Likewise.
5891 2008-02-28 Robert Millan <rmh@aybabtu.com>
5893 * util/update-grub.in: Reorganise terminal validity check. Accept
5894 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5895 Based on suggestion by Franklin PIAT.
5897 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5899 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5901 * util/getroot.c (grub_util_check_block_device): New function that
5902 returns the given argument if it is a block device and returns NULL else.
5903 * util/grub-probe.c (argument_is_device): New variable.
5904 (probe): Promote device_name from a variable to an argument. Receive
5905 device_name from grub_util_check_block_device() if path is NULL and from
5906 grub_guess_root_device() else. Do not free() device_name anymore.
5907 (options): Introduce new parameter '-d, --device'.
5908 (main): Add description of the new parameter to the help screen.
5909 Rename path variable to argument. Set argument_is_device if the '-d'
5910 option is given. Pass argument to probe() depending on
5913 2008-02-24 Bean <bean123ch@gmail.com>
5915 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5916 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5917 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5918 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5919 (GRUB_ISO9660_VOLDESC_END): Likewise.
5920 (grub_iso9660_primary_voldesc): New member escape.
5921 (grub_iso9660_data): New member joliet.
5922 (grub_iso9660_convert_string): New function.
5923 (grub_iso9660_mount): Detect joliet extension.
5924 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5925 (grub_iso9660_iso9660_label): Likewise.
5927 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5928 (grub_setup_SOURCES): Add fs/udf.c.
5929 (grub_fstest_SOURCES): Likewise.
5930 (udf_mod_SOURCES): New variable.
5931 (udf_mod_CFLAGS): Likewise.
5932 (udf_mod_LDFLAGS): Likewise.
5934 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5935 (grub_emu_SOURCES): Likewise.
5937 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5939 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5941 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5943 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5945 * fs/udf.c: New file.
5947 2008-02-24 Robert Millan <rmh@aybabtu.com>
5949 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5950 (normal/lexer.c_DEPENDENCIES): New variables.
5951 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5952 (normal/lexer.c_DEPENDENCIES): Likewise.
5953 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5954 (normal/lexer.c_DEPENDENCIES): Likewise.
5955 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5956 (normal/lexer.c_DEPENDENCIES): Likewise.
5957 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5958 (normal/lexer.c_DEPENDENCIES): Likewise.
5959 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5960 (normal/lexer.c_DEPENDENCIES): Likewise.
5962 2008-02-23 Robert Millan <rmh@aybabtu.com>
5964 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5965 since they were intended to be in hex. This didn't break previously
5966 because of a bug in gpt_partition_map_iterate() (see below).
5968 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5969 when checking the validity of GPT header.
5970 Remove `partno', since it always provides the same information as `i'.
5972 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5974 * include/grub/efi/time.h: Fix a wrong comment.
5976 2008-02-19 Pavel Roskin <proski@gnu.org>
5978 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5981 2008-02-19 Bean <bean123ch@gmail.com>
5983 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5984 (aout_mod_SOURCES): New variable.
5985 (aout_mod_CFLAGS): Likewise.
5986 (aout_mod_LDFLAGS): Likewise.
5987 (_bsd_mod_SOURCES): New variable.
5988 (_bsd_mod_CFLAGS): Likewise.
5989 (_bsd_mod_LDFLAGS): Likewise.
5990 (bsd_mod_SOURCES): New variable.
5991 (bsd_mod_CFLAGS): Likewise.
5992 (bsd_mod_LDFLAGS): Likewise.
5994 * include/grub/aout.h: New file.
5996 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5998 * include/grub/i386/bsd.h: New file.
6000 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6003 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6004 function is called, so that it's possible to change it inside the hook.
6005 (grub_elf64_load): Likewise.
6006 (grub_elf_file): Don't close the file if elf header is not found.
6007 (grub_elf_close): Close the file if grub_elf_file fails (The new
6008 grub_elf_file won't close it).
6009 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6010 (grub_elf64_size): Likewise.
6012 * kern/i386/loader.S (grub_unix_real_boot): New function.
6014 * loader/aout.c: New file.
6016 * loader/i386/bsd.c: New file.
6018 * loader/i386/bsd_normal.c: New file.
6020 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6022 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
6023 can test other formats.
6025 2008-02-19 Robert Millan <rmh@aybabtu.com>
6027 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6028 (grub_gpt_partition_type_empty): Redefine with macro from
6029 `<grub/gpt_partition.h>'.
6030 (gpt_partition_map_iterate): Adjust partition type comparison.
6032 Export `entry' as partmap-specific `part.data' struct.
6033 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6035 * include/grub/gpt_partition.h (grub_gpt_header)
6036 (grub_gpt_partentry): ... to here (new file).
6038 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6040 (grub_gpt_partition_type_bios_boot): New const variable, defined
6041 with macro from `<grub/gpt_partition.h>'.
6043 (setup): Replace `first_start' with `embed_region', which keeps
6044 track of the embed region (and is partmap-agnostic).
6046 Replace find_first_partition_start() with find_usable_region(),
6047 which finds a usable region for embedding using partmap-specific
6048 knowledge (supports PC/MSDOS and GPT).
6050 Fix all assumptions that the embed region start at sector 1, using
6051 `embed_region.start' from now on. Similarly, use `embed_region.end'
6052 rather than `first_start' to calculate available size.
6054 In grub_util_info() message, replace "into after the MBR" with an
6055 indication of the specific sector our embed region starts at.
6057 2008-02-19 Robert Millan <rmh@aybabtu.com>
6059 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6060 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6061 `commands/reboot.c'.
6062 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6063 (halt_mod_SOURCES): Likewise.
6064 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6065 (halt_mod_SOURCES): Likewise.
6067 2008-02-17 Christian Franke <franke@computer.org>
6069 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6071 2008-02-17 Robert Millan <rmh@aybabtu.com>
6073 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6074 set `first_start' to 0 for non-PC/MSDOS partition maps.
6076 2008-02-16 Robert Millan <rmh@aybabtu.com>
6078 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6079 do not assume partition map is PC/MSDOS before performing checks that
6080 are specific to that layout.
6082 2008-02-13 Robert Millan <rmh@aybabtu.com>
6084 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6085 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6086 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6088 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6090 * configure.ac: Only a cosmetic change on the handling of
6091 -fno-stack-protector.
6093 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
6095 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6096 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6098 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6099 (halt_mod_SOURCES): New variable.
6100 (halt_mod_CFLAGS): Likewise.
6101 (halt_mod_LDFLAGS): Likewise.
6102 (reboot_mod_SOURCES): Likewise.
6103 (reboot_mod_CFLAGS): Likewise.
6104 (reboot_mod_LDFLAGS): Likewise.
6106 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6107 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6109 (halt_mod_SOURCES): Likewise.
6110 (reboot_mod_SOURCES): Likewise.
6112 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6113 commands/i386/pc/reboot.c by commands/reboot.c.
6114 (reboot_mod_SOURCES): Likewise.
6116 * commands/i386/pc/reboot.c: merge this file ...
6118 * commands/ieee1275/reboot.c: ... and this file ...
6120 * commands/reboot.c: ... to this file.
6121 Add some precompiler directive to include the correct header for
6124 * commands/ieee1275/halt.c: move this file ...
6126 * commands/halt.c: ... to here.
6127 Add some precompiler directive to include the correct header for
6130 * include/grub/efi/efi.h (grub_reboot): New function declaration.
6131 (grub_halt): Likewise.
6133 * kern/efi/efi.c (grub_reboot): New function.
6134 (grub_halt): Likewise.
6136 2008-02-12 Robert Millan <rmh@aybabtu.com>
6138 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6139 /dev (like it is done for /dev/mapper). This doesn't provide support
6140 for EVMS, but at least it is now easy to identify the problem when it
6143 2008-02-11 Robert Millan <rmh@aybabtu.com>
6145 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6146 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6147 comparing it with -1, not 0.
6149 2008-02-10 Robert Millan <rmh@aybabtu.com>
6151 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6154 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6156 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6157 `disk/lvm.c' to the end of the list.
6158 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6159 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6161 2008-02-10 Robert Millan <rmh@aybabtu.com>
6163 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
6164 grub_print_error() instead. This will let user know why we're entering
6166 Based on suggestions from Sam Morris.
6168 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
6170 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6171 on remaining N args, instead of "--" arg N times.
6173 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
6175 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6176 (fill_with_default_glyph): Changed to use unknown_glyph for fill
6177 pattern for unknown glyphs.
6179 2008-02-09 Robert Millan <rmh@aybabtu.com>
6181 * configure.ac: Probe for `help2man'.
6182 * Makefile.in (builddir): New variable.
6183 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6184 or otherwise add a few flags/options to it.
6185 (install-local): For every executable utility or script that is
6186 installed, invoke $(HELP2MAN) to install a manpage based on --help
6189 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6190 that it doesn't prevent --help from working in build tree.
6192 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6193 with `bug-grub@gnu.org'.
6194 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6195 * util/update-grub.in (usage): New function.
6196 Implement proper argument check, with support for --help and --version
6197 (as well as existing -y).
6199 2008-02-09 Christian Franke <franke@computer.org>
6201 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6202 avoid overwriting previous output.
6203 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6205 2008-02-09 Robert Millan <rmh@aybabtu.com>
6207 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6210 2008-02-09 Robert Millan <rmh@aybabtu.com>
6212 * commands/sleep.c: New file.
6213 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6214 (sleep_mod_SOURCES): New variable.
6215 (sleep_mod_CFLAGS): Likewise.
6216 (sleep_mod_LDFLAGS): Likewise.
6218 2008-02-09 Robert Millan <rmh@aybabtu.com>
6220 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6221 situations in which we can deduce the RAID size and the superblock
6224 2008-02-09 Robert Millan <rmh@aybabtu.com>
6226 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
6227 and return a grub_diskmemberlist_t composed of LVM physical volumes.
6228 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6230 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
6231 and return a grub_diskmemberlist_t composed of physical array members.
6232 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6234 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6236 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6237 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6238 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6240 * util/grub-probe.c (probe): Move partmap probing code from here ...
6241 (probe_partmap): ... to here.
6242 (probe): Use probe_partmap() once for the disk we're probing, and
6243 additionally, when such disk contains a memberlist() struct member,
6244 once for each disk that is contained in the structure returned by
6247 2008-02-09 Robert Millan <rmh@aybabtu.com>
6249 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6250 environment variable to 'all' in order to obtain debug output from
6252 * util/i386/pc/grub-setup.c (main): Likewise.
6254 2008-02-08 Robert Millan <rmh@aybabtu.com>
6256 * disk/raid.c (grub_raid_scan_device): Check for
6257 `array->device[sb.this_disk.number]' rather than for
6258 `array->device[sb.this_disk.number]->name', since the latter is not
6259 guaranteed to be accessible.
6261 2008-02-08 Robert Millan <rmh@aybabtu.com>
6263 * disk/raid.c: Update copyright.
6264 * fs/cpio.c: Likewise.
6265 * include/grub/raid.h: Likewise.
6266 * loader/i386/pc/multiboot.c: Likewise.
6267 * util/hostfs.c: Likewise.
6269 2008-02-08 Robert Millan <rmh@aybabtu.com>
6271 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6272 to a grub_disk_t array.
6273 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6275 (grub_raid_scan_device): Replace `device[x].name' accesses with
6276 `device[x]->name'. Simplify initialization of `array->device[x]'.
6278 2008-02-08 Robert Millan <rmh@aybabtu.com>
6280 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6281 grub_dprintf() calls.
6282 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6285 2008-02-07 Christian Franke <franke@computer.org>
6287 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6288 instead of fseek and ftell to support large files.
6289 (grub_hostfs_read): Likewise.
6291 2008-02-07 Robert Millan <rmh@aybabtu.com>
6293 Patch from Jeroen Dekkers.
6294 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
6295 failure, since successfully reading all array members might not be
6298 2008-02-06 Robert Millan <rmh@aybabtu.com>
6300 * util/grub-probe.c (probe): Simplify partmap probing (with the
6301 assumption that the first word up to the underscore equals to
6304 2008-02-06 Christian Franke <franke@computer.org>
6306 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6307 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6308 last block of a cpio or tar stream.
6309 Check for "TRAILER!!!" instead of any empty data
6310 block to detect last block of a cpio stream.
6311 (grub_cpio_dir): Fix constness of variable np.
6312 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6313 cpio or tar trailer is detected. This fixes a crash
6314 on open of a non existing file.
6316 2008-02-05 Bean <bean123ch@gmail.com>
6318 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6320 (grub_multiboot_load_elf64): Likewise.
6321 (grub_multiboot): Initialize mbi structure.
6323 * util/grub-fstest.c: Don't include unused header file script.h.
6325 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
6327 (grub_fstest_SOURCES): Likewise.
6329 2008-02-05 Robert Millan <rmh@aybabtu.com>
6331 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6332 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6333 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6334 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6336 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6337 (translation_table): Replace hardcoded values with macros
6338 provided by `<grub/term.h>'.
6340 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6341 (keyboard_map): Correct/add a few values, with macros provided
6343 (keyboard_map_shift): Zero values that don't differ from their
6344 `keyboard_map' equivalents.
6345 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6346 Discard the second scan code that is always sent by Caps lock.
6347 Only use `keyboard_map_shift' when it provides a non-zero value,
6348 otherwise fallback to `keyboard_map'.
6350 2008-02-04 Bean <bean123ch@gmail.com>
6352 * Makefile.in (enable_grub_fstest): New variable.
6354 * conf/common.rmk (grub_fstest_init.lst): New rule.
6355 (grub_fstest_init.h): Likewise.
6356 (grub_fstest_init.c): Likewise.
6357 (util/grub-fstest.c_DEPENDENCIES): New variable.
6358 (grub_fstest_SOURCES): Likewise.
6360 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6362 * util/grub-fstest.c: New file.
6364 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6366 Make grub-setup handle a separate root device.
6368 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6369 so that the root device can be compared with the destination
6371 When embedding the core image, if the root and destination devices
6372 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6374 When not embedding, set ROOT_DRIVE to 0xFF.
6376 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6378 Add support for having a grub directory in a different drive. This
6379 is still only the data handling part.
6381 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6382 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6383 (grub_root_drive): New variable.
6385 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6386 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6387 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6390 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6392 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6394 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6396 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6397 is bogus, because PXE booting does not specify any drive
6400 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6401 am not sure if this is really correct.
6403 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6404 is always identical to the boot drive when booting from a CD.
6406 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6408 (root_drive): New variable.
6409 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6410 (setup_sectors): Push %dx right after popping it, because %dh will
6412 (copy_buffer): Restore %dx.
6414 2008-02-03 Robert Millan <rmh@aybabtu.com>
6416 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6417 use `cdboot.img' for cdrom images.
6419 2008-02-03 Robert Millan <rmh@aybabtu.com>
6421 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6422 only setup gfxterm when `font' command has succeeded.
6424 2008-02-03 Robert Millan <rmh@aybabtu.com>
6426 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6427 (grub_rescue_cmd_multiboot_loader)
6428 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6430 2008-02-03 Pavel Roskin <proski@gnu.org>
6432 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
6433 %edx and %esi from stack only after grub_gate_a20() is called.
6434 grub_gate_a20() clobbers %edx.
6436 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6438 * configure.ac (AC_INIT): Bumped to 1.96.
6440 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6441 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6442 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6443 video/readers/png.c.
6445 2008-02-03 Bean <bean123ch@gmail.com>
6447 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6448 (cdboot_img_SOURCES): New variable.
6449 (cdboot_img_ASFLAGS): New variable.
6450 (cdboot_img_LDFLAGS): New variable.
6452 * boot/i386/pc/cdboot.S: New file.
6454 * disk/i386/pc/biosdisk.c (cd_start): New variable.
6455 (cd_count): Likewise.
6456 (grub_biosdisk_get_drive): Add support for cd device.
6457 (grub_biosdisk_call_hook): Likewise.
6458 (grub_biosdisk_iterate): Likewise.
6459 (grub_biosdisk_open): Likewise.
6460 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
6461 (grub_biosdisk_rw): Support reading from cd device.
6462 (GRUB_MOD_INIT): Iterate cd devices.
6464 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
6465 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
6466 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
6468 * kern/i386/pc/init.c (make_install_device): Check for cd device.
6470 2008-02-02 Robert Millan <rmh@aybabtu.com>
6472 * commands/read.c: New file.
6473 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
6474 (read_mod_SOURCES): New variable.
6475 (read_mod_CFLAGS): Likewise.
6476 (read_mod_LDFLAGS): Likewise.
6478 2008-02-02 Robert Millan <rmh@aybabtu.com>
6480 * normal/main.c (grub_normal_execute): Check for `menu->size' when
6481 determining whether menu has to be displayed.
6483 2008-02-02 Marco Gerards <marco@gnu.org>
6485 * bus/pci.c: New file.
6487 * include/grub/pci.h: Likewise.
6489 * include/grub/i386/pc/pci.h: Likewise.
6491 * commands/lspci.c: Likewise.
6493 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
6495 (pci_mod_SOURCES): New variable.
6496 (pci_mod_CFLAGS): Likewise.
6497 (pci_mod_LDFLAGS): Likewise.
6498 (lspci_mod_SOURCES): Likewise.
6499 (lspci_mod_CFLAGS): Likewise.
6500 (lspci_mod_LDFLAGS): Likewise.
6502 2008-02-02 Bean <bean123ch@gmail.com>
6504 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
6505 (grub_ufs_get_file_block): Fix indirect block calculation problem.
6507 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6508 (grub_xfs_btree_node): New structure.
6509 (grub_xfs_btree_root): New structure.
6510 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6511 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6512 (GRUB_XFS_EXTENT_BLOCK): Likewise.
6513 (GRUB_XFS_EXTENT_SIZE): Likewise.
6514 (grub_xfs_read_block): Support btree format type.
6515 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6516 Use directory block as basic unit.
6518 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6520 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6521 __attribute__ ((__regparm__ (1))).
6523 2008-02-01 Robert Millan <rmh@aybabtu.com>
6525 Correct a mistake in previous commit.
6527 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6529 (normal/command.c_DEPENDENCIES): New variable.
6531 2008-02-01 Robert Millan <rmh@aybabtu.com>
6533 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6535 (normal/command.c_DEPENDENCIES): New variable.
6536 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6537 * conf/i386-ieee1275.rmk: Likewise.
6538 * conf/i386-linuxbios.rmk: Likewise.
6539 * conf/i386-pc.rmk: Likewise.
6540 * conf/sparc64-ieee1275.rmk: Likewise.
6541 * conf/powerpc-ieee1275.rmk: Likewise.
6542 (grub_emu_SOURCES): Add `fs/fshelp.c'.
6544 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6546 2008-02-01 Robert Millan <rmh@aybabtu.com>
6548 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6549 call at beginning of function.
6551 2008-01-31 Pavel Roskin <proski@gnu.org>
6553 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6554 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6555 (grub_mkrescue_SOURCES): Likewise.
6556 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6558 2008-01-30 Robert Millan <rmh@aybabtu.com>
6560 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6561 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6562 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6563 (grub_probe_SOURCES): ... to here.
6565 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6566 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6567 * conf/i386-ieee1275.rmk: Likewise.
6568 * conf/i386-linuxbios.rmk: Likewise.
6569 * conf/powerpc-ieee1275.rmk: Likewise.
6571 2008-01-30 Tristan Gingold <gingold@free.fr>
6573 * kern/rescue.c: Silently accept empty lines.
6575 2008-01-29 Bean <bean123ch@gmail.com>
6577 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6578 (real_code_2): Code cleanup and change comment style.
6579 (move_memory): Avoid using 32-bit address mode.
6581 2008-01-29 Bean <bean123ch@gmail.com>
6583 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6584 (png_mod_SOURCES): New variable.
6585 (png_mod_CFLAGS): Likewise.
6586 (png_mod_LDFLAGS): Likewise.
6588 * video/readers/png.c: New file.
6590 2008-01-28 Robert Millan <rmh@aybabtu.com>
6592 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6593 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6594 `ifndef GRUB_MOD_GAP' hack.
6595 * util/elf/grub-mkimage.c (add_segments): Likewise.
6597 2008-01-27 Robert Millan <rmh@aybabtu.com>
6599 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6600 `GRUB_MOD_GAP' for platforms in which it's not defined.
6601 * util/elf/grub-mkimage.c (add_segments): Likewise.
6603 2008-01-27 Robert Millan <rmh@aybabtu.com>
6605 Get grub-emu to build again (including parallel builds).
6607 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6609 (util/grub-emu.c_DEPENDENCIES): ... this, ...
6610 (normal/execute.c_DEPENDENCIES): ... this, ...
6611 (grub-emu_DEPENDENCIES): ... and this.
6613 * conf/i386-efi.rmk: Likewise.
6614 * conf/i386-linuxbios.rmk: Likewise.
6615 * conf/i386-ieee1275.rmk: Likewise.
6616 * conf/powerpc-ieee1275.rmk: Likewise.
6617 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6619 2008-01-27 Robert Millan <rmh@aybabtu.com>
6621 * NEWS: Add a few items.
6623 2008-01-27 Robert Millan <rmh@aybabtu.com>
6625 Fix parallel builds with grub-emu. Based on earlier commit for
6626 grub-probe and grub-setup.
6628 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6629 (util/grub-emu.c_DEPENDENCIES): ... this.
6630 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6631 (util/grub-emu.c_DEPENDENCIES): ... this.
6632 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6633 (util/grub-emu.c_DEPENDENCIES): ... this.
6634 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6635 (util/grub-emu.c_DEPENDENCIES): ... this.
6636 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6637 (util/grub-emu.c_DEPENDENCIES): ... this.
6639 2008-01-27 Pavel Roskin <proski@gnu.org>
6641 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6642 to create a gap between _end and the modules added to the image
6643 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
6644 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6645 * util/elf/grub-mkimage.c (add_segments): Likewise.
6647 2008-01-26 Pavel Roskin <proski@gnu.org>
6649 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6650 just return an error.
6652 2008-01-26 Bean <bean123ch@gmail.com>
6654 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6655 (grub_reiserfs_get_item): Save offset of the next item.
6656 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6658 2008-01-25 Robert Millan <rmh@aybabtu.com>
6660 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6661 make all filesystem sources appear together (possibly fixing omissions
6663 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6664 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6665 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6668 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
6670 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6671 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6672 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6673 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6675 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6676 (probe): Add a sanity check to make sure of our ability to read
6677 requested files when probing for filesystem type.
6679 * genmk.rb: Update copyright year (2007).
6681 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6682 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6683 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6684 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6685 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6686 : Remove function prototypes.
6688 2008-01-25 Robert Millan <rmh@aybabtu.com>
6690 Revert my previous commits (based on wrong assumption of how grub_errno
6693 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6694 * kern/file.c (grub_file_open): Likewise.
6696 2008-01-24 Pavel Roskin <proski@gnu.org>
6698 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6699 that hang if GRUB tries to setup colors.
6700 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6701 colors for firmwares that don't support it.
6702 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6703 Recognize Open Hack'Ware, set flags to work around its
6706 2008-01-24 Robert Millan <rmh@aybabtu.com>
6708 * kern/file.c (grub_file_open): Do not account previous failures of
6709 unrelated functions when grub_errno is checked for.
6710 Reported by Oleg Strikov.
6712 2008-01-24 Bean <bean123ch@gmail.com>
6714 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6715 (grub_ufs_sblock): New member volume name.
6716 (grub_ufs_find_file): Fix string copy bug.
6717 (grub_ufs_label): Implement this function properly.
6719 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6720 (grub_hfs_iterate_records): Use the correct file number for extents
6721 and catalog file. Fix problem in next index calculation.
6722 (grub_hfs_find_node): Replace recursive function call with loop.
6723 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6725 2008-01-23 Robert Millan <rmh@aybabtu.com>
6727 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6728 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6729 (grub_multiboot2_real_boot): New function prototype.
6731 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6732 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6734 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6735 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6737 2008-01-23 Robert Millan <rmh@aybabtu.com>
6739 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6740 #ifdef'ed out grub_printf().
6742 2008-01-23 Robert Millan <rmh@aybabtu.com>
6744 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6745 grub_dprintf calls, since they make "debug=all" mode unusable.
6746 (grub_console_checkkey): Likewise.
6748 2008-01-23 Robert Millan <rmh@aybabtu.com>
6750 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6751 `term/i386/pc/at_keyboard.c'.
6752 (pkglib_MODULES): Add `serial.mod'.
6753 (serial_mod_SOURCES): New variable.
6754 (serial_mod_CFLAGS): Likewise.
6755 (serial_mod_LDFLAGS): Likewise.
6757 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6758 `<grub/powerpc/ieee1275/console.h>'.
6759 (grub_keyboard_controller_init): New function prototype.
6760 (grub_console_checkkey): Likewise.
6761 (grub_console_getkey): Likewise.
6763 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6766 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6767 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6769 2008-01-23 Robert Millan <rmh@aybabtu.com>
6771 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6772 present, "(memdisk)/boot/grub" becomes the default prefix.
6774 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6775 a memdisk tarball with all the modules. Add --overlay=DIR option that
6776 allows users to overlay additional files into the image.
6778 2008-01-23 Robert Millan <rmh@aybabtu.com>
6780 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6781 and `machine/memory.h'.
6782 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6783 (_multiboot_mod_SOURCES): New variable.
6784 (_multiboot_mod_CFLAGS): Likewise.
6785 (_multiboot_mod_LDFLAGS): Likewise.
6786 (multiboot_mod_SOURCES): Likewise.
6787 (multiboot_mod_CFLAGS): Likewise.
6788 (multiboot_mod_LDFLAGS): Likewise.
6790 * include/grub/i386/ieee1275/loader.h: New file.
6792 * include/grub/i386/ieee1275/machine.h: Likewise.
6794 * include/grub/i386/ieee1275/memory.h: Likewise.
6796 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6797 variable declaration.
6798 (grub_os_area_size): Likewise.
6800 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6801 (grub_lower_mem, grub_upper_mem): New variables.
6802 (grub_stop_floppy): New function (just to make
6803 grub_multiboot2_real_boot() happy).
6805 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6806 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6807 (grub_stop): New function.
6808 Include `"../realmode.S"' and `"../loader.S"'.
6810 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6811 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6813 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6814 rely on grub_multiboot2_real_boot() for final boot.
6816 2008-01-22 Robert Millan <rmh@aybabtu.com>
6818 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6819 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6820 device that doesn't look like an SD card.
6821 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6822 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6823 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6824 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6827 2008-01-22 Robert Millan <rmh@aybabtu.com>
6829 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6830 avoid claiming over our own code.
6832 2008-01-22 Bean <bean123ch@gmail.com>
6834 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6835 (jpeg_mod_SOURCES): New variable.
6836 (jpeg_mod_CFLAGS): Likewise.
6837 (jpeg_mod_LDFLAGS): Likewise.
6839 * video/readers/jpeg.c : New file.
6841 2008-01-22 Bean <bean123ch@gmail.com>
6843 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6844 there are no more items.
6846 2008-01-21 Robert Millan <rmh@aybabtu.com>
6848 * kern/mm.c (grub_mm_init_region): Improve debug message.
6850 2008-01-21 Robert Millan <rmh@aybabtu.com>
6852 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6853 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6855 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6857 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6858 Indicates start of upper memory.
6859 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6860 (generate_image): Abort when image size is big enough to corrupt
6863 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6864 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6865 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6866 instead of hardcoding 0xA0000.
6867 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6868 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6869 instead of hardcoding 0xA0000.
6871 2008-01-21 Robert Millan <rmh@aybabtu.com>
6873 * disk/memdisk.c (memdisk_size): New variable.
6874 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6876 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6877 image to dynamic memory.
6878 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6879 `memdisk_size'. Free memdisk block.
6881 2008-01-21 Robert Millan <rmh@aybabtu.com>
6883 Fix detection of very small filesystems (like tar).
6885 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6886 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6887 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6888 a problem with this disk).
6890 2008-01-21 Robert Millan <rmh@aybabtu.com>
6892 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6893 on grub_biosdisk_rw_standard() error.
6895 2008-01-21 Robert Millan <rmh@aybabtu.com>
6897 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6899 * kern/elf.c: Likewise.
6900 * kern/ieee1275/ieee1275.c: Likewise.
6901 * kern/powerpc/ieee1275/openfw.c: Likewise.
6902 * term/ieee1275/ofconsole.c: Likewise.
6904 2008-01-21 Robert Millan <rmh@aybabtu.com>
6906 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6908 * include/grub/kernel.h (grub_arch_memdisk_addr)
6909 (grub_arch_memdisk_size): Moved from here ...
6911 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6912 (grub_arch_memdisk_size): ... to here.
6914 2008-01-21 Robert Millan <rmh@aybabtu.com>
6916 Mostly based on bugfix from Bean.
6918 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6919 attribute with hook() parameter.
6920 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6922 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6923 attribute with hook() parameter.
6924 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6927 2008-01-21 Robert Millan <rmh@aybabtu.com>
6929 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6930 (pkglib_MODULES): Add `memdisk.mod'.
6931 (memdisk_mod_SOURCES): New variable.
6932 (memdisk_mod_CFLAGS): Likewise.
6933 (memdisk_mod_LDFLAGS): Likewise.
6935 * disk/memdisk.c: New file.
6937 * include/grub/disk.h (grub_disk_dev_id): Add
6938 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6940 * include/grub/i386/pc/kernel.h
6941 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6942 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6943 (grub_kernel_image_size): New variable declaration.
6944 (grub_total_module_size): Likewise.
6945 (grub_memdisk_image_size): Likewise.
6947 * include/grub/i386/pc/memory.h
6948 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6950 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6951 (grub_arch_memdisk_addr): New variable declaration.
6952 (grub_arch_memdisk_size): Likewise.
6954 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6955 (grub_arch_memdisk_size): Likewise.
6957 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6958 (codestart): Replace hardcoded `0x100000' with
6959 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6961 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6962 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6963 not NULL, append the contents of the file it refers to, at the end of
6964 the compressed kernel image. Initialize `grub_memdisk_image_size'
6965 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6966 (options): Add "memdisk"|'m' option.
6967 (main): Parse --memdisk|-m option, and pass user-provided path as
6968 parameter to generate_image().
6970 2008-01-20 Robert Millan <rmh@aybabtu.com>
6972 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6973 grub_dprintf() calls from here ...
6974 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6976 2008-01-20 Robert Millan <rmh@aybabtu.com>
6978 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6980 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6982 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6983 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6984 `GRUB_IEEE1275_FLAG_REAL_MODE'.
6985 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6987 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6988 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6990 2008-01-19 Robert Millan <rmh@aybabtu.com>
6992 Get rid of confusing function (superseded by
6993 `grub_ieee1275_get_integer_property')
6994 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6996 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6998 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6999 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
7000 in native endianness from grub_ieee1275_get_integer_property().
7002 2008-01-19 Robert Millan <rmh@aybabtu.com>
7004 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7005 command after "shut-down", since implementations differ on which
7006 the command for halt is.
7008 2008-01-19 Robert Millan <rmh@aybabtu.com>
7010 * include/grub/i386/linuxbios/console.h: Add header protection.
7011 (grub_keyboard_controller_init): New function prototype.
7012 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7013 (KEYBOARD_COMMAND_READ): Likewise.
7014 (KEYBOARD_COMMAND_WRITE): Likewise.
7015 (KEYBOARD_SCANCODE_SET1): Likewise.
7016 (grub_keyboard_controller_write): New function.
7017 (grub_keyboard_controller_read): Likewise.
7018 (grub_keyboard_controller_init): Likewise.
7020 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7021 (grub_console_init): On coreboot/LinuxBIOS, call
7022 grub_keyboard_controller_init().
7024 2008-01-19 Robert Millan <rmh@aybabtu.com>
7026 PowerPC changes provided by Pavel Roskin.
7028 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7029 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7030 don't rely on cmain() doing it.
7031 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7032 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7034 2008-01-16 Robert Millan <rmh@aybabtu.com>
7036 * include/grub/i386/linuxbios/memory.h
7037 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7038 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7039 receive `table_header' as argument. Instead, probe for it in the
7040 known memory ranges where it can be present.
7041 (grub_available_iterate): Do not pass a fixed `table_header' address
7042 to grub_linuxbios_table_iterate().
7044 2008-01-15 Robert Millan <rmh@aybabtu.com>
7046 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7047 * conf/i386-ieee1275.rmk: New file.
7048 * include/grub/i386/ieee1275/console.h: Likewise.
7049 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7050 * include/grub/i386/ieee1275/kernel.h: Likewise.
7051 * include/grub/i386/ieee1275/time.h: Likewise.
7052 * kern/i386/ieee1275/init.c: Likewise.
7053 * kern/i386/ieee1275/startup.S: Likewise.
7055 2008-01-15 Robert Millan <rmh@aybabtu.com>
7057 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7058 when pointers are 32-bit (but still do set it to one when they are
7061 2008-01-15 Robert Millan <rmh@aybabtu.com>
7063 * include/grub/ieee1275/ieee1275.h
7064 (grub_ieee1275_get_integer_property): New function prototype.
7066 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7067 (grub_ieee1275_get_integer_property): New function. Wraps around
7068 grub_ieee1275_get_property() to handle endianness.
7070 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7071 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
7073 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7074 (grub_map): Likewise.
7075 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7077 2008-01-15 Bean <bean123ch@gmail.com>
7079 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7080 (grub_script_execute_cmdline): Reset grub_errno.
7082 * normal/main.c (read_config_file): Reset grub_errno.
7084 * normal/parse.y (script_init): New.
7085 (script): Move function and menuentry here.
7087 (command): Add delimiter at the end of command.
7088 (commands): Adjust to match the new command.
7089 (commandblock): Remove grub_script_lexer_record_start.
7090 (menuentry): Add grub_script_lexer_record_start, use the new commands.
7091 (if): Use the new commands.
7093 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7095 2008-01-15 Robert Millan <rmh@aybabtu.com>
7097 * normal/menu.c (run_menu): Move timeout message from here ...
7098 (print_timeout): ... to here.
7099 (run_menu): Use print_timeout() once during initial draw to print
7100 the whole message, and again in every clock tick to update only
7101 the number of seconds.
7103 2008-01-15 Robert Millan <rmh@aybabtu.com>
7105 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7106 actual size of `available' from grub_ieee1275_get_property(), and
7107 restrict parsing to that bound.
7109 2008-01-15 Christian Franke <franke@computer.org>
7111 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7112 (argp_program_version): Remove variable.
7113 (argp_program_bug_address): Likewise.
7114 (options): Convert from struct argp_option to struct option.
7115 (struct arguments): Remove.
7116 (parse_opt): Remove.
7117 (usage): New function.
7118 (main): Replace struct args members by simple variables.
7119 Replace argp_parse() by getopt_long().
7120 Add switch to evaluate options.
7121 Add missing "(...)" around root_dev in prefix string.
7123 2008-01-14 Robert Millan <rmh@aybabtu.com>
7125 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7126 for grub_ieee1275_exit(), in order to improve portability.
7128 2008-01-14 Robert Millan <rmh@aybabtu.com>
7130 * util/grub.d/10_linux.in (prefix): Define.
7131 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
7133 2008-01-13 Pavel Roskin <proski@gnu.org>
7135 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7136 grub_errno if no errors have been detected.
7138 2008-01-12 Robert Millan <rmh@aybabtu.com>
7140 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7141 (grub_util_get_dev_abstraction): New function prototype.
7143 * util/getroot.c: Include `<grub/util/getroot.h>'
7144 (grub_util_get_grub_dev): Move detection of abstraction type to ...
7145 (grub_util_get_dev_abstraction): ... here (new function).
7147 * util/grub-probe.c: Convert PRINT_* to an enum. Add
7148 `PRINT_ABSTRACTION'.
7149 (probe): Probe for abstraction type when requested.
7150 (main): Understand `--target=abstraction'.
7152 * util/i386/efi/grub-install.in: Add abstraction module to core
7153 image when it is found to be necessary.
7154 * util/i386/pc/grub-install.in: Likewise.
7155 * util/powerpc/ieee1275/grub-install.in: Likewise.
7157 * util/update-grub_lib.in (font_path): Return system path without
7158 converting to GRUB path.
7159 * util/update-grub.in: Convert system path returned by font_path()
7160 to a GRUB path. Use `grub-probe -t abstraction' to determine what
7161 abstraction module is needed for loading fonts (if any). Export
7162 that as `GRUB_PRELOAD_MODULES'.
7163 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7166 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
7168 Remove some unused code from reiserfs.
7170 * fs/reiserfs.c (struct grub_reiserfs_key)
7171 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7172 (struct grub_reiserfs_node_body): Removed.
7173 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7175 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7177 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7179 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7181 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7183 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7185 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7186 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7187 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7189 2008-01-10 Robert Millan <rmh@aybabtu.com>
7191 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7192 Determines if a file is garbage left by packaging systems, etc.
7193 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7194 for processing /etc/grub.d scripts.
7195 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7196 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7197 as a condition for processing Linux images.
7199 2008-01-10 Pavel Roskin <proski@gnu.org>
7201 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7202 to compile reiserfs.c on PowerPC.
7204 2008-01-10 Robert Millan <rmh@aybabtu.com>
7206 * kern/device.c (grub_device_iterate): Do not abort device iteration
7207 when one of the devices cannot be opened.
7208 * kern/disk.c (grub_disk_open): Do not account previous failures of
7209 unrelated functions when grub_errno is checked for.
7211 2008-01-08 Robert Millan <rmh@aybabtu.com>
7213 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7214 `! grub_linux_is_bzimage', change order of address comparison to make
7215 it more intuitive, and improve "too big zImage" error message.
7217 2008-01-08 Robert Millan <rmh@aybabtu.com>
7219 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7220 `$(update-grub_DATA)'.
7221 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7224 2008-01-07 Robert Millan <rmh@aybabtu.com>
7226 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7227 which instruction is modified by grub-setup during installation
7228 (since it wasn't obvious by only looking at this file).
7230 2008-01-07 Robert Millan <rmh@aybabtu.com>
7232 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
7233 listing actual TODO items.
7235 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7237 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7239 (grub_reiserfs_get_key_offset): Likewise.
7240 (grub_reiserfs_set_key_offset): Likewise.
7241 (grub_reiserfs_set_key_type): Likewise.
7242 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
7244 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7245 better to remove the bitfield version completely.
7247 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7249 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7250 allocated from the heap, due to the fshelp implementation.
7251 (grub_reiserfs_dir): Free NODE, due to the same reason.
7253 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7255 Mostly from Vincent Pelletier:
7257 * fs/reiserfs.c: New file.
7259 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7260 (reiserfs_mod_SOURCES): New variable.
7261 (reiserfs_mod_CFLAGS): Likewise.
7262 (reiserfs_mod_LDFLAGS): Likewise.
7264 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7265 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7266 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7269 2008-01-06 Robert Millan <rmh@aybabtu.com>
7271 * normal/color.c: Remove `<grub/env.h>'.
7273 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7275 * include/grub/normal.h: Include <grub/env.h>.
7277 2008-01-05 Robert Millan <rmh@aybabtu.com>
7279 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7280 usage example with `(hd0,1)'.
7281 Reported by Samuel Thibault.
7283 2008-01-05 Robert Millan <rmh@aybabtu.com>
7285 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7286 (grub_linux_boot_zimage): Rename to ...
7287 (grub_linux_boot): ... this.
7288 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7289 (grub_linux_boot_zimage): Conditionalize zImage copy.
7291 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7292 (grub_linux_boot_bzimage): Remove prototype.
7293 (grub_linux_boot_zimage): Rename to ...
7294 (grub_linux_boot): ... this.
7296 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7297 (grub_linux_boot): Remove function.
7299 2008-01-05 Robert Millan <rmh@aybabtu.com>
7301 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7302 (grub_env_write_color_highlight): Likewise.
7303 (grub_wait_after_message): Likewise.
7305 * normal/color.c: New file.
7307 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7308 (normal_mod_DEPENDENCIES): Likewise.
7310 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7311 (normal_mod_DEPENDENCIES): Likewise.
7313 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7314 (normal_mod_DEPENDENCIES): Likewise.
7316 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7317 (normal_mod_DEPENDENCIES): Likewise.
7319 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7320 for waiting after a message is printed.
7321 * normal/main.c (read_config_file): Likewise.
7322 (grub_normal_init): Register grub_env_write_color_normal() and
7323 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7324 `color_highlight' variables as global.
7326 * normal/menu.c (grub_wait_after_message): New function.
7327 (grub_color_menu_normal): New variable. Replaces ...
7328 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7329 (grub_color_menu_highlight): New variable. Replaces ...
7330 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7331 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7332 `GRUB_TERM_COLOR_STANDARD'.
7333 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7334 `normal_code' and `highlight_code' to `old_color_normal' and
7335 `old_color_highlight', respectively.
7336 (grub_menu_init_page): Update colors when drawing the menu, based on
7337 `menu_color_normal' and `menu_color_highlight' variables.
7338 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7339 a message is printed.
7341 2008-01-05 Robert Millan <rmh@aybabtu.com>
7343 * kern/env.c (grub_env_context_open): Propagate hooks for global
7344 variables to new context.
7346 * kern/main.c (grub_set_root_dev): Export `root' variable.
7348 2008-01-05 Robert Millan <rmh@aybabtu.com>
7350 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
7351 discs unconditionally, since udev and others have options to provide
7354 2008-01-05 Robert Millan <rmh@aybabtu.com>
7356 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7358 2008-01-04 Christian Franke <franke@computer.org>
7360 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7363 2008-01-03 Pavel Roskin <proski@gnu.org>
7365 * kern/i386/linuxbios/init.c: Put "void" to all function
7366 declarations with no arguments.
7367 * kern/powerpc/ieee1275/init.c: Likewise.
7368 * term/i386/pc/at_keyboard.c: Likewise.
7369 * term/i386/pc/vga_text.c: Likewise.
7370 * util/grub-mkdevicemap.c: Likewise.
7372 2008-01-02 Robert Millan <rmh@aybabtu.com>
7374 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7375 message when loaded image is out of bounds.
7376 (grub_multiboot_load_elf64): Likewise.
7378 2008-01-02 Pavel Roskin <proski@gnu.org>
7380 * util/grub.d/10_linux.in: Try version without ".old" when
7381 looking for initrd. It's better to use initrd from the newer
7382 kernel of the same version than no initrd at all.
7384 2008-01-01 Robert Millan <rmh@aybabtu.com>
7386 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7388 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7390 * include/grub/video.h: Added grub_video_unmap_color and
7391 grub_video_get_active_render_target.
7392 (grub_video_adapter): Added unmap_color and get_active_render_target.
7394 * video/video.c: Added grub_video_unmap_color and
7395 grub_video_get_active_render_target.
7396 (grub_video_get_info): Changed method to accept NULL pointer as an
7397 argument to allow detection of active video adapter.
7399 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7400 grub_video_vbe_unmap_color_int.
7401 Added grub_video_vbe_unmap_color and
7402 grub_video_vbe_get_active_render_target.
7403 (grub_video_vbe_adapter): Added unmap_color and
7404 get_active_render_target.
7406 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
7407 with grub_video_vbe_unmap_color_int.
7409 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7410 (DEFAULT_NORMAL_COLOR): Likewise.
7411 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7412 (DEFAULT_FG_COLOR): Removed.
7413 (DEFAULT_BG_COLOR): Likewise.
7414 (DEFAULT_CURSOR_COLOR): Changed value.
7415 (grub_virtual_screen): Added standard_color_setting,
7416 normal_color_setting, highlight_color_setting and term_color.
7417 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7418 (bitmap_width): Added.
7419 (bitmap_height): Likewise.
7421 (set_term_color): Likewise.
7422 (grub_virtual_screen_setup): Changed to use new terminal coloring
7424 (grub_gfxterm_init): Added init for bitmap.
7425 (grub_gfxterm_fini): Added destroy for bitmap.
7426 (redraw_screen_rect): Updated to use background bitmap and new
7428 (scroll_up): Added optimization for case when there is no bitmap.
7429 (grub_gfxterm_cls): Fixed to use correct background color.
7430 (grub_virtual_screen_setcolorstate): Changed to use new terminal
7432 (grub_virtual_screen_setcolor): Likewise.
7433 (grub_virtual_screen_getcolor): Added.
7434 (grub_gfxterm_background_image_cmd): Likewise.
7435 (grub_video_term): Added setcolor and getcolor.
7436 (MOD_INIT): Added registration of background_image command.
7437 (MOD_TERM): Added unregistration for background_image command.
7439 2007-12-30 Pavel Roskin <proski@gnu.org>
7441 * loader/multiboot_loader.c: Fix multiboot command
7442 unregistration. Fix all typos in the word "multiboot".
7444 2007-12-29 Pavel Roskin <proski@gnu.org>
7446 * util/grub.d/10_linux.in: Refactor search for initrd. Add
7447 support for initrd names used in Fedora.
7449 2007-12-26 Bean <bean123ch@gmail.com>
7451 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
7452 (cpio_mod_SOURCES): New variable.
7453 (cpio_mod_CFLAGS): Likewise.
7454 (cpio_mod_LDFLAGS): Likewise.
7456 * fs/cpio.c: New file.
7458 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
7460 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7462 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7464 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7466 2007-12-25 Robert Millan <rmh@aybabtu.com>
7468 * include/grub/term.h (struct grub_term): Add `getcolor' function.
7469 (grub_getcolor): New function.
7471 * kern/term.c (grub_getcolor): New function.
7472 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
7473 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
7474 (print_entry): Set normal and highlight colors to
7475 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
7476 respectively, before printing and restore them to old
7478 (grub_menu_init_page): Likewise. Fill an additional colored space
7479 that would otherwise be left blank.
7481 * term/efi/console.c (grub_console_getcolor): New function.
7482 (struct grub_console_term.getcolor): New variable.
7483 * term/i386/pc/console.c (grub_console_getcolor): New function.
7484 (struct grub_console_term.getcolor): New variable.
7485 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
7486 (struct grub_console_term.getcolor): New variable.
7488 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
7489 (struct grub_console_term.setcolor): Remove variable.
7490 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
7491 (struct grub_console_term.setcolor): Remove variable.
7492 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
7493 (struct grub_console_term.setcolor): Remove variable.
7494 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
7495 (struct grub_console_term.setcolor): Remove variable.
7497 2007-12-25 Robert Millan <rmh@aybabtu.com>
7499 * configure.ac: Search for possible unifont.hex locations, and
7500 define UNIFONT_HEX if found.
7502 * Makefile.in (UNIFONT_HEX): Define variable.
7503 (DATA): Rename to ...
7504 (PKGLIB): ... this. Update all users.
7505 (PKGDATA): New variable.
7506 (pkgdata_IMAGES): Rename to ...
7507 (pkglib_IMAGES): ... this. Update all users.
7508 (pkgdata_MODULES): Rename to ...
7509 (pkglib_MODULES): ... this. Update all users.
7510 (pkgdata_PROGRAMS): Rename to ...
7511 (pkglib_PROGRAMS): ... this. Update all users.
7512 (pkgdata_DATA): Rename to ...
7513 (pkglib_DATA): ... this. Update all users.
7514 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7515 (unicode.pff, ascii.pff): New rules.
7516 (all-local): Add `$(PKGDATA)' dependency.
7517 (install-local): Process `$(PKGDATA)'.
7519 * util/update-grub_lib.in (font_path): Search for *.pff files in
7520 a few more locations, including `${pkgdata}'.
7522 2007-12-23 Robert Millan <rmh@aybabtu.com>
7524 Patch from Bean <bean123ch@gmail.com>:
7525 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7528 2007-12-21 Bean <bean123ch@gmail.com>
7530 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7531 (ntfscomp_mod_SOURCES): New variable.
7532 (ntfscomp_mod_CFLAGS): Likewise.
7533 (ntfscomp_mod_LDFLAGS): Likewise.
7535 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7536 (grub_probe_SOURCES): Likewise.
7537 (grub_emu_SOURCES): Likewise.
7539 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7540 (grub_emu_SOURCES): Likewise.
7542 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7543 (grub_emu_SOURCES): Likewise.
7545 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7546 (grub_emu_SOURCES): Likewise.
7548 * fs/ntfs.c (grub_ntfscomp_func): New variable.
7549 (read_run_list): Renamed to grub_ntfs_read_run_list.
7550 (decomp_nextvcn): Moved to ntfscomp.c.
7551 (decomp_getch): Likewise.
7552 (decomp_get16): Likewise.
7553 (decomp_block): Likewise.
7554 (read_block): Likewise.
7555 (read_data): Partially moved to ntfscomp.c.
7556 (fixup): Change unsigned to grub_uint16_t.
7557 (read_mft): Change unsigned long to grub_uint32_t.
7558 (read_attr): Likewise.
7559 (read_data): Likewise.
7560 (read_run_data): Likewise.
7561 (read_run_list): Likewise.
7562 (read_mft): Likewise.
7564 * fs/ntfscomp.c: New file.
7566 * include/grub/ntfs.h: New file.
7568 2007-12-16 Robert Millan <rmh@aybabtu.com>
7570 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7571 IDE disk check, since Linux is known to support 20 IDE disks.
7572 Reported by Colin Watson.
7574 2007-12-15 Bean <bean123ch@gmail.com>
7576 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7577 (lnxboot_img_SOURCES): New variable.
7578 (lnxboot_img_ASFLAGS): Likewise.
7579 (lnxboot_img_LDFLAGS): Likewise.
7581 * boot/i386/pc/lnxboot.S: New file.
7583 2007-11-24 Pavel Roskin <proski@gnu.org>
7585 * configure.ac: Test if '--build-id=none' is supported by the
7586 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
7587 objcopy to generate incorrect binary files (binutils
7588 2.17.50.0.18-1 as shipped by Fedora 8).
7589 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7590 linking, so that build ID doesn't break the test.
7592 2007-11-24 Pavel Roskin <proski@gnu.org>
7594 * include/grub/i386/time.h: use "void" in the argument list
7596 * include/grub/powerpc/time.h: Likewise.
7597 * include/grub/sparc64/time.h: Likewise.
7599 2007-11-18 Christian Franke <franke@computer.org>
7601 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7602 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7603 This fixes the problem that function keys did not work in grub-emu.
7605 2007-11-18 Christian Franke <franke@computer.org>
7607 * disk/host.c (grub_host_open): Remove attribute unused from
7608 name parameter. Add check for "host". This fixes the problem
7609 that grub-emu does not find partitions.
7611 2007-11-18 Christian Franke <franke@computer.org>
7613 * util/hostfs.c (is_dir): New function.
7614 (grub_hostfs_dir): Handle missing dirent.d_type case.
7615 (grub_hostfs_read): Add missing fseek().
7616 (grub_hostfs_label): Clear label pointer. This fixes a crash
7617 of grub-emu on "ls (host)".
7619 2007-11-18 Christian Franke <franke@computer.org>
7621 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7622 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7623 to 64 bit boundary by default.
7625 2007-11-18 Bean <bean123ch@gmail.com>
7627 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7628 (hexdump_mod_SOURCES): New variable.
7629 (hexdump_mod_CFLAGS): Likewise.
7630 (hexdump_mod_LDFLAGS): Likewise.
7632 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7634 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7636 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7638 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7640 * include/grub/hexdump.h: New file.
7642 * commands/hexdump.c: New file.
7644 2007-11-10 Robert Millan <rmh@aybabtu.com>
7646 * commands/i386/pc/play.c (beep_off): Switch order of arguments
7647 in grub_outb() calls.
7648 (beep_on): Likewise.
7650 2007-11-10 Christian Franke <franke@computer.org>
7652 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7653 (grub_menu_run): Likewise.
7655 2007-11-10 Robert Millan <rmh@aybabtu.com>
7657 * include/grub/i386/efi/machine.h: New file.
7658 * include/grub/i386/linuxbios/machine.h: Likewise.
7659 * include/grub/i386/pc/machine.h: Likewise.
7660 * include/grub/powerpc/ieee1275/machine.h: Likewise.
7661 * include/grub/sparc64/ieee1275/machine.h: Likewise.
7663 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7664 (serial_hw_io_addr): New variable.
7665 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7666 instead of `(unsigned short *) 0x400'.
7668 2007-11-10 Bean <bean123ch@gmail.com>
7670 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7672 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7674 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7675 (vga_mod_SOURCES): Added.
7676 (vga_mod_CFLAGS): Likewise.
7677 (vga_mod_LDFLAGS): Likewise.
7679 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7681 (set_map_mask): Likewise.
7682 (set_read_map): Likewise.
7683 (set_read_address): Likewise.
7684 (vga_font): Removed variable.
7685 (get_vga_glyph): Removed function.
7686 (invalidate_char): Likewise.
7687 (write_char): Changed to use grub_font_get_glyph() for font
7689 (grub_vga_putchar): Likewise.
7690 (grub_vga_getcharwidth): Likewise.
7692 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7694 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7696 (pxeboot_img_LDFLAGS): Likewise.
7697 (diskboot_img_LDFLAGS): Likewise.
7698 (kernel_img_LDFLAGS): Likewise.
7700 2007-11-06 Robert Millan <rmh@aybabtu.com>
7702 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7703 in grub_outb() calls.
7704 (serial_hw_init): Likewise.
7706 2007-11-05 Robert Millan <rmh@aybabtu.com>
7708 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7709 spaces. Skip non-regular files.
7711 2007-11-05 Robert Millan <rmh@aybabtu.com>
7713 * kern/disk.c (grub_disk_firmware_fini)
7714 (grub_disk_firmware_is_tainted): New variables.
7716 * include/grub/disk.h (grub_disk_firmware_fini)
7717 (grub_disk_firmware_is_tainted): Likewise.
7719 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7720 (grub_disk_biosdisk_fini): ... to here.
7721 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7722 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7723 is set. Register grub_disk_biosdisk_fini() in
7724 `grub_disk_firmware_fini'.
7726 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7727 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7728 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7729 to finish existing firmware disk interface.
7731 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7732 (ata_mod_SOURCES): New variable.
7733 (ata_mod_CFLAGS): Likewise.
7734 (ata_mod_LDFLAGS): Likewise.
7736 2007-11-05 Robert Millan <rmh@aybabtu.com>
7738 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7739 (grub_ata_wait): Reimplement using grub_millisleep().
7741 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7742 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7744 2007-11-03 Marco Gerards <marco@gnu.org>
7746 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7747 (CRTC_ADDR_PORT): New macro.
7748 (CRTC_DATA_PORT): Likewise.
7749 (CRTC_CURSOR): Likewise.
7750 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7751 (CRTC_CURSOR_ADDR_LOW): Likewise.
7752 (update_cursor): New function.
7753 (grub_console_real_putchar): Call `update_cursor'.
7754 (grub_console_gotoxy): Likewise.
7755 (grub_console_cls): Set the default color when clearing the
7757 (grub_console_setcursor): Implemented.
7759 2007-11-03 Marco Gerards <marco@gnu.org>
7761 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7763 (grub_ata_pio_write): Likewise.
7765 (grub_atapi_identify): Wait after issuing an ATA command.
7766 (grub_atapi_packet): Likewise.
7767 (grub_ata_identify): Likewise.
7768 (grub_ata_readwrite): Likewise.
7770 2007-11-03 Marco Gerards <marco@gnu.org>
7772 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7773 (grub_ata_pio_write): Likewise.
7774 (grub_ata_readwrite): Use `grub_error', instead of
7775 returning `grub_errno'.
7777 2007-11-03 Marco Gerards <marco@gnu.org>
7779 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7780 grub_ata_pio_write once for every single sector, instead of for
7783 2007-10-31 Robert Millan <rmh@aybabtu.com>
7785 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7787 * conf/i386-linuxbios.rmk: New file.
7789 * kern/i386/pc/hardware.c: Likewise.
7790 * term/i386/pc/at_keyboard.c: Likewise.
7791 * term/i386/pc/vga_text.c: Likewise.
7793 * include/grub/i386/linuxbios/boot.h: Likewise.
7794 * include/grub/i386/linuxbios/console.h: Likewise.
7795 * include/grub/i386/linuxbios/init.h: Likewise.
7796 * include/grub/i386/linuxbios/kernel.h: Likewise.
7797 * include/grub/i386/linuxbios/loader.h: Likewise.
7798 * include/grub/i386/linuxbios/memory.h: Likewise.
7799 * include/grub/i386/linuxbios/serial.h: Likewise.
7800 * include/grub/i386/linuxbios/time.h: Likewise.
7802 * kern/i386/linuxbios/init.c: Likewise.
7803 * kern/i386/linuxbios/startup.S: Likewise.
7804 * kern/i386/linuxbios/table.c: Likewise.
7806 2007-10-31 Marco Gerards <marco@gnu.org>
7808 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7809 (ata_mod_SOURCES): New variable.
7810 (ata_mod_CFLAGS): Likewise.
7811 (ata_mod_LDFLAGS): Likewise.
7813 * disk/ata.c: New file.
7815 * include/grub/disk.h (grub_disk_dev_id): Add
7816 `GRUB_DISK_DEV_ATA_ID'.
7818 2007-10-31 Robert Millan <rmh@aybabtu.com>
7820 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7821 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7823 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7824 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7826 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7829 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7831 2007-10-27 Robert Millan <rmh@aybabtu.com>
7833 * include/grub/types.h (ULONG_MAX): Define macro.
7835 2007-10-22 Robert Millan <rmh@aybabtu.com>
7837 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7839 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7841 2007-10-22 Robert Millan <rmh@aybabtu.com>
7843 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7844 (pkgdata_MODULES): Add `biosdisk.mod'.
7845 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7848 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7849 (grub_biosdisk_init): Replace with ...
7850 (GRUB_MOD_INIT(biosdisk)): ... this.
7851 (grub_biosdisk_fini): Replace with ...
7852 (GRUB_MOD_FINI(biosdisk)): ... this.
7854 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7855 (grub_machine_init): Remove call to grub_biosdisk_init().
7856 (grub_machine_fini): Remove call to grub_machine_fini().
7858 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7860 2007-10-22 Robert Millan <rmh@aybabtu.com>
7862 * include/grub/time.h: New file.
7863 * include/grub/i386/time.h: Likewise.
7864 * include/grub/powerpc/time.h: Likewise.
7865 * include/grub/sparc64/time.h: Likewise.
7867 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7869 (KERNEL_MACHINE_TIME_HEADER): ... this.
7870 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7872 (KERNEL_MACHINE_TIME_HEADER): ... this.
7873 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7875 (KERNEL_MACHINE_TIME_HEADER): ... this.
7877 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7878 (grub_millisleep): New function.
7879 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7880 (grub_millisleep): New function.
7881 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7882 Remove `grub/machine/time.h' include.
7883 (grub_millisleep): New function.
7884 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7885 Remove `grub/machine/time.h' include.
7886 (grub_millisleep): New function.
7888 * include/grub/misc.h (grub_div_roundup): New function.
7890 * kern/misc.c: Include `<grub/time.h>'.
7891 (grub_millisleep_generic): New function.
7893 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7895 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7897 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7898 `machine/time.h'. Add `time.h'.
7899 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7901 2007-10-21 Robert Millan <rmh@aybabtu.com>
7903 * include/grub/misc.h (grub_max): New function.
7905 2007-10-21 Robert Millan <rmh@aybabtu.com>
7907 * util/misc.c (grub_util_info): Call fflush() before returning.
7909 2007-10-20 Robert Millan <rmh@aybabtu.com>
7911 * genmk.rb (Image): Copy `extra_flags' from here ...
7912 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7914 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7915 to `argc' and `args' arguments.
7917 2007-10-17 Robert Millan <rmh@aybabtu.com>
7919 * kern/i386/loader.S: New file.
7921 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7922 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7923 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7924 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7925 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7926 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7927 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7928 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7929 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7930 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7931 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7932 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7933 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7934 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7936 * kern/i386/realmode.S: New file.
7938 * kern/i386/pc/startup.S (protstack): Moved from here ...
7939 * kern/i386/realmode.S (protstack)... to here.
7940 * kern/i386/pc/startup.S (gdt): Moved from here ...
7941 * kern/i386/realmode.S (gdt)... to here.
7942 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7943 * kern/i386/realmode.S (prot_to_real)... to here.
7945 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7946 `kern/i386/realmode.S'.
7948 2007-10-17 Robert Millan <rmh@aybabtu.com>
7950 * include/grub/i386/loader.h: New file.
7952 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7953 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7954 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7955 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7956 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7957 * include/grub/i386/loader.h (grub_linux_prot_size)
7958 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7959 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7960 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7961 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7963 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7965 2007-10-15 Robert Millan <rmh@aybabtu.com>
7967 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7968 filesystem when dev->disk is unset.
7969 Do probe for filesystem even when dev->disk->has_partitions is set.
7970 In case a filesystem is found, always report it.
7971 In case it isn't, if dev->disk->has_partitions is set, report that
7972 a partition table was found instead of reporting that no filesystem
7973 could be identified.
7975 2007-10-12 Robert Millan <rmh@aybabtu.com>
7977 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7978 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7980 * include/grub/types.h (grub_host_to_target16): New macro.
7981 (grub_host_to_target32): Likewise.
7982 (grub_host_to_target64): Likewise.
7983 (grub_target_to_host16): Likewise.
7984 (grub_target_to_host32): Likewise.
7985 (grub_target_to_host64): Likewise.
7987 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7989 (GRUB_MOD_ALIGN): ...this. Update all users.
7991 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7992 grub_host_to_target32.
7993 Replace grub_be_to_cpu32 with grub_target_to_host32.
7994 (load_modules): Likewise.
7995 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7996 Replace grub_be_to_cpu32 with grub_target_to_host32.
7997 Replace grub_cpu_to_be16 with grub_host_to_target16.
7998 Replace grub_cpu_to_be32 grub_host_to_target32.
8000 2007-10-12 Robert Millan <rmh@aybabtu.com>
8002 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8003 * util/elf/grub-mkimage.c: ... here.
8005 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8006 `util/powerpc/ieee1275/grub-mkimage.c'.
8008 2007-10-07 Robert Millan <rmh@aybabtu.com>
8010 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8011 and make it easier to figure out.
8012 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8013 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8014 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8015 leave us with less than HEAP_MIN_SIZE total heap.
8016 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
8018 2007-10-03 Robert Millan <rmh@aybabtu.com>
8020 * include/grub/i386/io.h: New file.
8021 * commands/i386/pc/play.c (inb): Removed.
8023 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8025 * term/i386/pc/serial.c (inb): Removed.
8027 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8029 * term/i386/pc/vga.c (inb): Removed.
8031 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8034 2007-10-02 Robert Millan <rmh@aybabtu.com>
8036 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8037 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8038 Reported by Marcin Kurek.
8040 2007-09-07 Robert Millan <rmh@aybabtu.com>
8042 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8043 SmartFirmware version updates (as released by Sven Luther), and avoid
8044 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8045 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8048 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8051 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8052 when merging two regions.
8054 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8056 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8057 * normal/completion.c (grub_normal_do_completion): Likewise.
8058 Reported by Hitoshi Ozeki.
8060 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8062 Do not use devices at boot in chainloading.
8064 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8065 (boot_part_addr): Likewise.
8066 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8067 with BOOT_DRIVE and BOOT_PART_ADDR.
8068 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8069 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8071 2007-08-29 Robert Millan <rmh@aybabtu.com>
8073 Patch from Simon Peter <dn.tlp@gmx.net>:
8074 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8075 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8076 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8077 util/i386/pc/grub-setup.c_DEPENDENCIES.
8078 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8079 util/grub-probe.c_DEPENDENCIES.
8080 * conf/powerpc-ieee1275.rmk: Likewise.
8082 2007-08-28 Robert Millan <rmh@aybabtu.com>
8084 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8085 to tell grub-mkdevicemap how to name devices.
8086 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8089 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8090 util/i386/get_disk_name.c.
8091 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8092 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8093 util/ieee1275/get_disk_name.c.
8095 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8097 * DISTLIST: Add util/i386/get_disk_name.c and
8098 util/ieee1275/get_disk_name.c.
8100 * util/grub-mkdevicemap.c: Replace device naming logic with
8101 grub_util_get_disk_name() calls.
8103 2007-08-20 Robert Millan <rmh@aybabtu.com>
8105 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8106 (so that it works for both plural and singular quantities).
8108 2007-08-05 Robert Millan <rmh@aybabtu.com>
8110 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8111 so that [xz] isn't taken into account when determining order.
8113 2007-08-02 Marco Gerards <marco@gnu.org>
8115 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8116 `include/multiboot2.h', `include/grub/elfload.h',
8117 `include/multiboot.h', `include/grub/multiboot.h',
8118 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8119 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8120 `kern/elf.c', `loader/multiboot_loader.c',
8121 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8122 `loader/i386/pc/multiboot2.c',
8123 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8124 `util/i386/pc/grub-mkrescue.in'. Remove
8125 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8126 `include/grub/i386/pc/util/biosdisk.h' and
8127 `include/grub/powerpc/ieee1275/multiboot.h'.
8129 2007-08-02 Bean <bean123ch@gmail.com>
8131 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8132 (ntfs_mod_SOURCES): New variable.
8133 (ntfs_mod_CFLAGS): Likewise.
8134 (ntfs_mod_LDFLAGS): Likewise.
8136 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8137 (grub_probe_SOURCES): Likewise.
8138 (grub_emu_SOURCES): Likewise.
8140 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8141 (grub_emu_SOURCES): Likewise.
8143 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8144 (grub_emu_SOURCES): Likewise.
8146 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8148 * fs/ntfs.c: New file.
8150 2007-08-02 Bean <bean123ch@gmail.com>
8152 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8154 * file.h (grub_file): Likewise.
8156 * fshelp.h (grub_fshelp_read_file): Likewise.
8158 * util/i386/pc/grub-setup.c (setup): Likewise.
8159 (save_first_sector): Likewise.
8160 (save_blocklists): Likewise.
8162 * fs/affs.c (grub_affs_read_file): Likewise.
8164 * fs/ext2.c (grub_ext2_read_file): Likewise.
8166 * fs/fat.c (grub_fat_read_data): Likewise.
8168 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8170 * fs/hfs.c (grub_hfs_read_file): Likewise.
8172 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8174 * fs/jfs.c (grub_jfs_read_file): Likewise.
8176 * fs/minix.c (grub_minix_read_file): Likewise.
8178 * fs/sfs.c (grub_sfs_read_file): Likewise.
8180 * fs/ufs.c (grub_ufs_read_file): Likewise.
8182 * fs/xfs.c (grub_xfs_read_file): Likewise.
8184 * command/blocklist.c (read_blocklist): Likewise.
8185 (print_blocklist): Likewise.
8187 2007-08-02 Marco Gerards <marco@gnu.org>
8189 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8192 * disk/host.c: New file.
8194 * util/hostfs.c: Likewise.
8196 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8197 return `GRUB_ERR_BAD_FS'.
8198 * fs/sfs.c (grub_sfs_mount): Likewise.
8199 * fs/xfs.c (grub_xfs_mount): Likewise.
8201 * include/grub/disk.h (enum grub_disk_dev_id): Add
8202 `GRUB_DISK_DEVICE_HOST_ID'.
8204 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8206 2007-07-24 Jerone Young <jerone@gmail.com>
8208 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
8209 modules for compilation.
8210 * conf/powerpc-ieee1275.rmk: Likewise.
8212 * include/multiboot.h: Move multiboot definitions to one file. Rename
8213 many definitions to not get grub specific.
8214 * include/multiboot2.h: Create header with multiboot 2 definitions.
8215 * include/grub/multiboot.h: Header for grub specific function
8216 prototypes and definitions.
8217 * include/grub/multiboot2.h: Likewise.
8218 * include/grub/multiboot_loader.h: Likewise.
8219 * include/grub/i386/pc/multiboot.h: Removed.
8220 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8222 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8223 and 2 to allow for one multiboot and module commands.
8224 * loader/multiboot2.c: Add multiboot2 functionality.
8225 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8226 and definition names.
8227 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8229 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8230 ieee1275 specific multiboot2 code.
8232 * kern/i386/pc/startup.S: Change headers and definition names for
8233 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8235 2007-07-22 Robert Millan <rmh@aybabtu.com>
8237 * geninitheader.sh: Process file specified in first parameter rather
8238 than hardcoding grub_modules_init.lst.
8239 * geninit.sh: Likewise. Also, construct header name dynamically rather
8240 than hardcoding grub_modules_init.h.
8242 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8243 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
8244 grub_probe_init.[ch] and grub_setup_init.[ch].
8246 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8247 grub_modules_init.h with grub_emu_init.h.
8248 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8249 grub_probe_init.[ch] files.
8250 * conf/i386-efi.rmk: Likewise.
8251 * conf/i386-pc.rmk: Likewise.
8252 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8253 grub_setup_init.[ch] files.
8255 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8256 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8257 to initialize modules rather than a list of hardcoded functions.
8258 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8259 grub_init_all() to initialize modules rather than a list of hardcoded
8262 2007-07-22 Robert Millan <rmh@aybabtu.com>
8264 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8265 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8267 2007-07-22 Robert Millan <rmh@aybabtu.com>
8269 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8270 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8271 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8272 flag when running on SmartFirmware.
8273 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8274 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8277 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8278 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8279 rather than decreasing it.
8281 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8282 there's not enough space to do it, fail in the same way as when it
8283 can't be done because there are no partitions.
8285 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8286 when nvsetenv failed.
8288 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8290 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8291 because this rule is automatically generated.
8292 (grub-mkrescue): Removed for the same reason as above.
8294 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8296 Migrate to GNU General Public License Version 3.
8298 * COPYING: Replaced with the plain text version of GPLv3.
8300 * config.guess: Updated from gnulib.
8301 * config.sub: Likewise.
8303 * geninit.sh: Output a GPLv3 copyright notice.
8304 * geninitheader.sh: Likewise.
8305 * genmodsrc.sh: Likewise.
8306 * gensymlist.sh.in: Likewise.
8308 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8309 * boot/i386/pc/diskboot.S: Likewise.
8310 * boot/i386/pc/pxeboot.S: Likewise.
8311 * commands/blocklist.c: Likewise.
8312 * commands/boot.c: Likewise.
8313 * commands/cat.c: Likewise.
8314 * commands/cmp.c: Likewise.
8315 * commands/configfile.c: Likewise.
8316 * commands/echo.c: Likewise.
8317 * commands/help.c: Likewise.
8318 * commands/ls.c: Likewise.
8319 * commands/search.c: Likewise.
8320 * commands/terminal.c: Likewise.
8321 * commands/test.c: Likewise.
8322 * commands/videotest.c: Likewise.
8323 * commands/i386/cpuid.c: Likewise.
8324 * commands/i386/pc/halt.c: Likewise.
8325 * commands/i386/pc/play.c: Likewise.
8326 * commands/i386/pc/reboot.c: Likewise.
8327 * commands/i386/pc/vbeinfo.c: Likewise.
8328 * commands/i386/pc/vbetest.c: Likewise.
8329 * commands/ieee1275/halt.c: Likewise.
8330 * commands/ieee1275/reboot.c: Likewise.
8331 * commands/ieee1275/suspend.c: Likewise.
8332 * disk/loopback.c: Likewise.
8333 * disk/lvm.c: Likewise.
8334 * disk/raid.c: Likewise.
8335 * disk/efi/efidisk.c: Likewise.
8336 * disk/i386/pc/biosdisk.c: Likewise.
8337 * disk/ieee1275/ofdisk.c: Likewise.
8338 * font/manager.c: Likewise.
8339 * fs/affs.c: Likewise.
8340 * fs/ext2.c: Likewise.
8341 * fs/fat.c: Likewise.
8342 * fs/fshelp.c: Likewise.
8343 * fs/hfs.c: Likewise.
8344 * fs/hfsplus.c: Likewise.
8345 * fs/iso9660.c: Likewise.
8346 * fs/jfs.c: Likewise.
8347 * fs/minix.c: Likewise.
8348 * fs/sfs.c: Likewise.
8349 * fs/ufs.c: Likewise.
8350 * fs/xfs.c: Likewise.
8351 * hello/hello.c: Likewise.
8352 * include/grub/acorn_filecore.h: Likewise.
8353 * include/grub/arg.h: Likewise.
8354 * include/grub/bitmap.h: Likewise.
8355 * include/grub/boot.h: Likewise.
8356 * include/grub/cache.h: Likewise.
8357 * include/grub/device.h: Likewise.
8358 * include/grub/disk.h: Likewise.
8359 * include/grub/dl.h: Likewise.
8360 * include/grub/elfload.h: Likewise.
8361 * include/grub/env.h: Likewise.
8362 * include/grub/err.h: Likewise.
8363 * include/grub/file.h: Likewise.
8364 * include/grub/font.h: Likewise.
8365 * include/grub/fs.h: Likewise.
8366 * include/grub/fshelp.h: Likewise.
8367 * include/grub/gzio.h: Likewise.
8368 * include/grub/hfs.h: Likewise.
8369 * include/grub/kernel.h: Likewise.
8370 * include/grub/loader.h: Likewise.
8371 * include/grub/lvm.h: Likewise.
8372 * include/grub/misc.h: Likewise.
8373 * include/grub/mm.h: Likewise.
8374 * include/grub/net.h: Likewise.
8375 * include/grub/normal.h: Likewise.
8376 * include/grub/parser.h: Likewise.
8377 * include/grub/partition.h: Likewise.
8378 * include/grub/pc_partition.h: Likewise.
8379 * include/grub/raid.h: Likewise.
8380 * include/grub/rescue.h: Likewise.
8381 * include/grub/script.h: Likewise.
8382 * include/grub/setjmp.h: Likewise.
8383 * include/grub/symbol.h: Likewise.
8384 * include/grub/term.h: Likewise.
8385 * include/grub/terminfo.h: Likewise.
8386 * include/grub/tparm.h: Likewise.
8387 * include/grub/types.h: Likewise.
8388 * include/grub/video.h: Likewise.
8389 * include/grub/efi/api.h: Likewise.
8390 * include/grub/efi/chainloader.h: Likewise.
8391 * include/grub/efi/console.h: Likewise.
8392 * include/grub/efi/console_control.h: Likewise.
8393 * include/grub/efi/disk.h: Likewise.
8394 * include/grub/efi/efi.h: Likewise.
8395 * include/grub/efi/pe32.h: Likewise.
8396 * include/grub/efi/time.h: Likewise.
8397 * include/grub/i386/linux.h: Likewise.
8398 * include/grub/i386/setjmp.h: Likewise.
8399 * include/grub/i386/types.h: Likewise.
8400 * include/grub/i386/efi/kernel.h: Likewise.
8401 * include/grub/i386/efi/loader.h: Likewise.
8402 * include/grub/i386/efi/time.h: Likewise.
8403 * include/grub/i386/pc/biosdisk.h: Likewise.
8404 * include/grub/i386/pc/boot.h: Likewise.
8405 * include/grub/i386/pc/chainloader.h: Likewise.
8406 * include/grub/i386/pc/console.h: Likewise.
8407 * include/grub/i386/pc/init.h: Likewise.
8408 * include/grub/i386/pc/kernel.h: Likewise.
8409 * include/grub/i386/pc/loader.h: Likewise.
8410 * include/grub/i386/pc/memory.h: Likewise.
8411 * include/grub/i386/pc/multiboot.h: Likewise.
8412 * include/grub/i386/pc/serial.h: Likewise.
8413 * include/grub/i386/pc/time.h: Likewise.
8414 * include/grub/i386/pc/vbe.h: Likewise.
8415 * include/grub/i386/pc/vbeblit.h: Likewise.
8416 * include/grub/i386/pc/vbefill.h: Likewise.
8417 * include/grub/i386/pc/vbeutil.h: Likewise.
8418 * include/grub/i386/pc/vga.h: Likewise.
8419 * include/grub/ieee1275/ieee1275.h: Likewise.
8420 * include/grub/ieee1275/ofdisk.h: Likewise.
8421 * include/grub/powerpc/libgcc.h: Likewise.
8422 * include/grub/powerpc/setjmp.h: Likewise.
8423 * include/grub/powerpc/types.h: Likewise.
8424 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8425 * include/grub/powerpc/ieee1275/console.h: Likewise.
8426 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8427 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8428 * include/grub/powerpc/ieee1275/loader.h: Likewise.
8429 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8430 * include/grub/powerpc/ieee1275/time.h: Likewise.
8431 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8432 * include/grub/sparc64/libgcc.h: Likewise.
8433 * include/grub/sparc64/setjmp.h: Likewise.
8434 * include/grub/sparc64/types.h: Likewise.
8435 * include/grub/sparc64/ieee1275/console.h: Likewise.
8436 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8437 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8438 * include/grub/sparc64/ieee1275/time.h: Likewise.
8439 * include/grub/util/biosdisk.h: Likewise.
8440 * include/grub/util/getroot.h: Likewise.
8441 * include/grub/util/lvm.h: Likewise.
8442 * include/grub/util/misc.h: Likewise.
8443 * include/grub/util/raid.h: Likewise.
8444 * include/grub/util/resolve.h: Likewise.
8445 * io/gzio.c: Likewise.
8446 * kern/device.c: Likewise.
8447 * kern/disk.c: Likewise.
8448 * kern/dl.c: Likewise.
8449 * kern/elf.c: Likewise.
8450 * kern/env.c: Likewise.
8451 * kern/err.c: Likewise.
8452 * kern/file.c: Likewise.
8453 * kern/fs.c: Likewise.
8454 * kern/loader.c: Likewise.
8455 * kern/main.c: Likewise.
8456 * kern/misc.c: Likewise.
8457 * kern/mm.c: Likewise.
8458 * kern/parser.c: Likewise.
8459 * kern/partition.c: Likewise.
8460 * kern/rescue.c: Likewise.
8461 * kern/term.c: Likewise.
8462 * kern/efi/efi.c: Likewise.
8463 * kern/efi/init.c: Likewise.
8464 * kern/efi/mm.c: Likewise.
8465 * kern/i386/dl.c: Likewise.
8466 * kern/i386/efi/init.c: Likewise.
8467 * kern/i386/efi/startup.S: Likewise.
8468 * kern/i386/pc/init.c: Likewise.
8469 * kern/i386/pc/lzo1x.S: Likewise.
8470 * kern/i386/pc/startup.S: Likewise.
8471 * kern/ieee1275/ieee1275.c: Likewise.
8472 * kern/powerpc/cache.S: Likewise.
8473 * kern/powerpc/dl.c: Likewise.
8474 * kern/powerpc/ieee1275/cmain.c: Likewise.
8475 * kern/powerpc/ieee1275/crt0.S: Likewise.
8476 * kern/powerpc/ieee1275/init.c: Likewise.
8477 * kern/powerpc/ieee1275/openfw.c: Likewise.
8478 * kern/sparc64/cache.S: Likewise.
8479 * kern/sparc64/dl.c: Likewise.
8480 * kern/sparc64/ieee1275/init.c: Likewise.
8481 * kern/sparc64/ieee1275/openfw.c: Likewise.
8482 * loader/efi/chainloader.c: Likewise.
8483 * loader/efi/chainloader_normal.c: Likewise.
8484 * loader/i386/efi/linux.c: Likewise.
8485 * loader/i386/efi/linux_normal.c: Likewise.
8486 * loader/i386/pc/chainloader.c: Likewise.
8487 * loader/i386/pc/chainloader_normal.c: Likewise.
8488 * loader/i386/pc/linux.c: Likewise.
8489 * loader/i386/pc/linux_normal.c: Likewise.
8490 * loader/i386/pc/multiboot.c: Likewise.
8491 * loader/i386/pc/multiboot_normal.c: Likewise.
8492 * loader/powerpc/ieee1275/linux.c: Likewise.
8493 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8494 * normal/arg.c: Likewise.
8495 * normal/cmdline.c: Likewise.
8496 * normal/command.c: Likewise.
8497 * normal/completion.c: Likewise.
8498 * normal/execute.c: Likewise.
8499 * normal/function.c: Likewise.
8500 * normal/lexer.c: Likewise.
8501 * normal/main.c: Likewise.
8502 * normal/menu.c: Likewise.
8503 * normal/menu_entry.c: Likewise.
8504 * normal/misc.c: Likewise.
8505 * normal/parser.y: Likewise.
8506 * normal/script.c: Likewise.
8507 * normal/i386/setjmp.S: Likewise.
8508 * normal/powerpc/setjmp.S: Likewise.
8509 * normal/sparc64/setjmp.S: Likewise.
8510 * partmap/acorn.c: Likewise.
8511 * partmap/amiga.c: Likewise.
8512 * partmap/apple.c: Likewise.
8513 * partmap/gpt.c: Likewise.
8514 * partmap/pc.c: Likewise.
8515 * partmap/sun.c: Likewise.
8516 * term/gfxterm.c: Likewise.
8517 * term/terminfo.c: Likewise.
8518 * term/efi/console.c: Likewise.
8519 * term/i386/pc/console.c: Likewise.
8520 * term/i386/pc/serial.c: Likewise.
8521 * term/i386/pc/vesafb.c: Likewise.
8522 * term/i386/pc/vga.c: Likewise.
8523 * term/ieee1275/ofconsole.c: Likewise.
8524 * util/biosdisk.c: Likewise.
8525 * util/console.c: Likewise.
8526 * util/genmoddep.c: Likewise.
8527 * util/getroot.c: Likewise.
8528 * util/grub-emu.c: Likewise.
8529 * util/grub-mkdevicemap.c: Likewise.
8530 * util/grub-probe.c: Likewise.
8531 * util/lvm.c: Likewise.
8532 * util/misc.c: Likewise.
8533 * util/raid.c: Likewise.
8534 * util/resolve.c: Likewise.
8535 * util/update-grub.in: Likewise.
8536 * util/update-grub_lib.in: Likewise.
8537 * util/grub.d/00_header.in: Likewise.
8538 * util/grub.d/10_hurd.in: Likewise.
8539 * util/grub.d/10_linux.in: Likewise.
8540 * util/i386/efi/grub-install.in: Likewise.
8541 * util/i386/efi/grub-mkimage.c: Likewise.
8542 * util/i386/pc/grub-install.in: Likewise.
8543 * util/i386/pc/grub-mkimage.c: Likewise.
8544 * util/i386/pc/grub-mkrescue.in: Likewise.
8545 * util/i386/pc/grub-setup.c: Likewise.
8546 * util/i386/pc/misc.c: Likewise.
8547 * util/powerpc/ieee1275/grub-install.in: Likewise.
8548 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8549 * util/powerpc/ieee1275/misc.c: Likewise.
8550 * video/bitmap.c: Likewise.
8551 * video/video.c: Likewise.
8552 * video/i386/pc/vbe.c: Likewise.
8553 * video/i386/pc/vbeblit.c: Likewise.
8554 * video/i386/pc/vbefill.c: Likewise.
8555 * video/i386/pc/vbeutil.c: Likewise.
8556 * video/readers/tga.c: Likewise.
8558 2007-07-02 Robert Millan <rmh@aybabtu.com>
8560 * conf/i386-efi.rmk: Replace obsolete reference to
8561 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8562 with util/getroot.c.
8563 * conf/powerpc-ieee1275.rmk: Likewise.
8564 * conf/sparc64-ieee1275.rmk: Likewise.
8566 * util/grub-emu.c (main): Fix unchecked pointer handling.
8568 2007-07-02 Robert Millan <rmh@aybabtu.com>
8570 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8571 invocation to fail, in order to support partition-less media.
8573 * util/i386/pc/grub-install.in: Likewise.
8575 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8576 which fs or partmap modules are needed (akin to its sister scripts).
8578 Also use grub-probe to get rid of unportable /proc/mounts check.
8580 Print the same informational message that the other scripts do, before
8583 2007-06-23 Robert Millan <rmh@aybabtu.com>
8585 * util/update-grub_lib.in (font_path): New function. Determine whether
8586 a font file can be found and, if so, echo the GRUB path to it.
8588 * util/update-grub.in: Handle multiple terminals depending on user
8589 input, platform availability and font file presence. Propagate
8590 variables of our findings to /etc/grub.d/ children.
8592 * util/grub.d/00_header.in: Handle multiple terminals, based on
8593 environment setup by update-grub.
8595 2007-06-23 Robert Millan <rmh@aybabtu.com>
8597 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8599 2007-06-21 Robert Millan <rmh@aybabtu.com>
8601 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8602 indicate end of data section in kernel image.
8603 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8604 GRUB_KERNEL_MACHINE_DATA_END.
8606 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8608 * kern/i386/efi/startup.S: Likewise.
8610 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8611 during image generation. Implement --prefix option to override this
8613 * util/i386/efi/grub-mkimage.c: Likewise.
8615 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8616 code to make path relative to its root into a separate function.
8618 * util/i386/pc/grub-install.in: Use newly provided
8619 make_system_path_relative_to_its_root() to convert ${grubdir}, then
8620 pass the result to grub-install --prefix.
8622 2007-06-13 Robert Millan <rmh@aybabtu.com>
8624 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8626 * util/grub-emu.c: Use above definitions from misc.h instead of
8628 * util/grub-mkdevicemap.c: Likewise.
8629 * util/i386/pc/grub-setup.c: Likewise.
8630 * util/grub-probe.c: Likewise.
8631 (probe): Abort with grub_util_error() when either
8632 grub_guess_root_device or grub_util_get_grub_dev fails.
8634 2007-06-12 Robert Millan <rmh@aybabtu.com>
8636 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8638 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8640 * util/grub-probe.c (probe): Likewise for "drive_name".
8642 2007-06-11 Robert Millan <rmh@aybabtu.com>
8644 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8645 not just the cdrom one.
8647 2007-06-11 Robert Millan <rmh@aybabtu.com>
8649 * util/i386/pc/grub-mkrescue.in: Add "set -e".
8650 Add --pkglibdir=DIR option to override pkglibdir.
8651 Mention --image-type=TYPE in help output.
8652 Fix --grub-mkimage (it was a no-op).
8653 Abort gracefully when no parameter is given.
8655 2007-06-11 Robert Millan <rmh@aybabtu.com>
8657 * util/i386/pc/grub-mkrescue.in: New file.
8658 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
8659 * Makefile.in: Handle bin_SCRIPTS.
8661 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
8663 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8664 list of video modes.
8666 2007-06-06 Robert Millan <rmh@aybabtu.com>
8668 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8669 file doesn't exist, or if it is in a filesystem grub can't read.
8671 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
8672 not abort if GRUB_DRIVE could not be defined. Rearrange generated
8673 header comment to fit in 80 columns when the variables are resolved.
8675 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8676 could be identified by update-grub. Remove redundant check for
8677 unifont.pff existence (since convert_system_path_to_grub_path now
8680 2007-06-04 Robert Millan <rmh@aybabtu.com>
8682 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8684 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8686 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8688 2007-06-04 Robert Millan <rmh@aybabtu.com>
8690 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8692 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8693 grub_apple_partition_map_fini.
8696 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8697 to access >2 TiB disks).
8699 Print disk->total_sectors with %llu instead of %lu, since this
8700 variable is always 64-bit (prevents wrong disk size from being displayed
8701 on either >2 TiB disk or big-endian CPU).
8703 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8704 into a generic case that supports all (sane) partition maps.
8706 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8709 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8710 and grub_apple_partition_map_fini() after that.
8712 2007-06-01 Robert Millan <rmh@aybabtu.com>
8714 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8716 * util/grub.d/00_header.in: Only enable gfxterm when
8717 convert_system_path_to_grub_path() succeeds.
8719 2007-05-20 Robert Millan <rmh@aybabtu.com>
8721 * util/update-grub_lib.in: New file.
8722 * DISTLIST: Add update-grub_lib.in.
8723 * conf/common.rmk: Generate update-grub_lib and install it in
8725 * Makefile.in: Add install routine for $(lib_DATA).
8727 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8728 function provided by update-grub_lib to support arbitrary paths of
8730 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8731 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8733 2007-05-19 Robert Millan <rmh@aybabtu.com>
8735 * commands/i386/cpuid.c: New module.
8737 * conf/i386-efi.rmk: Enable cpuid.mod.
8738 * conf/i386-pc.rmk: Likewise.
8740 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8742 * kern/disk.c (grub_disk_read): Check return value of
8745 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8747 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8749 * disk/raid.c (grub_raid_open): Likewise.
8751 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8753 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8754 stack instead of on the heap.
8756 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8757 before doing a read on it.
8759 * configure.ac: Only use -fno-stack-protector for the target
8762 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8764 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8765 __attribute_ ((unused)) to mode_type argument.
8767 * util/getroot.c (grub_guess_root_device): Fix #endif.
8769 * kern/misc.c (memcmp): Fix prototype.
8771 * include/grub/partition.h [GRUB_UTIL]
8772 (grub_gpt_partition_map_init): Add prototype.
8773 (grub_gpt_partition_map_fini): Likewise.
8775 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8778 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8779 (grub_fat_read_data): Likewise.
8780 (grub_fat_find_dir): Likewise.
8782 * font/manager.c (find_glyph): Make table a const.
8783 (grub_font_get_glyph): Remove bitmap from if statement.
8785 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8787 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8788 code, first search for device in /dev/mapper, then in /dev.
8789 (grub_util_get_grub_dev): New function.
8790 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8792 * util/grub-probe.c (probe): Remove check for RAID, call
8793 grub_util_get_grub_dev() instead of
8794 grub_util_biosdisk_get_grub_dev().
8795 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8796 grub_util_biosdisk_get_grub_dev().
8797 * util/i386/pc/grub-setup.c (main): Likewise.
8799 2007-05-16 Robert Millan <rmh@aybabtu.com>
8801 * DISTLIST: Update for the latest changes.
8802 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8803 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8804 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8805 grub/util/biosdisk.h.
8806 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8807 grub/util/biosdisk.h.
8809 2007-05-16 Robert Millan <rmh@aybabtu.com>
8811 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8813 2007-05-16 Robert Millan <rmh@aybabtu.com>
8815 * util/i386/efi/grub-install.in: New.
8816 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8817 newly added grub-install.
8818 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8820 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8821 grub/util/biosdisk.h.
8822 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8823 grub/util/biosdisk.h.
8825 2007-05-16 Robert Millan <rmh@aybabtu.com>
8827 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8828 * include/grub/util/biosdisk.h: ... here.
8829 * util/i386/pc/biosdisk.c: Moved to ...
8830 * util/biosdisk.c: ... here.
8831 * util/i386/pc/getroot.c: Moved to ...
8832 * util/getroot.c: ... here.
8833 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8834 * util/grub-mkdevicemap.c: ... here.
8835 * util/i386/pc/grub-probe.c: Moved to ...
8836 * util/grub-probe.c: ... here.
8838 2007-05-15 Robert Millan <rmh@aybabtu.com>
8840 * util/update-grub.in: Remove duplicated line in grub.cfg header
8843 2007-05-13 Robert Millan <rmh@aybabtu.com>
8845 * util/update-grub.in: Fix a few assumptions about the devices holding
8846 /, /boot and /boot/grub being the same.
8847 * util/grub.d/00_header.in: Likewise.
8848 * util/grub.d/10_hurd.in: Likewise.
8849 * util/grub.d/10_linux.in: Likewise.
8851 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8852 patterns. Use that to define the `.old' suffix as older than `'.
8854 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8856 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8857 the grub.cfg header message.
8859 2007-05-11 Robert Millan <rmh@aybabtu.com>
8861 * util/update-grub.in: Create device.map if it doesn't already exist,
8862 before attempting to run grub-probe.
8863 Check for grub-probe and grub-mkdevicemap with the same code
8864 grub-install is using.
8867 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8869 * Makefile.in: Add the datarootdir autoconf variable.
8871 2007-05-09 Robert Millan <rmh@aybabtu.com>
8873 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
8874 fail gracefully if dev->disk->partition == NULL.
8876 2007-05-07 Robert Millan <rmh@aybabtu.com>
8878 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8879 determine partition map module.
8880 * util/i386/pc/grub-install.in: Use this feature to decide which
8881 partition module to load, instead of hardcoding pc and gpt.
8883 2007-05-07 Robert Millan <rmh@aybabtu.com>
8885 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8886 source directory differs from build directory.
8888 2007-05-05 Robert Millan <rmh@aybabtu.com>
8890 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8893 2007-05-05 Robert Millan <rmh@aybabtu.com>
8895 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8897 2007-05-05 Robert Millan <rmh@aybabtu.com>
8899 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8900 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8902 2007-05-05 Robert Millan <rmh@aybabtu.com>
8904 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8905 (grub_probe_SOURCES): Likewise.
8906 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8907 GPT and initialize dos_part and bsd_part accordingly.
8908 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8910 (main): Activate gpt module for use during partition identification,
8911 and deactivate it afterwards.
8912 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8913 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8914 partition identification, and deactivate it afterwards.
8916 2007-05-05 Robert Millan <rmh@aybabtu.com>
8918 * term/i386/pc/console.c (grub_console_fini): Call
8919 grub_term_set_current() before grub_term_unregister().
8921 2007-05-04 Robert Millan <rmh@aybabtu.com>
8923 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8924 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8925 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8926 and update-grub_DATA.
8927 * conf/common.rmk: Build and install update-grub components.
8928 * conf/common.mk: Regenerate.
8929 * util/update-grub.in: New. Core of update-grub.
8930 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8931 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8932 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8933 * util/grub.d/README: New. Document grub.d directory layout.
8935 2007-05-01 Robert Millan <rmh@aybabtu.com>
8937 * util/grub-emu.c: Move initialization functions
8938 grub_util_biosdisk_init() and grub_init_all() before
8939 grub_util_biosdisk_get_grub_dev(), which relies on them.
8941 2007-04-19 Robert Millan <rmh@aybabtu.com>
8943 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8946 2007-04-18 Jerone Young <jerone@gmail.com>
8948 * kernel/elf.c: Add missing parenthesis for conditional statement
8951 2007-04-10 Jerone Young <jerone@gmail.com>
8953 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8954 continue on and look for device node with real device name.
8956 2007-04-10 Jerone Young <jerone@gmail.com>
8958 * configure.ac: Add argument for autoconf to use transformation
8960 * Makefile.in: Add autoconf package transformation code.
8961 * util/i386/pc/grub-install.in: Likewise.
8962 * util/powerpc/ieee1275/grub-install.in: Likewise.
8964 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8966 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8967 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8968 (EXT2_REVISION): Likewise.
8969 (EXT2_INODE_SIZE): Likewise.
8970 (struct grub_ext2_block_group): Added a missing member
8972 (grub_ext2_read_inode): Divide by the inode size in a superblock
8973 instead of 128 to obtain INODES_PER_BLOCK.
8974 Use the macro EXT2_INODE_SIZE instead of directly using
8977 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8979 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8980 superblock instead of the structure size to compute an
8981 offset. This fixes the problem that GRUB could not read a
8982 filesystem when inode size is different from 128-byte.
8984 2007-03-05 Marco Gerards <marco@gnu.org>
8986 * normal/main.c (read_config_file): When "menu" is not set, create
8989 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8991 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8992 (HEAP_LIMIT): New macro.
8993 (grub_claim_heap): Claim memory up to `heaplimit'.
8995 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8997 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8998 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9000 (grub_arch_modules_addr): Return address after `_end'.
9001 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9002 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9003 (add_segments): Calculate `_end' from phdr size and location.
9004 (ALIGN_UP): Moved to ...
9005 * include/grub/misc.h: here.
9006 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9008 (GRUB_IEEE1275_MODULE_BASE): Removed.
9010 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9012 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9015 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9017 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9019 (grub_elf64_load_hook_t): Likewise.
9020 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9023 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9025 * kern/mm.c: Update copyright.
9026 (grub_mm_debug): Correct syntax error.
9027 (grub_mm_dump_free): New function.
9028 (grub_debug_free): Call `grub_free'.
9029 * include/grub/mm.h: Update copyright.
9030 (grub_mm_dump_free): Add declaration.
9032 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9034 * include/grub/ieee1275/ieee1275.h: Update copyright.
9035 * kern/powerpc/ieee1275/init.c: Likewise.
9036 * kern/powerpc/ieee1275/openfw.c: Likewise.
9038 * loader/powerpc/ieee1275/linux.c: Likewise.
9039 * include/grub/elfload.h: Likewise.
9040 * kern/elf.c: Likewise.
9041 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9043 (grub_elf64_load): Likewise.
9044 (grub_elf32_load_segment): Move to a nested function.
9045 (grub_elf64_load_segment): Likewise.
9047 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9049 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9051 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9052 (grub_heap_len): Likewise.
9053 (HEAP_SIZE): New macro.
9054 (grub_claim_heap): New function.
9055 (grub_machine_init): Don't claim heap directly. Call
9057 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9058 (grub_available_iterate): New function.
9060 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9062 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9063 * configure.ac: Use it for testing the HOST and TARGET compilers.
9065 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9067 * Makefile.in (enable_grub_emu): New variable.
9068 * configure.ac (--enable-grub-emu): New option.
9069 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9070 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9071 * conf/i386-pc.rmk: Likewise.
9072 * conf/powerpc-ieee1275.rmk: Likewise.
9073 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9075 2006-12-12 Marco Gerards <marco@gnu.org>
9077 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9079 * kern/env.c (grub_env_unset): Don't free the member `value' when
9080 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9083 * normal/main.c (current_menu): Removed.
9084 (free_menu): Unset the `menu' environment variable.
9085 (grub_normal_menu_addentry): Make use of the environment variable
9086 `menu', instead of using the global `current_menu'. Allocate
9087 memory for the sourcecode of this entry.
9088 (read_config_file): New argument `nested', changed all callers.
9089 Only in the case of a new context, initialize a new menu. Set the
9090 `menu' environment variable.
9091 (grub_normal_execute): Don't set and unset the environment
9092 variable `menu' here anymore. Only free the menu when leaving the
9095 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9098 2006-12-11 Marco Gerards <marco@gnu.org>
9100 * normal/menu_entry.c (run): Fix off by one bug so the last line
9101 is executed. Move the loader check to outside the loop.
9103 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9105 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9107 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9109 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9110 the number of sectors. Reported by Andrey Shuvikov
9111 <mr_hyro@yahoo.com>.
9113 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9115 * kern/disk.c (grub_disk_read): When there is a read error, always
9116 try to read only the necessary data.
9118 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9120 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9122 [GRUB_UTIL] (grub_raid_fini): Likewise.
9123 [GRUB_UTIL] (grub_lvm_init): Likewise.
9124 [GRUB_UTIL] (grub_lvm_fini): Likewise.
9125 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9126 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9127 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9128 and grub_raid_fini().
9130 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9132 * include/grub/types.h (__unused): Rename to UNUSED.
9133 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9134 (grub_elf64_size): Likewise.
9136 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9138 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9139 grub_error_push and grub_error_pop in the error-handling path.
9140 (grub_elf32_load_segment): Only call grub_file_read with non-zero
9143 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9145 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9146 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9147 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9148 (kernel_elf_SOURCES): Likewise.
9149 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9150 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9151 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9152 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9153 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9154 (elf_mod_SOURCES): New variable.
9155 (elf_mod_CFLAGS): Likewise.
9156 (elf_mod_LDFLAGS): Likewise.
9157 * include/grub/types.h (__unused): New macro.
9158 * include/grub/elfload.h: New file.
9159 * kern/elf.c: Likewise.
9160 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9161 (ELF32_LOADMASK): New macro.
9162 (ELF64_LOADMASK): Likewise.
9164 (grub_linux_load32): New function.
9165 (grub_linux_load64): Likewise.
9166 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9167 Use grub_elf_t instead of grub_file_t.
9169 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
9171 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9172 `catch_result' to struct set_color_args.
9174 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9176 * normal/menu.c: Include grub/script.h.
9177 * normal/menu_entry.c: Likewise.
9178 * include/grub/normal.h: Do not include grub/script.h.
9180 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9182 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9184 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9186 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9188 (grub_disk_close): Print debug messages when closing a disk.
9189 (grub_disk_read): Print debug messages when disk read fails.
9190 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9192 * kern/partition.c: Include misc.h.
9193 (grub_partition_iterate): Print debug messages when detecting
9196 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9198 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9200 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9202 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9204 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9205 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9207 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
9209 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9210 instead of sizeof(lv). Patch by Michael Guntsche.
9212 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
9214 * disk/lvm.c: Rename VGS to VG_LIST.
9215 (grub_lvm_iterate): Change VGS->LV to VG-LV.
9216 (grub_lvm_open): Likewise.
9217 Thanks to Michael Guntsche for finding this bug.
9219 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9221 * configure.ac (AC_INIT): Bumped to 1.95.
9223 2006-10-14 Robert Millan <rmh@aybabtu.com>
9225 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9226 with "/dev/.static/dev/md".
9228 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9230 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9231 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9232 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9233 DRIVE_NAME are always freed.
9235 * util/i386/pc/biosdisk.c (make_device_name): Add one into
9236 DOS_PART, as a DOS partition is counted from one instead of zero
9237 now. Reported by Robert Millan.
9239 2006-10-14 Robert Millan <rmh@aybabtu.com>
9241 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9242 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9243 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9244 string returned by grub_guess_root_device.
9245 * util/i386/pc/grub-setup.c: Likewise.
9246 * util/i386/pc/grub-probefs.c: Likewise.
9248 * util/i386/pc/grub-probefs.c: Rename to ...
9249 * util/i386/pc/grub-probe.c: ... this.
9250 * DISTLIST: Remove grub-probefs, add grub-probe.
9251 * conf/i386-efi.rmk: Likewise.
9252 * conf/i386-pc.rmk: Likewise.
9253 * util/i386/pc/grub-install.in: Likewise.
9255 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9256 choose which information we want to print.
9258 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9260 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9261 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9262 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9263 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9264 video/readers/tga.c and video/i386/pc/vbeutil.c.
9266 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9268 Added support for RAID and LVM.
9270 * disk/lvm.c: New file.
9271 * disk/raid.c: Likewise.
9272 * include/grub/lvm.h: Likewise.
9273 * include/grub/raid.h: Likewise.
9274 * include/grub/util/lvm.h: Likewise.
9275 * include/grub/util/raid.h: Likewise.
9276 * util/lvm.c: Likewise.
9277 * util/raid.c: Likewise.
9279 * include/grub/disk.h (grub_disk_dev_id): Add
9280 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9281 (grub_disk_get_size): New prototype.
9282 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9283 returns a partition.
9284 (grub_disk_get_size): New function.
9286 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9287 verbatim if grub_install_dos_part is -2.
9289 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9292 * util/i386/pc/grub-setup.c (setup): New argument
9293 MUST_EMBED. Force embedding of GRUB when the argument is
9294 true. Close FILE before returning.
9295 (main): Add support for RAID and LVM.
9297 * conf/common.rmk: Add RAID and LVM modules.
9298 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9300 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9302 * kern/misc.c (grub_strstr): New function.
9303 * include/grub/misc.h (grub_strstr): New prototype.
9305 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9307 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9309 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9311 * kern/misc.c (grub_strtoull): Guess the base only if not
9314 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9316 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9319 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9321 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9323 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9324 Remove `flags' argument. All callers changed.
9325 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9326 (IEEE1275_IHANDLE_INVALID): New variable.
9327 (IEEE1275_CELL_INVALID): New variable.
9328 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9329 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9330 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9331 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9332 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9333 codes from Open Firmware. All callers updated.
9334 (grub_ieee1275_next_property): Directly return Open Firmware return
9336 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9337 Standardize error checking from `grub_ieee1275_get_property'.
9338 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9339 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9341 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9343 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9344 `instance_to_package_args' to `instance_to_path_args'.
9346 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9347 `grub_ieee1275_chosen'.
9349 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9350 `grub_ieee1275_interpret'.
9352 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9354 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9356 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9358 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9359 (__cmpdi): Likewise.
9361 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9362 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9365 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
9367 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9368 to type `grub_ssize_t'.
9369 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9371 2006-09-22 Marco Gerards <marco@gnu.org>
9373 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9376 2006-09-22 Marco Gerards <marco@gnu.org>
9378 * commands/echo.c: New file.
9380 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9382 * conf/common.rmk (echo_mod_SOURCES): New variable.
9383 (echo_mod_CFLAGS): Likewise.
9384 (echo_mod_LDFLAGS): Likewise.
9386 2006-09-22 Marco Gerards <marco@gnu.org>
9388 * normal/main.c (get_line): Malloc memory instead of using
9389 preallocated memory. Removed the arguments `cmdline' and
9390 `max_len'. Updated all callers.
9392 2006-09-22 Marco Gerards <marco@gnu.org>
9394 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9395 (normal_mod_DEPENDENCIES): Likewise.
9397 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9398 (normal_mod_DEPENDENCIES): Likewise.
9400 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9402 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
9404 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9406 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9407 (normal_mod_DEPENDENCIES): Likewise.
9408 * conf/i386-pc.mk: Regenerate.
9409 * conf/i386-efi.mk: Likewise
9410 * conf/common.mk: Likewise.
9411 * conf/powerpc-ieee1275.mk: Likewise.
9412 * conf/sparc64-ieee1275.mk: Likewise.
9414 2006-09-22 Robert Millan <rmh@aybabtu.com>
9416 Sync with i386 version.
9417 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9418 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9420 2006-09-21 Robert Millan <rmh@aybabtu.com>
9422 Import from GRUB Legacy (lib/device.c):
9423 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9424 (init_device_map) [__linux__]: Add support for I2O devices.
9426 2006-09-14 Marco Gerards <marco@gnu.org>
9428 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9431 2006-09-14 Robert Millan <rmh@aybabtu.com>
9433 * util/i386/pc/grub-install.in: Skip menu.lst when removing
9436 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
9438 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9439 before adding it to device.map.
9441 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
9443 * genmk.rb: Let GCC generate dependencies the first time it
9444 compiles a file; using the -MD option.
9445 * conf/common.mk: Regenerate.
9446 * conf/i386-pc.mk: Likewise.
9447 * conf/i386-efi.mk: Likewise.
9448 * conf/powerpc-ieee1275.mk: Likewise.
9449 * conf/sparc64-ieee1275.mk: Likewise.
9451 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
9453 Move the prototypes of grub_setjmp and grub_longjmp to
9454 cpu/setjmp.h, so that each architecture may specify different
9457 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
9458 (grub_longjmp): Likewise.
9459 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
9460 (grub_longjmp): Likewise.
9461 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
9462 (grub_longjmp): Likewise.
9464 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
9465 [!GRUB_UTIL] (grub_longjmp): Removed.
9467 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
9469 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
9470 "color!" method does not return any value.
9472 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9474 * include/grub/bitmap.h: New file.
9476 * include/grub/i386/pc/vbeutil.h: Likewise.
9478 * video/bitmap.c: Likewise.
9480 * video/readers/tga.c: Likewise.
9482 * video/i386/pc/vbeutil.c: Likewise.
9484 * commands/videotest.c: Code cleanup and updated to reflect to new
9487 * term/gfxterm.c: Likewise.
9489 * video/video.c: Likewise.
9491 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
9492 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
9493 (bitmap_mod_SOURCES): New entry.
9494 (bitmap_mod_CFLAGS): Likewise.
9495 (bitmap_mod_LDFLAGS): Likewise.
9496 (tga_mod_SOURCES): Likewise.
9497 (tga_mod_CFLAGS): Likewise.
9498 (tga_mod_LDFLAGS): Likewise.
9500 * include/grub/video.h (grub_video_blit_operators): New enum type.
9501 (grub_video_render_target): Changed as forward declaration and moved
9502 actual definition to be video driver specific.
9503 (grub_video_adapter.blit_bitmap): Added blitting operator.
9504 (grub_video_adapter.blit_render_target): Likewise.
9505 (grub_video_blit_bitmap): Likewise.
9506 (grub_video_blit_render_target): Likewise.
9508 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9509 driver specific render target definition.
9510 (grub_video_vbe_map_rgba): Added driver internal helper.
9511 (grub_video_vbe_unmap_color): Updated to use
9512 grub_video_i386_vbeblit_info.
9513 (grub_video_vbe_get_video_ptr): Likewise.
9515 * include/grub/i386/pc/vbeblit.h
9516 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9517 grub_video_i386_vbeblit_info.
9518 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9519 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9520 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9521 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9522 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9523 (grub_video_i386_vbeblit_index_index): Likewise.
9524 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9525 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9526 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9527 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9529 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9532 * video/i386/pc/vbeblit.c: Updated to reflect changes on
9533 include/grub/i386/pc/vbeblit.h.
9535 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9536 Updated to use grub_video_i386_vbeblit_info.
9537 (grub_video_i386_vbefill_R8G8B8): Likewise.
9538 (grub_video_i386_vbefill_index): Likewise.
9539 (grub_video_i386_vbefill): Added generic filler.
9541 * video/i386/pc/vbefill.c: Updated to reflect changes on
9542 include/grub/i386/pc/vbefill.h.
9544 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9545 grub_video_i386_vbeblit_info.
9546 (grub_video_vbe_unmap_color): Likewise.
9547 (grub_video_vbe_blit_glyph): Likewise.
9548 (grub_video_vbe_scroll): Likewise.
9549 (grub_video_vbe_draw_pixel): Removed function.
9550 (grub_video_vbe_get_pixel): Likewise.
9551 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9552 updated code to use it.
9553 (common_blitter): Added common blitter for render target and bitmap.
9554 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9555 (grub_video_vbe_blit_render_target): Likewise.
9557 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
9559 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9560 is in text mode if there is no console control protocol instance
9563 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9565 * include/grub/video.h: Code cleanup.
9567 * include/grub/i386/pc/vbe.h: Likewise.
9569 * video/i386/pc/vbe.c: Likewise.
9571 * video/i386/pc/vbeblit.c: Likewise.
9573 * video/i386/pc/vbefill.c: Likewise.
9575 * video/video.c: Likewise. Also added more comments.
9577 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9579 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9580 (struct grub_biosdisk_dap): Likewise.
9582 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
9583 linkage settings for all functions.
9585 2006-07-12 Marco Gerards <marco@gnu.org>
9587 * configure.ac (--enable-mm-debug): Fix typo.
9589 * genkernsyms.sh.in: Use proper quoting for `CC'.
9591 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
9593 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9594 (normal_mod_ASFLAGS): Remove "-m32".
9596 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
9598 * util/misc.c: Include config.h.
9599 [!HAVE_MEMALIGN]: Do not include malloc.h.
9600 (grub_memalign): Use posix_memalign, if present. Then, use
9601 memalign, if present. Otherwise, emit an error.
9603 * util/grub-emu.c: Do not include malloc.h.
9605 * include/grub/util/misc.h: Include unistd.h. This is required for
9606 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9607 D. Eades III <hde@foobar-qux.org>.
9609 * configure.ac (AC_GNU_SOURCE): Added.
9610 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9613 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
9615 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9616 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9618 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
9620 * include/grub/types.h (grub_host_addr_t): Rename to
9622 (grub_host_off_t): Rename to grub_target_off_t.
9623 (grub_host_size_t): Rename to grub_target_size_t.
9624 (grub_host_ssize_t): Rename to grub_target_ssize_t.
9625 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9627 * include/grub/kernel.h (struct grub_module_header): Change type
9628 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9629 (grub_module_info): Likewise.
9631 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9633 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9634 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9635 Velazquez <jesus.velazquez@gmail.com>.
9637 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9639 Count partitions from 1 instead of 0 in the string representation
9640 of partitions. Still use 0-based internally.
9642 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9643 (sun_partition_map_iterate): Use grub_partition_t instead of
9644 struct grub_partition *. Cast DESC->START_CYLINDER to
9645 grub_uint64_t after converting the endian.
9646 (sun_partition_map_probe): Subtract 1 for PARTNUM.
9647 (sun_partition_map_get_name): Add 1 to P->INDEX.
9649 * partmap/pc.c (grub_partition_parse): Subtract 1 for
9651 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9653 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9654 zero instead of one.
9655 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9656 (gpt_partition_map_get_name): Add 1 into P->INDEX.
9658 * partmap/apple.c (apple_partition_map_iterate): Change the type
9660 (apple_partition_map_probe): Subtract 1 for PARTNUM.
9661 (apple_partition_map_get_name): Add 1 into P->INDEX.
9663 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9665 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9666 calculate the offset of a partition.
9667 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9668 (amiga_partition_map_get_name): Add 1 into P->INDEX.
9670 * partmap/acorn.c (acorn_partition_map_find): Change the type of
9671 SECTOR to grub_disk_addr_t.
9672 (acorn_partition_map_iterate): Likewise.
9673 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9674 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9676 (acorn_partition_map_get_name): Add 1 into P->INDEX.
9678 * kern/i386/pc/init.c (make_install_device): Add 1 into
9679 GRUB_INSTALL_DOS_PART.
9681 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9684 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9686 Clean up the code to support 64-bit addressing in disks and
9687 files. This change is not enough for filesystems yet.
9689 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9690 type of "start" to grub_uint64_t.
9691 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9692 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9693 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9696 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9697 to grub_disk_addr_t.
9699 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9702 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9704 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9707 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9709 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9711 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9713 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9714 to grub_off_t, to detect an error from grub_file_seek.
9715 (grub_multiboot_load_elf32): Likewise.
9717 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9718 maximum unsigned long value when an overflow is detected.
9719 (grub_strtoull): New function.
9720 (grub_divmod64): Likewise.
9721 (grub_lltoa): use grub_divmod64.
9723 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9725 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9726 the pointer to next character. Use grub_strtoull instead of
9728 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9729 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9732 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9733 return value is signed.
9734 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9735 test if OFFSET is less than zero, as OFFSET is unsigned now.
9737 * kern/disk.c (struct grub_disk_cache): Change the type of
9738 "sector" to grub_disk_addr_t.
9739 (grub_disk_cache_get_index): Change the type of SECTOR to
9740 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9741 unsigned after shifting.
9742 (grub_disk_cache_invalidate): Change the type of SECTOR to
9744 (grub_disk_cache_unlock): Likewise.
9745 (grub_disk_cache_store): Likewise.
9746 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9747 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9748 grub_disk_addr_t and grub_uint64_t, respectively.
9749 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9750 body, as the value of OFFSET is tweaked by
9751 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9752 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9754 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9755 body, as the value of OFFSET is tweaked by
9756 grub_disk_check_range. Change the types of LEN and N to
9759 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9760 and "saved_offset" to grub_off_t.
9761 (test_header): Cast BUF to char *.
9762 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9764 (grub_gzio_read): Change the types of OFFSET and SIZE to
9765 grub_off_t and grub_size_t, respectively.
9767 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9769 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9770 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9771 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9772 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9773 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9775 * include/grub/types.h (grub_off_t): Unconditionally set to
9777 (grub_disk_addr_t): Changed to grub_uint64_t.
9779 * include/grub/partition.h (struct grub_partition): Change the
9780 types of "start", "len" and "offset" to grub_disk_addr_t,
9781 grub_uint64_t and grub_disk_addr_t, respectively.
9782 (grub_partition_get_start): Return grub_disk_addr_t.
9783 (grub_partition_get_len): Return grub_uint64_t.
9785 * include/grub/misc.h (grub_strtoull): New prototype.
9786 (grub_divmod64): Likewise.
9788 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9789 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9790 grub_off_t, respectively.
9791 All callers and references changed.
9793 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9794 grub_size_t in "read".
9795 All callers and references changed.
9797 * include/grub/file.h (struct grub_file): Change the types of
9798 "offset" and "size" to grub_off_t and grub_off_t,
9799 respectively. Change the type of SECTOR to grub_disk_addr_t in
9801 (grub_file_read): Change the type of LEN to grub_size_t.
9802 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9804 (grub_file_size): Return grub_off_t.
9805 (grub_file_tell): Likewise.
9806 All callers and references changed.
9808 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9809 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9811 (struct grub_disk): Change the type of "total_sectors" to
9812 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
9814 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9815 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9816 (grub_disk_write): Likewise.
9817 All callers and references changed.
9819 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9820 char * for grub_strncmp to silence gcc.
9821 (grub_iso9660_mount): Likewise.
9822 (grub_iso9660_mount): Likewise.
9823 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9825 (grub_iso9660_iterate_dir): Likewise.
9826 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9828 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9829 LEN to grub_disk_addr_t and grub_size_t, respectively.
9831 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9833 * fs/jfs.c (grub_jfs_read_file): Likewise.
9835 * fs/minix.c (grub_jfs_read_file): Likewise.
9837 * fs/sfs.c (grub_jfs_read_file): Likewise.
9839 * fs/ufs.c (grub_jfs_read_file): Likewise.
9841 * fs/xfs.c (grub_jfs_read_file): Likewise.
9843 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9844 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9847 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9848 BLKNR to -1 instead of returning GRUB_ERRNO.
9849 (grub_ext2_read_file): Change the types of SECTOR and
9850 LEN to grub_disk_addr_t and grub_size_t, respectively.
9852 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9853 LEN to grub_disk_addr_t and grub_size_t, respectively.
9855 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9858 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9859 string. Do not cast SECTOR explicitly.
9861 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9862 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9863 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9864 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9865 over 2TB and LBA mode is not supported, raise an error.
9866 (get_safe_sectors): New function.
9867 (grub_biosdisk_read): Use get_safe_sectors.
9868 (grub_biosdisk_write): Likewise.
9870 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9871 (grub_efidisk_write): Likewise.
9873 * disk/loopback.c (delete_loopback): Cosmetic changes.
9874 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9876 (grub_loopback_open): Likewise.
9877 (grub_loopback_read): Likewise. Also, change the type of POS to
9878 grub_off_t, and fix the usage of grub_memset.
9880 * commands/i386/pc/play.c: Include grub/machine/time.h.
9882 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9885 * commands/configfile.c: Include grub/env.h.
9887 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9888 GRUB_ERRNO directly instead. Change the type of POS to
9889 grub_off_t. Follow the coding standard.
9891 * commands/blocklist.c: Include grub/partition.h.
9892 (grub_cmd_blocklist): Return an error if the underlying device is
9893 not a disk. Take the starting sector of a partition into account,
9894 if a partition is used.
9896 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9898 (lba_mode): Support 64-bit addresses.
9899 (chs_mode): Likewise.
9900 (copy_buffer): Adapted to the new offsets of a length field and a
9902 (blocklist_default_start): Allocate 64-bit space.
9904 * boot/i386/pc/boot.S (force_lba): Removed.
9905 (boot_drive): Moved to under KERNEL_SECTOR.
9906 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
9908 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9910 (lba_mode): Refactored to support a 64-bit address. More size
9912 (setup_sectors): Likewise.
9914 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9916 * DISTLIST: Added include/grub/i386/linux.h. Removed
9917 include/grub/i386/pc/linux.h
9919 * configure.ac (AC_INIT): Bumped to 1.94.
9921 * config.guess: Updated from gnulib.
9922 * config.sub: Likewise.
9923 * install-sh: Likewise.
9924 * mkinstalldirs: Likewise.
9926 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9928 * conf/common.rmk (grub_modules_init.lst): Depended on
9929 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9932 * genmk.rb (PModule::rule): Reverted the previous change.
9934 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9936 * conf/common.rmk (grub_modules_init.lst): Depends on
9937 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9938 that the target does not exist before producing.
9939 (grub_modules_init.h): Remove the target before generating.
9940 (grub_emu_init.c): Likewise.
9942 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9944 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9946 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9947 for the target-specific tests. Make sure that we also have the
9948 up-to-date target variables for those tests.
9950 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9952 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9953 (PModule::rule): Likewise.
9955 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9957 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9958 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9959 target-specific flags should be prefixed.
9960 (PModule::rule): Likewise.
9962 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9964 * configure.ac (CMP): Check if cmp is available explicitly.
9966 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9968 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9969 (target_cpu): New variable.
9970 (pkglibdir): Use target_cpu instead of host_cpu.
9972 * util/i386/pc/grub-install.in (host_cpu): Removed.
9973 (target_cpu): New variable.
9974 (pkglibdir): Use target_cpu instead of host_cpu.
9976 * util/genmoddep.c: Removed.
9978 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9979 instead of GRUB_HOST_SIZEOF_VOID_P.
9980 * kern/dl.c: Likewise.
9982 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9984 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9985 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9986 (GRUB_TARGET_SIZEOF_LONG): ... this.
9987 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9988 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9989 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9991 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9992 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9993 (GRUB_TARGET_SIZEOF_LONG): ... this.
9994 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9995 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9996 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9998 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9999 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10000 (GRUB_TARGET_SIZEOF_LONG): ... this.
10001 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10002 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10004 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10005 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10006 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10007 instead of GRUB_HOST_SIZEOF_LONG.
10008 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10009 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10010 GRUB_CPU_WORDS_BIGENDIAN.
10011 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10012 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10015 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10016 (genmoddep_SOURCES): Likewise.
10017 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10018 (genmoddep_SOURCES): Likewise.
10019 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10020 (genmoddep_SOURCES): Likewise.
10021 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10023 (genmoddep_SOURCES): Likewise.
10025 * genmoddep.awk: New file.
10027 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10028 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10029 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10030 (PModule::rule): Likewise.
10031 (Program::rule): Likewise.
10032 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10033 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10036 * configure.ac: Rewritten intensively to use host and target
10037 instead of build and host, respectively.
10039 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10040 (host_cpu): Removed.
10041 (target_cpu): New variable.
10042 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10043 (BUILD_CC): Removed.
10044 (BUILD_CFLAGS): Likewise.
10045 (BUILD_CPPFLAGS): Likewise.
10046 (TARGET_CC): New variable.
10047 (TARGET_CFLAGS): Likewise.
10048 (TARGET_CPPFLAGS): Likewise.
10049 (TARGET_LDFLAGS): Likewise.
10051 (include): Use target_cpu instead of host_cpu.
10052 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
10054 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10056 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10058 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10059 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10060 field 'false' to 'exec_on_false'.
10061 (grub_script_create_cmdif): Renamed argument names to reflect above
10064 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10066 * normal/script.c (grub_script_create_cmdif): Likewise.
10068 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10070 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10072 (grub_hfsplus_btree_recptr): Likewise.
10073 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10074 FILEBLOCK both to pass a block number and store next block
10076 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10077 overflow file correctly. Specify errors appropriately, because
10078 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10079 grub_hfsplus_btree_recptr to get the pointer to a found key.
10080 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10083 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10085 (_linux_mod_SOURCES): New variable.
10086 (_linux_mod_CFLAGS): Likewise.
10087 (_linux_mod_LDFLAGS): Likewise.
10088 (linux_mod_SOURCES): Likewise.
10089 (linux_mod_CFLAGS): Likewise.
10090 (linux_mod_LDFLAGS): Likewise.
10092 * DISTLIST: Added loader/i386/efi/linux.c,
10093 loader/i386/efi/linux_normal.c and
10094 include/grub/i386/efi/loader.h.
10096 * loader/i386/efi/linux.c: New file.
10097 * loader/i386/efi/linux_normal.c: Likewise.
10098 * include/grub/i386/efi/loader.h: Likewise.
10100 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10102 * commands/blocklist.c: New file.
10104 * DISTLIST: Added commands/blocklist.c.
10106 * term/efi/console.c (grub_console_highlight_color): Use a lighter
10107 color for the background, and a darker color for the foreground.
10108 (grub_console_checkkey): Return READ_KEY.
10109 (grub_console_cls): Set the background to
10110 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10112 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10114 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10115 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10117 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10120 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10121 BG. The spec is wrong again.
10123 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10125 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10127 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10128 commands/blocklist.c.
10129 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10131 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10132 (blocklist_mod_SOURCES): New variable.
10133 (blocklist_mod_CFLAGS): Likewise.
10134 (blocklist_mod_LDFLAGS): Likewise.
10136 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
10138 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10140 (lba_mode): Use %eax more intensively to reduce the code size.
10142 2006-05-20 Marco Gerards <marco@gnu.org>
10144 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10146 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
10148 (script): Accept leading newlines.
10149 (newlines): New rule to describe 0 or more newlines.
10150 (commands): Accept `command' with trailing newline. Fixed the
10151 order in which arguments were passed to `grub_script_add_cmd'.
10152 Accept commands separated by newlines.
10153 (function): Changed to accept newlines.
10154 (menuentry) Rewritten.
10156 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10157 front of the list, instead of to the end.
10159 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
10161 * util/i386/pc/grub-install.in (bindir): New variable.
10162 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10163 Shaver <lbgwjl@gmail.com>.
10165 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
10167 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10168 grub/machine/linux.h
10169 * loader/i386/pc/linux.c: Likewise.
10171 * include/grub/i386/pc/linux.h: Moved to ...
10172 * include/grub/i386/linux.h: ... here.
10174 * include/grub/i386/linux.h (struct linux_kernel_params): New
10177 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
10179 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10181 (grub_video_vbe_blit_glyph): Likewise.
10182 (grub_video_vbe_blit_bitmap): Likewise.
10183 (grub_video_vbe_blit_render_target): Likewise.
10185 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10187 * configure.ac (--with-platform): Properly quote the square
10190 2006-05-08 Marco Gerards <marco@gnu.org>
10192 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10194 (kernel_elf_HEADERS): ...to this. Updated all users.
10195 (grubof_symlist.c): Renamed from this...
10196 (kernel_elf_symlist.c): ...to this. Updated all users.
10197 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10198 (grubof_SOURCES): Renamed from this...
10199 (kernel_elf_SOURCES): ...to this.
10200 (grubof_HEADERS): Renamed from this...
10201 (kernel_elf_HEADERS): ...to this.
10202 (grubof_CFLAGS): Renamed from this...
10203 (kernel_elf_CFLAGS): ...to this.
10204 (grubof_ASFLAGS): Renamed from this...
10205 (kernel_elf_ASFLAGS): ...to this.
10206 (grubof_LDFLAGS): Renamed from this...
10207 (kernel_elf_LDFLAGS): ...to this.
10209 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10211 (kernel_elf_HEADERS): ...to this. Updated all users.
10212 (grubof_symlist.c): Renamed from this...
10213 (kernel_elf_symlist.c): ...to this. Updated all users.
10214 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10215 (grubof_SOURCES): Renamed from this...
10216 (kernel_elf_SOURCES): ...to this.
10217 (grubof_HEADERS): Renamed from this...
10218 (kernel_elf_HEADERS): ...to this.
10219 (grubof_CFLAGS): Renamed from this...
10220 (kernel_elf_CFLAGS): ...to this.
10221 (grubof_ASFLAGS): Renamed from this...
10222 (kernel_elf_ASFLAGS): ...to this.
10223 (grubof_LDFLAGS): Renamed from this...
10224 (kernel_elf_LDFLAGS): ...to this.
10226 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10227 `kernel.elf' instead of `grubof'.
10229 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
10231 Add --with-platform to configure. Use pkglibdir instead of
10232 pkgdatadir. This is reported by Roger Leigh.
10234 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10235 (host_vendor): Likewise.
10236 (host_os): Likewise.
10237 (pkgdatadir): Likewise.
10238 (platform): New variable.
10239 (pkglibdir): Likewise.
10240 Use PKGLIBDIR instead of PKGDATADIR.
10242 * util/i386/pc/grub-install.in (datadir): Removed.
10243 (host_vendor): Likewise.
10244 (host_os): Likewise.
10245 (pkgdatadir): Likewise.
10246 (platform): New variable.
10247 (pkglibdir): Likewise.
10248 Use PKGLIBDIR instead of PKGDATADIR.
10250 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10251 instead of GRUB_DATADIR.
10253 * util/i386/pc/grub-mkimage.c (usage): Likewise.
10255 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10258 * configure.ac (--with-platform): New option.
10259 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10261 * Makefile.in: Include a makefile based on PLATFORM instead of
10263 (pkgdatadir): Not appended by the machine type.
10264 (pkglibdir): Appended by the machine type.
10265 (host_vendor): Removed.
10266 (platform): New variable.
10267 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10268 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10269 (uninstall): Likewise.
10271 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10273 Use the environment context in the menu. Remove the commands
10274 "default" and "timeout", and use variables instead.
10276 * normal/menu.c: Include grub/env.h.
10277 (print_entry): Cast TITLE to silence gcc.
10278 (get_timeout): New function.
10279 (set_timeout): Likewise.
10280 (get_entry_number): Likewise.
10281 (run_menu): Use a default entry, a fallback entry and a timeout
10282 in the environment variables "default", "fallback" and
10283 "timeout". Also, tweak the default entry if it is not within the
10284 current menu entries.
10285 (grub_menu_run): Use a fallback entry in the environment variable
10288 * normal/main.c (read_config_file): Do not initialize
10289 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10291 (grub_normal_execute): Use a data slot to store the menu.
10293 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10294 fallback_entry and timeout.
10295 (struct grub_menu_list): Removed.
10296 (grub_menu_list_t): Likewise.
10297 (struct grub_context): Likewise.
10298 (grub_context_t): Likewise.
10299 (grub_context_get): Likewise.
10300 (grub_context_get_current_menu): Likewise.
10301 (grub_context_push_menu): Likewise.
10302 (grub_context_pop_menu): Likewise.
10303 (grub_default_init): Likewise.
10304 (grub_default_fini): Likewise.
10305 (grub_timeout_init): Likewise.
10306 (grub_timeout_fini): Likewise.
10308 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10310 (normal_mod_SOURCES): Removed normal/context.c.
10312 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10313 commands/default.c, commands/timeout.c and normal/context.c.
10314 (normal_mod_SOURCES): Removed normal/context.c.
10316 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10317 commands/timeout.c and normal/context.c.
10318 (normal_mod_SOURCES): Removed normal/context.c.
10320 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10321 commands/default.c, commands/timeout.c and normal/context.c.
10322 (normal_mod_SOURCES): Removed normal/context.c.
10324 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10326 (default_mod_SOURCES): Removed.
10327 (default_mod_CFLAGS): Likewise.
10328 (default_mod_LDFLAGS): Likewise.
10329 (timeout_mod_SOURCES): Removed.
10330 (timeout_mod_CFLAGS): Likewise.
10331 (timeout_mod_LDFLAGS): Likewise.
10333 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10336 * commands/default.c: Removed.
10337 * commands/timeout.c: Likewise.
10338 * normal/context.c: Likewise.
10340 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10342 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10344 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10346 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10347 "next" to "prev" for readability.
10348 (struct grub_env_sorted_var): New struct.
10349 (grub_env_context): Renamed to ...
10350 (initial_context): ... this.
10351 (grub_env_var_context): Renamed to ...
10352 (current_context): ... this.
10353 (grub_env_find): Look only at CURRENT_CONTEXT.
10354 (grub_env_context_open): Rewritten to copy exported variables from
10356 (grub_env_context_close): Rewritten according to the new
10357 scheme. Also, add an assertion to prevent the initial context from
10359 (grub_env_insert): Removed the code for the sorted list.
10360 (grub_env_remove): Likewise.
10361 (grub_env_export): Simply mark the variable with
10362 GRUB_ENV_VAR_GLOBAL.
10363 (grub_env_set): A cosmetic change for naming consistency.
10364 (grub_env_get): Likewise.
10365 (grub_env_unset): Likewise.
10366 (grub_env_iterate): Rewritten to sort variables within this
10368 (grub_register_variable_hook): Fixed for naming consistency. Call
10369 grub_env_find again, only if NAME is not found at the first time.
10370 (mangle_data_slot_name): New function.
10371 (grub_env_set_data_slot): Likewise.
10372 (grub_env_get_data_slot): Likewise.
10373 (grub_env_unset_data_slot): Likewise.
10375 * include/grub/env.h (grub_env_var_type): New enum.
10376 (GRUB_ENV_VAR_LOCAL): New constant.
10377 (GRUB_ENV_VAR_GLOBAL): Likewise.
10378 (GRUB_ENV_VAR_DATA): Likewise.
10379 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10381 (grub_env_set): Replace VAR with NAME for consistency.
10382 (grub_register_variable_hook): Likewise.
10383 (grub_env_export): Specify the name of the argument.
10384 (grub_env_set_data_slot): New prototype.
10385 (grub_env_get_data_slot): Likewise.
10386 (grub_env_unset_data_slot): Likewise.
10388 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10390 Extend the loader so that GRUB can accept a loader which comes
10391 back to GRUB when a loaded image exits. Also, this change adds
10392 support for a chainloader on EFI.
10394 * term/efi/console.c: Include grub/misc.h.
10395 (grub_console_checkkey): Display a scan code on the top for
10396 debugging. This will be removed once the EFI port gets stable.
10397 Correct the scan code mapping.
10399 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10400 allocate memory from larger regions, in order to reduce the number
10401 of allocated regions. Otherwise, the MacOSX loader panics.
10402 (filter_memory_map): Avoid less than 1MB for compatibility with
10404 (add_memory_regions): Allocate from the tail of a region, if
10405 possible, to avoid allocating a region near to 1MB, for the MacOSX
10408 * kern/efi/init.c (grub_efi_set_prefix): Specify
10409 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10411 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10412 argument IMAGE_HANDLE and specify it to get a loaded image.
10413 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10414 grub_efi_get_loaded_image.
10415 (grub_efi_get_filename): Divide the length by the size of
10417 (grub_efi_get_device_path): New function.
10418 (grub_efi_print_device_path): Print End Device Path nodes. Divide
10419 the length by the size of grub_efi_char16_t for a file path device
10422 * kern/loader.c (grub_loader_noreturn): New variable.
10423 (grub_loader_set): Accept a new argument NORETURN. Set
10424 GRUB_LOADER_NORETURN to NORETURN.
10425 All callers changed.
10426 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10429 * include/grub/efi/efi.h (grub_efi_get_device_path): New
10431 (grub_efi_get_loaded_image): Take an argument to specify an image
10434 * include/grub/loader.h (grub_loader_set): Added one more argument
10437 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10438 instead of grub_efi_open_protocol.
10439 (grub_efidisk_get_device_name): Likewise.
10440 (grub_efidisk_close): Print a newline.
10441 (grub_efidisk_get_device_handle): Fixed to use
10442 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10443 GRUB_EFI_DEVICE_PATH_TYPE.
10445 * disk/efi/efidisk.c (device_path_guid): Moved to ...
10446 * kern/efi/efi.c (device_path_guid): ... here.
10448 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
10450 (kernel_mod_HEADERS): Added efi/disk.h.
10451 (_chain_mod_SOURCES): New variable.
10452 (_chain_mod_CFLAGS): Likewise.
10453 (_chain_mod_LDFLAGS): Likewise.
10454 (chain_mod_SOURCES): Likewise.
10455 (chain_mod_CFLAGS): Likewise.
10456 (chain_mod_LDFLAGS): Likewise.
10458 * DISTLIST: Added include/grub/efi/chainloader.h,
10459 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
10461 * include/grub/efi/chainloader.h: New file.
10462 * loader/efi/chainloader.c: Likewise.
10463 * loader/efi/chainloader_normal.c: Likewise.
10465 2006-04-30 Marco Gerards <marco@gnu.org>
10467 * commands/configfile.c (grub_cmd_source): New function.
10468 (GRUB_MOD_INIT): Register the commands `source' and `.'.
10469 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
10471 2006-04-30 Marco Gerards <marco@gnu.org>
10473 * normal/execute.c (grub_script_execute_cmd): Change the return
10474 type to `grub_err_t'. Correctly return the error.
10475 (grub_script_execute_cmdline): In case a command line is not a
10476 command or a function, try to interpret it as an assignment.
10478 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10480 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
10481 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
10482 skip a node whose name is obviously invalid as UTF-16,
10483 i.e. contains a NUL character. Stop the iteration when the last
10484 directory entry is found. Instead of using the return value of
10485 grub_hfsplus_btree_iterate_node, store the value in RET and use
10486 it, because the iterator can be stopped by the last directory
10489 2006-04-30 Marco Gerards <marco@gnu.org>
10491 * include/grub/env.h (grub_env_export): New prototype. Reported
10492 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
10494 2006-04-30 Marco Gerards <marco@gnu.org>
10496 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
10497 size of the extents in a catalog file record.
10499 2006-04-29 Marco Gerards <marco@gnu.org>
10501 * commands/configfile.c (grub_cmd_configfile): Execute the
10502 configfile within its own context.
10504 * include/grub/env.h (grub_env_context_open): New prototype.
10505 (grub_env_context_close): Likewise.
10507 * kern/env.c (grub_env): Removed.
10508 (grub_env_sorted): Likewise.
10509 (grub_env_context): New variable.
10510 (grub_env_var_context): Likewise.
10511 (grub_env_find): Search both the active context and the global
10513 (grub_env_context_open): New function.
10514 (grub_env_context_close): Likewise.
10515 (grub_env_insert): Likewise.
10516 (grub_env_remove): Likewise.
10517 (grub_env_export): Likewise.
10518 (grub_env_set): Changed to use helper functions to avoid code
10520 (grub_env_iterate): Rewritten so both the current context and the
10521 global context are being used.
10523 * normal/command.c (export_command): New function.
10524 (grub_command_init): Register the `export' function.
10526 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
10528 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10529 explicitly to suppress gcc's warnings.
10530 * fs/fat.c (grub_fat_find_dir): Likewise.
10531 (grub_fat_label): Likewise.
10532 * fs/xfs.c (grub_xfs_read_inode): Likewise.
10533 (grub_xfs_mount): Likewise.
10534 (grub_xfs_label): Likewise.
10535 * fs/affs.c (grub_affs_mount): Likewise.
10536 (grub_affs_label): Likewise.
10537 (grub_affs_iterate_dir): Likewise.
10538 * fs/sfs.c (grub_sfs_mount): Likewise.
10539 (grub_sfs_iterate_dir): Likewise.
10540 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10541 * fs/hfs.c (grub_hfs_mount): Likewise.
10542 (grub_hfs_cmp_catkeys): Likewise.
10543 (grub_hfs_find_dir): Likewise.
10544 (grub_hfs_dir): Likewise.
10545 (grub_hfs_label): Likewise.
10546 * fs/jfs.c (grub_jfs_mount): Likewise.
10547 (grub_jfs_opendir): Likewise.
10548 (grub_jfs_getent): Likewise.
10549 (grub_jfs_lookup_symlink): Likewise.
10550 (grub_jfs_label): Likewise.
10551 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10552 (grub_hfsplus_iterate_dir): Likewise.
10553 (grub_hfsplus_btree_iterate_node): Made static.
10555 * util/grub-emu.c (prefix): New variable.
10556 (grub_machine_set_prefix): New function.
10557 (main): Do not set the environment variable "prefix" here. Only
10558 set PREFIX, which is used later by grub_machine_set_prefix.
10560 * include/grub/video.h: Do not include grub/symbol.h.
10561 (grub_video_register): Not exported. This symbol is not defined in
10563 (grub_video_unregister): Likewise.
10564 (grub_video_iterate): Likewise.
10565 (grub_video_setup): Likewise.
10566 (grub_video_restore): Likewise.
10567 (grub_video_get_info): Likewise.
10568 (grub_video_get_blit_format): Likewise.
10569 (grub_video_set_palette): Likewise.
10570 (grub_video_get_palette): Likewise.
10571 (grub_video_set_viewport): Likewise.
10572 (grub_video_get_viewport): Likewise.
10573 (grub_video_map_color): Likewise.
10574 (grub_video_map_rgb): Likewise.
10575 (grub_video_map_rgba): Likewise.
10576 (grub_video_fill_rect): Likewise.
10577 (grub_video_blit_glyph): Likewise.
10578 (grub_video_blit_bitmap): Likewise.
10579 (grub_video_blit_render_target): Likewise.
10580 (grub_video_scroll): Likewise.
10581 (grub_video_swap_buffers): Likewise.
10582 (grub_video_create_render_target): Likewise.
10583 (grub_video_delete_render_target): Likewise.
10584 (grub_video_set_active_render_target): Likewise.
10586 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10588 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10590 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10591 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10592 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10593 instead of $(srcdir)/genkernsyms.sh.
10595 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10596 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10597 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10598 instead of $(srcdir)/genkernsyms.sh.
10600 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10601 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10602 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10603 instead of $(srcdir)/genkernsyms.sh.
10605 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10606 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10607 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10608 instead of $(srcdir)/genkernsyms.sh.
10610 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10613 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10615 (gensymlist.sh): New target.
10616 (genkernsyms.sh): Likewise.
10618 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10619 genkernsyms.sh.in and gensymlist.sh.in.
10621 * genkernsyms.sh: Removed.
10622 * gensymlist.sh: Likewise.
10624 * genkernsyms.sh.in: New file.
10625 * gensymlist.sh.in: Likewise.
10627 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10629 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10630 clobber "prefix", since we may have already set it manually.
10632 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10634 * kern/misc.c (abort): New alias for grub_abort.
10636 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
10638 A new machine-specific function "grub_machine_set_prefix" is
10639 defined. This is called after loading modules, so that a prefix
10640 initialization can use modules. Also, this change adds an
10641 intensive debugging feature for the memory manager via the
10642 configure option "--enable-mm-debug".
10644 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10647 * kern/sparc64/ieee1275/init.c (abort): Removed.
10648 (grub_stop): Likewise.
10649 (grub_exit): New function.
10650 (grub_set_prefix): Renamed to ...
10651 (grub_machine_set_prefix): ... this.
10652 (grub_machine_init): Do not call grub_set_prefix.
10654 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10655 (grub_machine_set_prefix): ... this.
10656 (grub_machine_init): Do not call grub_set_prefix.
10658 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10659 (grub_machine_init): Do not set the prefix here.
10661 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10663 * kern/efi/init.c: Include grub/mm.h.
10664 (grub_efi_set_prefix): New function.
10666 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10667 (grub_efi_get_filename): New function.
10668 (grub_print_device_path): Renamed to ...
10669 (grub_efi_print_device_path): ... this.
10671 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10672 [MM_DEBUG] (grub_realloc): Likewise.
10673 [MM_DEBUG] (grub_free): Likewise.
10674 [MM_DEBUG] (grub_memalign): Likewise.
10675 [MM_DEBUG] (grub_mm_debug): New variable.
10676 [MM_DEBUG] (grub_debug_malloc): New function.
10677 [MM_DEBUG] (grub_debug_free): New function.
10678 [MM_DEBUG] (grub_debug_realloc): New function.
10679 [MM_DEBUG] (grub_debug_memalign): New function.
10681 * kern/misc.c (grub_abort): Print a newline to distinguish
10684 * kern/main.c (grub_main): Call grub_machine_set_prefix and
10685 grub_set_root_dev after loading modules. This is necessary when
10686 setting a prefix depends on modules.
10688 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10689 (grub_efi_print_device_path): ... this.
10690 (grub_efi_get_filename): New prototype.
10691 (grub_efi_set_prefix): Likewise.
10693 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10695 (grub_efidisk_get_device_handle): New prototype.
10696 (grub_efidisk_get_device_name): Likewise.
10698 * include/grub/mm.h: Include config.h.
10699 (MM_DEBUG): Removed.
10700 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10701 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10702 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10703 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10704 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10705 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10706 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10707 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10708 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10710 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10712 * disk/efi/efidisk.c: Include grub/partition.h.
10713 (iterate_child_devices): New function.
10714 (add_device): First, compare only last device path nodes, so that
10715 devices are sorted by the types.
10716 (grub_efidisk_get_device_handle): New function.
10717 (grub_efidisk_get_device_name): Likewise.
10719 * configure.ac (--enable-mm-debug): New option to enable the
10720 memory manager debugging feature. This makes the binary much
10721 bigger, so is disabled by default.
10723 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10725 Use grub_abort instead of grub_stop, and grub_exit must be
10726 define in each architecture now. Also, this change adds support
10729 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10730 (grub_getkey): New function.
10731 (grub_term_get_current): Likewise.
10733 * util/i386/pc/grub-setup.c: Include grub/term.h.
10734 (grub_getkey): New function.
10735 (grub_term_get_current): Likewise.
10737 * util/misc.c (grub_stop): Renamed to ...
10738 (grub_exit): ... this.
10740 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10741 (grub_exit): ... this.
10742 (grub_machine_init): Use grub_abort instead of abort.
10743 (grub_stop): Removed.
10745 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10748 * kern/i386/pc/startup.S (grub_exit): New function.
10749 (cold_reboot): New label.
10751 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10752 (grub_efi_init): Call grub_efidisk_init.
10753 (grub_efi_fini): Call grub_efidisk_fini.
10755 * kern/efi/efi.c: Include grub/mm.h.
10756 (grub_efi_console_control_guid): Renamed to ...
10757 (console_control_guid): ... this.
10758 (grub_efi_loaded_image_guid): Renamed to ...
10759 (loaded_image_guid): ... this.
10760 (grub_efi_locate_handle): New function.
10761 (grub_efi_open_protocol): Likewise.
10762 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10763 GRUB_EFI_CONSOLE_CONTROL_GUID.
10764 (grub_efi_exit): Removed.
10765 (grub_stop): Likewise.
10766 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10767 (grub_exit): New function.
10768 (grub_print_device_path): Likewise.
10770 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10771 (grub_enter_rescue_mode): Register "exit".
10773 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10774 (grub_abort): New function.
10776 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10778 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10780 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10782 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10783 (grub_print_device_path): New prototype.
10784 (grub_efi_locate_handle): Likewise.
10785 (grub_efi_open_protocol): Likewise.
10787 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10788 * disk/efi/efidisk.c: Likewise.
10790 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10792 * include/grub/efi/console_control.h
10793 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10795 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10796 last 8 bytes as an array.
10797 (GRUB_EFI_DISK_IO_GUID): New macro.
10798 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10799 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10800 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10802 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10803 (struct grub_efi_device_path): Rename the member "sub_type" to
10805 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10806 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10807 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10808 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10809 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10810 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10811 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10812 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10813 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10814 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10815 (struct grub_efi_pci_device_path): New structure.
10816 (grub_efi_pci_device_path_t): New type.
10817 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10818 (struct grub_efi_pccard_device_path): New structure.
10819 (grub_efi_pccard_device_path_t): New type.
10820 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10821 (struct grub_efi_memory_mapped_device_path): New structure.
10822 (grub_efi_memory_mapped_device_path_t): New type.
10823 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10824 (struct grub_efi_vendor_device_path): New structure.
10825 (grub_efi_vendor_device_path_t): New type.
10826 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10827 (struct grub_efi_controller_device_path): New structure.
10828 (grub_efi_controller_device_path_t): New type.
10829 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10830 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10831 (struct grub_efi_acpi_device_path): New structure.
10832 (grub_efi_acpi_device_path_t): New type.
10833 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10834 (struct grub_efi_expanded_acpi_device_path): New structure.
10835 (grub_efi_expanded_acpi_device_path_t): New type.
10836 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10837 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10838 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10839 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10840 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10841 (struct grub_efi_atapi_device_path): New structure.
10842 (grub_efi_atapi_device_path_t): New type.
10843 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10844 (struct grub_efi_fibre_channel_device_path): New structure.
10845 (grub_efi_fibre_channel_device_path_t): New type.
10846 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10847 (struct grub_efi_1394_device_path): New structure.
10848 (grub_efi_1394_device_path_t): New type.
10849 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10850 (struct grub_efi_usb_device_path): New structure.
10851 (grub_efi_usb_device_path_t): New type.
10852 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10853 (struct grub_efi_usb_class_device_path): New structure.
10854 (grub_efi_usb_class_device_path_t): New type.
10855 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10856 (struct grub_efi_i2o_device_path): New structure.
10857 (grub_efi_i2o_device_path_t): New type.
10858 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10859 (struct grub_efi_mac_address_device_path): New structure.
10860 (grub_efi_mac_address_device_path_t): New type.
10861 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10862 (struct grub_efi_ipv4_device_path): New structure.
10863 (grub_efi_ipv4_device_path_t): New type.
10864 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10865 (struct grub_efi_ipv6_device_path): New structure.
10866 (grub_efi_ipv6_device_path_t): New type.
10867 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10868 (struct grub_efi_infiniband_device_path): New structure.
10869 (grub_efi_infiniband_device_path_t): New type.
10870 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10871 (struct grub_efi_uart_device_path): New structure.
10872 (grub_efi_uart_device_path_t): New type.
10873 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10874 (struct grub_efi_vendor_messaging_device_path): New structure.
10875 (grub_efi_vendor_messaging_device_path_t): New type.
10876 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10877 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10878 (struct grub_efi_hard_drive_device_path): New structure.
10879 (grub_efi_hard_drive_device_path_t): New type.
10880 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10881 (struct grub_efi_cdrom_device_path): New structure.
10882 (grub_efi_cdrom_device_path_t): New type.
10883 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10884 (struct grub_efi_vendor_media_device_path): New structure.
10885 (grub_efi_vendor_media_device_path_t): New type.
10886 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10887 (struct grub_efi_file_path_device_path): New structure.
10888 (grub_efi_file_path_device_path_t): New type.
10889 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10890 (struct grub_efi_protocol_device_path): New structure.
10891 (grub_efi_protocol_device_path_t): New type.
10892 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10893 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10894 (struct grub_efi_bios_device_path): New structure.
10895 (grub_efi_bios_device_path_t): New type.
10896 (struct grub_efi_disk_io): New structure.
10897 (grub_efi_disk_io_t): New type.
10898 (struct grub_efi_block_io_media): New structure.
10899 (grub_efi_block_io_media_t): New type.
10900 (struct grub_efi_block_io): New structure.
10901 (grub_efi_block_io_t): New type.
10903 * include/grub/misc.h (grub_stop): Removed.
10904 (grub_exit): New prototype.
10905 (grub_abort): Likewise.
10907 * include/grub/disk.h (enum grub_disk_dev_id): Added
10908 GRUB_DISK_DEVICE_EFIDISK_ID.
10910 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10911 disk/efi/efidisk.c.
10912 (kernel_syms.lst): Remove the target if an error occurs.
10914 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10916 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10917 as it was simply too buggy.
10919 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10921 * kern/misc.c (grub_lltoa): New function.
10922 (grub_vsprintf): Added support for the long long suffix,
10925 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10927 * Makefile.in (LDFLAGS): Add variable.
10928 (LD): Remove variable.
10929 * configure.ac: Add -m32 to LDFLAGS.
10930 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10931 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10932 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10933 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10934 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10936 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10937 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10938 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10940 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10942 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10943 length for unknown glyph.
10945 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10947 Add support for pre-loaded modules into the EFI port.
10949 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10950 completely. Accept one more argument DIR. The caller has changed.
10952 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10954 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10955 (grub_efi_loaded_image_guid): New variable.
10956 (grub_efi_get_loaded_image): New function.
10957 (grub_arch_modules_addr): Likewise.
10959 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10962 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10963 (struct grub_efi_loaded_image): New structure.
10964 (grub_efi_loaded_image_t): New type.
10966 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10968 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10969 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10970 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10972 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10974 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10976 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10978 * DISTLIST: Added include/grub/efi/console.h,
10979 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10980 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10982 * include/grub/efi/console.h: New file.
10983 * include/grub/efi/time.h: Likewise.
10984 * include/grub/i386/efi/kernel.h: Likewise.
10985 * kern/efi/init.c: Likewise.
10986 * kern/efi/mm.c: Likewise.
10987 * term/efi/console.c: Likewise.
10989 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10990 (grub_stop): Removed.
10991 (grub_get_rtc): Likewise.
10992 (grub_machine_init): Simply call grub_efi_init.
10993 (grub_machine_fini): Call grub_efi_fini.
10995 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10996 (grub_efi_output_string): Removed.
10997 (grub_efi_stall): New function.
10998 (grub_stop): Likewise.
10999 (grub_get_rtc): Likewise.
11001 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11002 (grub_efi_stall): New prototype.
11003 (grub_efi_allocate_pages): Likewise.
11004 (grub_efi_free_pages): Likewise.
11005 (grub_efi_get_memory_map): Likewise.
11006 (grub_efi_mm_init): Likewise.
11007 (grub_efi_mm_fini): Likewise.
11008 (grub_efi_init): Likewise.
11009 (grub_efi_fini): Likewise.
11011 * include/grub/i386/efi/time.h: Do not include
11012 grub/symbol.h. Include grub/efi/time.h.
11013 (GRUB_TICKS_PER_SECOND): Removed.
11014 (grub_get_rtc): Likewise.
11016 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11017 Added padding. The EFI spec is buggy.
11018 (GRUB_EFI_BLACK): New macro.
11019 (GRUB_EFI_BLUE): Likewise.
11020 (GRUB_EFI_GREEN): Likewise.
11021 (GRUB_EFI_CYAN): Likewise.
11022 (GRUB_EFI_RED): Likewise.
11023 (GRUB_EFI_MAGENTA): Likewise.
11024 (GRUB_EFI_BROWN): Likewise.
11025 (GRUB_EFI_LIGHTGRAY): Likewise.
11026 (GRUB_EFI_BRIGHT): Likewise.
11027 (GRUB_EFI_DARKGRAY): Likewise.
11028 (GRUB_EFI_LIGHTBLUE): Likewise.
11029 (GRUB_EFI_LIGHTGREEN): Likewise.
11030 (GRUB_EFI_LIGHTCYAN): Likewise.
11031 (GRUB_EFI_LIGHTRED): Likewise.
11032 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11033 (GRUB_EFI_YELLOW): Likewise.
11034 (GRUB_EFI_WHITE): Likewise.
11035 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11036 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11037 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11038 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11039 (GRUB_EFI_BACKGROUND_RED): Likewise.
11040 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11041 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11042 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11043 (GRUB_EFI_TEXT_ATTR): Likewise.
11045 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11046 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11047 (kernel_mod_HEADERS): Added efi/time.h.
11049 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11051 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11052 include/grub/efi/api.h, include/grub/efi/console_control.h,
11053 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11054 include/grub/i386/efi/time.h, kern/efi/efi.c,
11055 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11056 and util/i386/efi/grub-mkimage.c.
11058 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11060 * genmk.rb (PModule#rule): Do not export symbols if
11061 #{prefix}_EXPORTS is set to "no".
11063 * conf/i386-efi.mk: New file.
11064 * conf/i386-efi.rmk: Likewise.
11065 * include/grub/efi/api.h: Likewise.
11066 * include/grub/efi/console_control.h: Likewise.
11067 * include/grub/efi/efi.h: Likewise.
11068 * include/grub/efi/pe32.h: Likewise.
11069 * include/grub/i386/efi/time.h: Likewise.
11070 * kern/efi/efi.c: Likewise.
11071 * kern/i386/efi/init.c: Likewise.
11072 * kern/i386/efi/startup.S: Likewise.
11073 * util/i386/efi/grub-mkimage.c: Likewise.
11075 2006-04-17 Marco Gerards <marco@gnu.org>
11077 * include/grub/script.h: Include <grub/parser.h> and
11078 "grub_script.tab.h".
11079 (struct grub_lexer_param): New struct.
11080 (struct grub_parser_param): Likewise.
11081 (grub_script_create_arglist): Pass the state in an argument.
11082 (grub_script_add_arglist): Likewise.
11083 (grub_script_create_cmdline): Likewise.
11084 (grub_script_create_cmdblock): Likewise.
11085 (grub_script_create_cmdif): Likewise.
11086 (grub_script_create_cmdmenu): Likewise.
11087 (grub_script_add_cmd): Likewise.
11088 (grub_script_arg_add): Likewise.
11089 (grub_script_lexer_ref): Likewise.
11090 (grub_script_lexer_deref): Likewise.
11091 (grub_script_lexer_record_start): Likewise.
11092 (grub_script_lexer_record_stop): Likewise.
11093 (grub_script_mem_record): Likewise.
11094 (grub_script_mem_record_stop): Likewise.
11095 (grub_script_malloc): Likewise.
11096 (grub_script_yylex): Likewise.
11097 (grub_script_yyparse): Likewise.
11098 (grub_script_yyerror): Likewise.
11099 (grub_script_yylex): Likewise.
11100 (grub_script_lexer_init): Return the state.
11102 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11103 (grub_script_lexer_done): Likewise.
11104 (grub_script_lexer_getline): Likewise.
11105 (grub_script_lexer_refs): Likewise.
11106 (script): Likewise.
11107 (newscript): Likewise.
11108 (record): Likewise.
11109 (recording): Likewise.
11110 (recordpos): Likewise.
11111 (recordlen): Likewise.
11112 (grub_script_lexer_init): Return the state instead of setting
11114 (grub_script_lexer_ref): Use the newly added argument for state
11115 instead of globals.
11116 (grub_script_lexer_deref): Likewise.
11117 (grub_script_lexer_record_start): Likewise.
11118 (grub_script_lexer_record_stop): Likewise.
11119 (recordchar): Likewise.
11120 (nextchar): Likewise.
11121 (grub_script_yylex2): Likewise.
11122 (grub_script_yylex): Likewise.
11123 (grub_script_yyerror): Likewise.
11125 * normal/parser.y (func_mem): Removed variable.
11126 (menu_entry): Likewise.
11128 (%lex-param): New parser option.
11129 (%parse-param): Likewise.
11130 (script): Always return the AST.
11131 (argument): Pass the state around.
11132 (arguments): Likewise.
11133 (grubcmd): Likewise.
11134 (commands): Likewise.
11135 (function): Likewise.
11136 (menuentry): Likewise.
11137 (if_statement): Likewise.
11140 * normal/script.c (grub_script_memused): Removed variable.
11141 (grub_script_parsed): Likewise.
11142 (grub_script_malloc): Added a state argument. Use that instead of
11144 (grub_script_mem_record): Likewise.
11145 (grub_script_mem_record_stop): Likewise.
11146 (grub_script_arg_add): Likewise.
11147 (grub_script_add_arglist): Likewise.
11148 (grub_script_create_cmdline): Likewise.
11149 (grub_script_create_cmdif): Likewise.
11150 (grub_script_create_cmdmenu): Likewise.
11151 (grub_script_add_cmd): Likewise.
11152 (grub_script_parse): Setup the state before calling the parser.
11154 2006-04-16 Marco Gerards <marco@gnu.org>
11156 * normal/command.c (grub_command_init): Remove the title command.
11158 * normal/lexer.c (grub_script_yylex): Renamed from this...
11159 (grub_script_yylex2): ... to this.
11160 (grub_script_yylex): New function. Temporary
11161 introduced to filter some tokens.
11162 (grub_script_yyerror): Print a newline.
11164 * normal/main.c (read_config_file): Output information about the
11165 lines that contain errors. Wait for a key after all lines have
11166 been processed. Don't return an empty menu.
11168 * normal/parser.y (func_mem): Don't initialize.
11169 (menu_entry): Likewise.
11170 (err): New variable.
11171 (script): Don't return anything when an error was encountered.
11172 (ws, returns): Removed rules.
11173 (argument): Disabled concatenated variable support.
11174 (arguments): Remove explicit separators.
11175 (grubcmd): Likewise.
11176 (function): Likewise.
11177 (menuentry): Likewise.
11179 (commands): Likewise. Add error handling.
11181 * normal/script.c (grub_script_create_cmdline): If
11182 `grub_script_parsed' is 0, assume the parser encountered an error.
11184 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11186 * configure.ac: Add support for EFI. Fix the typo
11187 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11189 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11191 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11192 foreign multibyte characters should be shown correctly.
11194 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11196 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11198 (read_config_file): Made it to close file before returning.
11200 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11202 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11203 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11204 video/i386/pc/vbefill.c.
11206 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11207 video/i386/pc/vbefill.c.
11209 * include/grub/video.h (grub_video_blit_format): New enum.
11210 (grub_video_mode_info): Added new member blit_format.
11211 (grub_video_get_blit_format): New function prototype.
11213 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11214 function prototype.
11215 (grub_video_vbe_map_rgb): Likewise.
11216 (grub_video_vbe_unmap_color): Likewise.
11218 * include/grub/i386/pc/vbeblit.h: New file.
11220 * include/grub/i386/pc/vbefill.h: New file.
11222 * video/video.c (grub_video_get_blit_format): New function.
11223 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11224 (grub_video_vbe_map_rgb): Likewise.
11225 (grub_video_vbe_unmap_color): Likewise.
11227 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11229 (grub_video_vbe_blit_render_target): Changed to use more optimized
11231 (grub_video_vbe_setup): Added detection for optimized settings.
11232 (grub_video_vbe_create_render_target): Likewise.
11234 * video/i386/pc/vbeblit.c: New file.
11236 * video/i386/pc/vbefill.c: New file.
11238 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
11240 * font/manager.c (grub_font_get_glyph): Removed font fixup from
11243 * util/unifont2pff.rb: ... and moved it to here. Improved argument
11244 parsing to support both hex and dec ranges. If filename was missing
11245 show usage information.
11247 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
11249 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11250 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
11252 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11253 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
11254 (video_mod_SOURCES): Added.
11255 (video_mod_CFLAGS): Likewise.
11256 (video_mod_LDFLAGS): Likewise.
11257 (gfxterm_mod_SOURCES): Likewise.
11258 (gfxterm_mod_CFLAGS): Likewise.
11259 (gfxterm_mod_LDFLAGS): Likewise.
11260 (videotest_mod_SOURCES): Likewise.
11261 (videotest_mod_CFLAGS): Likewise.
11262 (videotest_mod_LDFLAGS): Likewise.
11263 (vesafb_mod_SOURCES): Removed.
11264 (vesafb_mod_CFLAGS): Likewise.
11265 (vesafb_mod_LDFLAGS): Likewise.
11266 (vga_mod_SOURCES): Likewise.
11267 (vga_mod_CFLAGS): Likewise.
11268 (vga_mod_LDFLAGS): Likewise.
11270 * commands/videotest.c: New file.
11272 * font/manager.c (fill_with_default_glyph): Modified to use
11274 (grub_font_get_glyph): Likewise.
11275 (fontmanager): Renamed from this...
11276 (font_manager): ... to this.
11278 * include/grub/font.h (grub_font_glyph): Added new structure.
11279 (grub_font_get_glyph): Modified to use grub_font_glyph.
11281 * include/grub/misc.h (grub_abs): Added as inline function.
11283 * include/grub/video.h: New file.
11285 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11286 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11287 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11288 (grub_vbe_get_controller_info): Renamed from this...
11289 (grub_vbe_bios_get_controller_info): ... to this.
11290 (grub_vbe_get_mode_info): Renamed from this...
11291 (grub_vbe_bios_get_mode_info): ... to this.
11292 (grub_vbe_set_mode): Renamed from this...
11293 (grub_vbe_bios_set_mode): ... to this.
11294 (grub_vbe_get_mode): Renamed from this...
11295 (grub_vbe_bios_get_mode): ... to this.
11296 (grub_vbe_set_memory_window): Renamed from this...
11297 (grub_vbe_bios_set_memory_window): ... to this.
11298 (grub_vbe_get_memory_window): Renamed from this...
11299 (grub_vbe_bios_get_memory_window): ... to this.
11300 (grub_vbe_set_scanline_length): Renamed from this...
11301 (grub_vbe_set_scanline_length): ... to this.
11302 (grub_vbe_get_scanline_length): Renamed from this...
11303 (grub_vbe_bios_get_scanline_length): ... to this.
11304 (grub_vbe_set_display_start): Renamed from this...
11305 (grub_vbe_bios_set_display_start): ... to this.
11306 (grub_vbe_get_display_start): Renamed from this...
11307 (grub_vbe_bios_get_display_start): ... to this.
11308 (grub_vbe_set_palette_data): Renamed from this...
11309 (grub_vbe_bios_set_palette_data): ... to this.
11310 (grub_vbe_set_pixel_rgb): Removed.
11311 (grub_vbe_set_pixel_index): Likewise.
11313 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11315 (grub_vbe_bios_get_controller_info): ... to this.
11316 (grub_vbe_get_mode_info): Renamed from this...
11317 (grub_vbe_bios_get_mode_info): ... to this.
11318 (grub_vbe_set_mode): Renamed from this...
11319 (grub_vbe_bios_set_mode): ... to this.
11320 (grub_vbe_get_mode): Renamed from this...
11321 (grub_vbe_bios_get_mode): ... to this.
11322 (grub_vbe_set_memory_window): Renamed from this...
11323 (grub_vbe_bios_set_memory_window): ... to this.
11324 (grub_vbe_get_memory_window): Renamed from this...
11325 (grub_vbe_bios_get_memory_window): ... to this.
11326 (grub_vbe_set_scanline_length): Renamed from this...
11327 (grub_vbe_set_scanline_length): ... to this.
11328 (grub_vbe_get_scanline_length): Renamed from this...
11329 (grub_vbe_bios_get_scanline_length): ... to this.
11330 (grub_vbe_set_display_start): Renamed from this...
11331 (grub_vbe_bios_set_display_start): ... to this.
11332 (grub_vbe_get_display_start): Renamed from this...
11333 (grub_vbe_bios_get_display_start): ... to this.
11334 (grub_vbe_set_palette_data): Renamed from this...
11335 (grub_vbe_bios_set_palette_data): ... to this.
11336 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11337 getting corrupted after calling it. Added more pushes and pops.
11338 (grub_vbe_bios_set_mode): Likewise.
11339 (grub_vbe_bios_get_mode): Likewise.
11340 (grub_vbe_bios_get_memory_window): Likewise.
11341 (grub_vbe_bios_set_scanline_length): Likewise.
11342 (grub_vbe_bios_get_scanline_length): Likewise.
11343 (grub_vbe_bios_get_display_start): Likewise.
11344 (grub_vbe_bios_set_palette_data): Likewise.
11346 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11347 (cl_insert): Likewise.
11348 (cl_delete): Likewise.
11350 * term/gfxterm.c: New file.
11352 * term/i386/pc/vesafb.c: Removed file.
11354 * video/video.c: New file.
11356 * video/i386/pc/vbe.c (real2pm): Added new function.
11357 (grub_video_vbe_draw_pixel): Likewise.
11358 (grub_video_vbe_get_video_ptr): Likewise.
11359 (grub_video_vbe_get_pixel): Likewise
11360 (grub_video_vbe_init): Likewise.
11361 (grub_video_vbe_fini): Likewise.
11362 (grub_video_vbe_setup): Likewise.
11363 (grub_video_vbe_get_info): Likewise.
11364 (grub_video_vbe_set_palette): Likewise.
11365 (grub_video_vbe_get_palette): Likewise.
11366 (grub_video_vbe_set_viewport): Likewise.
11367 (grub_video_vbe_get_viewport): Likewise.
11368 (grub_video_vbe_map_color): Likewise.
11369 (grub_video_vbe_map_rgb): Likewise.
11370 (grub_video_vbe_map_rgba): Likewise.
11371 (grub_video_vbe_unmap_color): Likewise.
11372 (grub_video_vbe_fill_rect): Likewise.
11373 (grub_video_vbe_blit_glyph): Likewise.
11374 (grub_video_vbe_blit_bitmap): Likewise.
11375 (grub_video_vbe_blit_render_target): Likewise.
11376 (grub_video_vbe_scroll): Likewise.
11377 (grub_video_vbe_swap_buffers): Likewise.
11378 (grub_video_vbe_create_render_target): Likewise.
11379 (grub_video_vbe_delete_render_target): Likewise.
11380 (grub_video_vbe_set_active_render_target): Likewise.
11381 (grub_vbe_set_pixel_rgb): Remove function.
11382 (grub_vbe_set_pixel_index): Likewise.
11383 (index_color_mode): Remove static variable.
11384 (active_mode): Likewise.
11385 (framebuffer): Likewise.
11386 (bytes_per_scan_line): Likewise.
11387 (grub_video_vbe_adapter): Added new static variable.
11388 (framebuffer): Likewise.
11389 (render_target): Likewise.
11390 (initial_mode): Likewise.
11391 (mode_in_use): Likewise.
11392 (mode_list): Likewise.
11394 2006-03-10 Marco Gerards <marco@gnu.org>
11396 * configure.ac (AC_INIT): Bumped to 1.93.
11398 * DISTLIST: Added `include/grub/hfs.h'.
11400 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11402 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11403 18H, which might help the BIOS falling back to next boot media.
11405 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11407 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11408 Poe Chen <poe.poechen@gmail.com>.
11410 2006-01-17 Marco Gerards <marco@gnu.org>
11412 * include/grub/normal.h: Include <grub/script.h>.
11413 (grub_command_list): Removed struct.
11414 (grub_command_list_t): Removed type.
11415 (grub_menu_entry): Remove members `num' and `command_list'. Add
11416 members `commands' and `sourcecode'.
11417 * include/grub/script.h: Add inclusion guards.
11418 (grub_script_cmd_menuentry): New struct.
11419 (grub_script_execute_menuentry): New prototype.
11420 (grub_script_lexer_record_start): Likewise.
11421 (grub_script_lexer_record_stop): Likewise.
11422 * normal/execute.c (grub_script_execute_menuentry): New function.
11423 * normal/lexer.c (record, recording, recordpos, recordlen): New
11425 (grub_script_lexer_record_start): New function.
11426 (grub_script_lexer_record_stop): Likewise.
11427 (recordchar): Likewise.
11428 (nextchar): Likewise.
11429 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
11430 2048 as the buffer size. Add the tokens `menuentry' and `@'.
11431 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11432 (current_menu): New variable.
11433 (free_menu): Mainly rewritten.
11434 (grub_normal_menu_addentry): New function.
11435 (read_config_file): Rewritten.
11436 * normal/menu.c (run_menu_entry): Mainly rewritten.
11437 * normal/menu_entry.c (make_screen): Rewritten the code to insert
11439 (run): Mainly rewritten.
11440 * normal/parser.y (menu_entry): New variable.
11441 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11442 (menuentry): New rule.
11443 (command): Add `menuentry'.
11444 (if_statement): Allow additional returns before `fi'.
11445 * normal/script.c (grub_script_create_cmdmenu): New function.
11447 2006-01-03 Marco Gerards <marco@gnu.org>
11449 * INSTALL: GNU Bison is required.
11450 * configure.ac: Rewritten the test to detect Bison.
11451 * Makefile.in (YACC): New variable. Reported by Xun Sun
11452 <xun.sun.cn@gmail.com>.
11454 2006-01-03 Marco Gerards <marco@gnu.org>
11456 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
11457 the HFS+ filesystem to filesystem blocks.
11458 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
11459 GCC warning is silenced.
11461 2006-01-03 Marco Gerards <marco@gnu.org>
11463 * partmap/apple.c (apple_partition_map_iterate): Convert the data
11464 read from disk from big endian to host byte order.
11466 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
11468 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
11470 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
11471 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
11472 embedded HFS+ filesystem.
11473 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
11474 (grub_hfs_sblock): Move from here...
11475 * include/grub/hfs.h: To here... New file.
11476 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
11478 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
11480 (grub_hfsplus_volheader): Change type of member `magic' to
11482 (grub_hfsplus_data): Add new member `embedded_offset'.
11483 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
11485 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
11486 Calculate the offset.
11488 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11490 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
11492 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
11494 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11496 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
11497 ENV->NAME is NULL after allocating ENV->VALUE.
11499 2005-12-25 Marco Gerards <marco@gnu.org>
11501 * kern/env.c (grub_env_set): Rewritten the error handling code.
11503 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11505 * geninit.sh: Made more robust, and more portable.
11507 2005-12-25 Marco Gerards <marco@gnu.org>
11509 Add support for Apple HFS+ filesystems.
11511 * fs/hfsplus.c: New file.
11513 * DISTLIST: Added `fs/hfsplus.c'.
11515 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11516 (hfsplus_mod_SOURCES): New variable.
11517 (hfsplus_mod_CFLAGS): Likewise.
11518 (hfsplus_mod_LDFLAGS): Likewise.
11519 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11520 (grub_setup_SOURCES): Likewise.
11521 (grub_mkdevicemap_SOURCES): Likewise.
11522 (grub_emu_SOURCES): Likewise.
11523 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11525 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11527 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11529 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11531 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11532 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11533 include/grub/parser.h, include/grub/script.h, kern/parser.c,
11534 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11535 normal/lexer.c, normal/parser.y, normal/script.c, and
11537 Removed kern/sparc64/cache.c.
11539 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11540 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11543 * configure.ac (AC_INIT): Bumped to 1.92.
11545 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
11547 * kern/err.c (grub_error_push): Added new function to support error
11549 (grub_error_pop): Likewise.
11550 (grub_error_stack_items): New local variable to support error stacks.
11551 (grub_error_stack_pos): Likewise.
11552 (grub_error_stack_assert): Likewise.
11553 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11555 (grub_print_error): Added support to print errors from error stack.
11557 * include/grub/err.h (grub_error_push): Added function prototype.
11558 (grub_error_pop): Likewise.
11560 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
11562 * configure.ac: Accept `powerpc64' as host_cpu.
11563 (amd64): Rename to `biarch32'.
11565 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11566 non-cacheline-aligned addresses.
11568 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11569 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11570 if `size' is non-zero.
11572 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
11574 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11575 and `cd' to make sure the filename is not prefixed with a
11577 (pkgdata_MODULES): Add `gpt.mod'.
11578 (gpt_mod_SOURCES): New variable.
11579 (gpt_mod_CFLAGS): Likewise.
11580 (gpt_mod_LDFLAGS): Likewise.
11582 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11584 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11587 * partmap/gpt.c: New file.
11589 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11590 GPT partition map is detected.
11592 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
11594 * commands/i386/pc/play.c: New file.
11595 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11596 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11599 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
11601 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11602 ((unused))' to silence gcc warning.
11604 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
11606 * configure.ac: Correct `AC_PROG_YACC' test.
11608 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11610 * util/powerpc/ieee1275/grub-install.in: Run the mount point
11611 check before installing files.
11613 2005-11-22 Mike Small <smallm@panix.com>
11615 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11616 number regex so multidigit numbers are recognized correctly.
11618 2005-11-22 Mike Small <smallm@panix.com>
11620 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11621 debugging message before attempting to claim memory.
11622 (grub_rescue_cmd_initrd): Add a claim debugging message and try
11623 multiple addresses in case of failure.
11625 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11627 * term/tparm.c (get_space): Remove empty `if' statement.
11629 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11631 * kern/parser.c (check_varstate): Rename `state' to 's'.
11633 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11635 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
11636 variable definitions to the beginning of each function. Sort stack
11638 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
11639 `buf' argument to `char *'.
11641 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11643 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11644 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11645 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11646 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11647 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11648 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11649 configfile.mod, search.mod, gzio.mod and test.mod.
11650 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11651 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11652 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11653 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11654 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11655 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11656 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11657 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11658 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11659 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11660 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11661 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11662 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11663 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11664 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11665 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11666 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11667 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11668 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11669 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11670 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11671 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11672 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11674 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11676 (pkgdata_MODULES): Add test.mod.
11678 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11680 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
11681 appending to variables with "+=".
11682 (PModule): Use full pathname to generate *.lst filenames.
11684 * Makefile.in: Fixed list rules moved from genmk.rb.
11685 (.DELETE_ON_ERROR): New special target.
11686 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11688 * conf/i386-pc.rmk: Include conf/common.mk.
11689 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11690 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11691 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11692 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11693 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11694 configfile.mod, search.mod, gzio.mod and test.mod.
11695 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11696 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11697 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11698 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11699 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11700 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11701 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11702 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11703 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11704 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11705 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11706 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11707 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11708 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11709 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11710 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11711 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11712 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11713 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11714 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11715 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11716 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11717 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11719 * conf/common.rmk: ... to here. New file.
11721 * conf/common.mk: New file.
11723 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11725 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11726 (grub_script.tab.c): ... here.
11728 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11729 (grub_script.tab.c): ... here.
11731 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11732 (grub_script.tab.c): ... here.
11734 * normal/command.c (grub_command_find): Fixed a memory leak of
11735 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11737 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11739 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11740 "@" which marks the start of a comment on ARM.
11741 (VARIABLE): Likewise.
11743 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11745 Add support for Linux/ADFS partition tables.
11747 * partmap/acorn.c: New file.
11749 * include/grub/acorn_filecore.h: Likewise.
11751 * DISTLIST: Added `partmap/acorn.c' and
11752 `include/grub/acorn_filecore.h'.
11754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11756 (pkgdata_MODULES): Add `acorn.mod'.
11757 (acorn_mod_SOURCES): New variable.
11758 (acorn_mod_CFLAGS): Likewise.
11760 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11762 (pkgdata_MODULES): Add `acorn.mod'.
11763 (acorn_mod_SOURCES): New variable.
11764 (acorn_mod_CFLAGS): Likewise.
11766 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11767 (pkgdata_MODULES): Add `acorn.mod'.
11768 (acorn_mod_SOURCES): New variable.
11769 (acorn_mod_CFLAGS): Likewise.
11770 (acorn_mod_LDFLAGS): Likewise.
11772 * include/types.h (grub_disk_addr_t): New typedef.
11774 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
11776 * geninit.sh: New file.
11778 * geninitheader.sh: Likewise.
11780 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11781 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11782 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11783 * commands/configfile.c (grub_configfile_init)
11784 (grub_configfile_fini): Likewise.
11785 * commands/default.c (grub_default_init, grub_default_fini):
11787 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11788 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11789 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11790 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11792 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11793 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11795 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11796 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11798 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11800 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11802 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11803 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11804 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11805 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11806 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11807 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11808 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11809 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11810 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11811 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11812 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11813 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11814 * partmap/amiga.c (grub_amiga_partition_map_init)
11815 (grub_amiga_partition_map_fini): Likewise.
11816 * partmap/apple.c (grub_apple_partition_map_init)
11817 (grub_apple_partition_map_fini): Likewise.
11818 * partmap/pc.c (grub_pc_partition_map_init)
11819 (grub_pc_partition_map_fini): Likewise.
11820 * partmap/sun.c (grub_sun_partition_map_init,
11821 grub_sun_partition_map_fini): Likewise.
11822 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11825 * util/grub-emu.c: Include <grub_modules_init.h>.
11826 (main): Don't initialize and de-initialize any modules directly,
11827 use `grub_init_all' and `grub_fini_all' instead.
11829 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11830 `grub_vesafb_mod_init'.
11831 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11833 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11834 `grub_vga_mod_init'. Updated all users.
11835 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
11837 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11838 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11841 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11842 Generate a function to initialize the module in utilities.
11843 Updated all callers.
11844 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11845 initialize the module in utilities. Updated all callers.
11847 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11849 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11850 escape sequence and a literal ^L to clear the screen.
11852 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11853 when returning from Open Firmware.
11855 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11857 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11858 (grub_ofconsole_height): Likewise.
11859 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11860 manually insert a '\n'.
11861 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11862 `grub_ofconsole_height'. Return early if these are already set.
11864 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11866 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11867 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11868 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11869 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11870 and `normal/script.c'.
11871 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11872 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11873 (test_mod_SOURCES): New variable.
11874 (test_mod_CFLAGS): Likewise.
11875 (test_mod_LDFLAGS): Likewise.
11876 (pkgdata_MODULES): Add `test.mod'.
11877 (grub_script.tab.c): New rule.
11878 (grub_script.tab.h): Likewise.
11880 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
11882 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11883 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11884 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11885 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11886 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11887 (test_mod_SOURCES): New variable.
11888 (test_mod_CFLAGS): Likewise.
11889 (pkgdata_MODULES): Add `test.mod'.
11890 (grub_script.tab.c): New rule.
11891 (grub_script.tab.h): Likewise.
11893 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
11895 Add initial scripting support.
11897 * commands/test.c: New file.
11898 * include/grub/script.h: Likewise.
11899 * normal/execute.c: Likewise.
11900 * normal/function.c: Likewise.
11901 * normal/lexer.c: Likewise.
11902 * normal/parser.y: Likewise.
11903 * normal/script.c: Likewise.
11905 * configure.ac: Add `AC_PROG_YACC' test.
11907 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11908 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11909 `normal/function.c' and `normal/script.c'.
11910 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11911 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11912 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11914 (pkgdata_MODULES): Add `test.mod'.
11915 (grub_script.tab.c): New rule.
11916 (grub_script.tab.h): Likewise.
11918 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11920 * include/grub/normal.h (grub_test_init): New prototype.
11921 (grub_test_fini): Likewise.
11923 * normal/command.c: Include <grub/script.h>.
11924 (grub_command_execute): Rewritten.
11926 * util/grub-emu.c (main): Call `grub_test_init' and
11929 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11931 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11933 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11934 there are no pending characters.
11936 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11938 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11939 `grub_strndup' to drop device arguments. Replace unnecessary
11940 `grub_strndup' with `grub_strdup'.
11942 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11944 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11945 `debug' environment variable has been set.
11947 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
11949 * Makefile.in (install-local): Use $(DATA).
11950 (uninstall): Likewise.
11951 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11952 (sbin_UTILITIES): ... to here.
11953 (sbin_SCRIPTS): New variable.
11954 (grub_install_SOURCES): New variable.
11955 * util/powerpc/ieee1275/grub-install.in: New file.
11956 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11958 (add_segments): Call `grub_util_get_path'.
11960 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11962 From Timothy Baldwin:
11963 * commands/ls.c (grub_ls_list_files): Close FILE with
11965 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11967 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
11969 * include/grub/parser.h: New file.
11971 * kern/parser.c: Likewise.
11973 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11974 (grub_setup_SOURCES): Likewise.
11975 (grub_probefs_SOURCES): Likewise.
11976 (grub_emu_SOURCES): Likewise.
11977 (kernel_img_HEADERS): Add `parser.h'.
11979 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11980 (grub_emu_SOURCES): Add `kern/parser.c'.
11981 (grubof_SOURCES): Likewise.
11983 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11984 (grubof_SOURCES): Add `kern/parser.c'.
11986 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11988 * kern/misc.c (grub_split_cmdline): Removed function.
11990 * kern/rescue.c: Include <grub/parser.h>.
11991 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11992 of `grub_split_cmdline'.
11994 * normal/command.c: Include <grub/parser.h>.
11995 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11996 of `grub_split_cmdline'.
11998 * normal/completion.c: Include <grub/parser.h>.
11999 (cmdline_state): New variable.
12000 (iterate_dir): End the filename with a quote depending on the
12001 command line state.
12002 (get_state): new function.
12003 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12004 split the arguments and determine the current argument. When the
12005 argument string is not quoted, escape all spaces.
12007 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12009 * normal/sparc64/setjmp.S: New file.
12011 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12013 * include/grub/sparc64/libgcc.h: New file.
12014 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12015 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12016 normal/sparc64/setjmp.c.
12018 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12020 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12021 * kern/sparc64/cache.S: New file.
12022 * kern/sparc64/cache.c: Removed.
12023 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12024 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12026 (COMMON_LDFLAGS): Add -melf64_sparc.
12027 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12028 (grubof_SOURCES): Use cache.S instead of cache.c.
12029 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12030 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12031 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12033 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12034 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12035 (linux_mod_CFLAGS): Commented out.
12036 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12037 out because module isn't built.
12038 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12039 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12040 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12041 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12042 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12043 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12044 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12045 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12046 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12047 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12048 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12049 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12050 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12051 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12053 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12055 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12056 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12057 longer, because HFS should not be used on PC.
12059 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12061 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12062 consistently within the loop.
12064 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
12066 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12067 directory can not be read.
12069 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12071 * configure.ac (AC_INIT): Increase the version number to 1.91.
12073 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12074 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12075 term/i386/pc/serial.c.
12077 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12079 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12080 file size must be permitted.
12082 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12083 between %ah and %al.
12085 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12087 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12089 Call the hook with a NUL-terminated filename.
12090 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12093 * kern/term.c (cursor_state): New variable.
12094 (grub_term_set_current): Reset the cursor state on a new
12096 (grub_setcursor): Rewritten to use CURSOR_STATE.
12097 (grub_getcursor): New function.
12099 * include/grub/term.h (grub_getcursor): New prototype.
12101 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12102 integers on ARM. Reported by Timothy Baldwin
12103 <T.E.Baldwin99@members.leeds.ac.uk>.
12105 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
12107 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12109 (grub_sfs_dir): Likewise.
12111 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
12113 Add support for the SFS filesystem.
12115 * fs/sfs.c: New file.
12117 * DISTLIST: Added `fs/sfs.c'.
12119 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12120 (grub_probefs_SOURCES): Likewise.
12121 (grub_emu_SOURCES): Likewise.
12122 (pkgdata_MODULES): Add `sfs.mod'.
12123 (sfs_mod_SOURCES): New variable.
12124 (sfs_mod_CFLAGS): Likewise.
12125 (sfs_mod_LDFLAGS): Likewise.
12127 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12128 (pkgdata_MODULES): Add `sfs.mod'.
12129 (sfs_mod_SOURCES): New variable.
12130 (sfs_mod_CFLAGS): Likewise.
12132 * util/grub-emu.c (main): Call `grub_sfs_init' and
12135 * include/grub/fs.h (grub_sfs_init): New prototype.
12136 (grub_sfs_fini): Likewise.
12138 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
12140 Add support for the AFFS filesystem.
12142 * fs/affs.c: New file.
12144 * DISTLIST: Added `fs/affs.c'.
12146 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12147 (grub_probefs_SOURCES): Likewise.
12148 (grub_emu_SOURCES): Likewise.
12149 (pkgdata_MODULES): Add `affs.mod'.
12150 (affs_mod_SOURCES): New variable.
12151 (affs_mod_CFLAGS): Likewise.
12152 (affs_mod_LDFLAGS): Likewise.
12154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12155 (pkgdata_MODULES): Add `affs.mod'.
12156 (affs_mod_SOURCES): New variable.
12157 (affs_mod_CFLAGS): Likewise.
12159 * util/grub-emu.c (main): Call `grub_affs_init' and
12162 * include/grub/fs.h (grub_affs_init): New prototype.
12163 (grub_affs_fini): Likewise.
12165 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12167 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12169 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12171 * configure.ac: Accept `x86_64' as host_cpu. In that case add
12174 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12177 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12178 (COMMON_LDFLAGS): New variable.
12179 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12180 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12181 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12182 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12183 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12184 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12185 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12186 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12187 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12188 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12189 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12190 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12191 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12192 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12193 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12195 (normal_mod_ASFLAGS): Add `-m32'.
12197 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12198 (grub_host_size_t, grub_host_ssize_t): New types.
12199 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
12200 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
12201 `GRUB_HOST_SIZEOF_VOID_P'.
12203 * include/grub/kernel.h (struct grub_module_header): Type of
12204 member offset changed to `grub_host_off_t'. Type of member size
12205 changed to `grub_host_size_t'.
12206 (struct grub_module_info): Type of member offset changed to
12207 `grub_host_off_t'. Type of member size changed to
12208 `grub_host_size_t'.
12210 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
12212 Make GRUB's kernel compliant to Multiboot Specification.
12214 * kern/i386/pc/startup.S (multiboot_header): New label.
12215 (multiboot_entry): Likewise.
12216 (multiboot_trampoline): Likewise.
12218 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12219 Increased to 0x4A0.
12221 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12222 put parentheses after a question mark.
12223 [!GRUB_UTIL] (my_mod): New variable.
12225 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12227 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
12229 Adds support for the XFS filesystem. Btrees are not supported
12232 * fs/xfs.c: New file.
12234 * DISTLIST: Added `fs/xfs.c'.
12236 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12237 (grub_probefs_SOURCES): Likewise.
12238 (grub_emu_SOURCES): Likewise.
12239 (pkgdata_MODULES): Add `xfs.mod'.
12240 (xfs_mod_SOURCES): New variable.
12241 (xfs_mod_CFLAGS): Likewise.
12243 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12244 (pkgdata_MODULES): Add `xfs.mod'.
12245 (xfs_mod_SOURCES): New variable.
12246 (xfs_mod_CFLAGS): Likewise.
12248 * util/grub-emu.c (main): Call `grub_xfs_init' and
12251 * include/grub/fs.h (grub_xfs_init): New prototype.
12252 (grub_xfs_fini): Likewise.
12255 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12257 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12258 color modes, allow greater than 16 colors to be configured as
12261 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12263 * normal/completion.c (complete_arguments): Add the qualifier
12264 const into OPTIONS.
12266 From Omniflux <omniflux+lists@omniflux.com>:
12267 * include/grub/terminfo.h: New file.
12268 * include/grub/tparm.h: Likewise.
12269 * include/grub/i386/pc/serial.h: Likewise.
12270 * term/terminfo.c: Likewise.
12271 * term/tparm.c: Likewise.
12272 * term/i386/pc/serial.c: Likewise.
12273 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12275 (terminfo_mod_SOURCES): New variable.
12276 (terminfo_mod_CFLAGS): Likewise.
12277 (serial_mod_SOURCES): Likewise.
12278 (serial_mod_CFLAGS): Likewise.
12280 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12282 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12283 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12284 and kern/powerpc/ieee1275/cmain.c, respectively.
12286 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12287 * kern/powerpc/ieee1275/crt0.S: ... here.
12289 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12290 * kern/powerpc/ieee1275/cmain.c: ... here.
12292 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12293 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12294 instead of boot/powerpc/ieee1275/crt0.S and
12295 boot/powerpc/ieee1275/cmain.c, respectively.
12297 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12298 sectors. It was not used anyway.
12300 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12302 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12303 `unused parameter' warning.
12305 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12307 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12309 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12312 2005-08-28 Marco Gerards <metgerards@student.han.nl>
12314 * include/grub/normal.h (enum grub_completion_type): Added
12315 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12317 * normal/cmdline.c (print_completion): Handle
12318 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12319 * normal/menu_entry.c (store_completion): Likewise.
12321 * normal/completion.c (complete_arguments): New function.
12322 (grub_normal_do_completion): Call `complete_arguments' when the
12323 current words start with a dash.
12325 2005-08-27 Marco Gerards <metgerards@student.han.nl>
12327 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12328 `gzio.mod' instead of `io.mod').
12330 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12332 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12333 (DISTDIRS): Added io and video.
12334 Rewrite the search routine to make an output consistently.
12336 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12337 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12338 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12339 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12340 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12341 util/powerpc/ieee1275/misc.c.
12343 * include/grub/gzio.h: New file.
12344 * io/gzio.c: Likewise.
12346 * kern/file.c (grub_file_close): Call grub_device_close only if
12347 FILE->DEVICE is not NULL.
12349 * include/grub/mm.h [!NULL] (NULL): New macro.
12351 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12353 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12354 (pkgdata_MODULES): Added gzio.mod.
12355 (gzio_mod_SOURCES): New variable.
12356 (gzio_mod_CFLAGS): Likewise.
12358 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12359 (pkgdata_MODULES): Added gzio.mod.
12360 (gzio_mod_SOURCES): New variable.
12361 (gzio_mod_CFLAGS): Likewise.
12363 * commands/cat.c: Include grub/gzio.h.
12364 (grub_cmd_cat): Use grub_gzfile_open instead of
12367 * commands/cmp.c: Include grub/gzio.h.
12368 (grub_cmd_cmp): Use grub_gzfile_open instead of
12371 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12372 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12374 (grub_rescue_cmd_module): Likewise.
12376 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12378 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12379 kern/sparc64/ieee1275/init.c because it contains _start.
12380 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12382 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12384 * configure.ac: Add support for sparc64 host with ieee1275
12386 * configure: Generated from configure.ac.
12387 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12389 (grub_ofdisk_read): Likewise.
12390 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12391 pointers as (void *) to remove a warning.
12392 (grub_ofdisk_close): Likewise.
12393 (grub_ofdisk_read): Likewise.
12394 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12395 returns, so make it return void to remove a warning.
12396 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12397 Corresponding prototype change.
12398 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12399 values, and cast the pointers as (void *) to remove a warning.
12400 (grub_mm_dump): Likewise.
12401 * conf/sparc64-ieee1275.mk: New file.
12402 * conf/sparc64-ieee1275.rmk: Likewise.
12403 * include/grub/sparc64/setjmp.h: Likewise.
12404 * include/grub/sparc64/types.h: Likewise.
12405 * include/grub/sparc64/ieee1275/console.h: Likewise.
12406 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12407 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12408 * include/grub/sparc64/ieee1275/time.h: Likewise.
12409 * kern/sparc64/cache.c: Likewise.
12410 * kern/sparc64/dl.c: Likewise.
12411 * kern/sparc64/ieee1275/init.c: Likewise.
12412 * kern/sparc64/ieee1275/openfw.c: Likewise.
12414 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12416 * util/console.c (grub_ncurses_putchar): If C is greater than
12417 0x7f, set C to a question mark.
12418 (grub_ncurses_getcharwidth): New function.
12419 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12422 * normal/menu.c (print_entry): Made aware of Unicode. First,
12423 convert TITLE to UCS-4, and predict the cursor position by
12426 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12428 * kern/misc.c (grub_utf16_to_utf8): Likewise.
12430 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12432 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12433 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12436 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12437 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12438 grub_strcpy and grub_strlen. Take it into account that a space
12439 character is inserted as a delimiter.
12441 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12443 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
12444 invalid magic in the error.
12446 * commands/search.c: New file.
12448 * util/grub-emu.c (main): Call grub_search_init and
12451 * kern/rescue.c (grub_rescue_print_disks): Removed.
12452 (grub_rescue_print_devices): New function.
12453 (grub_rescue_cmd_ls): Use grub_device_iterate with
12454 grub_rescue_print_devices instead of grub_disk_dev_iterate with
12455 grub_rescue_print_disks.
12457 * kern/partition.c (grub_partition_iterate): Return the result of
12458 PARTMAP->ITERATE instead of GRUB_ERRNO.
12460 * kern/device.c: Include grub/partition.h.
12461 (grub_device_iterate): New function.
12463 * include/grub/partition.h (grub_partition_iterate): Return int
12464 instead of grub_err_t.
12466 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
12468 [GRUB_UTIL] (grub_search_fini): Likewise.
12470 * include/grub/device.h (grub_device_iterate): New prototype.
12472 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12474 (pkgdata_MODULES): Added search.mod.
12475 (search_mod_SOURCES): New variable.
12476 (search_mod_CFLAGS): Likewise.
12478 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
12479 (pkgdata_MODULES): Added search.mod.
12480 (search_mod_SOURCES): New variable.
12481 (search_mod_CFLAGS): Likewise.
12483 * commands/ls.c (grub_ls_list_disks): Renamed to ...
12484 (grub_ls_list_devices): ... this, and use grub_device_iterate.
12485 All callers changed.
12487 * DISTLIST: Added commands/search.c.
12489 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12491 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
12493 (grub_getcharwidth): New function.
12495 * kern/misc.c (grub_utf8_to_ucs4): New function.
12497 * include/grub/term.h (struct grub_term): Added a new member
12499 (grub_getcharwidth): New prototype.
12501 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
12503 * term/i386/pc/console.c (map_char): New function. Segregated from
12504 grub_console_putchar.
12505 (grub_console_putchar): Use map_char.
12506 (grub_console_getcharwidth): New function.
12507 (grub_console_term): Specified grub_console_getcharwidth as
12510 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12511 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12513 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12515 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12516 on grub_strtoul completely.
12517 (write_char): Declare local variables in the beginning of the
12519 (grub_vesafb_getcharwidth): New function.
12520 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12523 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
12525 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12526 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12527 commands/i386/pc/vbetest.c.
12529 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12530 call grub_vbe_get_controller_info again, because the returned
12531 information is volatile.
12532 (grub_vbe_set_video_mode): Mostly rewritten.
12533 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12534 grub_vbe_status_t correctly.
12535 (grub_vbe_get_video_mode_info): Likewise.
12536 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12537 several if statements.
12539 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12540 * commands/i386/pc/vbeinfo.c: ... this.
12542 * commands/i386/pc/vbe_test.c: Renamed to ...
12543 * commands/i386/pc/vbetest.c: ... this.
12545 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12547 (grub_cmd_vbeinfo): ... this. Save video modes before
12548 iterating. Skip a video mode, if it is not available, not enough
12549 information is given or it is monochrome. Show the memory
12550 model. Leave the interpretation of MODEVAR to grub_strtoul
12552 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12553 (GRUB_MOD_FINI): Likewise.
12555 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12556 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12557 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12558 duplicated grub_env_get. Leave the interpretation of MODEVAR to
12559 grub_strtoul completely.
12560 (real2pm): Removed.
12561 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12562 (GRUB_MOD_FINI): Likewise.
12564 * normal/misc.c: Include grub/mm.h.
12566 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12567 vbe_list_modes with vbetest.mod and vbeinfo.mod.
12568 (vbe_list_modes_mod_SOURCES): Removed.
12569 (vbe_list_modes_mod_CFLAGS): Likewise.
12570 (vbe_test_mod_SOURCES): Likewise.
12571 (vbe_test_mod_CFLAGS): Likewise.
12572 (vbeinfo_mod_SOURCES): New variable.
12573 (vbeinfo_mod_CFLAGS): Likewise.
12574 (vbetest_mod_SOURCES): Likewise.
12575 (vbetest_mod_CFLAGS): Likewise.
12577 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
12579 * normal/misc.c: New file.
12581 * DISTLIST: Added normal/misc.c.
12583 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12584 DISK to HOOK. Call HOOK with DISK.
12585 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12586 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12587 * partmap/sun.c (sun_partition_map_iterate): Likewise.
12589 * normal/menu_entry.c (struct screen): Added a new member
12590 "completion_shown".
12591 (completion_buffer): New global variable.
12592 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12593 (store_completion): New function.
12594 (complete): Likewise.
12595 (clear_completions): Likewise.
12596 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12597 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12598 a tab, call complete.
12600 * normal/completion.c (disk_dev): Removed.
12601 (print_simple_completion): Likewise.
12602 (print_partition_completion): Likewise.
12603 (print_func): New global variable.
12604 (add_completion): Do not take the arguments WHAT or PRINT any
12605 longer. Added a new argument TYPE. Instead of printing directly,
12606 call PRINT_FUNC if not NULL.
12607 All callers changed.
12608 (complete_device): Use a local variable DEV instead of
12609 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12610 (grub_normal_do_completion): Take a new argument HOOK. Do not
12611 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12612 empty string, return NULL instead.
12613 All callers changed.
12615 * normal/cmdline.c (print_completion): New function.
12617 * kern/partition.c (grub_partition_iterate): Add an argument DISK
12619 All callers changed.
12621 * kern/disk.c (grub_print_partinfo): Removed.
12623 * include/grub/partition.h (struct grub_partition_map): Add a new
12624 argument DISK into HOOK of ITERATE.
12625 (grub_partition_iterate): Add a new argument DISK to HOOK.
12627 * include/grub/normal.h (enum grub_completion_type): New enum.
12628 (grub_completion_type_t): New type.
12629 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12630 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12631 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12632 (GRUB_COMPLETION_TYPE_FILE): Likewise.
12633 (grub_normal_do_completion): Added a new argument HOOK.
12634 (grub_normal_print_device_info): New prototype.
12636 * include/grub/disk.h (grub_print_partinfo): Removed.
12638 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12639 (normal_mod_SOURCES): Likewise.
12640 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12641 (normal_mod_SOURCES): Likewise.
12643 * commands/ls.c (grub_ls_list_disks): Use
12644 grub_normal_print_device_info instead of grub_print_partinfo. Free
12646 (grub_ls_list_files): Use grub_normal_print_device_info instead of
12647 duplicating the code.
12649 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12651 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12652 follow GCS more precisely.
12653 * commands/i386/pc/vbe_test.c: Likewise.
12654 * include/grub/i386/pc/vbe.h: Likewise.
12655 * term/i386/pc/vesafb.c: Likewise.
12656 * video/i386/pc/vbe.c: Likewise.
12658 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12660 * DISTLIST: Added term/i386/pc/vesafb.c
12661 DISTLIST: Added video/i386/pc/vbe.c
12662 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12663 DISTLIST: Added commands/i386/pc/vbe_test.c.
12664 * commands/i386/pc/vbe_list_modes.c: New file.
12665 * commands/i386/pc/vbe_test.c: Likewise.
12666 * term/i386/pc/vesafb.c: Likewise.
12667 * video/i386/pc/vbe.c: Likewise.
12668 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12669 (grub_vbe_probe) Added prototype.
12670 (grub_vbe_set_video_mode) Likewise.
12671 (grub_vbe_get_video_mode) Likewise.
12672 (grub_vbe_get_video_mode_info) Likewise.
12673 (grub_vbe_set_pixel_rgb) Likewise.
12674 (grub_vbe_set_pixel_index) Likewise.
12675 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12676 (pkgdata_MODULES): Added vesafb.mod.
12677 (pkgdata_MODULES): Added vbe_list_modes.mod.
12678 (pkgdata_MODULES): Added vbe_test.mod.
12679 (vbe_mod_SOURCES): Added.
12680 (vbe_mod_CFLAGS): Likewise.
12681 (vesafb_mod_SOURCES): Likewise.
12682 (vesafb_mod_CFLAGS): Likewise.
12683 (vbe_list_modes_mod_SOURCES): Likewise.
12684 (vbe_list_modes_mod_CFLAGS): Likewise.
12685 (vbe_test_mod_SOURCES): Likewise.
12686 (vbe_test_mod_CFLAGS): Likewise.
12688 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12690 * normal/command.c (grub_command_execute): If INTERACTIVE is
12691 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12692 CMDLINE. Disable the pager if INTERACTIVE is true.
12693 All callers are changed.
12695 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12696 before reading a config file.
12697 * normal/main.c (read_config_file): Even if a command is not
12698 found, register it if it is within an entry.
12700 * util/grub-emu.c: Include sys/types.h and unistd.h.
12701 (options): Added --hold.
12702 (struct arguments): Added a new member "hold".
12703 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12705 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12706 cleared by a debugger, if it is not zero.
12708 * include/grub/normal.h (grub_command_execute): Add an argument
12711 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12713 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12715 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12717 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12718 program with another one, because the old one didn't detect a bug
12719 in gcc-3.4. Always use regparm 2, because the new test is still
12720 not enough for gcc-4.0. Someone must investigate a simple test
12721 case which detects a bug in gcc-4.0.
12723 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12725 * DISTLIST: Added normal/completion.c.
12727 * normal/completion.c: New file.
12729 * term/i386/pc/console.c (grub_console_getwh): New function.
12730 (grub_console_term): Assign grub_console_getwh to getwh.
12732 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12733 function is defined in normal/completion.c as
12734 grub_normal_do_completion.
12735 (grub_cmdline_get): Use grub_normal_do_completion instead of
12738 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12739 returns non-zero, otherwise return 0.
12740 (grub_partition_iterate): First, probe the partition map. Then,
12741 call ITERATE only for this partition map.
12743 * kern/misc.c (grub_strncmp): Rewritten.
12745 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12746 returns non-zero. Otherwise return 0.
12748 * include/grub/partition.h (grub_partition_map_iterate): Return
12749 int instead of void.
12751 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12753 * include/grub/misc.h (grub_strncmp): Change the type of N to
12756 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12759 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12760 unsigned explicitly before comparing it with I.
12762 * kern/main.c (grub_env_write_root): Add the attribute unused into
12765 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12766 normal/completion.c.
12767 (normal_mod_SOURCES): Likewise.
12768 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12769 (normal_mod_SOURCES): Likewise.
12771 * normal/command.c (grub_iterate_commands): If ITERATE returns
12772 non-zero, return one immediately.
12774 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12776 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12777 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12779 (grub_vbe_get_controller_info): New function.
12780 (grub_vbe_get_mode_info): Likewise.
12781 (grub_vbe_set_mode): Likewise.
12782 (grub_vbe_get_mode): Likewise.
12783 (grub_vbe_set_memory_window): Likewise.
12784 (grub_vbe_get_memory_window): Likewise.
12785 (grub_vbe_set_scanline_length): Likewise.
12786 (grub_vbe_get_scanline_length): Likewise.
12787 (grub_vbe_set_display_start): Likewise.
12788 (grub_vbe_get_display_start): Likewise.
12789 (grub_vbe_set_palette_data): Likewise.
12790 * include/grub/i386/pc/vbe.h: New file.
12792 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12794 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12795 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12796 * DISTLIST: Likewise.
12797 * kern/ieee1275/of.c: Moved to ...
12798 * kern/ieee1275/ieee1275.c: ... here.
12800 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12802 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12803 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12804 Pass 0 as `end' parameter to grub_strtoul().
12806 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12808 * include/grub/powerpc/ieee1275/console.h: Do not include
12809 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12811 (grub_console_cur_color): Remove i386-specific prototype.
12812 (grub_console_real_putchar): Likewise.
12813 (grub_console_checkkey): Likewise.
12814 (grub_console_getkey): Likewise.
12815 (grub_console_getxy): Likewise.
12816 (grub_console_gotoxy): Likewise.
12817 (grub_console_cls): Likewise.
12818 (grub_console_setcursor): Likewise.
12819 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12820 Include <grub/machine/console.h>.
12821 * term/ieee1275/ofconsole.c: Likewise.
12823 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12825 * Makefile.in (LIBLZO): New variable.
12827 * configure.ac: Check for LZO version 2.
12829 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12830 lzo/lzo1x.h instead of lzo1x.h.
12832 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12835 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12836 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12838 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12839 copying the data from PARTITION to P.
12841 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12843 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12844 negative, unload the module.
12846 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12847 map is "pc_partition_map" but not "pc".
12848 (usage): Fix the description. The options are --boot-image and
12849 --core-image but not --boot-file or --core-file.
12850 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12851 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12854 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12855 --core-file. Specify INSTALL_DEVICE as an argument.
12857 * util/console.c: Include config.h.
12858 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12859 [HAVE_NCURSES_H]: Include ncurses.h.
12860 [HAVE_CURSES_H]: Include curses.h.
12861 [!A_NORMAL] (A_NORMAL): Defined as zero.
12862 [!A_STANDOUT] (A_STANDOUT): Likewise.
12864 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12866 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12868 * configure.ac: Check for curses libraries and headers.
12870 * Makefile.in (LIBCURSES): New variable.
12872 * genmk.rb (Script::rule): Set the executable bits.
12874 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12875 name of the PC partition map is "pc_partition_map" but not "pc".
12877 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12879 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12880 (modules): Likewise.
12881 (usage): Added descriptions for --modules and --grub-probefs.
12882 Handle --modules and --grub-probefs. Save the arguments in MODULES
12883 and GRUB_PROBEFS, respectively.
12884 Auto-detect a filesystem module against GRUBDIR. If the result is
12885 empty and modules are not specified explicitly, abort the
12886 installation. Add the result to MODULES.
12888 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12889 disk/powerpc/ieee1275/ofdisk.c,
12890 include/grub/powerpc/ieee1275/init.h and
12891 term/powerpc/ieee1275/ofconsole.c.
12892 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12893 term/ieee1275/ofconsole.c.
12895 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12897 * COPYING: Upgraded to the latest version. Only the address of the
12898 FSF office has changed.
12900 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12902 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12903 kern/ieee1275.c with kern/ieee1275/of.c.
12905 * kern/ieee1275.c: Moved to ...
12906 * kern/ieee1275/of.c: ... here.
12908 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12910 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
12913 * config.guess: Updated to the latest version from gnulib.
12914 * config.sub: Likewise.
12915 * install.sh: Likewise.
12916 * mkinstalldirs: Likewise.
12918 * include/grub/console.h: Removed. This file is arch-specific. Do
12919 not put this in include/grub.
12921 * include/grub/i386/pc/console.h: Resurrected.
12923 * util/console.c: Include grub/machine/console.h instead of
12925 * util/grub-emu.c: Likewise.
12927 2005-08-04 Marco Gerards <metgerards@student.han.nl>
12929 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12932 From Vincent Pelletier <subdino2004@yahoo.fr>
12933 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12934 Redefined to use grub_getwh.
12935 (grub_term): New member named getwh.
12936 (grub_getwh): New prototype.
12937 * kern/term.c (grub_getwh): New function.
12938 * term/i386/pc/console.c (grub_console_getwh): New function.
12939 (grub_console_term): New member `getwh'.
12940 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12941 (grub_vga_term): New member `getwh'.
12942 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
12944 (grub_ofconsole_getw): New function.
12945 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12946 (grub_ofconsole_term): New field named getwh and new initial
12949 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12951 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12952 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12953 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12954 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12955 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12956 of <grub/machine/ieee1275.h>.
12957 * commands/ieee1275/reboot.c: Likewise.
12958 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12959 * kern/ieee1275.c: ... to here. All users updated. Change all
12960 parameter structs to use new type `grub_ieee1275_cell_t'.
12961 * term/powerpc/ieee1275/ofconsole.c: Move ...
12962 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12963 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12964 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12965 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12967 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12968 Remove unused prototypes. All users updated.
12969 * include/grub/powerpc/ieee1275/console.h: Removed.
12970 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12971 `grub_ieee1275_cell_t'.
12972 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12973 Cast comparisons with -1 to the correct type.
12974 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12975 type to match `grub_ieee1275_entry_fn'.
12977 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12979 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12981 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12982 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12984 (grub_probefs_SOURCES): New variable.
12986 * util/i386/pc/grub-probefs.c: New file.
12988 * util/i386/pc/grub-setup.c (main): Call
12989 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12990 grub_hfs_init and grub_jfs_init to initialize the system. Call
12991 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12992 grub_pc_partition_map_fini to finish the system.
12994 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12996 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12998 (grub_multiboot_load_elf32): Likewise.
12999 (grub_multiboot_is_elf64): Likewise.
13000 (grub_multiboot_load_elf64): Likewise.
13001 (grub_multiboot_load_elf): Likewise.
13002 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13003 an ELF32 or ELF64 file.
13004 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13006 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13007 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13008 NULL before calling FS->LABEL.
13009 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13010 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13011 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13012 before calling FS->LABEL.
13014 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13016 * util/i386/pc/grub-install.in (datadir): New variable.
13018 (pkgdatadir): New variable.
13019 (pkglibdir): Removed.
13021 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13023 * DISTLIST: Added util/i386/pc/grub-install.in.
13025 * util/i386/pc/grub-install.in: New file.
13027 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13028 (grub_install_SOURCES): Likewise.
13030 * genmk.rb: Added support for scripts.
13031 (Script): New class.
13032 (scripts): New variable.
13034 * Makefile.in (install-local): Install sbin_SCRIPTS by
13036 (uninstall): Remove sbin_SCRIPTS.
13038 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13039 device, try to get a GRUB device by
13040 grub_util_biosdisk_get_grub_dev.
13043 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13044 description for --device-map.
13046 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13048 Change the semantics of variable hooks. They now return strings
13049 instead of error values.
13051 * util/i386/pc/grub-setup.c: Include grub/env.h.
13052 (setup): Use grub_device_set_root instead of grub_env_set.
13054 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13055 grub_env_get instead of grub_device_set_root and
13056 grub_device_get_root, respectively.
13058 * kern/main.c (grub_env_write_root): New function.
13059 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13060 grub_env_set instead of grub_device_set_root.
13062 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13064 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13065 rather than calling ENV->WRITE_HOOK afterwards.
13066 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13067 passing a pointer of a pointer.
13068 (grub_register_variable_hook): Change the types of "read_hook" and
13069 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13071 Allocate the default empty string on the heap, because this string
13072 may be freed later.
13074 * kern/device.c: Include grub/env.h.
13075 (grub_device_set_root): Removed.
13076 (grub_device_get_root): Likewise.
13077 (grub_device_open): Use grub_env_get instead of
13078 grub_device_get_root.
13080 * include/grub/env.h (grub_env_read_hook_t): New type.
13081 (grub_env_write_hook_t): Likewise.
13082 (grub_env_var): Change the types of "read_hook" and "write_hook"
13083 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13084 (grub_register_variable_hook): Likewise.
13086 * include/grub/device.h (grub_device_set_root): Removed.
13087 (grub_device_set_root): Likewise.
13089 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13090 make sure that DIRNAME terminates with '/', so that
13091 grub_fat_find_dir will fail if PATH is not a directory.
13093 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13095 Use the qualifier auto for print_files and print_files_long.
13096 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13098 Put a newline only if there is no error.
13099 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13102 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13104 * kern/partition.c (grub_partition_probe): Initialize PART to
13105 NULL. Otherwise, when no partition map is registered, this returns
13108 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13110 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13111 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13114 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13116 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13117 information on each device, if it does not have partitions. Print
13118 "Device" instead of "Disk", because this function is not specific
13121 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13122 static to ensure that it is put on the memory rather than a
13125 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13127 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13128 (grub_cat_init): Likewise.
13129 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13130 (options): Likewise.
13131 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13132 (grub_configfile_init): Likewise.
13133 * font/manager.c (GRUB_MOD_INIT): Likewise.
13134 * commands/help.c (GRUB_MOD_INIT): Likewise.
13135 (grub_help_init): Likewise.
13136 * normal/command.c (grub_command_init): Likewise.
13137 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13138 * disk/loopback.c (grub_loop_init): Likewise.
13139 (GRUB_MOD_INIT): Likewise.
13140 * commands/ls.c (grub_ls_init): Likewise.
13141 (GRUB_MOD_INIT): Likewise.
13142 (options): Likewise.
13143 * commands/boot.c (grub_boot_init): Likewise.
13144 (GRUB_MOD_INIT): Likewise.
13145 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13146 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13147 (GRUB_MOD_INIT): Likewise.
13148 * commands/cmp.c (grub_cmp_init): Likewise.
13149 (GRUB_MOD_INIT): Likewise.
13151 * normal/arg.c: Use <> instead of "" to include header files.
13152 (SHORT_ARG_HELP): New macro.
13153 (SHORT_ARG_USAGE): Likewise.
13154 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13155 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13157 (find_short): Check if C is 'h' or 'u' explicitly.
13158 (grub_arg_show_help): Use space characters instead of tabs. Treat
13159 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13160 are shown with --help and --usage only if they are not used for
13161 the command itself.
13162 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13165 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13166 const into "longarg". Change the type of "shortarg" to int.
13168 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13170 * boot/i386/pc/boot.S (boot_drive_check): New label.
13172 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13175 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13176 which do not pass a boot drive correctly. Copied from GRUB Legacy.
13178 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13180 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13181 When turning off Gate A20, skip the check and return immediately,
13182 because this is not fatal usually.
13184 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13186 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13187 be 0x7C00 instead of 0x8000.
13189 * boot/i386/pc/pxeboot.S: Rewritten.
13191 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13193 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13196 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13198 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13199 robustness. This routine now supports a BIOS call and System
13200 Control Port A to modify the gate A20.
13202 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13203 Increased to 0x440.
13205 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
13207 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13208 device path and resulting ihandle.
13209 (grub_ofdisk_close): dprintf the ihandle being closed.
13210 (grub_ofdisk_read): dprintf function parameters.
13211 * kern/mm.c (grub_mm_init_region): Likewise.
13212 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13213 (grub_linux_boot): dprintf the Linux entry point, initrd address and
13214 size, and boot arguments.
13215 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13216 before loading into memory.
13217 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13218 before loading into memory.
13220 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
13222 * kern/mm.c: Added much documentation.
13223 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13224 8, set to 5 instead of 8.
13226 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13228 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13230 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13231 (grub_mkdevicemap_SOURCES): New variable.
13233 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13234 lib/device.c of GRUB Legacy.
13236 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13238 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13239 instead of PATH is NULL.
13241 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
13243 * commands/cmp.c (BUFFER_SIZE): New macro.
13244 (grub_cmd_cmp): Close the right file at the right time. Compare
13245 only data just read. Don't report files of different size as
13246 identical. Dynamically allocate buffers. Move variable
13247 declarations at the beginning of function.
13249 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
13251 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13254 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
13256 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13257 when backspace is pressed at beginning of line.
13259 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
13261 * DISTLIST: Added genfslist.sh.
13263 * normal/main.c (fs_module_list): New variable.
13264 (autoload_fs_module): New function.
13265 (read_fs_list): Likewise.
13266 (grub_normal_execute): Call read_fs_list.
13268 * kern/fs.c (grub_fs_autoload_hook): New variable.
13269 (grub_fs_probe): Added support for auto-loading.
13271 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13272 (grub_fs_module_list_t): New type.
13274 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13275 (grub_fs_autoload_hook): New prototype.
13277 * genfslist.sh: New file.
13279 * genmk.rb: Added a rule to generate a filesystem list.
13281 2005-06-30 Marco Gerards <metgerards@student.han.nl>
13283 * configure.ac: Fix the test for cross-compiling.
13285 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13286 define GRUB_UTIL anymore.
13288 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13289 so this function works on other systems than just big endian.
13290 (load_modules): Likewise.
13291 (add_segments): Likewise.
13293 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13295 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13296 contains `l' modifier, get a long from va_arg().
13298 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13300 * kern/mm.c (grub_free): If the next free block which is being
13301 merged is the first free block, set the first block to the block
13303 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13305 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13307 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13308 `grub_ieee1275_chosen'.
13310 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13312 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13313 (grub_ieee1275_chosen): New variable.
13314 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13316 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13317 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13318 Rename first argument to `phandle' for consistency.
13319 (grub_ieee1275_get_property_length): Likewise.
13320 (grub_ieee1275_next_property): Likewise. Change type of first argument
13321 to grub_ieee1275_phandle_t.
13322 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13323 Move export next to declaration.
13324 (grub_ieee1275_chosen): New variable.
13325 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13326 Correct cosmetic typo.
13327 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13328 `grub_ieee1275_chosen'.
13329 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13330 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13331 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13332 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13333 `grub_ieee1275_chosen'.
13335 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13337 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13339 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13340 /chosen/bootargs as "variable=value" pairs.
13342 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13344 * include/grub/misc.h (grub_dprintf): New macro.
13345 (grub_real_dprintf): New prototype.
13346 (grub_strword): Likewise.
13347 (grub_iswordseparator): Likewise.
13348 * kern/misc.c (grub_real_dprintf): New function.
13349 (grub_strword): Likewise.
13350 (grub_iswordseparator): Likewise.
13352 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13354 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13355 (roundup): Remove macro.
13356 (grub_ieee1275_flags): Make static.
13357 (grub_ieee1275_realmode): Remove.
13358 (grub_ieee1275_test_flag): New function.
13359 (grub_ieee1275_set_flag): Likewise.
13360 (find_options): Rename to `grub_ieee1275_find_options'; update
13361 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13362 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13363 (cmain): New prototype.
13364 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13365 `grub_ieee1275_flags' directly.
13366 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13367 machine/biosdisk.h.
13368 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13369 Don't include grub/machine/init.h.
13370 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13371 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13373 (grub_ieee1275_realmode): Likewise.
13374 (grub_ieee1275_flag): New enum.
13375 (grub_ieee1275_test_flag): New prototype.
13376 (grub_ieee1275_set_flag): New prototype.
13377 * include/grub/powerpc/ieee1275/init.h: Remove file.
13378 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13379 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13380 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13381 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13383 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13384 `grub_ieee1275_test_flag'.
13385 (grub_ieee1275_encode_devname): Likewise.
13387 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13389 * include/grub/powerpc/ieee1275/ieee1275.h
13390 (grub_ieee1275_encode_devname): New prototype.
13391 (grub_ieee1275_get_filename): Likewise.
13392 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13394 (grub_set_prefix): Likewise.
13395 (grub_machine_init): Call grub_set_prefix.
13396 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13397 (grub_parse_type): New enum.
13398 (grub_ieee1275_get_devargs): New function.
13399 (grub_ieee1275_get_devname): Likewise.
13400 (grub_ieee1275_parse_args): Likewise.
13401 (grub_ieee1275_get_filename): Likewise.
13402 (grub_ieee1275_encode_devname): Likewise.
13404 2005-03-30 Marco Gerards <metgerards@student.han.nl>
13406 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13407 `grub_loader_unset'.
13409 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13411 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13412 instead of grub_ieee1275_interpret.
13413 (grub_halt_init): New function.
13414 (grub_halt_fini): Likewise.
13415 (GRUB_MOD_INIT): Correct message grammar.
13416 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13417 instead of grub_ieee1275_interpret.
13418 (grub_reboot_init): New function.
13419 (grub_reboot_fini): Likewise.
13420 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13421 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13422 util/i386/pc/misc.c with commands/ieee1275/halt.c,
13423 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13424 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13426 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13428 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13430 (grub_halt): Likewise.
13431 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13432 (cmain): Remove __attribute__((unused)).
13433 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13434 (grub_heap_len): Likewise.
13435 (grub_machine_fini): New function.
13436 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13437 (grub_halt): Likewise.
13438 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13440 * util/powerpc/ieee1275/misc.c: New file.
13442 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13444 * DISTLIST: New file.
13445 * gendistlist.sh: Likewise.
13447 * Makefile.in (COMMON_DISTFILES): Removed.
13448 (BOOT_DISTFILES): Likewise.
13449 (CONF_DISTFILES): Likewise.
13450 (DISK_DISTFILES): Likewise.
13451 (FS_DISTFILES): Likewise.
13452 (INCLUDE_DISTFILES): Likewise.
13453 (KERN_DISTFILES): Likewise.
13454 (LOADER_DISTFILES): Likewise.
13455 (TERM_DISTFILES): Likewise.
13456 (UTIL_DISTFILES): Likewise.
13457 (DISTFILES): Likewise.
13458 (uninstall): Uninstall files in $(pkgdata_DATA).
13459 (DISTLIST): New target.
13460 (distdir): Use the contents of the file DISTLIST to get a list of
13463 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13465 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
13466 descriptor. This is ported from GRUB Legacy.
13468 * gencmdlist.sh: Added an extra semicolon to make it work with
13469 old sed versions. Reported by Robert Bihlmeyer
13470 <robbe@orcus.priv.at>.
13472 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
13474 Automatic loading of commands is supported.
13476 * normal/main.c (read_command_list): New function.
13477 (grub_normal_execute): Call read_command_list.
13479 * normal/command.c (grub_register_command): Return zero or CMD.
13480 Allocate CMD->NAME from the heap.
13481 Initialize CMD->MODULE_NAME to zero.
13482 Find the same name as well. If the same command is found and it is
13483 a dummy command, overwrite members. If it is not a dummy command,
13485 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
13486 (grub_command_find): If a dummy command is found, load a module
13487 and retry to find a command only once.
13489 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
13490 make sure that each command is loaded.
13492 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
13494 (struct grub_command): Remove const from the member `name'.
13495 Add a new member `module_name'.
13496 (grub_register_command): Return grub_command_t.
13498 * commands/help.c (grub_cmd_help): Call grub_command_find to make
13499 sure that each command is loaded.
13501 * genmk.rb (PModule::rule): Specify a module name without the
13502 suffix ".mod" to gencmdlist.sh.
13504 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13506 * gencmdlist.sh: New file.
13508 * genmk.rb (PModule::rule): Generate a rule for a command list.
13510 Generate command.lst from $(COMMANDFILES).
13512 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13513 (DATA): Added $(pkgdata_DATA).
13514 (install-local): Install files in $(pkgdata_DATA).
13516 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13518 * term/i386/pc/vga.c (debug_command): Removed.
13519 (GRUB_MOD_INIT): Do not register the command "debug".
13521 From Hollis Blanchard:
13522 * commands/configfile.c: New file.
13523 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13524 commands/configfile.c.
13525 (pkgdata_MODULES): Added configfile.mod.
13526 (configfile_mod_SOURCES): New variable.
13527 (configfile_mod_CFLAGS): Likewise.
13528 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13529 commands/configfile.c.
13530 (pkgdata_MODULES): Added configfile.mod.
13531 (configfile_mod_SOURCES): New variable.
13532 (configfile_mod_CFLAGS): Likewise.
13533 * util/grub-emu.c (main): Call grub_configfile_init and
13534 grub_configfile_fini.
13535 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13537 [GRUB_UTIL] (grub_configfile_fini): Likewise.
13539 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13541 * normal/arg.c (grub_arg_show_help): Do not show the bug report
13544 * commands/help.c (grub_cmd_help): Do not print newlines after
13545 the last command in print_command_help.
13547 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13549 * commands/default.h: New file.
13550 * commands/timeout.h: Likewise.
13551 * normal/context.c: Likewise.
13553 * util/misc.c: Do not include sys/times.h.
13554 Include sys/time.h and grub/machine/time.h.
13555 (grub_get_rtc): Rewritten with gettimeofday.
13557 * util/grub-emu.c (main): Call grub_default_init and
13558 grub_timeout_init before grub_normal_init, and call
13559 grub_timeout_fini and grub_default_fini after grub_main.
13561 * util/console.c (grub_ncurses_checkkey): Return the read
13564 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13567 * normal/main.c (read_config_file): Push MENU. If this fails,
13568 print an error and wait for a user input.
13569 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13570 If a menu is empty or an error occurs, pop MENU.
13571 (grub_normal_execute): Pop and free MENU after grub_menu_run
13574 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13576 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13578 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13580 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13582 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13585 * include/grub/normal.h (struct grub_menu_list): New struct.
13586 (grub_menu_list_t): New type.
13587 (struct grub_context): New struct.
13588 (grub_context_t): New type.
13589 (grub_register_command): Got rid of EXPORT_FUNC.
13590 (grub_unregister_command): Likewise.
13591 (grub_context_get): New prototype.
13592 (grub_context_get_current_menu): Likewise.
13593 (grub_context_push_menu): Likewise.
13594 (grub_context_pop_menu): Likewise.
13595 [GRUB_UTIL] (grub_default_init): Likewise.
13596 [GRUB_UTIL] (grub_default_fini): Likewise.
13597 [GRUB_UTIL] (grub_timeout_init): Likewise.
13598 [GRUB_UTIL] (grub_timeout_fini): Likewise.
13600 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13601 commands/timeout.c and normal/context.c.
13602 (pkgdata_MODULES): Added default.mod and timeout.mod.
13603 (normal_mod_SOURCES): Added normal/context.c.
13604 (default_mod_SOURCES): New variable.
13605 (default_mod_CFLAGS): Likewise.
13606 (timeout_mod_SOURCES): Likewise.
13607 (timeout_mod_CFLAGS): Likewise.
13608 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13610 (pkgdata_MODULES): Added default.mod and timeout.mod.
13611 (normal_mod_SOURCES): Added normal/context.c.
13612 (default_mod_SOURCES): New variable.
13613 (default_mod_CFLAGS): Likewise.
13614 (timeout_mod_SOURCES): Likewise.
13615 (timeout_mod_CFLAGS): Likewise.
13617 * Makefile.in (all-local): Added $(MKFILES).
13619 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
13621 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13622 (grub_emu_SOURCES): Likewise.
13623 (pkgdata_MODULES): Add `sun.mod'.
13624 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13627 (pkgdata_MODULES): Add `sun.mod'.
13628 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13629 * include/grub/partition.h (grub_sun_partition_map_init): New
13631 (grub_sun_partition_map_fini): Likewise.
13632 * partmap/sun.c: New file.
13633 * util/grub-emu.c (main): Initialize and de-initialize the sun
13634 partitionmap support.
13636 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
13638 This implements an Emacs-like menu entry editor.
13640 * normal/menu_entry.c: New file.
13642 * util/console.c (grub_ncurses_putchar): Translate some Unicode
13643 characters to ASCII.
13644 (saved_char): New variable.
13645 (grub_ncurses_checkkey): Rewritten completely.
13646 (grub_ncurses_getkey): Likewise.
13647 (grub_ncurses_init): Call raw instead of cbreak.
13649 * normal/menu.c (print_entry): Do not put a space.
13650 (init_page): Renamed to ...
13651 (grub_menu_init_page): ... this. All callers changed.
13652 (edit_menu_entry): Removed.
13653 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13655 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13657 * kern/misc.c (grub_vprintf): Call grub_refresh.
13659 * normal/menu.c (DISP_LEFT): Renamed to ...
13660 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13661 * normal/menu.c (DISP_UP): Renamed to ...
13662 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13663 * normal/menu.c (DISP_RIGHT): Renamed to ...
13664 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13665 * normal/menu.c (DISP_DOWN): Renamed to ...
13666 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13667 * normal/menu.c (DISP_HLINE): Renamed to ...
13668 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13669 * normal/menu.c (DISP_VLINE): Renamed to ...
13670 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13671 * normal/menu.c (DISP_UL): Renamed to ...
13672 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13673 * normal/menu.c (DISP_UR): Renamed to ...
13674 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13675 * normal/menu.c (DISP_LL): Renamed to ...
13676 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13677 * normal/menu.c (DISP_LR): Renamed to ...
13678 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13679 * normal/menu.c (TERM_WIDTH): Renamed to ...
13680 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13681 * normal/menu.c (TERM_HEIGHT): Renamed to ...
13682 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13683 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13684 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13685 * normal/menu.c (TERM_MARGIN): Renamed to ...
13686 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13687 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13688 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13689 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13690 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13691 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13692 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13693 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13694 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13695 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13696 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13697 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13698 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13699 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13700 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13701 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13702 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13703 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13704 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13705 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13706 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13707 All callers changed.
13709 * include/grub/normal.h: New prototype.
13711 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13712 normal/menu_entry.c.
13713 (normal_mod_SOURCES): Likewise.
13714 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13715 (normal_mod_SOURCES): Likewise.
13717 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13719 * include/grub/normal.h (grub_halt_init): New prototype.
13720 (grub_halt_fini): Likewise.
13721 (grub_reboot_init): Likewise.
13722 (grub_reboot_fini): Likewise.
13724 * util/grub-emu.c: Include signal.h.
13725 (main_env): New global variable.
13726 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13728 (grub_machine_fini): New function.
13729 (main): Call grub_halt_init and grub_reboot_init before
13730 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13731 Call setjmp with MAIN_ENV to go back afterwards.
13732 Call grub_machine_fini right before return.
13734 * include/grub/util/misc.h: Include setjmp.h.
13735 (main_env): New prototype.
13737 * include/grub/kernel.h (grub_machine_fini): New prototype.
13738 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13739 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13741 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13742 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13743 * term/i386/pc/console.c (grub_console_fini): Likewise.
13745 * util/i386/pc/misc.c: New file.
13747 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13748 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13749 commands/i386/pc/reboot.c.
13751 2005-02-14 Guillem Jover <guillem@hadrons.org>
13753 * include/grub/dl.h (grub_dl_check_header): New prototype.
13754 (grub_arch_dl_check_header): Change return type to grub_err_t,
13755 remove size parameter and export function. Update all callers.
13756 * kern/dl.c (grub_dl_check_header): New function.
13757 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13758 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13759 are inside the core.
13760 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13761 independent ELF header checks.
13762 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13763 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13764 `grub_dl_check_header' instead of explicit checks. Check for the
13766 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13767 `grub_dl_check_header' instead of explicit checks. Remove arch
13768 specific ELF header checks.
13770 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13773 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13775 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13776 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13778 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13780 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13781 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13782 (part_map_iterate): Clear `grub_errno' and return 0 if
13783 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13784 * partmap/amiga.c (amiga_partition_map_iterate): Return
13785 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13786 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13788 2005-02-01 Guillem Jover <guillem@hadrons.org>
13790 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13793 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13795 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13797 (grub_rescue_cmd_linux): New prototype.
13798 (grub_rescue_cmd_initrd): Likewise.
13799 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13801 (grub_linux_release_mem): Release the memory for the initrd.
13802 (grub_load_linux): Renamed from this...
13803 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13804 Changed `entry' not to be static. Loop over memory regions to
13805 find another one when the default fails.
13806 (grub_rescue_cmd_initrd): New function.
13807 (grub_linux_init): Remove function.
13808 (grub_linux_fini): Likewise.
13809 (GRUB_MOD_INIT): Register `initrd'.
13810 (GRUB_MOD_FINI): Unregister `initrd'.
13811 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13813 (grub_linux_normal_fini): Likewise.
13814 (GRUB_MOD_INIT): Register `initrd'.
13815 (GRUB_MOD_FINI): Unregister `initrd'.
13817 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13819 * commands/help.c: New file.
13820 * normal/arg.c (show_help): Renamed to...
13821 (grub_arg_show_help): ... this.
13822 * commands/i386/pc/halt.c: New file.
13823 * commands/i386/pc/reboot.c: Likewise.
13824 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13825 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13826 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13827 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13829 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13831 (pkgdata_MODULES): Add `help.mod'.
13832 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13833 * grub/i386/pc/init.h (grub_reboot): New prototype.
13834 (grub_halt): Likewise.
13835 * include/grub/normal.h (grub_arg_show_help): New prototype.
13836 (grub_help_init): Likewise.
13837 (grub_help_fini): Likewise.
13838 * util/grub-emu.c (main): Initialize and deinitialize the help
13841 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13843 * normal/command.c (grub_command_init): Fixed the description of
13844 the `set' and `unset' commands.
13846 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13848 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13850 * commands/ieee1275/halt.c: New file.
13851 * commands/ieee1275/reboot.c: Likewise.
13852 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13853 `__attribute__ ((unused))'. Some GCS related fixed.
13854 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13855 (grub_suspend_fini): Likewise.
13856 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13858 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13859 (halt_mod_CFLAGS): New variables.
13860 * include/grub/powerpc/ieee1275/ieee1275.h
13861 (grub_ieee1275_interpret): New prototype.
13863 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13865 * include/grub/misc.h (memmove): New prototype.
13866 (memcpy): Likewise.
13868 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13870 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13871 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13873 2005-01-22 Marco Gerards <metgerards@student.han.nl>
13875 * kern/misc.c (grub_strndup): Function rewritten.
13877 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13879 * normal/menu.c (TERM_WIDTH): Macro redefined.
13880 (TERM_TOP_BORDER_Y): Likewise.
13881 (draw_border): Replaced while-loop by a for-loop. Make the number
13882 of lines consistent with the number of lines displayed in
13883 print_entries. Added a margin below the rectangle.
13884 (print_entry): Make the entry fit in the rectangle.
13885 (print_entries): Display the scroll arrows next to the right
13888 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13890 * fs/minix.c (grub_minix_find_file): Reserve more space for
13891 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13892 `grub_strncpy' to copy `path' into it.
13894 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13896 Add the loopback device, a device via which files can be accessed
13899 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13900 (pkgdata_MODULES): Add loopback.mod.
13901 (loopback_mod_SOURCES): New variable.
13902 (loopback_mod_CFLAGS): Likewise.
13903 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13905 (pkgdata_MODULES): Add loopback.mod.
13906 (loopback_mod_SOURCES): New variable.
13907 (loopback_mod_CFLAGS): Likewise.
13908 * disk/loopback.c: new file.
13909 * include/grub/normal.h (grub_loop_init): New prototype.
13910 (grub_loop_fini): New prototype.
13911 * util/grub-emu.c (main): Initialize and de-initialize loopback
13913 * include/grub/disk.h (grub_disk_dev_id): Add
13914 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13916 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13918 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13920 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13921 (suspend_mod_SOURCES): New variable.
13922 (suspend_mod_CFLAGS): Likewise.
13923 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13925 * commands/ieee1275/suspend.c: New file.
13927 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13929 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
13930 ((unused))' to `__attribute__ ((used))'.
13931 (GRUB_MOD_FINI): Likewise.
13932 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13933 * genmk.rb (PModule): Assign space to common symbols when linking
13936 2005-01-20 Marco Gerards <metgerards@student.han.nl>
13938 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13939 `unsigned' arguments to `grub_size_t'.
13940 (grub_malloc): Likewise.
13941 (grub_realloc): Likewise.
13942 (grub_memalign): Likewise.
13943 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13944 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13945 * util/misc.c (grub_malloc): Likewise.
13946 (grub_realloc): Likewise.
13947 * kern/mm.c (get_header_from_pointer): Change the casts to
13948 `unsigned' into a cast to `grub_size_t'.
13950 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13951 point to `currnode' when `currnode' is changed.
13953 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13954 Schottelius <nico-linux@schottelius.org>.
13956 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13958 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13959 (note_path): Remove variable.
13960 (GRUB_IEEE1275_NOTE_NAME): New macro.
13961 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13962 (grub_ieee1275_note_hdr): New structure.
13963 (grub_ieee1275_note_desc): Likewise.
13964 (grub_ieee1275_note): Likewise.
13965 (load_note): Remove `dir' argument. All callers updated. Remove
13966 `note_img' and `path'. Do not load a file from `note_path'.
13967 Initialize a struct grub_ieee1275_note and write that to `out'.
13968 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13970 2005-01-05 Marco Gerards <metgerards@student.han.nl>
13972 * util/misc.c (grub_util_read_image): Revert last change. It
13973 called `grub_util_read_at', which seeks from the beginning of the
13976 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13978 * TODO: Add note about endianness in grub-mkimage.
13979 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13981 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13982 (grub_mkimage_SOURCES): New target.
13983 * include/grub/kernel.h (grub_start_addr): Remove variable.
13984 (grub_end_addr): Likewise.
13985 (grub_total_module_size): Likewise.
13986 (grub_kernel_image_size): Likewise.
13987 (GRUB_MODULE_MAGIC): New constant.
13988 (grub_module_info): New structure.
13989 (grub_arch_modules_addr): New prototype.
13990 (grub_get_end_addr): Remove prototype.
13991 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13992 * include/grub/powerpc/ieee1275/kernel.h: New file.
13993 * include/grub/util/misc.h (grub_util_get_fp_size): New
13995 (grub_util_read_at): Likewise.
13996 (grub_util_write_image_at): Likewise.
13997 * kern/main.c (grub_get_end_addr): Remove function.
13998 (grub_load_modules): Call grub_arch_modules_addr instead of using
13999 grub_end_addr. Look for a grub_module_info struct in memory. Use
14000 the grub_module_info fields instead of calling grub_get_end_addr
14001 as loop conditions. Move grub_add_unused_region code here.
14002 (grub_add_unused_region): Remove function.
14003 * kern/i386/pc/init.c: Include grub/cache.h.
14004 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14005 one call to add_mem_region.
14006 (grub_arch_modules_addr): New function.
14007 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14008 (grub_total_module_size): Likewise.
14009 Include grub/machine/kernel.h.
14010 (grub_arch_modules_addr): New function.
14011 * util/grub-emu.c (grub_end_addr): Remove variable.
14012 (grub_total_module_size): Likewise.
14013 (grub_arch_modules_addr): New function.
14014 * util/misc.c: Include unistd.h.
14015 (grub_util_get_fp_size): New function.
14016 (grub_util_read_at): Likewise.
14017 (grub_util_write_image_at): Likewise.
14018 (grub_util_read_image): Call grub_util_read_at.
14019 (grub_util_write_image): Call grub_util_write_image_at.
14020 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14021 additional memory in kernel_img for a struct grub_module_info.
14022 Fill in that grub_module_info.
14023 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14025 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14027 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14029 * include/grub/powerpc/ieee1275/ieee1275.h
14030 (grub_ieee1275_milliseconds): New prototype.
14031 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14033 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14034 grub_ieee1275_milliseconds.
14036 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14038 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14040 (find_options): New function.
14041 (cmain): Call find_options.
14042 * include/grub/powerpc/ieee1275/ieee1275.h
14043 (grub_ieee1275_realmode): New extern variable.
14044 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14045 grub_map if grub_ieee1275_realmode is false.
14047 2004-12-29 Marco Gerards <metgerards@student.han.nl>
14049 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14050 lines are inserted and make it work like readline. Reported by
14051 Vincent Pelletier <subdino2004@yahoo.fr>.
14053 2004-12-28 Marco Gerards <metgerards@student.han.nl>
14055 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14057 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14058 `kern/powerpc/cache.S'.
14060 2004-12-27 Marco Gerards <metgerards@student.han.nl>
14062 * genmk.rb: Handle the `Program' class in the main loop. Written
14063 by Johan Rydberg <jrydberg@gnu.org>.
14064 (Program): New class.
14065 (programs): New variable.
14066 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14067 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14068 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14069 (help_arch): Function removed.
14070 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14071 `powerpc/libgcc.h' and `loader.h'.
14072 (pkgdata_PROGRAMS): New variable.
14073 (sbin_UTILITIES): Variable removed.
14074 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14075 (grubof_SOURCES): Variable re-defined so it only includes the
14076 core functionality.
14077 (grubof_CFLAGS): Remove `-DGRUBOF'.
14078 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14079 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14080 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14081 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14082 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14083 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14084 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14085 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14086 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14087 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14088 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14089 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14090 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14091 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14092 (pc_mod_CFLAGS): New variables.
14093 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14094 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14095 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14096 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14098 * include/grub/i386/pc/init.h (grub_os_area_addr)
14099 (rub_os_area_size): ... to here.
14100 * include/grub/powerpc/ieee1275/ieee1275.h
14101 (grub_ieee1275_entry_fn): Export symbol.
14102 * include/grub/powerpc/ieee1275/init.h: New file.
14103 * include/grub/powerpc/libgcc.h: Likewise.
14104 * include/grub/cache.h: Likewise.
14105 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14106 <hollis@penguinppc.org>.
14107 * kern/dl.c: Include <grub/cache.h>.
14108 (grub_dl_flush_cache): New function.
14109 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14111 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14112 (grub_console_init): Removed prototypes.
14113 (grub_machine_init): Don't initialize the modules anymore.
14114 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14116 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14117 Macro undef removed.
14118 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14119 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14120 relocation `R_PPC_REL32'. Return an error when the relocation is
14122 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14123 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14124 * util/misc.c (grub_arch_sync_caches): Likewise.
14126 2004-12-19 Marco Gerards <metgerards@student.han.nl>
14128 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14129 `symlist.c', add `grubof_symlist.c'.
14130 (symlist.c): Variable removed.
14131 (grubof_HEADERS): Variable added.
14132 (grubof_symlist.c): New target.
14133 (kernel_syms.lst): Use `grubof_HEADERS' instead of
14134 `kernel_img_HEADERS'.
14135 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14136 * kern/powerpc/dl.c: New file.
14137 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14139 (grub_arch_dl_relocate_symbols): Likewise.
14140 (grub_register_exported_symbols): Likewise.
14142 2004-12-13 Marco Gerards <metgerards@student.han.nl>
14144 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14145 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
14146 to fail instead. Reported by Vincent Pelletier
14147 <subdino2004@yahoo.fr>.
14149 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14150 it is not allocated. Reported by Vincent Pelletier
14151 <subdino2004@yahoo.fr>.
14153 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14154 output so the output looks better.
14156 2004-12-04 Marco Gerards <metgerards@student.han.nl>
14158 Modulize the partition map support and add support for the amiga
14161 * commands/ls.c: Include <grub/partition.h> instead of
14162 <grub/machine/partition.h>.
14163 * kern/disk.c: Likewise.
14164 * kern/rescue.c: Likewise.
14165 * loader/i386/pc/chainloader.c: Likewise.
14166 * normal/cmdline.c: Likewise.
14167 * kern/powerpc/ieee1275/init.c: Likewise.
14168 (grub_machine_init): Call `grub_pc_partition_map_init',
14169 `grub_amiga_partition_map_init' and
14170 `grub_apple_partition_map_init'.
14171 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14172 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
14173 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
14174 `partition.h' and `pc_partition.h'.
14175 (grub_setup_SOURCES): Remove
14176 `disk/i386/pc/partition.c'. Add `kern/partition.c',
14177 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14178 (grub_emu_SOURCES): Likewise.
14179 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14180 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14181 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14182 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14183 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14184 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14185 (grubof_SOURCES): Likewise.
14186 * disk/i386/pc/partition.c: File removed.
14187 * disk/powerpc/ieee1275/partition.c: Likewise.
14188 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14189 * include/grub/i386/pc/partition.h: Likewise.
14190 * kern/partition.c: New file.
14191 * partmap/amiga.c: Likewise.
14192 * partmap/apple.c: Likewise.
14193 * partmap/pc.c: Likewise.
14194 * include/grub/partition.h: Likewise..
14195 * include/grub/pc_partition.h: Likewise.
14196 * util/grub-emu.c: Include <grub/partition.h> instead of
14197 <grub/machine/partition.h>.
14198 (main): Call `grub_pc_partition_map_init',
14199 `grub_amiga_partition_map_init' and
14200 `grub_apple_partition_map_init' and deinitialize afterwards.
14201 * util/i386/pc/biosdisk.c: Include `#include
14202 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14203 `<grub/machine/partition.h>'.
14204 * util/i386/pc/grub-setup.c: Likewise.
14205 * util/i386/pc/biosdisk.c: Likewise.
14206 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14207 partition information in case of a PC partition.
14208 * util/i386/pc/grub-setup.c: Include `#include
14209 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14210 `<grub/machine/partition.h>'.
14211 (setup): Only access the PC specific partition information in case
14214 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
14216 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14217 (grub_longjmp): Likewise.
14218 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14220 * normal/powerpc/setjmp.S: New file.
14221 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14222 `normal/powerpc/setjmp.S'.
14223 (grubof_CFLAGS): Add `-DGRUBOF'.
14224 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14225 [GRUB_UTIL && !GRUBOF].
14227 2004-11-16 Marco Gerards <metgerards@student.han.nl>
14229 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14230 property named `name'. Correctly handle the error returned by
14231 `grub_ieee1275_finddevice' if a device can not be opened.
14233 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
14235 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14236 `actual' for negativity.
14237 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14240 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14242 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14243 (PAGE_OFFSET): New macro.
14244 (CRTC_ADDR_PORT): Likewise.
14245 (CRTC_DATA_PORT): Likewise.
14246 (START_ADDR_HIGH_REGISTER): Likewise.
14247 (START_ADDR_LOW_REGISTER): Likewise.
14248 (GRAPHICS_ADDR_PORT): Likewise.
14249 (GRAPHICS_DATA_PORT): Likewise.
14250 (READ_MAP_REGISTER): Likewise.
14251 (INPUT_STATUS1_REGISTER): Likewise.
14252 (INPUT_STATUS1_VERTR_BIT): Likewise.
14253 (page): New variable.
14254 (wait_vretrace): New function.
14255 (set_read_map): Likewise.
14256 (set_start_address): Likewise.
14257 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14259 (check_vga_mem): Take the page into account.
14260 (write_char): Likewise.
14261 (write_cursor): Likewise.
14262 (scroll_up): Likewise. Copy the page to the page that is not
14263 shown and switch between both pages.
14264 (grub_vga_putchar): Fix off by one error.
14265 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14268 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14270 Add support for iso9660 (including rockridge).
14272 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14273 (iso9660_mod_SOURCES): New variable.
14274 (iso9660_mod_CFLAGS): Likewise.
14275 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14276 * include/grub/fs.h (grub_iso9660_init): New prototype.
14277 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14278 * fs/iso9660.c: New file.
14280 * include/grub/misc.h (grub_strncat): New prototype.
14281 * kern/misc.c (grub_strncat): New function.
14283 * fs/hfs.c (grub_hfs_mount): Translate the error
14284 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14285 * fs/jfs.c (grub_jfs_mount): Likewise.
14286 * fs/ufs.c (grub_ufs_mount): Likewise.
14288 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14290 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14291 which initialized BAT registers.
14292 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14293 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14295 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14296 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14298 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14299 (grub_mapclaim): Likewise.
14300 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14301 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14304 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14306 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14307 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14308 -ffreestanding and -msoft-float.
14310 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14312 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14313 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14314 set in grub_ieee1275_flags.
14316 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14318 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14320 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14321 grub_console_init first.
14322 Change the memory range used for grub_ieee1275_claim and
14323 grub_mm_init_region.
14324 Print an error message if the claim fails.
14325 Include <grub/misc.h>.
14327 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14329 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14330 Call grub_children_iterate for device nodes of type `scsi',
14332 (grub_ofdisk_open): Remove manual device alias resolution.
14333 Fix memory leak when device cannot be opened.
14334 * include/grub/powerpc/ieee1275/ieee1275.h
14335 (grub_children_iterate): New prototype.
14336 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14338 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14339 Return -1 if args.size was -1.
14341 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14343 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14344 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14345 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14346 Open Firmware's memory for it; claim memory from _start to _end.
14347 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14348 (_end): New extern.
14349 (_start): Zero BSS from __bss_start to _end.
14350 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14352 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14354 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14356 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14357 -1 if args.base was -1.
14359 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14361 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14362 escape sequence instead of a literal ^L. Also call
14363 grub_ofconsole_gotoxy.
14365 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14367 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14368 void * arguments to grub_addr_t. All callers updated. Also make
14369 the `result' argument optional.
14370 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14371 All callers updated.
14373 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14375 * commands/ls.c (grub_ls_list_files): Use the string following the
14376 initial ')', if present, as the filesystem path.
14377 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14379 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14381 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14383 Make the source code of the menu interface more readable.
14385 * normal/menu.c: Include grub/mm.h.
14386 (TERM_WIDTH): New macro.
14387 (TERM_HEIGHT): Likewise.
14388 (TERM_INFO_HEIGHT): Likewise.
14389 (TERM_MARGIN): Likewise.
14390 (TERM_SCROLL_WIDTH): Likewise.
14391 (TERM_TOP_BORDER_Y): Likewise.
14392 (TERM_LEFT_BORDER_X): Likewise.
14393 (TERM_BORDER_WIDTH): Likewise.
14394 (TERM_MESSAGE_HEIGHT): Likewise.
14395 (TERM_BORDER_HEIGHT): Likewise.
14396 (TERM_NUM_ENTRIES): Likewise.
14397 (TERM_FIRST_ENTRY_Y): Likewise.
14398 (TERM_ENTRY_WIDTH): Likewise.
14399 (TERM_CURSOR_X): Likewise.
14400 (draw_border): Use macros instead of magic numbers.
14401 (print_entry): Likewise.
14402 (print_entries): Likewise.
14403 (run_menu): Likewise. Also, handle the key 'e'.
14404 (run_menu_entry): Ignore empty command lines.
14405 (print_message): Added a new argument EDIT. If EDIT is true,
14406 print a different message.
14407 (init_page): Likewise.
14408 (edit_menu_entry): New function. Not implemented yet.
14410 2004-09-17 Marco Gerards <metgerards@student.han.nl>
14412 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14413 can be loaded from normal mode.
14415 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14417 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14418 (multiboot_mod_CFLAGS): New variables.
14419 * loader/i386/pc/linux_normal.c: New file.
14420 * loader/i386/pc/multiboot_normal.c: Likewise.
14422 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14423 attribute `unused'.
14425 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
14426 `fdiro' to read the mode information from instead of `diro'.
14428 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14429 looking up a symlink.
14431 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14433 * normal/command.c (grub_command_execute): Don't parse the
14434 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14435 flags of the command.
14437 * normal/menu.c (grub_menu_run): Fix typo.
14439 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
14441 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14443 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14444 `y + 1' instead of `y - 1'.
14446 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
14448 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
14450 From Hollis Blanchard <hollis@penguinppc.org>:
14451 * kern/misc.c (memmove): New alias for grub_memmove.
14452 (memcmp): New alias for grub_memcmp.
14453 (memset): New alias for grub_memset.
14454 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14455 Change "int handle" to "grub_ieee1275_phandle_t handle".
14456 * include/grub/powerpc/ieee1275/ieee1275.h
14457 (grub_ieee1275_get_property): Likewise.
14459 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
14461 Added normal mode command `chainloader' as module chain.mod, which
14462 depends on normal.mod and _chain.mod.
14464 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
14465 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
14466 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
14468 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
14469 but arguments parsing moved to ...
14470 (grub_chainloader_cmd): ... here. New function.
14471 * include/grub/i386/pc/chainloader.h: New file.
14472 * loader/i386/pc/chainloader_normal.c: Likewise.
14474 2004-09-11 Marco Gerards <metgerards@student.han.nl>
14476 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
14477 (grub_mkimage_LDFLAGS): Likewise.
14478 (grub_emu_SOURCES): Likewise.
14479 (kernel_img_HEADERS): Added fshelp.h.
14480 * fs/ext2.c: Include <grub/fshelp.h>.
14481 (FILETYPE_REG): New macro.
14482 (FILETYPE_INO_REG): Likewise.
14483 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
14485 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
14487 (grub_fshelp_node): New struct.
14488 (grub_ext2_data): Added member `diropen'. Changed member `inode'
14490 (grub_ext2_get_file_block): Removed function.
14491 (grub_ext2_read_block): New function.
14492 (grub_ext2_read_file): Replaced parameter `data' by `node'.
14493 This function was written.
14494 (grub_ext2_mount): Read the root inode. Create a diropen struct.
14495 (grub_ext2_find_file): Removed function.
14496 (grub_ext2_read_symlink): New function.
14497 (grub_ext2_iterate_dir): Likewise.
14498 (grub_ext2_open): Rewritten.
14499 (grub_ext2_dir): Rewritten.
14500 * include/grub/fshelp.h: New file.
14501 * fs/fshelp.c: Likewise.
14503 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
14505 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
14506 (print_message): Add a missing newline.
14507 (run_menu): Added timeout support.
14508 (run_menu_entry): New local function.
14509 (grub_menu_run): Added support for booting.
14511 * kern/loader.c (grub_loader_is_loaded): New function.
14513 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14514 (grub_get_rtc): Exported.
14516 * include/grub/i386/pc/time.h: Include grub/symbol.h.
14517 (grub_get_rtc): Exported.
14519 * include/grub/normal.h (struct grub_command_list): Remove
14520 constant from the member `command'.
14522 * include/grub/loader.h (grub_loader_is_loaded): Declared.
14524 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14526 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14528 2004-08-28 Marco Gerards <metgerards@student.han.nl>
14530 Add support for the JFS filesystem.
14532 * fs/jfs.c: New file.
14533 * include/grub/fs.h (grub_jfs_init): New prototype.
14534 (grub_jfs_fini): New prototype.
14535 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14536 (grub_emu_SOURCES): Likewise.
14537 (pkgdata_MODULES): Add jfs.mod.
14538 (jfs_mod_SOURCES): New variable.
14539 (jfs_mod_CFLAGS): Likewise.
14540 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14541 (grubof_SOURCES): Likewise.
14542 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14544 * fs/fat.c (grub_fat_find_dir): Convert the filename little
14545 endian to the host endian.
14546 (grub_fat_utf16_to_utf8): Move function from there...
14547 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
14548 the endianness of the source string anymore.
14549 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14551 2004-08-24 Marco Gerards <metgerards@student.han.nl>
14553 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14554 (grub_boot_fini) [GRUB_UTIL]: Likewise.
14555 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14556 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14558 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14559 (grub_hfs_iterate_dir): Make the function static. Add prototypes
14560 for `node_found' and `it_dir'.
14561 (grub_hfs_dir): Add prototype for `dir_hook'.
14563 * fs/minix.c (grub_minix_get_file_block): Add prototype for
14564 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
14565 and `indir32' to silence a gcc warning.
14567 * include/grub/fs.h (grub_hfs_init): New prototype.
14568 (grub_hfs_fini): Likewise.
14571 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14573 Each disk device has its own id now. This is useful to make use
14574 of multiple disk devices.
14576 * include/grub/disk.h (grub_disk_dev_id): New enum.
14577 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14578 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14580 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14581 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14583 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14584 GRUB_DISK_DEVICE_OFDISK_ID as an id.
14586 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14587 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14589 * include/grub/disk.h (struct grub_disk_dev): Added a new member
14590 "id" which is used by the cache manager.
14592 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14595 2004-08-18 Marco Gerards <metgerards@student.han.nl>
14597 * fs/hfs.c: New file.
14598 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14599 (grub_emu_SOURCES): Likewise.
14600 (pkgdata_MODULES): Add hfs.mod.
14601 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14602 (grubof_SOURCES): Likewise.
14603 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14605 * include/grub/misc.h (grub_strncasecmp): Add prototype.
14606 * kern/misc.c (grub_strncasecmp): Add function.
14608 2004-08-14 Marco Gerards <metgerards@student.han.nl>
14610 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14613 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14614 (grub_ext2_dir): In case the directory entry type is unknown, read
14617 2004-08-02 Peter Bruin <pjbruin@dds.nl>
14619 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14620 grub_load_linux instead of grub_rescue_cmd_linux as second
14621 argument of grub_rescue_register_command.
14623 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14625 2004-07-27 Marco Gerards <metgerards@student.han.nl>
14627 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14629 * commands/boot.c: Remove the check for `GRUB_UTIL'.
14630 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14631 `loader/powerpc/ieee1275/linux.c',
14632 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14633 * include/grub/powerpc/ieee1275/ieee1275.h
14634 (grub_ieee1275_release): New prototype.
14635 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14636 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14637 normal, boot, linux and linux_normal.
14638 * loader/powerpc/ieee1275/linux.c: New file.
14639 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14641 2004-07-12 Marco Gerards <metgerards@student.han.nl>
14643 * normal/arg.c (grub_arg_parse): Correct error handling after
14644 reallocating the argumentlist (check if `argl' is not null instead
14645 of checking if `args' is not null).
14646 * kern/mm.c (grub_realloc): Return the same pointer when using the
14647 same region, instead of returning the header address.
14649 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14651 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14652 one block instead of two when looking for the initial partition.
14653 (grub_partition_probe): Initialize the local variable `p' with 0.
14654 Use base 10 for the grub_strtoul call.
14655 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
14656 need for one local variable.
14657 (grub_strtoul): Don't add the new value to `num', instead of that
14660 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14662 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14663 (pxeboot_img_SOURCES): New variable.
14664 (pxeboot_img_ASFLAGS): Likewise.
14665 (pxeboot_img_LDFLAGS): Likewise.
14666 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
14667 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
14668 <lode_leroy@hotmail.com>.
14670 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14672 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14673 there was no input.
14675 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14677 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
14678 the history buffer logic.
14680 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14682 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14683 (FILETYPE_INO_SYMLINK): New macros.
14684 (grub_ext2_find_file): Check if the node is a directory using the
14685 inode stat information instead of using the filetype in the
14686 dirent. Exclude the first character of an absolute symlink.
14687 (grub_ext2_dir): Mask out the filetype part of the mode member of
14690 2004-05-24 Marco Gerards <metgerards@student.han.nl>
14692 Add support for UFS version 1 and 2. Add support for the minix
14693 filesystem version 1 and 2, both the variants with 14 and 30 long
14696 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14698 (grub_emu_SOURCES): Likewise.
14699 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14700 (ufs_mod_SOURCES): New variable.
14701 (ufs_mod_CFLAGS): Likewise.
14702 (minix_mod_SOURCES): Likewise.
14703 (minix_mod_CFLAGS): Likewise.
14704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14706 (grubof_SOURCES): Likewise.
14707 * fs/ufs.c: New file.
14708 * fs/minix.c: New file.
14709 * include/grub/fs.h (grub_ufs_init): New prototype.
14710 (grub_ufs_fini): Likewise.
14711 (grub_minix_init): Likewise.
14712 (grub_minix_fini): Likewise.
14713 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14716 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14718 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14719 commands/ls.c, commands/terminal.c, commands/boot.c,
14720 commands/cmp.c and commands/cat.c.
14721 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14723 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14726 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14728 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14729 and grub_, respectively. Because the conversion is trivial and
14730 mechanical, I omit the details here. Please refer to the CVS
14731 if you need more information.
14733 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14735 * include/pupa: Renamed to ...
14736 * include/grub: ... this.
14737 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14738 * util/i386/pc/grub-mkimage.c: ... this.
14739 * util/i386/pc/pupa-setup.c: Renamed to ...
14740 * util/i386/pc/grub-setup.c: ... this.
14741 * util/pupa-emu.c: Renamed to ...
14742 * util/grub-emu.c: ... this.
14744 2004-03-29 Marco Gerards <metgerards@student.han.nl>
14746 Add support for the newworld apple macintosh (PPC). This has been
14747 tested on the powerbook 2000 only. It only adds support for
14748 generic ieee1275 functions, console and disk support. This should
14749 be easy to port to other architectures with support for Open
14752 * configure.ac: Accept the powerpc as host_cpu. In the case of
14753 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14754 specific tests are only executed while building for the i386.
14755 Inverse test for crosscompile.
14756 * genmk.rb (Utility): Allow assembler files.
14757 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14758 * conf/powerpc-ieee1275.rmk: New file.
14759 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14760 * disk/powerpc/ieee1275/partition.c: Likewise.
14761 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14762 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14763 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14764 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14765 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14766 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14767 * include/pupa/powerpc/ieee1275/loader.h
14768 * include/pupa/powerpc/setjmp.h: Likewise.
14769 * include/pupa/powerpc/types.h: Likewise.
14770 * kern/powerpc/ieee1275/init.c: Likewise.
14771 * kern/powerpc/ieee1275/openfw.c: Likewise.
14772 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14774 These files were written by Johan Rydberg
14775 (jrydberg@night.trouble.net) and I only modified them slightly.
14777 * boot/powerpc/ieee1275/cmain.c: New file.
14778 * boot/powerpc/ieee1275/crt0.S: Likewise.
14779 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14780 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14782 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14784 * Makefile.in: Update copyright.
14785 * genmodsrc.sh: Likewise.
14786 * gensymlist.sh: Likewise.
14787 * term/i386/pc/vga.c: Indent correctly.
14789 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14790 bugreporting address.
14791 * util/i386/pc/pupa-setup.c (usage): Likewise,
14792 (main): Call pupa_ext2_init and pupa_ext2_fini.
14794 * fs/fat.c (log2): Renamed to ...
14795 (fat_log2): ... this.
14796 All callers changed.
14797 * kern/misc.c (memcpy): Alias to pupa_memmove.
14798 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14800 * util/console.c (pupa_ncurses_fini): Return 0.
14802 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14803 Move fail label here.
14804 [__GNU__]: Don't warn when using stat.
14805 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14806 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14807 long int. Use strtol instead of strtoul.
14809 2004-03-14 Marco Gerards <metgerards@student.han.nl>
14811 * commands/boot.c: New file.
14812 * commands/cat.c: Likewise.
14813 * commands/cmp.c: Likewise.
14814 * commands/ls.c: Likewise.
14815 * commands/terminal.c: Likewise.
14816 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14817 (pupa_register_command): Changed interface to match the new
14819 (pupa_command_execute): Changed (almost rewritten) so it uses
14820 pupa_split_command. Added support for setting variables using the
14822 (rescue_command): Changed to work with the new argument parser.
14823 (terminal_command): Moved from here to commands/terminal.c.
14824 (set_command): New function.
14825 (unset_command): New function.
14826 (insmod_command): New function.
14827 (rmmod_command): New function.
14828 (lsmod_command): New function.
14829 (pupa_command_init): Don't initialize the command terminal
14830 anymore. Initialize the commands set, unset, insmod, rmmod and
14832 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14833 (kernel_img_HEADERS): Add arg.h and env.h.
14834 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14835 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14836 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14838 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14840 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14841 (boot_mod_SOURCES): New variable.
14842 (terminal_mod_SOURCES): Likewise.
14843 (ls_mod_SOURCES): Likewise.
14844 (cmp_mod_SOURCES): Likewise.
14845 (cat_mod_SOURCES): Likewise.
14847 * normal/arg.c: New file.
14848 * kern/env.c: Likewise.
14849 * include/pupa/arg.h: Likewise.
14850 * include/pupa/env.h: Likewise.
14851 * font/manager.c (font_command): Changed to match argument parsing
14853 (PUPA_MOD_INIT): Likewise.
14854 * hello/hello.c (pupa_cmd_hello): Likewise.
14855 (PUPA_MOD_INIT): Likewise.
14856 * include/pupa/disk.h: Include <pupa/device.h>.
14857 (pupa_print_partinfo): New prototype.
14858 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14859 (pupa_dl_get_prefix): Likewise.
14860 * include/pupa/misc.h: Include <pupa/err.h>.
14861 (pupa_isgraph): New prototype.
14862 (pupa_isdigit): Likewise.
14863 (pupa_split_cmdline): Likewise.
14864 * include/pupa/normal.h: Include <pupa/arg.h>.
14865 (pupa_command): Changed the prototype of the member `func' to
14866 match the argument parsing interface. Added member `options'.
14867 (pupa_register_command): Updated to match function.
14868 (pupa_arg_parse): New prototype.
14869 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14870 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14871 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14872 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14873 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14874 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14875 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14876 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14877 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14878 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14879 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14880 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14881 * kern/disk.c: Include <pupa/file.h>.
14882 (pupa_print_partinfo): New function.
14883 * kern/dl.c: Include <pupa/env.h>.
14884 (pupa_dl_dir): Variable removed.
14885 (pupa_dl_load): Use the environment variable `prefix' instead of
14886 the variable pupa_dl_dir.
14887 (pupa_dl_set_prefix): Function removed.
14888 (pupa_dl_get_prefix): Likewise.
14889 * kern/i386/pc/init.c: Include <pupa/env.h>.
14890 (pupa_machine_init): Use the environment variable `prefix' instead of
14891 using pupa_dl_set_prefix to set the prefix.
14892 * kern/main.c: Include <pupa/env.h>.
14893 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14894 using pupa_dl_get_prefix to get the prefix.
14895 * kern/misc.c: Include <pupa/env.h>.
14896 (pupa_isdigit): New function.
14897 (pupa_isgraph): Likewise.
14898 (pupa_ftoa): Likewise.
14899 (pupa_vsprintf): Added support for printing values of the type
14900 `double'. Make it possible to format variable output when using
14901 formatting like `%1.2%f'.
14902 (pupa_split_cmdline): New function.
14903 * kern/rescue.c: Include <pupa/env.h>.
14904 (next_word): Removed function.
14905 (pupa_rescue_cmd_prefix): Likewise.
14906 (pupa_rescue_cmd_set): New function.
14907 (pupa_rescue_cmd_unset): New function.
14908 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14909 split the command line instead of splitting it here. Added
14910 support for setting variables using the syntax `foo=bar'. Don't
14911 initialize the prefix command anymore. Initialized the set and
14913 * normal/cmdline.c: Include <pupa/env.h>.
14914 (pupa_tab_complete): Added prototypes for print_simple_completion,
14915 print_partition_completion, add_completion, iterate_commands,
14916 iterate_dev, iterate_part and iterate_dir. Moved code to print
14917 partition information from here to kern/disk.c.
14918 (pupa_cmdline_run): Don't check if the function exists anymore.
14919 * normal/main.c: Include <pupa/env.h>.
14920 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14921 instead of using pupa_dl_get_prefix to get the prefix.
14922 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14923 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14925 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14926 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14927 ((unused))' to silence a gcc warning.
14928 (pupa_vga_setcolor): Likewise.
14929 (debug_command): Changed to match argument parsing
14931 * util/pupa-emu.c: Include <pupa/env.h>.
14932 (options): Added 0's for unused fields to silence a gcc warning.
14934 (main): Use the environment variable `prefix' instead of using
14935 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14936 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14939 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14940 * util/misc.c: Include <malloc.h>.
14941 (pupa_malloc): Rewritten so errors are correctly reported.
14942 (pupa_realloc): Likewise.
14943 (pupa_memalign): Likewise.
14944 (pupa_mm_init_region): Declare unused variables with
14945 `__attribute__ ((unused))' to silence a gcc warning.
14946 * normal/i386/setjmp.S: Remove tab at the end of the file to
14947 silence a gcc warning.
14948 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14949 variables with `__attribute__ ((unused))' to silence a gcc
14951 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14952 local variable i unsigned to silence a gcc warning.
14954 * kern/term.c: Include <pupa/misc.h>.
14955 (pupa_more_lines): New variable.
14956 (pupa_more): Likewise.
14957 (pupa_putcode): When the pager is active pause at the end of every
14959 (pupa_set_more): New function.
14960 * include/pupa/term.h (pupa_set_more): New prototype.
14963 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14965 Now this project is GRUB 2 rather than PUPA. The location of
14966 the CVS repository was moved to GRUB's.
14968 * configure.ac: Use bug-grub as the reporting address.
14969 Use GRUB instead of PUPA.
14970 Change the version number to 1.90.
14972 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14974 * genkernsyms.sh: Updated copyright information.
14975 * genmk.rb: Likewise.
14976 * genmodsrc.sh: Likewise.
14977 * gensymlist.sh: Likewise.
14978 * boot/i386/pc/boot.S: Likewise.
14979 * boot/i386/pc/diskboot.S: Likewise.
14980 * disk/i386/pc/biosdisk.c: Likewise.
14981 * disk/i386/pc/partition.c: Likewise.
14982 * font/manager.c: Likewise.
14983 * fs/ext2.c: Likewise.
14984 * fs/fat.c: Likewise.
14985 * include/pupa/boot.h: Likewise.
14986 * include/pupa/device.h: Likewise.
14987 * include/pupa/disk.h: Likewise.
14988 * include/pupa/dl.h: Likewise.
14989 * include/pupa/elf.h: Likewise.
14990 * include/pupa/err.h: Likewise.
14991 * include/pupa/file.h: Likewise.
14992 * include/pupa/font.h: Likewise.
14993 * include/pupa/fs.h: Likewise.
14994 * include/pupa/kernel.h: Likewise.
14995 * include/pupa/loader.h: Likewise.
14996 * include/pupa/misc.h: Likewise.
14997 * include/pupa/mm.h: Likewise.
14998 * include/pupa/net.h: Likewise.
14999 * include/pupa/normal.h: Likewise.
15000 * include/pupa/rescue.h: Likewise.
15001 * include/pupa/setjmp.h: Likewise.
15002 * include/pupa/symbol.h: Likewise.
15003 * include/pupa/term.h: Likewise.
15004 * include/pupa/types.h: Likewise.
15005 * include/pupa/i386/setjmp.h: Likewise.
15006 * include/pupa/i386/types.h: Likewise.
15007 * include/pupa/i386/pc/biosdisk.h: Likewise.
15008 * include/pupa/i386/pc/boot.h: Likewise.
15009 * include/pupa/i386/pc/console.h: Likewise.
15010 * include/pupa/i386/pc/init.h: Likewise.
15011 * include/pupa/i386/pc/kernel.h: Likewise.
15012 * include/pupa/i386/pc/linux.h: Likewise.
15013 * include/pupa/i386/pc/loader.h: Likewise.
15014 * include/pupa/i386/pc/memory.h: Likewise.
15015 * include/pupa/i386/pc/multiboot.h: Likewise.
15016 * include/pupa/i386/pc/partition.h: Likewise.
15017 * include/pupa/i386/pc/time.h: Likewise.
15018 * include/pupa/i386/pc/vga.h: Likewise.
15019 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15020 * include/pupa/util/getroot.h: Likewise.
15021 * include/pupa/util/misc.h: Likewise.
15022 * include/pupa/util/resolve.h: Likewise.
15023 * kern/device.c: Likewise.
15024 * kern/disk.c: Likewise.
15025 * kern/dl.c: Likewise.
15026 * kern/err.c: Likewise.
15027 * kern/file.c: Likewise.
15028 * kern/fs.c: Likewise.
15029 * kern/loader.c: Likewise.
15030 * kern/main.c: Likewise.
15031 * kern/misc.c: Likewise.
15032 * kern/mm.c: Likewise.
15033 * kern/rescue.c: Likewise.
15034 * kern/term.c: Likewise.
15035 * kern/i386/dl.c: Likewise.
15036 * kern/i386/pc/init.c: Likewise.
15037 * kern/i386/pc/lzo1x.S: Likewise.
15038 * kern/i386/pc/startup.S: Likewise.
15039 * loader/i386/pc/chainloader.c: Likewise.
15040 * loader/i386/pc/linux.c: Likewise.
15041 * loader/i386/pc/multiboot.c: Likewise.
15042 * normal/cmdline.c: Likewise.
15043 * normal/command.c: Likewise.
15044 * normal/main.c: Likewise.
15045 * normal/menu.c: Likewise.
15046 * normal/i386/setjmp.S: Likewise.
15047 * term/i386/pc/console.c: Likewise.
15048 * term/i386/pc/vga.c: Likewise.
15049 * util/console.c: Likewise.
15050 * util/genmoddep.c: Likewise.
15051 * util/misc.c: Likewise.
15052 * util/pupa-emu.c: Likewise.
15053 * util/resolve.c: Likewise.
15054 * util/unifont2pff.rb: Likewise.
15055 * util/i386/pc/biosdisk.c: Likewise.
15056 * util/i386/pc/getroot.c: Likewise.
15057 * util/i386/pc/pupa-mkimage.c: Likewise.
15058 * util/i386/pc/pupa-setup.c: Likewise.
15060 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15062 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15063 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15064 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15065 reading and reset it after reading.
15066 (pupa_ext2_close): Return PUPA_ERR_NONE.
15068 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15070 (struct linux_kernel_header): Add kernel_version and
15072 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15073 pupa_file_read succeeds.
15074 (pupa_rescue_cmd_initrd): Implement.
15076 2003-12-03 Marco Gerards <metgerards@student.han.nl>
15078 * fs/ext2.c (pupa_ext2_label): New function.
15079 (pupa_ext2_fs): Added label.
15080 * fs/fat.c (pupa_fat_label): New function.
15081 (pupa_fat_fs): Added label.
15082 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15084 * kern/misc.c (pupa_strndup): New function.
15085 * include/pupa/misc.h (pupa_strndup): New prototype.
15087 * include/pupa/normal.h: Include <pupa/err.h>.
15088 (pupa_set_history): New prototype.
15089 (pupa_iterate_commands): New prototype.
15090 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15091 <pupa/disk.h>, <pupa/file.h>.
15092 (hist_size): New variable.
15093 (hist_lines): Likewise.
15094 (hist_end): Likewise.
15095 (hist_used): Likewise.
15096 (pupa_set_history): New function.
15097 (pupa_history_get): Likewise.
15098 (pupa_history_add): Likewise.
15099 (pupa_history_replace): Likewise.
15100 (pupa_tab_complete): Likewise.
15101 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15102 completion shows partitionnames while completing partitions, this
15103 feature was suggested by Jeff Bailey.
15104 * normal/command.c (pupa_iterate_commands): New function.
15105 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15106 (pupa_normal_init): Initialize history buffer.
15107 (PUPA_MOD_INIT): Likewise.
15108 (pupa_normal_fini): Free the history buffer.
15109 (PUPA_MOD_FINI): Likewise.
15111 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15114 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15115 * configure.ac [i386]: Check for regparam bug.
15116 (NESTED_FUNC_ATTR) [! i386]: Defined.
15118 2003-11-17 Marco Gerards <metgerards@student.han.nl>
15120 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15121 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15122 (pupa_emu_SOURCES): New variable.
15123 (pupa_emu_LDFLAGS): Likewise.
15124 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15125 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15126 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15127 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15128 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15129 (pupa_jmp_buf): New typedef.
15130 (pupa_setjmp) [PUPA_UTIL]: New macro.
15131 (pupa_longjmp) [PUPA_UTIL]: Likewise.
15132 * include/pupa/term.h (struct pupa_term): New member `refresh'.
15133 (pupa_refresh): New prototype.
15134 * include/pupa/util/getroot.h: New file.
15135 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15137 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15138 (pupa_rescue_cmd_cat): Likewise.
15139 (pupa_rescue_cmd_ls): Likewise.
15140 (pupa_rescue_cmd_testload): Likewise.
15141 (pupa_rescue_cmd_lsmod): Likewise.
15142 * normal/cmdline.c (pupa_cmdline_get): Likewise.
15143 * normal/menu.c (run_menu): Likewise.
15144 * kern/term.c (pupa_cls): Likewise.
15145 (pupa_refresh): New function.
15146 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15147 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15148 * util/console.c: New file.
15150 * util/i386/pc/getroot.c: New file.
15151 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15152 (pupa_putchar): New function.
15153 (pupa_refresh): Likewise.
15154 (xgetcwd): Function moved to ...
15155 (strip_extra_slashes): Likewise.
15156 (get_prefix): Likewise.
15157 * util/i386/pc/getroot.c: ... here.
15158 (find_root_device): Function moved and renamed to...
15159 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15160 Changed all callers.
15161 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15163 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15164 Changed all callers.
15165 * util/misc.c (pupa_memalign): New function.
15166 (pupa_mm_init_region): Likewise.
15167 (pupa_register_exported_symbols): Likewise.
15168 (pupa_putchar): Function removed.
15169 * util/pupa-emu.c: New file.
15171 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
15173 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15174 (_multiboot_mod_SOURCES): New variable.
15175 (_multiboot_mod_CFLAGS): Likewise.
15176 * loader/i386/pc/multiboot.c: New file.
15177 * include/pupa/i386/pc/multiboot.h: Likewise.
15178 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15179 (pupa_multiboot_real_boot): New function.
15180 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15181 (pupa_multiboot_real_boot): New prototype.
15182 (pupa_rescue_cmd_multiboot): Likewise
15183 (pupa_rescue_cmd_module): Likewise.
15185 * kern/loader.c (pupa_loader_set): Continue when
15186 pupa_loader_unload_func() fails.
15187 (pupa_loader_unset): New function.
15188 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15190 * kern/misc.c (pupa_stpcpy): New function.
15191 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15193 2003-11-12 Marco Gerards <metgerards@student.han.nl>
15195 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15196 for available extensions.
15198 * include/pupa/i386/pc/time.h: New file.
15199 * kern/disk.c: Include <pupa/machine/time.h>.
15200 (PUPA_CACHE_TIMEOUT): New macro.
15201 (pupa_last_time): New variable.
15202 (pupa_disk_open): Flush the cache when there was a timeout.
15203 (pupa_disk_close): Reset the timer.
15204 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15206 * util/misc.c: Include <sys/times.h>
15207 (pupa_get_rtc): New function.
15209 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15211 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15213 (pupa_ext2_get_file_block): Use blocks member.
15215 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15216 first block. Return -1 instead of pupa_errno on error.
15218 2003-10-27 Marco Gerards <metgerards@student.han.nl>
15220 * README: In the pupa-mkimage example use _chain instead of chain
15221 and ext2 instead of fat.
15222 * TODO: Replace ext2fs with jfs as an example. Add an item for
15223 adding journal playback for ext2fs.
15224 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15225 (pkgdata_MODULES): Added ext2.mod.
15226 (ext2_mod_SOURCES): New variable.
15227 (ext2_mod_CFLAGS): Likewise.
15228 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15229 * include/pupa/misc.h (pupa_strncpy): New prototype.
15230 (pupa_strcat): Likewise.
15231 (pupa_strncmp): Likewise.
15232 * kern/misc.c (pupa_strcat): Enable function.
15233 (pupa_strncpy): New function.
15234 (pupa_strncmp): Likewise.
15235 * fs/ext2.c: New file.
15237 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15238 when the read failed before retrying.
15239 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15240 (_FILE_OFFSET_BITS): Likewise.
15241 * configure.ac: Added AC_SYS_LARGEFILE.
15243 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15245 * genmk.rb (PModule#rule): Make sure to get only symbol names
15246 from the output of nm.
15247 Reported by Robert Millan <zeratul2@wanadoo.es>.
15249 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15251 I forgot to check in these changes for a long time. This adds
15252 incomplete support for VGA console, and this is still very
15253 buggy. Also, a lot of consideration is required for I18N,
15254 UNICODE, and VGA font issues. Therefore, assume that this is
15255 such that "better than nothing".
15257 * font/manager.c: New file.
15258 * include/pupa/font.h: Likewise.
15259 * include/pupa/i386/pc/vga.h: Likewise.
15260 * term/i386/pc/vga.c: Likewise.
15261 * util/unifont2pff.rb: Likewise.
15263 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15264 (pkgdata_MODULES): Added vga.mod and font.mod.
15265 (vga_mod_SOURCES): New variables.
15266 (vga_mod_CFLAGS): Likewise.
15267 (font_mod_SOURCES): Likewise.
15268 (font_mod_CFLAGS): Likewise.
15270 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15272 * include/pupa/term.h: Include pupa/err.h.
15273 (struct pupa_term): Added init and fini.
15274 Changed the argument of putchar to pupa_uint32_t.
15276 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15277 (pupa_console_real_putchar): New prototype.
15278 (pupa_console_putchar): Removed.
15279 (pupa_console_checkkey): Exported.
15280 (pupa_console_getkey): Likewise.
15282 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15285 * kern/term.c (pupa_term_set_current): Rewritten.
15286 (pupa_putchar): Likewise.
15287 (pupa_putcode): New function.
15289 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15290 (pupa_console_real_putchar): ... this.
15291 (pupa_vga_set_mode): New function.
15292 (pupa_vga_get_font): Likewise.
15294 * normal/command.c: Include pupa/term.h.
15295 (terminal_command): New function.
15296 (pupa_command_init): Register the command "terminal".
15298 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15299 (DISP_UP): Likewise.
15300 (DISP_RIGHT): Likewise.
15301 (DISP_DOWN): Likewise.
15302 (DISP_HLINE): Likewise.
15303 (DISP_VLINE): Likewise.
15304 (DISP_UL): Likewise.
15305 (DISP_UR): Likewise.
15306 (DISP_LL): Likewise.
15307 (DISP_LR): Likewise.
15309 * term/i386/pc/console.c (pupa_console_putchar): New function.
15311 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15313 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15314 FIX. Reverse the path_list.
15316 * include/pupa/normal.h: Export pupa_register_command and
15317 pupa_unregister_command.
15319 * hello/hello.c (pupa_cmd_hello): New module.
15320 * conf/i386-pc.rmk: Added hello.mod.
15322 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15324 * kern/i386/pc/lzo1x.S: New file.
15326 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15327 (compress_kernel): New variable.
15328 (generate_image): Heavily modified to support compressing a
15329 large part of the core image.
15331 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15333 (pupa_util_load_image): New function.
15335 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15336 (pupa_compressed_size): New variable.
15337 (codestart): Enable Gate A20 here.
15338 Decompress the compressed part of the core image.
15339 Rearrange the code to put functions and variables which are
15340 required for initialization in the non-compressed part.
15343 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15346 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15348 * include/pupa/i386/pc/kernel.h
15349 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15350 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15351 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15352 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15353 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15355 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15357 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15358 (Utility#rule): Likewise.
15360 * configure.ac: Check if LZO is available.
15362 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15364 * include/pupa/normal.h: New file.
15365 * include/pupa/setjmp.h: Likewise.
15366 * include/pupa/i386/setjmp.h: Likewise.
15367 * normal/cmdline.c: Likewise.
15368 * normal/command.c: Likewise.
15369 * normal/main.c: Likewise.
15370 * normal/menu.c: Likewise.
15371 * normal/i386/setjmp.S: Likewise.
15373 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15374 (pupa_rescue_cmd_initrd): Likewise.
15376 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15379 * kern/i386/pc/startup.S (translation_table): New variable.
15380 (translate_keycode): New function.
15381 (pupa_console_getkey): Call translate_keycode.
15383 * kern/rescue.c (attempt_normal_mode): New function.
15384 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15385 it failed, print a message.
15387 * kern/mm.c (pupa_real_malloc): Print more information when a
15388 free magic is broken.
15389 (pupa_free): If the first free header is not free actually, set
15392 * kern/main.c (pupa_load_normal_mode): Just load the module
15394 (pupa_main): Don't print the message
15395 "Entering into rescue mode..." here.
15397 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15399 (pupa_rescue_cmd_initrd): Likewise.
15400 (pupa_rescue_cmd_initrd): Likewise.
15402 * include/pupa/symbol.h (FUNCTION): Specify the type.
15403 (VARIABLE): Likewise.
15405 * include/pupa/err.h (pupa_err_t): Added
15406 PUPA_ERR_UNKNOWN_COMMAND.
15408 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15409 (pupa_dl_get_prefix): Likewise.
15411 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15412 Added _chain.mod and _linux.mod instead of chain.mod and
15414 (chain_mod_SOURCES): Renamed to ...
15415 (_chain_mod_SOURCES): ... this.
15416 (chain_mod_CFLAGS): Renamed to ...
15417 (_chain_mod_CFLAGS): ... this.
15418 (linux_mod_SOURCES): Renamed to ...
15419 (_linux_mod_SOURCES): ... this.
15420 (linux_mod_CFLAGS): Renamed to ...
15421 (_linux_mod_CFLAGS): ... this.
15422 (normal_mod_SOURCES): New variable.
15423 (normal_mod_CFLAGS): Likewise.
15424 (normal_mod_ASFLAGS): Likewise.
15426 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
15428 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15431 * kern/dl.c (pupa_dl_ref): Refer depending modules
15433 (pupa_dl_unref): Unrefer depending modules recursively.
15434 Don't call pupa_dl_unload implicitly, because PUPA can crash if
15435 a module is unloaded before one depending on that module is
15437 (pupa_dl_unload): Unload depending modules explicitly,
15440 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
15442 * include/pupa/i386/pc/linux.h: New file.
15443 * loader/i386/pc/linux.c: Likewise.
15445 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15447 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15448 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
15449 of PUPA_CHAINLOADER_BOOT_SECTOR.
15451 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
15452 (pupa_linux_prot_size): New variable.
15453 (pupa_linux_tmp_addr): Likewise.
15454 (pupa_linux_real_addr): Likewise.
15455 (pupa_linux_boot_zimage): New function.
15456 (pupa_linux_boot_bzimage): Likewise.
15458 * kern/i386/pc/init.c (struct mem_region): New structure.
15459 (MAX_REGIONS): New macro.
15460 (mem_regions): New variable.
15461 (num_regions): Likewise.
15462 (pupa_os_area_addr): Likewise.
15463 (pupa_os_area_size): Likewise.
15464 (pupa_lower_mem): Likewise.
15465 (pupa_upper_mem): Likewise.
15466 (add_mem_region): New function.
15467 (compact_mem_regions): Likewise.
15468 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
15469 the size of the conventional memory and that of so-called upper
15470 memory (before the first memory hole).
15471 Instead of adding each found region to free memory, use
15472 add_mem_region and add them after removing overlaps.
15473 Also, add only 1/4 of the upper memory to free memory. The rest
15474 is used for loading OS images. Maybe this is ad hoc, but this
15475 makes it much easier to relocate OS images when booting.
15477 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
15478 (pupa_enter_rescue_mode): Don't register initrd and module.
15480 * kern/mm.c: Include pupa/dl.h.
15482 * kern/main.c: Include pupa/file.h and pupa/device.h.
15484 * kern/loader.c (pupa_loader_load_module_func): Removed.
15485 (pupa_loader_load_module): Likewise.
15487 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
15490 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
15491 (pupa_linux_tmp_addr): Likewise.
15492 (pupa_linux_real_addr): Likewise.
15493 (pupa_linux_boot_zimage): Likewise.
15494 (pupa_linux_boot_bzimage): Likewise.
15496 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
15497 (pupa_upper_mem): Likewise.
15498 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
15499 module is too dangerous.
15501 * include/pupa/loader.h (pupa_os_area_addr): Declared.
15502 (pupa_os_area_size): Likewise.
15503 (pupa_loader_set): Remove the first argument. Loader doesn't
15504 manage modules or initrd any longer.
15505 (pupa_loader_load_module): Removed.
15507 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15508 (linux_mod_SOURCES): New variable.
15509 (linux_mod_CFLAGS): Likewise.
15511 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
15513 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15514 the length of a blocklist correctly.
15516 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15517 Use ioctl only if the OS file is a block device.
15518 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15519 not very useful for normal files.
15521 * kern/main.c (pupa_set_root_dev): New function.
15522 (pupa_load_normal_mode): Likewise.
15523 (pupa_main): Call those above.
15525 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15528 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15530 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
15532 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15533 (setup): Configure the installed partition information and the
15536 * loader/i386/pc/chainloader.c (my_mod): New variable.
15537 (pupa_chainloader_unload): New function.
15538 (pupa_rescue_cmd_chainloader): Refer itself.
15539 (PUPA_MOD_INIT): Save its own module in MY_MOD.
15541 * kern/i386/pc/startup.S (install_partition): Removed.
15542 (version_string): Likewise.
15543 (config_file): Likewise.
15544 (pupa_install_dos_part): New variable.
15545 (pupa_install_bsd_part): Likewise.
15546 (pupa_prefix): Likewise.
15547 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15549 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15551 (make_install_device): New function.
15552 (pupa_machine_init): Set the dl prefix.
15554 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15555 (buf): Renamed to ...
15556 (linebuf): ... this.
15557 (pupa_rescue_cmd_prefix): New function.
15558 (pupa_rescue_cmd_insmod): Likewise.
15559 (pupa_rescue_cmd_rmmod): Likewise.
15560 (pupa_rescue_cmd_lsmod): Likewise.
15561 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15564 * kern/mm.c (pupa_memalign): If failed even after invalidating
15565 disk caches, unload unneeded modules and retry.
15567 * kern/misc.c (pupa_memmove): New function.
15568 (pupa_memcpy): Removed.
15569 (pupa_strcpy): New function.
15570 (pupa_itoa): Made static.
15572 * kern/dl.c (pupa_dl_iterate): New function.
15573 (pupa_dl_ref): Likewise.
15574 (pupa_dl_unref): Likewise.
15575 (pupa_dl_unload): Return if succeeded or not.
15576 (pupa_dl_unload_unneeded): New function.
15577 (pupa_dl_unload_all): Likewise.
15578 (pupa_dl_init): Renamed to ...
15579 (pupa_dl_set_prefix): ... this.
15580 (pupa_dl_get_prefix): New function.
15582 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15583 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15584 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15585 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15586 (pupa_install_dos_part): Declared.
15587 (pupa_install_bsd_part): Likewise.
15588 (pupa_prefix): Likewise.
15589 (pupa_boot_drive): Likewise.
15591 * include/pupa/types.h: Fix a typo.
15593 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15595 (pupa_memmove): Declared.
15596 (pupa_strcpy): Likewise.
15598 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15599 pupa_mod_init takes one argument, its own module.
15600 (pupa_dl_unload_unneeded): Declared.
15601 (pupa_dl_unload_all): Likewise.
15602 (pupa_dl_ref): Likewise.
15603 (pupa_dl_unref): Likewise.
15604 (pupa_dl_iterate): Likewise.
15605 (pupa_dl_init): Renamed to ...
15606 (pupa_dl_set_prefix): ... this.
15607 (pupa_dl_get_prefix): Declared.
15609 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15610 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15612 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15613 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15615 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15616 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15618 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15620 * util/i386/pc/pupa-setup.c (setup): Define the internal
15621 function find_first_partition_start at the top level, because GCC
15622 3.0.x cannot compile internal functions in deeper scopes
15624 (find_root_device): Use lstat instead of stat.
15625 Don't follow symbolic links.
15626 Fix the path-constructing code.
15628 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15629 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15630 by a BLKGETSIZE ioctl first, because block devices don't fill
15631 the member st_mode of the structure stat on Linux.
15632 [__linux__] (linux_find_partition): Use a temporary buffer
15633 REAL_DEV for the working space. Copy it to DEV before returning.
15634 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15635 buffer cache consistent.
15636 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15637 strncmp. The previous value was merely wrong.
15638 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15640 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15641 FAT size is 12. The previous value was merely wrong.
15643 * kern/main.c (pupa_main): Don't split the starting message from
15646 * kern/term.c (pupa_putchar): Put CR after LF instead of before
15647 LF, because BIOS goes crazy about character attributes in this
15650 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15652 * include/i386/pc/util/biosdisk.h: New file.
15653 * util/i386/pc/biosdisk.c: Likewise.
15654 * util/i386/pc/pupa-setup.c: Likewise.
15656 * Makefile.in (INCLUDE_DISTFILES): Added
15657 include/pupa/i386/pc/util/biosdisk.h.
15658 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15659 directory util/i386/pc.
15660 (install-local): Added a rule for sbin_UTILITIES.
15661 (uninstall): Likewise.
15663 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15665 * util/misc.c (xrealloc): New function.
15666 (pupa_malloc): Likewise.
15667 (pupa_free): Likewise.
15668 (pupa_realloc): Likewise.
15669 (pupa_stop): Likewise.
15670 (pupa_putchar): Likewise.
15672 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15674 * include/pupa/util/misc.h (xrealloc): Declared.
15676 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15678 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15679 (PUPA_BOOT_MACHINE_BPB_END): ... this.
15681 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15682 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15684 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15685 way should be implemented.
15686 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15688 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15689 the size of NAME for safety.
15690 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15693 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15694 (pupa_setup_SOURCES): Likewise.
15696 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15698 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15700 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15701 bunch of pushl's from pusha, because this destroys the return
15704 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15706 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15707 This means that any missing prototypes could be fatal. Also, you
15708 must take care when writing assembly code. See the comments at
15709 the beginning of startup.S, for more details.
15711 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15712 compilation mechanism.
15713 (pupa_chainloader_real_boot): Likewise.
15714 (pupa_biosdisk_rw_int13_extensions): Likewise.
15715 (pupa_biosdisk_rw_standard): Likewise.
15716 (pupa_biosdisk_check_int13_extensions): Likewise.
15717 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15718 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15719 (pupa_get_memsize): Likewise.
15720 (pupa_get_mmap_entry): Likewise.
15721 (pupa_console_putchar): Likewise.
15722 (pupa_console_setcursor): Likewise.
15723 (pupa_getrtsecs): Use pushl instead of push.
15725 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15726 memory instead of the stack for a mmap entry, because some
15727 BIOSes may ignore the maximum size and overflow.
15729 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15731 * genmk.rb (PModule#rule): Compile automatically generated
15732 sources with module-specific CFLAGS as well as other sources.
15734 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15736 * configure.ac: Check ld.
15737 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15738 respectively, before checking endianness and sizes.
15740 * Makefile.in (LD): New variable.
15742 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15744 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15746 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15748 * Changelog: New file.