1 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
5 (grub_drive): Likewise.
7 2009-04-13 David S. Miller <davem@davemloft.net>
9 * kern/sparc64/ieee1275/ieee1275.c: New file.
10 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
11 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
12 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
13 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
14 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
15 grub_ieee1275_alloc_physmem): Declare new exported functions.
17 * include/grub/sparc64/ieee1275/loader.h: New file.
18 * include/grub/sparc64/ieee1275/memory.h: Likewise.
19 * include/grub/sparc64/kernel.h: Likewise.
20 * loader/sparc64/ieee1275/linux.c: Likewise.
22 2009-04-12 David S. Miller <davem@davemloft.net>
24 * kern/misc.c (grub_ltoa): Fix cast when handling negative
25 values. Noticed by Pavel Roskin.
27 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
30 * genmk.rb: Add more flexible image type specification, also
31 pass --strip-unneeded to objcopy.
32 * conf/i386-pc.rmk: Use *_FORMAT.
33 * conf/i386-pc.mk: Rebuilt.
35 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
36 (OFDISK_HASH_SZ): Define.
37 (ofdisk_hash): New hash table.
38 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
39 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
40 instead of device phandle which is not unique.
42 * kern/sparc64/ieee1275/init.c: Delete, replace with...
43 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
44 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
45 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
46 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
47 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
48 GRUB_KERNEL_MACHINE_DATA_END): Define.
49 (grub_kernel_image_size, grub_total_module_size): Declare.
51 2009-04-12 Pavel Roskin <proski@gnu.org>
53 * configure.ac: Change the logic when we check for target tools.
54 Do it when the target is specified and it's different from the
55 specified value of the host.
57 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
59 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
60 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
61 GNU/kFreeBSD. Check if a device is a character device. Use
62 DIOCGMEDIASIZE to get the size.
63 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
64 support for GNU/kFreeBSD.
65 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
66 is a character device instead of a block device. Add support for
69 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
70 is a character device instead of a block device.
72 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
73 is a character device instead of a block device.
75 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
77 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
78 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
79 FreeBSD. Check if a device is a character device. Use
80 DIOCGMEDIASIZE to get the size.
81 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
83 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
84 is a character device instead of a block device. Add support for
87 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
88 a character device instead of a block device.
89 (grub_util_check_char_device): New function.
91 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
92 a character device instead of a block device.
94 * include/grub/util/getroot.h (grub_util_check_char_device): New
97 2009-04-11 David S. Miller <davem@davemloft.net>
99 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
101 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
102 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
103 function, if present.
104 (__bswapdi2): Likewise.
106 * include/grub/sparc64/ieee1275/boot.h: New file.
107 * boot/sparc64/ieee1275/boot.S: Likewise.
108 * boot/sparc64/ieee1275/diskboot.S: Likewise.
110 * kern/misc.c (grub_ltoa): New function.
111 (grub_vsprintf): Use it to format 'long' integers.
113 2009-04-10 David S. Miller <davem@davemloft.net>
115 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
116 slots are of type grub_ieee1275_cell_t.
117 (grub_nand_read): Likewise.
118 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
119 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
120 macros are used to compare values in arg/ret block of the call.
121 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
122 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
123 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
124 grub_ieee1275_instance_to_path, grub_ieee1275_write,
125 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
126 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
127 grub_ieee1275_close, grub_ieee1275_set_property,
128 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
129 grub_ieee1275_cell_t.
130 * kern/ieee1275/openfw.c (grub_map): Likewise.
131 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
132 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
134 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
135 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
136 (grub_devalias_iterate): Likewise.
138 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
142 * fs/ufs.c (INODE_NBLOCKS): new definition
143 (struct grub_ufs_dirent): added fields for non-BSD dirents
144 (grub_ufs_get_file_block): fixed double indirect handling
145 (grub_ufs_lookup_symlink): use more robust way to determine whether
147 (grub_ufs_find_file): support for non-BSD dirents
148 (grub_ufs_dir): support for non-BSD dirents
150 2009-04-10 Bean <bean123ch@gnail.com>
152 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
153 attribute, otherwise the size would be wrong for i386 platform.
155 * include/grub/pci.h (grub_pci_read_word): New inline function.
156 (grub_pci_read_byte): Likewise.
157 (grub_pci_write): Likewise.
158 (grub_pci_write_word): Likewise.
159 (grub_pci_write_byte): Likewise.
161 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
163 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
164 (find_framebuf): Scan pci to locate the frame buffer address.
166 * commands/efi/fixvideo.c: New file.
168 * commands/efi/loadbios.c: Likewise.
170 * commands/memrw.c: Likewise.
172 * util/grub-dumpbios.in: Likewise.
174 * conf/common.rmk (grub-dumpbios): New utility.
175 (pkglib_MODULES): New module memrw.mod.
176 (memrw_mod_SOURCE): New macro.
177 (memrw_mod_CFLAGS): Likewise.
178 (memrw_mod_LDFLAGS): Likewise.
180 * conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
182 (loadbios_mod_SOURCE): New macro.
183 (loadbios_mod_CFLAGS): Likewise.
184 (loadbios_mod_LDFLAGS): Likewise.
185 (fixvideo_mod_SOURCE): Likewise.
186 (fixvideo_mod_CFLAGS): Likewise.
187 (fixvideo_mod_LDFLAGS): Likewise.
189 * conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
191 (loadbios_mod_SOURCE): New macro.
192 (loadbios_mod_CFLAGS): Likewise.
193 (loadbios_mod_LDFLAGS): Likewise.
194 (fixvideo_mod_SOURCE): Likewise.
195 (fixvideo_mod_CFLAGS): Likewise.
196 (fixvideo_mod_LDFLAGS): Likewise.
198 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
200 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
202 2009-04-07 David S. Miller <davem@davemloft.net>
204 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
205 support for R_SPARC_OLO10 relocations. Fix compile warning for
206 R_SPARC_WDISP30 case.
207 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
209 2009-04-06 Pavel Roskin <proski@gnu.org>
211 * include/grub/misc.h (ARRAY_SIZE): New macro.
212 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
214 * loader/i386/linux.c (allocate_pages): Use free_pages().
215 (grub_linux_unload): Don't use free_pages().
216 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
217 wrong index. Treat all other modes as text modes.
218 (grub_cmd_linux): Initialize vid_mode unconditionally to
219 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
221 * commands/help.c (print_command_help): Use cmd->prio, not
222 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
224 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
228 * parttool/pcpart.c: new file
229 * commands/parttool.c: likewise
230 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
231 (parttool_mod_SOURCES): new variable
232 (parttool_mod_CFLAGS): likewise
233 (parttool_mod_LDFLAGS): likewise
234 (pcpart_mod_SOURCES): likewise
235 (pcpart_mod_CFLAGS): likewise
236 (pcpart_mod_LDFLAGS): likewise
237 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
238 and parttool/pcpart.c
239 * conf/i386-efi.rmk: likewise
240 * conf/i386-ieee1275.rmk: likewise
241 * conf/i386-pc.rmk: likewise
242 * conf/powerpc-ieee1275.rmk: likewise
243 * conf/sparc64-ieee1275.rmk: likewise
244 * conf/x86_64-ieee1275.rmk: likewise
246 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
248 Support for mtime and further expandability of dir command
250 * include/grub/lib/datetime.h: moved to ...
251 * include/grub/datetime.h: ... moved here and added
252 declaration of grub_unixtime2datetime. All users updated
253 * include/grub/fs.h: new syntax for dir and mtime functionin
255 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
256 and GRUB_FSHELP_FLAGS_MASK
257 * commands/ls.c (grub_ls_list_files): Write mtime in long format
258 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
259 (grub_ext2_mtime): new function
260 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
261 (grub_hfsplus_mtime): new function
262 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
263 (GRUB_UFS_ATTR_FILE): likewise
264 (GRUB_UFS_ATTR_LNK): likewise
265 (struct grub_ufs_sblock): new fields mtime
266 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
268 (grub_ufs_dir): mtime support
269 (grub_ufs_mtime): new function
270 * fs/affs.c (grub_affs_dir): use new dir syntax
271 * fs/afs.c (grub_afs_dir): likewise
272 * fs/cpio.c (grub_cpio_dir): likewise
273 * fs/fat.c (grub_fat_find_dir): likewise
274 * fs/hfs.c (grub_hfs_dir): likewise
275 * fs/iso9660.c (grub_iso9660_dir): likewise
276 * fs/jfs.c (grub_jfs_dir): likewise
277 * fs/minix.c (grub_minix_dir): likewise
278 * fs/ntfs.c (grub_ntfs_dir): likewise
279 * fs/reiserfs.c (grub_reiserfs_dir): likewise
280 * fs/sfs.c (grub_sfs_dir): likewise
281 * fs/xfs.c (grub_xfs_dir): likewise
282 * util/hostfs.c (grub_hostfs_dir): likewise
283 * lib/datetime.c: moved to ...
284 * normal/datetime.c: ... moved here
285 (grub_unixtime2datetime): new function
286 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
287 * normal/completition.c (iterate_dir): use new dir syntax
288 * normal/misc.c (grub_normal_print_device_info): tell the
289 last modification time of a volume
290 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
291 * conf/common.rmk: added lib/datetime.c to ls.mod
292 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
293 (normal_mod_SOURCES): likewise
294 (datetime_mod_SOURCES): Removed lib/datetime.c
295 * conf/i386-efi.rmk: likewise
296 * conf/i386-ieee1275.rmk: likewise
297 * conf/i386-pc.rmk: likewise
298 * conf/powerpc-ieee1275.rmk: likewise
299 * conf/sparc64-ieee1275.rmk: likewise
300 * conf/x86_64-efi.rmk: likewise
302 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
304 Trim trailing spaces in FAT label and support mtools-like labels
306 * fs/fat.c (grub_fat_iterate_dir): New function based
308 (grub_fat_find_dir): use grub_fat_iterate_dir
309 (grub_fat_label): likewise
311 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
313 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
315 remove extraneous kernel_elf_HEADERS
317 2009-04-04 Bean <bean123ch@gnail.com>
319 * include/grub/util/misc.h: Add dummy function fsync for mingw.
321 * util/misc.c: Likewise.
323 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
325 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
326 instead of grub_printf.
328 2009-04-03 Robert Millan <rmh@aybabtu.com>
330 * loader/i386/linux.c (grub_linux_setup_video): Fill
331 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
332 values from `mode info' structure instead of hardcoded
335 2009-04-01 Pavel Roskin <proski@gnu.org>
337 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
339 * genmk.rb: Likewise.
340 * configure.ac: Likewise.
342 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
344 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
345 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
347 2009-04-01 David S. Miller <davem@davemloft.net>
349 * normal/sparc64/setjmp.S: Fix setjmp implementation.
350 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
351 (grub_setjmp): Mark with 'returns_twice' attribute.
352 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
353 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
354 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
356 2009-04-01 Robert Millan <rmh@aybabtu.com>
358 Reapply fix from 2008-07-28 which was accidentally reverted; also
359 perform the same fix to a similar check in same function.
361 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
362 with the same number are found, just use issue a warning with
363 grub_dprintf(), as this error has been reported to be non-fatal.
365 2009-03-31 Pavel Roskin <proski@gnu.org>
367 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
368 for cross-compilation.
370 2009-03-30 Robert Millan <rmh@aybabtu.com>
372 Fix i386-ieee1275 build.
374 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
377 2009-03-30 Pavel Roskin <proski@gnu.org>
379 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
380 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
381 zero-terminated, rely only on the strlen value. Fix comparison
382 of strings differing in length.
384 2009-03-30 Robert Millan <rmh@aybabtu.com>
386 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
387 checking for abi version. Improve error messages on BIOS to notify
388 user about `linux16' command.
390 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
394 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
396 * disk/scsi.c (grub_scsi_open): free scsi in case of error
398 2009-03-29 Robert Millan <rmh@aybabtu.com>
400 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
401 set `vid_mode' accordingly.
402 (grub_linux_boot): Process `vid_mode' and set video mode.
404 2009-03-29 Robert Millan <rmh@aybabtu.com>
406 * util/grub.d/10_linux.in (linux_entry): New function.
407 Factorize generation of Linux boot entries.
409 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
411 Make the format of Environment Block plain text. The boot loader
412 part is not tested well yet.
414 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
417 (usage): Remove "info" and "clear". Add "unset". Update the
418 description of "set", as this does not delete variables any
420 (create_envblk_file): Complete rewrite.
421 (open_envblk_file): Likewise.
423 (cmd_list): Likewise.
425 (cmd_clear): Likewise.
426 (list_variables): New function.
427 (write_envblk): Likewise.
428 (set_variables): Likewise.
429 (unset_variables): Likewise.
430 (main): Complete rewrite.
432 * commands/loadenv.c (buffer): Removed.
434 (open_envblk_file): New function.
435 (read_envblk_file): Complete rewrite.
436 (grub_cmd_load_env): Likewise.
437 (grub_cmd_list_env): Likewise.
438 (struct blocklist): New struct.
439 (free_blocklists): New function.
440 (check_blocklists): Likewise.
441 (write_blocklists): Likewise.
442 (grub_cmd_save_env): Complete rewrite.
444 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
445 a plain text signature.
446 (GRUB_ENVBLK_MAXLEN): Removed.
447 (struct grub_envblk): Complete rewrite.
448 (grub_envblk_find): Removed.
449 (grub_envblk_insert): Likewise.
450 (grub_envblk_open): New prototype.
451 (grub_envblk_set): Likewise.
452 (grub_envblk_delete): Put const to VALUE.
453 (grub_envblk_iterate): Put const to NAME and VALUE.
454 (grub_envblk_close): New prototype.
455 (grub_envblk_buffer): New inline function.
456 (grub_envblk_size): Likewise.
458 * lib/envblk.c: Include grub/mm.h.
459 (grub_env_find): Removed.
460 (grub_envblk_open): New function.
461 (grub_envblk_close): Likewise.
462 (escaped_value_len): Likewise.
463 (find_next_line): Likewise.
464 (grub_envblk_insert): Removed.
465 (grub_envblk_set): New function.
466 (grub_envblk_delete): Complete rewrite.
467 (grub_envblk_iterate): Likewise.
469 2009-03-28 Robert Millan <rmh@aybabtu.com>
471 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
472 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
473 variables. Use 16-bit loader.
474 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
476 * kern/i386/loader.S (grub_linux_boot): Rename to ...
477 (grub_linux16_boot): ... this. Update all users.
478 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
479 (grub_linux_boot): ... this. Update all users.
481 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
482 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
483 commands to `linux16' and `initrd16'.
484 (GRUB_MOD_FINI(linux)): Rename to ...
485 (GRUB_MOD_FINI(linux16)): ... this.
487 2009-03-24 Pavel Roskin <proski@gnu.org>
489 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
490 not just for compilation.
492 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
494 Move multiboot helper out of kernel
496 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
497 `loader/i386/multiboot_helper.S'.
498 * conf/i386-coreboot.rmk: Likewise
499 * conf/i386-ieee1275.rmk: Likewise
501 * kern/i386/loader.S: Move multiboot helpers from here...
502 * loader/i386/multiboot_helper.S: ...moved here
503 * include/grub/i386/loader.h: Move declarations of multiboot
505 * include/grub/i386/multiboot.h: ...moved here
506 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
508 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
510 * kern/env.c (grub_env_context_open): Added an argument to specify
511 whether a new context inherits exported variables from current
512 one. This is useful when making a sandbox to interpret a config
516 * include/grub/env.h (grub_env_context_open): Updated the prototype.
518 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
520 * kern/env.c (grub_env_context_close): Fix memory leaks.
522 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
524 * normal/main.c (grub_normal_execute): Added an argument
525 BATCH to specify if an interactive interface should be provided
526 after reading a config file.
528 (read_command_list): Prevent being executed twice.
529 (read_fs_list): Likewise.
531 * include/grub/normal.h (grub_normal_execute): Updated the
534 2009-03-22 Pavel Roskin <proski@gno.org>
536 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
538 * kern/i386/pc/startup.S: Likewise.
539 * kern/i386/efi/startup.S: Likewise.
540 * kern/i386/ieee1275/startup.S: Likewise.
541 * kern/i386/coreboot/startup.S: Likewise.
542 * kern/x86_64/efi/startup.S: Likewise.
544 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
545 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
546 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
548 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
550 Bugfixes in multiboot for bugs uncovered by solaris kernel.
552 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
554 Use vaddr of correct segment for entry_point.
556 2009-03-21 Bean <bean123ch@gmail.com>
558 * commands/blocklist.c: Add include file <grub/command.h>, remove
559 <grub/normal.h> and <grub/arg.h>.
560 (grub_cmd_blocklist): Use the new command interface.
561 (GRUB_MOD_INIT): Likewise.
562 (GRUB_MOD_FINI): Likewise.
563 * commands/boot.c: Likewise.
564 * commands/cat.c: Likewise.
565 * commands/cmp.c: Likewise.
566 * commands/configfile.c: Likewise.
567 * commands/crc.c: Likewise.
568 * commands/echo.c: Likewise.
569 * commands/halt.c: Likewise.
570 * commands/handler.c: Likewise.
571 * commands/hdparm.c: Likewise.
572 * commands/help.c: Likewise.
573 * commands/hexdump.c: Likewise.
574 * commands/loadenv.c: Likewise.
575 * commands/ls.c: Likewise.
576 * commands/lsmmap.c: Likewise.
577 * commands/lspci.c: Likewise.
578 * commands/loadenv.c: Likewise.
579 * commands/read.c: Likewise.
580 * commands/reboot.c: Likewise.
581 * commands/search.c: Likewise.
582 * commands/sleep.c: Likewise.
583 * commands/test.c: Likewise.
584 * commands/usbtest.c: Likewise.
585 * commands/videotest.c: Likewise.
586 * commands/i386/cpuid.c: Likewise.
587 * commands/i386/pc/halt.c: Likewise.
588 * commands/i386/pc/play.c: Likewise.
589 * commands/i386/pc/pxecmd.c: Likewise.
590 * commands/i386/pc/vbeinfo.c: Likewise.
591 * commands/i386/pc/vbetest.c: Likewise.
592 * commands/ieee1275/suspend.c: Likewise.
593 * disk/loopback.c: Likewise.
594 * font/font_cmd.c: Likewise.
595 * hello/hello.c: Likewise.
596 * loader/efi/appleloader.c: Likewise.
597 * loader/efi/chainloader.c: Likewise.
598 * loader/i386/bsd.c: Likewise.
599 * loader/i386/efi/linux.c: Likewise.
600 * loader/i386/ieee1275/linux.c: Likewise.
601 * loader/i386/linux.c: Likewise.
602 * loader/i386/pc/chainloader.c: Likewise.
603 * loader/i386/pc/linux.c: Likewise.
604 * loader/powerpc/ieee1275/linux.c: Likewise.
605 * loader/multiboot_loader.c: Likewise.
606 * term/gfxterm.c: Likewise.
607 * term/i386/pc/serial.c: Likewise.
608 * term/terminfo.c: Likewise.
610 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
611 * term/i386/pc/vga.c: Likewise.
612 * video/readers/jpeg.c: Likewise.
613 * video/readers/png.c: Likewise.
614 * video/readers/tga.c: Likewise.
616 * util/grub-fstest (cmd_loopback): Removed.
617 (cmd_blocklist): Likewise.
619 (grub_register_command): Likewise.
620 (grub_unregister_command): Likewise.
621 (execute_command): Use grub_command_find to locate command and execute
624 * include/grub/efi/chainloader.h: Removed.
625 * loader/efi/chainloader_normal.c: Likewise.
626 * loader/i386/bsd_normal.c: Likewise.
627 * loader/i386/pc/chainloader_normal.c: Likewise.
628 * loader/i386/pc/multiboot_normal.c: Likewise.
629 * loader/linux_normal.c: Likewise.
630 * loader/multiboot_loader_normal.c: Likewise.
631 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
633 * gencmdlist.sh: Scan new registration command grub_register_extcmd
634 and grub_register_command_p1.
636 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
637 kern/command.c, lib/arg.c and commands/extcmd.c.
638 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
639 (minicmd_mod_SOURCES): New variable.
640 (minicmd_mod_CFLAGS): Likewise.
641 (minicmd_mod_LDFLAGS): Likewise.
642 (extcmd_mod_SOURCES): Likewise.
643 (extcmd_mod_CFLAGS): Likewise.
644 (extcmd_mod_LDFLAGS): Likewise.
645 (boot_mod_SOURCES): Removed.
646 (boot_mod_CFLAGS): Likewise.
647 (boot_mod_LDFLAGS): Likewise.
649 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
651 (kernel_img_HEADERS): Add command.h.
652 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
653 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
655 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
656 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
657 remove the corresponding normal mode command.
658 (normal_mod_SOURCES): Remove normal/arg.c.
659 * conf/i386-coreboot.rmk: Likewise.
660 * conf/i386-efi.rmk: Likewise.
661 * conf/i386-ieee1275.rmk: Likewise.
662 * conf/powerpc-ieee1275.rmk: Likewise.
663 * conf/x86_64-efi.rmk: Likewise.
665 * include/grub/arg.h: Move from here ...
666 * include/grub/lib/arg.h: ... to here.
668 * normal/arg.c: Move from here ...
669 * lib/arg.c: ... to here.
671 * commands/extcmd.c: New file.
672 * commands/minicmd.c: Likewise.
673 * include/grub/command.h: Likewise.
674 * include/grub/extcmd.h: Likewise.
675 * kern/command.c: Likewise.
676 * kern/corecmd.c: Likewise.
678 * kern/list.c (grub_list_iterate): Return int instead of void.
679 (grub_list_insert): New function.
680 (grub_prio_list_insert): Likewise.
682 * kern/rescue.c (grub_rescue_command): Removed.
683 (grub_rescue_command_list): Likewise.
684 (grub_rescue_register_command): Likewise.
685 (grub_rescue_unregister_command): Likewise.
686 (grub_rescue_cmd_boot): Move to minicmd.c
687 (grub_rescue_cmd_help): Likewise.
688 (grub_rescue_cmd_info): Likewise.
689 (grub_rescue_cmd_boot): Likewise.
690 (grub_rescue_cmd_testload): Likewise.
691 (grub_rescue_cmd_dump): Likewise.
692 (grub_rescue_cmd_rmmod): Likewise.
693 (grub_rescue_cmd_lsmod): Likewise.
694 (grub_rescue_cmd_exit): Likewise.
695 (grub_rescue_print_devices): Moved to corecmd.c.
696 (grub_rescue_print_files): Likewise.
697 (grub_rescue_cmd_ls): Likewise.
698 (grub_rescue_cmd_insmod): Likewise.
699 (grub_rescue_cmd_set): Likewise.
700 (grub_rescue_cmd_unset): Likewise.
701 (attempt_normal_mode): Use grub_command_find to get normal module.
702 (grub_enter_rescue_mode): Use grub_register_core_commands to register
703 commands, remove grub_rescue_register_command calls.
705 * normal/command.c (grub_register_command): Removed.
706 (grub_unregister_command): Likewise.
707 (grub_command_find): Likewise.
708 (grub_iterate_commands): Likewise.
709 (rescue_command): Likewise.
710 (export_command): Moved to corecmd.c.
711 (set_command): Removed.
712 (unset_command): Likewise.
713 (insmod_command): Likewise.
714 (rmmod_command): Likewise.
715 (lsmod_command): Likewise.
716 (grub_command_init): Likewise.
718 * normal/completion.c (iterate_command): Use cmd->prio to check for
720 (complete_arguments): Use grub_extcmd_t structure to find options.
721 (grub_normal_do_completion): Change function grub_iterate_commands to
722 grub_command_iterate.
724 * normal/execute.c (grub_script_execute_cmd): No need to parse
727 * normal/main.c (grub_dyncmd_dispatcher): New function.
728 (read_command_list): Register unload commands as dyncmd.
729 (grub_cmd_normal): Use new command interface, register rescue,
730 unregister normal at entry, register normal, unregister rescue at exit.
732 * include/grub/list.h (grub_list_test_t): New type.
733 (grub_list_iterate): Return int instead of void.
734 (grub_list_insert): New function.
735 (GRUB_AS_NAMED_LIST_P): New macro.
736 (GRUB_AS_PRIO_LIST): Likewise.
737 (GRUB_AS_PRIO_LIST_P): Likewise.
738 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
739 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
740 (grub_prio_list): New structure.
741 (grub_prio_list_insert): New function.
742 (grub_prio_list_remove): New inline function.
744 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
745 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
746 (GRUB_COMMAND_FLAG_MENU): Likewise.
747 (GRUB_COMMAND_FLAG_BOTH): Likewise.
748 (GRUB_COMMAND_FLAG_TITLE): Likewise.
749 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
750 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
751 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
752 (grub_command): Likewise.
753 (grub_register_command): Likewise.
754 (grub_command_find): Likewise.
755 (grub_iterate_commands): Likewise.
756 (grub_command_init): Likewise.
757 (grub_arg_parse): Likewise.
758 (grub_arg_show_help): Likewise.
760 * include/grub/rescue.h (grub_rescue_register_command): Removed.
761 (grub_rescue_unregister_command): Likewise.
763 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
764 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
765 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
767 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
768 grub_rescue_cmd_initrd.
769 * include/grub/i386/loader.h: Likewise.
770 * include/grub/x86_64/loader.h: Likewise.
772 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
774 2009-03-21 Bean <bean123ch@gmail.com>
776 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
777 instead of stat in mingw environment.
779 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
781 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
783 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
786 2009-03-21 Bean <bean123ch@gmail.com>
788 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
791 2009-03-18 Michel Dänzer <michel@daenzer.net>
793 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
794 checking inode flags for EXT4_EXTENTS_FLAG.
796 2009-03-18 Robert Millan <rmh@aybabtu.com>
798 * loader/i386/linux.c: Include `<grub/video.h>' and
799 `<grub/i386/pc/vbe.h>'..
800 (grub_linux_setup_video): New function. Loosely based on the EFI one.
801 (grub_linux32_boot): Attempt to configure video settings with
802 grub_linux_setup_video().
803 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
804 to avoid grub_console_fini() which would step out of graphical mode
807 2009-03-14 Robert Millan <rmh@aybabtu.com>
809 Fix build on powerpc.
810 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
812 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
814 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
815 background image command.
817 2009-03-12 Colin D Bennett <colin@gibibit.com>
819 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
820 (grub_gfxterm_putchar): Extract pairs of identical calls to
821 draw_cursor out of conditional blocks.
823 2009-03-11 Pavel Roskin <proski@gnu.org>
825 * fs/hfs.c (grub_hfs_strncasecmp): New function.
826 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
828 2009-03-11 Robert Millan <rmh@aybabtu.com>
830 * loader/i386/multiboot_elfxx.c
831 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
833 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
835 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
838 2009-03-11 Robert Millan <rmh@aybabtu.com>
840 * loader/i386/multiboot.c (code_size): New variable.
841 (grub_multiboot): Define offsets by adding to `code_size' rather
842 than subtracting from `grub_multiboot_payload_size'. Provide
843 4-byte alignment to MBI and others by increasing
844 `boot_loader_name_length' appropriately.
846 * loader/i386/multiboot_elfxx.c
847 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
849 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
851 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
854 2009-03-08 Robert Millan <rmh@aybabtu.com>
856 Make loader/i386/linux.c usable on i386-pc again.
858 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
860 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
863 2009-03-07 Bean <bean123ch@gmail.com>
865 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
868 2009-03-06 Robert Millan <rmh@aybabtu.com>
870 Fix display issue on terminals with screen size other than 80x25
871 (e.g. gfxterm with resolution higher than 640x480).
873 * normal/main.c (grub_normal_init_page): Display title text in a
874 position relative to the center of the terminal instead of relying
875 on a hardcoded offset.
877 2009-03-04 Robert Millan <rmh@aybabtu.com>
879 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
882 * Makefile.in (host_kernel): New variable.
883 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
884 scripts instead of just the windows one.
885 * configure.ac: Initialize and AC_SUBST `host_kernel'.
887 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
889 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
891 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
892 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
893 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
894 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
895 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
896 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
898 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
900 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
901 or if there's no space for the disk label and print the partition number on a
904 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
906 * util/misc.c: Include <time.h>.
907 (grub_millisleep): New function.
909 2009-03-04 Bean <bean123ch@gmail.com>
911 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
912 another option -mno-red-zone.
914 * commands/handler.c: Change module description.
916 * kern/handler.c: Add missing space at the end of description line.
918 * kern/list.c: Likewise.
920 2009-03-03 Robert Millan <rmh@aybabtu.com>
922 Move more components to the relocation area, and fix mbi pointer
923 handling to use the destination rather than the origin (thanks to
924 Vladimir Serbinenko for spotting).
926 * loader/i386/multiboot.c (mbi_dest): New variable.
927 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
928 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
931 2009-03-01 Bean <bean123ch@gmail.com>
933 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
934 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
935 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
936 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
938 * loader/i386/efi/linux.c (acpi_guid): New variable.
939 (acpi_guid): Likewise.
940 (EBDA_SEG_ADDR): New constant.
941 (LOW_MEM_ADDR): Likewise.
942 (FAKE_EBDA_SEG): Likewise.
943 (fake_bios_data): New function.
944 (grub_linux_boot): Call fake_bios_data.
946 2009-03-01 Bean <bean123ch@gmail.com>
948 * commands/terminal.c: Removed.
950 * commands/handler.c: New file.
952 * include/grub/list.h: Likewise.
954 * include/grub/handler.h: Likewise.
956 * kern/list.c: Likewise.
958 * kern/handler.c: Likewise.
960 * kern/term.h: Include header file <grub/handler.h>.
961 (grub_term_input): Move next field to the beginning.
962 (grub_term_output): Likewise.
963 (grub_term_input_class): New variable.
964 (grub_term_output_class): Likewise.
965 (grub_term_register_input): Changed to inline function.
966 (grub_term_register_output): Likewise.
967 (grub_term_unregister_input): Likewise.
968 (grub_term_unregister_output): Likewise.
969 (grub_term_set_current_input): Likewise.
970 (grub_term_set_current_output): Likewise.
971 (grub_term_get_current_input): Likewise.
972 (grub_term_get_current_output): Likewise.
973 (grub_term_iterate_input): Removed.
974 (grub_term_iterate_output): Likewise.
976 * kern/term.c (grub_term_list_input): Removed.
977 (grub_term_list_output): Likewise.
978 (grub_term_input_class): New variable.
979 (grub_term_output_class): Likewise.
980 (grub_cur_term_input): Change variable as macro.
981 (grub_cur_term_output): Likewise.
982 (grub_term_register_input): Removed.
983 (grub_term_register_output): Likewise.
984 (grub_term_unregister_input): Likewise.
985 (grub_term_unregister_output): Likewise.
986 (grub_term_set_current_input): Likewise.
987 (grub_term_set_current_output): Likewise.
988 (grub_term_iterate_input): Likewise.
989 (grub_term_iterate_output): Likewise.
990 (grub_term_get_current_input): Likewise.
991 (grub_term_get_current_output): Likewise.
993 * util/grub-editenv.c: Include header file <grub/handler.h>.
994 (grub_term_get_current_input): Removed.
995 (grub_term_get_current_output): Likewise.
996 (grub_term_input_class): New variable.
997 (grub_term_output_class): Likewise.
999 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1000 (grub_term_get_current_output): Likewise.
1001 (grub_term_input_class): New variable.
1002 (grub_term_output_class): Likewise.
1004 * util/grub-probe.c (grub_term_get_current_input): Removed.
1005 (grub_term_get_current_output): Likewise.
1006 (grub_term_input_class): New variable.
1007 (grub_term_output_class): Likewise.
1009 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1010 (grub_term_get_current_output): Likewise.
1011 (grub_term_input_class): New variable.
1012 (grub_term_output_class): Likewise.
1014 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1015 (terminal_mod_SOURCES): Likewise.
1016 (terminal_mod_CFLAGS): Likewise.
1017 (terminal_mod_LDFLAGS): Likewise.
1019 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1021 (kernel_img_SOURCES): Add list.c and handler.c.
1022 (kernel_img_HEADERS): Add list.h and handler.h.
1024 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1026 (kernel_mod_SOURCES): Add list.c and handler.c.
1027 (kernel_mod_HEADERS): Add list.h and handler.h.
1029 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1031 (kernel_elf_SOURCES): Add list.c and handler.c.
1032 (kernel_elf_HEADERS): Add list.h and handler.h.
1034 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1036 (kernel_elf_SOURCES): Add list.c and handler.c.
1037 (kernel_elf_HEADERS): Add list.h and handler.h.
1039 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1041 (kernel_mod_SOURCES): Add list.c and handler.c.
1042 (kernel_mod_HEADERS): Add list.h and handler.h.
1044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1046 (kernel_elf_SOURCES): Add list.c and handler.c.
1047 (kernel_elf_HEADERS): Add list.h and handler.h.
1049 2009-02-27 Robert Millan <rmh@aybabtu.com>
1051 Factorize elf32 / elf64 code in Multiboot loader. This will
1052 prevent it from getting out of sync again.
1054 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1055 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1056 grub_multiboot_load_elf64): Move from here ...
1057 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1058 grub_multiboot_load_elf): ... to here (new file).
1060 2009-02-27 Robert Millan <rmh@aybabtu.com>
1062 * util/grub.d/10_linux.in: Rename "single-user mode" to
1065 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
1067 Don't leak in SCSI code.
1068 * disk/scsi.c (grub_scsi_close): free `scsi'.
1070 2009-02-27 Robert Millan <rmh@aybabtu.com>
1072 * loader/i386/pc/multiboot.c: Move from here ...
1073 * loader/i386/multiboot.c: ... to here. Update all users.
1075 2009-02-27 Robert Millan <rmh@aybabtu.com>
1077 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1078 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1080 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
1082 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1085 2009-02-27 Robert Millan <rmh@aybabtu.com>
1087 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1088 `0x' qualifier as 0 when base is specified as parameter).
1090 2009-02-24 Bean <bean123ch@gmail.com>
1092 * configure.ac: Check for -mcmodel=large in x86_64 target.
1094 * include/grub/efi/api.h (efi_call_10): New macro.
1095 (efi_wrap_10): New function.
1097 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1098 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1099 (GRUB_PE32_REL_BASED_LOW): Likewise.
1100 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1101 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1102 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1103 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1104 (GRUB_PE32_REL_BASED_REL): Likewise.
1105 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1106 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1107 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1109 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1112 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1113 (efi_wrap_10): New function.
1115 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1117 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1118 MB/MBP model (NV chipset).
1119 (devdata_devs): Add devpath_5 to the list.
1121 * load/i386/efi/linux.c (video_base): Remove variable.
1122 (RGB_MASK): New macro.
1123 (RGB_MAGIC): Likewise.
1124 (LINE_MIN): Likewise.
1125 (LINE_MAX): Likewise.
1126 (FBTEST_STEP): Likewise.
1127 (FBTEST_COUNT): Likewise.
1128 (fb_list): New variable.
1129 (grub_find_video_card): Remove function.
1130 (find_framebuf): New function.
1131 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1134 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1137 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1139 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1141 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1144 2009-02-22 Robert Millan <rmh@aybabtu.com>
1146 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1147 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1148 in our relocation, instead of using it directly from heap. Also
1149 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1151 2009-02-21 Robert Millan <rmh@aybabtu.com>
1153 Implement USB keyboard support (based on patch by Marco Gerards)
1155 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1156 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1157 (usb_keyboard_mod_LDFLAGS): New variables.
1159 * term/usb_keyboard.c: New file.
1161 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1163 Corrected wrong declaration
1165 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1167 2009-02-14 Christian Franke <franke@computer.org>
1169 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1170 (grub_lspci_iter): Print class code and programming interface byte.
1172 2009-02-14 Christian Franke <franke@computer.org>
1174 * gendistlist.sh: Ignore `.svn' directories.
1176 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
1178 * fs/fat.c: Add 2009 to Copyright line.
1180 2009-02-14 Christian Franke <franke@computer.org>
1182 * commands/hdparm.c: New file. Provides `hdparm' command
1183 which sends ATA commands via grub_disk_ata_pass_through ().
1185 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1187 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1188 and <grub/cpu/io.h> to include/grub/ata.h.
1189 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1190 (GRUB_CDROM_SECTOR_SIZE): Remove.
1191 (GRUB_ATA_*): Move to include/grub/ata.h.
1192 (GRUB_ATAPI_*): Likewise.
1193 (enum grub_ata_commands): Likewise.
1194 (enum grub_ata_timeout_milliseconds): Likewise.
1195 (struct grub_ata_device): Likewise.
1196 (grub_ata_regset): Likewise.
1197 (grub_ata_regget): Likewise.
1198 (grub_ata_regset2): Likewise.
1199 (grub_ata_regget2): Likewise.
1200 (grub_ata_check_ready): Likewise.
1201 (grub_ata_wait_not_busy): Remove static, exported in
1203 (grub_ata_wait_drq): Likewise.
1204 (grub_ata_pio_read): Likewise.
1206 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1207 function for hdparm.mod.
1209 * include/grub/ata.h: New file, contains declarations from
1211 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1213 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1214 (grub_disk_ata_pass_through): New exported variable.
1216 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1218 2009-02-13 Colin D Bennett <colin@gibibit.com>
1220 Support multiple fallback entries, and provide an API to support
1221 executing default+fallback menu entries. Renamed the `terminal' menu
1224 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1225 variable declaration.
1226 (grub_menu_execute_callback): New structure declaration.
1227 (grub_menu_execute_callback_t): New typedef.
1228 (grub_menu_execute_with_fallback): New function declaration.
1229 (grub_menu_get_entry): Likewise.
1230 (grub_menu_get_timeout): Likewise.
1231 (grub_menu_set_timeout): Likewise.
1233 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1235 * normal/menu.c (grub_wait_after_message): Moved to
1236 `normal/menu_text.c'.
1237 (draw_border): Likewise.
1238 (print_message): Likewise.
1239 (print_entry): Likewise.
1240 (print_entries): Likewise.
1241 (grub_menu_init_page): Likewise.
1242 (get_entry_number): Likewise.
1243 (print_timeout): Likewise.
1244 (run_menu): Likewise.
1245 (grub_menu_execute_entry): Likewise.
1246 (show_text_menu): Likewise.
1247 (get_and_remove_first_entry_number): New function.
1248 (grub_menu_execute_with_fallback): Likewise.
1249 (get_entry): Renamed to ...
1250 (grub_menu_get_entry): .. this and made it global.
1251 (get_timeout): Renamed to ...
1252 (grub_menu_get_timeout): ... this and made it global.
1253 (set_timeout): Renamed to ...
1254 (grub_menu_set_timeout): ... this and made it global.
1255 (grub_normal_terminal_menu_viewer): Renamed to ...
1256 (grub_normal_text_menu_viewer): ... this.
1258 * normal/menu_text.c: New file. Extracted text-menu-specific code
1261 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1262 (normal_mod_SOURCES): Likewise.
1264 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1265 (normal_mod_SOURCES): Likewise.
1267 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1268 (normal_mod_SOURCES): Likewise.
1270 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
1271 (normal_mod_SOURCES): Likewise.
1273 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1274 (normal_mod_SOURCES): Likewise.
1276 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1277 (normal_mod_SOURCES): Likewise.
1279 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1280 (normal_mod_SOURCES): Likewise.
1282 2009-02-11 Robert Millan <rmh@aybabtu.com>
1284 * util/grub.d/00_header.in: Update old reference to `font' command.
1286 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
1288 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
1290 Based on patch from Javier MartÃn.
1292 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1294 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
1295 to avoid false positives with FAT.
1296 (grub_fstest_SOURCES): Likewise.
1297 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1298 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1299 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1300 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1301 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1302 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1304 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
1306 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
1307 bpb.version_specific.fat12_or_fat16.fstype and
1308 bpb.version_specific.fat32.fstype.
1310 2009-02-08 Robert Millan <rmh@aybabtu.com>
1312 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
1314 2009-02-08 Robert Millan <rmh@aybabtu.com>
1316 * Makefile.in (host_os, host_cpu): New variables.
1317 (target_os): Remove. Update all users.
1319 2009-02-08 Marco Gerards <marco@gnu.org>
1321 * Makefile.in (enable_grub_emu_usb): New variable.
1322 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
1323 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
1324 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
1325 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
1326 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1327 `usbtest.mod' and `usbms.mod'.
1328 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1329 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1330 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1331 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1332 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1335 * disk/usbms.c: New file.
1337 * include/grub/usb.h: Likewise.
1339 * include/grub/usbtrans.h: Likewise.
1341 * include/grub/usbdesc.h: Likewise.
1343 * bus/usb/usbtrans.c: Likewise.
1345 * bus/usb/ohci.c: Likewise.
1347 * bus/usb/uhci.c: Likewise.
1349 * bus/usb/usbhub.c: Likewise.
1351 * bus/usb/usb.c: Likewise.
1353 * commands/usbtest.c: Likewise.
1355 * util/usb.c: Likewise.
1357 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1359 * configure.ac: Test for libusb presence.
1361 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1363 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
1365 * kern/mm.c: Add more comments.
1367 2009-02-08 Robert Millan <rmh@aybabtu.com>
1369 Patch from Javier MartÃn.
1370 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1371 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1373 2009-02-08 Robert Millan <rmh@aybabtu.com>
1375 * fs/cpio.c: Split tar functionality to ...
1376 * fs/tar.c: ... here (new file). Update all users.
1378 2009-02-07 Robert Millan <rmh@aybabtu.com>
1380 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1381 backward-incompatible features.
1383 Based on patch from Javier MartÃn, with some adjustments.
1385 2009-02-07 Michael Scherer <misc@mandriva.org>
1387 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1389 2009-02-07 Robert Millan <rmh@aybabtu.com>
1391 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1392 position of `disk/lvm.c' to ensure grub_init_all() always picks it
1393 after the RAID stuff.
1395 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
1397 Fixes problem when running vbetest command as reported by
1398 Vladimir Serbinenko <phcoder@gmail.com>.
1400 * (grub_vbe_set_video_mode): Fixed problem with text modes.
1402 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
1404 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1405 /dev/md/NpN style mdraid devices.
1407 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1409 * util/unifont2pff.rb: Remove.
1411 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1413 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1416 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
1418 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1419 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1420 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1421 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1422 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1423 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1424 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1426 2009-02-02 Christian Franke <franke@computer.org>
1428 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1430 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
1432 * INSTALL: Note that we now require at least autoconf 2.59 and
1433 that LZO is optional.
1435 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1437 Base on patch on bug #24154 created by Tomas Tintera
1440 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1442 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
1444 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1445 <bero@arklinux.org>.
1447 * normal/parser.y (script_init): Add missing semicolon.
1449 2009-01-31 Colin D Bennett <colin@gibibit.com>
1451 * normal/main.c: Add include to grub/menu_viewer.h.
1452 (free_menu_entry_classes): Added.
1453 (grub_normal_menu_addentry): Added class property handling.
1454 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1455 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1457 * normal/menu_viewer.c: New file.
1459 * normal/menu.c (run_menu_entry): Renamed to ...
1460 (grub_menu_execute_entry): ... this and made it as global.
1461 (grub_menu_run): Renamed to ...
1462 (show_text_menu): ... this and made it local.
1463 (show_text_menu): Adapt to new function names.
1464 (grub_normal_terminal_menu_viewer): New global variable.
1466 * include/grub/menu.h: New file.
1468 * include/grub/menu_viewer.h: New file.
1470 * include/grub/normal.h: Added include to grub/menu.h.
1471 (grub_menu_entry): Moved to include/grub/menu.h.
1472 (grub_menu_entry_t): Likewise.
1473 (grub_menu): Likewise.
1474 (grub_menu_t): Likewise.
1475 (grub_normal_terminal_menu_viewer): Added.
1476 (grub_menu_execute_entry): Likewise.
1477 (grub_menu_run): Removed.
1479 * DISTLIST: Added include/grub/menu.h.
1480 Added include/grub/menu_viewer.h.
1481 Added normal/menu_viewer.c.
1483 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
1485 * normal/execute.c (grub_script_execute_menuentry): Changed to use
1486 arglist for menutitle arguments.
1488 * normal/main.c (grub_normal_menu_addentry): Likewise.
1490 * normal/parser.y (menuentry): Likewise.
1492 * normal/script.c (grub_script_create_cmdmenu): Likewise.
1494 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1495 (grub_script_create_cmdmenu): Likewise.
1497 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1499 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1502 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1504 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1506 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1508 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1510 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1512 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1514 2009-01-30 Christian Franke <franke@computer.org>
1516 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1517 in option help text.
1519 2009-01-27 Pavel Roskin <proski@gnu.org>
1521 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1523 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1525 * commands/lsmmap.c: Add include to grub/machine/memory.h.
1527 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1529 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1530 unregister function.
1532 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
1534 * disk/scsi.c (grub_scsi_read): Fix sign problem.
1536 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1538 * util/grub-mkfont.c (usage): Fix typo.
1540 * util/elf/grub-mkimage.c (load_modules): Fix warning.
1542 2009-01-26 Daniel Mierswa <impulze@impulze.org>
1544 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1546 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1548 * kern/misc.c (grub_strcasecmp): New function.
1549 (grub_strcasecmp): Use grub_size_t instead of int for length.
1551 * include/grub/misc.h: Update function prototypes.
1553 2009-01-26 Robert Millan <rmh@aybabtu.com>
1555 * configure.ac: Fix cross-compilation check.
1557 2009-01-22 Christian Franke <franke@computer.org>
1559 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1560 (precision) digit string. Allow `.format2' without `format1' (width).
1561 Limit input chars for `%s' output to `format2' if specified. This is
1562 compatible with standard printf ().
1564 2009-01-22 Christian Franke <franke@computer.org>
1566 * disk/ata.c (grub_ata_wait_status): Replace by ...
1567 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
1568 other status bits may be invalid while BSY is asserted.
1569 (grub_ata_check_ready): New function.
1570 (grub_ata_cmd): Removed.
1571 (grub_ata_wait_drq): New function.
1572 (grub_ata_strncpy): Remove inline.
1573 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
1574 and error check now done by grub_ata_wait_drq ().
1575 (grub_ata_pio_write): Likewise.
1576 (grub_atapi_identify): Set DEV before check for !BSY. Use
1577 grub_ata_wait_drq () to wait for data.
1578 (grub_ata_device_initialize): Add status register check to
1579 detect missing SATA slave devices. Add debug messages.
1580 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1581 (grub_atapi_packet): Set DEV before check for !BSY. Replace
1582 transfer loop by grub_ata_pio_write ().
1583 (grub_ata_identify): Set DEV before check for !BSY. Use
1584 grub_ata_wait_drq () to wait for data.
1585 (grub_ata_setaddress): Set DEV before check for !BSY.
1586 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1587 read/write in one loop. Fix invalid command on write. Fix incomplete
1588 command on (size % batch) == 0. Add missing error check after write of
1589 last block. Add debug messages.
1590 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
1592 2009-01-19 Christian Franke <franke@computer.org>
1594 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1595 (GRUB_ATAPI_IREASON_*): Likewise.
1596 (grub_ata_pio_write): Fix timeout error return.
1597 (grub_atapi_identify): Add grub_ata_wait () after cmd.
1598 (grub_atapi_wait_drq): New function.
1599 (grub_atapi_packet): New parameter `size'.
1600 Use grub_atapi_wait_drq () and direct write instead of
1601 grub_ata_pio_write ().
1602 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1603 reads the number of bytes requested by the device for each DRQ
1605 (grub_atapi_write): Remove old implementation, return not
1606 implemented instead.
1608 2009-01-19 Christian Franke <franke@computer.org>
1610 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1611 of 512 to calculate data size.
1612 (grub_scsi_read12): Likewise.
1613 (grub_scsi_write10): Likewise.
1614 (grub_scsi_write12): Likewise.
1615 (grub_scsi_read): Adjust size according to blocksize.
1616 Add checks for invalid blocksize and unaligned transfer.
1618 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
1620 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1622 * term/gfxterm.c (write_char): Fix background rendering for wide
1625 2009-01-19 Robert Millan <rmh@aybabtu.com>
1627 * config.guess: Update to latest version from config git.
1628 * config.sub: Likewise.
1630 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
1632 * Makefile.in: Change font compilation to use new grub-mkfont instead
1635 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
1636 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1637 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1638 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1639 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1640 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1641 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1642 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1643 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1645 2009-01-16 Christian Franke <franke@computer.org>
1647 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
1648 (enum grub_ata_timeout_milliseconds): New enum.
1649 (grub_ata_wait_status): Add parameter milliseconds.
1650 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
1651 recovery from timed-out commands.
1652 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
1653 return grub_errno instead of REG_ERROR.
1654 (grub_ata_pio_write): Add parameter milliseconds.
1655 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
1656 Pass milliseconds to grub_ata_wait_status () and
1657 grub_ata_pio_read ().
1658 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
1659 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
1660 grub_ata_wait_status (). Fix IDENTIFY timeout check.
1661 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
1662 It is not suitable for device detection, because DEV bit is ignored,
1663 the command may run too long, and not all devices set the signature
1665 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
1666 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
1667 Fix device selection, DEV bit must be set first to address the registers
1668 of the correct device.
1669 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
1670 grub_ata_pio_read/write ().
1671 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
1672 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
1674 2009-01-13 Carles Pina i Estany <carles@pina.cat>
1676 * util/grub-editenv.c (main): Use fseeko(), not fseek().
1678 2009-01-13 Bean <bean123ch@gmail.com>
1680 * util/grub-mkfont.c (write_font): forget to remove some debug code.
1682 2009-01-13 Bean <bean123ch@gmail.com>
1684 * Makefile.in: (enable_grub_mkfont): New variable.
1685 (freetype_cflags): Likewise.
1686 (freetype_libs): Likewise.
1688 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
1689 (grub_mkfont_SOURCES): New variable.
1690 (grub_mkfont_CFLAGS): Likewise.
1691 (grub_mkfont_LDFLAGS): Likewise.
1693 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
1694 library if `--enable-grub-mkfont' is requested.
1695 (enable_grub_mkfont): New variable.
1696 (freetype_cflags): Likewise.
1697 (freetype_libs): Likewise.
1699 * util/grub-mkfont.c: New file.
1701 2009-01-12 Christian Franke <franke@computer.org>
1703 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
1704 mode check. Fix setting of compat_use[].
1706 2009-01-10 Robert Millan <rmh@aybabtu.com>
1708 Update a few copyright years which we forgot to do in 2008 (only for
1709 files whose changes made in 2008 were copyright-significant)
1711 * Makefile.in: Add 2008 to Copyright line.
1712 * disk/ieee1275/ofdisk.c: Likewise.
1713 * disk/efi/efidisk.c: Likewise.
1714 * kern/dl.c: Likewise.
1715 * kern/sparc64/ieee1275/init.c: Likewise.
1716 * kern/mm.c: Likewise.
1717 * kern/efi/mm.c: Likewise.
1718 * boot/i386/pc/boot.S: Likewise.
1719 * genfslist.sh: Likewise.
1720 * fs/iso9660.c: Likewise.
1721 * fs/hfs.c: Likewise.
1722 * fs/jfs.c: Likewise.
1723 * fs/minix.c: Likewise.
1724 * fs/ufs.c: Likewise.
1725 * gensymlist.sh.in: Likewise.
1726 * genkernsyms.sh.in: Likewise.
1727 * include/grub/misc.h: Likewise.
1728 * include/grub/types.h: Likewise.
1729 * include/grub/symbol.h: Likewise.
1730 * include/grub/elf.h: Likewise.
1731 * include/grub/kernel.h: Likewise.
1732 * include/grub/disk.h: Likewise.
1733 * include/grub/dl.h: Likewise.
1734 * include/grub/i386/linux.h: Likewise.
1735 * include/grub/i386/pc/biosdisk.h: Likewise.
1736 * include/grub/efi/api.h: Likewise.
1737 * include/grub/efi/pe32.h: Likewise.
1738 * include/grub/util/misc.h: Likewise.
1739 * normal/execute.c: Likewise.
1740 * normal/arg.c: Likewise.
1741 * normal/completion.c: Likewise.
1742 * normal/lexer.c: Likewise.
1743 * normal/parser.y: Likewise.
1744 * normal/misc.c: Likewise.
1745 * commands/i386/pc/vbeinfo.c: Likewise.
1746 * commands/hexdump.c: Likewise.
1747 * commands/terminal.c: Likewise.
1748 * commands/ls.c: Likewise.
1749 * commands/help.c: Likewise.
1750 * partmap/pc.c: Likewise.
1751 * loader/efi/chainloader.c: Likewise.
1752 * loader/multiboot_loader.c: Likewise.
1753 * loader/i386/pc/multiboot2.c: Likewise.
1754 * term/efi/console.c: Likewise.
1755 * term/i386/pc/serial.c: Likewise.
1756 * util/lvm.c: Likewise.
1757 * util/console.c: Likewise.
1758 * util/i386/efi/grub-mkimage.c: Likewise.
1759 * util/raid.c: Likewise.
1761 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
1763 * commands/videotest.c: Removed include to grub/machine/memory.h.
1765 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
1766 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
1767 (video_mod_SOURCES): Removed.
1768 (video_mod_CFLAGS): Likewise.
1769 (video_mod_LDFLAGS): Likewise.
1770 (gfxterm_mod_SOURCES): Likewise.
1771 (gfxterm_mod_CFLAGS): Likewise.
1772 (gfxterm_mod_LDFLAGS): Likewise.
1773 (videotest_mod_SOURCES): Likewise.
1774 (videotest_mod_CFLAGS): Likewise.
1775 (videotest_mod_LDFLAGS): Likewise.
1776 (bitmap_mod_SOURCES): Likewise.
1777 (bitmap_mod_CFLAGS): Likewise.
1778 (bitmap_mod_LDFLAGS): Likewise.
1779 (tga_mod_SOURCES): Likewise.
1780 (tga_mod_CFLAGS): Likewise.
1781 (tga_mod_LDFLAGS): Likewise.
1782 (jpeg_mod_SOURCES): Likewise.
1783 (jpeg_mod_CFLAGS): Likewise.
1784 (jpeg_mod_LDFLAGS): Likewise.
1785 (png_mod_SOURCES): Likewise.
1786 (png_mod_CFLAGS): Likewise.
1787 (png_mod_LDFLAGS): Likewise.
1789 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1790 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1791 (video_mod_SOURCES): Added.
1792 (video_mod_CFLAGS): Likewise.
1793 (video_mod_LDFLAGS): Likewise.
1794 (videotest_mod_SOURCES): Likewise.
1795 (videotest_mod_CFLAGS): Likewise.
1796 (videotest_mod_LDFLAGS): Likewise.
1797 (bitmap_mod_SOURCES): Likewise.
1798 (bitmap_mod_CFLAGS): Likewise.
1799 (bitmap_mod_LDFLAGS): Likewise.
1800 (tga_mod_SOURCES): Likewise.
1801 (tga_mod_CFLAGS): Likewise.
1802 (tga_mod_LDFLAGS): Likewise.
1803 (jpeg_mod_SOURCES): Likewise.
1804 (jpeg_mod_CFLAGS): Likewise.
1805 (jpeg_mod_LDFLAGS): Likewise.
1806 (png_mod_SOURCES): Likewise.
1807 (png_mod_CFLAGS): Likewise.
1808 (png_mod_LDFLAGS): Likewise.
1809 (gfxterm_mod_SOURCES): Likewise.
1810 (gfxterm_mod_CFLAGS): Likewise.
1811 (gfxterm_mod_LDFLAGS): Likewise.
1813 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1814 grub/machine/console.h.
1816 2009-01-04 Jerone Young <jerone@gmail.com>
1818 Make on screen instructions clearer
1820 Based on patch created by Jidanni <jidanni@jidanni.org>
1822 * normal/menu.c: print clearer instructions on the screen
1824 2009-01-02 Colin D Bennett <colin@gibibit.com>
1828 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1829 build system and fixed gfxterm.c to work with different sized fonts.
1831 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
1833 * configure: Re-generated.
1835 * DISTLIST: Removed font/manager.c.
1837 Added font/font_cmd.c.
1839 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1842 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
1844 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1846 * kern/term.c: Changed users of grub_utf8_to_ucs4.
1848 * normal/menu.c: Likewise.
1850 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1851 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
1853 * include/grub/font.h: Replaced with new file.
1855 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1856 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1857 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1858 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1859 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
1860 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1861 fg_red, fg_green, fg_blue, fg_alpha.
1862 (grub_video_adapter): Removed blit_glyph.
1863 (grub_video_blit_glyph): Removed.
1865 * font/manager.c: Removed file.
1867 * font/font.c: New file.
1869 * font/font_cmd.c: Likewise.
1871 * video/video.c (grub_video_blit_glyph): Removed.
1873 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1874 (grub_video_vbe_map_rgba): Likewise.
1875 (grub_video_vbe_unmap_color_int): Likewise.
1876 (grub_video_vbe_blit_glyph): Removed.
1877 (grub_video_vbe_adapter): Removed blit_glyph.
1879 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1880 (get_pixel): Likewise.
1881 (set_pixel): Likewise.
1883 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
1885 * term/gfxterm.c: Adapted to new font engine.
1887 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
1889 * term/i386/pc/vga.c: Likewise.
1891 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
1893 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
1895 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1897 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
1899 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
1901 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
1903 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
1905 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
1907 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1909 * util/grub.d/00_header.in: Changed to use new loadfont command.
1911 * util/grub-mkconfig_lib.in: Changed font extension.
1913 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
1915 * util/getroot.c (grub_util_get_grub_dev): Add support for
1916 /dev/md/dNNpNN style partitionable mdraid devices.
1918 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
1920 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1921 at a time limit of the PXE TFTP API correctly.
1922 (grub_pxefs_close): Likewise.
1924 2008-11-29 Robert Millan <rmh@aybabtu.com>
1926 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
1927 grub_ata_device_initialize() calls.
1929 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
1931 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1933 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1935 2008-11-28 Robert Millan <rmh@aybabtu.com>
1937 Fix build on powerpc-ieee1275. Based on patch created by
1938 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1939 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1940 `kern/ieee1275/mmap.c'.
1941 * include/grub/powerpc/ieee1275/memory.h: New file.
1943 Provide grub-install on coreboot.
1944 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1945 (grub_install_SOURCES): New variable.
1946 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1949 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
1951 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1952 to `grub_term_input_t'.
1953 (grub_term_get_current_output): Change return type to
1954 `grub_term_output_t'.
1956 2008-11-22 Robert Millan <rmh@aybabtu.com>
1958 Fix breakage on coreboot due to declaration mismatch.
1959 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1960 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1961 grub_vga_text_cls().
1963 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
1964 comments. Avoid copying one more byte than necessary (just in case).
1966 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1967 to 0x200000 (avoids trouble with some OFW implementations, and matches
1968 with the one in Yaboot).
1969 Reported by Manoel Abranches
1971 2008-11-20 Robert Millan <rmh@aybabtu.com>
1973 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1974 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1976 * util/grub-mkconfig_lib.in (grub_warn): New function.
1977 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1978 warnings, to obtain consistent formatting.
1979 * util/grub.d/00_header.in: Likewise.
1980 * util/update-grub_lib.in: Likewise.
1982 * loader/i386/linux.c (allocate_pages): Fix a warning.
1983 Move comment text to `#error' stanza.
1985 Harmonize ieee1275's grub_available_iterate() with the generic
1986 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1987 build problem on i386-ieee1275):
1988 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1989 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1990 parameter `type'. Update all users of this function.
1991 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1992 `kern/ieee1275/mmap.c'.
1993 * kern/ieee1275/init.c
1994 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1996 (grub_machine_mmap_iterate): ... this.
1997 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1998 return type to `grub_err_t'. Update all implementations of this
2000 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2003 Add `lsmmap' command (lists firmware-provided memory map):
2004 * commands/lsmmap.c: New file.
2005 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2006 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2008 * conf/powerpc-ieee1275.rmk: Likewise.
2009 * conf/i386-coreboot.rmk: Likewise.
2010 * conf/i386-ieee1275.rmk: Likewise.
2012 2008-11-19 Robert Millan <rmh@aybabtu.com>
2014 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
2015 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2016 constraints to initrd allocation (based on code from
2017 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2018 for Linux to find it.
2020 2008-11-14 Robert Millan <rmh@aybabtu.com>
2022 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2023 order to cope with duplicate slashes.
2025 2008-11-14 Robert Millan <rmh@aybabtu.com>
2027 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2028 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
2029 don't want to mess with lower memory, because it is used in the Linux
2032 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
2033 an appropriate place in lower memory, between 0x10000 and 0x90000,
2034 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
2035 is in our heap (probably as a result of it being corrupted during
2036 decompression). Add #error instance with comment to explain why this
2037 loader isn't currently usable on PC/BIOS.
2039 2008-11-14 Robert Millan <rmh@aybabtu.com>
2041 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
2042 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
2044 2008-11-12 Robert Millan <rmh@aybabtu.com>
2046 Make loader/i386/linux.c buildable on i386-pc (although disabled).
2048 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2049 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2051 * include/grub/i386/pc/memory.h: ... to here.
2053 2008-11-12 Robert Millan <rmh@aybabtu.com>
2055 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2058 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2059 (grub_console_cur_color, grub_console_real_putchar)
2060 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2061 (grub_console_setcolorstate, grub_console_setcolor)
2062 (grub_console_getcolor): Move from here ...
2063 * include/grub/i386/vga_common.h: ... to here (new file).
2065 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2066 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2068 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2069 `<grub/i386/vga_common.h>'.
2071 2008-11-12 Robert Millan <rmh@aybabtu.com>
2073 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2074 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2075 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2077 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2078 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2080 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2081 grub_console_init() with call to grub_vga_text_init().
2082 (grub_machine_fini): Replace call to
2083 grub_console_fini() with call to grub_vga_text_fini() and
2084 grub_at_keyboard_fini().
2086 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2087 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2088 (grub_console_setcolorstate, grub_console_setcolor)
2089 (grub_console_getcolor): New function prototypes.
2091 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2092 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2093 (grub_vga_text_setcursor): Static-ize.
2094 (grub_vga_text_term): New structure.
2095 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2097 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2098 (grub_console_cur_color, grub_console_standard_color)
2099 (grub_console_normal_color, grub_console_highlight_color)
2100 (map_char, grub_console_putchar, grub_console_getcharwidth)
2101 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2102 (grub_console_getcolor): Move from here ...
2103 * term/i386/vga_common.c: ... to here (same function names).
2105 2008-11-12 Robert Millan <rmh@aybabtu.com>
2107 Use newly-added Multiboot support in coreboot.
2109 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2110 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2112 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2113 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2114 (codestart): Store the MBI in `startup_multiboot_info' when we're
2115 being loaded using Multiboot.
2117 * kern/i386/coreboot/init.c (grub_machine_init): Move
2118 grub_at_keyboard_init() call to beginning of function (useful for
2119 debugging). Call grub_machine_mmap_init() before attempting to use
2120 grub_machine_mmap_iterate().
2121 (grub_lower_mem, grub_upper_mem): Move from here ...
2122 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2125 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2128 2008-11-12 Robert Millan <rmh@aybabtu.com>
2130 Fix a regression introduced by the at_keyboard.mod split. Because
2131 some terminals are default on some platforms and non-default on
2132 others, the first terminal being registered determines which is
2133 going to be default.
2135 * kern/term.c (grub_term_register_input): If this is the first
2136 terminal being registered, set it as the current one.
2137 (grub_term_register_output): Likewise.
2139 * term/efi/console.c (grub_console_init): Do not call
2140 grub_term_set_current_output() or grub_term_set_current_input().
2141 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2142 * term/i386/pc/console.c (grub_console_init): Likewise.
2143 (grub_console_fini): Do not call grub_term_set_current_input()
2144 (but leave grub_term_set_current_output() to restore text mode).
2146 2008-11-10 Robert Millan <rmh@aybabtu.com>
2148 * util/grub.d/00_header.in: Add backward compatibility check for
2149 versions of terminal.mod that don't understand `terminal_input' or
2152 2008-11-09 Robert Millan <rmh@aybabtu.com>
2154 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2155 `terminal_input' / `terminal_output', not `terminal'.
2157 2008-11-08 Robert Millan <rmh@aybabtu.com>
2159 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2160 (DISTCLEANFILES): Add `build_env.mk'.
2162 2008-11-08 Robert Millan <rmh@aybabtu.com>
2164 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
2165 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2166 members. Update all users.
2167 * util/console.c (grub_ncurses_term): Split in ...
2168 (grub_ncurses_term_input): ... this, and ...
2169 (grub_ncurses_term_output): ... this. Update all users.
2170 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
2172 2008-11-08 Robert Millan <rmh@aybabtu.com>
2174 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2175 (PKGDATA): Add $(pkgdata_SRCDIR).
2176 (pkglib_BUILDDIR): New variable.
2177 (pkgdata_SRCDIR): New variable.
2178 (build_env.mk): New target.
2179 (include_DATA): New variable.
2180 (install-local): Install $(include_DATA) files in $(includedir).
2182 2008-11-07 Pavel Roskin <proski@gnu.org>
2184 * gendistlist.sh: Use C locale for sorting to ensure consistent
2185 output on all systems.
2187 * util/grub.d/00_header.in: Remove incorrect space before
2190 2008-11-07 Robert Millan <rmh@aybabtu.com>
2192 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2194 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2195 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2196 (based on find_multi_boot1_header).
2197 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2198 using find_multi_boot2_header(), and abort if neither Multiboot or
2199 Multiboot headers were found.
2201 2008-11-07 Robert Millan <rmh@aybabtu.com>
2203 Modularize at_keyboard.mod:
2205 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2206 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2207 (at_keyboard_mod_LDFLAGS): New variables.
2209 Actual terminal split:
2211 * include/grub/term.h (struct grub_term): Split in ...
2212 (struct grub_term_input): ... this, and ...
2213 (struct grub_term_output): ... this. Update all users.
2214 (grub_term_set_current): Split in ...
2215 (grub_term_set_current_input): ... this, and ...
2216 (grub_term_set_current_output): ... this.
2217 (grub_term_get_current): Split in ...
2218 (grub_term_get_current_input): ... this, and ...
2219 (grub_term_get_current_output): ... this.
2220 (grub_term_register): Split in ...
2221 (grub_term_register_input): ... this, and ...
2222 (grub_term_register_output): ... this.
2223 (grub_term_unregister): Split in ...
2224 (grub_term_unregister_input): ... this, and ...
2225 (grub_term_unregister_output): ... this.
2226 (grub_term_iterate): Split in ...
2227 (grub_term_iterate_input): ... this, and ...
2228 (grub_term_iterate_output): ... this.
2230 * kern/term.c (grub_term_list): Split in ...
2231 (grub_term_list_input): ... this, and ...
2232 (grub_term_list_output): ... this. Update all users.
2233 (grub_cur_term): Split in ...
2234 (grub_cur_term_input): ... this, and ...
2235 (grub_cur_term_output): ... this. Update all users.
2236 (grub_term_set_current): Split in ...
2237 (grub_term_set_current_input): ... this, and ...
2238 (grub_term_set_current_output): ... this.
2239 (grub_term_get_current): Split in ...
2240 (grub_term_get_current_input): ... this, and ...
2241 (grub_term_get_current_output): ... this.
2242 (grub_term_register): Split in ...
2243 (grub_term_register_input): ... this, and ...
2244 (grub_term_register_output): ... this.
2245 (grub_term_unregister): Split in ...
2246 (grub_term_unregister_input): ... this, and ...
2247 (grub_term_unregister_output): ... this.
2248 (grub_term_iterate): Split in ...
2249 (grub_term_iterate_input): ... this, and ...
2250 (grub_term_iterate_output): ... this.
2252 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2253 a check for input and one for output (and only attempt to get keys
2254 from user when input works).
2256 * util/grub-probe.c (grub_term_get_current): Split in ...
2257 (grub_term_get_current_input): ... this, and ...
2258 (grub_term_get_current_output): ... this.
2259 * util/grub-fstest.c: Likewise.
2260 * util/i386/pc/grub-setup.c: Likewise.
2261 * util/grub-editenv.c: Likewise.
2263 Portability adjustments:
2265 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2266 `term/i386/pc/at_keyboard.c'.
2267 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2268 grub_keyboard_controller_init() (now handled by terminal .init).
2269 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
2270 grub_at_keyboard_init().
2271 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
2272 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
2273 at_keyboard.mod via input terminal interface).
2274 * include/grub/i386/coreboot/console.h: Convert into a stub for
2275 `<grub/i386/pc/console.h>'.
2277 Migrate full terminals to new API:
2279 * term/efi/console.c (grub_console_term): Split into ...
2280 (grub_console_term_input): ... this, and ...
2281 (grub_console_term_output): ... this. Update all users.
2282 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
2283 (grub_ofconsole_init): Split into ...
2284 (grub_ofconsole_init_input): ... this, and ...
2285 (grub_ofconsole_init_output): ... this.
2286 (grub_ofconsole_term): Split into ...
2287 (grub_ofconsole_term_input): ... this, and ...
2288 (grub_ofconsole_term_output): ... this. Update all users.
2289 * term/i386/pc/serial.c (grub_serial_term): Split into ...
2290 (grub_serial_term_input): ... this, and ...
2291 (grub_serial_term_output): ... this. Update all users.
2292 * term/i386/pc/console.c (grub_console_term): Split into ...
2293 (grub_console_term_input): ... this, and ...
2294 (grub_console_term_output): ... this. Update all users.
2295 (grub_console_term_input): Only enable it on PC/BIOS platform.
2296 (grub_console_init): Remove grub_keyboard_controller_init() call.
2298 Migrate input terminals to new API:
2300 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
2301 `i386' and `i386/pc' to enable build on x86_64 (this driver is
2302 i386-specific anyway).
2303 (grub_console_checkkey): Rename to ...
2304 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
2306 (grub_keyboard_controller_orig): New variable.
2307 (grub_console_getkey): Rename to ...
2308 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
2310 (grub_keyboard_controller_init): Static-ize. Save original
2311 controller value so that it can be restored ...
2312 (grub_keyboard_controller_fini): ... here (new function).
2313 (grub_at_keyboard_term): New structure.
2314 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
2317 Migrate output terminals to new API:
2319 * term/i386/pc/vga.c (grub_vga_term): Change type to
2320 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2321 members. Update all users.
2322 * term/gfxterm.c (grub_video_term): Change type to
2323 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
2324 members. Update all users.
2325 * include/grub/i386/pc/console.h (grub_console_checkkey)
2326 (grub_console_getkey): Do not export (no longer needed by gfxterm,
2329 Migrate `terminal' command and userland tools to new API:
2331 * commands/terminal.c (grub_cmd_terminal): Split into ...
2332 (grub_cmd_terminal_input): ... this, and ...
2333 (grub_cmd_terminal_output): ... this.
2334 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2335 `terminal_input' and `terminal_output'.
2336 * util/grub.d/00_header.in: Adjust `terminal' calls to new
2337 `terminal_input' / `terminal_output' API.
2338 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2339 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2340 provided ${GRUB_TERMINAL}, convert it).
2342 2008-11-04 Robert Millan <rmh@aybabtu.com>
2344 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
2346 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2348 2008-11-03 Bean <bean123ch@gmail.com>
2350 * kern/elf.c (grub_elf32_load): Revert to previous code.
2351 (grub_elf64_load): Likewise.
2353 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2355 2008-11-01 Robert Millan <rmh@aybabtu.com>
2357 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2358 (TARGET_CPPFLAGS): Likewise.
2359 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2361 2008-11-01 Carles Pina i Estany <carles@pina.cat>
2363 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2365 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2367 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2368 addition of objects until the code is not going to be able to fail.
2370 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
2372 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2373 (add a missing NULL check, and correct them by moving the pointer
2374 operations after the actual check).
2376 2008-10-29 Robert Millan <rmh@aybabtu.com>
2378 * util/i386/pc/grub-install.in: Handle empty string as output from
2379 make_system_path_relative_to_its_root().
2381 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
2383 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2384 circular metadata worst case scenario. If the metadata is circular
2385 then copy the wrap in place.
2386 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2387 project lib/format_text/layout.h
2388 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2390 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2392 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2394 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
2396 * util/update-grub_lib.in: Mention filename in warning message.
2398 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2400 * NEWS: Update for rename of update-grub to grub-mkconfig.
2402 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
2404 * util/update-grub_lib.in: Copy to ...
2405 * util/grub-mkconfig_lib.in: ... this. Update all users.
2406 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2407 * util/update-grub.in: Rename to ...
2408 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
2409 option. Add `--output' option to allow users to specify the generated
2410 configuration file. Default to stdout.
2411 (update_grub_dir): Rename to ...
2412 (grub_mkconfig_dir): ... this.
2413 (grub_cfg): Default to an empty string.
2414 * conf/common.rmk (update-grub): Rename to ...
2415 (grub-mkconfig): ... this.
2416 (update-grub_lib): Copy to ...
2417 (grub-mkconfig_lib): ... this.
2418 (update-grub_SCRIPTS): Copy to ...
2419 (grub-mkconfig_SCRIPTS): ... this. Update all users.
2420 (update-grub_DATA): Rename to ...
2421 (grub-mkconfig_DATA): ... this.
2423 2008-09-28 Robert Millan <rmh@aybabtu.com>
2425 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2426 to `modified'. Add the real `created' field.
2427 (grub_iso9660_uuid): Use `modified' rather than `created' for
2428 constructing the UUID.
2430 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
2432 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2433 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2435 2008-09-28 Bean <bean123ch@gmail.com>
2437 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2438 Thanks to Christian Franke for finding this bug.
2440 2008-09-25 Robert Millan <rmh@aybabtu.com>
2442 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2443 instances of grub_util_get_disk_name() (see previous commit).
2445 2008-09-25 Robert Millan <rmh@aybabtu.com>
2447 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2448 `util/i386/get_disk_name.c'.
2449 * conf/i386-efi.rmk: Likewise.
2450 * conf/x86_64-efi.rmk: Likewise.
2451 * conf/i386-coreboot.rmk: Likewise.
2452 * conf/i386-ieee1275.rmk: Likewise.
2453 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2454 `util/ieee1275/get_disk_name.c'.
2455 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2456 * util/ieee1275/get_disk_name.c: Remove file.
2457 * util/i386/get_disk_name.c: Remove file.
2458 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2459 "hd%d" for device.map entries, rather than using
2460 grub_util_get_disk_name().
2462 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2464 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2466 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2468 2008-09-24 Carles Pina i Estany <carles@pina.cat>
2470 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2472 (GRUB_TERM_PPAGE): Changed to 0x4900.
2474 2008-09-24 Robert Millan <rmh@aybabtu.com>
2476 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2477 macros (they were i386-pc specific).
2478 * include/grub/sparc64/ieee1275/console.h: Likewise.
2479 * include/grub/efi/console.h: Likewise.
2481 2008-09-22 Bean <bean123ch@gmail.com>
2483 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2484 resident and in attribute list.
2486 * include/grub/ntfs.h (BMP_LEN): Removed.
2488 2008-09-22 Bean <bean123ch@gmail.com>
2490 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2491 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2493 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2494 error occurs, as grub_disk_open will call grub_disk_close, which will
2495 call p->close (scsi).
2497 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2499 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2500 (AC_PREREQ): Bumped to 2.59.
2501 (AC_TRY_COMPILE): Replace obsolete macro with ...
2502 (AC_COMPILE_IFELSE): ... this.
2503 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2504 (AC_LINK_IFELSE): ... this.
2506 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
2508 * autogen.sh: Add a call to `gendistlist.sh'.
2510 2008-09-19 Christian Franke <franke@computer.org>
2512 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2513 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2514 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2515 Export __enable_execute_stack() to modules.
2516 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2519 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2521 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2524 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
2526 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2527 #include <grub/util/hostdisk.h>.
2529 2008-09-08 Robert Millan <rmh@aybabtu.com>
2531 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2532 segments when their filesz is zero (grub_file_read() interprets
2533 zero-size as "read until EOF", which results in memory corruption).
2534 Use `lowest_segment' rather than 0 for calculating the current
2535 segment load address.
2537 2008-09-08 Robert Millan <rmh@aybabtu.com>
2539 * util/hostdisk.c (open_device): Replace a grub_util_info() call
2540 with grub_dprintf("hostdisk", ...), as it was so verbose that it
2541 clobbered useful information.
2543 2008-09-08 Robert Millan <rmh@aybabtu.com>
2545 * include/grub/util/biosdisk.h: Move to ...
2546 * include/grub/util/hostdisk.h: ... here. Update all users.
2547 * util/biosdisk.c: Move to ...
2548 * util/hostdisk.c: ... here. Update all users.
2550 2008-09-07 Robert Millan <rmh@aybabtu.com>
2552 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2554 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2555 and length can be stored directly in the `mbi->mmap_addr' and
2556 `mbi->mmap_length' struct fields.
2558 2008-09-07 Robert Millan <rmh@aybabtu.com>
2560 * conf/i386.rmk: New file. Provides declaration for building
2562 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2563 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2565 Include `conf/i386.mk'.
2566 * conf/i386-efi.rmk: Likewise.
2567 * conf/x86_64-efi.rmk: Likewise.
2568 * conf/i386-coreboot.rmk: Likewise.
2569 * conf/i386-ieee1275.rmk: Likewise.
2571 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
2573 Based on patch created by Colin D Bennett <colin@gibibit.com>.
2574 Adds optimization support for BGR based modes.
2576 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2577 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2578 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2579 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2580 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2581 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2582 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2583 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2584 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2585 (grub_video_i386_vbeblit_index_index): Likewise.
2586 (grub_video_i386_vbeblit_replace_directN): Added.
2587 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2588 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2589 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2590 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2591 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2592 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2593 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2594 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2595 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2596 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2597 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2598 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2599 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2601 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2602 (grub_video_i386_vbefill_R8G8B8): Likewise.
2603 (grub_video_i386_vbefill_index): Likewise.
2604 (grub_video_i386_vbefill_direct32): Added.
2605 (grub_video_i386_vbefill_direct24): Likewise.
2606 (grub_video_i386_vbefill_direct16): Likewise.
2607 (grub_video_i386_vbefill_direct8): Likewise.
2609 * include/grub/video.h (grub_video_blit_format): Removed
2610 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2611 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2612 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2613 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2614 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2616 * video/video.c (grub_video_get_blit_format): Updated to use new
2617 blit formats. Added handling for 16 bit color modes.
2619 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2621 (common_blitter): Updated to use new blitters.
2623 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2625 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2626 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2627 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2628 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2629 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2630 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2631 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2632 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2633 (grub_video_i386_vbeblit_index_index): Likewise.
2634 (grub_video_i386_vbeblit_replace_directN): Added.
2635 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2636 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2637 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2638 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2639 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2640 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2641 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2642 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2643 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2644 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2645 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2646 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2647 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2649 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
2650 (grub_video_i386_vbefill_R8G8B8): Likewise.
2651 (grub_video_i386_vbefill_index): Likewise.
2652 (grub_video_i386_vbefill_direct32): Added.
2653 (grub_video_i386_vbefill_direct24): Likewise.
2654 (grub_video_i386_vbefill_direct16): Likewise.
2655 (grub_video_i386_vbefill_direct8): Likewise.
2657 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
2660 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
2663 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
2666 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
2669 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2671 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
2674 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
2676 * fs/iso9660.c (grub_iso9660_date): New structure.
2677 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
2678 (grub_iso9660_uuid): New function.
2680 2008-09-05 Bean <bean123ch@gmail.com>
2682 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
2684 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
2685 insensitive bit for names in Win32 and Win32 & DOS namespace.
2687 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
2689 * include/grub/types.h (LONG_MAX): Likewise.
2691 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2693 * util/getroot.c: Include <config.h>.
2694 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
2695 add support for /dev/md/N devices and handle LVM double dash escaping.
2697 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
2699 * config.guess: Update to latest version from config git.
2700 * config.sub: Likewise.
2702 2008-09-03 Robert Millan <rmh@aybabtu.com>
2704 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
2705 `disk->total_sectors'.
2707 2008-09-01 Colin D Bennett <colin@gibibit.com>
2709 * include/grub/normal.h: Fixed incorrect comment for
2710 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
2712 2008-09-01 Colin D Bennett <colin@gibibit.com>
2714 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
2715 values with defines.
2717 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
2718 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
2719 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
2720 (GRUB_VBE_MODEATTR_COLOR): Likewise.
2721 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
2722 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
2723 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
2724 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
2725 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
2726 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
2727 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
2728 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
2729 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
2730 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
2731 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
2732 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
2733 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
2734 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
2735 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
2737 2008-08-31 Robert Millan <rmh@aybabtu.com>
2739 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
2741 (grub_multiboot): Fix a few warnings.
2743 2008-08-31 Robert Millan <rmh@aybabtu.com>
2745 * loader/i386/pc/multiboot.c: Update comment not to say that
2746 boot_device support is unimplemented.
2748 2008-08-31 Robert Millan <rmh@aybabtu.com>
2750 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
2751 or memory map support are unimplemented.
2753 2008-08-31 Colin D Bennett <colin@gibibit.com>
2755 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
2757 2008-08-31 Colin D Bennett <colin@gibibit.com>
2759 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
2760 total video memory in 'vbeinfo' output; show color format details for
2763 2008-08-30 Pavel Roskin <proski@gnu.org>
2765 * util/genmoddep.c: Remove for real this time.
2766 * DISTLIST: Remove util/genmoddep.c.
2768 2008-08-30 Robert Millan <rmh@aybabtu.com>
2770 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
2771 as required by Multiboot spec (it was already 4-byte aligned, but
2774 2008-08-29 Pavel Roskin <proski@gnu.org>
2776 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2777 * kern/powerpc/ieee1275/startup.S: ... this.
2778 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2779 * DISTLIST: Likewise.
2781 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2782 grub/cpu/kernel.h. Add start label for consistency with other
2783 platforms. Add grub_prefix immediately after start. Add jump
2784 to the code after grub_prefix.
2785 * include/grub/powerpc/kernel.h: Provide valid values for
2786 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2788 2008-08-29 Bean <bean123ch@gmail.com>
2790 * configure.ac: Change host_os to cygwin for mingw.
2791 (asprintf): New check for function.
2793 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2794 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2796 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
2797 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
2798 sync, sleep and grub_util_get_disk_size for mingw.
2800 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2801 to get size in mingw.
2802 (open_device): Use flag O_BINARY if it's defined.
2803 (find_root_device): Add dummy code for mingw.
2805 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2806 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2807 (get_scsi_disk_name): Return 0 for mingw.
2809 * util/hostfs.c: #include <grub/util/misc.h>.
2810 (grub_hostfs_open): Use "rb" flag to open file, use
2811 grub_util_get_disk_size to get disk size for mingw.
2813 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2814 (asprintf): New function if HAVE_ASPRINTF is not set.
2815 (sync): New function for mingw.
2817 (grub_util_get_disk_size): Likewise.
2819 2008-08-28 Pavel Roskin <proski@gnu.org>
2821 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2824 2008-08-28 Robert Millan <rmh@aybabtu.com>
2826 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2828 2008-08-28 Robert Millan <rmh@aybabtu.com>
2830 Change find_grub_drive() syntax so it doesn't prevent it from
2831 detecting NULL names as errors.
2833 * util/biosdisk.c (find_grub_drive): Move free slot search code
2835 (find_free_slot): ... to here.
2836 (read_device_map): Use find_free_slot() to search for free slots.
2838 2008-08-27 Marco Gerards <marco@gnu.org>
2840 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2841 (scsi_mod_SOURCES): New variable.
2842 (scsi_mod_CFLAGS): Likewise
2843 (scsi_mod_LDFLAGS): Likewise.
2845 * disk/scsi.c: New file.
2847 * include/grub/scsi.h: Likewise.
2849 * include/grub/scsicmd.h: Likewise.
2851 * disk/ata.c: Include <grub/scsi.h>.
2852 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2854 (grub_ata_iterate): Skip ATAPI devices.
2855 (grub_ata_open): Only handle ATAPI devices.
2856 (struct grub_atapi_read): Removed.
2857 (grub_atapi_readsector): Likewise.
2858 (grub_ata_read): No longer handle ATAPI devices.
2859 (grub_ata_write): Likewise.
2860 (grub_atapi_iterate): New function.
2861 (grub_atapi_read): Likewise.
2862 (grub_atapi_write): Likewise.
2863 (grub_atapi_open): Likewise.
2864 (grub_atapi_close): Likewise.
2865 (grub_atapi_dev): New variable.
2866 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2867 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2869 * include/grub/disk.h (enum grub_disk_dev_id): Add
2870 `GRUB_DISK_DEVICE_SCSI_ID'.
2872 2008-08-26 Robert Millan <rmh@aybabtu.com>
2874 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2875 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2878 2008-08-23 Bean <bean123ch@gmail.com>
2880 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2881 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2882 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2883 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2885 (raid5rec_mod_SOURCES): New macro.
2886 (raid5rec_mod_CFLAGS): Likewise.
2887 (raid5rec_mod_LDFLAGS): Likewise.
2888 (raid6rec_mod_SOURCES): Likewise.
2889 (raid6rec_mod_CFLAGS): Likewise.
2890 (raid6rec_mod_LDFLAGS): Likewise.
2891 (mdraid_mod_SOURCES): Likewise.
2892 (mdraid_mod_CFLAGS): Likewise.
2893 (mdraid_mod_LDFLAGS): Likewise.
2894 (dm_nv_mod_SOURCES): Likewise.
2895 (dm_nv_mod_CFLAGS): Likewise.
2896 (dm_nv_mod_LDFLAGS): Likewise.
2898 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2899 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2900 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2902 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2903 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2905 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2907 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2909 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2911 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2913 * disk/raid5_recover.c: New file.
2915 * disk/raid6_recover.c: Likewise.
2917 * disk/mdraid_linux.c: Likewise.
2919 * disk/dmraid_nvidia.c: Likewise.
2921 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2924 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2925 calculate the size of raid device.
2926 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2927 different layout of raid5.
2928 (grub_raid_scan_device): Remove code specific to mdraid.
2929 (grub_raid_list): New variable.
2930 (free_array): New function.
2931 (grub_raid_register): Likewise.
2932 (grub_raid_unregister): Likewise.
2933 (grub_raid_rescan): Likewise.
2934 (GRUB_MOD_INIT): Don't iterate device here.
2935 (GRUB_MOD_FINI): Use free_array to release resource.
2937 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2938 (grub_raid5_recover_func_t): New function variable type.
2939 (grub_raid6_recover_func_t): Likewise.
2940 (grub_raid5_recover_func): New variable.
2941 (grub_raid6_recover_func): Likewise.
2942 (grub_raid_register): New function.
2943 (grub_raid_unregister): Likewise.
2944 (grub_raid_rescan): Likewise.
2945 (grub_raid_block_xor): Likewise.
2947 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2948 (CMD_CRC): New macro.
2950 (read_file): Handle device as well as file.
2951 (cmd_crc): New function.
2952 (fstest): Handle multiple disks.
2953 (options): Remove part, raw and long, add root and diskcount.
2954 (usage): Add crc, remove -p, -r, -l, add -r and -c.
2955 (main): Find the first non option entry and ignore subsequent options,
2956 add handling for the new options, support multiple disks.
2958 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2960 2008-08-23 Bean <bean123ch@gmail.com>
2962 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2964 * genfslist.sh: Ignore kernel.mod.
2966 * genpartmaplist.sh: Likewise.
2968 2008-08-23 Robert Millan <rmh@aybabtu.com>
2970 * util/getroot.c (find_root_device): Skip anything that starts with
2971 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2973 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
2975 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2976 * util/grub.d/00_header.in: Allow the administrator to change default
2977 gfxmode via ${GRUB_GFXMODE}.
2979 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
2981 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2983 2008-08-21 Robert Millan <rmh@aybabtu.com>
2985 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2987 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2988 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2990 2008-08-20 Carles Pina i Estany <carles@pina.cat>
2992 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2993 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2995 2008-08-19 Robert Millan <rmh@aybabtu.com>
2997 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2998 (struct grub_virtual_screen): Remove `cursor_color'.
2999 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3001 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3003 2008-08-18 Robert Millan <rmh@aybabtu.com>
3005 Unify (identical) linux_normal.c files.
3006 * loader/i386/efi/linux_normal.c: Move from here ...
3007 * loader/linux_normal.c: ... to here. Update all users.
3008 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3009 * loader/i386/ieee1275/linux_normal.c: Likewise.
3011 2008-08-18 Robert Millan <rmh@aybabtu.com>
3013 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3014 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3015 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3016 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3017 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3019 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3020 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3021 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3022 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3023 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3024 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3025 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3026 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3027 Initialize `params->video_cursor_x' and `params->video_cursor_y'
3028 portably using grub_getxy().
3029 Replace `-EFI' with `-bzImage' in boot message.
3031 2008-08-17 Robert Millan <rmh@aybabtu.com>
3033 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3035 2008-08-17 Robert Millan <rmh@aybabtu.com>
3037 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3039 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3040 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3041 (grub_machine_mmap_iterate): New function declaration.
3042 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3044 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3047 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3048 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3049 Move e820 parsing from here ...
3050 * kern/i386/pc/mmap.c: New file.
3051 (grub_machine_mmap_iterate): ... to here.
3053 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3054 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3055 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
3056 (grub_available_iterate): Redeclare to return `void', and redeclare
3057 its hook to use grub_uint64_t as addr and size parameters, and rename
3059 (grub_machine_mmap_iterate): ... this. Update all users.
3061 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3062 to make it more readable. Rename to ...
3063 (grub_machine_mmap_iterate): ... this.
3065 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3066 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3067 (grub_multiboot): Allocate an extra region after the payload, and fill
3068 it with a Multiboot memory map. Adjust a.out loader to calculate size
3069 with the extra space.
3070 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3071 with the extra space.
3073 2008-08-17 Carles Pina i Estany <carles@pina.cat>
3075 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
3077 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
3079 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3080 mdate-sh to the list `find' searches for.
3081 * DISTLIST: Regenerated.
3083 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
3085 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3086 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
3087 genmoddep.awk, gensymlist.sh.in.
3088 (DISTDIRS): Add bus, docs, hook, lib.
3089 * DISTLIST: Regenerated.
3090 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
3092 2008-08-16 Robert Millan <rmh@aybabtu.com>
3094 * disk/raid.c (grub_raid_init): Handle/report errors set by
3095 grub_device_iterate().
3096 * disk/lvm.c (grub_lvm_init): Likewise.
3098 2008-08-15 Bean <bean123ch@gmail.com>
3100 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3102 (datetime_mod_SOURCES): New macro.
3103 (datetime_mod_CFLAGS): Likewise.
3104 (datetime_mod_LDFLAGS): Likewise.
3105 (date_mod_SOURCES): Likewise.
3106 (date_mod_CFLAGS): Likewise.
3107 (date_mod_LDFLAGS): Likewise.
3108 (datehook_mod_SOURCES): Likewise.
3109 (datehook_mod_CFLAGS): Likewise.
3110 (datehook_mod_LDFLAGS): Likewise.
3112 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3114 (datetime_mod_SOURCES): New macro.
3115 (datetime_mod_CFLAGS): Likewise.
3116 (datetime_mod_LDFLAGS): Likewise.
3117 (date_mod_SOURCES): Likewise.
3118 (date_mod_CFLAGS): Likewise.
3119 (date_mod_LDFLAGS): Likewise.
3120 (datehook_mod_SOURCES): Likewise.
3121 (datehook_mod_CFLAGS): Likewise.
3122 (datehook_mod_LDFLAGS): Likewise.
3124 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3126 (datetime_mod_SOURCES): New macro.
3127 (datetime_mod_CFLAGS): Likewise.
3128 (datetime_mod_LDFLAGS): Likewise.
3129 (date_mod_SOURCES): Likewise.
3130 (date_mod_CFLAGS): Likewise.
3131 (date_mod_LDFLAGS): Likewise.
3132 (datehook_mod_SOURCES): Likewise.
3133 (datehook_mod_CFLAGS): Likewise.
3134 (datehook_mod_LDFLAGS): Likewise.
3136 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3138 (datetime_mod_SOURCES): New macro.
3139 (datetime_mod_CFLAGS): Likewise.
3140 (datetime_mod_LDFLAGS): Likewise.
3141 (date_mod_SOURCES): Likewise.
3142 (date_mod_CFLAGS): Likewise.
3143 (date_mod_LDFLAGS): Likewise.
3144 (datehook_mod_SOURCES): Likewise.
3145 (datehook_mod_CFLAGS): Likewise.
3146 (datehook_mod_LDFLAGS): Likewise.
3148 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3150 (datetime_mod_SOURCES): New macro.
3151 (datetime_mod_CFLAGS): Likewise.
3152 (datetime_mod_LDFLAGS): Likewise.
3153 (date_mod_SOURCES): Likewise.
3154 (date_mod_CFLAGS): Likewise.
3155 (date_mod_LDFLAGS): Likewise.
3156 (datehook_mod_SOURCES): Likewise.
3157 (datehook_mod_CFLAGS): Likewise.
3158 (datehook_mod_LDFLAGS): Likewise.
3160 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3162 * commands/date.c: New file.
3164 * hook/datehook.c: Likewise.
3166 * include/grub/lib/datetime.h: Likewise.
3168 * include/grub/i386/cmos.h: Likewise.
3170 * lib/datetime.c: Likewise.
3172 * lib/i386/datetime.c: Likewise.
3174 * lib/efi/datetime.c: Likewise.
3176 2008-08-14 Robert Millan <rmh@aybabtu.com>
3178 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3179 (grub_mkelfimage_SOURCES): New variable.
3180 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3182 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3183 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3184 * conf/powerpc-ieee1275.rmk: Likewise.
3185 * conf/i386-ieee1275.rmk: Likewise.
3187 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3188 * kern/i386/coreboot/init.c: Likewise.
3190 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3191 with `<grub/cpu/kernel.h>'.
3192 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3194 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3195 * kern/i386/coreboot/startup.S: Likewise.
3197 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3198 (GRUB_MOD_GAP): Remove.
3199 * include/grub/powerpc/kernel.h: New file.
3200 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3201 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3202 * include/grub/i386/kernel.h: New file.
3203 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3204 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3205 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3207 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3209 Use --directory when invoking grub_mkimage.
3211 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3212 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3213 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3214 and GRUB_KERNEL_CPU_PREFIX.
3216 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
3218 * include/grub/err.h (grub_err_printf): New function prototype.
3219 * util/misc.c (grub_err_printf): New function.
3220 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3222 * kern/err.c (grub_print_error): Use grub_err_printf.
3224 2008-08-13 Robert Millan <rmh@aybabtu.com>
3226 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3228 2008-08-13 Robert Millan <rmh@aybabtu.com>
3230 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3233 2008-08-12 Robert Millan <rmh@aybabtu.com>
3235 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3236 of the relocation code from here ...
3237 (grub_multiboot): ... to here.
3238 (forward_relocator, backward_relocator): Move from here ...
3239 * kern/i386/loader.S (grub_multiboot_forward_relocator)
3240 (grub_multiboot_backward_relocator): ... to here.
3241 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
3242 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
3243 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3244 (grub_multiboot_forward_relocator_end)
3245 (grub_multiboot_backward_relocator)
3246 (grub_multiboot_backward_relocator_end): New variables.
3248 2008-08-12 Bean <bean123ch@gmail.com>
3250 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3252 2008-08-11 Robert Millan <rmh@aybabtu.com>
3254 * kern/i386/linuxbios/startup.S: Move from here ...
3255 * kern/i386/coreboot/startup.S: ... to here.
3257 * kern/i386/linuxbios/init.c: Move from here ...
3258 * kern/i386/coreboot/init.c: ... to here.
3260 * kern/i386/linuxbios/table.c: Move from here ...
3261 * kern/i386/coreboot/mmap.c: ... to here.
3263 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3265 2008-08-11 Robert Millan <rmh@aybabtu.com>
3267 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3268 errors. Leave it to the upper layer to handle them.
3270 2008-08-09 Christian Franke <franke@computer.org>
3272 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
3273 * conf/common.rmk: Install `grub-pe2elf' only if requested.
3274 Install `grub.d/10_windows' only on Cygwin.
3275 * configure.ac: Add subst of `target_os'.
3276 Check `target_os' also before setting TARGET_OBJ2ELF.
3277 Add `--enable-grub-pe2elf'.
3279 2008-08-08 Robert Millan <rmh@aybabtu.com>
3281 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3282 (grub_last_time): Change type to grub_uint64_t.
3283 (grub_disk_open): Migrate code from to using grub_get_time_ms().
3284 (grub_disk_close): Likewise.
3286 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3287 (run_menu): Migrate code from to using grub_get_time_ms().
3289 * util/misc.c (grub_get_time_ms): New function.
3291 2008-08-08 Marco Gerards <marco@gnu.org>
3293 * disk/ata.c (grub_ata_regget): Change return type to
3295 (grub_ata_regget2): Likewise.
3296 (grub_ata_wait_status): New function.
3297 (grub_ata_wait_busy): Removed function, updated all users to use
3298 `grub_ata_wait_status'.
3299 (grub_ata_wait_drq): Likewise.
3300 (grub_ata_cmd): New function.
3301 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
3303 (grub_ata_pio_write): Add error handling.
3304 (grub_atapi_identify): Likewise.
3305 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
3307 (grub_ata_identify): Use `grub_ata_cmd' and improve error
3308 handling. Actually use the detected registers. Reorder the
3309 detection logic such that it is easier to read.
3310 (grub_ata_pciinit): Do not assign the same ID to each controller.
3311 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
3313 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
3315 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
3317 2008-08-08 Marco Gerards <marco@gnu.org>
3321 2008-08-07 Bean <bean123ch@gmail.com>
3323 * include/grub/x86_64/pci.h: New file.
3325 2008-08-07 Christian Franke <franke@computer.org>
3327 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3328 (TIMER2_GATE): Likewise.
3329 (grub_pit_wait): Add enable/disable of the timer2 gate
3330 bit of port 0x61. This fixes a possible infinite loop.
3332 2008-08-07 Bean <bean123ch@gmail.com>
3334 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3335 kern/i386/tsc.c and kern/i386/pit.c.
3337 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3340 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3343 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3345 2008-08-07 Bean <bean123ch@gmail.com>
3347 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3349 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3351 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3352 multiple inclusion. Add #include <grub/types.h>.
3354 2008-08-06 Christian Franke <franke@computer.org>
3356 * conf/common.rmk: Build and install `10_windows'.
3357 * util/grub.d/10_windows.in: New script.
3359 2008-08-06 Pavel Roskin <proski@gnu.org>
3361 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3363 2008-08-06 Robert Millan <rmh@aybabtu.com>
3365 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3366 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3368 2008-08-06 Bean <bean123ch@gmail.com>
3370 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3371 (grub_pxefs_fs_int): Remove dummy definition.
3372 (grub_pxefs_open): Use data->block_size to store the current block
3374 (grub_pxefs_read): Use block size stored in data->block_size. As the
3375 value of grub_pxe_blksize can be changed after the file is opened.
3377 2008-08-06 Bean <bean123ch@gmail.com>
3379 * fs/i386/pc/pxe.c (curr_file): new variable.
3380 (grub_pxefs_open): Simply the handling of pxe file system. Don't
3381 require the dummy internal file system anymore.
3382 (grub_pxefs_read): Removed.
3383 (grub_pxefs_close): Likewise.
3384 (grub_pxefs_fs_int): Likewise.
3385 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3386 connection when we switch file.
3387 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3389 2008-08-06 Robert Millan <rmh@aybabtu.com>
3391 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3393 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3394 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3396 * kern/i386/halt.c: New file.
3397 * kern/i386/reboot.c: Likewise.
3398 * include/grub/i386/reboot.h: Likewise.
3399 * include/grub/i386/halt.h: Likewise.
3401 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3402 Include `<grub/cpu/halt.h>'.
3403 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3404 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3406 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3407 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3408 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3409 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3410 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3411 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3413 * include/grub/i386/at_keyboard.h: ... to here.
3415 2008-08-05 Robert Millan <rmh@aybabtu.com>
3417 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3418 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3419 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3420 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3421 `kern/generic/millisleep.c'.
3423 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3424 instead of grub_get_rtc().
3425 (grub_tsc_init): Initialize `tsc_boot_time'.
3427 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3428 (grub_machine_init): Use grub_tsc_init() rather than
3429 installing an RTC-based handler via grub_install_get_time_ms().
3431 * kern/i386/pit.c: New file.
3432 * include/grub/i386/pit.h: Likewise.
3434 2008-08-05 Bean <bean123ch@gmail.com>
3436 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3438 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3439 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3440 (pxe_mod_SOURCES): New macro.
3441 (pxe_mod_CFLAGS): Likewise.
3442 (pxe_mod_LDFLAGS): Likewise.
3443 (pxecmd_mod_SOURCES): Likewise.
3444 (pxecmd_mod_CFLAGS): Likewise.
3445 (pxecmd_mod_LDFLAGS): Likewise.
3447 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3448 (grub_pxe_call): Likewise.
3450 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3452 * commands/i386/pc/pxecmd.c: New file.
3454 * fs/i386/pc/pxe.c: Likewise.
3456 * include/grub/i386/pc/pxe.h: Likewise.
3458 2008-08-05 Bean <bean123ch@gmail.com>
3460 * util/console.c (grub_console_cur_color): New variable.
3461 (grub_console_standard_color): Likewise.
3462 (grub_console_normal_color): Likewise.
3463 (grub_console_highlight_color): Likewise.
3464 (color_map): Likewise.
3465 (use_color): Likewise.
3466 (NUM_COLORS): New macro.
3467 (grub_ncurses_setcolorstate): Handle color properly.
3468 (grub_ncurses_setcolor): Don't change color here, just remember the
3469 settings, color will be set in grub_ncurses_setcolorstate.
3470 (grub_ncurses_getcolor): New function.
3471 (grub_ncurses_init): Initialize color pairs.
3472 (grub_ncurses_term): New member grub_ncurses_getcolor.
3474 2008-08-05 Colin D Bennett <colin@gibibit.com>
3476 High resolution timer support. Implemented for x86 CPUs using TSC.
3477 Extracted generic grub_millisleep() so it's linked in only as needed.
3478 This requires a Pentium compatible CPU; if the RDTSC instruction is
3479 not supported, then it falls back on the generic grub_get_time_ms()
3480 implementation that uses the machine's RTC.
3482 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3483 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3484 `kern/generic/millisleep.c'.
3486 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3487 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3489 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3490 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3492 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3494 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3495 `kern/generic/millisleep.c'.
3497 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3499 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3501 * kern/generic/rtc_get_time_ms.c: New file.
3503 * kern/generic/millisleep.c: New file.
3505 * kern/misc.c: Don't include
3506 <kern/time.h> anymore.
3507 (grub_millisleep_generic): Removed.
3509 * commands/sleep.c (grub_interruptible_millisleep): Uses
3510 grub_get_time_ms() instead of grub_get_rtc().
3512 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
3514 (grub_cpu_is_cpuid_supported): New inline function.
3515 (grub_cpu_is_tsc_supported): New inline function.
3516 (grub_tsc_init): New function prototype.
3517 (grub_tsc_get_time_ms): New function prototype.
3519 * kern/i386/tsc.c (grub_get_time_ms): New file.
3521 * include/grub/time.h: Include <grub/types.h.
3522 (grub_millisleep_generic): Removed.
3523 (grub_get_time_ms): New prototype.
3524 (grub_install_get_time_ms): New prototype.
3525 (grub_rtc_get_time_ms): New prototype.
3527 * kern/time.c (grub_get_time_ms): New function.
3528 (grub_install_get_time_ms): New function.
3530 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
3531 <grub/time.h> anymore.
3532 (grub_millisleep): Removed.
3533 (grub_machine_init): Call grub_tsc_init.
3535 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3536 get_time_ms() implementation.
3538 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3539 (ieee1275_get_time_ms): New function.
3540 (grub_machine_init): Install get_time_ms() implementation.
3542 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3543 (grub_machine_init): Call grub_tsc_init().
3544 (grub_millisleep): Removed.
3546 * kern/ieee1275/init.c (grub_millisleep): Removed.
3547 (grub_machine_init): Install ieee1275_get_time_ms()
3549 (ieee1275_get_time_ms): New function.
3550 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3553 2008-08-05 Marco Gerards <marco@gnu.org>
3555 * disk/ata.c: Include <grub/pci.h>.
3556 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3557 (grub_ata_initialize): Rewritten.
3558 (grub_ata_device_initialize): New function.
3560 2008-08-04 Pavel Roskin <proski@gnu.org>
3562 * kern/main.c: Include grub/mm.h.
3564 2008-08-04 Robert Millan <rmh@aybabtu.com>
3566 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3567 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3568 corruption problem).
3570 2008-08-04 Robert Millan <rmh@aybabtu.com>
3572 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3573 warnings introduced in my last commit.
3575 2008-08-03 Robert Millan <rmh@aybabtu.com>
3577 Make PCI available on all i386 architectures.
3579 * include/grub/i386/pc/pci.h: Move from here ...
3580 * include/grub/i386/pci.h: ... to here.
3582 * include/grub/i386/pc/pci.h: Remove.
3583 * include/grub/i386/efi/pci.h: Remove.
3584 * include/grub/x86_64/efi/pci.h: Remove.
3586 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3589 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3590 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3591 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3593 * conf/i386-ieee1275.rmk: Likewise.
3595 2008-08-03 Robert Millan <rmh@aybabtu.com>
3597 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3598 (grub_console_setcursor): Make it possible to set cursor off.
3600 2008-08-03 Robert Millan <rmh@aybabtu.com>
3602 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
3603 of modules instead of assuming which platform provides what.
3604 * util/update-grub.in: Likewise.
3606 2008-08-03 Robert Millan <rmh@aybabtu.com>
3608 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3609 instead of `grub_install_dos_part' to determine whether a drive needs
3610 to be prepended to prefix (`grub_install_dos_part' is not reliable,
3611 because it can be overridden when loading GRUB via Multiboot).
3613 2008-08-02 Robert Millan <rmh@aybabtu.com>
3615 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3617 2008-08-02 Robert Millan <rmh@aybabtu.com>
3619 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3620 of informational grub_dprintf() calls.
3622 2008-08-02 Robert Millan <rmh@aybabtu.com>
3624 * disk/memdisk.c (memdisk_size): Don't initialize.
3625 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3627 * include/grub/i386/pc/kernel.h
3628 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
3629 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
3630 (grub_memdisk_image_size, grub_arch_memdisk_addr)
3631 (grub_arch_memdisk_size): Remove.
3633 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
3634 field (was only used to transfer a constant). Add `type' field to
3635 support multiple module types.
3636 (grub_module_iterate): New function.
3638 * kern/device.c (grub_device_open): Do not hide error messages
3639 when grub_disk_open() fails. Use grub_print_error() instead.
3641 * kern/i386/pc/init.c (grub_arch_modules_addr)
3642 (grub_arch_memdisk_size): Remove functions.
3643 (grub_arch_modules_addr): Return the module address in high memory
3644 (now that it isn't copied anymore).
3646 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
3647 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
3648 decompression routine (grub_total_module_size already includes that
3649 now). Don't copy modules back to low memory.
3651 * kern/main.c: Include `<grub/mm.h>'.
3652 (grub_load_modules): Split out (and use) ...
3653 (grub_module_iterate): ... this function, which iterates through
3654 module objects and runs a hook.
3655 Comment out grub_mm_init_region() call, as it would cause non-ELF
3656 modules to be overwritten.
3658 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
3659 the memdisk image in its own region, make it part of the module list.
3660 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
3661 (main): Parse --memdisk|-m option, and pass user-provided path as
3662 parameter to generate_image().
3663 (add_segments): Pass `memdisk_path' down to load_modules().
3664 (load_modules): Embed memdisk image in module section when requested.
3665 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
3666 `header.type' instead of `header.offset'.
3668 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
3669 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
3670 (memdisk_mod_LDFLAGS): New variables.
3671 * conf/i386-coreboot.rmk: Likewise.
3672 * conf/i386-ieee1275.rmk: Likewise.
3674 2008-08-02 Robert Millan <rmh@aybabtu.com>
3676 * loader/i386/pc/multiboot.c (playground, forward_relocator)
3677 (backward_relocator): New variables. Used to allocate and relocate
3678 the payload, respectively.
3679 (grub_multiboot_load_elf32): Load into heap instead of requested
3680 address, install the appropriate relocator code in each bound of
3681 the payload, and set the entry point such that
3682 grub_multiboot_real_boot() will jump to one of them.
3684 * kern/i386/loader.S (grub_multiboot_payload_size)
3685 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3686 (grub_multiboot_payload_entry_offset): New variables.
3687 (grub_multiboot_real_boot): Set cpu context to what the relocator
3688 expects, and jump to the relocator instead of the payload.
3690 * include/grub/i386/loader.h (grub_multiboot_payload_size)
3691 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
3692 (grub_multiboot_payload_entry_offset): Export.
3694 2008-08-01 Bean <bean123ch@gmail.com>
3696 * normal/menu_entry.c (editor_getline): Don't return the original
3697 string as result, as it will be released by lexer once it has done
3700 2008-08-01 Robert Millan <rmh@aybabtu.com>
3702 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
3703 within menuentries, not before them.
3704 util/grub.d/10_hurd.in: Likewise.
3706 2008-08-01 Bean <bean123ch@gmail.com>
3708 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
3709 (bufio_mod_SOURCES): New macro.
3710 (bufio_mod_CFLAGS): Likewise.
3711 (bufio_mod_LDFLAGS): Likewise.
3713 * include/grub/bufio.h: New file.
3715 * io/bufio.c: Likewise.
3717 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
3718 (grub_video_reader_png): Use grub_buffile_open to open file.
3720 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
3721 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
3723 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
3724 (grub_video_reader_tga): Use grub_buffile_open to open file.
3726 * font/manager.c: Include <grub/bufio.h>.
3727 (add_font): Use grub_buffile_open to open file.
3729 2008-07-31 Robert Millan <rmh@aybabtu.com>
3731 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
3732 ELF segments, use a macro for arbitrarily accessing any of them instead
3733 of preparing a pointer that allows access to one at a time.
3734 (grub_multiboot_load_elf64): Likewise.
3736 2008-07-31 Bean <bean123ch@gmail.com>
3738 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
3739 GRUB_KERNEL_MACHINE_DATA_END.
3741 2008-07-30 Robert Millan <rmh@aybabtu.com>
3743 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
3744 Increase from 0x50 to 0x60.
3745 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
3746 use UUIDs to identify the root drive for them. If that's not
3748 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
3749 check, for cross-disk installs.
3751 2008-07-30 Robert Millan <rmh@aybabtu.com>
3753 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
3754 is non-empty, use it to set the `prefix' environment variable instead
3755 of the usual approach.
3756 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
3757 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
3758 environment variable instead of dummy make_install_device().
3760 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
3761 (start): Insert a data section, with `grub_prefix' variable.
3762 * kern/i386/linuxbios/startup.S: Likewise.
3764 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
3765 New variable reference.
3766 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
3767 New macro. Defines offset of `grub_prefix' within startup.S (relative
3769 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
3770 section within startup.S (relative to `start').
3771 * include/grub/i386/coreboot/kernel.h: Likewise.
3773 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3774 Overwrite grub_prefix with its contents, at the beginning of the
3776 (main): Understand -p|--prefix.
3778 2008-07-30 Robert Millan <rmh@aybabtu.com>
3780 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3782 2008-07-30 Robert Millan <rmh@aybabtu.com>
3784 * term/i386/pc/vga_text.c (grub_console_cls): Use
3785 grub_console_gotoxy() to go back to beginning of the screen.
3786 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3788 2008-07-29 Christian Franke <franke@computer.org>
3790 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3791 Add conversion of emulated mount points on Cygwin.
3793 2008-07-29 Christian Franke <franke@computer.org>
3795 * util/update-grub.in: Add a check for admin
3797 Remove old `grub.cfg.new' before creation.
3798 Add `-f' to `mv' to handle the different filesystem
3799 semantics of Windows.
3801 2008-07-29 Bean <bean123ch@gmail.com>
3803 * normal/main.c (get_line): Fix buffer overflow bug.
3805 2008-07-28 Robert Millan <rmh@aybabtu.com>
3807 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3808 (struct grub_apple_header): New struct. Describes the layout of
3810 (apple_partition_map_iterate): Check the header magic as well as the
3811 partition magic (which was already being checked).
3813 2008-07-28 Pavel Roskin <proski@gnu.org>
3815 * genmk.rb: Add a warning to the beginning of the output that
3816 it's a generated file and should not be edited.
3818 2008-07-28 Robert Millan <rmh@aybabtu.com>
3820 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3821 with the same number are found, just use issue a warning with
3822 grub_dprintf(), as this error has been reported to be non-fatal.
3824 2008-07-27 Robert Millan <rmh@aybabtu.com>
3826 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3829 2008-07-27 Bean <bean123ch@gmail.com>
3831 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3832 (grub_fat_find_dir): Ignore case when comparing filename.
3834 2008-07-27 Bean <bean123ch@gmail.com>
3836 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3837 smallino, as it's more descriptive, and i8count can be confused with
3838 the other field count.
3839 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3842 2008-07-27 Bean <bean123ch@gmail.com>
3844 * commands/crc.c: New file.
3846 * lib/crc.c: Likewise.
3848 * include/grub/lib/crc.h: Likewise.
3850 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3852 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3853 (hexdump): Move this function to ...
3855 * lib/hexdump.c: ... here.
3857 * include/grub/hexdump.h: Renamed to ...
3859 * include/grub/lib/hexdump.h: ... this.
3861 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3863 * util/grub-editenv.c: Likewise.
3865 * include/envblk.h: Renamed to ...
3867 * include/lib/envblk.h: ... this.
3869 * util/envblk.c: Renamed to ...
3871 * lib/envblk.c: ... this.
3873 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3875 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3876 (pkglib_MODULES): Add crc.mod.
3877 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3878 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3879 (crc_mod_SOURCES): New macro.
3880 (crc_mod_CFLAGS): Likewise.
3881 (crc_mod_LDFLAGS): Likewise.
3883 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3885 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3887 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3889 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3891 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3893 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
3895 * commands/help.c: Include <grub/term.h>.
3896 (TERM_WIDTH): Removed. Updated all users.
3898 2008-07-27 Pavel Roskin <proski@gnu.org>
3900 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3901 spurious warnings about a comment within a comment.
3903 2008-07-25 Robert Millan <rmh@aybabtu.com>
3905 * util/getroot.c (find_root_device): Skip devices that match
3906 /dev/dm-[0-9]. This lets the real device be found for any type of
3907 abstraction (LVM, EVMS, RAID..).
3908 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3909 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3910 device is found first, find_root_device() will now skip it.
3912 2008-07-24 Pavel Roskin <proski@gnu.org>
3914 * include/grub/types.h: Use __builtin_bswap32() and
3915 __builtin_bswap64() with gcc 4.3 and newer.
3917 2008-07-24 Christian Franke <franke@computer.org>
3919 * util/i386/pc/grub-install.in: If `--debug' is specified,
3920 pass `--verbose' to grub-setup.
3921 Abort script if make_system_path_relative_to_its_root() fails.
3923 2008-07-24 Bean <bean123ch@gmail.com>
3925 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3926 variable `target_platform' should be `platform'.
3928 2008-07-24 Bean <bean123ch@gmail.com>
3930 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
3931 (grub_png_init_fixed_block): New function.
3932 (grub_png_decode_image_data): Handle fixed huffman code compression.
3934 2008-07-24 Bean <bean123ch@gmail.com>
3936 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3937 (grub_pe2elf_SOURCES): New macro.
3938 (CLEANFILES): Add grub-pe2elf.
3940 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3941 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3942 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3943 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3944 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3945 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3946 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3947 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3948 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3949 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3950 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3951 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3952 (GRUB_PE32_DT_FUNCTION): Likewise.
3953 (GRUB_PE32_REL_I386_DIR32): Likewise.
3954 (GRUB_PE32_REL_I386_REL32): Likewise.
3955 (grub_pe32_symbol): New structure.
3956 (grub_pe32_reloc): Likewise.
3958 * util/grub-pe2elf.c: New file.
3960 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3961 start symbol in non pc platform.
3963 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3965 The following patches are from Christian Franke.
3967 * include/grub/dl.h: Remove .previous, gas supports this only
3970 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3971 Remove .type, gas supports this only for ELF format.
3973 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3974 nullbytes in symbol table. This fixes an infinite loop if table is
3977 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3978 TARGET_IMG_LDFLAGS and EXEEXT.
3980 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3981 TARGET_IMG_LDFLAGS_AC.
3982 (grub_CHECK_STACK_ARG_PROBE): New function.
3984 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3986 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3988 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3989 to set TARGET_IMG_LD* accordingly.
3990 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3991 Add call to grub_CHECK_STACK_ARG_PROBE.
3992 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3994 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3996 * genmk.rb: Add EXEEXT to CLEANFILES.
3998 2008-07-23 Robert Millan <rmh@aybabtu.com>
4000 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4001 define the codes for arrows and lines used for the menu).
4002 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4005 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4006 fonts, because the latter are too slow.
4008 2008-07-21 Bean <bean123ch@gmail.com>
4010 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4011 a20. Run keyboard test last, as it will cause macbook to halt.
4013 2008-07-18 Pavel Roskin <proski@gnu.org>
4015 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4016 load foreign architecture modules correctly anyway. Keep
4017 support for loading host architecture modules, whether we
4018 compile them or not.
4020 2008-07-17 Pavel Roskin <proski@gnu.org>
4022 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4023 change target_cpu. The compiler default can mismatch target_cpu
4026 * disk/efi/efidisk.c: Fix format warnings on x86_64.
4027 * kern/efi/efi.c: Likewise.
4029 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
4030 target compiler is functional.
4031 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4034 * configure.ac: Default to efi platform for x86_64-apple. Allow
4035 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
4036 adjustments from the rest, only do them if target is not
4037 explicitly given. Merge other adjustments with the final sanity
4038 check. Remove an extraneous check for supported CPU. Be
4039 specific which CPU and which platform is not supported.
4041 * configure.ac: Default to pc platform for x86_64.
4043 2008-07-17 Robert Millan <rmh@aybabtu.com>
4045 Partial LinuxBIOS -> Coreboot rename.
4047 * conf/i386-linuxbios.rmk: Renamed to ...
4048 * conf/i386-coreboot.rmk: ... this.
4049 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4050 * configure.ac: Accept "coreboot" as input platform (but maintain
4051 compatibility with "linuxbios").
4052 * include/grub/i386/linuxbios: Renamed to ...
4053 * include/grub/i386/coreboot: ... this.
4055 2008-07-17 Bean <bean123ch@gmail.com>
4057 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
4058 (appleldr_mod_SOURCE): New variable.
4059 (appleldr_mod_CFLAGS): Likewise.
4060 (appleldr_mod_LDFLAGS): Likewise.
4061 (pci_mod_SOURCES): Likewise.
4062 (pci_mod_CFLAGS): Likewise.
4063 (pci_mod_LDFLAGS): Likewise.
4064 (lspci_mod_SOURCES): Likewise.
4065 (lspci_mod_CFLAGS): Likewise.
4066 (lspci_mod_LDFLAGS): Likewise.
4068 * conf/x86_64-efi.rmk: New file.
4070 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4072 (grub_efidisk_write): Likewise.
4074 * include/efi/api.h (efi_call_0): New macro.
4075 (efi_call_1): Likewise.
4076 (efi_call_2): Likewise.
4077 (efi_call_3): Likewise.
4078 (efi_call_4): Likewise.
4079 (efi_call_5): Likewise.
4080 (efi_call_6): Likewise.
4082 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4083 grub_rescue_cmd_chainloader.
4085 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4086 (grub_pe32_optional_header): Change some fields based on i386 or
4088 (GRUB_PE32_PE32_MAGIC): Likewise.
4090 * include/grub/efi/uga_draw.h: New file.
4092 * include/grub/elf.h (STN_ABS): New constant.
4093 (R_X86_64_NONE): Relocation constant for x86_64.
4094 (R_X86_64_64): Likewise.
4095 (R_X86_64_PC32): Likewise.
4096 (R_X86_64_GOT32): Likewise.
4097 (R_X86_64_PLT32): Likewise.
4098 (R_X86_64_COPY): Likewise.
4099 (R_X86_64_GLOB_DAT): Likewise.
4100 (R_X86_64_JUMP_SLOT): Likewise.
4101 (R_X86_64_RELATIVE): Likewise.
4102 (R_X86_64_GOTPCREL): Likewise.
4103 (R_X86_64_32): Likewise.
4104 (R_X86_64_32S): Likewise.
4105 (R_X86_64_16): Likewise.
4106 (R_X86_64_PC16): Likewise.
4107 (R_X86_64_8): Likewise.
4108 (R_X86_64_PC8): Likewise.
4110 * include/grub/i386/efi/pci.h: New file.
4112 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4113 Change it value based on platform.
4114 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4115 (GRUB_E820_RAM): Likewise.
4116 (GRUB_E820_RESERVED): Likewise.
4117 (GRUB_E820_ACPI): Likewise.
4118 (GRUB_E820_NVS): Likewise.
4119 (GRUB_E820_EXEC_CODE): Likewise.
4120 (GRUB_E820_MAX_ENTRY): Likewise.
4121 (grub_e820_mmap): New structure.
4122 (linux_kernel_header): Change the efi field according to different
4123 kernel version, also field from linux_kernel_header.
4125 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4127 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4128 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4129 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4130 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4131 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4132 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4133 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4134 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4135 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4136 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4138 * include/grub/x86_64/efi/kernel.h: New file.
4140 * include/grub/x86_64/efi/loader.h: Likewise.
4142 * include/grub/x86_64/efi/machine.h: Likewise.
4144 * include/grub/x86_64/efi/pci.h: Likewise.
4146 * include/grub/x86_64/efi/time.h: Likewise.
4148 * include/grub/x86_64/linux.h: Likewise.
4150 * include/grub/x86_64/setjmp.h: Likewise.
4152 * include/grub/x86_64/time.h: Likewise.
4154 * include/grub/x86_64/types.h: Likewise.
4156 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4157 GRUB_TARGET_SIZEOF_VOID_P.
4159 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4160 (grub_efi_locate_handle): Likewise.
4161 (grub_efi_open_protocol): Likewise.
4162 (grub_efi_set_text_mode): Likewise.
4163 (grub_efi_stall): Likewise.
4164 (grub_exit): Likewise.
4165 (grub_reboot): Likewise.
4166 (grub_halt): Likewise.
4167 (grub_efi_exit_boot_services): Likewise.
4168 (grub_get_rtc): Likewise.
4170 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4171 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4172 (grub_efi_allocate_pages): Wrap efi calls.
4173 (grub_efi_free_pages): Wrap efi calls.
4174 (grub_efi_get_memory_map): Wrap efi calls.
4176 * kern/x86_64/dl.c: New file.
4178 * kern/x86_64/efi/callwrap.S: Likewise.
4180 * kern/x86_64/efi/startup.S: Likewise.
4182 * loader/efi/appleloader.c: Likewise.
4184 * loader/efi/chainloader.c (cmdline): New variable.
4185 (grub_chainloader_unload): Wrap efi calls.
4186 (grub_chainloader_boot): Likewise.
4187 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4190 * loader/efi/chainloader_normal.c (chainloader_command):
4191 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4194 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4196 (grub_e820_add_region): New function.
4197 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4199 (grub_find_video_card): New function.
4200 (grub_linux_setup_video): New function.
4201 (grub_rescue_cmd_linux): Probe for video information.
4203 * normal/x86_64/setjmp.S: New file.
4205 * term/efi/console.c (map_char): New function.
4206 (grub_console_putchar): Map unicode char.
4207 (grub_console_checkkey): Wrap efi calls.
4208 (grub_console_getkey): Likewise.
4209 (grub_console_getwh): Likewise.
4210 (grub_console_gotoxy): Likewise.
4211 (grub_console_cls): Likewise.
4212 (grub_console_setcolorstate): Likewise.
4213 (grub_console_setcursor): Likewise.
4215 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4217 2008-07-16 Pavel Roskin <proski@gnu.org>
4219 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4222 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4223 pointer, not an integer. This fixes a warning and prevents
4224 precision loss on 64-bit systems.
4225 (relocate_addresses): Remove unneeded cast.
4227 2008-07-15 Pavel Roskin <proski@gnu.org>
4229 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4231 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4233 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4234 Fix comparison between signed and unsigned.
4236 * include/grub/i386/ieee1275/console.h: Declare
4237 grub_console_init() and grub_console_fini().
4239 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4240 It's empty and unused.
4242 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4243 beginning to avoid warnings with some compilers.
4245 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4246 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4248 2008-07-14 Pavel Roskin <proski@gnu.org>
4250 * kern/env.c (grub_register_variable_hook): Don't copy empty
4251 string, it leaks memory. Pass "" to grub_env_set(), it should
4252 handle constant strings.
4254 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4255 * commands/cmp.c (grub_cmd_cmp): Likewise.
4256 * kern/dl.c (grub_dl_flush_cache): Likewise.
4257 (grub_dl_load_core): Likewise.
4258 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4259 (grub_elf64_load_phdrs): Likewise.
4261 2008-07-13 Pavel Roskin <proski@gnu.org>
4263 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4264 between signed and unsigned.
4265 (LzmaEnc_Finish): Fix warning about an unused parameter.
4267 2008-07-13 Bean <bean123ch@gmail.com>
4269 * Makefile.in (enable_lzo): New rule.
4271 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
4273 * configure.ac (ENABLE_LZO): New option --enable-lzo.
4275 * boot/i386/pc/lnxboot.S: #include <config.h>.
4277 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
4278 its value according to the compression algorithm used, lzo or lzma.
4280 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
4281 compression algorithm according to configure macro.
4283 * kern/i386/pc/startup.S (codestart): Likewise.
4285 * kern/i386/pc/lzma_decode.S: New file.
4287 * include/grub/lib/LzFind.h: Likewise.
4289 * include/grub/lib/LzHash.h: Likewise.
4291 * include/grub/lib/LzmaDec.h: Likewise.
4293 * include/grub/lib/LzmaEnc.h: Likewise.
4295 * include/grub/lib/LzmaTypes.h: Likewise.
4297 * lib/LzFind.c: Likewise.
4299 * lib/LzmaDec.c: Likewise.
4301 * lib/LzmaEnc.c: Likewise.
4303 2008-07-13 Bean <bean123ch@gmail.com>
4305 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
4306 (grub_ext4_extent_header): New structure.
4307 (grub_ext4_extent): Likewise.
4308 (grub_ext4_extent_idx): Likewise.
4309 (grub_ext4_find_leaf): New function.
4310 (grub_ext2_read_block): Handle extents.
4312 2008-07-12 Robert Millan <rmh@aybabtu.com>
4314 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
4316 2008-07-11 Robert Millan <rmh@aybabtu.com>
4318 * util/grub.d/40_custom.in: New file. Example on how to add custom
4319 entries to /etc/grub.d.
4320 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
4321 40_custom (implicitly, by merging all the grub.d rules).
4323 2008-07-11 Pavel Roskin <proski@gnu.org>
4325 * commands/read.c (grub_getline): Fix invalid memory access.
4326 Don't add newline to the variable value.
4328 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4329 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4330 (serial_hw_get_port): Check validity of the port number.
4331 (grub_cmd_serial): Check return value of serial_hw_get_port().
4333 2008-07-07 Pavel Roskin <proski@gnu.org>
4335 * boot/i386/pc/diskboot.S (notification_string): Replace
4336 "Loading kernel" with just "loading". This is shorter, less
4337 confusing and saves a few bytes for possible future changes.
4339 2008-07-05 Pavel Roskin <proski@gnu.org>
4341 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4342 size for ATAPI devices, they are undefined. Output sector
4343 number in decimal form.
4345 * disk/ata.c: Use named constants for status bits.
4347 2008-07-04 Pavel Roskin <proski@gnu.org>
4349 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4350 grub_addr_t before casting it to the void pointer to fix a
4351 warning. Non-addressable regions are discarded earlier.
4352 (grub_arch_modules_addr): Cast _end to grub_addr_t.
4353 * kern/i386/linuxbios/table.c: Include grub/misc.h.
4354 (check_signature): Don't shadow table_header.
4355 (grub_linuxbios_table_iterate): Cast numeric constants to
4356 grub_linuxbios_table_header_t.
4357 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4360 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4363 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4364 pointer, which can cause warnings. Support 64-bit addresses.
4366 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4367 of sizeof(long). This fixes PowerPC image generation on x86_64.
4369 2008-07-04 Robert Millan <rmh@aybabtu.com>
4371 This fixes a performance issue when pc & gpt partmap iterators
4372 didn't abort iteration even after our hook found what it was
4373 looking for (often causing expensive probes of non-existent drives).
4375 Some callers relied on previous buggy behaviour, since they would
4376 raise an error when their own hooks caused early abortion of its
4379 * kern/device.c (grub_device_open): Improve error message.
4380 * disk/lvm.c (grub_lvm_open): Likewise.
4381 * disk/raid.c (grub_raid_open): Likewise.
4383 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4384 when hook requests it, independently of grub_errno.
4385 (pc_partition_map_probe): Do not fail when find_func() caused
4386 early abortion of pc_partition_map_iterate().
4388 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4389 when hook requests it, independently of grub_errno.
4390 (gpt_partition_map_probe): Do not fail when find_func() caused
4391 early abortion of gpt_partition_map_iterate().
4393 * kern/partition.c (grub_partition_iterate): Abort parent iteration
4394 when hook requests it, independently of grub_errno. Do not fail when
4395 part_map_iterate_hook() caused early abortion of p->iterate().
4397 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4398 when grub_partition_iterate() returned with non-zero.
4400 2008-07-03 Pavel Roskin <proski@gnu.org>
4402 * disk/ata.c (grub_ata_pio_write): Check status before writing,
4403 like we do in grub_ata_pio_read().
4404 (grub_ata_readwrite): Always write individual sectors. Fix the
4405 sector count for the remainder.
4406 (grub_ata_write): Enable writing to ATA devices. Correctly
4407 report error for ATAPI devices.
4409 2008-07-02 Pavel Roskin <proski@gnu.org>
4411 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4414 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4415 for every read sector, we already increment it for the whole
4416 batch. This fixes reading more than 256 sectors at once.
4418 * util/grub-editenv.c (cmd_info): Cast argument to long
4419 explicitly. ptrdiff_t reduces to int on i386.
4421 * util/grub-editenv.c (main): Be specific which parameter is
4424 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4425 (memdisk): Make memdisk_orig_addr a pointer.
4427 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4428 for file offsets, use grub_off_t instead. Fix printf format
4431 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4432 there. Real unexpected warnings should not drown in the noise
4433 about known problems.
4435 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4436 grub_disk_addr_t for memory addresses.
4438 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4439 explicitly to fix a warning.
4441 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4443 * Makefile.in (MODULE_LDFLAGS): New variable.
4444 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
4445 the linker accepts --build-id=none.
4446 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
4448 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4450 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4451 those in Linux XFS code. Provide a way to access 64-bit parent
4453 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
4454 the end of struct grub_xfs_dir_header.
4456 2008-07-02 Bean <bean123ch@gmail.com>
4458 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4459 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4460 and GRUB_IEEE1275_FLAG_NO_ANSI.
4462 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4463 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4464 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4466 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4467 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4469 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4470 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4472 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4473 esc sequence on non ANSI terminal.
4474 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4476 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4479 2008-07-02 Bean <bean123ch@gmail.com>
4481 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4482 (grub_editenv_SOURCES): New variable.
4483 (pkglib_MODULES): Add loadenv.mod.
4484 (loadenv_mod_SOURCES): New variable.
4485 (loadenv_mod_CFLAGS): Likewise.
4486 (loadenv_mod_LDFLAGS): Likewise.
4488 * include/grub/envblk.h: New file.
4490 * util/envblk.c: New file.
4492 * util/grub-editenv.c: New file.
4494 * commands/loadenv.c: New file.
4496 2008-07-01 Pavel Roskin <proski@gnu.org>
4498 * include/multiboot2.h (struct multiboot_tag_module): Use char,
4499 not unsigned char. This fixes warnings and is consistent with
4502 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4504 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4506 * term/tparm.c (analyze): Always set *popcount.
4508 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4509 cast to fix a warning.
4511 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4512 cast to suppress a warning.
4514 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4515 grub_fshelp_read_file() expects.
4517 * fs/fat.c: Fix UUID calculation on big-endian systems. We
4518 write uuid as a 32-bit value in CPU byte order, so declare and
4521 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4522 long if the format specifier expects it.
4523 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4524 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4525 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4526 long to fix a warning.
4527 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4528 grub_dprintf() arguments to fix warnings.
4530 2008-06-30 Pavel Roskin <proski@gnu.org>
4532 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4533 install_bsd_part immediately before core.img is embedded or
4534 modified on disk. This fixes core.img verification if core.img
4537 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4538 core_path to calculate the blocklist.
4539 Patch from Javier MartÃn <lordhabbit@gmail.com>
4541 2008-06-29 Robert Millan <rmh@aybabtu.com>
4543 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
4544 block to disk block.
4545 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4546 Patch from Niels Böhm <bitbucket@arcor.de>
4548 2008-06-29 Robert Millan <rmh@aybabtu.com>
4550 * util/update-grub_lib.in (font_path): Search for fonts in
4551 /boot/grub first, which is more likely to be readable (we aren't
4552 deciding where fonts live, just looking for them).
4554 2008-06-26 Pavel Roskin <proski@gnu.org>
4556 * util/biosdisk.c (read_device_map): Don't leave dead map
4557 entries for devices failing stat() check.
4559 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4560 core_path_dev for the core.img path on the target device.
4562 2008-06-26 Robert Millan <rmh@aybabtu.com>
4564 * disk/fs_uuid.c: New file.
4565 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4566 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4567 (fs_uuid_mod_LDFLAGS): New variables.
4568 * include/grub/disk.h (grub_disk_dev_id): Add
4569 `GRUB_DISK_DEVICE_UUID_ID'.
4570 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4571 implement iterate().
4573 2008-06-26 Robert Millan <rmh@aybabtu.com>
4575 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4576 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4577 Linux image includes no initrd.
4579 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
4581 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4582 call to resolve the core image location that effectively appended the
4585 2008-06-21 Robert Millan <rmh@aybabtu.com>
4587 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4590 * util/grub.d/10_hurd.in: ... to here ...
4591 * util/grub.d/10_linux.in: ... and here.
4593 2008-06-19 Robert Millan <rmh@aybabtu.com>
4595 * kern/main.c (grub_main): Export `prefix' variable immediately
4596 after it has been set by grub_machine_set_prefix().
4598 2008-06-19 Robert Millan <rmh@aybabtu.com>
4600 * commands/search.c (search_label, search_fs_uuid, search_file): Print
4601 search result when not saving to variable, not the other way around.
4602 When saving to variable, abort iteration as soon as a match is found.
4604 2008-06-19 Robert Millan <rmh@aybabtu.com>
4606 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4607 check for partition that provides /boot/grub. Its logic is flawed,
4608 as it prevents prepare_grub_to_access_device() from being called
4611 2008-06-19 Robert Millan <rmh@aybabtu.com>
4613 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4614 "insmod" command directly when abstraction modules are needed,
4615 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4616 since it had already been processed).
4618 2008-06-19 Pavel Roskin <proski@gnu.org>
4620 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4621 changed. This is needed in case GRUB_LIBDIR changes.
4622 * conf/i386-ieee1275.rmk: Likewise.
4623 * conf/i386-linuxbios.rmk: Likewise.
4624 * conf/i386-pc.rmk: Likewise.
4625 * conf/powerpc-ieee1275.rmk: Likewise.
4627 2008-06-18 Pavel Roskin <proski@gnu.org>
4629 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
4630 kernel_elf_symlist.c to symlist.c for consistency with other
4631 architectures. Update all users.
4632 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4634 2008-06-18 Robert Millan <rmh@aybabtu.com>
4636 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
4639 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
4640 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
4641 a RAID device, run setup() for all members independently on whether
4642 LVM abstraction is being used.
4643 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
4644 If grub-mkimage has set `*install_dos_part == -2', don't override this
4646 Perform *install_dos_part adjustments independently on whether
4647 we're embedding or not.
4648 Clarify error message when image is too big for embedding.
4649 Remove duplicate *install_dos_part stanza.
4651 2008-06-17 Robert Millan <rmh@aybabtu.com>
4653 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
4654 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
4656 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
4657 values in grub_ofconsole_normal_color and
4658 grub_ofconsole_highlight_color (they're not directly related to
4659 background and foreground).
4660 (grub_ofconsole_setcolorstate): Extract background and foreground
4661 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
4663 2008-06-17 Robert Millan <rmh@aybabtu.com>
4665 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
4666 /boot/grub for the check in last commit, not /boot (they could be
4667 different partitions).
4669 2008-06-16 Robert Millan <rmh@aybabtu.com>
4671 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
4672 asked to setup access for the same partition that provides /boot,
4673 don't bother using UUIDs since our root already has the value we
4676 2008-06-16 Robert Millan <rmh@aybabtu.com>
4678 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
4680 Patch from Sven Mueller <sven@debian.org>.
4682 2008-06-16 Robert Millan <rmh@aybabtu.com>
4684 * util/update-grub.in: Check for $EUID instead of $UID.
4685 Reported by Vincent Zweije.
4687 2008-06-16 Bean <bean123ch@gmail.com>
4689 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
4690 (grub_ext2_read_block): Likewise.
4691 (grub_ext2_read_inode): Likewise.
4692 (grub_ext2_mount): Likewise.
4693 (grub_ext2_close): Likewise.
4694 (grub_ext3_get_journal): Removed.
4696 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
4697 (grub_reiserfs_read_symlink): Likewise.
4698 (grub_reiserfs_mount): Likewise.
4699 (grub_reiserfs_open): Likewise.
4700 (grub_reiserfs_read): Likewise.
4701 (grub_reiserfs_close): Likewise.
4702 (grub_reiserfs_get_journal): Removed.
4704 * fs/fshelp.c (grub_fshelp_read): Removed.
4705 (grub_fshelp_map_block): Likewise.
4707 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
4708 (grub_fshelp_journal): Likewise.
4709 (grub_fshelp_read): Likewise.
4710 (grub_fshelp_map_block): Likewise.
4712 2008-06-16 Pavel Roskin <proski@gnu.org>
4714 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
4715 floating point anymore.
4716 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
4718 2008-06-15 Pavel Roskin <proski@gnu.org>
4720 * commands/ls.c (grub_ls_list_files): Use integer calculations
4721 for human readable format, avoid floating point use.
4722 * kern/misc.c (grub_ftoa): Remove.
4723 (grub_vsprintf): Remove floating point support.
4725 2008-06-15 Robert Millan <rmh@aybabtu.com>
4727 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
4729 Reported by Max Vozeler.
4731 2008-06-15 Robert Millan <rmh@aybabtu.com>
4733 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
4734 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
4736 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
4737 the beginning of the prefix.
4739 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
4740 It is assumed that if we have a memdisk, grub-mkimage has set
4741 grub_prefix to include the "(memdisk)" drive in it.
4743 2008-06-15 Robert Millan <rmh@aybabtu.com>
4745 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
4746 Initialize keyboard controller after registering the terminal, so that
4747 grub_printf() can be called from grub_keyboard_controller_init().
4749 2008-06-15 Robert Millan <rmh@aybabtu.com>
4751 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
4752 extent-btree which is written as big endian on disk.
4753 Reported by Alain Greppin <al@chilibi.org>.
4755 2008-06-14 Robert Millan <rmh@aybabtu.com>
4757 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
4758 * util/i386/pc/grub-install.in (modules): Likewise.
4760 2008-06-13 Pavel Roskin <proski@gnu.org>
4762 * commands/ls.c (grub_ls_list_files): Fix format warnings.
4764 2008-06-13 Bean <bean123ch@gmail.com>
4766 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
4768 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
4770 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
4771 to indicate sparse block.
4773 2008-06-12 Pavel Roskin <proski@gnu.org>
4775 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4776 number, grub_fshelp_read() does it for us.
4778 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4779 linear disk read with journal translation.
4780 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4781 * include/grub/fshelp.h: Declare grub_fshelp_read().
4783 2008-06-09 Pavel Roskin <proski@gnu.org>
4785 * fs/minix.c (grub_minix_mount): Handle error reading
4788 2008-06-08 Robert Millan <rmh@aybabtu.com>
4790 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4791 don't append the RAID prefix afterwards.
4792 Reported by Clint Adams.
4794 2008-06-08 Robert Millan <rmh@aybabtu.com>
4796 Based on description from Pavel:
4797 * kern/disk.c (grub_disk_check_range): Rename to ...
4798 (grub_disk_adjust_range): ... this. Add a comment explaining the
4799 tasks performed by this function.
4801 2008-06-08 Robert Millan <rmh@aybabtu.com>
4803 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4804 `num_serial' (for consistency with other variables).
4805 (struct grub_ntfs_data): Add `uuid' member.
4806 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4807 (grub_ntfs_uuid): New function.
4808 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4810 2008-06-07 Pavel Roskin <proski@gnu.org>
4812 * util/biosdisk.c (open_device): Revert last change to the
4813 function, it broke installation. The sector needs to be
4814 different dependent on which device is opened.
4816 2008-06-06 Robert Millan <rmh@aybabtu.com>
4818 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4819 rest of GRUB, and breakage doesn't happen if its value were modified.
4821 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4822 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4823 a constant (same value).
4824 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4825 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4827 2008-06-06 Robert Millan <rmh@aybabtu.com>
4829 * util/biosdisk.c (open_device): Do not modify sector offset when
4830 accessing a partition. kern/disk.c already handles this for us.
4832 2008-06-06 Robert Millan <rmh@aybabtu.com>
4834 * util/grub-emu.c (grub_machine_init): Move code in this function from
4836 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4837 segfault in case grub_printf() is called).
4839 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4840 grub_probe. Update all users not to explicitly add it again.
4841 (grub_device): New variable; contains corresponding device for grubdir.
4842 (fs_module, partmap_module, devabstraction_module): Pass
4843 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4846 2008-06-05 Robert Millan <rmh@aybabtu.com>
4848 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4849 is found, print it (same layout as with labels).
4851 2008-06-04 Robert Millan <rmh@aybabtu.com>
4853 * util/biosdisk.c (get_drive): Rename to ...
4854 (find_grub_drive): ... this. Update all users.
4856 (get_os_disk): Rename to ...
4857 (convert_system_partition_to_system_disk): ... this. Update all users.
4859 (find_drive): Rename to ...
4860 (find_system_device): ... this. Update all users.
4862 2008-06-04 Robert Millan <rmh@aybabtu.com>
4864 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4865 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4866 (make_device_map): Likewise.
4868 2008-06-01 Robert Millan <rmh@aybabtu.com>
4870 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4871 before dereferencing it.
4873 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4874 union with fat12/fat16-specific ones. Add some new fields, including
4875 `num_serial' for both versions.
4876 (struct grub_fat_data): Add `uuid' member.
4877 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4878 names. Initialize `data->uuid' using `num_serial'.
4879 (grub_fat_uuid): New function.
4880 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4882 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4883 (grub_reiserfs_uuid): New function.
4884 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4887 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4888 (grub_xfs_uuid): New function.
4889 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4891 2008-06-01 Robert Millan <rmh@aybabtu.com>
4893 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4894 code that is backward compatible with pre-uuid search command.
4896 2008-05-31 Robert Millan <rmh@aybabtu.com>
4898 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4899 floppies after everything else, to ensure floppy drive isn't accessed
4900 unnecessarily (patch from Bean).
4902 2008-05-31 Robert Millan <rmh@aybabtu.com>
4904 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4905 not print device names when we were asked to set a variable.
4907 2008-05-31 Robert Millan <rmh@aybabtu.com>
4909 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4910 using "cursor-on" and "cursor-off" commands (understood at least by
4911 the Open Firmware flavour on OLPC).
4913 2008-05-31 Michael Gorven <michael@gorven.za.net>
4915 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4916 on and off sequences.
4918 2008-05-31 Robert Millan <rmh@aybabtu.com>
4920 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4921 * util/update-grub.in: Likewise.
4923 2008-05-30 Pavel Roskin <proski@gnu.org>
4925 * util/biosdisk.c (linux_find_partition): Simplify logic and
4926 make the code more universal. Keep special processing for
4927 devfs, but use a simple rule for all other devices. If the
4928 device ends with a number, append 'p' and the partition number.
4929 Otherwise, append only the partition number.
4931 2008-05-30 Robert Millan <rmh@aybabtu.com>
4933 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4934 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4935 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4936 the `root' parameter to Linux.
4938 2008-05-30 Robert Millan <rmh@aybabtu.com>
4940 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4941 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4942 --fs_uuid with --fs-uuid.
4943 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4944 all filesystems support them).
4946 2008-05-30 Robert Millan <rmh@aybabtu.com>
4948 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
4949 grub_printf() flags, since we're printing in units of 2 bytes.
4951 2008-05-30 Robert Millan <rmh@aybabtu.com>
4953 * util/grub.d/00_header.in: Remove obsolete comment referencing
4954 convert_system_path_to_grub_path().
4955 * util/update-grub.in: Likewise.
4956 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4957 (convert_system_path_to_grub_path): Add a warning message explaining
4958 that this function is deprecated. Rely on is_path_readable_by_grub()
4959 for the readability checks.
4960 (font_path): Use is_path_readable_by_grub() for the readability
4961 check rather than convert_system_path_to_grub_path().
4963 2008-05-30 Robert Millan <rmh@aybabtu.com>
4965 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4966 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4967 converting it first.
4968 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4969 grub.cfg for access to font file, and afterwards call it again to set
4972 2008-05-30 Robert Millan <rmh@aybabtu.com>
4974 * commands/search.c (options): Add --fs_uuid option.
4975 (search_fs_uuid): New function.
4976 (grub_cmd_search): Fix --set argument passing.
4977 Use search_fs_uuid() when requested via --fs_uuid.
4978 (grub_search_init): Update help message.
4979 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4980 and redeclare it as an array of 16-bit words.
4981 (grub_ext2_uuid): New function.
4982 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4983 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4984 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4985 (GRUB_DEVICE_BOOT_UUID): New variables.
4986 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4987 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4989 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4990 just assume `root' variable has the right value.
4991 * util/grub.d/10_linux.in: Likewise.
4992 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4994 (main): Recognise `-t fs_uuid' argument.
4996 2008-05-30 Robert Millan <rmh@aybabtu.com>
4998 * util/biosdisk.c (map): Redefine structure to hold information
4999 about GRUB drive name.
5000 (get_drive): Reimplement without assuming (and verifying) BIOS-like
5002 (call_hook): Remove.
5003 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5004 member. Assume drive has partitions.
5005 (grub_util_biosdisk_open): Access device names via `.device' struct
5007 (open_device): Likewise.
5008 (find_drive): Likewise.
5009 (read_device_map): Adjust map[] usage to match the new struct
5010 definition. Don't check for duplicates (still possible, but not cheap
5012 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5013 (make_device_name): Remove assumption of BIOS-like drive names.
5015 2008-05-30 Pavel Roskin <proski@gnu.org>
5017 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5018 compiling execute.c doesn't need grub_script.tab.h anymore.
5019 (normal/command.c_DEPENDENCIES): Likewise.
5020 (normal/function.c_DEPENDENCIES): Likewise.
5021 * conf/i386-ieee1275.rmk: Likewise.
5022 * conf/i386-linuxbios.rmk: Likewise.
5023 * conf/i386-pc.rmk: Likewise.
5024 * conf/powerpc-ieee1275.rmk: Likewise.
5025 * conf/sparc64-ieee1275.rmk: Likewise.
5027 2008-05-29 Pavel Roskin <proski@gnu.org>
5029 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5030 when scanning metadata for volume group name.
5032 * include/grub/script.h: Don't include grub_script.tab.h. It's
5033 a generated file, which may only be included from the files with
5034 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
5035 use union YYSTYPE, as the later allows forward declaration.
5036 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5038 2008-05-29 Robert Millan <rmh@aybabtu.com>
5040 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5041 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5042 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5043 (grub_console_checkkey): Add grub_dprintf() call to report unknown
5046 2008-05-29 Robert Millan <rmh@aybabtu.com>
5048 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5049 control key combinations.
5051 2008-05-29 Robert Millan <rmh@aybabtu.com>
5053 * util/powerpc/ieee1275/grub-install.in: Move from here ...
5054 * util/ieee1275/grub-install.in: ... to here.
5055 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5056 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5057 (grub_install_SOURCES): Likewise.
5059 2008-05-29 Robert Millan <rmh@aybabtu.com>
5061 * fs/affs.c: Update copyright year.
5062 * fs/ext2.c: Likewise.
5063 * fs/fshelp.c: Likewise.
5064 * fs/hfsplus.c: Likewise.
5065 * fs/ntfs.c: Likewise.
5066 * fs/xfs.c: Likewise.
5067 * include/grub/fshelp.h: Likewise.
5068 * util/grub-mkdevicemap.c: Likewise.
5070 2008-05-28 Robert Millan <rmh@aybabtu.com>
5072 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5073 might need to be fatfs to support some firmware implementations
5076 2008-05-28 Robert Millan <rmh@aybabtu.com>
5078 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5080 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5081 (make_device_map): Likewise.
5083 2008-05-20 Bean <bean123ch@gmail.com>
5085 * fs/fshelp.c (grub_fshelp_map_block): New function.
5086 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5087 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5089 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5090 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5091 (grub_fshelp_journal): New structure.
5092 (grub_fshelp_map_block): New function prototype.
5093 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5094 (grub_fshelp_map_block): Likewise.
5096 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5097 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5098 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5099 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5100 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5101 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5102 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5103 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5104 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5105 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5106 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5107 (grub_ext2_sblock): New members for journal support.
5108 (grub_ext3_journal_header): New structure.
5109 (grub_ext3_journal_revoke_header): Likewise.
5110 (grub_ext3_journal_block_tag): Likewise.
5111 (grub_ext3_journal_sblock): Likewise.
5112 (grub_fshelp_node): New members logfile and journal.
5113 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5114 grub_fshelp_map_block to get real block number.
5115 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5117 (grub_ext2_read_inode): Likewise.
5118 (grub_ext3_get_journal): New function.
5119 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5120 (grub_ext2_close): Release memory used by journal.
5122 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5123 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5124 (grub_reiserfs_transaction_header): Renamed to
5125 grub_reiserfs_description_block, replace field data with real_blocks.
5126 (grub_reiserfs_commit_block): New structure.
5127 (grub_reiserfs_data): New member journal.
5128 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5130 (grub_reiserfs_read_symlink): Likewise.
5131 (grub_reiserfs_iterate_dir): Likewise.
5132 (grub_reiserfs_open): Likewise.
5133 (grub_reiserfs_read): Likewise.
5134 (grub_reiserfs_get_journal): New function.
5135 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5136 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5137 using grub_reiserfs_get_journal.
5138 (grub_reiserfs_close): Release memory used by journal.
5140 * fs/affs.c (grub_affs_read_block): Change block type to
5141 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5143 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5145 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5147 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5149 * fs/udf.c (grub_udf_read_block): Change block type to
5150 grub_disk_addr_t. Use type cast to avoid warning.
5152 * fs/xfs.c (grub_xfs_read_block): Likewise.
5154 2008-05-16 Christian Franke <franke@computer.org>
5156 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5157 to ensure that break with ESC will always work.
5158 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5159 Remove ESC from keyboard queue.
5161 2008-05-16 Christian Franke <franke@computer.org>
5163 * util/biosdisk.c: [__CYGWIN__] Add includes.
5164 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5165 (get_os_disk): Move variable declarations to OS specific
5166 parts to avoid warning.
5167 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5168 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5169 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5171 * util/getroot.c: [__CYGWIN__] Add includes.
5172 (strip_extra_slashes): Fix "/" case.
5173 [__CYGWIN__] (get_win32_path): New function.
5174 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5175 [__CYGWIN__] (find_root_device): Disable.
5176 [__CYGWIN__] (get_bootsec_serial): New function.
5177 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5178 [__linux__] (grub_guess_root_device): Add early returns to simplify
5180 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5181 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5182 check for Linux only.
5184 2008-05-15 Bean <bean123ch@gmail.com>
5186 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5187 keyboard hang problem in apple's intel mac.
5189 2008-05-09 Robert Millan <rmh@aybabtu.com>
5191 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5193 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5194 (make_device_map): Likewise.
5195 Reported by Aurelien Jarno <aurel32@debian.org>
5197 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
5199 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5200 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5201 (make_device_map): Output entries for xvd type disks.
5203 2008-05-07 Robert Millan <rmh@aybabtu.com>
5205 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5207 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5208 (make_device_map): Likewise.
5209 Reported by Roland Dreier <rdreier@cisco.com>
5211 2008-05-07 Robert Millan <rmh@aybabtu.com>
5213 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5214 grub_strstr() call. Correct a few mistakes in failure path handling.
5216 2008-05-06 Robert Millan <rmh@aybabtu.com>
5218 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5219 Do not print a trailing slash (therefore, the root directory is an
5221 (convert_system_path_to_grub_path): Do not remove trailing slash
5222 from make_system_path_relative_to_its_root() output.
5224 * util/i386/pc/grub-install.in: Add trailing slash to output from
5225 make_system_path_relative_to_its_root().
5227 2008-05-06 Robert Millan <rmh@aybabtu.com>
5229 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5230 ensures that output lines aren't intermangled with those sent to
5231 stderr (via grub_util_info()).
5232 * util/grub-probe.c (grub_refresh): Likewise.
5233 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5235 2008-05-05 Christian Franke <franke@computer.org>
5237 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5238 Add Cygwin device names.
5239 (get_ide_disk_name) [__CYGWIN__]: Likewise.
5240 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5241 (check_device): Return error instead of success on empty name.
5242 (make_device_map): Move label inside linux specific code to
5243 prevent compiler warning.
5245 2008-04-30 Robert Millan <rmh@aybabtu.com>
5247 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5248 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5250 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5252 2008-04-29 Robert Millan <rmh@aybabtu.com>
5254 * docs/grub.cfg: New file (example GRUB configuration).
5256 2008-04-26 Robert Millan <rmh@aybabtu.com>
5258 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
5259 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5260 and `disk/ieee1275/nand.c'.
5262 2008-04-25 Bean <bean123ch@gmail.com>
5264 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5267 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5268 change the buffer size to 4096 for cdrom device.
5270 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
5272 (_linux_mod_SOURCES): New variable.
5273 (_linux_mod_CFLAGS): Likewise.
5274 (_linux_mod_LDFLAGS): Likewise.
5275 (linux_mod_SOURCES): Likewise.
5276 (linux_mod_CFLAGS): Likewise.
5277 (linux_mod_LDFLAGS): Likewise.
5278 (nand_mod_SOURCES): Likewise.
5279 (nand_mod_CFLAGS): Likewise.
5280 (nand_mod_LDFLAGS): Likewise.
5282 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
5283 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
5284 type property. (nand device in olpc don't have this property)
5286 * include/grub/disk.h (grub_disk_dev_id): New macro
5287 GRUB_DISK_DEVICE_NAND_ID.
5289 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
5291 (grub_rescue_cmd_initrd): Likewise.
5293 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
5294 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
5295 ofw_cif_handler and ofw_idt, adjust padding number.
5297 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
5298 GRUB_MACHINE_IEEE1275 is defined.
5300 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
5301 Use NESTED_FUNC_ATTR attribute on the hook parameter.
5303 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
5304 on nested function heap_init.
5305 (grub_upper_mem): New variable for i386-ieee1275.
5306 (grub_get_extended_memory): New function for i386-ieee1275.
5307 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
5309 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
5310 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
5313 * loader/i386/ieee1275/linux.c: New file.
5315 * loader/i386/ieee1275/linux_normal.c: New file.
5317 * disk/ieee1275/nand.c: New file.
5319 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
5321 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
5323 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
5325 2008-04-18 Robert Millan <rmh@aybabtu.com>
5327 Restructures early code path on ieee1275 to unify grub_main() as
5328 the first C function that is executed in every platform.
5330 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5331 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5333 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5334 * kern/ieee1275/cmain.c (cmain): Rename to ...
5335 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5336 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5339 2008-04-18 Robert Millan <rmh@aybabtu.com>
5341 * util/update-grub.in: Fix syntax error when setting
5342 `GRUB_PRELOAD_MODULES'.
5343 Reported by Stephane Chazelas <stephane@artesyncp.com>
5345 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
5347 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5348 section into account, newer toolchains generate unique build ids
5349 * configure.ac: remove the test for --build-id=none acceptance,
5350 we want build ids to be preserved
5351 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5352 far from other sections don't cause the raw binary images grow
5355 2008-04-15 Robert Millan <rmh@aybabtu.com>
5357 * disk/lvm.c: Update copyright year.
5358 * kern/misc.c: Likewise.
5360 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5362 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5363 there is no memory left for physical volume name.
5365 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
5367 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5368 volume name mapping to support bigger than 9 character names properly.
5370 2008-04-13 Robert Millan <rmh@aybabtu.com>
5372 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5373 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5375 2008-04-13 Christian Franke <franke@computer.org>
5377 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5378 to create a floppy emulation boot CD when non emulation mode
5380 Enable Joliet CD filesystem extension.
5382 2008-04-13 Robert Millan <rmh@aybabtu.com>
5384 * kern/misc.c (grub_strncat): Fix off-by-one error.
5385 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5387 * kern/env.c (grub_env_context_close): Clear current context, not
5389 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5391 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5393 2008-04-13 Robert Millan <rmh@aybabtu.com>
5395 Improve robustness when handling LVM.
5397 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5398 (and leave `*p' unmodified).
5399 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5401 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5402 iterating through it.
5403 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5405 (grub_lvm_scan_device): Check the return value (and fail gracefully
5406 when due) on each grub_lvm_getvalue() or grub_strstr() call.
5407 Don't assume `vg->pvs != NULL' when iterating through it.
5409 2008-04-13 Robert Millan <rmh@aybabtu.com>
5411 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5412 * genmk.rb (partmap): New variable.
5413 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5414 (#{partmap}): New target rule.
5415 * genpartmaplist.sh: New file.
5416 * Makefile.in (pkglib_DATA): Add partmap.lst.
5417 (partmap.lst): New target rule.
5418 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5419 modules (including all partition maps), instead of preloading them.
5421 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
5423 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5424 `linux-boot-prober' (if installed) to detect other operating
5425 systems which are installed on the computer and add them to
5427 * conf/common.rmk: Build and install 30_os-prober.
5429 2008-04-12 Robert Millan <rmh@aybabtu.com>
5431 * kern/powerpc/ieee1275/init.c: Move from here ...
5432 * kern/ieee1275/init.c: ... to here. Update all users.
5434 * kern/powerpc/ieee1275/cmain.c: Move from here ...
5435 * kern/ieee1275/cmain.c: ... to here. Update all users.
5437 * kern/powerpc/ieee1275/openfw.c: Move from here ...
5438 * kern/ieee1275/openfw.c: ... to here. Update all users.
5440 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5441 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
5443 2008-04-10 Pavel Roskin <proski@gnu.org>
5445 * configure.ac: Always use "_cv_" in cache variables for
5446 compatibility with Autoconf 2.62.
5448 2008-04-07 Robert Millan <rmh@aybabtu.com>
5450 Revert grub/machine/init.h addition by Pavel (since it breaks on
5451 i386-ieee1275 and others):
5452 * util/i386/pc/misc.c: Remove grub/machine/init.h.
5453 * util/powerpc/ieee1275/misc.c: Likewise.
5455 2008-04-07 Robert Millan <rmh@aybabtu.com>
5457 * util/grub-probe.c (probe): Improve error message.
5459 2008-04-07 Robert Millan <rmh@aybabtu.com>
5461 * util/biosdisk.c (read_device_map): Skip devices that don't exist
5462 (this prevents the presence of a bogus entry from ruining the whole
5465 2008-04-06 Pavel Roskin <proski@gnu.org>
5467 * util/biosdisk.c: Include grub/util/biosdisk.h.
5468 * util/grub-fstest.c (execute_command): Make static.
5469 * util/grub-mkdevicemap.c (check_device): Likewise.
5470 * util/i386/pc/misc.c: Include grub/machine/init.h.
5471 * util/powerpc/ieee1275/misc.c: Likewise.
5472 * util/lvm.c: Include grub/util/lvm.h.
5473 * util/misc.c: Include grub/kernel.h, grub/misc.h and
5475 * util/raid.c: Include grub/util/raid.h.
5476 (grub_util_getdiskname): Make static.
5478 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5479 grub_hostfs_fini(), as they are called from grub_init_all() and
5480 grub_fini_all() respectively. This fixes an infinite loop in
5481 grub-fstest due to double registration of hostfs.
5482 Reported by Christian Franke <Christian.Franke@t-online.de>
5484 2008-04-05 Pavel Roskin <proski@gnu.org>
5486 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5487 all 8 functions. Otherwise, probe function 0 only.
5489 2008-04-04 Pavel Roskin <proski@gnu.org>
5491 * commands/lspci.c (grub_lspci_iter): Print the bus number
5494 * commands/lspci.c (grub_pci_classes): Fix typos.
5495 (grub_lspci_iter): Don't print func twice. Print vendor ID
5496 before device ID, as it's normally done.
5498 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5499 Fix signedness warnings.
5500 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5502 * util/ieee1275/get_disk_name.c: Include config.h so that
5503 _GNU_SOURCE is defined and getline() is declared. Mark an
5504 unused argument as such. Fix a signedness warning.
5506 2008-04-02 Pavel Roskin <proski@gnu.org>
5508 * genkernsyms.sh.in: Use more robust assignments for CC and
5509 srcdir. Quote srcdir.
5510 * gensymlist.sh.in: Likewise. Assert at the compile time that
5511 the symbol table is not empty.
5513 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5514 * fs/cpio.c (grub_cpio_read): Likewise.
5516 2008-04-01 Pavel Roskin <proski@gnu.org>
5518 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5519 * disk/host.c (grub_host_open): Likewise.
5520 * disk/loopback.c (grub_loopback_open): Likewise.
5521 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5522 disk->id as in disk/host.c, not a multi-character constant.
5524 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
5525 later is obsolete, potentially dangerous and sets a bad example.
5526 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5527 * util/misc.c (grub_util_get_image_size): Likewise.
5529 * disk/loopback.c (options): Improve help for "--partitions".
5531 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5532 options to align them with the short options, e.g. "echo -e".
5534 2008-03-31 Bean <bean123ch@gmail.com>
5536 * video/reader/png.c (grub_png_data): New member is_16bit and
5538 (grub_png_decode_image_header): Detect 16 bit png image.
5539 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5540 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5541 (grub_video_reader_png): Release memory occupied by image_data.
5543 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5545 (grub_nfs_mount): Skip the test for sector per cluster.
5547 * include/grub/ntfs.h (MAX_SPC): Removed.
5549 2008-03-31 Bean <bean123ch@gmail.com>
5551 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5552 (grub_probe_SOURCES): Add fs/afs.c.
5553 (grub_fstest_SOURCES): Likewise.
5554 (afs_mod_SOURCES): New variable.
5555 (afs_mod_CFLAGS): Likewise.
5556 (afs_mod_LDFLAGS): Likewise.
5558 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5559 (grub_emu_SOURCES): Likewise.
5561 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5563 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5565 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5567 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5569 * fs/afs.c: New file.
5571 2008-03-30 Pavel Roskin <proski@gnu.org>
5573 * disk/host.c: Include grub/misc.h to fix a warning.
5574 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5575 warnings about implicit declarations.
5577 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5579 * include/grub/i386/loader.h: Change declaration of
5580 grub_linux_boot() to match what grub_loader_set() expects.
5581 * util/getroot.c (grub_guess_root_device): Return const char* to
5583 * util/grub-probe.c (probe): Fix a warning about uninitialized
5584 abstraction_name variable.
5585 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5586 second argument as unused to fix a warning.
5588 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5589 missing grub_error() call.
5591 * util/update-grub_lib.in: Define datarootdir, since Autoconf
5592 2.60 and newer uses it to define datadir.
5594 * commands/sleep.c: Fix warning about implicit declaration.
5595 * disk/memdisk.c: Likewise.
5596 * loader/aout.c: Likewise.
5597 * loader/i386/bsd_normal.c: Likewise.
5598 * util/grub-probe.c: Likewise.
5600 * commands/i386/cpuid.c (has_longmode): Make static.
5601 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5602 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5604 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5605 GDT. This is more robust, as %ds can change.
5606 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5607 calling real_to_prot().
5608 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5610 2008-03-28 Pavel Roskin <proski@gnu.org>
5612 * kern/i386/pc/startup.S: Assert that uncompressed functions
5613 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5614 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5615 code, as they push parts of the code (error handlers) beyond
5616 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
5617 code as correctness and size.
5619 2008-03-28 Pavel Roskin <proski@gnu.org>
5621 * kern/i386/pc/startup.S
5622 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5623 data block address to the real mode, keep offset minimal. This
5624 works around a bug in AWARD BIOS on old Athlon systems, which
5625 makes CD detection hang.
5627 2008-03-26 Pavel Roskin <proski@gnu.org>
5629 * normal/color.c (grub_parse_color_name_pair): Make `name' a
5631 * include/grub/normal.h: Add grub_parse_color_name_pair()
5634 2008-03-24 Bean <bean123ch@gmail.com>
5636 * disk/i386/pc/biosdisk.c (cd_start): Removed.
5637 (cd_count): Removed.
5638 (cd_drive): New variable.
5639 (grub_biosdisk_get_drive): Don't check for (cdN) device.
5640 (grub_biosdisk_call_hook): Likewise.
5641 (grub_biosdisk_iterate): Change cdrom detection method.
5642 (grub_biosdisk_open): Replace cd_start with cd_drive.
5643 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
5644 detect cdrom device.
5646 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
5648 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
5649 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
5650 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
5651 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
5652 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
5653 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
5654 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
5655 (grub_biosdisk_cdrp): New structure.
5656 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
5658 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
5660 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
5663 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
5666 2008-03-20 Robert Millan <rmh@aybabtu.com>
5668 Remove 2 TiB limit in ata.mod.
5669 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
5670 (grub_ata_dumpinfo): Print sector count with 0x%llx.
5671 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
5672 grub_uint64_t instead of grub_uint32_t.
5674 2008-03-05 Bean <bean123ch@gmail.com>
5676 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
5677 (grub_multiboot): Set boot device.
5679 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
5681 2008-03-02 Bean <bean123ch@gmail.com>
5683 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
5686 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
5688 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
5691 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
5694 * docs/fdl.texi: New file.
5696 * docs/mdate-sh: New file. Copied from gnulib.
5697 * docs/texinfo.tex: Likewise.
5699 * config.guess: Updated from gnulib.
5700 * install-sh: Likewise.
5702 2008-02-28 Robert Millan <rmh@aybabtu.com>
5704 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
5705 (aout_mod_SOURCES): New variable.
5706 (aout_mod_CFLAGS): Likewise.
5707 (aout_mod_LDFLAGS): Likewise.
5709 * conf/i386-ieee1275.rmk: Likewise.
5711 2008-02-28 Robert Millan <rmh@aybabtu.com>
5713 * util/update-grub.in: Reorganise terminal validity check. Accept
5714 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
5715 Based on suggestion by Franklin PIAT.
5717 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
5719 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
5721 * util/getroot.c (grub_util_check_block_device): New function that
5722 returns the given argument if it is a block device and returns NULL else.
5723 * util/grub-probe.c (argument_is_device): New variable.
5724 (probe): Promote device_name from a variable to an argument. Receive
5725 device_name from grub_util_check_block_device() if path is NULL and from
5726 grub_guess_root_device() else. Do not free() device_name anymore.
5727 (options): Introduce new parameter '-d, --device'.
5728 (main): Add description of the new parameter to the help screen.
5729 Rename path variable to argument. Set argument_is_device if the '-d'
5730 option is given. Pass argument to probe() depending on
5733 2008-02-24 Bean <bean123ch@gmail.com>
5735 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
5736 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
5737 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
5738 (GRUB_ISO9660_VOLDESC_PART): Likewise.
5739 (GRUB_ISO9660_VOLDESC_END): Likewise.
5740 (grub_iso9660_primary_voldesc): New member escape.
5741 (grub_iso9660_data): New member joliet.
5742 (grub_iso9660_convert_string): New function.
5743 (grub_iso9660_mount): Detect joliet extension.
5744 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
5745 (grub_iso9660_iso9660_label): Likewise.
5747 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
5748 (grub_setup_SOURCES): Add fs/udf.c.
5749 (grub_fstest_SOURCES): Likewise.
5750 (udf_mod_SOURCES): New variable.
5751 (udf_mod_CFLAGS): Likewise.
5752 (udf_mod_LDFLAGS): Likewise.
5754 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
5755 (grub_emu_SOURCES): Likewise.
5757 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5759 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5761 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5763 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5765 * fs/udf.c: New file.
5767 2008-02-24 Robert Millan <rmh@aybabtu.com>
5769 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
5770 (normal/lexer.c_DEPENDENCIES): New variables.
5771 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5772 (normal/lexer.c_DEPENDENCIES): Likewise.
5773 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5774 (normal/lexer.c_DEPENDENCIES): Likewise.
5775 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5776 (normal/lexer.c_DEPENDENCIES): Likewise.
5777 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5778 (normal/lexer.c_DEPENDENCIES): Likewise.
5779 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5780 (normal/lexer.c_DEPENDENCIES): Likewise.
5782 2008-02-23 Robert Millan <rmh@aybabtu.com>
5784 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5785 since they were intended to be in hex. This didn't break previously
5786 because of a bug in gpt_partition_map_iterate() (see below).
5788 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5789 when checking the validity of GPT header.
5790 Remove `partno', since it always provides the same information as `i'.
5792 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5794 * include/grub/efi/time.h: Fix a wrong comment.
5796 2008-02-19 Pavel Roskin <proski@gnu.org>
5798 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5801 2008-02-19 Bean <bean123ch@gmail.com>
5803 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5804 (aout_mod_SOURCES): New variable.
5805 (aout_mod_CFLAGS): Likewise.
5806 (aout_mod_LDFLAGS): Likewise.
5807 (_bsd_mod_SOURCES): New variable.
5808 (_bsd_mod_CFLAGS): Likewise.
5809 (_bsd_mod_LDFLAGS): Likewise.
5810 (bsd_mod_SOURCES): New variable.
5811 (bsd_mod_CFLAGS): Likewise.
5812 (bsd_mod_LDFLAGS): Likewise.
5814 * include/grub/aout.h: New file.
5816 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5818 * include/grub/i386/bsd.h: New file.
5820 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5823 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5824 function is called, so that it's possible to change it inside the hook.
5825 (grub_elf64_load): Likewise.
5826 (grub_elf_file): Don't close the file if elf header is not found.
5827 (grub_elf_close): Close the file if grub_elf_file fails (The new
5828 grub_elf_file won't close it).
5829 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5830 (grub_elf64_size): Likewise.
5832 * kern/i386/loader.S (grub_unix_real_boot): New function.
5834 * loader/aout.c: New file.
5836 * loader/i386/bsd.c: New file.
5838 * loader/i386/bsd_normal.c: New file.
5840 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5842 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
5843 can test other formats.
5845 2008-02-19 Robert Millan <rmh@aybabtu.com>
5847 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5848 (grub_gpt_partition_type_empty): Redefine with macro from
5849 `<grub/gpt_partition.h>'.
5850 (gpt_partition_map_iterate): Adjust partition type comparison.
5852 Export `entry' as partmap-specific `part.data' struct.
5853 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5855 * include/grub/gpt_partition.h (grub_gpt_header)
5856 (grub_gpt_partentry): ... to here (new file).
5858 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5860 (grub_gpt_partition_type_bios_boot): New const variable, defined
5861 with macro from `<grub/gpt_partition.h>'.
5863 (setup): Replace `first_start' with `embed_region', which keeps
5864 track of the embed region (and is partmap-agnostic).
5866 Replace find_first_partition_start() with find_usable_region(),
5867 which finds a usable region for embedding using partmap-specific
5868 knowledge (supports PC/MSDOS and GPT).
5870 Fix all assumptions that the embed region start at sector 1, using
5871 `embed_region.start' from now on. Similarly, use `embed_region.end'
5872 rather than `first_start' to calculate available size.
5874 In grub_util_info() message, replace "into after the MBR" with an
5875 indication of the specific sector our embed region starts at.
5877 2008-02-19 Robert Millan <rmh@aybabtu.com>
5879 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5880 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5881 `commands/reboot.c'.
5882 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5883 (halt_mod_SOURCES): Likewise.
5884 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5885 (halt_mod_SOURCES): Likewise.
5887 2008-02-17 Christian Franke <franke@computer.org>
5889 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5891 2008-02-17 Robert Millan <rmh@aybabtu.com>
5893 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5894 set `first_start' to 0 for non-PC/MSDOS partition maps.
5896 2008-02-16 Robert Millan <rmh@aybabtu.com>
5898 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5899 do not assume partition map is PC/MSDOS before performing checks that
5900 are specific to that layout.
5902 2008-02-13 Robert Millan <rmh@aybabtu.com>
5904 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5905 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5906 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5908 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5910 * configure.ac: Only a cosmetic change on the handling of
5911 -fno-stack-protector.
5913 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
5915 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5916 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5918 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5919 (halt_mod_SOURCES): New variable.
5920 (halt_mod_CFLAGS): Likewise.
5921 (halt_mod_LDFLAGS): Likewise.
5922 (reboot_mod_SOURCES): Likewise.
5923 (reboot_mod_CFLAGS): Likewise.
5924 (reboot_mod_LDFLAGS): Likewise.
5926 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5927 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5929 (halt_mod_SOURCES): Likewise.
5930 (reboot_mod_SOURCES): Likewise.
5932 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5933 commands/i386/pc/reboot.c by commands/reboot.c.
5934 (reboot_mod_SOURCES): Likewise.
5936 * commands/i386/pc/reboot.c: merge this file ...
5938 * commands/ieee1275/reboot.c: ... and this file ...
5940 * commands/reboot.c: ... to this file.
5941 Add some precompiler directive to include the correct header for
5944 * commands/ieee1275/halt.c: move this file ...
5946 * commands/halt.c: ... to here.
5947 Add some precompiler directive to include the correct header for
5950 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5951 (grub_halt): Likewise.
5953 * kern/efi/efi.c (grub_reboot): New function.
5954 (grub_halt): Likewise.
5956 2008-02-12 Robert Millan <rmh@aybabtu.com>
5958 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5959 /dev (like it is done for /dev/mapper). This doesn't provide support
5960 for EVMS, but at least it is now easy to identify the problem when it
5963 2008-02-11 Robert Millan <rmh@aybabtu.com>
5965 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5966 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5967 comparing it with -1, not 0.
5969 2008-02-10 Robert Millan <rmh@aybabtu.com>
5971 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5973 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5974 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5976 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5977 `disk/lvm.c' to the end of the list.
5978 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5979 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5981 2008-02-10 Robert Millan <rmh@aybabtu.com>
5983 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5984 grub_print_error() instead. This will let user know why we're entering
5986 Based on suggestions from Sam Morris.
5988 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
5990 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5991 on remaining N args, instead of "--" arg N times.
5993 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5995 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5996 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5997 pattern for unknown glyphs.
5999 2008-02-09 Robert Millan <rmh@aybabtu.com>
6001 * configure.ac: Probe for `help2man'.
6002 * Makefile.in (builddir): New variable.
6003 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6004 or otherwise add a few flags/options to it.
6005 (install-local): For every executable utility or script that is
6006 installed, invoke $(HELP2MAN) to install a manpage based on --help
6009 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6010 that it doesn't prevent --help from working in build tree.
6012 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6013 with `bug-grub@gnu.org'.
6014 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6015 * util/update-grub.in (usage): New function.
6016 Implement proper argument check, with support for --help and --version
6017 (as well as existing -y).
6019 2008-02-09 Christian Franke <franke@computer.org>
6021 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6022 avoid overwriting previous output.
6023 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6025 2008-02-09 Robert Millan <rmh@aybabtu.com>
6027 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6030 2008-02-09 Robert Millan <rmh@aybabtu.com>
6032 * commands/sleep.c: New file.
6033 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6034 (sleep_mod_SOURCES): New variable.
6035 (sleep_mod_CFLAGS): Likewise.
6036 (sleep_mod_LDFLAGS): Likewise.
6038 2008-02-09 Robert Millan <rmh@aybabtu.com>
6040 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6041 situations in which we can deduce the RAID size and the superblock
6044 2008-02-09 Robert Millan <rmh@aybabtu.com>
6046 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
6047 and return a grub_diskmemberlist_t composed of LVM physical volumes.
6048 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6050 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
6051 and return a grub_diskmemberlist_t composed of physical array members.
6052 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6054 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6056 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6057 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6058 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6060 * util/grub-probe.c (probe): Move partmap probing code from here ...
6061 (probe_partmap): ... to here.
6062 (probe): Use probe_partmap() once for the disk we're probing, and
6063 additionally, when such disk contains a memberlist() struct member,
6064 once for each disk that is contained in the structure returned by
6067 2008-02-09 Robert Millan <rmh@aybabtu.com>
6069 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6070 environment variable to 'all' in order to obtain debug output from
6072 * util/i386/pc/grub-setup.c (main): Likewise.
6074 2008-02-08 Robert Millan <rmh@aybabtu.com>
6076 * disk/raid.c (grub_raid_scan_device): Check for
6077 `array->device[sb.this_disk.number]' rather than for
6078 `array->device[sb.this_disk.number]->name', since the latter is not
6079 guaranteed to be accessible.
6081 2008-02-08 Robert Millan <rmh@aybabtu.com>
6083 * disk/raid.c: Update copyright.
6084 * fs/cpio.c: Likewise.
6085 * include/grub/raid.h: Likewise.
6086 * loader/i386/pc/multiboot.c: Likewise.
6087 * util/hostfs.c: Likewise.
6089 2008-02-08 Robert Millan <rmh@aybabtu.com>
6091 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6092 to a grub_disk_t array.
6093 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6095 (grub_raid_scan_device): Replace `device[x].name' accesses with
6096 `device[x]->name'. Simplify initialization of `array->device[x]'.
6098 2008-02-08 Robert Millan <rmh@aybabtu.com>
6100 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6101 grub_dprintf() calls.
6102 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6105 2008-02-07 Christian Franke <franke@computer.org>
6107 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6108 instead of fseek and ftell to support large files.
6109 (grub_hostfs_read): Likewise.
6111 2008-02-07 Robert Millan <rmh@aybabtu.com>
6113 Patch from Jeroen Dekkers.
6114 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
6115 failure, since successfully reading all array members might not be
6118 2008-02-06 Robert Millan <rmh@aybabtu.com>
6120 * util/grub-probe.c (probe): Simplify partmap probing (with the
6121 assumption that the first word up to the underscore equals to
6124 2008-02-06 Christian Franke <franke@computer.org>
6126 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6127 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6128 last block of a cpio or tar stream.
6129 Check for "TRAILER!!!" instead of any empty data
6130 block to detect last block of a cpio stream.
6131 (grub_cpio_dir): Fix constness of variable np.
6132 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6133 cpio or tar trailer is detected. This fixes a crash
6134 on open of a non existing file.
6136 2008-02-05 Bean <bean123ch@gmail.com>
6138 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6140 (grub_multiboot_load_elf64): Likewise.
6141 (grub_multiboot): Initialize mbi structure.
6143 * util/grub-fstest.c: Don't include unused header file script.h.
6145 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
6147 (grub_fstest_SOURCES): Likewise.
6149 2008-02-05 Robert Millan <rmh@aybabtu.com>
6151 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6152 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6153 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6154 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6156 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6157 (translation_table): Replace hardcoded values with macros
6158 provided by `<grub/term.h>'.
6160 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6161 (keyboard_map): Correct/add a few values, with macros provided
6163 (keyboard_map_shift): Zero values that don't differ from their
6164 `keyboard_map' equivalents.
6165 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6166 Discard the second scan code that is always sent by Caps lock.
6167 Only use `keyboard_map_shift' when it provides a non-zero value,
6168 otherwise fallback to `keyboard_map'.
6170 2008-02-04 Bean <bean123ch@gmail.com>
6172 * Makefile.in (enable_grub_fstest): New variable.
6174 * conf/common.rmk (grub_fstest_init.lst): New rule.
6175 (grub_fstest_init.h): Likewise.
6176 (grub_fstest_init.c): Likewise.
6177 (util/grub-fstest.c_DEPENDENCIES): New variable.
6178 (grub_fstest_SOURCES): Likewise.
6180 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6182 * util/grub-fstest.c: New file.
6184 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6186 Make grub-setup handle a separate root device.
6188 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6189 so that the root device can be compared with the destination
6191 When embedding the core image, if the root and destination devices
6192 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6194 When not embedding, set ROOT_DRIVE to 0xFF.
6196 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6198 Add support for having a grub directory in a different drive. This
6199 is still only the data handling part.
6201 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6202 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6203 (grub_root_drive): New variable.
6205 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6206 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6207 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6210 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6212 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6214 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6216 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6217 is bogus, because PXE booting does not specify any drive
6220 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6221 am not sure if this is really correct.
6223 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6224 is always identical to the boot drive when booting from a CD.
6226 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6228 (root_drive): New variable.
6229 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6230 (setup_sectors): Push %dx right after popping it, because %dh will
6232 (copy_buffer): Restore %dx.
6234 2008-02-03 Robert Millan <rmh@aybabtu.com>
6236 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6237 use `cdboot.img' for cdrom images.
6239 2008-02-03 Robert Millan <rmh@aybabtu.com>
6241 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6242 only setup gfxterm when `font' command has succeeded.
6244 2008-02-03 Robert Millan <rmh@aybabtu.com>
6246 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6247 (grub_rescue_cmd_multiboot_loader)
6248 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6250 2008-02-03 Pavel Roskin <proski@gnu.org>
6252 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
6253 %edx and %esi from stack only after grub_gate_a20() is called.
6254 grub_gate_a20() clobbers %edx.
6256 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6258 * configure.ac (AC_INIT): Bumped to 1.96.
6260 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6261 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6262 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6263 video/readers/png.c.
6265 2008-02-03 Bean <bean123ch@gmail.com>
6267 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6268 (cdboot_img_SOURCES): New variable.
6269 (cdboot_img_ASFLAGS): New variable.
6270 (cdboot_img_LDFLAGS): New variable.
6272 * boot/i386/pc/cdboot.S: New file.
6274 * disk/i386/pc/biosdisk.c (cd_start): New variable.
6275 (cd_count): Likewise.
6276 (grub_biosdisk_get_drive): Add support for cd device.
6277 (grub_biosdisk_call_hook): Likewise.
6278 (grub_biosdisk_iterate): Likewise.
6279 (grub_biosdisk_open): Likewise.
6280 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
6281 (grub_biosdisk_rw): Support reading from cd device.
6282 (GRUB_MOD_INIT): Iterate cd devices.
6284 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
6285 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
6286 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
6288 * kern/i386/pc/init.c (make_install_device): Check for cd device.
6290 2008-02-02 Robert Millan <rmh@aybabtu.com>
6292 * commands/read.c: New file.
6293 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
6294 (read_mod_SOURCES): New variable.
6295 (read_mod_CFLAGS): Likewise.
6296 (read_mod_LDFLAGS): Likewise.
6298 2008-02-02 Robert Millan <rmh@aybabtu.com>
6300 * normal/main.c (grub_normal_execute): Check for `menu->size' when
6301 determining whether menu has to be displayed.
6303 2008-02-02 Marco Gerards <marco@gnu.org>
6305 * bus/pci.c: New file.
6307 * include/grub/pci.h: Likewise.
6309 * include/grub/i386/pc/pci.h: Likewise.
6311 * commands/lspci.c: Likewise.
6313 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
6315 (pci_mod_SOURCES): New variable.
6316 (pci_mod_CFLAGS): Likewise.
6317 (pci_mod_LDFLAGS): Likewise.
6318 (lspci_mod_SOURCES): Likewise.
6319 (lspci_mod_CFLAGS): Likewise.
6320 (lspci_mod_LDFLAGS): Likewise.
6322 2008-02-02 Bean <bean123ch@gmail.com>
6324 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
6325 (grub_ufs_get_file_block): Fix indirect block calculation problem.
6327 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6328 (grub_xfs_btree_node): New structure.
6329 (grub_xfs_btree_root): New structure.
6330 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6331 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6332 (GRUB_XFS_EXTENT_BLOCK): Likewise.
6333 (GRUB_XFS_EXTENT_SIZE): Likewise.
6334 (grub_xfs_read_block): Support btree format type.
6335 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6336 Use directory block as basic unit.
6338 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6340 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6341 __attribute__ ((__regparm__ (1))).
6343 2008-02-01 Robert Millan <rmh@aybabtu.com>
6345 Correct a mistake in previous commit.
6347 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6349 (normal/command.c_DEPENDENCIES): New variable.
6351 2008-02-01 Robert Millan <rmh@aybabtu.com>
6353 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6355 (normal/command.c_DEPENDENCIES): New variable.
6356 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6357 * conf/i386-ieee1275.rmk: Likewise.
6358 * conf/i386-linuxbios.rmk: Likewise.
6359 * conf/i386-pc.rmk: Likewise.
6360 * conf/sparc64-ieee1275.rmk: Likewise.
6361 * conf/powerpc-ieee1275.rmk: Likewise.
6362 (grub_emu_SOURCES): Add `fs/fshelp.c'.
6364 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6366 2008-02-01 Robert Millan <rmh@aybabtu.com>
6368 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6369 call at beginning of function.
6371 2008-01-31 Pavel Roskin <proski@gnu.org>
6373 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6374 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6375 (grub_mkrescue_SOURCES): Likewise.
6376 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6378 2008-01-30 Robert Millan <rmh@aybabtu.com>
6380 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6381 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6382 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6383 (grub_probe_SOURCES): ... to here.
6385 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6386 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6387 * conf/i386-ieee1275.rmk: Likewise.
6388 * conf/i386-linuxbios.rmk: Likewise.
6389 * conf/powerpc-ieee1275.rmk: Likewise.
6391 2008-01-30 Tristan Gingold <gingold@free.fr>
6393 * kern/rescue.c: Silently accept empty lines.
6395 2008-01-29 Bean <bean123ch@gmail.com>
6397 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6398 (real_code_2): Code cleanup and change comment style.
6399 (move_memory): Avoid using 32-bit address mode.
6401 2008-01-29 Bean <bean123ch@gmail.com>
6403 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6404 (png_mod_SOURCES): New variable.
6405 (png_mod_CFLAGS): Likewise.
6406 (png_mod_LDFLAGS): Likewise.
6408 * video/readers/png.c: New file.
6410 2008-01-28 Robert Millan <rmh@aybabtu.com>
6412 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6413 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6414 `ifndef GRUB_MOD_GAP' hack.
6415 * util/elf/grub-mkimage.c (add_segments): Likewise.
6417 2008-01-27 Robert Millan <rmh@aybabtu.com>
6419 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6420 `GRUB_MOD_GAP' for platforms in which it's not defined.
6421 * util/elf/grub-mkimage.c (add_segments): Likewise.
6423 2008-01-27 Robert Millan <rmh@aybabtu.com>
6425 Get grub-emu to build again (including parallel builds).
6427 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6429 (util/grub-emu.c_DEPENDENCIES): ... this, ...
6430 (normal/execute.c_DEPENDENCIES): ... this, ...
6431 (grub-emu_DEPENDENCIES): ... and this.
6433 * conf/i386-efi.rmk: Likewise.
6434 * conf/i386-linuxbios.rmk: Likewise.
6435 * conf/i386-ieee1275.rmk: Likewise.
6436 * conf/powerpc-ieee1275.rmk: Likewise.
6437 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6439 2008-01-27 Robert Millan <rmh@aybabtu.com>
6441 * NEWS: Add a few items.
6443 2008-01-27 Robert Millan <rmh@aybabtu.com>
6445 Fix parallel builds with grub-emu. Based on earlier commit for
6446 grub-probe and grub-setup.
6448 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6449 (util/grub-emu.c_DEPENDENCIES): ... this.
6450 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6451 (util/grub-emu.c_DEPENDENCIES): ... this.
6452 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6453 (util/grub-emu.c_DEPENDENCIES): ... this.
6454 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6455 (util/grub-emu.c_DEPENDENCIES): ... this.
6456 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6457 (util/grub-emu.c_DEPENDENCIES): ... this.
6459 2008-01-27 Pavel Roskin <proski@gnu.org>
6461 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6462 to create a gap between _end and the modules added to the image
6463 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
6464 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6465 * util/elf/grub-mkimage.c (add_segments): Likewise.
6467 2008-01-26 Pavel Roskin <proski@gnu.org>
6469 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6470 just return an error.
6472 2008-01-26 Bean <bean123ch@gmail.com>
6474 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6475 (grub_reiserfs_get_item): Save offset of the next item.
6476 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6478 2008-01-25 Robert Millan <rmh@aybabtu.com>
6480 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6481 make all filesystem sources appear together (possibly fixing omissions
6483 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6484 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6485 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6486 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6488 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
6490 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6491 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6492 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6493 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6495 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6496 (probe): Add a sanity check to make sure of our ability to read
6497 requested files when probing for filesystem type.
6499 * genmk.rb: Update copyright year (2007).
6501 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6502 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6503 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6504 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6505 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6506 : Remove function prototypes.
6508 2008-01-25 Robert Millan <rmh@aybabtu.com>
6510 Revert my previous commits (based on wrong assumption of how grub_errno
6513 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6514 * kern/file.c (grub_file_open): Likewise.
6516 2008-01-24 Pavel Roskin <proski@gnu.org>
6518 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6519 that hang if GRUB tries to setup colors.
6520 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6521 colors for firmwares that don't support it.
6522 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6523 Recognize Open Hack'Ware, set flags to work around its
6526 2008-01-24 Robert Millan <rmh@aybabtu.com>
6528 * kern/file.c (grub_file_open): Do not account previous failures of
6529 unrelated functions when grub_errno is checked for.
6530 Reported by Oleg Strikov.
6532 2008-01-24 Bean <bean123ch@gmail.com>
6534 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6535 (grub_ufs_sblock): New member volume name.
6536 (grub_ufs_find_file): Fix string copy bug.
6537 (grub_ufs_label): Implement this function properly.
6539 * fs/hfs.c (grub_hfs_cnid_type): New enum.
6540 (grub_hfs_iterate_records): Use the correct file number for extents
6541 and catalog file. Fix problem in next index calculation.
6542 (grub_hfs_find_node): Replace recursive function call with loop.
6543 (grub_hfs_iterate_dir): Replace recursive function call with loop.
6545 2008-01-23 Robert Millan <rmh@aybabtu.com>
6547 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6548 `<grub/symbol.h>' and `<grub/multiboot.h>'.
6549 (grub_multiboot2_real_boot): New function prototype.
6551 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6552 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6554 * kern/i386/ieee1275/init.c (grub_os_area_addr)
6555 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6557 2008-01-23 Robert Millan <rmh@aybabtu.com>
6559 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6560 #ifdef'ed out grub_printf().
6562 2008-01-23 Robert Millan <rmh@aybabtu.com>
6564 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6565 grub_dprintf calls, since they make "debug=all" mode unusable.
6566 (grub_console_checkkey): Likewise.
6568 2008-01-23 Robert Millan <rmh@aybabtu.com>
6570 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6571 `term/i386/pc/at_keyboard.c'.
6572 (pkglib_MODULES): Add `serial.mod'.
6573 (serial_mod_SOURCES): New variable.
6574 (serial_mod_CFLAGS): Likewise.
6575 (serial_mod_LDFLAGS): Likewise.
6577 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
6578 `<grub/powerpc/ieee1275/console.h>'.
6579 (grub_keyboard_controller_init): New function prototype.
6580 (grub_console_checkkey): Likewise.
6581 (grub_console_getkey): Likewise.
6583 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6586 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6587 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6589 2008-01-23 Robert Millan <rmh@aybabtu.com>
6591 * kern/i386/pc/init.c (make_install_device): When memdisk image is
6592 present, "(memdisk)/boot/grub" becomes the default prefix.
6594 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6595 a memdisk tarball with all the modules. Add --overlay=DIR option that
6596 allows users to overlay additional files into the image.
6598 2008-01-23 Robert Millan <rmh@aybabtu.com>
6600 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6601 and `machine/memory.h'.
6602 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6603 (_multiboot_mod_SOURCES): New variable.
6604 (_multiboot_mod_CFLAGS): Likewise.
6605 (_multiboot_mod_LDFLAGS): Likewise.
6606 (multiboot_mod_SOURCES): Likewise.
6607 (multiboot_mod_CFLAGS): Likewise.
6608 (multiboot_mod_LDFLAGS): Likewise.
6610 * include/grub/i386/ieee1275/loader.h: New file.
6612 * include/grub/i386/ieee1275/machine.h: Likewise.
6614 * include/grub/i386/ieee1275/memory.h: Likewise.
6616 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6617 variable declaration.
6618 (grub_os_area_size): Likewise.
6620 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6621 (grub_lower_mem, grub_upper_mem): New variables.
6622 (grub_stop_floppy): New function (just to make
6623 grub_multiboot2_real_boot() happy).
6625 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6626 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6627 (grub_stop): New function.
6628 Include `"../realmode.S"' and `"../loader.S"'.
6630 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
6631 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
6633 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
6634 rely on grub_multiboot2_real_boot() for final boot.
6636 2008-01-22 Robert Millan <rmh@aybabtu.com>
6638 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
6639 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
6640 device that doesn't look like an SD card.
6641 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
6642 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
6643 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
6644 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
6647 2008-01-22 Robert Millan <rmh@aybabtu.com>
6649 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
6650 avoid claiming over our own code.
6652 2008-01-22 Bean <bean123ch@gmail.com>
6654 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
6655 (jpeg_mod_SOURCES): New variable.
6656 (jpeg_mod_CFLAGS): Likewise.
6657 (jpeg_mod_LDFLAGS): Likewise.
6659 * video/readers/jpeg.c : New file.
6661 2008-01-22 Bean <bean123ch@gmail.com>
6663 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
6664 there are no more items.
6666 2008-01-21 Robert Millan <rmh@aybabtu.com>
6668 * kern/mm.c (grub_mm_init_region): Improve debug message.
6670 2008-01-21 Robert Millan <rmh@aybabtu.com>
6672 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
6673 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
6675 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
6677 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
6678 Indicates start of upper memory.
6679 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
6680 (generate_image): Abort when image size is big enough to corrupt
6683 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
6684 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
6685 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6686 instead of hardcoding 0xA0000.
6687 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
6688 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
6689 instead of hardcoding 0xA0000.
6691 2008-01-21 Robert Millan <rmh@aybabtu.com>
6693 * disk/memdisk.c (memdisk_size): New variable.
6694 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
6696 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
6697 image to dynamic memory.
6698 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
6699 `memdisk_size'. Free memdisk block.
6701 2008-01-21 Robert Millan <rmh@aybabtu.com>
6703 Fix detection of very small filesystems (like tar).
6705 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
6706 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
6707 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
6708 a problem with this disk).
6710 2008-01-21 Robert Millan <rmh@aybabtu.com>
6712 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
6713 on grub_biosdisk_rw_standard() error.
6715 2008-01-21 Robert Millan <rmh@aybabtu.com>
6717 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
6719 * kern/elf.c: Likewise.
6720 * kern/ieee1275/ieee1275.c: Likewise.
6721 * kern/powerpc/ieee1275/openfw.c: Likewise.
6722 * term/ieee1275/ofconsole.c: Likewise.
6724 2008-01-21 Robert Millan <rmh@aybabtu.com>
6726 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
6728 * include/grub/kernel.h (grub_arch_memdisk_addr)
6729 (grub_arch_memdisk_size): Moved from here ...
6731 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
6732 (grub_arch_memdisk_size): ... to here.
6734 2008-01-21 Robert Millan <rmh@aybabtu.com>
6736 Mostly based on bugfix from Bean.
6738 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
6739 attribute with hook() parameter.
6740 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
6742 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
6743 attribute with hook() parameter.
6744 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
6747 2008-01-21 Robert Millan <rmh@aybabtu.com>
6749 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
6750 (pkglib_MODULES): Add `memdisk.mod'.
6751 (memdisk_mod_SOURCES): New variable.
6752 (memdisk_mod_CFLAGS): Likewise.
6753 (memdisk_mod_LDFLAGS): Likewise.
6755 * disk/memdisk.c: New file.
6757 * include/grub/disk.h (grub_disk_dev_id): Add
6758 `GRUB_DISK_DEVICE_MEMDISK_ID'.
6760 * include/grub/i386/pc/kernel.h
6761 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
6762 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
6763 (grub_kernel_image_size): New variable declaration.
6764 (grub_total_module_size): Likewise.
6765 (grub_memdisk_image_size): Likewise.
6767 * include/grub/i386/pc/memory.h
6768 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
6770 * include/grub/kernel.h: Include `<grub/symbol.h>'.
6771 (grub_arch_memdisk_addr): New variable declaration.
6772 (grub_arch_memdisk_size): Likewise.
6774 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6775 (grub_arch_memdisk_size): Likewise.
6777 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6778 (codestart): Replace hardcoded `0x100000' with
6779 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6781 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6782 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6783 not NULL, append the contents of the file it refers to, at the end of
6784 the compressed kernel image. Initialize `grub_memdisk_image_size'
6785 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6786 (options): Add "memdisk"|'m' option.
6787 (main): Parse --memdisk|-m option, and pass user-provided path as
6788 parameter to generate_image().
6790 2008-01-20 Robert Millan <rmh@aybabtu.com>
6792 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6793 grub_dprintf() calls from here ...
6794 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6796 2008-01-20 Robert Millan <rmh@aybabtu.com>
6798 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6800 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6802 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6803 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6804 `GRUB_IEEE1275_FLAG_REAL_MODE'.
6805 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
6807 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6808 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6810 2008-01-19 Robert Millan <rmh@aybabtu.com>
6812 Get rid of confusing function (superseded by
6813 `grub_ieee1275_get_integer_property')
6814 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6816 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6818 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6819 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
6820 in native endianness from grub_ieee1275_get_integer_property().
6822 2008-01-19 Robert Millan <rmh@aybabtu.com>
6824 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6825 command after "shut-down", since implementations differ on which
6826 the command for halt is.
6828 2008-01-19 Robert Millan <rmh@aybabtu.com>
6830 * include/grub/i386/linuxbios/console.h: Add header protection.
6831 (grub_keyboard_controller_init): New function prototype.
6832 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6833 (KEYBOARD_COMMAND_READ): Likewise.
6834 (KEYBOARD_COMMAND_WRITE): Likewise.
6835 (KEYBOARD_SCANCODE_SET1): Likewise.
6836 (grub_keyboard_controller_write): New function.
6837 (grub_keyboard_controller_read): Likewise.
6838 (grub_keyboard_controller_init): Likewise.
6840 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6841 (grub_console_init): On coreboot/LinuxBIOS, call
6842 grub_keyboard_controller_init().
6844 2008-01-19 Robert Millan <rmh@aybabtu.com>
6846 PowerPC changes provided by Pavel Roskin.
6848 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6849 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6850 don't rely on cmain() doing it.
6851 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6852 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6854 2008-01-16 Robert Millan <rmh@aybabtu.com>
6856 * include/grub/i386/linuxbios/memory.h
6857 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6858 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6859 receive `table_header' as argument. Instead, probe for it in the
6860 known memory ranges where it can be present.
6861 (grub_available_iterate): Do not pass a fixed `table_header' address
6862 to grub_linuxbios_table_iterate().
6864 2008-01-15 Robert Millan <rmh@aybabtu.com>
6866 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6867 * conf/i386-ieee1275.rmk: New file.
6868 * include/grub/i386/ieee1275/console.h: Likewise.
6869 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6870 * include/grub/i386/ieee1275/kernel.h: Likewise.
6871 * include/grub/i386/ieee1275/time.h: Likewise.
6872 * kern/i386/ieee1275/init.c: Likewise.
6873 * kern/i386/ieee1275/startup.S: Likewise.
6875 2008-01-15 Robert Millan <rmh@aybabtu.com>
6877 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6878 when pointers are 32-bit (but still do set it to one when they are
6881 2008-01-15 Robert Millan <rmh@aybabtu.com>
6883 * include/grub/ieee1275/ieee1275.h
6884 (grub_ieee1275_get_integer_property): New function prototype.
6886 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6887 (grub_ieee1275_get_integer_property): New function. Wraps around
6888 grub_ieee1275_get_property() to handle endianness.
6890 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6891 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
6893 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6894 (grub_map): Likewise.
6895 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6897 2008-01-15 Bean <bean123ch@gmail.com>
6899 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6900 (grub_script_execute_cmdline): Reset grub_errno.
6902 * normal/main.c (read_config_file): Reset grub_errno.
6904 * normal/parse.y (script_init): New.
6905 (script): Move function and menuentry here.
6907 (command): Add delimiter at the end of command.
6908 (commands): Adjust to match the new command.
6909 (commandblock): Remove grub_script_lexer_record_start.
6910 (menuentry): Add grub_script_lexer_record_start, use the new commands.
6911 (if): Use the new commands.
6913 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6915 2008-01-15 Robert Millan <rmh@aybabtu.com>
6917 * normal/menu.c (run_menu): Move timeout message from here ...
6918 (print_timeout): ... to here.
6919 (run_menu): Use print_timeout() once during initial draw to print
6920 the whole message, and again in every clock tick to update only
6921 the number of seconds.
6923 2008-01-15 Robert Millan <rmh@aybabtu.com>
6925 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6926 actual size of `available' from grub_ieee1275_get_property(), and
6927 restrict parsing to that bound.
6929 2008-01-15 Christian Franke <franke@computer.org>
6931 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6932 (argp_program_version): Remove variable.
6933 (argp_program_bug_address): Likewise.
6934 (options): Convert from struct argp_option to struct option.
6935 (struct arguments): Remove.
6936 (parse_opt): Remove.
6937 (usage): New function.
6938 (main): Replace struct args members by simple variables.
6939 Replace argp_parse() by getopt_long().
6940 Add switch to evaluate options.
6941 Add missing "(...)" around root_dev in prefix string.
6943 2008-01-14 Robert Millan <rmh@aybabtu.com>
6945 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6946 for grub_ieee1275_exit(), in order to improve portability.
6948 2008-01-14 Robert Millan <rmh@aybabtu.com>
6950 * util/grub.d/10_linux.in (prefix): Define.
6951 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6953 2008-01-13 Pavel Roskin <proski@gnu.org>
6955 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6956 grub_errno if no errors have been detected.
6958 2008-01-12 Robert Millan <rmh@aybabtu.com>
6960 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6961 (grub_util_get_dev_abstraction): New function prototype.
6963 * util/getroot.c: Include `<grub/util/getroot.h>'
6964 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6965 (grub_util_get_dev_abstraction): ... here (new function).
6967 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6968 `PRINT_ABSTRACTION'.
6969 (probe): Probe for abstraction type when requested.
6970 (main): Understand `--target=abstraction'.
6972 * util/i386/efi/grub-install.in: Add abstraction module to core
6973 image when it is found to be necessary.
6974 * util/i386/pc/grub-install.in: Likewise.
6975 * util/powerpc/ieee1275/grub-install.in: Likewise.
6977 * util/update-grub_lib.in (font_path): Return system path without
6978 converting to GRUB path.
6979 * util/update-grub.in: Convert system path returned by font_path()
6980 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6981 abstraction module is needed for loading fonts (if any). Export
6982 that as `GRUB_PRELOAD_MODULES'.
6983 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6986 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6988 Remove some unused code from reiserfs.
6990 * fs/reiserfs.c (struct grub_reiserfs_key)
6991 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6992 (struct grub_reiserfs_node_body): Removed.
6993 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6995 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6997 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6999 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7001 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7003 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7005 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7006 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7007 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7009 2008-01-10 Robert Millan <rmh@aybabtu.com>
7011 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7012 Determines if a file is garbage left by packaging systems, etc.
7013 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7014 for processing /etc/grub.d scripts.
7015 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7016 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7017 as a condition for processing Linux images.
7019 2008-01-10 Pavel Roskin <proski@gnu.org>
7021 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7022 to compile reiserfs.c on PowerPC.
7024 2008-01-10 Robert Millan <rmh@aybabtu.com>
7026 * kern/device.c (grub_device_iterate): Do not abort device iteration
7027 when one of the devices cannot be opened.
7028 * kern/disk.c (grub_disk_open): Do not account previous failures of
7029 unrelated functions when grub_errno is checked for.
7031 2008-01-08 Robert Millan <rmh@aybabtu.com>
7033 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7034 `! grub_linux_is_bzimage', change order of address comparison to make
7035 it more intuitive, and improve "too big zImage" error message.
7037 2008-01-08 Robert Millan <rmh@aybabtu.com>
7039 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7040 `$(update-grub_DATA)'.
7041 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7044 2008-01-07 Robert Millan <rmh@aybabtu.com>
7046 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7047 which instruction is modified by grub-setup during installation
7048 (since it wasn't obvious by only looking at this file).
7050 2008-01-07 Robert Millan <rmh@aybabtu.com>
7052 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
7053 listing actual TODO items.
7055 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7057 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7059 (grub_reiserfs_get_key_offset): Likewise.
7060 (grub_reiserfs_set_key_offset): Likewise.
7061 (grub_reiserfs_set_key_type): Likewise.
7062 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
7064 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7065 better to remove the bitfield version completely.
7067 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7069 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7070 allocated from the heap, due to the fshelp implementation.
7071 (grub_reiserfs_dir): Free NODE, due to the same reason.
7073 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7075 Mostly from Vincent Pelletier:
7077 * fs/reiserfs.c: New file.
7079 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7080 (reiserfs_mod_SOURCES): New variable.
7081 (reiserfs_mod_CFLAGS): Likewise.
7082 (reiserfs_mod_LDFLAGS): Likewise.
7084 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7085 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7086 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7089 2008-01-06 Robert Millan <rmh@aybabtu.com>
7091 * normal/color.c: Remove `<grub/env.h>'.
7093 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7095 * include/grub/normal.h: Include <grub/env.h>.
7097 2008-01-05 Robert Millan <rmh@aybabtu.com>
7099 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7100 usage example with `(hd0,1)'.
7101 Reported by Samuel Thibault.
7103 2008-01-05 Robert Millan <rmh@aybabtu.com>
7105 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7106 (grub_linux_boot_zimage): Rename to ...
7107 (grub_linux_boot): ... this.
7108 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7109 (grub_linux_boot_zimage): Conditionalize zImage copy.
7111 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7112 (grub_linux_boot_bzimage): Remove prototype.
7113 (grub_linux_boot_zimage): Rename to ...
7114 (grub_linux_boot): ... this.
7116 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7117 (grub_linux_boot): Remove function.
7119 2008-01-05 Robert Millan <rmh@aybabtu.com>
7121 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7122 (grub_env_write_color_highlight): Likewise.
7123 (grub_wait_after_message): Likewise.
7125 * normal/color.c: New file.
7127 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7128 (normal_mod_DEPENDENCIES): Likewise.
7130 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7131 (normal_mod_DEPENDENCIES): Likewise.
7133 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7134 (normal_mod_DEPENDENCIES): Likewise.
7136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7137 (normal_mod_DEPENDENCIES): Likewise.
7139 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7140 for waiting after a message is printed.
7141 * normal/main.c (read_config_file): Likewise.
7142 (grub_normal_init): Register grub_env_write_color_normal() and
7143 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7144 `color_highlight' variables as global.
7146 * normal/menu.c (grub_wait_after_message): New function.
7147 (grub_color_menu_normal): New variable. Replaces ...
7148 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7149 (grub_color_menu_highlight): New variable. Replaces ...
7150 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7151 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7152 `GRUB_TERM_COLOR_STANDARD'.
7153 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7154 `normal_code' and `highlight_code' to `old_color_normal' and
7155 `old_color_highlight', respectively.
7156 (grub_menu_init_page): Update colors when drawing the menu, based on
7157 `menu_color_normal' and `menu_color_highlight' variables.
7158 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7159 a message is printed.
7161 2008-01-05 Robert Millan <rmh@aybabtu.com>
7163 * kern/env.c (grub_env_context_open): Propagate hooks for global
7164 variables to new context.
7166 * kern/main.c (grub_set_root_dev): Export `root' variable.
7168 2008-01-05 Robert Millan <rmh@aybabtu.com>
7170 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
7171 discs unconditionally, since udev and others have options to provide
7174 2008-01-05 Robert Millan <rmh@aybabtu.com>
7176 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7178 2008-01-04 Christian Franke <franke@computer.org>
7180 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7183 2008-01-03 Pavel Roskin <proski@gnu.org>
7185 * kern/i386/linuxbios/init.c: Put "void" to all function
7186 declarations with no arguments.
7187 * kern/powerpc/ieee1275/init.c: Likewise.
7188 * term/i386/pc/at_keyboard.c: Likewise.
7189 * term/i386/pc/vga_text.c: Likewise.
7190 * util/grub-mkdevicemap.c: Likewise.
7192 2008-01-02 Robert Millan <rmh@aybabtu.com>
7194 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7195 message when loaded image is out of bounds.
7196 (grub_multiboot_load_elf64): Likewise.
7198 2008-01-02 Pavel Roskin <proski@gnu.org>
7200 * util/grub.d/10_linux.in: Try version without ".old" when
7201 looking for initrd. It's better to use initrd from the newer
7202 kernel of the same version than no initrd at all.
7204 2008-01-01 Robert Millan <rmh@aybabtu.com>
7206 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7208 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7210 * include/grub/video.h: Added grub_video_unmap_color and
7211 grub_video_get_active_render_target.
7212 (grub_video_adapter): Added unmap_color and get_active_render_target.
7214 * video/video.c: Added grub_video_unmap_color and
7215 grub_video_get_active_render_target.
7216 (grub_video_get_info): Changed method to accept NULL pointer as an
7217 argument to allow detection of active video adapter.
7219 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7220 grub_video_vbe_unmap_color_int.
7221 Added grub_video_vbe_unmap_color and
7222 grub_video_vbe_get_active_render_target.
7223 (grub_video_vbe_adapter): Added unmap_color and
7224 get_active_render_target.
7226 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
7227 with grub_video_vbe_unmap_color_int.
7229 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7230 (DEFAULT_NORMAL_COLOR): Likewise.
7231 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7232 (DEFAULT_FG_COLOR): Removed.
7233 (DEFAULT_BG_COLOR): Likewise.
7234 (DEFAULT_CURSOR_COLOR): Changed value.
7235 (grub_virtual_screen): Added standard_color_setting,
7236 normal_color_setting, highlight_color_setting and term_color.
7237 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7238 (bitmap_width): Added.
7239 (bitmap_height): Likewise.
7241 (set_term_color): Likewise.
7242 (grub_virtual_screen_setup): Changed to use new terminal coloring
7244 (grub_gfxterm_init): Added init for bitmap.
7245 (grub_gfxterm_fini): Added destroy for bitmap.
7246 (redraw_screen_rect): Updated to use background bitmap and new
7248 (scroll_up): Added optimization for case when there is no bitmap.
7249 (grub_gfxterm_cls): Fixed to use correct background color.
7250 (grub_virtual_screen_setcolorstate): Changed to use new terminal
7252 (grub_virtual_screen_setcolor): Likewise.
7253 (grub_virtual_screen_getcolor): Added.
7254 (grub_gfxterm_background_image_cmd): Likewise.
7255 (grub_video_term): Added setcolor and getcolor.
7256 (MOD_INIT): Added registration of background_image command.
7257 (MOD_TERM): Added unregistration for background_image command.
7259 2007-12-30 Pavel Roskin <proski@gnu.org>
7261 * loader/multiboot_loader.c: Fix multiboot command
7262 unregistration. Fix all typos in the word "multiboot".
7264 2007-12-29 Pavel Roskin <proski@gnu.org>
7266 * util/grub.d/10_linux.in: Refactor search for initrd. Add
7267 support for initrd names used in Fedora.
7269 2007-12-26 Bean <bean123ch@gmail.com>
7271 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
7272 (cpio_mod_SOURCES): New variable.
7273 (cpio_mod_CFLAGS): Likewise.
7274 (cpio_mod_LDFLAGS): Likewise.
7276 * fs/cpio.c: New file.
7278 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
7280 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7282 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7286 2007-12-25 Robert Millan <rmh@aybabtu.com>
7288 * include/grub/term.h (struct grub_term): Add `getcolor' function.
7289 (grub_getcolor): New function.
7291 * kern/term.c (grub_getcolor): New function.
7292 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
7293 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
7294 (print_entry): Set normal and highlight colors to
7295 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
7296 respectively, before printing and restore them to old
7298 (grub_menu_init_page): Likewise. Fill an additional colored space
7299 that would otherwise be left blank.
7301 * term/efi/console.c (grub_console_getcolor): New function.
7302 (struct grub_console_term.getcolor): New variable.
7303 * term/i386/pc/console.c (grub_console_getcolor): New function.
7304 (struct grub_console_term.getcolor): New variable.
7305 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
7306 (struct grub_console_term.getcolor): New variable.
7308 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
7309 (struct grub_console_term.setcolor): Remove variable.
7310 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
7311 (struct grub_console_term.setcolor): Remove variable.
7312 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
7313 (struct grub_console_term.setcolor): Remove variable.
7314 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
7315 (struct grub_console_term.setcolor): Remove variable.
7317 2007-12-25 Robert Millan <rmh@aybabtu.com>
7319 * configure.ac: Search for possible unifont.hex locations, and
7320 define UNIFONT_HEX if found.
7322 * Makefile.in (UNIFONT_HEX): Define variable.
7323 (DATA): Rename to ...
7324 (PKGLIB): ... this. Update all users.
7325 (PKGDATA): New variable.
7326 (pkgdata_IMAGES): Rename to ...
7327 (pkglib_IMAGES): ... this. Update all users.
7328 (pkgdata_MODULES): Rename to ...
7329 (pkglib_MODULES): ... this. Update all users.
7330 (pkgdata_PROGRAMS): Rename to ...
7331 (pkglib_PROGRAMS): ... this. Update all users.
7332 (pkgdata_DATA): Rename to ...
7333 (pkglib_DATA): ... this. Update all users.
7334 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7335 (unicode.pff, ascii.pff): New rules.
7336 (all-local): Add `$(PKGDATA)' dependency.
7337 (install-local): Process `$(PKGDATA)'.
7339 * util/update-grub_lib.in (font_path): Search for *.pff files in
7340 a few more locations, including `${pkgdata}'.
7342 2007-12-23 Robert Millan <rmh@aybabtu.com>
7344 Patch from Bean <bean123ch@gmail.com>:
7345 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7348 2007-12-21 Bean <bean123ch@gmail.com>
7350 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7351 (ntfscomp_mod_SOURCES): New variable.
7352 (ntfscomp_mod_CFLAGS): Likewise.
7353 (ntfscomp_mod_LDFLAGS): Likewise.
7355 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7356 (grub_probe_SOURCES): Likewise.
7357 (grub_emu_SOURCES): Likewise.
7359 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7360 (grub_emu_SOURCES): Likewise.
7362 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7363 (grub_emu_SOURCES): Likewise.
7365 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7366 (grub_emu_SOURCES): Likewise.
7368 * fs/ntfs.c (grub_ntfscomp_func): New variable.
7369 (read_run_list): Renamed to grub_ntfs_read_run_list.
7370 (decomp_nextvcn): Moved to ntfscomp.c.
7371 (decomp_getch): Likewise.
7372 (decomp_get16): Likewise.
7373 (decomp_block): Likewise.
7374 (read_block): Likewise.
7375 (read_data): Partially moved to ntfscomp.c.
7376 (fixup): Change unsigned to grub_uint16_t.
7377 (read_mft): Change unsigned long to grub_uint32_t.
7378 (read_attr): Likewise.
7379 (read_data): Likewise.
7380 (read_run_data): Likewise.
7381 (read_run_list): Likewise.
7382 (read_mft): Likewise.
7384 * fs/ntfscomp.c: New file.
7386 * include/grub/ntfs.h: New file.
7388 2007-12-16 Robert Millan <rmh@aybabtu.com>
7390 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7391 IDE disk check, since Linux is known to support 20 IDE disks.
7392 Reported by Colin Watson.
7394 2007-12-15 Bean <bean123ch@gmail.com>
7396 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7397 (lnxboot_img_SOURCES): New variable.
7398 (lnxboot_img_ASFLAGS): Likewise.
7399 (lnxboot_img_LDFLAGS): Likewise.
7401 * boot/i386/pc/lnxboot.S: New file.
7403 2007-11-24 Pavel Roskin <proski@gnu.org>
7405 * configure.ac: Test if '--build-id=none' is supported by the
7406 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
7407 objcopy to generate incorrect binary files (binutils
7408 2.17.50.0.18-1 as shipped by Fedora 8).
7409 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7410 linking, so that build ID doesn't break the test.
7412 2007-11-24 Pavel Roskin <proski@gnu.org>
7414 * include/grub/i386/time.h: use "void" in the argument list
7416 * include/grub/powerpc/time.h: Likewise.
7417 * include/grub/sparc64/time.h: Likewise.
7419 2007-11-18 Christian Franke <franke@computer.org>
7421 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7422 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7423 This fixes the problem that function keys did not work in grub-emu.
7425 2007-11-18 Christian Franke <franke@computer.org>
7427 * disk/host.c (grub_host_open): Remove attribute unused from
7428 name parameter. Add check for "host". This fixes the problem
7429 that grub-emu does not find partitions.
7431 2007-11-18 Christian Franke <franke@computer.org>
7433 * util/hostfs.c (is_dir): New function.
7434 (grub_hostfs_dir): Handle missing dirent.d_type case.
7435 (grub_hostfs_read): Add missing fseek().
7436 (grub_hostfs_label): Clear label pointer. This fixes a crash
7437 of grub-emu on "ls (host)".
7439 2007-11-18 Christian Franke <franke@computer.org>
7441 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7442 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7443 to 64 bit boundary by default.
7445 2007-11-18 Bean <bean123ch@gmail.com>
7447 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7448 (hexdump_mod_SOURCES): New variable.
7449 (hexdump_mod_CFLAGS): Likewise.
7450 (hexdump_mod_LDFLAGS): Likewise.
7452 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7454 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7456 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7458 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7460 * include/grub/hexdump.h: New file.
7462 * commands/hexdump.c: New file.
7464 2007-11-10 Robert Millan <rmh@aybabtu.com>
7466 * commands/i386/pc/play.c (beep_off): Switch order of arguments
7467 in grub_outb() calls.
7468 (beep_on): Likewise.
7470 2007-11-10 Christian Franke <franke@computer.org>
7472 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7473 (grub_menu_run): Likewise.
7475 2007-11-10 Robert Millan <rmh@aybabtu.com>
7477 * include/grub/i386/efi/machine.h: New file.
7478 * include/grub/i386/linuxbios/machine.h: Likewise.
7479 * include/grub/i386/pc/machine.h: Likewise.
7480 * include/grub/powerpc/ieee1275/machine.h: Likewise.
7481 * include/grub/sparc64/ieee1275/machine.h: Likewise.
7483 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7484 (serial_hw_io_addr): New variable.
7485 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7486 instead of `(unsigned short *) 0x400'.
7488 2007-11-10 Bean <bean123ch@gmail.com>
7490 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7492 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7494 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7495 (vga_mod_SOURCES): Added.
7496 (vga_mod_CFLAGS): Likewise.
7497 (vga_mod_LDFLAGS): Likewise.
7499 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7501 (set_map_mask): Likewise.
7502 (set_read_map): Likewise.
7503 (set_read_address): Likewise.
7504 (vga_font): Removed variable.
7505 (get_vga_glyph): Removed function.
7506 (invalidate_char): Likewise.
7507 (write_char): Changed to use grub_font_get_glyph() for font
7509 (grub_vga_putchar): Likewise.
7510 (grub_vga_getcharwidth): Likewise.
7512 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
7514 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7516 (pxeboot_img_LDFLAGS): Likewise.
7517 (diskboot_img_LDFLAGS): Likewise.
7518 (kernel_img_LDFLAGS): Likewise.
7520 2007-11-06 Robert Millan <rmh@aybabtu.com>
7522 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7523 in grub_outb() calls.
7524 (serial_hw_init): Likewise.
7526 2007-11-05 Robert Millan <rmh@aybabtu.com>
7528 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7529 spaces. Skip non-regular files.
7531 2007-11-05 Robert Millan <rmh@aybabtu.com>
7533 * kern/disk.c (grub_disk_firmware_fini)
7534 (grub_disk_firmware_is_tainted): New variables.
7536 * include/grub/disk.h (grub_disk_firmware_fini)
7537 (grub_disk_firmware_is_tainted): Likewise.
7539 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7540 (grub_disk_biosdisk_fini): ... to here.
7541 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7542 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7543 is set. Register grub_disk_biosdisk_fini() in
7544 `grub_disk_firmware_fini'.
7546 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7547 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7548 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7549 to finish existing firmware disk interface.
7551 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7552 (ata_mod_SOURCES): New variable.
7553 (ata_mod_CFLAGS): Likewise.
7554 (ata_mod_LDFLAGS): Likewise.
7556 2007-11-05 Robert Millan <rmh@aybabtu.com>
7558 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
7559 (grub_ata_wait): Reimplement using grub_millisleep().
7561 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7562 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7564 2007-11-03 Marco Gerards <marco@gnu.org>
7566 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7567 (CRTC_ADDR_PORT): New macro.
7568 (CRTC_DATA_PORT): Likewise.
7569 (CRTC_CURSOR): Likewise.
7570 (CRTC_CURSOR_ADDR_HIGH): Likewise.
7571 (CRTC_CURSOR_ADDR_LOW): Likewise.
7572 (update_cursor): New function.
7573 (grub_console_real_putchar): Call `update_cursor'.
7574 (grub_console_gotoxy): Likewise.
7575 (grub_console_cls): Set the default color when clearing the
7577 (grub_console_setcursor): Implemented.
7579 2007-11-03 Marco Gerards <marco@gnu.org>
7581 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7583 (grub_ata_pio_write): Likewise.
7585 (grub_atapi_identify): Wait after issuing an ATA command.
7586 (grub_atapi_packet): Likewise.
7587 (grub_ata_identify): Likewise.
7588 (grub_ata_readwrite): Likewise.
7590 2007-11-03 Marco Gerards <marco@gnu.org>
7592 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7593 (grub_ata_pio_write): Likewise.
7594 (grub_ata_readwrite): Use `grub_error', instead of
7595 returning `grub_errno'.
7597 2007-11-03 Marco Gerards <marco@gnu.org>
7599 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7600 grub_ata_pio_write once for every single sector, instead of for
7603 2007-10-31 Robert Millan <rmh@aybabtu.com>
7605 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7607 * conf/i386-linuxbios.rmk: New file.
7609 * kern/i386/pc/hardware.c: Likewise.
7610 * term/i386/pc/at_keyboard.c: Likewise.
7611 * term/i386/pc/vga_text.c: Likewise.
7613 * include/grub/i386/linuxbios/boot.h: Likewise.
7614 * include/grub/i386/linuxbios/console.h: Likewise.
7615 * include/grub/i386/linuxbios/init.h: Likewise.
7616 * include/grub/i386/linuxbios/kernel.h: Likewise.
7617 * include/grub/i386/linuxbios/loader.h: Likewise.
7618 * include/grub/i386/linuxbios/memory.h: Likewise.
7619 * include/grub/i386/linuxbios/serial.h: Likewise.
7620 * include/grub/i386/linuxbios/time.h: Likewise.
7622 * kern/i386/linuxbios/init.c: Likewise.
7623 * kern/i386/linuxbios/startup.S: Likewise.
7624 * kern/i386/linuxbios/table.c: Likewise.
7626 2007-10-31 Marco Gerards <marco@gnu.org>
7628 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
7629 (ata_mod_SOURCES): New variable.
7630 (ata_mod_CFLAGS): Likewise.
7631 (ata_mod_LDFLAGS): Likewise.
7633 * disk/ata.c: New file.
7635 * include/grub/disk.h (grub_disk_dev_id): Add
7636 `GRUB_DISK_DEV_ATA_ID'.
7638 2007-10-31 Robert Millan <rmh@aybabtu.com>
7640 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
7641 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
7643 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
7644 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
7646 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
7649 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
7651 2007-10-27 Robert Millan <rmh@aybabtu.com>
7653 * include/grub/types.h (ULONG_MAX): Define macro.
7655 2007-10-22 Robert Millan <rmh@aybabtu.com>
7657 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
7659 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
7661 2007-10-22 Robert Millan <rmh@aybabtu.com>
7663 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
7664 (pkgdata_MODULES): Add `biosdisk.mod'.
7665 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
7668 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
7669 (grub_biosdisk_init): Replace with ...
7670 (GRUB_MOD_INIT(biosdisk)): ... this.
7671 (grub_biosdisk_fini): Replace with ...
7672 (GRUB_MOD_FINI(biosdisk)): ... this.
7674 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
7675 (grub_machine_init): Remove call to grub_biosdisk_init().
7676 (grub_machine_fini): Remove call to grub_machine_fini().
7678 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
7680 2007-10-22 Robert Millan <rmh@aybabtu.com>
7682 * include/grub/time.h: New file.
7683 * include/grub/i386/time.h: Likewise.
7684 * include/grub/powerpc/time.h: Likewise.
7685 * include/grub/sparc64/time.h: Likewise.
7687 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
7689 (KERNEL_MACHINE_TIME_HEADER): ... this.
7690 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7692 (KERNEL_MACHINE_TIME_HEADER): ... this.
7693 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
7695 (KERNEL_MACHINE_TIME_HEADER): ... this.
7697 * kern/i386/efi/init.c: Include `<grub/time.h>'.
7698 (grub_millisleep): New function.
7699 * kern/i386/pc/init.c: Include `<grub/time.h>'.
7700 (grub_millisleep): New function.
7701 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
7702 Remove `grub/machine/time.h' include.
7703 (grub_millisleep): New function.
7704 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
7705 Remove `grub/machine/time.h' include.
7706 (grub_millisleep): New function.
7708 * include/grub/misc.h (grub_div_roundup): New function.
7710 * kern/misc.c: Include `<grub/time.h>'.
7711 (grub_millisleep_generic): New function.
7713 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
7715 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
7717 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
7718 `machine/time.h'. Add `time.h'.
7719 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
7721 2007-10-21 Robert Millan <rmh@aybabtu.com>
7723 * include/grub/misc.h (grub_max): New function.
7725 2007-10-21 Robert Millan <rmh@aybabtu.com>
7727 * util/misc.c (grub_util_info): Call fflush() before returning.
7729 2007-10-20 Robert Millan <rmh@aybabtu.com>
7731 * genmk.rb (Image): Copy `extra_flags' from here ...
7732 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
7734 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
7735 to `argc' and `args' arguments.
7737 2007-10-17 Robert Millan <rmh@aybabtu.com>
7739 * kern/i386/loader.S: New file.
7741 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
7742 * kern/i386/loader.S (grub_linux_prot_size)... to here.
7743 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
7744 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
7745 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
7746 * kern/i386/loader.S (grub_linux_real_addr)... to here.
7747 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
7748 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
7749 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
7750 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
7751 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
7752 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
7753 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
7754 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
7756 * kern/i386/realmode.S: New file.
7758 * kern/i386/pc/startup.S (protstack): Moved from here ...
7759 * kern/i386/realmode.S (protstack)... to here.
7760 * kern/i386/pc/startup.S (gdt): Moved from here ...
7761 * kern/i386/realmode.S (gdt)... to here.
7762 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
7763 * kern/i386/realmode.S (prot_to_real)... to here.
7765 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
7766 `kern/i386/realmode.S'.
7768 2007-10-17 Robert Millan <rmh@aybabtu.com>
7770 * include/grub/i386/loader.h: New file.
7772 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7773 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7774 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7775 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7776 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7777 * include/grub/i386/loader.h (grub_linux_prot_size)
7778 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7779 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7780 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7781 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7783 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7785 2007-10-15 Robert Millan <rmh@aybabtu.com>
7787 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7788 filesystem when dev->disk is unset.
7789 Do probe for filesystem even when dev->disk->has_partitions is set.
7790 In case a filesystem is found, always report it.
7791 In case it isn't, if dev->disk->has_partitions is set, report that
7792 a partition table was found instead of reporting that no filesystem
7793 could be identified.
7795 2007-10-12 Robert Millan <rmh@aybabtu.com>
7797 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7798 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7800 * include/grub/types.h (grub_host_to_target16): New macro.
7801 (grub_host_to_target32): Likewise.
7802 (grub_host_to_target64): Likewise.
7803 (grub_target_to_host16): Likewise.
7804 (grub_target_to_host32): Likewise.
7805 (grub_target_to_host64): Likewise.
7807 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7809 (GRUB_MOD_ALIGN): ...this. Update all users.
7811 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7812 grub_host_to_target32.
7813 Replace grub_be_to_cpu32 with grub_target_to_host32.
7814 (load_modules): Likewise.
7815 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7816 Replace grub_be_to_cpu32 with grub_target_to_host32.
7817 Replace grub_cpu_to_be16 with grub_host_to_target16.
7818 Replace grub_cpu_to_be32 grub_host_to_target32.
7820 2007-10-12 Robert Millan <rmh@aybabtu.com>
7822 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7823 * util/elf/grub-mkimage.c: ... here.
7825 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7826 `util/powerpc/ieee1275/grub-mkimage.c'.
7828 2007-10-07 Robert Millan <rmh@aybabtu.com>
7830 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7831 and make it easier to figure out.
7832 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7833 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7834 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7835 leave us with less than HEAP_MIN_SIZE total heap.
7836 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
7838 2007-10-03 Robert Millan <rmh@aybabtu.com>
7840 * include/grub/i386/io.h: New file.
7841 * commands/i386/pc/play.c (inb): Removed.
7843 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7845 * term/i386/pc/serial.c (inb): Removed.
7847 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7849 * term/i386/pc/vga.c (inb): Removed.
7851 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7854 2007-10-02 Robert Millan <rmh@aybabtu.com>
7856 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7857 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7858 Reported by Marcin Kurek.
7860 2007-09-07 Robert Millan <rmh@aybabtu.com>
7862 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7863 SmartFirmware version updates (as released by Sven Luther), and avoid
7864 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7865 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7868 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7871 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7872 when merging two regions.
7874 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7876 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7877 * normal/completion.c (grub_normal_do_completion): Likewise.
7878 Reported by Hitoshi Ozeki.
7880 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7882 Do not use devices at boot in chainloading.
7884 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7885 (boot_part_addr): Likewise.
7886 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7887 with BOOT_DRIVE and BOOT_PART_ADDR.
7888 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7889 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7891 2007-08-29 Robert Millan <rmh@aybabtu.com>
7893 Patch from Simon Peter <dn.tlp@gmx.net>:
7894 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7895 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7896 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7897 util/i386/pc/grub-setup.c_DEPENDENCIES.
7898 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7899 util/grub-probe.c_DEPENDENCIES.
7900 * conf/powerpc-ieee1275.rmk: Likewise.
7902 2007-08-28 Robert Millan <rmh@aybabtu.com>
7904 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7905 to tell grub-mkdevicemap how to name devices.
7906 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7909 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7910 util/i386/get_disk_name.c.
7911 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7912 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7913 util/ieee1275/get_disk_name.c.
7915 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7917 * DISTLIST: Add util/i386/get_disk_name.c and
7918 util/ieee1275/get_disk_name.c.
7920 * util/grub-mkdevicemap.c: Replace device naming logic with
7921 grub_util_get_disk_name() calls.
7923 2007-08-20 Robert Millan <rmh@aybabtu.com>
7925 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7926 (so that it works for both plural and singular quantities).
7928 2007-08-05 Robert Millan <rmh@aybabtu.com>
7930 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7931 so that [xz] isn't taken into account when determining order.
7933 2007-08-02 Marco Gerards <marco@gnu.org>
7935 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7936 `include/multiboot2.h', `include/grub/elfload.h',
7937 `include/multiboot.h', `include/grub/multiboot.h',
7938 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7939 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7940 `kern/elf.c', `loader/multiboot_loader.c',
7941 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7942 `loader/i386/pc/multiboot2.c',
7943 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7944 `util/i386/pc/grub-mkrescue.in'. Remove
7945 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7946 `include/grub/i386/pc/util/biosdisk.h' and
7947 `include/grub/powerpc/ieee1275/multiboot.h'.
7949 2007-08-02 Bean <bean123ch@gmail.com>
7951 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7952 (ntfs_mod_SOURCES): New variable.
7953 (ntfs_mod_CFLAGS): Likewise.
7954 (ntfs_mod_LDFLAGS): Likewise.
7956 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7957 (grub_probe_SOURCES): Likewise.
7958 (grub_emu_SOURCES): Likewise.
7960 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7961 (grub_emu_SOURCES): Likewise.
7963 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7964 (grub_emu_SOURCES): Likewise.
7966 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7968 * fs/ntfs.c: New file.
7970 2007-08-02 Bean <bean123ch@gmail.com>
7972 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7974 * file.h (grub_file): Likewise.
7976 * fshelp.h (grub_fshelp_read_file): Likewise.
7978 * util/i386/pc/grub-setup.c (setup): Likewise.
7979 (save_first_sector): Likewise.
7980 (save_blocklists): Likewise.
7982 * fs/affs.c (grub_affs_read_file): Likewise.
7984 * fs/ext2.c (grub_ext2_read_file): Likewise.
7986 * fs/fat.c (grub_fat_read_data): Likewise.
7988 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7990 * fs/hfs.c (grub_hfs_read_file): Likewise.
7992 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7994 * fs/jfs.c (grub_jfs_read_file): Likewise.
7996 * fs/minix.c (grub_minix_read_file): Likewise.
7998 * fs/sfs.c (grub_sfs_read_file): Likewise.
8000 * fs/ufs.c (grub_ufs_read_file): Likewise.
8002 * fs/xfs.c (grub_xfs_read_file): Likewise.
8004 * command/blocklist.c (read_blocklist): Likewise.
8005 (print_blocklist): Likewise.
8007 2007-08-02 Marco Gerards <marco@gnu.org>
8009 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8012 * disk/host.c: New file.
8014 * util/hostfs.c: Likewise.
8016 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8017 return `GRUB_ERR_BAD_FS'.
8018 * fs/sfs.c (grub_sfs_mount): Likewise.
8019 * fs/xfs.c (grub_xfs_mount): Likewise.
8021 * include/grub/disk.h (enum grub_disk_dev_id): Add
8022 `GRUB_DISK_DEVICE_HOST_ID'.
8024 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8026 2007-07-24 Jerone Young <jerone@gmail.com>
8028 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
8029 modules for compilation.
8030 * conf/powerpc-ieee1275.rmk: Likewise.
8032 * include/multiboot.h: Move multiboot definitions to one file. Rename
8033 many definitions to not get grub specific.
8034 * include/multiboot2.h: Create header with multiboot 2 definitions.
8035 * include/grub/multiboot.h: Header for grub specific function
8036 prototypes and definitions.
8037 * include/grub/multiboot2.h: Likewise.
8038 * include/grub/multiboot_loader.h: Likewise.
8039 * include/grub/i386/pc/multiboot.h: Removed.
8040 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8042 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8043 and 2 to allow for one multiboot and module commands.
8044 * loader/multiboot2.c: Add multiboot2 functionality.
8045 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8046 and definition names.
8047 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8049 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8050 ieee1275 specific multiboot2 code.
8052 * kern/i386/pc/startup.S: Change headers and definition names for
8053 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8055 2007-07-22 Robert Millan <rmh@aybabtu.com>
8057 * geninitheader.sh: Process file specified in first parameter rather
8058 than hardcoding grub_modules_init.lst.
8059 * geninit.sh: Likewise. Also, construct header name dynamically rather
8060 than hardcoding grub_modules_init.h.
8062 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8063 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
8064 grub_probe_init.[ch] and grub_setup_init.[ch].
8066 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8067 grub_modules_init.h with grub_emu_init.h.
8068 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8069 grub_probe_init.[ch] files.
8070 * conf/i386-efi.rmk: Likewise.
8071 * conf/i386-pc.rmk: Likewise.
8072 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8073 grub_setup_init.[ch] files.
8075 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8076 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8077 to initialize modules rather than a list of hardcoded functions.
8078 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8079 grub_init_all() to initialize modules rather than a list of hardcoded
8082 2007-07-22 Robert Millan <rmh@aybabtu.com>
8084 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8085 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8087 2007-07-22 Robert Millan <rmh@aybabtu.com>
8089 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8090 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8091 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8092 flag when running on SmartFirmware.
8093 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8094 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8097 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8098 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8099 rather than decreasing it.
8101 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8102 there's not enough space to do it, fail in the same way as when it
8103 can't be done because there are no partitions.
8105 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8106 when nvsetenv failed.
8108 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8110 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8111 because this rule is automatically generated.
8112 (grub-mkrescue): Removed for the same reason as above.
8114 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8116 Migrate to GNU General Public License Version 3.
8118 * COPYING: Replaced with the plain text version of GPLv3.
8120 * config.guess: Updated from gnulib.
8121 * config.sub: Likewise.
8123 * geninit.sh: Output a GPLv3 copyright notice.
8124 * geninitheader.sh: Likewise.
8125 * genmodsrc.sh: Likewise.
8126 * gensymlist.sh.in: Likewise.
8128 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8129 * boot/i386/pc/diskboot.S: Likewise.
8130 * boot/i386/pc/pxeboot.S: Likewise.
8131 * commands/blocklist.c: Likewise.
8132 * commands/boot.c: Likewise.
8133 * commands/cat.c: Likewise.
8134 * commands/cmp.c: Likewise.
8135 * commands/configfile.c: Likewise.
8136 * commands/echo.c: Likewise.
8137 * commands/help.c: Likewise.
8138 * commands/ls.c: Likewise.
8139 * commands/search.c: Likewise.
8140 * commands/terminal.c: Likewise.
8141 * commands/test.c: Likewise.
8142 * commands/videotest.c: Likewise.
8143 * commands/i386/cpuid.c: Likewise.
8144 * commands/i386/pc/halt.c: Likewise.
8145 * commands/i386/pc/play.c: Likewise.
8146 * commands/i386/pc/reboot.c: Likewise.
8147 * commands/i386/pc/vbeinfo.c: Likewise.
8148 * commands/i386/pc/vbetest.c: Likewise.
8149 * commands/ieee1275/halt.c: Likewise.
8150 * commands/ieee1275/reboot.c: Likewise.
8151 * commands/ieee1275/suspend.c: Likewise.
8152 * disk/loopback.c: Likewise.
8153 * disk/lvm.c: Likewise.
8154 * disk/raid.c: Likewise.
8155 * disk/efi/efidisk.c: Likewise.
8156 * disk/i386/pc/biosdisk.c: Likewise.
8157 * disk/ieee1275/ofdisk.c: Likewise.
8158 * font/manager.c: Likewise.
8159 * fs/affs.c: Likewise.
8160 * fs/ext2.c: Likewise.
8161 * fs/fat.c: Likewise.
8162 * fs/fshelp.c: Likewise.
8163 * fs/hfs.c: Likewise.
8164 * fs/hfsplus.c: Likewise.
8165 * fs/iso9660.c: Likewise.
8166 * fs/jfs.c: Likewise.
8167 * fs/minix.c: Likewise.
8168 * fs/sfs.c: Likewise.
8169 * fs/ufs.c: Likewise.
8170 * fs/xfs.c: Likewise.
8171 * hello/hello.c: Likewise.
8172 * include/grub/acorn_filecore.h: Likewise.
8173 * include/grub/arg.h: Likewise.
8174 * include/grub/bitmap.h: Likewise.
8175 * include/grub/boot.h: Likewise.
8176 * include/grub/cache.h: Likewise.
8177 * include/grub/device.h: Likewise.
8178 * include/grub/disk.h: Likewise.
8179 * include/grub/dl.h: Likewise.
8180 * include/grub/elfload.h: Likewise.
8181 * include/grub/env.h: Likewise.
8182 * include/grub/err.h: Likewise.
8183 * include/grub/file.h: Likewise.
8184 * include/grub/font.h: Likewise.
8185 * include/grub/fs.h: Likewise.
8186 * include/grub/fshelp.h: Likewise.
8187 * include/grub/gzio.h: Likewise.
8188 * include/grub/hfs.h: Likewise.
8189 * include/grub/kernel.h: Likewise.
8190 * include/grub/loader.h: Likewise.
8191 * include/grub/lvm.h: Likewise.
8192 * include/grub/misc.h: Likewise.
8193 * include/grub/mm.h: Likewise.
8194 * include/grub/net.h: Likewise.
8195 * include/grub/normal.h: Likewise.
8196 * include/grub/parser.h: Likewise.
8197 * include/grub/partition.h: Likewise.
8198 * include/grub/pc_partition.h: Likewise.
8199 * include/grub/raid.h: Likewise.
8200 * include/grub/rescue.h: Likewise.
8201 * include/grub/script.h: Likewise.
8202 * include/grub/setjmp.h: Likewise.
8203 * include/grub/symbol.h: Likewise.
8204 * include/grub/term.h: Likewise.
8205 * include/grub/terminfo.h: Likewise.
8206 * include/grub/tparm.h: Likewise.
8207 * include/grub/types.h: Likewise.
8208 * include/grub/video.h: Likewise.
8209 * include/grub/efi/api.h: Likewise.
8210 * include/grub/efi/chainloader.h: Likewise.
8211 * include/grub/efi/console.h: Likewise.
8212 * include/grub/efi/console_control.h: Likewise.
8213 * include/grub/efi/disk.h: Likewise.
8214 * include/grub/efi/efi.h: Likewise.
8215 * include/grub/efi/pe32.h: Likewise.
8216 * include/grub/efi/time.h: Likewise.
8217 * include/grub/i386/linux.h: Likewise.
8218 * include/grub/i386/setjmp.h: Likewise.
8219 * include/grub/i386/types.h: Likewise.
8220 * include/grub/i386/efi/kernel.h: Likewise.
8221 * include/grub/i386/efi/loader.h: Likewise.
8222 * include/grub/i386/efi/time.h: Likewise.
8223 * include/grub/i386/pc/biosdisk.h: Likewise.
8224 * include/grub/i386/pc/boot.h: Likewise.
8225 * include/grub/i386/pc/chainloader.h: Likewise.
8226 * include/grub/i386/pc/console.h: Likewise.
8227 * include/grub/i386/pc/init.h: Likewise.
8228 * include/grub/i386/pc/kernel.h: Likewise.
8229 * include/grub/i386/pc/loader.h: Likewise.
8230 * include/grub/i386/pc/memory.h: Likewise.
8231 * include/grub/i386/pc/multiboot.h: Likewise.
8232 * include/grub/i386/pc/serial.h: Likewise.
8233 * include/grub/i386/pc/time.h: Likewise.
8234 * include/grub/i386/pc/vbe.h: Likewise.
8235 * include/grub/i386/pc/vbeblit.h: Likewise.
8236 * include/grub/i386/pc/vbefill.h: Likewise.
8237 * include/grub/i386/pc/vbeutil.h: Likewise.
8238 * include/grub/i386/pc/vga.h: Likewise.
8239 * include/grub/ieee1275/ieee1275.h: Likewise.
8240 * include/grub/ieee1275/ofdisk.h: Likewise.
8241 * include/grub/powerpc/libgcc.h: Likewise.
8242 * include/grub/powerpc/setjmp.h: Likewise.
8243 * include/grub/powerpc/types.h: Likewise.
8244 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8245 * include/grub/powerpc/ieee1275/console.h: Likewise.
8246 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8247 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8248 * include/grub/powerpc/ieee1275/loader.h: Likewise.
8249 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8250 * include/grub/powerpc/ieee1275/time.h: Likewise.
8251 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8252 * include/grub/sparc64/libgcc.h: Likewise.
8253 * include/grub/sparc64/setjmp.h: Likewise.
8254 * include/grub/sparc64/types.h: Likewise.
8255 * include/grub/sparc64/ieee1275/console.h: Likewise.
8256 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8257 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8258 * include/grub/sparc64/ieee1275/time.h: Likewise.
8259 * include/grub/util/biosdisk.h: Likewise.
8260 * include/grub/util/getroot.h: Likewise.
8261 * include/grub/util/lvm.h: Likewise.
8262 * include/grub/util/misc.h: Likewise.
8263 * include/grub/util/raid.h: Likewise.
8264 * include/grub/util/resolve.h: Likewise.
8265 * io/gzio.c: Likewise.
8266 * kern/device.c: Likewise.
8267 * kern/disk.c: Likewise.
8268 * kern/dl.c: Likewise.
8269 * kern/elf.c: Likewise.
8270 * kern/env.c: Likewise.
8271 * kern/err.c: Likewise.
8272 * kern/file.c: Likewise.
8273 * kern/fs.c: Likewise.
8274 * kern/loader.c: Likewise.
8275 * kern/main.c: Likewise.
8276 * kern/misc.c: Likewise.
8277 * kern/mm.c: Likewise.
8278 * kern/parser.c: Likewise.
8279 * kern/partition.c: Likewise.
8280 * kern/rescue.c: Likewise.
8281 * kern/term.c: Likewise.
8282 * kern/efi/efi.c: Likewise.
8283 * kern/efi/init.c: Likewise.
8284 * kern/efi/mm.c: Likewise.
8285 * kern/i386/dl.c: Likewise.
8286 * kern/i386/efi/init.c: Likewise.
8287 * kern/i386/efi/startup.S: Likewise.
8288 * kern/i386/pc/init.c: Likewise.
8289 * kern/i386/pc/lzo1x.S: Likewise.
8290 * kern/i386/pc/startup.S: Likewise.
8291 * kern/ieee1275/ieee1275.c: Likewise.
8292 * kern/powerpc/cache.S: Likewise.
8293 * kern/powerpc/dl.c: Likewise.
8294 * kern/powerpc/ieee1275/cmain.c: Likewise.
8295 * kern/powerpc/ieee1275/crt0.S: Likewise.
8296 * kern/powerpc/ieee1275/init.c: Likewise.
8297 * kern/powerpc/ieee1275/openfw.c: Likewise.
8298 * kern/sparc64/cache.S: Likewise.
8299 * kern/sparc64/dl.c: Likewise.
8300 * kern/sparc64/ieee1275/init.c: Likewise.
8301 * kern/sparc64/ieee1275/openfw.c: Likewise.
8302 * loader/efi/chainloader.c: Likewise.
8303 * loader/efi/chainloader_normal.c: Likewise.
8304 * loader/i386/efi/linux.c: Likewise.
8305 * loader/i386/efi/linux_normal.c: Likewise.
8306 * loader/i386/pc/chainloader.c: Likewise.
8307 * loader/i386/pc/chainloader_normal.c: Likewise.
8308 * loader/i386/pc/linux.c: Likewise.
8309 * loader/i386/pc/linux_normal.c: Likewise.
8310 * loader/i386/pc/multiboot.c: Likewise.
8311 * loader/i386/pc/multiboot_normal.c: Likewise.
8312 * loader/powerpc/ieee1275/linux.c: Likewise.
8313 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8314 * normal/arg.c: Likewise.
8315 * normal/cmdline.c: Likewise.
8316 * normal/command.c: Likewise.
8317 * normal/completion.c: Likewise.
8318 * normal/execute.c: Likewise.
8319 * normal/function.c: Likewise.
8320 * normal/lexer.c: Likewise.
8321 * normal/main.c: Likewise.
8322 * normal/menu.c: Likewise.
8323 * normal/menu_entry.c: Likewise.
8324 * normal/misc.c: Likewise.
8325 * normal/parser.y: Likewise.
8326 * normal/script.c: Likewise.
8327 * normal/i386/setjmp.S: Likewise.
8328 * normal/powerpc/setjmp.S: Likewise.
8329 * normal/sparc64/setjmp.S: Likewise.
8330 * partmap/acorn.c: Likewise.
8331 * partmap/amiga.c: Likewise.
8332 * partmap/apple.c: Likewise.
8333 * partmap/gpt.c: Likewise.
8334 * partmap/pc.c: Likewise.
8335 * partmap/sun.c: Likewise.
8336 * term/gfxterm.c: Likewise.
8337 * term/terminfo.c: Likewise.
8338 * term/efi/console.c: Likewise.
8339 * term/i386/pc/console.c: Likewise.
8340 * term/i386/pc/serial.c: Likewise.
8341 * term/i386/pc/vesafb.c: Likewise.
8342 * term/i386/pc/vga.c: Likewise.
8343 * term/ieee1275/ofconsole.c: Likewise.
8344 * util/biosdisk.c: Likewise.
8345 * util/console.c: Likewise.
8346 * util/genmoddep.c: Likewise.
8347 * util/getroot.c: Likewise.
8348 * util/grub-emu.c: Likewise.
8349 * util/grub-mkdevicemap.c: Likewise.
8350 * util/grub-probe.c: Likewise.
8351 * util/lvm.c: Likewise.
8352 * util/misc.c: Likewise.
8353 * util/raid.c: Likewise.
8354 * util/resolve.c: Likewise.
8355 * util/update-grub.in: Likewise.
8356 * util/update-grub_lib.in: Likewise.
8357 * util/grub.d/00_header.in: Likewise.
8358 * util/grub.d/10_hurd.in: Likewise.
8359 * util/grub.d/10_linux.in: Likewise.
8360 * util/i386/efi/grub-install.in: Likewise.
8361 * util/i386/efi/grub-mkimage.c: Likewise.
8362 * util/i386/pc/grub-install.in: Likewise.
8363 * util/i386/pc/grub-mkimage.c: Likewise.
8364 * util/i386/pc/grub-mkrescue.in: Likewise.
8365 * util/i386/pc/grub-setup.c: Likewise.
8366 * util/i386/pc/misc.c: Likewise.
8367 * util/powerpc/ieee1275/grub-install.in: Likewise.
8368 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8369 * util/powerpc/ieee1275/misc.c: Likewise.
8370 * video/bitmap.c: Likewise.
8371 * video/video.c: Likewise.
8372 * video/i386/pc/vbe.c: Likewise.
8373 * video/i386/pc/vbeblit.c: Likewise.
8374 * video/i386/pc/vbefill.c: Likewise.
8375 * video/i386/pc/vbeutil.c: Likewise.
8376 * video/readers/tga.c: Likewise.
8378 2007-07-02 Robert Millan <rmh@aybabtu.com>
8380 * conf/i386-efi.rmk: Replace obsolete reference to
8381 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8382 with util/getroot.c.
8383 * conf/powerpc-ieee1275.rmk: Likewise.
8384 * conf/sparc64-ieee1275.rmk: Likewise.
8386 * util/grub-emu.c (main): Fix unchecked pointer handling.
8388 2007-07-02 Robert Millan <rmh@aybabtu.com>
8390 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8391 invocation to fail, in order to support partition-less media.
8393 * util/i386/pc/grub-install.in: Likewise.
8395 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8396 which fs or partmap modules are needed (akin to its sister scripts).
8398 Also use grub-probe to get rid of unportable /proc/mounts check.
8400 Print the same informational message that the other scripts do, before
8403 2007-06-23 Robert Millan <rmh@aybabtu.com>
8405 * util/update-grub_lib.in (font_path): New function. Determine whether
8406 a font file can be found and, if so, echo the GRUB path to it.
8408 * util/update-grub.in: Handle multiple terminals depending on user
8409 input, platform availability and font file presence. Propagate
8410 variables of our findings to /etc/grub.d/ children.
8412 * util/grub.d/00_header.in: Handle multiple terminals, based on
8413 environment setup by update-grub.
8415 2007-06-23 Robert Millan <rmh@aybabtu.com>
8417 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8419 2007-06-21 Robert Millan <rmh@aybabtu.com>
8421 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8422 indicate end of data section in kernel image.
8423 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8424 GRUB_KERNEL_MACHINE_DATA_END.
8426 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8428 * kern/i386/efi/startup.S: Likewise.
8430 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8431 during image generation. Implement --prefix option to override this
8433 * util/i386/efi/grub-mkimage.c: Likewise.
8435 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8436 code to make path relative to its root into a separate function.
8438 * util/i386/pc/grub-install.in: Use newly provided
8439 make_system_path_relative_to_its_root() to convert ${grubdir}, then
8440 pass the result to grub-install --prefix.
8442 2007-06-13 Robert Millan <rmh@aybabtu.com>
8444 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8446 * util/grub-emu.c: Use above definitions from misc.h instead of
8448 * util/grub-mkdevicemap.c: Likewise.
8449 * util/i386/pc/grub-setup.c: Likewise.
8450 * util/grub-probe.c: Likewise.
8451 (probe): Abort with grub_util_error() when either
8452 grub_guess_root_device or grub_util_get_grub_dev fails.
8454 2007-06-12 Robert Millan <rmh@aybabtu.com>
8456 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8458 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8460 * util/grub-probe.c (probe): Likewise for "drive_name".
8462 2007-06-11 Robert Millan <rmh@aybabtu.com>
8464 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8465 not just the cdrom one.
8467 2007-06-11 Robert Millan <rmh@aybabtu.com>
8469 * util/i386/pc/grub-mkrescue.in: Add "set -e".
8470 Add --pkglibdir=DIR option to override pkglibdir.
8471 Mention --image-type=TYPE in help output.
8472 Fix --grub-mkimage (it was a no-op).
8473 Abort gracefully when no parameter is given.
8475 2007-06-11 Robert Millan <rmh@aybabtu.com>
8477 * util/i386/pc/grub-mkrescue.in: New file.
8478 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
8479 * Makefile.in: Handle bin_SCRIPTS.
8481 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
8483 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8484 list of video modes.
8486 2007-06-06 Robert Millan <rmh@aybabtu.com>
8488 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8489 file doesn't exist, or if it is in a filesystem grub can't read.
8491 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
8492 not abort if GRUB_DRIVE could not be defined. Rearrange generated
8493 header comment to fit in 80 columns when the variables are resolved.
8495 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8496 could be identified by update-grub. Remove redundant check for
8497 unifont.pff existence (since convert_system_path_to_grub_path now
8500 2007-06-04 Robert Millan <rmh@aybabtu.com>
8502 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8504 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8506 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8508 2007-06-04 Robert Millan <rmh@aybabtu.com>
8510 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8512 * include/grub/partition.h: Declare grub_apple_partition_map_init and
8513 grub_apple_partition_map_fini.
8516 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8517 to access >2 TiB disks).
8519 Print disk->total_sectors with %llu instead of %lu, since this
8520 variable is always 64-bit (prevents wrong disk size from being displayed
8521 on either >2 TiB disk or big-endian CPU).
8523 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8524 into a generic case that supports all (sane) partition maps.
8526 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8529 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8530 and grub_apple_partition_map_fini() after that.
8532 2007-06-01 Robert Millan <rmh@aybabtu.com>
8534 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8536 * util/grub.d/00_header.in: Only enable gfxterm when
8537 convert_system_path_to_grub_path() succeeds.
8539 2007-05-20 Robert Millan <rmh@aybabtu.com>
8541 * util/update-grub_lib.in: New file.
8542 * DISTLIST: Add update-grub_lib.in.
8543 * conf/common.rmk: Generate update-grub_lib and install it in
8545 * Makefile.in: Add install routine for $(lib_DATA).
8547 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8548 function provided by update-grub_lib to support arbitrary paths of
8550 * util/update-grub.in: Use convert_system_path_to_grub_path() to
8551 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8553 2007-05-19 Robert Millan <rmh@aybabtu.com>
8555 * commands/i386/cpuid.c: New module.
8557 * conf/i386-efi.rmk: Enable cpuid.mod.
8558 * conf/i386-pc.rmk: Likewise.
8560 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8562 * kern/disk.c (grub_disk_read): Check return value of
8565 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
8567 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8569 * disk/raid.c (grub_raid_open): Likewise.
8571 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8573 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8574 stack instead of on the heap.
8576 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8577 before doing a read on it.
8579 * configure.ac: Only use -fno-stack-protector for the target
8582 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
8584 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8585 __attribute_ ((unused)) to mode_type argument.
8587 * util/getroot.c (grub_guess_root_device): Fix #endif.
8589 * kern/misc.c (memcmp): Fix prototype.
8591 * include/grub/partition.h [GRUB_UTIL]
8592 (grub_gpt_partition_map_init): Add prototype.
8593 (grub_gpt_partition_map_fini): Likewise.
8595 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8598 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8599 (grub_fat_read_data): Likewise.
8600 (grub_fat_find_dir): Likewise.
8602 * font/manager.c (find_glyph): Make table a const.
8603 (grub_font_get_glyph): Remove bitmap from if statement.
8605 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
8607 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8608 code, first search for device in /dev/mapper, then in /dev.
8609 (grub_util_get_grub_dev): New function.
8610 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8612 * util/grub-probe.c (probe): Remove check for RAID, call
8613 grub_util_get_grub_dev() instead of
8614 grub_util_biosdisk_get_grub_dev().
8615 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8616 grub_util_biosdisk_get_grub_dev().
8617 * util/i386/pc/grub-setup.c (main): Likewise.
8619 2007-05-16 Robert Millan <rmh@aybabtu.com>
8621 * DISTLIST: Update for the latest changes.
8622 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8623 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8624 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8625 grub/util/biosdisk.h.
8626 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8627 grub/util/biosdisk.h.
8629 2007-05-16 Robert Millan <rmh@aybabtu.com>
8631 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
8633 2007-05-16 Robert Millan <rmh@aybabtu.com>
8635 * util/i386/efi/grub-install.in: New.
8636 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
8637 newly added grub-install.
8638 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
8640 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
8641 grub/util/biosdisk.h.
8642 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
8643 grub/util/biosdisk.h.
8645 2007-05-16 Robert Millan <rmh@aybabtu.com>
8647 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
8648 * include/grub/util/biosdisk.h: ... here.
8649 * util/i386/pc/biosdisk.c: Moved to ...
8650 * util/biosdisk.c: ... here.
8651 * util/i386/pc/getroot.c: Moved to ...
8652 * util/getroot.c: ... here.
8653 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
8654 * util/grub-mkdevicemap.c: ... here.
8655 * util/i386/pc/grub-probe.c: Moved to ...
8656 * util/grub-probe.c: ... here.
8658 2007-05-15 Robert Millan <rmh@aybabtu.com>
8660 * util/update-grub.in: Remove duplicated line in grub.cfg header
8663 2007-05-13 Robert Millan <rmh@aybabtu.com>
8665 * util/update-grub.in: Fix a few assumptions about the devices holding
8666 /, /boot and /boot/grub being the same.
8667 * util/grub.d/00_header.in: Likewise.
8668 * util/grub.d/10_hurd.in: Likewise.
8669 * util/grub.d/10_linux.in: Likewise.
8671 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
8672 patterns. Use that to define the `.old' suffix as older than `'.
8674 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
8676 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
8677 the grub.cfg header message.
8679 2007-05-11 Robert Millan <rmh@aybabtu.com>
8681 * util/update-grub.in: Create device.map if it doesn't already exist,
8682 before attempting to run grub-probe.
8683 Check for grub-probe and grub-mkdevicemap with the same code
8684 grub-install is using.
8687 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
8689 * Makefile.in: Add the datarootdir autoconf variable.
8691 2007-05-09 Robert Millan <rmh@aybabtu.com>
8693 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
8694 fail gracefully if dev->disk->partition == NULL.
8696 2007-05-07 Robert Millan <rmh@aybabtu.com>
8698 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
8699 determine partition map module.
8700 * util/i386/pc/grub-install.in: Use this feature to decide which
8701 partition module to load, instead of hardcoding pc and gpt.
8703 2007-05-07 Robert Millan <rmh@aybabtu.com>
8705 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
8706 source directory differs from build directory.
8708 2007-05-05 Robert Millan <rmh@aybabtu.com>
8710 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
8713 2007-05-05 Robert Millan <rmh@aybabtu.com>
8715 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
8717 2007-05-05 Robert Millan <rmh@aybabtu.com>
8719 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
8720 command-line arguments via ${GRUB_CMDLINE_LINUX}.
8722 2007-05-05 Robert Millan <rmh@aybabtu.com>
8724 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
8725 (grub_probe_SOURCES): Likewise.
8726 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
8727 GPT and initialize dos_part and bsd_part accordingly.
8728 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
8730 (main): Activate gpt module for use during partition identification,
8731 and deactivate it afterwards.
8732 * util/i386/pc/grub-install.in: Add gpt module to core.img.
8733 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
8734 partition identification, and deactivate it afterwards.
8736 2007-05-05 Robert Millan <rmh@aybabtu.com>
8738 * term/i386/pc/console.c (grub_console_fini): Call
8739 grub_term_set_current() before grub_term_unregister().
8741 2007-05-04 Robert Millan <rmh@aybabtu.com>
8743 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
8744 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
8745 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
8746 and update-grub_DATA.
8747 * conf/common.rmk: Build and install update-grub components.
8748 * conf/common.mk: Regenerate.
8749 * util/update-grub.in: New. Core of update-grub.
8750 * util/grub.d/00_header.in: New. Generates grub.cfg header.
8751 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
8752 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
8753 * util/grub.d/README: New. Document grub.d directory layout.
8755 2007-05-01 Robert Millan <rmh@aybabtu.com>
8757 * util/grub-emu.c: Move initialization functions
8758 grub_util_biosdisk_init() and grub_init_all() before
8759 grub_util_biosdisk_get_grub_dev(), which relies on them.
8761 2007-04-19 Robert Millan <rmh@aybabtu.com>
8763 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
8766 2007-04-18 Jerone Young <jerone@gmail.com>
8768 * kernel/elf.c: Add missing parenthesis for conditional statement
8771 2007-04-10 Jerone Young <jerone@gmail.com>
8773 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8774 continue on and look for device node with real device name.
8776 2007-04-10 Jerone Young <jerone@gmail.com>
8778 * configure.ac: Add argument for autoconf to use transformation
8780 * Makefile.in: Add autoconf package transformation code.
8781 * util/i386/pc/grub-install.in: Likewise.
8782 * util/powerpc/ieee1275/grub-install.in: Likewise.
8784 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8786 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8787 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8788 (EXT2_REVISION): Likewise.
8789 (EXT2_INODE_SIZE): Likewise.
8790 (struct grub_ext2_block_group): Added a missing member
8792 (grub_ext2_read_inode): Divide by the inode size in a superblock
8793 instead of 128 to obtain INODES_PER_BLOCK.
8794 Use the macro EXT2_INODE_SIZE instead of directly using
8797 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8799 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8800 superblock instead of the structure size to compute an
8801 offset. This fixes the problem that GRUB could not read a
8802 filesystem when inode size is different from 128-byte.
8804 2007-03-05 Marco Gerards <marco@gnu.org>
8806 * normal/main.c (read_config_file): When "menu" is not set, create
8809 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8811 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8812 (HEAP_LIMIT): New macro.
8813 (grub_claim_heap): Claim memory up to `heaplimit'.
8815 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8817 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8818 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8820 (grub_arch_modules_addr): Return address after `_end'.
8821 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8822 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8823 (add_segments): Calculate `_end' from phdr size and location.
8824 (ALIGN_UP): Moved to ...
8825 * include/grub/misc.h: here.
8826 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8828 (GRUB_IEEE1275_MODULE_BASE): Removed.
8830 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8832 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8835 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8837 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8839 (grub_elf64_load_hook_t): Likewise.
8840 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8843 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8845 * kern/mm.c: Update copyright.
8846 (grub_mm_debug): Correct syntax error.
8847 (grub_mm_dump_free): New function.
8848 (grub_debug_free): Call `grub_free'.
8849 * include/grub/mm.h: Update copyright.
8850 (grub_mm_dump_free): Add declaration.
8852 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8854 * include/grub/ieee1275/ieee1275.h: Update copyright.
8855 * kern/powerpc/ieee1275/init.c: Likewise.
8856 * kern/powerpc/ieee1275/openfw.c: Likewise.
8858 * loader/powerpc/ieee1275/linux.c: Likewise.
8859 * include/grub/elfload.h: Likewise.
8860 * kern/elf.c: Likewise.
8861 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8863 (grub_elf64_load): Likewise.
8864 (grub_elf32_load_segment): Move to a nested function.
8865 (grub_elf64_load_segment): Likewise.
8867 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8869 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8871 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8872 (grub_heap_len): Likewise.
8873 (HEAP_SIZE): New macro.
8874 (grub_claim_heap): New function.
8875 (grub_machine_init): Don't claim heap directly. Call
8877 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8878 (grub_available_iterate): New function.
8880 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8882 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8883 * configure.ac: Use it for testing the HOST and TARGET compilers.
8885 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8887 * Makefile.in (enable_grub_emu): New variable.
8888 * configure.ac (--enable-grub-emu): New option.
8889 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8890 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8891 * conf/i386-pc.rmk: Likewise.
8892 * conf/powerpc-ieee1275.rmk: Likewise.
8893 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8895 2006-12-12 Marco Gerards <marco@gnu.org>
8897 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8899 * kern/env.c (grub_env_unset): Don't free the member `value' when
8900 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8903 * normal/main.c (current_menu): Removed.
8904 (free_menu): Unset the `menu' environment variable.
8905 (grub_normal_menu_addentry): Make use of the environment variable
8906 `menu', instead of using the global `current_menu'. Allocate
8907 memory for the sourcecode of this entry.
8908 (read_config_file): New argument `nested', changed all callers.
8909 Only in the case of a new context, initialize a new menu. Set the
8910 `menu' environment variable.
8911 (grub_normal_execute): Don't set and unset the environment
8912 variable `menu' here anymore. Only free the menu when leaving the
8915 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8918 2006-12-11 Marco Gerards <marco@gnu.org>
8920 * normal/menu_entry.c (run): Fix off by one bug so the last line
8921 is executed. Move the loader check to outside the loop.
8923 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8925 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8927 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8929 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8930 the number of sectors. Reported by Andrey Shuvikov
8931 <mr_hyro@yahoo.com>.
8933 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8935 * kern/disk.c (grub_disk_read): When there is a read error, always
8936 try to read only the necessary data.
8938 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8940 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8942 [GRUB_UTIL] (grub_raid_fini): Likewise.
8943 [GRUB_UTIL] (grub_lvm_init): Likewise.
8944 [GRUB_UTIL] (grub_lvm_fini): Likewise.
8945 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8946 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8947 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8948 and grub_raid_fini().
8950 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8952 * include/grub/types.h (__unused): Rename to UNUSED.
8953 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8954 (grub_elf64_size): Likewise.
8956 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8958 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8959 grub_error_push and grub_error_pop in the error-handling path.
8960 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8963 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8965 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8966 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8967 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8968 (kernel_elf_SOURCES): Likewise.
8969 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8970 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8971 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8972 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8973 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8974 (elf_mod_SOURCES): New variable.
8975 (elf_mod_CFLAGS): Likewise.
8976 (elf_mod_LDFLAGS): Likewise.
8977 * include/grub/types.h (__unused): New macro.
8978 * include/grub/elfload.h: New file.
8979 * kern/elf.c: Likewise.
8980 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8981 (ELF32_LOADMASK): New macro.
8982 (ELF64_LOADMASK): Likewise.
8984 (grub_linux_load32): New function.
8985 (grub_linux_load64): Likewise.
8986 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8987 Use grub_elf_t instead of grub_file_t.
8989 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8991 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8992 `catch_result' to struct set_color_args.
8994 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8996 * normal/menu.c: Include grub/script.h.
8997 * normal/menu_entry.c: Likewise.
8998 * include/grub/normal.h: Do not include grub/script.h.
9000 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9002 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9004 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9006 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9008 (grub_disk_close): Print debug messages when closing a disk.
9009 (grub_disk_read): Print debug messages when disk read fails.
9010 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9012 * kern/partition.c: Include misc.h.
9013 (grub_partition_iterate): Print debug messages when detecting
9016 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9018 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9020 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9022 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9024 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9025 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9027 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
9029 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9030 instead of sizeof(lv). Patch by Michael Guntsche.
9032 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
9034 * disk/lvm.c: Rename VGS to VG_LIST.
9035 (grub_lvm_iterate): Change VGS->LV to VG-LV.
9036 (grub_lvm_open): Likewise.
9037 Thanks to Michael Guntsche for finding this bug.
9039 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9041 * configure.ac (AC_INIT): Bumped to 1.95.
9043 2006-10-14 Robert Millan <rmh@aybabtu.com>
9045 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9046 with "/dev/.static/dev/md".
9048 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9050 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9051 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9052 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9053 DRIVE_NAME are always freed.
9055 * util/i386/pc/biosdisk.c (make_device_name): Add one into
9056 DOS_PART, as a DOS partition is counted from one instead of zero
9057 now. Reported by Robert Millan.
9059 2006-10-14 Robert Millan <rmh@aybabtu.com>
9061 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9062 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9063 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9064 string returned by grub_guess_root_device.
9065 * util/i386/pc/grub-setup.c: Likewise.
9066 * util/i386/pc/grub-probefs.c: Likewise.
9068 * util/i386/pc/grub-probefs.c: Rename to ...
9069 * util/i386/pc/grub-probe.c: ... this.
9070 * DISTLIST: Remove grub-probefs, add grub-probe.
9071 * conf/i386-efi.rmk: Likewise.
9072 * conf/i386-pc.rmk: Likewise.
9073 * util/i386/pc/grub-install.in: Likewise.
9075 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9076 choose which information we want to print.
9078 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9080 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9081 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9082 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9083 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9084 video/readers/tga.c and video/i386/pc/vbeutil.c.
9086 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9088 Added support for RAID and LVM.
9090 * disk/lvm.c: New file.
9091 * disk/raid.c: Likewise.
9092 * include/grub/lvm.h: Likewise.
9093 * include/grub/raid.h: Likewise.
9094 * include/grub/util/lvm.h: Likewise.
9095 * include/grub/util/raid.h: Likewise.
9096 * util/lvm.c: Likewise.
9097 * util/raid.c: Likewise.
9099 * include/grub/disk.h (grub_disk_dev_id): Add
9100 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9101 (grub_disk_get_size): New prototype.
9102 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9103 returns a partition.
9104 (grub_disk_get_size): New function.
9106 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9107 verbatim if grub_install_dos_part is -2.
9109 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9112 * util/i386/pc/grub-setup.c (setup): New argument
9113 MUST_EMBED. Force embedding of GRUB when the argument is
9114 true. Close FILE before returning.
9115 (main): Add support for RAID and LVM.
9117 * conf/common.rmk: Add RAID and LVM modules.
9118 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9120 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9122 * kern/misc.c (grub_strstr): New function.
9123 * include/grub/misc.h (grub_strstr): New prototype.
9125 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9127 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9129 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9131 * kern/misc.c (grub_strtoull): Guess the base only if not
9134 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9136 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9139 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9141 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9143 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9144 Remove `flags' argument. All callers changed.
9145 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9146 (IEEE1275_IHANDLE_INVALID): New variable.
9147 (IEEE1275_CELL_INVALID): New variable.
9148 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9149 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9150 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9151 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9152 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9153 codes from Open Firmware. All callers updated.
9154 (grub_ieee1275_next_property): Directly return Open Firmware return
9156 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9157 Standardize error checking from `grub_ieee1275_get_property'.
9158 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9159 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9161 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
9163 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9164 `instance_to_package_args' to `instance_to_path_args'.
9166 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9167 `grub_ieee1275_chosen'.
9169 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9170 `grub_ieee1275_interpret'.
9172 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9174 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9176 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
9178 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9179 (__cmpdi): Likewise.
9181 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9182 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9185 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
9187 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9188 to type `grub_ssize_t'.
9189 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9191 2006-09-22 Marco Gerards <marco@gnu.org>
9193 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9196 2006-09-22 Marco Gerards <marco@gnu.org>
9198 * commands/echo.c: New file.
9200 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9202 * conf/common.rmk (echo_mod_SOURCES): New variable.
9203 (echo_mod_CFLAGS): Likewise.
9204 (echo_mod_LDFLAGS): Likewise.
9206 2006-09-22 Marco Gerards <marco@gnu.org>
9208 * normal/main.c (get_line): Malloc memory instead of using
9209 preallocated memory. Removed the arguments `cmdline' and
9210 `max_len'. Updated all callers.
9212 2006-09-22 Marco Gerards <marco@gnu.org>
9214 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9215 (normal_mod_DEPENDENCIES): Likewise.
9217 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9218 (normal_mod_DEPENDENCIES): Likewise.
9220 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9222 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
9224 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9226 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9227 (normal_mod_DEPENDENCIES): Likewise.
9228 * conf/i386-pc.mk: Regenerate.
9229 * conf/i386-efi.mk: Likewise
9230 * conf/common.mk: Likewise.
9231 * conf/powerpc-ieee1275.mk: Likewise.
9232 * conf/sparc64-ieee1275.mk: Likewise.
9234 2006-09-22 Robert Millan <rmh@aybabtu.com>
9236 Sync with i386 version.
9237 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9238 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9240 2006-09-21 Robert Millan <rmh@aybabtu.com>
9242 Import from GRUB Legacy (lib/device.c):
9243 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9244 (init_device_map) [__linux__]: Add support for I2O devices.
9246 2006-09-14 Marco Gerards <marco@gnu.org>
9248 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9251 2006-09-14 Robert Millan <rmh@aybabtu.com>
9253 * util/i386/pc/grub-install.in: Skip menu.lst when removing
9256 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
9258 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9259 before adding it to device.map.
9261 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
9263 * genmk.rb: Let GCC generate dependencies the first time it
9264 compiles a file; using the -MD option.
9265 * conf/common.mk: Regenerate.
9266 * conf/i386-pc.mk: Likewise.
9267 * conf/i386-efi.mk: Likewise.
9268 * conf/powerpc-ieee1275.mk: Likewise.
9269 * conf/sparc64-ieee1275.mk: Likewise.
9271 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
9273 Move the prototypes of grub_setjmp and grub_longjmp to
9274 cpu/setjmp.h, so that each architecture may specify different
9277 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
9278 (grub_longjmp): Likewise.
9279 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
9280 (grub_longjmp): Likewise.
9281 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
9282 (grub_longjmp): Likewise.
9284 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
9285 [!GRUB_UTIL] (grub_longjmp): Removed.
9287 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
9289 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
9290 "color!" method does not return any value.
9292 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9294 * include/grub/bitmap.h: New file.
9296 * include/grub/i386/pc/vbeutil.h: Likewise.
9298 * video/bitmap.c: Likewise.
9300 * video/readers/tga.c: Likewise.
9302 * video/i386/pc/vbeutil.c: Likewise.
9304 * commands/videotest.c: Code cleanup and updated to reflect to new
9307 * term/gfxterm.c: Likewise.
9309 * video/video.c: Likewise.
9311 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
9312 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
9313 (bitmap_mod_SOURCES): New entry.
9314 (bitmap_mod_CFLAGS): Likewise.
9315 (bitmap_mod_LDFLAGS): Likewise.
9316 (tga_mod_SOURCES): Likewise.
9317 (tga_mod_CFLAGS): Likewise.
9318 (tga_mod_LDFLAGS): Likewise.
9320 * include/grub/video.h (grub_video_blit_operators): New enum type.
9321 (grub_video_render_target): Changed as forward declaration and moved
9322 actual definition to be video driver specific.
9323 (grub_video_adapter.blit_bitmap): Added blitting operator.
9324 (grub_video_adapter.blit_render_target): Likewise.
9325 (grub_video_blit_bitmap): Likewise.
9326 (grub_video_blit_render_target): Likewise.
9328 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9329 driver specific render target definition.
9330 (grub_video_vbe_map_rgba): Added driver internal helper.
9331 (grub_video_vbe_unmap_color): Updated to use
9332 grub_video_i386_vbeblit_info.
9333 (grub_video_vbe_get_video_ptr): Likewise.
9335 * include/grub/i386/pc/vbeblit.h
9336 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9337 grub_video_i386_vbeblit_info.
9338 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9339 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9340 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9341 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9342 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9343 (grub_video_i386_vbeblit_index_index): Likewise.
9344 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9345 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9346 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9347 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9349 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9352 * video/i386/pc/vbeblit.c: Updated to reflect changes on
9353 include/grub/i386/pc/vbeblit.h.
9355 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9356 Updated to use grub_video_i386_vbeblit_info.
9357 (grub_video_i386_vbefill_R8G8B8): Likewise.
9358 (grub_video_i386_vbefill_index): Likewise.
9359 (grub_video_i386_vbefill): Added generic filler.
9361 * video/i386/pc/vbefill.c: Updated to reflect changes on
9362 include/grub/i386/pc/vbefill.h.
9364 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9365 grub_video_i386_vbeblit_info.
9366 (grub_video_vbe_unmap_color): Likewise.
9367 (grub_video_vbe_blit_glyph): Likewise.
9368 (grub_video_vbe_scroll): Likewise.
9369 (grub_video_vbe_draw_pixel): Removed function.
9370 (grub_video_vbe_get_pixel): Likewise.
9371 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9372 updated code to use it.
9373 (common_blitter): Added common blitter for render target and bitmap.
9374 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9375 (grub_video_vbe_blit_render_target): Likewise.
9377 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
9379 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9380 is in text mode if there is no console control protocol instance
9383 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9385 * include/grub/video.h: Code cleanup.
9387 * include/grub/i386/pc/vbe.h: Likewise.
9389 * video/i386/pc/vbe.c: Likewise.
9391 * video/i386/pc/vbeblit.c: Likewise.
9393 * video/i386/pc/vbefill.c: Likewise.
9395 * video/video.c: Likewise. Also added more comments.
9397 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
9399 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9400 (struct grub_biosdisk_dap): Likewise.
9402 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
9403 linkage settings for all functions.
9405 2006-07-12 Marco Gerards <marco@gnu.org>
9407 * configure.ac (--enable-mm-debug): Fix typo.
9409 * genkernsyms.sh.in: Use proper quoting for `CC'.
9411 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
9413 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9414 (normal_mod_ASFLAGS): Remove "-m32".
9416 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
9418 * util/misc.c: Include config.h.
9419 [!HAVE_MEMALIGN]: Do not include malloc.h.
9420 (grub_memalign): Use posix_memalign, if present. Then, use
9421 memalign, if present. Otherwise, emit an error.
9423 * util/grub-emu.c: Do not include malloc.h.
9425 * include/grub/util/misc.h: Include unistd.h. This is required for
9426 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9427 D. Eades III <hde@foobar-qux.org>.
9429 * configure.ac (AC_GNU_SOURCE): Added.
9430 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9433 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
9435 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9436 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9438 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
9440 * include/grub/types.h (grub_host_addr_t): Rename to
9442 (grub_host_off_t): Rename to grub_target_off_t.
9443 (grub_host_size_t): Rename to grub_target_size_t.
9444 (grub_host_ssize_t): Rename to grub_target_ssize_t.
9445 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9447 * include/grub/kernel.h (struct grub_module_header): Change type
9448 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9449 (grub_module_info): Likewise.
9451 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9453 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9454 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9455 Velazquez <jesus.velazquez@gmail.com>.
9457 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
9459 Count partitions from 1 instead of 0 in the string representation
9460 of partitions. Still use 0-based internally.
9462 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9463 (sun_partition_map_iterate): Use grub_partition_t instead of
9464 struct grub_partition *. Cast DESC->START_CYLINDER to
9465 grub_uint64_t after converting the endian.
9466 (sun_partition_map_probe): Subtract 1 for PARTNUM.
9467 (sun_partition_map_get_name): Add 1 to P->INDEX.
9469 * partmap/pc.c (grub_partition_parse): Subtract 1 for
9471 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9473 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9474 zero instead of one.
9475 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9476 (gpt_partition_map_get_name): Add 1 into P->INDEX.
9478 * partmap/apple.c (apple_partition_map_iterate): Change the type
9480 (apple_partition_map_probe): Subtract 1 for PARTNUM.
9481 (apple_partition_map_get_name): Add 1 into P->INDEX.
9483 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9485 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9486 calculate the offset of a partition.
9487 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9488 (amiga_partition_map_get_name): Add 1 into P->INDEX.
9490 * partmap/acorn.c (acorn_partition_map_find): Change the type of
9491 SECTOR to grub_disk_addr_t.
9492 (acorn_partition_map_iterate): Likewise.
9493 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9494 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9496 (acorn_partition_map_get_name): Add 1 into P->INDEX.
9498 * kern/i386/pc/init.c (make_install_device): Add 1 into
9499 GRUB_INSTALL_DOS_PART.
9501 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9504 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9506 Clean up the code to support 64-bit addressing in disks and
9507 files. This change is not enough for filesystems yet.
9509 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9510 type of "start" to grub_uint64_t.
9511 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9512 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9513 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9516 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9517 to grub_disk_addr_t.
9519 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9522 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9524 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9527 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9529 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9531 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9533 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9534 to grub_off_t, to detect an error from grub_file_seek.
9535 (grub_multiboot_load_elf32): Likewise.
9537 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9538 maximum unsigned long value when an overflow is detected.
9539 (grub_strtoull): New function.
9540 (grub_divmod64): Likewise.
9541 (grub_lltoa): use grub_divmod64.
9543 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9545 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9546 the pointer to next character. Use grub_strtoull instead of
9548 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9549 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9552 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9553 return value is signed.
9554 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9555 test if OFFSET is less than zero, as OFFSET is unsigned now.
9557 * kern/disk.c (struct grub_disk_cache): Change the type of
9558 "sector" to grub_disk_addr_t.
9559 (grub_disk_cache_get_index): Change the type of SECTOR to
9560 grub_disk_addr_t. Calculate the hash with SECTOR casted to
9561 unsigned after shifting.
9562 (grub_disk_cache_invalidate): Change the type of SECTOR to
9564 (grub_disk_cache_unlock): Likewise.
9565 (grub_disk_cache_store): Likewise.
9566 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9567 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9568 grub_disk_addr_t and grub_uint64_t, respectively.
9569 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9570 body, as the value of OFFSET is tweaked by
9571 grub_disk_check_range. Change the types of START_SECTOR, LEN and
9572 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9574 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9575 body, as the value of OFFSET is tweaked by
9576 grub_disk_check_range. Change the types of LEN and N to
9579 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9580 and "saved_offset" to grub_off_t.
9581 (test_header): Cast BUF to char *.
9582 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9584 (grub_gzio_read): Change the types of OFFSET and SIZE to
9585 grub_off_t and grub_size_t, respectively.
9587 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9589 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9590 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9591 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9592 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9593 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9595 * include/grub/types.h (grub_off_t): Unconditionally set to
9597 (grub_disk_addr_t): Changed to grub_uint64_t.
9599 * include/grub/partition.h (struct grub_partition): Change the
9600 types of "start", "len" and "offset" to grub_disk_addr_t,
9601 grub_uint64_t and grub_disk_addr_t, respectively.
9602 (grub_partition_get_start): Return grub_disk_addr_t.
9603 (grub_partition_get_len): Return grub_uint64_t.
9605 * include/grub/misc.h (grub_strtoull): New prototype.
9606 (grub_divmod64): Likewise.
9608 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9609 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9610 grub_off_t, respectively.
9611 All callers and references changed.
9613 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9614 grub_size_t in "read".
9615 All callers and references changed.
9617 * include/grub/file.h (struct grub_file): Change the types of
9618 "offset" and "size" to grub_off_t and grub_off_t,
9619 respectively. Change the type of SECTOR to grub_disk_addr_t in
9621 (grub_file_read): Change the type of LEN to grub_size_t.
9622 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9624 (grub_file_size): Return grub_off_t.
9625 (grub_file_tell): Likewise.
9626 All callers and references changed.
9628 * include/grub/disk.h (struct grub_disk_dev): Change the types of
9629 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
9631 (struct grub_disk): Change the type of "total_sectors" to
9632 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
9634 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
9635 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
9636 (grub_disk_write): Likewise.
9637 All callers and references changed.
9639 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
9640 char * for grub_strncmp to silence gcc.
9641 (grub_iso9660_mount): Likewise.
9642 (grub_iso9660_mount): Likewise.
9643 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
9645 (grub_iso9660_iterate_dir): Likewise.
9646 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
9648 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
9649 LEN to grub_disk_addr_t and grub_size_t, respectively.
9651 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9653 * fs/jfs.c (grub_jfs_read_file): Likewise.
9655 * fs/minix.c (grub_jfs_read_file): Likewise.
9657 * fs/sfs.c (grub_jfs_read_file): Likewise.
9659 * fs/ufs.c (grub_jfs_read_file): Likewise.
9661 * fs/xfs.c (grub_jfs_read_file): Likewise.
9663 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
9664 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
9667 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
9668 BLKNR to -1 instead of returning GRUB_ERRNO.
9669 (grub_ext2_read_file): Change the types of SECTOR and
9670 LEN to grub_disk_addr_t and grub_size_t, respectively.
9672 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
9673 LEN to grub_disk_addr_t and grub_size_t, respectively.
9675 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
9678 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
9679 string. Do not cast SECTOR explicitly.
9681 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
9682 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
9683 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
9684 grub_disk_addr_t and grub_size_t, respectively. If the sector is
9685 over 2TB and LBA mode is not supported, raise an error.
9686 (get_safe_sectors): New function.
9687 (grub_biosdisk_read): Use get_safe_sectors.
9688 (grub_biosdisk_write): Likewise.
9690 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
9691 (grub_efidisk_write): Likewise.
9693 * disk/loopback.c (delete_loopback): Cosmetic changes.
9694 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
9696 (grub_loopback_open): Likewise.
9697 (grub_loopback_read): Likewise. Also, change the type of POS to
9698 grub_off_t, and fix the usage of grub_memset.
9700 * commands/i386/pc/play.c: Include grub/machine/time.h.
9702 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
9705 * commands/configfile.c: Include grub/env.h.
9707 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
9708 GRUB_ERRNO directly instead. Change the type of POS to
9709 grub_off_t. Follow the coding standard.
9711 * commands/blocklist.c: Include grub/partition.h.
9712 (grub_cmd_blocklist): Return an error if the underlying device is
9713 not a disk. Take the starting sector of a partition into account,
9714 if a partition is used.
9716 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
9718 (lba_mode): Support 64-bit addresses.
9719 (chs_mode): Likewise.
9720 (copy_buffer): Adapted to the new offsets of a length field and a
9722 (blocklist_default_start): Allocate 64-bit space.
9724 * boot/i386/pc/boot.S (force_lba): Removed.
9725 (boot_drive): Moved to under KERNEL_SECTOR.
9726 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
9728 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
9730 (lba_mode): Refactored to support a 64-bit address. More size
9732 (setup_sectors): Likewise.
9734 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
9736 * DISTLIST: Added include/grub/i386/linux.h. Removed
9737 include/grub/i386/pc/linux.h
9739 * configure.ac (AC_INIT): Bumped to 1.94.
9741 * config.guess: Updated from gnulib.
9742 * config.sub: Likewise.
9743 * install-sh: Likewise.
9744 * mkinstalldirs: Likewise.
9746 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9748 * conf/common.rmk (grub_modules_init.lst): Depended on
9749 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
9752 * genmk.rb (PModule::rule): Reverted the previous change.
9754 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
9756 * conf/common.rmk (grub_modules_init.lst): Depends on
9757 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
9758 that the target does not exist before producing.
9759 (grub_modules_init.h): Remove the target before generating.
9760 (grub_emu_init.c): Likewise.
9762 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
9764 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
9766 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
9767 for the target-specific tests. Make sure that we also have the
9768 up-to-date target variables for those tests.
9770 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9772 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9773 (PModule::rule): Likewise.
9775 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9777 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9778 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9779 target-specific flags should be prefixed.
9780 (PModule::rule): Likewise.
9782 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9784 * configure.ac (CMP): Check if cmp is available explicitly.
9786 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9788 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9789 (target_cpu): New variable.
9790 (pkglibdir): Use target_cpu instead of host_cpu.
9792 * util/i386/pc/grub-install.in (host_cpu): Removed.
9793 (target_cpu): New variable.
9794 (pkglibdir): Use target_cpu instead of host_cpu.
9796 * util/genmoddep.c: Removed.
9798 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9799 instead of GRUB_HOST_SIZEOF_VOID_P.
9800 * kern/dl.c: Likewise.
9802 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9804 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9805 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9806 (GRUB_TARGET_SIZEOF_LONG): ... this.
9807 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9808 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9809 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9811 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9812 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9813 (GRUB_TARGET_SIZEOF_LONG): ... this.
9814 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9815 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9816 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9818 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9819 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9820 (GRUB_TARGET_SIZEOF_LONG): ... this.
9821 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9822 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9824 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9825 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9826 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9827 instead of GRUB_HOST_SIZEOF_LONG.
9828 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9829 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9830 GRUB_CPU_WORDS_BIGENDIAN.
9831 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9832 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9835 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9836 (genmoddep_SOURCES): Likewise.
9837 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9838 (genmoddep_SOURCES): Likewise.
9839 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9840 (genmoddep_SOURCES): Likewise.
9841 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9843 (genmoddep_SOURCES): Likewise.
9845 * genmoddep.awk: New file.
9847 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9848 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9849 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9850 (PModule::rule): Likewise.
9851 (Program::rule): Likewise.
9852 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9853 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9856 * configure.ac: Rewritten intensively to use host and target
9857 instead of build and host, respectively.
9859 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9860 (host_cpu): Removed.
9861 (target_cpu): New variable.
9862 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9863 (BUILD_CC): Removed.
9864 (BUILD_CFLAGS): Likewise.
9865 (BUILD_CPPFLAGS): Likewise.
9866 (TARGET_CC): New variable.
9867 (TARGET_CFLAGS): Likewise.
9868 (TARGET_CPPFLAGS): Likewise.
9869 (TARGET_LDFLAGS): Likewise.
9871 (include): Use target_cpu instead of host_cpu.
9872 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
9874 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9876 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9878 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9879 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9880 field 'false' to 'exec_on_false'.
9881 (grub_script_create_cmdif): Renamed argument names to reflect above
9884 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9886 * normal/script.c (grub_script_create_cmdif): Likewise.
9888 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9890 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9892 (grub_hfsplus_btree_recptr): Likewise.
9893 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9894 FILEBLOCK both to pass a block number and store next block
9896 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9897 overflow file correctly. Specify errors appropriately, because
9898 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9899 grub_hfsplus_btree_recptr to get the pointer to a found key.
9900 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9903 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9905 (_linux_mod_SOURCES): New variable.
9906 (_linux_mod_CFLAGS): Likewise.
9907 (_linux_mod_LDFLAGS): Likewise.
9908 (linux_mod_SOURCES): Likewise.
9909 (linux_mod_CFLAGS): Likewise.
9910 (linux_mod_LDFLAGS): Likewise.
9912 * DISTLIST: Added loader/i386/efi/linux.c,
9913 loader/i386/efi/linux_normal.c and
9914 include/grub/i386/efi/loader.h.
9916 * loader/i386/efi/linux.c: New file.
9917 * loader/i386/efi/linux_normal.c: Likewise.
9918 * include/grub/i386/efi/loader.h: Likewise.
9920 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9922 * commands/blocklist.c: New file.
9924 * DISTLIST: Added commands/blocklist.c.
9926 * term/efi/console.c (grub_console_highlight_color): Use a lighter
9927 color for the background, and a darker color for the foreground.
9928 (grub_console_checkkey): Return READ_KEY.
9929 (grub_console_cls): Set the background to
9930 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9932 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9934 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9935 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9937 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9940 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9941 BG. The spec is wrong again.
9943 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9945 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9947 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9948 commands/blocklist.c.
9949 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9951 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9952 (blocklist_mod_SOURCES): New variable.
9953 (blocklist_mod_CFLAGS): Likewise.
9954 (blocklist_mod_LDFLAGS): Likewise.
9956 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9958 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9960 (lba_mode): Use %eax more intensively to reduce the code size.
9962 2006-05-20 Marco Gerards <marco@gnu.org>
9964 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9966 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9968 (script): Accept leading newlines.
9969 (newlines): New rule to describe 0 or more newlines.
9970 (commands): Accept `command' with trailing newline. Fixed the
9971 order in which arguments were passed to `grub_script_add_cmd'.
9972 Accept commands separated by newlines.
9973 (function): Changed to accept newlines.
9974 (menuentry) Rewritten.
9976 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9977 front of the list, instead of to the end.
9979 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9981 * util/i386/pc/grub-install.in (bindir): New variable.
9982 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9983 Shaver <lbgwjl@gmail.com>.
9985 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9987 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9988 grub/machine/linux.h
9989 * loader/i386/pc/linux.c: Likewise.
9991 * include/grub/i386/pc/linux.h: Moved to ...
9992 * include/grub/i386/linux.h: ... here.
9994 * include/grub/i386/linux.h (struct linux_kernel_params): New
9997 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9999 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10001 (grub_video_vbe_blit_glyph): Likewise.
10002 (grub_video_vbe_blit_bitmap): Likewise.
10003 (grub_video_vbe_blit_render_target): Likewise.
10005 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10007 * configure.ac (--with-platform): Properly quote the square
10010 2006-05-08 Marco Gerards <marco@gnu.org>
10012 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10014 (kernel_elf_HEADERS): ...to this. Updated all users.
10015 (grubof_symlist.c): Renamed from this...
10016 (kernel_elf_symlist.c): ...to this. Updated all users.
10017 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10018 (grubof_SOURCES): Renamed from this...
10019 (kernel_elf_SOURCES): ...to this.
10020 (grubof_HEADERS): Renamed from this...
10021 (kernel_elf_HEADERS): ...to this.
10022 (grubof_CFLAGS): Renamed from this...
10023 (kernel_elf_CFLAGS): ...to this.
10024 (grubof_ASFLAGS): Renamed from this...
10025 (kernel_elf_ASFLAGS): ...to this.
10026 (grubof_LDFLAGS): Renamed from this...
10027 (kernel_elf_LDFLAGS): ...to this.
10029 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10031 (kernel_elf_HEADERS): ...to this. Updated all users.
10032 (grubof_symlist.c): Renamed from this...
10033 (kernel_elf_symlist.c): ...to this. Updated all users.
10034 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10035 (grubof_SOURCES): Renamed from this...
10036 (kernel_elf_SOURCES): ...to this.
10037 (grubof_HEADERS): Renamed from this...
10038 (kernel_elf_HEADERS): ...to this.
10039 (grubof_CFLAGS): Renamed from this...
10040 (kernel_elf_CFLAGS): ...to this.
10041 (grubof_ASFLAGS): Renamed from this...
10042 (kernel_elf_ASFLAGS): ...to this.
10043 (grubof_LDFLAGS): Renamed from this...
10044 (kernel_elf_LDFLAGS): ...to this.
10046 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10047 `kernel.elf' instead of `grubof'.
10049 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
10051 Add --with-platform to configure. Use pkglibdir instead of
10052 pkgdatadir. This is reported by Roger Leigh.
10054 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10055 (host_vendor): Likewise.
10056 (host_os): Likewise.
10057 (pkgdatadir): Likewise.
10058 (platform): New variable.
10059 (pkglibdir): Likewise.
10060 Use PKGLIBDIR instead of PKGDATADIR.
10062 * util/i386/pc/grub-install.in (datadir): Removed.
10063 (host_vendor): Likewise.
10064 (host_os): Likewise.
10065 (pkgdatadir): Likewise.
10066 (platform): New variable.
10067 (pkglibdir): Likewise.
10068 Use PKGLIBDIR instead of PKGDATADIR.
10070 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10071 instead of GRUB_DATADIR.
10073 * util/i386/pc/grub-mkimage.c (usage): Likewise.
10075 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10078 * configure.ac (--with-platform): New option.
10079 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10081 * Makefile.in: Include a makefile based on PLATFORM instead of
10083 (pkgdatadir): Not appended by the machine type.
10084 (pkglibdir): Appended by the machine type.
10085 (host_vendor): Removed.
10086 (platform): New variable.
10087 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10088 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10089 (uninstall): Likewise.
10091 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10093 Use the environment context in the menu. Remove the commands
10094 "default" and "timeout", and use variables instead.
10096 * normal/menu.c: Include grub/env.h.
10097 (print_entry): Cast TITLE to silence gcc.
10098 (get_timeout): New function.
10099 (set_timeout): Likewise.
10100 (get_entry_number): Likewise.
10101 (run_menu): Use a default entry, a fallback entry and a timeout
10102 in the environment variables "default", "fallback" and
10103 "timeout". Also, tweak the default entry if it is not within the
10104 current menu entries.
10105 (grub_menu_run): Use a fallback entry in the environment variable
10108 * normal/main.c (read_config_file): Do not initialize
10109 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10111 (grub_normal_execute): Use a data slot to store the menu.
10113 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10114 fallback_entry and timeout.
10115 (struct grub_menu_list): Removed.
10116 (grub_menu_list_t): Likewise.
10117 (struct grub_context): Likewise.
10118 (grub_context_t): Likewise.
10119 (grub_context_get): Likewise.
10120 (grub_context_get_current_menu): Likewise.
10121 (grub_context_push_menu): Likewise.
10122 (grub_context_pop_menu): Likewise.
10123 (grub_default_init): Likewise.
10124 (grub_default_fini): Likewise.
10125 (grub_timeout_init): Likewise.
10126 (grub_timeout_fini): Likewise.
10128 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10130 (normal_mod_SOURCES): Removed normal/context.c.
10132 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10133 commands/default.c, commands/timeout.c and normal/context.c.
10134 (normal_mod_SOURCES): Removed normal/context.c.
10136 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10137 commands/timeout.c and normal/context.c.
10138 (normal_mod_SOURCES): Removed normal/context.c.
10140 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10141 commands/default.c, commands/timeout.c and normal/context.c.
10142 (normal_mod_SOURCES): Removed normal/context.c.
10144 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10146 (default_mod_SOURCES): Removed.
10147 (default_mod_CFLAGS): Likewise.
10148 (default_mod_LDFLAGS): Likewise.
10149 (timeout_mod_SOURCES): Removed.
10150 (timeout_mod_CFLAGS): Likewise.
10151 (timeout_mod_LDFLAGS): Likewise.
10153 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10156 * commands/default.c: Removed.
10157 * commands/timeout.c: Likewise.
10158 * normal/context.c: Likewise.
10160 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10162 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10164 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10166 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10167 "next" to "prev" for readability.
10168 (struct grub_env_sorted_var): New struct.
10169 (grub_env_context): Renamed to ...
10170 (initial_context): ... this.
10171 (grub_env_var_context): Renamed to ...
10172 (current_context): ... this.
10173 (grub_env_find): Look only at CURRENT_CONTEXT.
10174 (grub_env_context_open): Rewritten to copy exported variables from
10176 (grub_env_context_close): Rewritten according to the new
10177 scheme. Also, add an assertion to prevent the initial context from
10179 (grub_env_insert): Removed the code for the sorted list.
10180 (grub_env_remove): Likewise.
10181 (grub_env_export): Simply mark the variable with
10182 GRUB_ENV_VAR_GLOBAL.
10183 (grub_env_set): A cosmetic change for naming consistency.
10184 (grub_env_get): Likewise.
10185 (grub_env_unset): Likewise.
10186 (grub_env_iterate): Rewritten to sort variables within this
10188 (grub_register_variable_hook): Fixed for naming consistency. Call
10189 grub_env_find again, only if NAME is not found at the first time.
10190 (mangle_data_slot_name): New function.
10191 (grub_env_set_data_slot): Likewise.
10192 (grub_env_get_data_slot): Likewise.
10193 (grub_env_unset_data_slot): Likewise.
10195 * include/grub/env.h (grub_env_var_type): New enum.
10196 (GRUB_ENV_VAR_LOCAL): New constant.
10197 (GRUB_ENV_VAR_GLOBAL): Likewise.
10198 (GRUB_ENV_VAR_DATA): Likewise.
10199 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10201 (grub_env_set): Replace VAR with NAME for consistency.
10202 (grub_register_variable_hook): Likewise.
10203 (grub_env_export): Specify the name of the argument.
10204 (grub_env_set_data_slot): New prototype.
10205 (grub_env_get_data_slot): Likewise.
10206 (grub_env_unset_data_slot): Likewise.
10208 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10210 Extend the loader so that GRUB can accept a loader which comes
10211 back to GRUB when a loaded image exits. Also, this change adds
10212 support for a chainloader on EFI.
10214 * term/efi/console.c: Include grub/misc.h.
10215 (grub_console_checkkey): Display a scan code on the top for
10216 debugging. This will be removed once the EFI port gets stable.
10217 Correct the scan code mapping.
10219 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10220 allocate memory from larger regions, in order to reduce the number
10221 of allocated regions. Otherwise, the MacOSX loader panics.
10222 (filter_memory_map): Avoid less than 1MB for compatibility with
10224 (add_memory_regions): Allocate from the tail of a region, if
10225 possible, to avoid allocating a region near to 1MB, for the MacOSX
10228 * kern/efi/init.c (grub_efi_set_prefix): Specify
10229 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10231 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10232 argument IMAGE_HANDLE and specify it to get a loaded image.
10233 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10234 grub_efi_get_loaded_image.
10235 (grub_efi_get_filename): Divide the length by the size of
10237 (grub_efi_get_device_path): New function.
10238 (grub_efi_print_device_path): Print End Device Path nodes. Divide
10239 the length by the size of grub_efi_char16_t for a file path device
10242 * kern/loader.c (grub_loader_noreturn): New variable.
10243 (grub_loader_set): Accept a new argument NORETURN. Set
10244 GRUB_LOADER_NORETURN to NORETURN.
10245 All callers changed.
10246 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10249 * include/grub/efi/efi.h (grub_efi_get_device_path): New
10251 (grub_efi_get_loaded_image): Take an argument to specify an image
10254 * include/grub/loader.h (grub_loader_set): Added one more argument
10257 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10258 instead of grub_efi_open_protocol.
10259 (grub_efidisk_get_device_name): Likewise.
10260 (grub_efidisk_close): Print a newline.
10261 (grub_efidisk_get_device_handle): Fixed to use
10262 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10263 GRUB_EFI_DEVICE_PATH_TYPE.
10265 * disk/efi/efidisk.c (device_path_guid): Moved to ...
10266 * kern/efi/efi.c (device_path_guid): ... here.
10268 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
10270 (kernel_mod_HEADERS): Added efi/disk.h.
10271 (_chain_mod_SOURCES): New variable.
10272 (_chain_mod_CFLAGS): Likewise.
10273 (_chain_mod_LDFLAGS): Likewise.
10274 (chain_mod_SOURCES): Likewise.
10275 (chain_mod_CFLAGS): Likewise.
10276 (chain_mod_LDFLAGS): Likewise.
10278 * DISTLIST: Added include/grub/efi/chainloader.h,
10279 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
10281 * include/grub/efi/chainloader.h: New file.
10282 * loader/efi/chainloader.c: Likewise.
10283 * loader/efi/chainloader_normal.c: Likewise.
10285 2006-04-30 Marco Gerards <marco@gnu.org>
10287 * commands/configfile.c (grub_cmd_source): New function.
10288 (GRUB_MOD_INIT): Register the commands `source' and `.'.
10289 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
10291 2006-04-30 Marco Gerards <marco@gnu.org>
10293 * normal/execute.c (grub_script_execute_cmd): Change the return
10294 type to `grub_err_t'. Correctly return the error.
10295 (grub_script_execute_cmdline): In case a command line is not a
10296 command or a function, try to interpret it as an assignment.
10298 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10300 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
10301 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
10302 skip a node whose name is obviously invalid as UTF-16,
10303 i.e. contains a NUL character. Stop the iteration when the last
10304 directory entry is found. Instead of using the return value of
10305 grub_hfsplus_btree_iterate_node, store the value in RET and use
10306 it, because the iterator can be stopped by the last directory
10309 2006-04-30 Marco Gerards <marco@gnu.org>
10311 * include/grub/env.h (grub_env_export): New prototype. Reported
10312 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
10314 2006-04-30 Marco Gerards <marco@gnu.org>
10316 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
10317 size of the extents in a catalog file record.
10319 2006-04-29 Marco Gerards <marco@gnu.org>
10321 * commands/configfile.c (grub_cmd_configfile): Execute the
10322 configfile within its own context.
10324 * include/grub/env.h (grub_env_context_open): New prototype.
10325 (grub_env_context_close): Likewise.
10327 * kern/env.c (grub_env): Removed.
10328 (grub_env_sorted): Likewise.
10329 (grub_env_context): New variable.
10330 (grub_env_var_context): Likewise.
10331 (grub_env_find): Search both the active context and the global
10333 (grub_env_context_open): New function.
10334 (grub_env_context_close): Likewise.
10335 (grub_env_insert): Likewise.
10336 (grub_env_remove): Likewise.
10337 (grub_env_export): Likewise.
10338 (grub_env_set): Changed to use helper functions to avoid code
10340 (grub_env_iterate): Rewritten so both the current context and the
10341 global context are being used.
10343 * normal/command.c (export_command): New function.
10344 (grub_command_init): Register the `export' function.
10346 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
10348 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10349 explicitly to suppress gcc's warnings.
10350 * fs/fat.c (grub_fat_find_dir): Likewise.
10351 (grub_fat_label): Likewise.
10352 * fs/xfs.c (grub_xfs_read_inode): Likewise.
10353 (grub_xfs_mount): Likewise.
10354 (grub_xfs_label): Likewise.
10355 * fs/affs.c (grub_affs_mount): Likewise.
10356 (grub_affs_label): Likewise.
10357 (grub_affs_iterate_dir): Likewise.
10358 * fs/sfs.c (grub_sfs_mount): Likewise.
10359 (grub_sfs_iterate_dir): Likewise.
10360 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10361 * fs/hfs.c (grub_hfs_mount): Likewise.
10362 (grub_hfs_cmp_catkeys): Likewise.
10363 (grub_hfs_find_dir): Likewise.
10364 (grub_hfs_dir): Likewise.
10365 (grub_hfs_label): Likewise.
10366 * fs/jfs.c (grub_jfs_mount): Likewise.
10367 (grub_jfs_opendir): Likewise.
10368 (grub_jfs_getent): Likewise.
10369 (grub_jfs_lookup_symlink): Likewise.
10370 (grub_jfs_label): Likewise.
10371 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10372 (grub_hfsplus_iterate_dir): Likewise.
10373 (grub_hfsplus_btree_iterate_node): Made static.
10375 * util/grub-emu.c (prefix): New variable.
10376 (grub_machine_set_prefix): New function.
10377 (main): Do not set the environment variable "prefix" here. Only
10378 set PREFIX, which is used later by grub_machine_set_prefix.
10380 * include/grub/video.h: Do not include grub/symbol.h.
10381 (grub_video_register): Not exported. This symbol is not defined in
10383 (grub_video_unregister): Likewise.
10384 (grub_video_iterate): Likewise.
10385 (grub_video_setup): Likewise.
10386 (grub_video_restore): Likewise.
10387 (grub_video_get_info): Likewise.
10388 (grub_video_get_blit_format): Likewise.
10389 (grub_video_set_palette): Likewise.
10390 (grub_video_get_palette): Likewise.
10391 (grub_video_set_viewport): Likewise.
10392 (grub_video_get_viewport): Likewise.
10393 (grub_video_map_color): Likewise.
10394 (grub_video_map_rgb): Likewise.
10395 (grub_video_map_rgba): Likewise.
10396 (grub_video_fill_rect): Likewise.
10397 (grub_video_blit_glyph): Likewise.
10398 (grub_video_blit_bitmap): Likewise.
10399 (grub_video_blit_render_target): Likewise.
10400 (grub_video_scroll): Likewise.
10401 (grub_video_swap_buffers): Likewise.
10402 (grub_video_create_render_target): Likewise.
10403 (grub_video_delete_render_target): Likewise.
10404 (grub_video_set_active_render_target): Likewise.
10406 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10408 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10410 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10411 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10412 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10413 instead of $(srcdir)/genkernsyms.sh.
10415 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10416 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10417 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10418 instead of $(srcdir)/genkernsyms.sh.
10420 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10421 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10422 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10423 instead of $(srcdir)/genkernsyms.sh.
10425 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10426 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10427 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10428 instead of $(srcdir)/genkernsyms.sh.
10430 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10433 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10435 (gensymlist.sh): New target.
10436 (genkernsyms.sh): Likewise.
10438 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10439 genkernsyms.sh.in and gensymlist.sh.in.
10441 * genkernsyms.sh: Removed.
10442 * gensymlist.sh: Likewise.
10444 * genkernsyms.sh.in: New file.
10445 * gensymlist.sh.in: Likewise.
10447 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10449 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10450 clobber "prefix", since we may have already set it manually.
10452 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
10454 * kern/misc.c (abort): New alias for grub_abort.
10456 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
10458 A new machine-specific function "grub_machine_set_prefix" is
10459 defined. This is called after loading modules, so that a prefix
10460 initialization can use modules. Also, this change adds an
10461 intensive debugging feature for the memory manager via the
10462 configure option "--enable-mm-debug".
10464 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10467 * kern/sparc64/ieee1275/init.c (abort): Removed.
10468 (grub_stop): Likewise.
10469 (grub_exit): New function.
10470 (grub_set_prefix): Renamed to ...
10471 (grub_machine_set_prefix): ... this.
10472 (grub_machine_init): Do not call grub_set_prefix.
10474 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10475 (grub_machine_set_prefix): ... this.
10476 (grub_machine_init): Do not call grub_set_prefix.
10478 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10479 (grub_machine_init): Do not set the prefix here.
10481 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10483 * kern/efi/init.c: Include grub/mm.h.
10484 (grub_efi_set_prefix): New function.
10486 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10487 (grub_efi_get_filename): New function.
10488 (grub_print_device_path): Renamed to ...
10489 (grub_efi_print_device_path): ... this.
10491 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10492 [MM_DEBUG] (grub_realloc): Likewise.
10493 [MM_DEBUG] (grub_free): Likewise.
10494 [MM_DEBUG] (grub_memalign): Likewise.
10495 [MM_DEBUG] (grub_mm_debug): New variable.
10496 [MM_DEBUG] (grub_debug_malloc): New function.
10497 [MM_DEBUG] (grub_debug_free): New function.
10498 [MM_DEBUG] (grub_debug_realloc): New function.
10499 [MM_DEBUG] (grub_debug_memalign): New function.
10501 * kern/misc.c (grub_abort): Print a newline to distinguish
10504 * kern/main.c (grub_main): Call grub_machine_set_prefix and
10505 grub_set_root_dev after loading modules. This is necessary when
10506 setting a prefix depends on modules.
10508 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10509 (grub_efi_print_device_path): ... this.
10510 (grub_efi_get_filename): New prototype.
10511 (grub_efi_set_prefix): Likewise.
10513 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10515 (grub_efidisk_get_device_handle): New prototype.
10516 (grub_efidisk_get_device_name): Likewise.
10518 * include/grub/mm.h: Include config.h.
10519 (MM_DEBUG): Removed.
10520 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10521 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10522 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10523 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10524 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10525 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10526 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10527 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10528 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10530 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10532 * disk/efi/efidisk.c: Include grub/partition.h.
10533 (iterate_child_devices): New function.
10534 (add_device): First, compare only last device path nodes, so that
10535 devices are sorted by the types.
10536 (grub_efidisk_get_device_handle): New function.
10537 (grub_efidisk_get_device_name): Likewise.
10539 * configure.ac (--enable-mm-debug): New option to enable the
10540 memory manager debugging feature. This makes the binary much
10541 bigger, so is disabled by default.
10543 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
10545 Use grub_abort instead of grub_stop, and grub_exit must be
10546 define in each architecture now. Also, this change adds support
10549 * util/i386/pc/grub-probefs.c: Include grub/term.h.
10550 (grub_getkey): New function.
10551 (grub_term_get_current): Likewise.
10553 * util/i386/pc/grub-setup.c: Include grub/term.h.
10554 (grub_getkey): New function.
10555 (grub_term_get_current): Likewise.
10557 * util/misc.c (grub_stop): Renamed to ...
10558 (grub_exit): ... this.
10560 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10561 (grub_exit): ... this.
10562 (grub_machine_init): Use grub_abort instead of abort.
10563 (grub_stop): Removed.
10565 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10568 * kern/i386/pc/startup.S (grub_exit): New function.
10569 (cold_reboot): New label.
10571 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10572 (grub_efi_init): Call grub_efidisk_init.
10573 (grub_efi_fini): Call grub_efidisk_fini.
10575 * kern/efi/efi.c: Include grub/mm.h.
10576 (grub_efi_console_control_guid): Renamed to ...
10577 (console_control_guid): ... this.
10578 (grub_efi_loaded_image_guid): Renamed to ...
10579 (loaded_image_guid): ... this.
10580 (grub_efi_locate_handle): New function.
10581 (grub_efi_open_protocol): Likewise.
10582 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10583 GRUB_EFI_CONSOLE_CONTROL_GUID.
10584 (grub_efi_exit): Removed.
10585 (grub_stop): Likewise.
10586 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10587 (grub_exit): New function.
10588 (grub_print_device_path): Likewise.
10590 * kern/rescue.c (grub_rescue_cmd_exit): New function.
10591 (grub_enter_rescue_mode): Register "exit".
10593 * kern/misc.c (grub_real_dprintf): A cosmetic change.
10594 (grub_abort): New function.
10596 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10598 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10600 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10602 * include/grub/efi/efi.h (grub_efi_exit): Removed.
10603 (grub_print_device_path): New prototype.
10604 (grub_efi_locate_handle): Likewise.
10605 (grub_efi_open_protocol): Likewise.
10607 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10608 * disk/efi/efidisk.c: Likewise.
10610 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10612 * include/grub/efi/console_control.h
10613 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10615 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10616 last 8 bytes as an array.
10617 (GRUB_EFI_DISK_IO_GUID): New macro.
10618 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10619 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10620 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10622 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10623 (struct grub_efi_device_path): Rename the member "sub_type" to
10625 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10626 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10627 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10628 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
10629 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
10630 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
10631 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
10632 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
10633 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
10634 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
10635 (struct grub_efi_pci_device_path): New structure.
10636 (grub_efi_pci_device_path_t): New type.
10637 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
10638 (struct grub_efi_pccard_device_path): New structure.
10639 (grub_efi_pccard_device_path_t): New type.
10640 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
10641 (struct grub_efi_memory_mapped_device_path): New structure.
10642 (grub_efi_memory_mapped_device_path_t): New type.
10643 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
10644 (struct grub_efi_vendor_device_path): New structure.
10645 (grub_efi_vendor_device_path_t): New type.
10646 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
10647 (struct grub_efi_controller_device_path): New structure.
10648 (grub_efi_controller_device_path_t): New type.
10649 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
10650 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
10651 (struct grub_efi_acpi_device_path): New structure.
10652 (grub_efi_acpi_device_path_t): New type.
10653 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
10654 (struct grub_efi_expanded_acpi_device_path): New structure.
10655 (grub_efi_expanded_acpi_device_path_t): New type.
10656 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
10657 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
10658 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
10659 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
10660 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
10661 (struct grub_efi_atapi_device_path): New structure.
10662 (grub_efi_atapi_device_path_t): New type.
10663 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
10664 (struct grub_efi_fibre_channel_device_path): New structure.
10665 (grub_efi_fibre_channel_device_path_t): New type.
10666 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
10667 (struct grub_efi_1394_device_path): New structure.
10668 (grub_efi_1394_device_path_t): New type.
10669 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
10670 (struct grub_efi_usb_device_path): New structure.
10671 (grub_efi_usb_device_path_t): New type.
10672 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
10673 (struct grub_efi_usb_class_device_path): New structure.
10674 (grub_efi_usb_class_device_path_t): New type.
10675 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
10676 (struct grub_efi_i2o_device_path): New structure.
10677 (grub_efi_i2o_device_path_t): New type.
10678 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
10679 (struct grub_efi_mac_address_device_path): New structure.
10680 (grub_efi_mac_address_device_path_t): New type.
10681 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
10682 (struct grub_efi_ipv4_device_path): New structure.
10683 (grub_efi_ipv4_device_path_t): New type.
10684 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
10685 (struct grub_efi_ipv6_device_path): New structure.
10686 (grub_efi_ipv6_device_path_t): New type.
10687 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
10688 (struct grub_efi_infiniband_device_path): New structure.
10689 (grub_efi_infiniband_device_path_t): New type.
10690 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
10691 (struct grub_efi_uart_device_path): New structure.
10692 (grub_efi_uart_device_path_t): New type.
10693 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
10694 (struct grub_efi_vendor_messaging_device_path): New structure.
10695 (grub_efi_vendor_messaging_device_path_t): New type.
10696 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
10697 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
10698 (struct grub_efi_hard_drive_device_path): New structure.
10699 (grub_efi_hard_drive_device_path_t): New type.
10700 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
10701 (struct grub_efi_cdrom_device_path): New structure.
10702 (grub_efi_cdrom_device_path_t): New type.
10703 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
10704 (struct grub_efi_vendor_media_device_path): New structure.
10705 (grub_efi_vendor_media_device_path_t): New type.
10706 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
10707 (struct grub_efi_file_path_device_path): New structure.
10708 (grub_efi_file_path_device_path_t): New type.
10709 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
10710 (struct grub_efi_protocol_device_path): New structure.
10711 (grub_efi_protocol_device_path_t): New type.
10712 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
10713 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
10714 (struct grub_efi_bios_device_path): New structure.
10715 (grub_efi_bios_device_path_t): New type.
10716 (struct grub_efi_disk_io): New structure.
10717 (grub_efi_disk_io_t): New type.
10718 (struct grub_efi_block_io_media): New structure.
10719 (grub_efi_block_io_media_t): New type.
10720 (struct grub_efi_block_io): New structure.
10721 (grub_efi_block_io_t): New type.
10723 * include/grub/misc.h (grub_stop): Removed.
10724 (grub_exit): New prototype.
10725 (grub_abort): Likewise.
10727 * include/grub/disk.h (enum grub_disk_dev_id): Added
10728 GRUB_DISK_DEVICE_EFIDISK_ID.
10730 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
10731 disk/efi/efidisk.c.
10732 (kernel_syms.lst): Remove the target if an error occurs.
10734 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
10736 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
10737 as it was simply too buggy.
10739 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
10741 * kern/misc.c (grub_lltoa): New function.
10742 (grub_vsprintf): Added support for the long long suffix,
10745 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
10747 * Makefile.in (LDFLAGS): Add variable.
10748 (LD): Remove variable.
10749 * configure.ac: Add -m32 to LDFLAGS.
10750 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
10751 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
10752 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
10753 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
10754 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
10756 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
10757 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
10758 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
10760 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
10762 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
10763 length for unknown glyph.
10765 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10767 Add support for pre-loaded modules into the EFI port.
10769 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
10770 completely. Accept one more argument DIR. The caller has changed.
10772 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10774 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10775 (grub_efi_loaded_image_guid): New variable.
10776 (grub_efi_get_loaded_image): New function.
10777 (grub_arch_modules_addr): Likewise.
10779 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10782 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10783 (struct grub_efi_loaded_image): New structure.
10784 (grub_efi_loaded_image_t): New type.
10786 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
10788 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10789 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10790 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10792 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10794 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10796 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10798 * DISTLIST: Added include/grub/efi/console.h,
10799 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10800 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10802 * include/grub/efi/console.h: New file.
10803 * include/grub/efi/time.h: Likewise.
10804 * include/grub/i386/efi/kernel.h: Likewise.
10805 * kern/efi/init.c: Likewise.
10806 * kern/efi/mm.c: Likewise.
10807 * term/efi/console.c: Likewise.
10809 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10810 (grub_stop): Removed.
10811 (grub_get_rtc): Likewise.
10812 (grub_machine_init): Simply call grub_efi_init.
10813 (grub_machine_fini): Call grub_efi_fini.
10815 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10816 (grub_efi_output_string): Removed.
10817 (grub_efi_stall): New function.
10818 (grub_stop): Likewise.
10819 (grub_get_rtc): Likewise.
10821 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10822 (grub_efi_stall): New prototype.
10823 (grub_efi_allocate_pages): Likewise.
10824 (grub_efi_free_pages): Likewise.
10825 (grub_efi_get_memory_map): Likewise.
10826 (grub_efi_mm_init): Likewise.
10827 (grub_efi_mm_fini): Likewise.
10828 (grub_efi_init): Likewise.
10829 (grub_efi_fini): Likewise.
10831 * include/grub/i386/efi/time.h: Do not include
10832 grub/symbol.h. Include grub/efi/time.h.
10833 (GRUB_TICKS_PER_SECOND): Removed.
10834 (grub_get_rtc): Likewise.
10836 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10837 Added padding. The EFI spec is buggy.
10838 (GRUB_EFI_BLACK): New macro.
10839 (GRUB_EFI_BLUE): Likewise.
10840 (GRUB_EFI_GREEN): Likewise.
10841 (GRUB_EFI_CYAN): Likewise.
10842 (GRUB_EFI_RED): Likewise.
10843 (GRUB_EFI_MAGENTA): Likewise.
10844 (GRUB_EFI_BROWN): Likewise.
10845 (GRUB_EFI_LIGHTGRAY): Likewise.
10846 (GRUB_EFI_BRIGHT): Likewise.
10847 (GRUB_EFI_DARKGRAY): Likewise.
10848 (GRUB_EFI_LIGHTBLUE): Likewise.
10849 (GRUB_EFI_LIGHTGREEN): Likewise.
10850 (GRUB_EFI_LIGHTCYAN): Likewise.
10851 (GRUB_EFI_LIGHTRED): Likewise.
10852 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10853 (GRUB_EFI_YELLOW): Likewise.
10854 (GRUB_EFI_WHITE): Likewise.
10855 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10856 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10857 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10858 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10859 (GRUB_EFI_BACKGROUND_RED): Likewise.
10860 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10861 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10862 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10863 (GRUB_EFI_TEXT_ATTR): Likewise.
10865 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10866 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10867 (kernel_mod_HEADERS): Added efi/time.h.
10869 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10871 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10872 include/grub/efi/api.h, include/grub/efi/console_control.h,
10873 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10874 include/grub/i386/efi/time.h, kern/efi/efi.c,
10875 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10876 and util/i386/efi/grub-mkimage.c.
10878 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10880 * genmk.rb (PModule#rule): Do not export symbols if
10881 #{prefix}_EXPORTS is set to "no".
10883 * conf/i386-efi.mk: New file.
10884 * conf/i386-efi.rmk: Likewise.
10885 * include/grub/efi/api.h: Likewise.
10886 * include/grub/efi/console_control.h: Likewise.
10887 * include/grub/efi/efi.h: Likewise.
10888 * include/grub/efi/pe32.h: Likewise.
10889 * include/grub/i386/efi/time.h: Likewise.
10890 * kern/efi/efi.c: Likewise.
10891 * kern/i386/efi/init.c: Likewise.
10892 * kern/i386/efi/startup.S: Likewise.
10893 * util/i386/efi/grub-mkimage.c: Likewise.
10895 2006-04-17 Marco Gerards <marco@gnu.org>
10897 * include/grub/script.h: Include <grub/parser.h> and
10898 "grub_script.tab.h".
10899 (struct grub_lexer_param): New struct.
10900 (struct grub_parser_param): Likewise.
10901 (grub_script_create_arglist): Pass the state in an argument.
10902 (grub_script_add_arglist): Likewise.
10903 (grub_script_create_cmdline): Likewise.
10904 (grub_script_create_cmdblock): Likewise.
10905 (grub_script_create_cmdif): Likewise.
10906 (grub_script_create_cmdmenu): Likewise.
10907 (grub_script_add_cmd): Likewise.
10908 (grub_script_arg_add): Likewise.
10909 (grub_script_lexer_ref): Likewise.
10910 (grub_script_lexer_deref): Likewise.
10911 (grub_script_lexer_record_start): Likewise.
10912 (grub_script_lexer_record_stop): Likewise.
10913 (grub_script_mem_record): Likewise.
10914 (grub_script_mem_record_stop): Likewise.
10915 (grub_script_malloc): Likewise.
10916 (grub_script_yylex): Likewise.
10917 (grub_script_yyparse): Likewise.
10918 (grub_script_yyerror): Likewise.
10919 (grub_script_yylex): Likewise.
10920 (grub_script_lexer_init): Return the state.
10922 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10923 (grub_script_lexer_done): Likewise.
10924 (grub_script_lexer_getline): Likewise.
10925 (grub_script_lexer_refs): Likewise.
10926 (script): Likewise.
10927 (newscript): Likewise.
10928 (record): Likewise.
10929 (recording): Likewise.
10930 (recordpos): Likewise.
10931 (recordlen): Likewise.
10932 (grub_script_lexer_init): Return the state instead of setting
10934 (grub_script_lexer_ref): Use the newly added argument for state
10935 instead of globals.
10936 (grub_script_lexer_deref): Likewise.
10937 (grub_script_lexer_record_start): Likewise.
10938 (grub_script_lexer_record_stop): Likewise.
10939 (recordchar): Likewise.
10940 (nextchar): Likewise.
10941 (grub_script_yylex2): Likewise.
10942 (grub_script_yylex): Likewise.
10943 (grub_script_yyerror): Likewise.
10945 * normal/parser.y (func_mem): Removed variable.
10946 (menu_entry): Likewise.
10948 (%lex-param): New parser option.
10949 (%parse-param): Likewise.
10950 (script): Always return the AST.
10951 (argument): Pass the state around.
10952 (arguments): Likewise.
10953 (grubcmd): Likewise.
10954 (commands): Likewise.
10955 (function): Likewise.
10956 (menuentry): Likewise.
10957 (if_statement): Likewise.
10960 * normal/script.c (grub_script_memused): Removed variable.
10961 (grub_script_parsed): Likewise.
10962 (grub_script_malloc): Added a state argument. Use that instead of
10964 (grub_script_mem_record): Likewise.
10965 (grub_script_mem_record_stop): Likewise.
10966 (grub_script_arg_add): Likewise.
10967 (grub_script_add_arglist): Likewise.
10968 (grub_script_create_cmdline): Likewise.
10969 (grub_script_create_cmdif): Likewise.
10970 (grub_script_create_cmdmenu): Likewise.
10971 (grub_script_add_cmd): Likewise.
10972 (grub_script_parse): Setup the state before calling the parser.
10974 2006-04-16 Marco Gerards <marco@gnu.org>
10976 * normal/command.c (grub_command_init): Remove the title command.
10978 * normal/lexer.c (grub_script_yylex): Renamed from this...
10979 (grub_script_yylex2): ... to this.
10980 (grub_script_yylex): New function. Temporary
10981 introduced to filter some tokens.
10982 (grub_script_yyerror): Print a newline.
10984 * normal/main.c (read_config_file): Output information about the
10985 lines that contain errors. Wait for a key after all lines have
10986 been processed. Don't return an empty menu.
10988 * normal/parser.y (func_mem): Don't initialize.
10989 (menu_entry): Likewise.
10990 (err): New variable.
10991 (script): Don't return anything when an error was encountered.
10992 (ws, returns): Removed rules.
10993 (argument): Disabled concatenated variable support.
10994 (arguments): Remove explicit separators.
10995 (grubcmd): Likewise.
10996 (function): Likewise.
10997 (menuentry): Likewise.
10999 (commands): Likewise. Add error handling.
11001 * normal/script.c (grub_script_create_cmdline): If
11002 `grub_script_parsed' is 0, assume the parser encountered an error.
11004 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11006 * configure.ac: Add support for EFI. Fix the typo
11007 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11009 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11011 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11012 foreign multibyte characters should be shown correctly.
11014 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11016 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11018 (read_config_file): Made it to close file before returning.
11020 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11022 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11023 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11024 video/i386/pc/vbefill.c.
11026 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11027 video/i386/pc/vbefill.c.
11029 * include/grub/video.h (grub_video_blit_format): New enum.
11030 (grub_video_mode_info): Added new member blit_format.
11031 (grub_video_get_blit_format): New function prototype.
11033 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11034 function prototype.
11035 (grub_video_vbe_map_rgb): Likewise.
11036 (grub_video_vbe_unmap_color): Likewise.
11038 * include/grub/i386/pc/vbeblit.h: New file.
11040 * include/grub/i386/pc/vbefill.h: New file.
11042 * video/video.c (grub_video_get_blit_format): New function.
11043 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11044 (grub_video_vbe_map_rgb): Likewise.
11045 (grub_video_vbe_unmap_color): Likewise.
11047 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11049 (grub_video_vbe_blit_render_target): Changed to use more optimized
11051 (grub_video_vbe_setup): Added detection for optimized settings.
11052 (grub_video_vbe_create_render_target): Likewise.
11054 * video/i386/pc/vbeblit.c: New file.
11056 * video/i386/pc/vbefill.c: New file.
11058 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
11060 * font/manager.c (grub_font_get_glyph): Removed font fixup from
11063 * util/unifont2pff.rb: ... and moved it to here. Improved argument
11064 parsing to support both hex and dec ranges. If filename was missing
11065 show usage information.
11067 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
11069 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11070 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
11072 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11073 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
11074 (video_mod_SOURCES): Added.
11075 (video_mod_CFLAGS): Likewise.
11076 (video_mod_LDFLAGS): Likewise.
11077 (gfxterm_mod_SOURCES): Likewise.
11078 (gfxterm_mod_CFLAGS): Likewise.
11079 (gfxterm_mod_LDFLAGS): Likewise.
11080 (videotest_mod_SOURCES): Likewise.
11081 (videotest_mod_CFLAGS): Likewise.
11082 (videotest_mod_LDFLAGS): Likewise.
11083 (vesafb_mod_SOURCES): Removed.
11084 (vesafb_mod_CFLAGS): Likewise.
11085 (vesafb_mod_LDFLAGS): Likewise.
11086 (vga_mod_SOURCES): Likewise.
11087 (vga_mod_CFLAGS): Likewise.
11088 (vga_mod_LDFLAGS): Likewise.
11090 * commands/videotest.c: New file.
11092 * font/manager.c (fill_with_default_glyph): Modified to use
11094 (grub_font_get_glyph): Likewise.
11095 (fontmanager): Renamed from this...
11096 (font_manager): ... to this.
11098 * include/grub/font.h (grub_font_glyph): Added new structure.
11099 (grub_font_get_glyph): Modified to use grub_font_glyph.
11101 * include/grub/misc.h (grub_abs): Added as inline function.
11103 * include/grub/video.h: New file.
11105 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11106 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11107 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11108 (grub_vbe_get_controller_info): Renamed from this...
11109 (grub_vbe_bios_get_controller_info): ... to this.
11110 (grub_vbe_get_mode_info): Renamed from this...
11111 (grub_vbe_bios_get_mode_info): ... to this.
11112 (grub_vbe_set_mode): Renamed from this...
11113 (grub_vbe_bios_set_mode): ... to this.
11114 (grub_vbe_get_mode): Renamed from this...
11115 (grub_vbe_bios_get_mode): ... to this.
11116 (grub_vbe_set_memory_window): Renamed from this...
11117 (grub_vbe_bios_set_memory_window): ... to this.
11118 (grub_vbe_get_memory_window): Renamed from this...
11119 (grub_vbe_bios_get_memory_window): ... to this.
11120 (grub_vbe_set_scanline_length): Renamed from this...
11121 (grub_vbe_set_scanline_length): ... to this.
11122 (grub_vbe_get_scanline_length): Renamed from this...
11123 (grub_vbe_bios_get_scanline_length): ... to this.
11124 (grub_vbe_set_display_start): Renamed from this...
11125 (grub_vbe_bios_set_display_start): ... to this.
11126 (grub_vbe_get_display_start): Renamed from this...
11127 (grub_vbe_bios_get_display_start): ... to this.
11128 (grub_vbe_set_palette_data): Renamed from this...
11129 (grub_vbe_bios_set_palette_data): ... to this.
11130 (grub_vbe_set_pixel_rgb): Removed.
11131 (grub_vbe_set_pixel_index): Likewise.
11133 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11135 (grub_vbe_bios_get_controller_info): ... to this.
11136 (grub_vbe_get_mode_info): Renamed from this...
11137 (grub_vbe_bios_get_mode_info): ... to this.
11138 (grub_vbe_set_mode): Renamed from this...
11139 (grub_vbe_bios_set_mode): ... to this.
11140 (grub_vbe_get_mode): Renamed from this...
11141 (grub_vbe_bios_get_mode): ... to this.
11142 (grub_vbe_set_memory_window): Renamed from this...
11143 (grub_vbe_bios_set_memory_window): ... to this.
11144 (grub_vbe_get_memory_window): Renamed from this...
11145 (grub_vbe_bios_get_memory_window): ... to this.
11146 (grub_vbe_set_scanline_length): Renamed from this...
11147 (grub_vbe_set_scanline_length): ... to this.
11148 (grub_vbe_get_scanline_length): Renamed from this...
11149 (grub_vbe_bios_get_scanline_length): ... to this.
11150 (grub_vbe_set_display_start): Renamed from this...
11151 (grub_vbe_bios_set_display_start): ... to this.
11152 (grub_vbe_get_display_start): Renamed from this...
11153 (grub_vbe_bios_get_display_start): ... to this.
11154 (grub_vbe_set_palette_data): Renamed from this...
11155 (grub_vbe_bios_set_palette_data): ... to this.
11156 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11157 getting corrupted after calling it. Added more pushes and pops.
11158 (grub_vbe_bios_set_mode): Likewise.
11159 (grub_vbe_bios_get_mode): Likewise.
11160 (grub_vbe_bios_get_memory_window): Likewise.
11161 (grub_vbe_bios_set_scanline_length): Likewise.
11162 (grub_vbe_bios_get_scanline_length): Likewise.
11163 (grub_vbe_bios_get_display_start): Likewise.
11164 (grub_vbe_bios_set_palette_data): Likewise.
11166 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11167 (cl_insert): Likewise.
11168 (cl_delete): Likewise.
11170 * term/gfxterm.c: New file.
11172 * term/i386/pc/vesafb.c: Removed file.
11174 * video/video.c: New file.
11176 * video/i386/pc/vbe.c (real2pm): Added new function.
11177 (grub_video_vbe_draw_pixel): Likewise.
11178 (grub_video_vbe_get_video_ptr): Likewise.
11179 (grub_video_vbe_get_pixel): Likewise
11180 (grub_video_vbe_init): Likewise.
11181 (grub_video_vbe_fini): Likewise.
11182 (grub_video_vbe_setup): Likewise.
11183 (grub_video_vbe_get_info): Likewise.
11184 (grub_video_vbe_set_palette): Likewise.
11185 (grub_video_vbe_get_palette): Likewise.
11186 (grub_video_vbe_set_viewport): Likewise.
11187 (grub_video_vbe_get_viewport): Likewise.
11188 (grub_video_vbe_map_color): Likewise.
11189 (grub_video_vbe_map_rgb): Likewise.
11190 (grub_video_vbe_map_rgba): Likewise.
11191 (grub_video_vbe_unmap_color): Likewise.
11192 (grub_video_vbe_fill_rect): Likewise.
11193 (grub_video_vbe_blit_glyph): Likewise.
11194 (grub_video_vbe_blit_bitmap): Likewise.
11195 (grub_video_vbe_blit_render_target): Likewise.
11196 (grub_video_vbe_scroll): Likewise.
11197 (grub_video_vbe_swap_buffers): Likewise.
11198 (grub_video_vbe_create_render_target): Likewise.
11199 (grub_video_vbe_delete_render_target): Likewise.
11200 (grub_video_vbe_set_active_render_target): Likewise.
11201 (grub_vbe_set_pixel_rgb): Remove function.
11202 (grub_vbe_set_pixel_index): Likewise.
11203 (index_color_mode): Remove static variable.
11204 (active_mode): Likewise.
11205 (framebuffer): Likewise.
11206 (bytes_per_scan_line): Likewise.
11207 (grub_video_vbe_adapter): Added new static variable.
11208 (framebuffer): Likewise.
11209 (render_target): Likewise.
11210 (initial_mode): Likewise.
11211 (mode_in_use): Likewise.
11212 (mode_list): Likewise.
11214 2006-03-10 Marco Gerards <marco@gnu.org>
11216 * configure.ac (AC_INIT): Bumped to 1.93.
11218 * DISTLIST: Added `include/grub/hfs.h'.
11220 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11222 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11223 18H, which might help the BIOS falling back to next boot media.
11225 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11227 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11228 Poe Chen <poe.poechen@gmail.com>.
11230 2006-01-17 Marco Gerards <marco@gnu.org>
11232 * include/grub/normal.h: Include <grub/script.h>.
11233 (grub_command_list): Removed struct.
11234 (grub_command_list_t): Removed type.
11235 (grub_menu_entry): Remove members `num' and `command_list'. Add
11236 members `commands' and `sourcecode'.
11237 * include/grub/script.h: Add inclusion guards.
11238 (grub_script_cmd_menuentry): New struct.
11239 (grub_script_execute_menuentry): New prototype.
11240 (grub_script_lexer_record_start): Likewise.
11241 (grub_script_lexer_record_stop): Likewise.
11242 * normal/execute.c (grub_script_execute_menuentry): New function.
11243 * normal/lexer.c (record, recording, recordpos, recordlen): New
11245 (grub_script_lexer_record_start): New function.
11246 (grub_script_lexer_record_stop): Likewise.
11247 (recordchar): Likewise.
11248 (nextchar): Likewise.
11249 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
11250 2048 as the buffer size. Add the tokens `menuentry' and `@'.
11251 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11252 (current_menu): New variable.
11253 (free_menu): Mainly rewritten.
11254 (grub_normal_menu_addentry): New function.
11255 (read_config_file): Rewritten.
11256 * normal/menu.c (run_menu_entry): Mainly rewritten.
11257 * normal/menu_entry.c (make_screen): Rewritten the code to insert
11259 (run): Mainly rewritten.
11260 * normal/parser.y (menu_entry): New variable.
11261 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11262 (menuentry): New rule.
11263 (command): Add `menuentry'.
11264 (if_statement): Allow additional returns before `fi'.
11265 * normal/script.c (grub_script_create_cmdmenu): New function.
11267 2006-01-03 Marco Gerards <marco@gnu.org>
11269 * INSTALL: GNU Bison is required.
11270 * configure.ac: Rewritten the test to detect Bison.
11271 * Makefile.in (YACC): New variable. Reported by Xun Sun
11272 <xun.sun.cn@gmail.com>.
11274 2006-01-03 Marco Gerards <marco@gnu.org>
11276 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
11277 the HFS+ filesystem to filesystem blocks.
11278 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
11279 GCC warning is silenced.
11281 2006-01-03 Marco Gerards <marco@gnu.org>
11283 * partmap/apple.c (apple_partition_map_iterate): Convert the data
11284 read from disk from big endian to host byte order.
11286 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
11288 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
11290 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
11291 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
11292 embedded HFS+ filesystem.
11293 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
11294 (grub_hfs_sblock): Move from here...
11295 * include/grub/hfs.h: To here... New file.
11296 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
11298 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
11300 (grub_hfsplus_volheader): Change type of member `magic' to
11302 (grub_hfsplus_data): Add new member `embedded_offset'.
11303 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
11305 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
11306 Calculate the offset.
11308 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11310 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
11312 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
11314 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11316 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
11317 ENV->NAME is NULL after allocating ENV->VALUE.
11319 2005-12-25 Marco Gerards <marco@gnu.org>
11321 * kern/env.c (grub_env_set): Rewritten the error handling code.
11323 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11325 * geninit.sh: Made more robust, and more portable.
11327 2005-12-25 Marco Gerards <marco@gnu.org>
11329 Add support for Apple HFS+ filesystems.
11331 * fs/hfsplus.c: New file.
11333 * DISTLIST: Added `fs/hfsplus.c'.
11335 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11336 (hfsplus_mod_SOURCES): New variable.
11337 (hfsplus_mod_CFLAGS): Likewise.
11338 (hfsplus_mod_LDFLAGS): Likewise.
11339 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11340 (grub_setup_SOURCES): Likewise.
11341 (grub_mkdevicemap_SOURCES): Likewise.
11342 (grub_emu_SOURCES): Likewise.
11343 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11345 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11347 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11349 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
11351 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11352 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11353 include/grub/parser.h, include/grub/script.h, kern/parser.c,
11354 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11355 normal/lexer.c, normal/parser.y, normal/script.c, and
11357 Removed kern/sparc64/cache.c.
11359 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11360 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11363 * configure.ac (AC_INIT): Bumped to 1.92.
11365 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
11367 * kern/err.c (grub_error_push): Added new function to support error
11369 (grub_error_pop): Likewise.
11370 (grub_error_stack_items): New local variable to support error stacks.
11371 (grub_error_stack_pos): Likewise.
11372 (grub_error_stack_assert): Likewise.
11373 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11375 (grub_print_error): Added support to print errors from error stack.
11377 * include/grub/err.h (grub_error_push): Added function prototype.
11378 (grub_error_pop): Likewise.
11380 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
11382 * configure.ac: Accept `powerpc64' as host_cpu.
11383 (amd64): Rename to `biarch32'.
11385 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11386 non-cacheline-aligned addresses.
11388 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11389 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11390 if `size' is non-zero.
11392 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
11394 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11395 and `cd' to make sure the filename is not prefixed with a
11397 (pkgdata_MODULES): Add `gpt.mod'.
11398 (gpt_mod_SOURCES): New variable.
11399 (gpt_mod_CFLAGS): Likewise.
11400 (gpt_mod_LDFLAGS): Likewise.
11402 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11404 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11407 * partmap/gpt.c: New file.
11409 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11410 GPT partition map is detected.
11412 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
11414 * commands/i386/pc/play.c: New file.
11415 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11416 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11419 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
11421 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11422 ((unused))' to silence gcc warning.
11424 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
11426 * configure.ac: Correct `AC_PROG_YACC' test.
11428 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11430 * util/powerpc/ieee1275/grub-install.in: Run the mount point
11431 check before installing files.
11433 2005-11-22 Mike Small <smallm@panix.com>
11435 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11436 number regex so multidigit numbers are recognized correctly.
11438 2005-11-22 Mike Small <smallm@panix.com>
11440 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11441 debugging message before attempting to claim memory.
11442 (grub_rescue_cmd_initrd): Add a claim debugging message and try
11443 multiple addresses in case of failure.
11445 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11447 * term/tparm.c (get_space): Remove empty `if' statement.
11449 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11451 * kern/parser.c (check_varstate): Rename `state' to 's'.
11453 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11455 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
11456 variable definitions to the beginning of each function. Sort stack
11458 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
11459 `buf' argument to `char *'.
11461 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
11463 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11464 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11465 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11466 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11467 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11468 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11469 configfile.mod, search.mod, gzio.mod and test.mod.
11470 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11471 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11472 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11473 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11474 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11475 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11476 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11477 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11478 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11479 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11480 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11481 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11482 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11483 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11484 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11485 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11486 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11487 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11488 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11489 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11490 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11491 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11492 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11494 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11496 (pkgdata_MODULES): Add test.mod.
11498 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11500 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
11501 appending to variables with "+=".
11502 (PModule): Use full pathname to generate *.lst filenames.
11504 * Makefile.in: Fixed list rules moved from genmk.rb.
11505 (.DELETE_ON_ERROR): New special target.
11506 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11508 * conf/i386-pc.rmk: Include conf/common.mk.
11509 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11510 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11511 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11512 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11513 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11514 configfile.mod, search.mod, gzio.mod and test.mod.
11515 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11516 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11517 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11518 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11519 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11520 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11521 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11522 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11523 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11524 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11525 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11526 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11527 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11528 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11529 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11530 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11531 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11532 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11533 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11534 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11535 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11536 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11537 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11539 * conf/common.rmk: ... to here. New file.
11541 * conf/common.mk: New file.
11543 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
11545 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11546 (grub_script.tab.c): ... here.
11548 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11549 (grub_script.tab.c): ... here.
11551 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11552 (grub_script.tab.c): ... here.
11554 * normal/command.c (grub_command_find): Fixed a memory leak of
11555 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11557 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11559 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11560 "@" which marks the start of a comment on ARM.
11561 (VARIABLE): Likewise.
11563 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11565 Add support for Linux/ADFS partition tables.
11567 * partmap/acorn.c: New file.
11569 * include/grub/acorn_filecore.h: Likewise.
11571 * DISTLIST: Added `partmap/acorn.c' and
11572 `include/grub/acorn_filecore.h'.
11574 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11576 (pkgdata_MODULES): Add `acorn.mod'.
11577 (acorn_mod_SOURCES): New variable.
11578 (acorn_mod_CFLAGS): Likewise.
11580 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11582 (pkgdata_MODULES): Add `acorn.mod'.
11583 (acorn_mod_SOURCES): New variable.
11584 (acorn_mod_CFLAGS): Likewise.
11586 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11587 (pkgdata_MODULES): Add `acorn.mod'.
11588 (acorn_mod_SOURCES): New variable.
11589 (acorn_mod_CFLAGS): Likewise.
11590 (acorn_mod_LDFLAGS): Likewise.
11592 * include/types.h (grub_disk_addr_t): New typedef.
11594 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
11596 * geninit.sh: New file.
11598 * geninitheader.sh: Likewise.
11600 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11601 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11602 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11603 * commands/configfile.c (grub_configfile_init)
11604 (grub_configfile_fini): Likewise.
11605 * commands/default.c (grub_default_init, grub_default_fini):
11607 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11608 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11609 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11610 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11612 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11613 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11615 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11616 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11618 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11620 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11622 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11623 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11624 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11625 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11626 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11627 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11628 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
11629 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
11630 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
11631 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
11632 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
11633 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
11634 * partmap/amiga.c (grub_amiga_partition_map_init)
11635 (grub_amiga_partition_map_fini): Likewise.
11636 * partmap/apple.c (grub_apple_partition_map_init)
11637 (grub_apple_partition_map_fini): Likewise.
11638 * partmap/pc.c (grub_pc_partition_map_init)
11639 (grub_pc_partition_map_fini): Likewise.
11640 * partmap/sun.c (grub_sun_partition_map_init,
11641 grub_sun_partition_map_fini): Likewise.
11642 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
11645 * util/grub-emu.c: Include <grub_modules_init.h>.
11646 (main): Don't initialize and de-initialize any modules directly,
11647 use `grub_init_all' and `grub_fini_all' instead.
11649 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
11650 `grub_vesafb_mod_init'.
11651 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
11653 * term/i386/pc/vga.c (grub_vga_init): Renamed to
11654 `grub_vga_mod_init'. Updated all users.
11655 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
11657 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
11658 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
11661 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
11662 Generate a function to initialize the module in utilities.
11663 Updated all callers.
11664 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
11665 initialize the module in utilities. Updated all callers.
11667 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11669 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
11670 escape sequence and a literal ^L to clear the screen.
11672 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
11673 when returning from Open Firmware.
11675 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
11677 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
11678 (grub_ofconsole_height): Likewise.
11679 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
11680 manually insert a '\n'.
11681 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
11682 `grub_ofconsole_height'. Return early if these are already set.
11684 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
11686 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11687 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
11688 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
11689 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
11690 and `normal/script.c'.
11691 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11692 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11693 (test_mod_SOURCES): New variable.
11694 (test_mod_CFLAGS): Likewise.
11695 (test_mod_LDFLAGS): Likewise.
11696 (pkgdata_MODULES): Add `test.mod'.
11697 (grub_script.tab.c): New rule.
11698 (grub_script.tab.h): Likewise.
11700 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
11702 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11703 `commands/test.c', `normal/execute.c', `normal/lexer.c',
11704 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11705 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11706 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11707 (test_mod_SOURCES): New variable.
11708 (test_mod_CFLAGS): Likewise.
11709 (pkgdata_MODULES): Add `test.mod'.
11710 (grub_script.tab.c): New rule.
11711 (grub_script.tab.h): Likewise.
11713 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
11715 Add initial scripting support.
11717 * commands/test.c: New file.
11718 * include/grub/script.h: Likewise.
11719 * normal/execute.c: Likewise.
11720 * normal/function.c: Likewise.
11721 * normal/lexer.c: Likewise.
11722 * normal/parser.y: Likewise.
11723 * normal/script.c: Likewise.
11725 * configure.ac: Add `AC_PROG_YACC' test.
11727 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
11728 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
11729 `normal/function.c' and `normal/script.c'.
11730 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
11731 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
11732 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
11734 (pkgdata_MODULES): Add `test.mod'.
11735 (grub_script.tab.c): New rule.
11736 (grub_script.tab.h): Likewise.
11738 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
11740 * include/grub/normal.h (grub_test_init): New prototype.
11741 (grub_test_fini): Likewise.
11743 * normal/command.c: Include <grub/script.h>.
11744 (grub_command_execute): Rewritten.
11746 * util/grub-emu.c (main): Call `grub_test_init' and
11749 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11751 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
11753 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
11754 there are no pending characters.
11756 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11758 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
11759 `grub_strndup' to drop device arguments. Replace unnecessary
11760 `grub_strndup' with `grub_strdup'.
11762 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
11764 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
11765 `debug' environment variable has been set.
11767 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
11769 * Makefile.in (install-local): Use $(DATA).
11770 (uninstall): Likewise.
11771 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
11772 (sbin_UTILITIES): ... to here.
11773 (sbin_SCRIPTS): New variable.
11774 (grub_install_SOURCES): New variable.
11775 * util/powerpc/ieee1275/grub-install.in: New file.
11776 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11778 (add_segments): Call `grub_util_get_path'.
11780 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11782 From Timothy Baldwin:
11783 * commands/ls.c (grub_ls_list_files): Close FILE with
11785 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11787 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
11789 * include/grub/parser.h: New file.
11791 * kern/parser.c: Likewise.
11793 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11794 (grub_setup_SOURCES): Likewise.
11795 (grub_probefs_SOURCES): Likewise.
11796 (grub_emu_SOURCES): Likewise.
11797 (kernel_img_HEADERS): Add `parser.h'.
11799 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11800 (grub_emu_SOURCES): Add `kern/parser.c'.
11801 (grubof_SOURCES): Likewise.
11803 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11804 (grubof_SOURCES): Add `kern/parser.c'.
11806 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11808 * kern/misc.c (grub_split_cmdline): Removed function.
11810 * kern/rescue.c: Include <grub/parser.h>.
11811 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11812 of `grub_split_cmdline'.
11814 * normal/command.c: Include <grub/parser.h>.
11815 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11816 of `grub_split_cmdline'.
11818 * normal/completion.c: Include <grub/parser.h>.
11819 (cmdline_state): New variable.
11820 (iterate_dir): End the filename with a quote depending on the
11821 command line state.
11822 (get_state): new function.
11823 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11824 split the arguments and determine the current argument. When the
11825 argument string is not quoted, escape all spaces.
11827 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11829 * normal/sparc64/setjmp.S: New file.
11831 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11833 * include/grub/sparc64/libgcc.h: New file.
11834 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11835 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11836 normal/sparc64/setjmp.c.
11838 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11840 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11841 * kern/sparc64/cache.S: New file.
11842 * kern/sparc64/cache.c: Removed.
11843 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11844 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11846 (COMMON_LDFLAGS): Add -melf64_sparc.
11847 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11848 (grubof_SOURCES): Use cache.S instead of cache.c.
11849 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11850 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11851 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11853 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11854 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11855 (linux_mod_CFLAGS): Commented out.
11856 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11857 out because module isn't built.
11858 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11859 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11860 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11861 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11862 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11863 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11864 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11865 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11866 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11867 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11868 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11869 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11870 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11871 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11873 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11875 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11876 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11877 longer, because HFS should not be used on PC.
11879 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11881 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11882 consistently within the loop.
11884 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
11886 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11887 directory can not be read.
11889 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11891 * configure.ac (AC_INIT): Increase the version number to 1.91.
11893 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11894 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11895 term/i386/pc/serial.c.
11897 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11899 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11900 file size must be permitted.
11902 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11903 between %ah and %al.
11905 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11907 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11909 Call the hook with a NUL-terminated filename.
11910 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11913 * kern/term.c (cursor_state): New variable.
11914 (grub_term_set_current): Reset the cursor state on a new
11916 (grub_setcursor): Rewritten to use CURSOR_STATE.
11917 (grub_getcursor): New function.
11919 * include/grub/term.h (grub_getcursor): New prototype.
11921 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11922 integers on ARM. Reported by Timothy Baldwin
11923 <T.E.Baldwin99@members.leeds.ac.uk>.
11925 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
11927 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11929 (grub_sfs_dir): Likewise.
11931 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
11933 Add support for the SFS filesystem.
11935 * fs/sfs.c: New file.
11937 * DISTLIST: Added `fs/sfs.c'.
11939 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11940 (grub_probefs_SOURCES): Likewise.
11941 (grub_emu_SOURCES): Likewise.
11942 (pkgdata_MODULES): Add `sfs.mod'.
11943 (sfs_mod_SOURCES): New variable.
11944 (sfs_mod_CFLAGS): Likewise.
11945 (sfs_mod_LDFLAGS): Likewise.
11947 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11948 (pkgdata_MODULES): Add `sfs.mod'.
11949 (sfs_mod_SOURCES): New variable.
11950 (sfs_mod_CFLAGS): Likewise.
11952 * util/grub-emu.c (main): Call `grub_sfs_init' and
11955 * include/grub/fs.h (grub_sfs_init): New prototype.
11956 (grub_sfs_fini): Likewise.
11958 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
11960 Add support for the AFFS filesystem.
11962 * fs/affs.c: New file.
11964 * DISTLIST: Added `fs/affs.c'.
11966 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11967 (grub_probefs_SOURCES): Likewise.
11968 (grub_emu_SOURCES): Likewise.
11969 (pkgdata_MODULES): Add `affs.mod'.
11970 (affs_mod_SOURCES): New variable.
11971 (affs_mod_CFLAGS): Likewise.
11972 (affs_mod_LDFLAGS): Likewise.
11974 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11975 (pkgdata_MODULES): Add `affs.mod'.
11976 (affs_mod_SOURCES): New variable.
11977 (affs_mod_CFLAGS): Likewise.
11979 * util/grub-emu.c (main): Call `grub_affs_init' and
11982 * include/grub/fs.h (grub_affs_init): New prototype.
11983 (grub_affs_fini): Likewise.
11985 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11987 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11989 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
11991 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11994 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11997 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11998 (COMMON_LDFLAGS): New variable.
11999 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12000 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12001 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12002 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12003 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12004 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12005 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12006 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12007 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12008 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12009 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12010 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12011 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12012 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12013 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12015 (normal_mod_ASFLAGS): Add `-m32'.
12017 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12018 (grub_host_size_t, grub_host_ssize_t): New types.
12019 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
12020 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
12021 `GRUB_HOST_SIZEOF_VOID_P'.
12023 * include/grub/kernel.h (struct grub_module_header): Type of
12024 member offset changed to `grub_host_off_t'. Type of member size
12025 changed to `grub_host_size_t'.
12026 (struct grub_module_info): Type of member offset changed to
12027 `grub_host_off_t'. Type of member size changed to
12028 `grub_host_size_t'.
12030 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
12032 Make GRUB's kernel compliant to Multiboot Specification.
12034 * kern/i386/pc/startup.S (multiboot_header): New label.
12035 (multiboot_entry): Likewise.
12036 (multiboot_trampoline): Likewise.
12038 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12039 Increased to 0x4A0.
12041 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12042 put parentheses after a question mark.
12043 [!GRUB_UTIL] (my_mod): New variable.
12045 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12047 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
12049 Adds support for the XFS filesystem. Btrees are not supported
12052 * fs/xfs.c: New file.
12054 * DISTLIST: Added `fs/xfs.c'.
12056 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12057 (grub_probefs_SOURCES): Likewise.
12058 (grub_emu_SOURCES): Likewise.
12059 (pkgdata_MODULES): Add `xfs.mod'.
12060 (xfs_mod_SOURCES): New variable.
12061 (xfs_mod_CFLAGS): Likewise.
12063 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12064 (pkgdata_MODULES): Add `xfs.mod'.
12065 (xfs_mod_SOURCES): New variable.
12066 (xfs_mod_CFLAGS): Likewise.
12068 * util/grub-emu.c (main): Call `grub_xfs_init' and
12071 * include/grub/fs.h (grub_xfs_init): New prototype.
12072 (grub_xfs_fini): Likewise.
12075 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12077 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12078 color modes, allow greater than 16 colors to be configured as
12081 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12083 * normal/completion.c (complete_arguments): Add the qualifier
12084 const into OPTIONS.
12086 From Omniflux <omniflux+lists@omniflux.com>:
12087 * include/grub/terminfo.h: New file.
12088 * include/grub/tparm.h: Likewise.
12089 * include/grub/i386/pc/serial.h: Likewise.
12090 * term/terminfo.c: Likewise.
12091 * term/tparm.c: Likewise.
12092 * term/i386/pc/serial.c: Likewise.
12093 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12095 (terminfo_mod_SOURCES): New variable.
12096 (terminfo_mod_CFLAGS): Likewise.
12097 (serial_mod_SOURCES): Likewise.
12098 (serial_mod_CFLAGS): Likewise.
12100 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12102 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12103 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12104 and kern/powerpc/ieee1275/cmain.c, respectively.
12106 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12107 * kern/powerpc/ieee1275/crt0.S: ... here.
12109 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12110 * kern/powerpc/ieee1275/cmain.c: ... here.
12112 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12113 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12114 instead of boot/powerpc/ieee1275/crt0.S and
12115 boot/powerpc/ieee1275/cmain.c, respectively.
12117 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12118 sectors. It was not used anyway.
12120 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12122 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12123 `unused parameter' warning.
12125 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12127 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12129 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12132 2005-08-28 Marco Gerards <metgerards@student.han.nl>
12134 * include/grub/normal.h (enum grub_completion_type): Added
12135 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12137 * normal/cmdline.c (print_completion): Handle
12138 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12139 * normal/menu_entry.c (store_completion): Likewise.
12141 * normal/completion.c (complete_arguments): New function.
12142 (grub_normal_do_completion): Call `complete_arguments' when the
12143 current words start with a dash.
12145 2005-08-27 Marco Gerards <metgerards@student.han.nl>
12147 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12148 `gzio.mod' instead of `io.mod').
12150 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12152 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12153 (DISTDIRS): Added io and video.
12154 Rewrite the search routine to make an output consistently.
12156 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12157 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12158 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12159 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12160 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12161 util/powerpc/ieee1275/misc.c.
12163 * include/grub/gzio.h: New file.
12164 * io/gzio.c: Likewise.
12166 * kern/file.c (grub_file_close): Call grub_device_close only if
12167 FILE->DEVICE is not NULL.
12169 * include/grub/mm.h [!NULL] (NULL): New macro.
12171 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12173 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12174 (pkgdata_MODULES): Added gzio.mod.
12175 (gzio_mod_SOURCES): New variable.
12176 (gzio_mod_CFLAGS): Likewise.
12178 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12179 (pkgdata_MODULES): Added gzio.mod.
12180 (gzio_mod_SOURCES): New variable.
12181 (gzio_mod_CFLAGS): Likewise.
12183 * commands/cat.c: Include grub/gzio.h.
12184 (grub_cmd_cat): Use grub_gzfile_open instead of
12187 * commands/cmp.c: Include grub/gzio.h.
12188 (grub_cmd_cmp): Use grub_gzfile_open instead of
12191 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12192 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12194 (grub_rescue_cmd_module): Likewise.
12196 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12198 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12199 kern/sparc64/ieee1275/init.c because it contains _start.
12200 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12202 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12204 * configure.ac: Add support for sparc64 host with ieee1275
12206 * configure: Generated from configure.ac.
12207 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12209 (grub_ofdisk_read): Likewise.
12210 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12211 pointers as (void *) to remove a warning.
12212 (grub_ofdisk_close): Likewise.
12213 (grub_ofdisk_read): Likewise.
12214 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12215 returns, so make it return void to remove a warning.
12216 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12217 Corresponding prototype change.
12218 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12219 values, and cast the pointers as (void *) to remove a warning.
12220 (grub_mm_dump): Likewise.
12221 * conf/sparc64-ieee1275.mk: New file.
12222 * conf/sparc64-ieee1275.rmk: Likewise.
12223 * include/grub/sparc64/setjmp.h: Likewise.
12224 * include/grub/sparc64/types.h: Likewise.
12225 * include/grub/sparc64/ieee1275/console.h: Likewise.
12226 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12227 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12228 * include/grub/sparc64/ieee1275/time.h: Likewise.
12229 * kern/sparc64/cache.c: Likewise.
12230 * kern/sparc64/dl.c: Likewise.
12231 * kern/sparc64/ieee1275/init.c: Likewise.
12232 * kern/sparc64/ieee1275/openfw.c: Likewise.
12234 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12236 * util/console.c (grub_ncurses_putchar): If C is greater than
12237 0x7f, set C to a question mark.
12238 (grub_ncurses_getcharwidth): New function.
12239 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12242 * normal/menu.c (print_entry): Made aware of Unicode. First,
12243 convert TITLE to UCS-4, and predict the cursor position by
12246 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12248 * kern/misc.c (grub_utf16_to_utf8): Likewise.
12250 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12252 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12253 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12256 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12257 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12258 grub_strcpy and grub_strlen. Take it into account that a space
12259 character is inserted as a delimiter.
12261 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12263 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
12264 invalid magic in the error.
12266 * commands/search.c: New file.
12268 * util/grub-emu.c (main): Call grub_search_init and
12271 * kern/rescue.c (grub_rescue_print_disks): Removed.
12272 (grub_rescue_print_devices): New function.
12273 (grub_rescue_cmd_ls): Use grub_device_iterate with
12274 grub_rescue_print_devices instead of grub_disk_dev_iterate with
12275 grub_rescue_print_disks.
12277 * kern/partition.c (grub_partition_iterate): Return the result of
12278 PARTMAP->ITERATE instead of GRUB_ERRNO.
12280 * kern/device.c: Include grub/partition.h.
12281 (grub_device_iterate): New function.
12283 * include/grub/partition.h (grub_partition_iterate): Return int
12284 instead of grub_err_t.
12286 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
12288 [GRUB_UTIL] (grub_search_fini): Likewise.
12290 * include/grub/device.h (grub_device_iterate): New prototype.
12292 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12294 (pkgdata_MODULES): Added search.mod.
12295 (search_mod_SOURCES): New variable.
12296 (search_mod_CFLAGS): Likewise.
12298 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
12299 (pkgdata_MODULES): Added search.mod.
12300 (search_mod_SOURCES): New variable.
12301 (search_mod_CFLAGS): Likewise.
12303 * commands/ls.c (grub_ls_list_disks): Renamed to ...
12304 (grub_ls_list_devices): ... this, and use grub_device_iterate.
12305 All callers changed.
12307 * DISTLIST: Added commands/search.c.
12309 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12311 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
12313 (grub_getcharwidth): New function.
12315 * kern/misc.c (grub_utf8_to_ucs4): New function.
12317 * include/grub/term.h (struct grub_term): Added a new member
12319 (grub_getcharwidth): New prototype.
12321 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
12323 * term/i386/pc/console.c (map_char): New function. Segregated from
12324 grub_console_putchar.
12325 (grub_console_putchar): Use map_char.
12326 (grub_console_getcharwidth): New function.
12327 (grub_console_term): Specified grub_console_getcharwidth as
12330 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12331 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12333 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12335 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12336 on grub_strtoul completely.
12337 (write_char): Declare local variables in the beginning of the
12339 (grub_vesafb_getcharwidth): New function.
12340 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12343 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
12345 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12346 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12347 commands/i386/pc/vbetest.c.
12349 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12350 call grub_vbe_get_controller_info again, because the returned
12351 information is volatile.
12352 (grub_vbe_set_video_mode): Mostly rewritten.
12353 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12354 grub_vbe_status_t correctly.
12355 (grub_vbe_get_video_mode_info): Likewise.
12356 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12357 several if statements.
12359 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12360 * commands/i386/pc/vbeinfo.c: ... this.
12362 * commands/i386/pc/vbe_test.c: Renamed to ...
12363 * commands/i386/pc/vbetest.c: ... this.
12365 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12367 (grub_cmd_vbeinfo): ... this. Save video modes before
12368 iterating. Skip a video mode, if it is not available, not enough
12369 information is given or it is monochrome. Show the memory
12370 model. Leave the interpretation of MODEVAR to grub_strtoul
12372 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12373 (GRUB_MOD_FINI): Likewise.
12375 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12376 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12377 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12378 duplicated grub_env_get. Leave the interpretation of MODEVAR to
12379 grub_strtoul completely.
12380 (real2pm): Removed.
12381 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12382 (GRUB_MOD_FINI): Likewise.
12384 * normal/misc.c: Include grub/mm.h.
12386 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12387 vbe_list_modes with vbetest.mod and vbeinfo.mod.
12388 (vbe_list_modes_mod_SOURCES): Removed.
12389 (vbe_list_modes_mod_CFLAGS): Likewise.
12390 (vbe_test_mod_SOURCES): Likewise.
12391 (vbe_test_mod_CFLAGS): Likewise.
12392 (vbeinfo_mod_SOURCES): New variable.
12393 (vbeinfo_mod_CFLAGS): Likewise.
12394 (vbetest_mod_SOURCES): Likewise.
12395 (vbetest_mod_CFLAGS): Likewise.
12397 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
12399 * normal/misc.c: New file.
12401 * DISTLIST: Added normal/misc.c.
12403 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12404 DISK to HOOK. Call HOOK with DISK.
12405 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12406 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12407 * partmap/sun.c (sun_partition_map_iterate): Likewise.
12409 * normal/menu_entry.c (struct screen): Added a new member
12410 "completion_shown".
12411 (completion_buffer): New global variable.
12412 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12413 (store_completion): New function.
12414 (complete): Likewise.
12415 (clear_completions): Likewise.
12416 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12417 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12418 a tab, call complete.
12420 * normal/completion.c (disk_dev): Removed.
12421 (print_simple_completion): Likewise.
12422 (print_partition_completion): Likewise.
12423 (print_func): New global variable.
12424 (add_completion): Do not take the arguments WHAT or PRINT any
12425 longer. Added a new argument TYPE. Instead of printing directly,
12426 call PRINT_FUNC if not NULL.
12427 All callers changed.
12428 (complete_device): Use a local variable DEV instead of
12429 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12430 (grub_normal_do_completion): Take a new argument HOOK. Do not
12431 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12432 empty string, return NULL instead.
12433 All callers changed.
12435 * normal/cmdline.c (print_completion): New function.
12437 * kern/partition.c (grub_partition_iterate): Add an argument DISK
12439 All callers changed.
12441 * kern/disk.c (grub_print_partinfo): Removed.
12443 * include/grub/partition.h (struct grub_partition_map): Add a new
12444 argument DISK into HOOK of ITERATE.
12445 (grub_partition_iterate): Add a new argument DISK to HOOK.
12447 * include/grub/normal.h (enum grub_completion_type): New enum.
12448 (grub_completion_type_t): New type.
12449 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12450 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12451 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12452 (GRUB_COMPLETION_TYPE_FILE): Likewise.
12453 (grub_normal_do_completion): Added a new argument HOOK.
12454 (grub_normal_print_device_info): New prototype.
12456 * include/grub/disk.h (grub_print_partinfo): Removed.
12458 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12459 (normal_mod_SOURCES): Likewise.
12460 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12461 (normal_mod_SOURCES): Likewise.
12463 * commands/ls.c (grub_ls_list_disks): Use
12464 grub_normal_print_device_info instead of grub_print_partinfo. Free
12466 (grub_ls_list_files): Use grub_normal_print_device_info instead of
12467 duplicating the code.
12469 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12471 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12472 follow GCS more precisely.
12473 * commands/i386/pc/vbe_test.c: Likewise.
12474 * include/grub/i386/pc/vbe.h: Likewise.
12475 * term/i386/pc/vesafb.c: Likewise.
12476 * video/i386/pc/vbe.c: Likewise.
12478 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
12480 * DISTLIST: Added term/i386/pc/vesafb.c
12481 DISTLIST: Added video/i386/pc/vbe.c
12482 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12483 DISTLIST: Added commands/i386/pc/vbe_test.c.
12484 * commands/i386/pc/vbe_list_modes.c: New file.
12485 * commands/i386/pc/vbe_test.c: Likewise.
12486 * term/i386/pc/vesafb.c: Likewise.
12487 * video/i386/pc/vbe.c: Likewise.
12488 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12489 (grub_vbe_probe) Added prototype.
12490 (grub_vbe_set_video_mode) Likewise.
12491 (grub_vbe_get_video_mode) Likewise.
12492 (grub_vbe_get_video_mode_info) Likewise.
12493 (grub_vbe_set_pixel_rgb) Likewise.
12494 (grub_vbe_set_pixel_index) Likewise.
12495 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12496 (pkgdata_MODULES): Added vesafb.mod.
12497 (pkgdata_MODULES): Added vbe_list_modes.mod.
12498 (pkgdata_MODULES): Added vbe_test.mod.
12499 (vbe_mod_SOURCES): Added.
12500 (vbe_mod_CFLAGS): Likewise.
12501 (vesafb_mod_SOURCES): Likewise.
12502 (vesafb_mod_CFLAGS): Likewise.
12503 (vbe_list_modes_mod_SOURCES): Likewise.
12504 (vbe_list_modes_mod_CFLAGS): Likewise.
12505 (vbe_test_mod_SOURCES): Likewise.
12506 (vbe_test_mod_CFLAGS): Likewise.
12508 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
12510 * normal/command.c (grub_command_execute): If INTERACTIVE is
12511 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12512 CMDLINE. Disable the pager if INTERACTIVE is true.
12513 All callers are changed.
12515 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12516 before reading a config file.
12517 * normal/main.c (read_config_file): Even if a command is not
12518 found, register it if it is within an entry.
12520 * util/grub-emu.c: Include sys/types.h and unistd.h.
12521 (options): Added --hold.
12522 (struct arguments): Added a new member "hold".
12523 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12525 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12526 cleared by a debugger, if it is not zero.
12528 * include/grub/normal.h (grub_command_execute): Add an argument
12531 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
12533 * DISTLIST: Added include/grub/i386/pc/vbe.h.
12535 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
12537 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12538 program with another one, because the old one didn't detect a bug
12539 in gcc-3.4. Always use regparm 2, because the new test is still
12540 not enough for gcc-4.0. Someone must investigate a simple test
12541 case which detects a bug in gcc-4.0.
12543 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
12545 * DISTLIST: Added normal/completion.c.
12547 * normal/completion.c: New file.
12549 * term/i386/pc/console.c (grub_console_getwh): New function.
12550 (grub_console_term): Assign grub_console_getwh to getwh.
12552 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12553 function is defined in normal/completion.c as
12554 grub_normal_do_completion.
12555 (grub_cmdline_get): Use grub_normal_do_completion instead of
12558 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12559 returns non-zero, otherwise return 0.
12560 (grub_partition_iterate): First, probe the partition map. Then,
12561 call ITERATE only for this partition map.
12563 * kern/misc.c (grub_strncmp): Rewritten.
12565 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12566 returns non-zero. Otherwise return 0.
12568 * include/grub/partition.h (grub_partition_map_iterate): Return
12569 int instead of void.
12571 * include/grub/normal.h (grub_normal_do_completion): New prototype.
12573 * include/grub/misc.h (grub_strncmp): Change the type of N to
12576 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12579 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12580 unsigned explicitly before comparing it with I.
12582 * kern/main.c (grub_env_write_root): Add the attribute unused into
12585 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12586 normal/completion.c.
12587 (normal_mod_SOURCES): Likewise.
12588 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12589 (normal_mod_SOURCES): Likewise.
12591 * normal/command.c (grub_iterate_commands): If ITERATE returns
12592 non-zero, return one immediately.
12594 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
12596 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12597 * kern/i386/pc/startup.S: Updated Global Descriptor table's
12599 (grub_vbe_get_controller_info): New function.
12600 (grub_vbe_get_mode_info): Likewise.
12601 (grub_vbe_set_mode): Likewise.
12602 (grub_vbe_get_mode): Likewise.
12603 (grub_vbe_set_memory_window): Likewise.
12604 (grub_vbe_get_memory_window): Likewise.
12605 (grub_vbe_set_scanline_length): Likewise.
12606 (grub_vbe_get_scanline_length): Likewise.
12607 (grub_vbe_set_display_start): Likewise.
12608 (grub_vbe_get_display_start): Likewise.
12609 (grub_vbe_set_palette_data): Likewise.
12610 * include/grub/i386/pc/vbe.h: New file.
12612 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12614 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12615 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12616 * DISTLIST: Likewise.
12617 * kern/ieee1275/of.c: Moved to ...
12618 * kern/ieee1275/ieee1275.c: ... here.
12620 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12622 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12623 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12624 Pass 0 as `end' parameter to grub_strtoul().
12626 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
12628 * include/grub/powerpc/ieee1275/console.h: Do not include
12629 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
12631 (grub_console_cur_color): Remove i386-specific prototype.
12632 (grub_console_real_putchar): Likewise.
12633 (grub_console_checkkey): Likewise.
12634 (grub_console_getkey): Likewise.
12635 (grub_console_getxy): Likewise.
12636 (grub_console_gotoxy): Likewise.
12637 (grub_console_cls): Likewise.
12638 (grub_console_setcursor): Likewise.
12639 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
12640 Include <grub/machine/console.h>.
12641 * term/ieee1275/ofconsole.c: Likewise.
12643 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
12645 * Makefile.in (LIBLZO): New variable.
12647 * configure.ac: Check for LZO version 2.
12649 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
12650 lzo/lzo1x.h instead of lzo1x.h.
12652 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
12655 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
12656 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
12658 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
12659 copying the data from PARTITION to P.
12661 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12663 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
12664 negative, unload the module.
12666 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
12667 map is "pc_partition_map" but not "pc".
12668 (usage): Fix the description. The options are --boot-image and
12669 --core-image but not --boot-file or --core-file.
12670 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
12671 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12674 * util/i386/pc/grub-install.in: Do not specify --boot-file or
12675 --core-file. Specify INSTALL_DEVICE as an argument.
12677 * util/console.c: Include config.h.
12678 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
12679 [HAVE_NCURSES_H]: Include ncurses.h.
12680 [HAVE_CURSES_H]: Include curses.h.
12681 [!A_NORMAL] (A_NORMAL): Defined as zero.
12682 [!A_STANDOUT] (A_STANDOUT): Likewise.
12684 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
12686 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
12688 * configure.ac: Check for curses libraries and headers.
12690 * Makefile.in (LIBCURSES): New variable.
12692 * genmk.rb (Script::rule): Set the executable bits.
12694 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
12695 name of the PC partition map is "pc_partition_map" but not "pc".
12697 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12699 * util/i386/pc/grub-install.in (grub_probefs): New variable.
12700 (modules): Likewise.
12701 (usage): Added descriptions for --modules and --grub-probefs.
12702 Handle --modules and --grub-probefs. Save the arguments in MODULES
12703 and GRUB_PROBEFS, respectively.
12704 Auto-detect a filesystem module against GRUBDIR. If the result is
12705 empty and modules are not specified explicitly, abort the
12706 installation. Add the result to MODULES.
12708 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
12709 disk/powerpc/ieee1275/ofdisk.c,
12710 include/grub/powerpc/ieee1275/init.h and
12711 term/powerpc/ieee1275/ofconsole.c.
12712 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
12713 term/ieee1275/ofconsole.c.
12715 * include/grub/powerpc/ieee1275/console.h: Resurrected.
12717 * COPYING: Upgraded to the latest version. Only the address of the
12718 FSF office has changed.
12720 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
12722 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12723 kern/ieee1275.c with kern/ieee1275/of.c.
12725 * kern/ieee1275.c: Moved to ...
12726 * kern/ieee1275/of.c: ... here.
12728 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
12730 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
12733 * config.guess: Updated to the latest version from gnulib.
12734 * config.sub: Likewise.
12735 * install.sh: Likewise.
12736 * mkinstalldirs: Likewise.
12738 * include/grub/console.h: Removed. This file is arch-specific. Do
12739 not put this in include/grub.
12741 * include/grub/i386/pc/console.h: Resurrected.
12743 * util/console.c: Include grub/machine/console.h instead of
12745 * util/grub-emu.c: Likewise.
12747 2005-08-04 Marco Gerards <metgerards@student.han.nl>
12749 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
12752 From Vincent Pelletier <subdino2004@yahoo.fr>
12753 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
12754 Redefined to use grub_getwh.
12755 (grub_term): New member named getwh.
12756 (grub_getwh): New prototype.
12757 * kern/term.c (grub_getwh): New function.
12758 * term/i386/pc/console.c (grub_console_getwh): New function.
12759 (grub_console_term): New member `getwh'.
12760 * term/i386/pc/vga.c (grub_vga_getwh): New function.
12761 (grub_vga_term): New member `getwh'.
12762 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
12764 (grub_ofconsole_getw): New function.
12765 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
12766 (grub_ofconsole_term): New field named getwh and new initial
12769 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
12771 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
12772 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12773 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12774 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12775 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12776 of <grub/machine/ieee1275.h>.
12777 * commands/ieee1275/reboot.c: Likewise.
12778 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12779 * kern/ieee1275.c: ... to here. All users updated. Change all
12780 parameter structs to use new type `grub_ieee1275_cell_t'.
12781 * term/powerpc/ieee1275/ofconsole.c: Move ...
12782 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12783 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12784 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12785 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12787 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12788 Remove unused prototypes. All users updated.
12789 * include/grub/powerpc/ieee1275/console.h: Removed.
12790 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12791 `grub_ieee1275_cell_t'.
12792 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12793 Cast comparisons with -1 to the correct type.
12794 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12795 type to match `grub_ieee1275_entry_fn'.
12797 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12799 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12801 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12802 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12804 (grub_probefs_SOURCES): New variable.
12806 * util/i386/pc/grub-probefs.c: New file.
12808 * util/i386/pc/grub-setup.c (main): Call
12809 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12810 grub_hfs_init and grub_jfs_init to initialize the system. Call
12811 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12812 grub_pc_partition_map_fini to finish the system.
12814 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12816 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12818 (grub_multiboot_load_elf32): Likewise.
12819 (grub_multiboot_is_elf64): Likewise.
12820 (grub_multiboot_load_elf64): Likewise.
12821 (grub_multiboot_load_elf): Likewise.
12822 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12823 an ELF32 or ELF64 file.
12824 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12826 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12827 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12828 NULL before calling FS->LABEL.
12829 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12830 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12831 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12832 before calling FS->LABEL.
12834 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12836 * util/i386/pc/grub-install.in (datadir): New variable.
12838 (pkgdatadir): New variable.
12839 (pkglibdir): Removed.
12841 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12843 * DISTLIST: Added util/i386/pc/grub-install.in.
12845 * util/i386/pc/grub-install.in: New file.
12847 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12848 (grub_install_SOURCES): Likewise.
12850 * genmk.rb: Added support for scripts.
12851 (Script): New class.
12852 (scripts): New variable.
12854 * Makefile.in (install-local): Install sbin_SCRIPTS by
12856 (uninstall): Remove sbin_SCRIPTS.
12858 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12859 device, try to get a GRUB device by
12860 grub_util_biosdisk_get_grub_dev.
12863 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12864 description for --device-map.
12866 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12868 Change the semantics of variable hooks. They now return strings
12869 instead of error values.
12871 * util/i386/pc/grub-setup.c: Include grub/env.h.
12872 (setup): Use grub_device_set_root instead of grub_env_set.
12874 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12875 grub_env_get instead of grub_device_set_root and
12876 grub_device_get_root, respectively.
12878 * kern/main.c (grub_env_write_root): New function.
12879 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12880 grub_env_set instead of grub_device_set_root.
12882 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12884 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12885 rather than calling ENV->WRITE_HOOK afterwards.
12886 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12887 passing a pointer of a pointer.
12888 (grub_register_variable_hook): Change the types of "read_hook" and
12889 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12891 Allocate the default empty string on the heap, because this string
12892 may be freed later.
12894 * kern/device.c: Include grub/env.h.
12895 (grub_device_set_root): Removed.
12896 (grub_device_get_root): Likewise.
12897 (grub_device_open): Use grub_env_get instead of
12898 grub_device_get_root.
12900 * include/grub/env.h (grub_env_read_hook_t): New type.
12901 (grub_env_write_hook_t): Likewise.
12902 (grub_env_var): Change the types of "read_hook" and "write_hook"
12903 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12904 (grub_register_variable_hook): Likewise.
12906 * include/grub/device.h (grub_device_set_root): Removed.
12907 (grub_device_set_root): Likewise.
12909 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12910 make sure that DIRNAME terminates with '/', so that
12911 grub_fat_find_dir will fail if PATH is not a directory.
12913 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12915 Use the qualifier auto for print_files and print_files_long.
12916 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12918 Put a newline only if there is no error.
12919 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12922 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12924 * kern/partition.c (grub_partition_probe): Initialize PART to
12925 NULL. Otherwise, when no partition map is registered, this returns
12928 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12930 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12931 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12934 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12936 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12937 information on each device, if it does not have partitions. Print
12938 "Device" instead of "Disk", because this function is not specific
12941 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12942 static to ensure that it is put on the memory rather than a
12945 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12947 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12948 (grub_cat_init): Likewise.
12949 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12950 (options): Likewise.
12951 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12952 (grub_configfile_init): Likewise.
12953 * font/manager.c (GRUB_MOD_INIT): Likewise.
12954 * commands/help.c (GRUB_MOD_INIT): Likewise.
12955 (grub_help_init): Likewise.
12956 * normal/command.c (grub_command_init): Likewise.
12957 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12958 * disk/loopback.c (grub_loop_init): Likewise.
12959 (GRUB_MOD_INIT): Likewise.
12960 * commands/ls.c (grub_ls_init): Likewise.
12961 (GRUB_MOD_INIT): Likewise.
12962 (options): Likewise.
12963 * commands/boot.c (grub_boot_init): Likewise.
12964 (GRUB_MOD_INIT): Likewise.
12965 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12966 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12967 (GRUB_MOD_INIT): Likewise.
12968 * commands/cmp.c (grub_cmp_init): Likewise.
12969 (GRUB_MOD_INIT): Likewise.
12971 * normal/arg.c: Use <> instead of "" to include header files.
12972 (SHORT_ARG_HELP): New macro.
12973 (SHORT_ARG_USAGE): Likewise.
12974 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12975 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12977 (find_short): Check if C is 'h' or 'u' explicitly.
12978 (grub_arg_show_help): Use space characters instead of tabs. Treat
12979 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12980 are shown with --help and --usage only if they are not used for
12981 the command itself.
12982 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12985 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12986 const into "longarg". Change the type of "shortarg" to int.
12988 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
12990 * boot/i386/pc/boot.S (boot_drive_check): New label.
12992 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12995 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12996 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12998 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13000 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13001 When turning off Gate A20, skip the check and return immediately,
13002 because this is not fatal usually.
13004 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13006 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13007 be 0x7C00 instead of 0x8000.
13009 * boot/i386/pc/pxeboot.S: Rewritten.
13011 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13013 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13016 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13018 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13019 robustness. This routine now supports a BIOS call and System
13020 Control Port A to modify the gate A20.
13022 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13023 Increased to 0x440.
13025 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
13027 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13028 device path and resulting ihandle.
13029 (grub_ofdisk_close): dprintf the ihandle being closed.
13030 (grub_ofdisk_read): dprintf function parameters.
13031 * kern/mm.c (grub_mm_init_region): Likewise.
13032 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13033 (grub_linux_boot): dprintf the Linux entry point, initrd address and
13034 size, and boot arguments.
13035 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13036 before loading into memory.
13037 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13038 before loading into memory.
13040 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
13042 * kern/mm.c: Added much documentation.
13043 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13044 8, set to 5 instead of 8.
13046 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13048 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13050 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13051 (grub_mkdevicemap_SOURCES): New variable.
13053 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13054 lib/device.c of GRUB Legacy.
13056 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
13058 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13059 instead of PATH is NULL.
13061 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
13063 * commands/cmp.c (BUFFER_SIZE): New macro.
13064 (grub_cmd_cmp): Close the right file at the right time. Compare
13065 only data just read. Don't report files of different size as
13066 identical. Dynamically allocate buffers. Move variable
13067 declarations at the beginning of function.
13069 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
13071 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13074 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
13076 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13077 when backspace is pressed at beginning of line.
13079 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
13081 * DISTLIST: Added genfslist.sh.
13083 * normal/main.c (fs_module_list): New variable.
13084 (autoload_fs_module): New function.
13085 (read_fs_list): Likewise.
13086 (grub_normal_execute): Call read_fs_list.
13088 * kern/fs.c (grub_fs_autoload_hook): New variable.
13089 (grub_fs_probe): Added support for auto-loading.
13091 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13092 (grub_fs_module_list_t): New type.
13094 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13095 (grub_fs_autoload_hook): New prototype.
13097 * genfslist.sh: New file.
13099 * genmk.rb: Added a rule to generate a filesystem list.
13101 2005-06-30 Marco Gerards <metgerards@student.han.nl>
13103 * configure.ac: Fix the test for cross-compiling.
13105 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13106 define GRUB_UTIL anymore.
13108 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13109 so this function works on other systems than just big endian.
13110 (load_modules): Likewise.
13111 (add_segments): Likewise.
13113 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13115 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13116 contains `l' modifier, get a long from va_arg().
13118 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13120 * kern/mm.c (grub_free): If the next free block which is being
13121 merged is the first free block, set the first block to the block
13123 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13125 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13127 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13128 `grub_ieee1275_chosen'.
13130 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13132 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13133 (grub_ieee1275_chosen): New variable.
13134 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13136 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13137 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13138 Rename first argument to `phandle' for consistency.
13139 (grub_ieee1275_get_property_length): Likewise.
13140 (grub_ieee1275_next_property): Likewise. Change type of first argument
13141 to grub_ieee1275_phandle_t.
13142 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13143 Move export next to declaration.
13144 (grub_ieee1275_chosen): New variable.
13145 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13146 Correct cosmetic typo.
13147 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13148 `grub_ieee1275_chosen'.
13149 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13150 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13151 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13152 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13153 `grub_ieee1275_chosen'.
13155 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13157 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13159 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13160 /chosen/bootargs as "variable=value" pairs.
13162 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13164 * include/grub/misc.h (grub_dprintf): New macro.
13165 (grub_real_dprintf): New prototype.
13166 (grub_strword): Likewise.
13167 (grub_iswordseparator): Likewise.
13168 * kern/misc.c (grub_real_dprintf): New function.
13169 (grub_strword): Likewise.
13170 (grub_iswordseparator): Likewise.
13172 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13174 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13175 (roundup): Remove macro.
13176 (grub_ieee1275_flags): Make static.
13177 (grub_ieee1275_realmode): Remove.
13178 (grub_ieee1275_test_flag): New function.
13179 (grub_ieee1275_set_flag): Likewise.
13180 (find_options): Rename to `grub_ieee1275_find_options'; update
13181 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13182 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13183 (cmain): New prototype.
13184 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13185 `grub_ieee1275_flags' directly.
13186 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13187 machine/biosdisk.h.
13188 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13189 Don't include grub/machine/init.h.
13190 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13191 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13193 (grub_ieee1275_realmode): Likewise.
13194 (grub_ieee1275_flag): New enum.
13195 (grub_ieee1275_test_flag): New prototype.
13196 (grub_ieee1275_set_flag): New prototype.
13197 * include/grub/powerpc/ieee1275/init.h: Remove file.
13198 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13199 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13200 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13201 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13203 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13204 `grub_ieee1275_test_flag'.
13205 (grub_ieee1275_encode_devname): Likewise.
13207 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13209 * include/grub/powerpc/ieee1275/ieee1275.h
13210 (grub_ieee1275_encode_devname): New prototype.
13211 (grub_ieee1275_get_filename): Likewise.
13212 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13214 (grub_set_prefix): Likewise.
13215 (grub_machine_init): Call grub_set_prefix.
13216 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13217 (grub_parse_type): New enum.
13218 (grub_ieee1275_get_devargs): New function.
13219 (grub_ieee1275_get_devname): Likewise.
13220 (grub_ieee1275_parse_args): Likewise.
13221 (grub_ieee1275_get_filename): Likewise.
13222 (grub_ieee1275_encode_devname): Likewise.
13224 2005-03-30 Marco Gerards <metgerards@student.han.nl>
13226 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13227 `grub_loader_unset'.
13229 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13231 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13232 instead of grub_ieee1275_interpret.
13233 (grub_halt_init): New function.
13234 (grub_halt_fini): Likewise.
13235 (GRUB_MOD_INIT): Correct message grammar.
13236 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13237 instead of grub_ieee1275_interpret.
13238 (grub_reboot_init): New function.
13239 (grub_reboot_fini): Likewise.
13240 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13241 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13242 util/i386/pc/misc.c with commands/ieee1275/halt.c,
13243 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13244 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13246 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13248 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13250 (grub_halt): Likewise.
13251 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13252 (cmain): Remove __attribute__((unused)).
13253 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13254 (grub_heap_len): Likewise.
13255 (grub_machine_fini): New function.
13256 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13257 (grub_halt): Likewise.
13258 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13260 * util/powerpc/ieee1275/misc.c: New file.
13262 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13264 * DISTLIST: New file.
13265 * gendistlist.sh: Likewise.
13267 * Makefile.in (COMMON_DISTFILES): Removed.
13268 (BOOT_DISTFILES): Likewise.
13269 (CONF_DISTFILES): Likewise.
13270 (DISK_DISTFILES): Likewise.
13271 (FS_DISTFILES): Likewise.
13272 (INCLUDE_DISTFILES): Likewise.
13273 (KERN_DISTFILES): Likewise.
13274 (LOADER_DISTFILES): Likewise.
13275 (TERM_DISTFILES): Likewise.
13276 (UTIL_DISTFILES): Likewise.
13277 (DISTFILES): Likewise.
13278 (uninstall): Uninstall files in $(pkgdata_DATA).
13279 (DISTLIST): New target.
13280 (distdir): Use the contents of the file DISTLIST to get a list of
13283 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
13285 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
13286 descriptor. This is ported from GRUB Legacy.
13288 * gencmdlist.sh: Added an extra semicolon to make it work with
13289 old sed versions. Reported by Robert Bihlmeyer
13290 <robbe@orcus.priv.at>.
13292 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
13294 Automatic loading of commands is supported.
13296 * normal/main.c (read_command_list): New function.
13297 (grub_normal_execute): Call read_command_list.
13299 * normal/command.c (grub_register_command): Return zero or CMD.
13300 Allocate CMD->NAME from the heap.
13301 Initialize CMD->MODULE_NAME to zero.
13302 Find the same name as well. If the same command is found and it is
13303 a dummy command, overwrite members. If it is not a dummy command,
13305 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
13306 (grub_command_find): If a dummy command is found, load a module
13307 and retry to find a command only once.
13309 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
13310 make sure that each command is loaded.
13312 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
13314 (struct grub_command): Remove const from the member `name'.
13315 Add a new member `module_name'.
13316 (grub_register_command): Return grub_command_t.
13318 * commands/help.c (grub_cmd_help): Call grub_command_find to make
13319 sure that each command is loaded.
13321 * genmk.rb (PModule::rule): Specify a module name without the
13322 suffix ".mod" to gencmdlist.sh.
13324 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13326 * gencmdlist.sh: New file.
13328 * genmk.rb (PModule::rule): Generate a rule for a command list.
13330 Generate command.lst from $(COMMANDFILES).
13332 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13333 (DATA): Added $(pkgdata_DATA).
13334 (install-local): Install files in $(pkgdata_DATA).
13336 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
13338 * term/i386/pc/vga.c (debug_command): Removed.
13339 (GRUB_MOD_INIT): Do not register the command "debug".
13341 From Hollis Blanchard:
13342 * commands/configfile.c: New file.
13343 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13344 commands/configfile.c.
13345 (pkgdata_MODULES): Added configfile.mod.
13346 (configfile_mod_SOURCES): New variable.
13347 (configfile_mod_CFLAGS): Likewise.
13348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13349 commands/configfile.c.
13350 (pkgdata_MODULES): Added configfile.mod.
13351 (configfile_mod_SOURCES): New variable.
13352 (configfile_mod_CFLAGS): Likewise.
13353 * util/grub-emu.c (main): Call grub_configfile_init and
13354 grub_configfile_fini.
13355 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13357 [GRUB_UTIL] (grub_configfile_fini): Likewise.
13359 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13361 * normal/arg.c (grub_arg_show_help): Do not show the bug report
13364 * commands/help.c (grub_cmd_help): Do not print newlines after
13365 the last command in print_command_help.
13367 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
13369 * commands/default.h: New file.
13370 * commands/timeout.h: Likewise.
13371 * normal/context.c: Likewise.
13373 * util/misc.c: Do not include sys/times.h.
13374 Include sys/time.h and grub/machine/time.h.
13375 (grub_get_rtc): Rewritten with gettimeofday.
13377 * util/grub-emu.c (main): Call grub_default_init and
13378 grub_timeout_init before grub_normal_init, and call
13379 grub_timeout_fini and grub_default_fini after grub_main.
13381 * util/console.c (grub_ncurses_checkkey): Return the read
13384 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13387 * normal/main.c (read_config_file): Push MENU. If this fails,
13388 print an error and wait for a user input.
13389 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13390 If a menu is empty or an error occurs, pop MENU.
13391 (grub_normal_execute): Pop and free MENU after grub_menu_run
13394 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13396 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13398 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13400 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13402 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13405 * include/grub/normal.h (struct grub_menu_list): New struct.
13406 (grub_menu_list_t): New type.
13407 (struct grub_context): New struct.
13408 (grub_context_t): New type.
13409 (grub_register_command): Got rid of EXPORT_FUNC.
13410 (grub_unregister_command): Likewise.
13411 (grub_context_get): New prototype.
13412 (grub_context_get_current_menu): Likewise.
13413 (grub_context_push_menu): Likewise.
13414 (grub_context_pop_menu): Likewise.
13415 [GRUB_UTIL] (grub_default_init): Likewise.
13416 [GRUB_UTIL] (grub_default_fini): Likewise.
13417 [GRUB_UTIL] (grub_timeout_init): Likewise.
13418 [GRUB_UTIL] (grub_timeout_fini): Likewise.
13420 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13421 commands/timeout.c and normal/context.c.
13422 (pkgdata_MODULES): Added default.mod and timeout.mod.
13423 (normal_mod_SOURCES): Added normal/context.c.
13424 (default_mod_SOURCES): New variable.
13425 (default_mod_CFLAGS): Likewise.
13426 (timeout_mod_SOURCES): Likewise.
13427 (timeout_mod_CFLAGS): Likewise.
13428 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13430 (pkgdata_MODULES): Added default.mod and timeout.mod.
13431 (normal_mod_SOURCES): Added normal/context.c.
13432 (default_mod_SOURCES): New variable.
13433 (default_mod_CFLAGS): Likewise.
13434 (timeout_mod_SOURCES): Likewise.
13435 (timeout_mod_CFLAGS): Likewise.
13437 * Makefile.in (all-local): Added $(MKFILES).
13439 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
13441 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13442 (grub_emu_SOURCES): Likewise.
13443 (pkgdata_MODULES): Add `sun.mod'.
13444 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13445 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13447 (pkgdata_MODULES): Add `sun.mod'.
13448 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13449 * include/grub/partition.h (grub_sun_partition_map_init): New
13451 (grub_sun_partition_map_fini): Likewise.
13452 * partmap/sun.c: New file.
13453 * util/grub-emu.c (main): Initialize and de-initialize the sun
13454 partitionmap support.
13456 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
13458 This implements an Emacs-like menu entry editor.
13460 * normal/menu_entry.c: New file.
13462 * util/console.c (grub_ncurses_putchar): Translate some Unicode
13463 characters to ASCII.
13464 (saved_char): New variable.
13465 (grub_ncurses_checkkey): Rewritten completely.
13466 (grub_ncurses_getkey): Likewise.
13467 (grub_ncurses_init): Call raw instead of cbreak.
13469 * normal/menu.c (print_entry): Do not put a space.
13470 (init_page): Renamed to ...
13471 (grub_menu_init_page): ... this. All callers changed.
13472 (edit_menu_entry): Removed.
13473 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13475 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13477 * kern/misc.c (grub_vprintf): Call grub_refresh.
13479 * normal/menu.c (DISP_LEFT): Renamed to ...
13480 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13481 * normal/menu.c (DISP_UP): Renamed to ...
13482 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13483 * normal/menu.c (DISP_RIGHT): Renamed to ...
13484 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13485 * normal/menu.c (DISP_DOWN): Renamed to ...
13486 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13487 * normal/menu.c (DISP_HLINE): Renamed to ...
13488 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13489 * normal/menu.c (DISP_VLINE): Renamed to ...
13490 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13491 * normal/menu.c (DISP_UL): Renamed to ...
13492 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13493 * normal/menu.c (DISP_UR): Renamed to ...
13494 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13495 * normal/menu.c (DISP_LL): Renamed to ...
13496 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13497 * normal/menu.c (DISP_LR): Renamed to ...
13498 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13499 * normal/menu.c (TERM_WIDTH): Renamed to ...
13500 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13501 * normal/menu.c (TERM_HEIGHT): Renamed to ...
13502 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13503 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13504 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13505 * normal/menu.c (TERM_MARGIN): Renamed to ...
13506 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13507 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13508 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13509 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13510 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13511 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13512 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13513 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13514 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13515 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13516 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13517 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13518 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13519 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13520 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13521 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13522 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13523 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13524 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13525 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13526 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13527 All callers changed.
13529 * include/grub/normal.h: New prototype.
13531 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13532 normal/menu_entry.c.
13533 (normal_mod_SOURCES): Likewise.
13534 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13535 (normal_mod_SOURCES): Likewise.
13537 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
13539 * include/grub/normal.h (grub_halt_init): New prototype.
13540 (grub_halt_fini): Likewise.
13541 (grub_reboot_init): Likewise.
13542 (grub_reboot_fini): Likewise.
13544 * util/grub-emu.c: Include signal.h.
13545 (main_env): New global variable.
13546 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13548 (grub_machine_fini): New function.
13549 (main): Call grub_halt_init and grub_reboot_init before
13550 grub_main, and grub_reboot_fini and grub_halt_fini after it.
13551 Call setjmp with MAIN_ENV to go back afterwards.
13552 Call grub_machine_fini right before return.
13554 * include/grub/util/misc.h: Include setjmp.h.
13555 (main_env): New prototype.
13557 * include/grub/kernel.h (grub_machine_fini): New prototype.
13558 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13559 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13561 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13562 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13563 * term/i386/pc/console.c (grub_console_fini): Likewise.
13565 * util/i386/pc/misc.c: New file.
13567 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13568 util/i386/pc/misc.c, commands/i386/pc/halt.c and
13569 commands/i386/pc/reboot.c.
13571 2005-02-14 Guillem Jover <guillem@hadrons.org>
13573 * include/grub/dl.h (grub_dl_check_header): New prototype.
13574 (grub_arch_dl_check_header): Change return type to grub_err_t,
13575 remove size parameter and export function. Update all callers.
13576 * kern/dl.c (grub_dl_check_header): New function.
13577 (grub_dl_load_core): Use `grub_dl_check_header' instead of
13578 `grub_arch_dl_check_header'. Check ELF type. Check if sections
13579 are inside the core.
13580 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13581 independent ELF header checks.
13582 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13583 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13584 `grub_dl_check_header' instead of explicit checks. Check for the
13586 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13587 `grub_dl_check_header' instead of explicit checks. Remove arch
13588 specific ELF header checks.
13590 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13593 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
13595 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13596 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13598 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
13600 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13601 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13602 (part_map_iterate): Clear `grub_errno' and return 0 if
13603 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13604 * partmap/amiga.c (amiga_partition_map_iterate): Return
13605 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13606 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13608 2005-02-01 Guillem Jover <guillem@hadrons.org>
13610 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13613 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13615 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13617 (grub_rescue_cmd_linux): New prototype.
13618 (grub_rescue_cmd_initrd): Likewise.
13619 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13621 (grub_linux_release_mem): Release the memory for the initrd.
13622 (grub_load_linux): Renamed from this...
13623 (grub_rescue_cmd_linux): ...To this. Changed all callers.
13624 Changed `entry' not to be static. Loop over memory regions to
13625 find another one when the default fails.
13626 (grub_rescue_cmd_initrd): New function.
13627 (grub_linux_init): Remove function.
13628 (grub_linux_fini): Likewise.
13629 (GRUB_MOD_INIT): Register `initrd'.
13630 (GRUB_MOD_FINI): Unregister `initrd'.
13631 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
13633 (grub_linux_normal_fini): Likewise.
13634 (GRUB_MOD_INIT): Register `initrd'.
13635 (GRUB_MOD_FINI): Unregister `initrd'.
13637 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13639 * commands/help.c: New file.
13640 * normal/arg.c (show_help): Renamed to...
13641 (grub_arg_show_help): ... this.
13642 * commands/i386/pc/halt.c: New file.
13643 * commands/i386/pc/reboot.c: Likewise.
13644 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
13645 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
13646 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
13647 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
13649 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13651 (pkgdata_MODULES): Add `help.mod'.
13652 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
13653 * grub/i386/pc/init.h (grub_reboot): New prototype.
13654 (grub_halt): Likewise.
13655 * include/grub/normal.h (grub_arg_show_help): New prototype.
13656 (grub_help_init): Likewise.
13657 (grub_help_fini): Likewise.
13658 * util/grub-emu.c (main): Initialize and deinitialize the help
13661 * normal/cmdline.c (grub_cmdline_get): Doc fix.
13663 * normal/command.c (grub_command_init): Fixed the description of
13664 the `set' and `unset' commands.
13666 2005-01-31 Marco Gerards <metgerards@student.han.nl>
13668 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
13670 * commands/ieee1275/halt.c: New file.
13671 * commands/ieee1275/reboot.c: Likewise.
13672 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
13673 `__attribute__ ((unused))'. Some GCS related fixed.
13674 (grub_suspend_init) [GRUB_UTIL]: Function removed.
13675 (grub_suspend_fini): Likewise.
13676 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
13678 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
13679 (halt_mod_CFLAGS): New variables.
13680 * include/grub/powerpc/ieee1275/ieee1275.h
13681 (grub_ieee1275_interpret): New prototype.
13683 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
13685 * include/grub/misc.h (memmove): New prototype.
13686 (memcpy): Likewise.
13688 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
13690 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
13691 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
13693 2005-01-22 Marco Gerards <metgerards@student.han.nl>
13695 * kern/misc.c (grub_strndup): Function rewritten.
13697 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
13699 * normal/menu.c (TERM_WIDTH): Macro redefined.
13700 (TERM_TOP_BORDER_Y): Likewise.
13701 (draw_border): Replaced while-loop by a for-loop. Make the number
13702 of lines consistent with the number of lines displayed in
13703 print_entries. Added a margin below the rectangle.
13704 (print_entry): Make the entry fit in the rectangle.
13705 (print_entries): Display the scroll arrows next to the right
13708 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13710 * fs/minix.c (grub_minix_find_file): Reserve more space for
13711 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
13712 `grub_strncpy' to copy `path' into it.
13714 2005-01-21 Marco Gerards <metgerards@student.han.nl>
13716 Add the loopback device, a device via which files can be accessed
13719 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
13720 (pkgdata_MODULES): Add loopback.mod.
13721 (loopback_mod_SOURCES): New variable.
13722 (loopback_mod_CFLAGS): Likewise.
13723 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13725 (pkgdata_MODULES): Add loopback.mod.
13726 (loopback_mod_SOURCES): New variable.
13727 (loopback_mod_CFLAGS): Likewise.
13728 * disk/loopback.c: new file.
13729 * include/grub/normal.h (grub_loop_init): New prototype.
13730 (grub_loop_fini): New prototype.
13731 * util/grub-emu.c (main): Initialize and de-initialize loopback
13733 * include/grub/disk.h (grub_disk_dev_id): Add
13734 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
13736 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
13738 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
13740 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
13741 (suspend_mod_SOURCES): New variable.
13742 (suspend_mod_CFLAGS): Likewise.
13743 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
13745 * commands/ieee1275/suspend.c: New file.
13747 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
13749 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
13750 ((unused))' to `__attribute__ ((used))'.
13751 (GRUB_MOD_FINI): Likewise.
13752 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
13753 * genmk.rb (PModule): Assign space to common symbols when linking
13756 2005-01-20 Marco Gerards <metgerards@student.han.nl>
13758 * include/grub/mm.h (grub_mm_init_region): Change the type of the
13759 `unsigned' arguments to `grub_size_t'.
13760 (grub_malloc): Likewise.
13761 (grub_realloc): Likewise.
13762 (grub_memalign): Likewise.
13763 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
13764 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13765 * util/misc.c (grub_malloc): Likewise.
13766 (grub_realloc): Likewise.
13767 * kern/mm.c (get_header_from_pointer): Change the casts to
13768 `unsigned' into a cast to `grub_size_t'.
13770 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
13771 point to `currnode' when `currnode' is changed.
13773 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13774 Schottelius <nico-linux@schottelius.org>.
13776 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13778 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13779 (note_path): Remove variable.
13780 (GRUB_IEEE1275_NOTE_NAME): New macro.
13781 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13782 (grub_ieee1275_note_hdr): New structure.
13783 (grub_ieee1275_note_desc): Likewise.
13784 (grub_ieee1275_note): Likewise.
13785 (load_note): Remove `dir' argument. All callers updated. Remove
13786 `note_img' and `path'. Do not load a file from `note_path'.
13787 Initialize a struct grub_ieee1275_note and write that to `out'.
13788 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13790 2005-01-05 Marco Gerards <metgerards@student.han.nl>
13792 * util/misc.c (grub_util_read_image): Revert last change. It
13793 called `grub_util_read_at', which seeks from the beginning of the
13796 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13798 * TODO: Add note about endianness in grub-mkimage.
13799 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13801 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13802 (grub_mkimage_SOURCES): New target.
13803 * include/grub/kernel.h (grub_start_addr): Remove variable.
13804 (grub_end_addr): Likewise.
13805 (grub_total_module_size): Likewise.
13806 (grub_kernel_image_size): Likewise.
13807 (GRUB_MODULE_MAGIC): New constant.
13808 (grub_module_info): New structure.
13809 (grub_arch_modules_addr): New prototype.
13810 (grub_get_end_addr): Remove prototype.
13811 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13812 * include/grub/powerpc/ieee1275/kernel.h: New file.
13813 * include/grub/util/misc.h (grub_util_get_fp_size): New
13815 (grub_util_read_at): Likewise.
13816 (grub_util_write_image_at): Likewise.
13817 * kern/main.c (grub_get_end_addr): Remove function.
13818 (grub_load_modules): Call grub_arch_modules_addr instead of using
13819 grub_end_addr. Look for a grub_module_info struct in memory. Use
13820 the grub_module_info fields instead of calling grub_get_end_addr
13821 as loop conditions. Move grub_add_unused_region code here.
13822 (grub_add_unused_region): Remove function.
13823 * kern/i386/pc/init.c: Include grub/cache.h.
13824 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13825 one call to add_mem_region.
13826 (grub_arch_modules_addr): New function.
13827 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13828 (grub_total_module_size): Likewise.
13829 Include grub/machine/kernel.h.
13830 (grub_arch_modules_addr): New function.
13831 * util/grub-emu.c (grub_end_addr): Remove variable.
13832 (grub_total_module_size): Likewise.
13833 (grub_arch_modules_addr): New function.
13834 * util/misc.c: Include unistd.h.
13835 (grub_util_get_fp_size): New function.
13836 (grub_util_read_at): Likewise.
13837 (grub_util_write_image_at): Likewise.
13838 (grub_util_read_image): Call grub_util_read_at.
13839 (grub_util_write_image): Call grub_util_write_image_at.
13840 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13841 additional memory in kernel_img for a struct grub_module_info.
13842 Fill in that grub_module_info.
13843 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13845 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13847 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13849 * include/grub/powerpc/ieee1275/ieee1275.h
13850 (grub_ieee1275_milliseconds): New prototype.
13851 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13853 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13854 grub_ieee1275_milliseconds.
13856 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13858 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13860 (find_options): New function.
13861 (cmain): Call find_options.
13862 * include/grub/powerpc/ieee1275/ieee1275.h
13863 (grub_ieee1275_realmode): New extern variable.
13864 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13865 grub_map if grub_ieee1275_realmode is false.
13867 2004-12-29 Marco Gerards <metgerards@student.han.nl>
13869 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13870 lines are inserted and make it work like readline. Reported by
13871 Vincent Pelletier <subdino2004@yahoo.fr>.
13873 2004-12-28 Marco Gerards <metgerards@student.han.nl>
13875 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13877 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13878 `kern/powerpc/cache.S'.
13880 2004-12-27 Marco Gerards <metgerards@student.han.nl>
13882 * genmk.rb: Handle the `Program' class in the main loop. Written
13883 by Johan Rydberg <jrydberg@gnu.org>.
13884 (Program): New class.
13885 (programs): New variable.
13886 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13887 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13888 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13889 (help_arch): Function removed.
13890 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13891 `powerpc/libgcc.h' and `loader.h'.
13892 (pkgdata_PROGRAMS): New variable.
13893 (sbin_UTILITIES): Variable removed.
13894 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13895 (grubof_SOURCES): Variable re-defined so it only includes the
13896 core functionality.
13897 (grubof_CFLAGS): Remove `-DGRUBOF'.
13898 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13899 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13900 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13901 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13902 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13903 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13904 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13905 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13906 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13907 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13908 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13909 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13910 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13911 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13912 (pc_mod_CFLAGS): New variables.
13913 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13914 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13915 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13916 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13918 * include/grub/i386/pc/init.h (grub_os_area_addr)
13919 (rub_os_area_size): ... to here.
13920 * include/grub/powerpc/ieee1275/ieee1275.h
13921 (grub_ieee1275_entry_fn): Export symbol.
13922 * include/grub/powerpc/ieee1275/init.h: New file.
13923 * include/grub/powerpc/libgcc.h: Likewise.
13924 * include/grub/cache.h: Likewise.
13925 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13926 <hollis@penguinppc.org>.
13927 * kern/dl.c: Include <grub/cache.h>.
13928 (grub_dl_flush_cache): New function.
13929 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13931 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13932 (grub_console_init): Removed prototypes.
13933 (grub_machine_init): Don't initialize the modules anymore.
13934 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13936 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13937 Macro undef removed.
13938 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13939 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13940 relocation `R_PPC_REL32'. Return an error when the relocation is
13942 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13943 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13944 * util/misc.c (grub_arch_sync_caches): Likewise.
13946 2004-12-19 Marco Gerards <metgerards@student.han.nl>
13948 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13949 `symlist.c', add `grubof_symlist.c'.
13950 (symlist.c): Variable removed.
13951 (grubof_HEADERS): Variable added.
13952 (grubof_symlist.c): New target.
13953 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13954 `kernel_img_HEADERS'.
13955 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13956 * kern/powerpc/dl.c: New file.
13957 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13959 (grub_arch_dl_relocate_symbols): Likewise.
13960 (grub_register_exported_symbols): Likewise.
13962 2004-12-13 Marco Gerards <metgerards@student.han.nl>
13964 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13965 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13966 to fail instead. Reported by Vincent Pelletier
13967 <subdino2004@yahoo.fr>.
13969 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13970 it is not allocated. Reported by Vincent Pelletier
13971 <subdino2004@yahoo.fr>.
13973 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13974 output so the output looks better.
13976 2004-12-04 Marco Gerards <metgerards@student.han.nl>
13978 Modulize the partition map support and add support for the amiga
13981 * commands/ls.c: Include <grub/partition.h> instead of
13982 <grub/machine/partition.h>.
13983 * kern/disk.c: Likewise.
13984 * kern/rescue.c: Likewise.
13985 * loader/i386/pc/chainloader.c: Likewise.
13986 * normal/cmdline.c: Likewise.
13987 * kern/powerpc/ieee1275/init.c: Likewise.
13988 (grub_machine_init): Call `grub_pc_partition_map_init',
13989 `grub_amiga_partition_map_init' and
13990 `grub_apple_partition_map_init'.
13991 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13992 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13993 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13994 `partition.h' and `pc_partition.h'.
13995 (grub_setup_SOURCES): Remove
13996 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13997 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13998 (grub_emu_SOURCES): Likewise.
13999 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14000 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14001 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14002 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14003 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14004 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14005 (grubof_SOURCES): Likewise.
14006 * disk/i386/pc/partition.c: File removed.
14007 * disk/powerpc/ieee1275/partition.c: Likewise.
14008 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14009 * include/grub/i386/pc/partition.h: Likewise.
14010 * kern/partition.c: New file.
14011 * partmap/amiga.c: Likewise.
14012 * partmap/apple.c: Likewise.
14013 * partmap/pc.c: Likewise.
14014 * include/grub/partition.h: Likewise..
14015 * include/grub/pc_partition.h: Likewise.
14016 * util/grub-emu.c: Include <grub/partition.h> instead of
14017 <grub/machine/partition.h>.
14018 (main): Call `grub_pc_partition_map_init',
14019 `grub_amiga_partition_map_init' and
14020 `grub_apple_partition_map_init' and deinitialize afterwards.
14021 * util/i386/pc/biosdisk.c: Include `#include
14022 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14023 `<grub/machine/partition.h>'.
14024 * util/i386/pc/grub-setup.c: Likewise.
14025 * util/i386/pc/biosdisk.c: Likewise.
14026 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14027 partition information in case of a PC partition.
14028 * util/i386/pc/grub-setup.c: Include `#include
14029 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14030 `<grub/machine/partition.h>'.
14031 (setup): Only access the PC specific partition information in case
14034 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
14036 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14037 (grub_longjmp): Likewise.
14038 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14040 * normal/powerpc/setjmp.S: New file.
14041 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14042 `normal/powerpc/setjmp.S'.
14043 (grubof_CFLAGS): Add `-DGRUBOF'.
14044 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14045 [GRUB_UTIL && !GRUBOF].
14047 2004-11-16 Marco Gerards <metgerards@student.han.nl>
14049 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14050 property named `name'. Correctly handle the error returned by
14051 `grub_ieee1275_finddevice' if a device can not be opened.
14053 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
14055 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14056 `actual' for negativity.
14057 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14060 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14062 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14063 (PAGE_OFFSET): New macro.
14064 (CRTC_ADDR_PORT): Likewise.
14065 (CRTC_DATA_PORT): Likewise.
14066 (START_ADDR_HIGH_REGISTER): Likewise.
14067 (START_ADDR_LOW_REGISTER): Likewise.
14068 (GRAPHICS_ADDR_PORT): Likewise.
14069 (GRAPHICS_DATA_PORT): Likewise.
14070 (READ_MAP_REGISTER): Likewise.
14071 (INPUT_STATUS1_REGISTER): Likewise.
14072 (INPUT_STATUS1_VERTR_BIT): Likewise.
14073 (page): New variable.
14074 (wait_vretrace): New function.
14075 (set_read_map): Likewise.
14076 (set_start_address): Likewise.
14077 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14079 (check_vga_mem): Take the page into account.
14080 (write_char): Likewise.
14081 (write_cursor): Likewise.
14082 (scroll_up): Likewise. Copy the page to the page that is not
14083 shown and switch between both pages.
14084 (grub_vga_putchar): Fix off by one error.
14085 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14088 2004-11-01 Marco Gerards <metgerards@student.han.nl>
14090 Add support for iso9660 (including rockridge).
14092 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14093 (iso9660_mod_SOURCES): New variable.
14094 (iso9660_mod_CFLAGS): Likewise.
14095 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14096 * include/grub/fs.h (grub_iso9660_init): New prototype.
14097 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14098 * fs/iso9660.c: New file.
14100 * include/grub/misc.h (grub_strncat): New prototype.
14101 * kern/misc.c (grub_strncat): New function.
14103 * fs/hfs.c (grub_hfs_mount): Translate the error
14104 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14105 * fs/jfs.c (grub_jfs_mount): Likewise.
14106 * fs/ufs.c (grub_ufs_mount): Likewise.
14108 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14110 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14111 which initialized BAT registers.
14112 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14113 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14115 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14116 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14118 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14119 (grub_mapclaim): Likewise.
14120 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14121 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14124 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14126 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14127 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14128 -ffreestanding and -msoft-float.
14130 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14132 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14133 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14134 set in grub_ieee1275_flags.
14136 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14138 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14140 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14141 grub_console_init first.
14142 Change the memory range used for grub_ieee1275_claim and
14143 grub_mm_init_region.
14144 Print an error message if the claim fails.
14145 Include <grub/misc.h>.
14147 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14149 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14150 Call grub_children_iterate for device nodes of type `scsi',
14152 (grub_ofdisk_open): Remove manual device alias resolution.
14153 Fix memory leak when device cannot be opened.
14154 * include/grub/powerpc/ieee1275/ieee1275.h
14155 (grub_children_iterate): New prototype.
14156 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14158 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14159 Return -1 if args.size was -1.
14161 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14163 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14164 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14165 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14166 Open Firmware's memory for it; claim memory from _start to _end.
14167 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14168 (_end): New extern.
14169 (_start): Zero BSS from __bss_start to _end.
14170 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14172 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14174 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14176 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14177 -1 if args.base was -1.
14179 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14181 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14182 escape sequence instead of a literal ^L. Also call
14183 grub_ofconsole_gotoxy.
14185 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14187 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14188 void * arguments to grub_addr_t. All callers updated. Also make
14189 the `result' argument optional.
14190 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14191 All callers updated.
14193 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14195 * commands/ls.c (grub_ls_list_files): Use the string following the
14196 initial ')', if present, as the filesystem path.
14197 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14199 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14201 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14203 Make the source code of the menu interface more readable.
14205 * normal/menu.c: Include grub/mm.h.
14206 (TERM_WIDTH): New macro.
14207 (TERM_HEIGHT): Likewise.
14208 (TERM_INFO_HEIGHT): Likewise.
14209 (TERM_MARGIN): Likewise.
14210 (TERM_SCROLL_WIDTH): Likewise.
14211 (TERM_TOP_BORDER_Y): Likewise.
14212 (TERM_LEFT_BORDER_X): Likewise.
14213 (TERM_BORDER_WIDTH): Likewise.
14214 (TERM_MESSAGE_HEIGHT): Likewise.
14215 (TERM_BORDER_HEIGHT): Likewise.
14216 (TERM_NUM_ENTRIES): Likewise.
14217 (TERM_FIRST_ENTRY_Y): Likewise.
14218 (TERM_ENTRY_WIDTH): Likewise.
14219 (TERM_CURSOR_X): Likewise.
14220 (draw_border): Use macros instead of magic numbers.
14221 (print_entry): Likewise.
14222 (print_entries): Likewise.
14223 (run_menu): Likewise. Also, handle the key 'e'.
14224 (run_menu_entry): Ignore empty command lines.
14225 (print_message): Added a new argument EDIT. If EDIT is true,
14226 print a different message.
14227 (init_page): Likewise.
14228 (edit_menu_entry): New function. Not implemented yet.
14230 2004-09-17 Marco Gerards <metgerards@student.han.nl>
14232 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14233 can be loaded from normal mode.
14235 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14237 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14238 (multiboot_mod_CFLAGS): New variables.
14239 * loader/i386/pc/linux_normal.c: New file.
14240 * loader/i386/pc/multiboot_normal.c: Likewise.
14242 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14243 attribute `unused'.
14245 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
14246 `fdiro' to read the mode information from instead of `diro'.
14248 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14249 looking up a symlink.
14251 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14253 * normal/command.c (grub_command_execute): Don't parse the
14254 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14255 flags of the command.
14257 * normal/menu.c (grub_menu_run): Fix typo.
14259 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
14261 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14263 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14264 `y + 1' instead of `y - 1'.
14266 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
14268 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
14270 From Hollis Blanchard <hollis@penguinppc.org>:
14271 * kern/misc.c (memmove): New alias for grub_memmove.
14272 (memcmp): New alias for grub_memcmp.
14273 (memset): New alias for grub_memset.
14274 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14275 Change "int handle" to "grub_ieee1275_phandle_t handle".
14276 * include/grub/powerpc/ieee1275/ieee1275.h
14277 (grub_ieee1275_get_property): Likewise.
14279 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
14281 Added normal mode command `chainloader' as module chain.mod, which
14282 depends on normal.mod and _chain.mod.
14284 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
14285 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
14286 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
14288 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
14289 but arguments parsing moved to ...
14290 (grub_chainloader_cmd): ... here. New function.
14291 * include/grub/i386/pc/chainloader.h: New file.
14292 * loader/i386/pc/chainloader_normal.c: Likewise.
14294 2004-09-11 Marco Gerards <metgerards@student.han.nl>
14296 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
14297 (grub_mkimage_LDFLAGS): Likewise.
14298 (grub_emu_SOURCES): Likewise.
14299 (kernel_img_HEADERS): Added fshelp.h.
14300 * fs/ext2.c: Include <grub/fshelp.h>.
14301 (FILETYPE_REG): New macro.
14302 (FILETYPE_INO_REG): Likewise.
14303 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
14305 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
14307 (grub_fshelp_node): New struct.
14308 (grub_ext2_data): Added member `diropen'. Changed member `inode'
14310 (grub_ext2_get_file_block): Removed function.
14311 (grub_ext2_read_block): New function.
14312 (grub_ext2_read_file): Replaced parameter `data' by `node'.
14313 This function was written.
14314 (grub_ext2_mount): Read the root inode. Create a diropen struct.
14315 (grub_ext2_find_file): Removed function.
14316 (grub_ext2_read_symlink): New function.
14317 (grub_ext2_iterate_dir): Likewise.
14318 (grub_ext2_open): Rewritten.
14319 (grub_ext2_dir): Rewritten.
14320 * include/grub/fshelp.h: New file.
14321 * fs/fshelp.c: Likewise.
14323 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
14325 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
14326 (print_message): Add a missing newline.
14327 (run_menu): Added timeout support.
14328 (run_menu_entry): New local function.
14329 (grub_menu_run): Added support for booting.
14331 * kern/loader.c (grub_loader_is_loaded): New function.
14333 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14334 (grub_get_rtc): Exported.
14336 * include/grub/i386/pc/time.h: Include grub/symbol.h.
14337 (grub_get_rtc): Exported.
14339 * include/grub/normal.h (struct grub_command_list): Remove
14340 constant from the member `command'.
14342 * include/grub/loader.h (grub_loader_is_loaded): Declared.
14344 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14346 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14348 2004-08-28 Marco Gerards <metgerards@student.han.nl>
14350 Add support for the JFS filesystem.
14352 * fs/jfs.c: New file.
14353 * include/grub/fs.h (grub_jfs_init): New prototype.
14354 (grub_jfs_fini): New prototype.
14355 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14356 (grub_emu_SOURCES): Likewise.
14357 (pkgdata_MODULES): Add jfs.mod.
14358 (jfs_mod_SOURCES): New variable.
14359 (jfs_mod_CFLAGS): Likewise.
14360 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14361 (grubof_SOURCES): Likewise.
14362 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14364 * fs/fat.c (grub_fat_find_dir): Convert the filename little
14365 endian to the host endian.
14366 (grub_fat_utf16_to_utf8): Move function from there...
14367 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
14368 the endianness of the source string anymore.
14369 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14371 2004-08-24 Marco Gerards <metgerards@student.han.nl>
14373 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14374 (grub_boot_fini) [GRUB_UTIL]: Likewise.
14375 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14376 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14378 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14379 (grub_hfs_iterate_dir): Make the function static. Add prototypes
14380 for `node_found' and `it_dir'.
14381 (grub_hfs_dir): Add prototype for `dir_hook'.
14383 * fs/minix.c (grub_minix_get_file_block): Add prototype for
14384 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
14385 and `indir32' to silence a gcc warning.
14387 * include/grub/fs.h (grub_hfs_init): New prototype.
14388 (grub_hfs_fini): Likewise.
14391 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
14393 Each disk device has its own id now. This is useful to make use
14394 of multiple disk devices.
14396 * include/grub/disk.h (grub_disk_dev_id): New enum.
14397 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14398 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14400 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14401 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14403 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14404 GRUB_DISK_DEVICE_OFDISK_ID as an id.
14406 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14407 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14409 * include/grub/disk.h (struct grub_disk_dev): Added a new member
14410 "id" which is used by the cache manager.
14412 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14415 2004-08-18 Marco Gerards <metgerards@student.han.nl>
14417 * fs/hfs.c: New file.
14418 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14419 (grub_emu_SOURCES): Likewise.
14420 (pkgdata_MODULES): Add hfs.mod.
14421 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14422 (grubof_SOURCES): Likewise.
14423 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14425 * include/grub/misc.h (grub_strncasecmp): Add prototype.
14426 * kern/misc.c (grub_strncasecmp): Add function.
14428 2004-08-14 Marco Gerards <metgerards@student.han.nl>
14430 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14433 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14434 (grub_ext2_dir): In case the directory entry type is unknown, read
14437 2004-08-02 Peter Bruin <pjbruin@dds.nl>
14439 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14440 grub_load_linux instead of grub_rescue_cmd_linux as second
14441 argument of grub_rescue_register_command.
14443 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14445 2004-07-27 Marco Gerards <metgerards@student.han.nl>
14447 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14449 * commands/boot.c: Remove the check for `GRUB_UTIL'.
14450 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14451 `loader/powerpc/ieee1275/linux.c',
14452 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14453 * include/grub/powerpc/ieee1275/ieee1275.h
14454 (grub_ieee1275_release): New prototype.
14455 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14456 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14457 normal, boot, linux and linux_normal.
14458 * loader/powerpc/ieee1275/linux.c: New file.
14459 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14461 2004-07-12 Marco Gerards <metgerards@student.han.nl>
14463 * normal/arg.c (grub_arg_parse): Correct error handling after
14464 reallocating the argumentlist (check if `argl' is not null instead
14465 of checking if `args' is not null).
14466 * kern/mm.c (grub_realloc): Return the same pointer when using the
14467 same region, instead of returning the header address.
14469 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14471 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14472 one block instead of two when looking for the initial partition.
14473 (grub_partition_probe): Initialize the local variable `p' with 0.
14474 Use base 10 for the grub_strtoul call.
14475 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
14476 need for one local variable.
14477 (grub_strtoul): Don't add the new value to `num', instead of that
14480 2004-07-11 Marco Gerards <metgerards@student.han.nl>
14482 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14483 (pxeboot_img_SOURCES): New variable.
14484 (pxeboot_img_ASFLAGS): Likewise.
14485 (pxeboot_img_LDFLAGS): Likewise.
14486 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
14487 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
14488 <lode_leroy@hotmail.com>.
14490 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14492 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14493 there was no input.
14495 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14497 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
14498 the history buffer logic.
14500 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
14502 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14503 (FILETYPE_INO_SYMLINK): New macros.
14504 (grub_ext2_find_file): Check if the node is a directory using the
14505 inode stat information instead of using the filetype in the
14506 dirent. Exclude the first character of an absolute symlink.
14507 (grub_ext2_dir): Mask out the filetype part of the mode member of
14510 2004-05-24 Marco Gerards <metgerards@student.han.nl>
14512 Add support for UFS version 1 and 2. Add support for the minix
14513 filesystem version 1 and 2, both the variants with 14 and 30 long
14516 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14518 (grub_emu_SOURCES): Likewise.
14519 (pkgdata_MODULES): Add ufs.mod and minix.mod.
14520 (ufs_mod_SOURCES): New variable.
14521 (ufs_mod_CFLAGS): Likewise.
14522 (minix_mod_SOURCES): Likewise.
14523 (minix_mod_CFLAGS): Likewise.
14524 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14526 (grubof_SOURCES): Likewise.
14527 * fs/ufs.c: New file.
14528 * fs/minix.c: New file.
14529 * include/grub/fs.h (grub_ufs_init): New prototype.
14530 (grub_ufs_fini): Likewise.
14531 (grub_minix_init): Likewise.
14532 (grub_minix_fini): Likewise.
14533 * util/grub-emu.c (main): Initialize and deinitialize UFS and
14536 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
14538 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14539 commands/ls.c, commands/terminal.c, commands/boot.c,
14540 commands/cmp.c and commands/cat.c.
14541 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14543 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14546 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14548 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14549 and grub_, respectively. Because the conversion is trivial and
14550 mechanical, I omit the details here. Please refer to the CVS
14551 if you need more information.
14553 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
14555 * include/pupa: Renamed to ...
14556 * include/grub: ... this.
14557 * util/i386/pc/pupa-mkimage.c: Renamed to ...
14558 * util/i386/pc/grub-mkimage.c: ... this.
14559 * util/i386/pc/pupa-setup.c: Renamed to ...
14560 * util/i386/pc/grub-setup.c: ... this.
14561 * util/pupa-emu.c: Renamed to ...
14562 * util/grub-emu.c: ... this.
14564 2004-03-29 Marco Gerards <metgerards@student.han.nl>
14566 Add support for the newworld apple macintosh (PPC). This has been
14567 tested on the powerbook 2000 only. It only adds support for
14568 generic ieee1275 functions, console and disk support. This should
14569 be easy to port to other architectures with support for Open
14572 * configure.ac: Accept the powerpc as host_cpu. In the case of
14573 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
14574 specific tests are only executed while building for the i386.
14575 Inverse test for crosscompile.
14576 * genmk.rb (Utility): Allow assembler files.
14577 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14578 * conf/powerpc-ieee1275.rmk: New file.
14579 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14580 * disk/powerpc/ieee1275/partition.c: Likewise.
14581 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14582 * include/pupa/powerpc/ieee1275/console.h: Likewise.
14583 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14584 * include/pupa/powerpc/ieee1275/time.h: Likewise.
14585 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14586 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14587 * include/pupa/powerpc/ieee1275/loader.h
14588 * include/pupa/powerpc/setjmp.h: Likewise.
14589 * include/pupa/powerpc/types.h: Likewise.
14590 * kern/powerpc/ieee1275/init.c: Likewise.
14591 * kern/powerpc/ieee1275/openfw.c: Likewise.
14592 * term/powerpc/ieee1275/ofconsole.c: Likewise.
14594 These files were written by Johan Rydberg
14595 (jrydberg@night.trouble.net) and I only modified them slightly.
14597 * boot/powerpc/ieee1275/cmain.c: New file.
14598 * boot/powerpc/ieee1275/crt0.S: Likewise.
14599 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14600 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14602 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
14604 * Makefile.in: Update copyright.
14605 * genmodsrc.sh: Likewise.
14606 * gensymlist.sh: Likewise.
14607 * term/i386/pc/vga.c: Indent correctly.
14609 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14610 bugreporting address.
14611 * util/i386/pc/pupa-setup.c (usage): Likewise,
14612 (main): Call pupa_ext2_init and pupa_ext2_fini.
14614 * fs/fat.c (log2): Renamed to ...
14615 (fat_log2): ... this.
14616 All callers changed.
14617 * kern/misc.c (memcpy): Alias to pupa_memmove.
14618 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14620 * util/console.c (pupa_ncurses_fini): Return 0.
14622 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14623 Move fail label here.
14624 [__GNU__]: Don't warn when using stat.
14625 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14626 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14627 long int. Use strtol instead of strtoul.
14629 2004-03-14 Marco Gerards <metgerards@student.han.nl>
14631 * commands/boot.c: New file.
14632 * commands/cat.c: Likewise.
14633 * commands/cmp.c: Likewise.
14634 * commands/ls.c: Likewise.
14635 * commands/terminal.c: Likewise.
14636 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
14637 (pupa_register_command): Changed interface to match the new
14639 (pupa_command_execute): Changed (almost rewritten) so it uses
14640 pupa_split_command. Added support for setting variables using the
14642 (rescue_command): Changed to work with the new argument parser.
14643 (terminal_command): Moved from here to commands/terminal.c.
14644 (set_command): New function.
14645 (unset_command): New function.
14646 (insmod_command): New function.
14647 (rmmod_command): New function.
14648 (lsmod_command): New function.
14649 (pupa_command_init): Don't initialize the command terminal
14650 anymore. Initialize the commands set, unset, insmod, rmmod and
14652 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
14653 (kernel_img_HEADERS): Add arg.h and env.h.
14654 (pupa_mkimage_LDFLAGS): Add kern/env.c.
14655 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
14656 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
14658 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
14660 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
14661 (boot_mod_SOURCES): New variable.
14662 (terminal_mod_SOURCES): Likewise.
14663 (ls_mod_SOURCES): Likewise.
14664 (cmp_mod_SOURCES): Likewise.
14665 (cat_mod_SOURCES): Likewise.
14667 * normal/arg.c: New file.
14668 * kern/env.c: Likewise.
14669 * include/pupa/arg.h: Likewise.
14670 * include/pupa/env.h: Likewise.
14671 * font/manager.c (font_command): Changed to match argument parsing
14673 (PUPA_MOD_INIT): Likewise.
14674 * hello/hello.c (pupa_cmd_hello): Likewise.
14675 (PUPA_MOD_INIT): Likewise.
14676 * include/pupa/disk.h: Include <pupa/device.h>.
14677 (pupa_print_partinfo): New prototype.
14678 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
14679 (pupa_dl_get_prefix): Likewise.
14680 * include/pupa/misc.h: Include <pupa/err.h>.
14681 (pupa_isgraph): New prototype.
14682 (pupa_isdigit): Likewise.
14683 (pupa_split_cmdline): Likewise.
14684 * include/pupa/normal.h: Include <pupa/arg.h>.
14685 (pupa_command): Changed the prototype of the member `func' to
14686 match the argument parsing interface. Added member `options'.
14687 (pupa_register_command): Updated to match function.
14688 (pupa_arg_parse): New prototype.
14689 (pupa_hello_init) [PUPA_UTIL]: New prototype.
14690 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
14691 (pupa_ls_init) [PUPA_UTIL]: Likewise.
14692 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
14693 (pupa_cat_init) [PUPA_UTIL]: Likewise.
14694 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
14695 (pupa_boot_init) [PUPA_UTIL]: Likewise.
14696 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
14697 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
14698 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
14699 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
14700 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
14701 * kern/disk.c: Include <pupa/file.h>.
14702 (pupa_print_partinfo): New function.
14703 * kern/dl.c: Include <pupa/env.h>.
14704 (pupa_dl_dir): Variable removed.
14705 (pupa_dl_load): Use the environment variable `prefix' instead of
14706 the variable pupa_dl_dir.
14707 (pupa_dl_set_prefix): Function removed.
14708 (pupa_dl_get_prefix): Likewise.
14709 * kern/i386/pc/init.c: Include <pupa/env.h>.
14710 (pupa_machine_init): Use the environment variable `prefix' instead of
14711 using pupa_dl_set_prefix to set the prefix.
14712 * kern/main.c: Include <pupa/env.h>.
14713 (pupa_set_root_dev): Use the environment variable `prefix' instead of
14714 using pupa_dl_get_prefix to get the prefix.
14715 * kern/misc.c: Include <pupa/env.h>.
14716 (pupa_isdigit): New function.
14717 (pupa_isgraph): Likewise.
14718 (pupa_ftoa): Likewise.
14719 (pupa_vsprintf): Added support for printing values of the type
14720 `double'. Make it possible to format variable output when using
14721 formatting like `%1.2%f'.
14722 (pupa_split_cmdline): New function.
14723 * kern/rescue.c: Include <pupa/env.h>.
14724 (next_word): Removed function.
14725 (pupa_rescue_cmd_prefix): Likewise.
14726 (pupa_rescue_cmd_set): New function.
14727 (pupa_rescue_cmd_unset): New function.
14728 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
14729 split the command line instead of splitting it here. Added
14730 support for setting variables using the syntax `foo=bar'. Don't
14731 initialize the prefix command anymore. Initialized the set and
14733 * normal/cmdline.c: Include <pupa/env.h>.
14734 (pupa_tab_complete): Added prototypes for print_simple_completion,
14735 print_partition_completion, add_completion, iterate_commands,
14736 iterate_dev, iterate_part and iterate_dir. Moved code to print
14737 partition information from here to kern/disk.c.
14738 (pupa_cmdline_run): Don't check if the function exists anymore.
14739 * normal/main.c: Include <pupa/env.h>.
14740 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
14741 instead of using pupa_dl_get_prefix to get the prefix.
14742 * term/i386/pc/vga.c: Include <pupa/arg.h>.
14743 (check_vga_mem): Cast pointers to `void *' to silence a gcc
14745 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
14746 (pupa_vga_setcolor): Declare unused variables with `__attribute__
14747 ((unused))' to silence a gcc warning.
14748 (pupa_vga_setcolor): Likewise.
14749 (debug_command): Changed to match argument parsing
14751 * util/pupa-emu.c: Include <pupa/env.h>.
14752 (options): Added 0's for unused fields to silence a gcc warning.
14754 (main): Use the environment variable `prefix' instead of using
14755 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
14756 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
14759 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
14760 * util/misc.c: Include <malloc.h>.
14761 (pupa_malloc): Rewritten so errors are correctly reported.
14762 (pupa_realloc): Likewise.
14763 (pupa_memalign): Likewise.
14764 (pupa_mm_init_region): Declare unused variables with
14765 `__attribute__ ((unused))' to silence a gcc warning.
14766 * normal/i386/setjmp.S: Remove tab at the end of the file to
14767 silence a gcc warning.
14768 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
14769 variables with `__attribute__ ((unused))' to silence a gcc
14771 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
14772 local variable i unsigned to silence a gcc warning.
14774 * kern/term.c: Include <pupa/misc.h>.
14775 (pupa_more_lines): New variable.
14776 (pupa_more): Likewise.
14777 (pupa_putcode): When the pager is active pause at the end of every
14779 (pupa_set_more): New function.
14780 * include/pupa/term.h (pupa_set_more): New prototype.
14783 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14785 Now this project is GRUB 2 rather than PUPA. The location of
14786 the CVS repository was moved to GRUB's.
14788 * configure.ac: Use bug-grub as the reporting address.
14789 Use GRUB instead of PUPA.
14790 Change the version number to 1.90.
14792 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14794 * genkernsyms.sh: Updated copyright information.
14795 * genmk.rb: Likewise.
14796 * genmodsrc.sh: Likewise.
14797 * gensymlist.sh: Likewise.
14798 * boot/i386/pc/boot.S: Likewise.
14799 * boot/i386/pc/diskboot.S: Likewise.
14800 * disk/i386/pc/biosdisk.c: Likewise.
14801 * disk/i386/pc/partition.c: Likewise.
14802 * font/manager.c: Likewise.
14803 * fs/ext2.c: Likewise.
14804 * fs/fat.c: Likewise.
14805 * include/pupa/boot.h: Likewise.
14806 * include/pupa/device.h: Likewise.
14807 * include/pupa/disk.h: Likewise.
14808 * include/pupa/dl.h: Likewise.
14809 * include/pupa/elf.h: Likewise.
14810 * include/pupa/err.h: Likewise.
14811 * include/pupa/file.h: Likewise.
14812 * include/pupa/font.h: Likewise.
14813 * include/pupa/fs.h: Likewise.
14814 * include/pupa/kernel.h: Likewise.
14815 * include/pupa/loader.h: Likewise.
14816 * include/pupa/misc.h: Likewise.
14817 * include/pupa/mm.h: Likewise.
14818 * include/pupa/net.h: Likewise.
14819 * include/pupa/normal.h: Likewise.
14820 * include/pupa/rescue.h: Likewise.
14821 * include/pupa/setjmp.h: Likewise.
14822 * include/pupa/symbol.h: Likewise.
14823 * include/pupa/term.h: Likewise.
14824 * include/pupa/types.h: Likewise.
14825 * include/pupa/i386/setjmp.h: Likewise.
14826 * include/pupa/i386/types.h: Likewise.
14827 * include/pupa/i386/pc/biosdisk.h: Likewise.
14828 * include/pupa/i386/pc/boot.h: Likewise.
14829 * include/pupa/i386/pc/console.h: Likewise.
14830 * include/pupa/i386/pc/init.h: Likewise.
14831 * include/pupa/i386/pc/kernel.h: Likewise.
14832 * include/pupa/i386/pc/linux.h: Likewise.
14833 * include/pupa/i386/pc/loader.h: Likewise.
14834 * include/pupa/i386/pc/memory.h: Likewise.
14835 * include/pupa/i386/pc/multiboot.h: Likewise.
14836 * include/pupa/i386/pc/partition.h: Likewise.
14837 * include/pupa/i386/pc/time.h: Likewise.
14838 * include/pupa/i386/pc/vga.h: Likewise.
14839 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14840 * include/pupa/util/getroot.h: Likewise.
14841 * include/pupa/util/misc.h: Likewise.
14842 * include/pupa/util/resolve.h: Likewise.
14843 * kern/device.c: Likewise.
14844 * kern/disk.c: Likewise.
14845 * kern/dl.c: Likewise.
14846 * kern/err.c: Likewise.
14847 * kern/file.c: Likewise.
14848 * kern/fs.c: Likewise.
14849 * kern/loader.c: Likewise.
14850 * kern/main.c: Likewise.
14851 * kern/misc.c: Likewise.
14852 * kern/mm.c: Likewise.
14853 * kern/rescue.c: Likewise.
14854 * kern/term.c: Likewise.
14855 * kern/i386/dl.c: Likewise.
14856 * kern/i386/pc/init.c: Likewise.
14857 * kern/i386/pc/lzo1x.S: Likewise.
14858 * kern/i386/pc/startup.S: Likewise.
14859 * loader/i386/pc/chainloader.c: Likewise.
14860 * loader/i386/pc/linux.c: Likewise.
14861 * loader/i386/pc/multiboot.c: Likewise.
14862 * normal/cmdline.c: Likewise.
14863 * normal/command.c: Likewise.
14864 * normal/main.c: Likewise.
14865 * normal/menu.c: Likewise.
14866 * normal/i386/setjmp.S: Likewise.
14867 * term/i386/pc/console.c: Likewise.
14868 * term/i386/pc/vga.c: Likewise.
14869 * util/console.c: Likewise.
14870 * util/genmoddep.c: Likewise.
14871 * util/misc.c: Likewise.
14872 * util/pupa-emu.c: Likewise.
14873 * util/resolve.c: Likewise.
14874 * util/unifont2pff.rb: Likewise.
14875 * util/i386/pc/biosdisk.c: Likewise.
14876 * util/i386/pc/getroot.c: Likewise.
14877 * util/i386/pc/pupa-mkimage.c: Likewise.
14878 * util/i386/pc/pupa-setup.c: Likewise.
14880 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14882 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14883 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14884 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14885 reading and reset it after reading.
14886 (pupa_ext2_close): Return PUPA_ERR_NONE.
14888 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14890 (struct linux_kernel_header): Add kernel_version and
14892 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14893 pupa_file_read succeeds.
14894 (pupa_rescue_cmd_initrd): Implement.
14896 2003-12-03 Marco Gerards <metgerards@student.han.nl>
14898 * fs/ext2.c (pupa_ext2_label): New function.
14899 (pupa_ext2_fs): Added label.
14900 * fs/fat.c (pupa_fat_label): New function.
14901 (pupa_fat_fs): Added label.
14902 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14904 * kern/misc.c (pupa_strndup): New function.
14905 * include/pupa/misc.h (pupa_strndup): New prototype.
14907 * include/pupa/normal.h: Include <pupa/err.h>.
14908 (pupa_set_history): New prototype.
14909 (pupa_iterate_commands): New prototype.
14910 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14911 <pupa/disk.h>, <pupa/file.h>.
14912 (hist_size): New variable.
14913 (hist_lines): Likewise.
14914 (hist_end): Likewise.
14915 (hist_used): Likewise.
14916 (pupa_set_history): New function.
14917 (pupa_history_get): Likewise.
14918 (pupa_history_add): Likewise.
14919 (pupa_history_replace): Likewise.
14920 (pupa_tab_complete): Likewise.
14921 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14922 completion shows partitionnames while completing partitions, this
14923 feature was suggested by Jeff Bailey.
14924 * normal/command.c (pupa_iterate_commands): New function.
14925 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14926 (pupa_normal_init): Initialize history buffer.
14927 (PUPA_MOD_INIT): Likewise.
14928 (pupa_normal_fini): Free the history buffer.
14929 (PUPA_MOD_FINI): Likewise.
14931 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14934 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14935 * configure.ac [i386]: Check for regparam bug.
14936 (NESTED_FUNC_ATTR) [! i386]: Defined.
14938 2003-11-17 Marco Gerards <metgerards@student.han.nl>
14940 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14941 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14942 (pupa_emu_SOURCES): New variable.
14943 (pupa_emu_LDFLAGS): Likewise.
14944 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14945 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14946 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14947 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14948 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14949 (pupa_jmp_buf): New typedef.
14950 (pupa_setjmp) [PUPA_UTIL]: New macro.
14951 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14952 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14953 (pupa_refresh): New prototype.
14954 * include/pupa/util/getroot.h: New file.
14955 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14957 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14958 (pupa_rescue_cmd_cat): Likewise.
14959 (pupa_rescue_cmd_ls): Likewise.
14960 (pupa_rescue_cmd_testload): Likewise.
14961 (pupa_rescue_cmd_lsmod): Likewise.
14962 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14963 * normal/menu.c (run_menu): Likewise.
14964 * kern/term.c (pupa_cls): Likewise.
14965 (pupa_refresh): New function.
14966 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14967 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14968 * util/console.c: New file.
14970 * util/i386/pc/getroot.c: New file.
14971 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14972 (pupa_putchar): New function.
14973 (pupa_refresh): Likewise.
14974 (xgetcwd): Function moved to ...
14975 (strip_extra_slashes): Likewise.
14976 (get_prefix): Likewise.
14977 * util/i386/pc/getroot.c: ... here.
14978 (find_root_device): Function moved and renamed to...
14979 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14980 Changed all callers.
14981 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14983 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14984 Changed all callers.
14985 * util/misc.c (pupa_memalign): New function.
14986 (pupa_mm_init_region): Likewise.
14987 (pupa_register_exported_symbols): Likewise.
14988 (pupa_putchar): Function removed.
14989 * util/pupa-emu.c: New file.
14991 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14993 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14994 (_multiboot_mod_SOURCES): New variable.
14995 (_multiboot_mod_CFLAGS): Likewise.
14996 * loader/i386/pc/multiboot.c: New file.
14997 * include/pupa/i386/pc/multiboot.h: Likewise.
14998 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14999 (pupa_multiboot_real_boot): New function.
15000 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15001 (pupa_multiboot_real_boot): New prototype.
15002 (pupa_rescue_cmd_multiboot): Likewise
15003 (pupa_rescue_cmd_module): Likewise.
15005 * kern/loader.c (pupa_loader_set): Continue when
15006 pupa_loader_unload_func() fails.
15007 (pupa_loader_unset): New function.
15008 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15010 * kern/misc.c (pupa_stpcpy): New function.
15011 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15013 2003-11-12 Marco Gerards <metgerards@student.han.nl>
15015 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15016 for available extensions.
15018 * include/pupa/i386/pc/time.h: New file.
15019 * kern/disk.c: Include <pupa/machine/time.h>.
15020 (PUPA_CACHE_TIMEOUT): New macro.
15021 (pupa_last_time): New variable.
15022 (pupa_disk_open): Flush the cache when there was a timeout.
15023 (pupa_disk_close): Reset the timer.
15024 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15026 * util/misc.c: Include <sys/times.h>
15027 (pupa_get_rtc): New function.
15029 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15031 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15033 (pupa_ext2_get_file_block): Use blocks member.
15035 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15036 first block. Return -1 instead of pupa_errno on error.
15038 2003-10-27 Marco Gerards <metgerards@student.han.nl>
15040 * README: In the pupa-mkimage example use _chain instead of chain
15041 and ext2 instead of fat.
15042 * TODO: Replace ext2fs with jfs as an example. Add an item for
15043 adding journal playback for ext2fs.
15044 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15045 (pkgdata_MODULES): Added ext2.mod.
15046 (ext2_mod_SOURCES): New variable.
15047 (ext2_mod_CFLAGS): Likewise.
15048 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15049 * include/pupa/misc.h (pupa_strncpy): New prototype.
15050 (pupa_strcat): Likewise.
15051 (pupa_strncmp): Likewise.
15052 * kern/misc.c (pupa_strcat): Enable function.
15053 (pupa_strncpy): New function.
15054 (pupa_strncmp): Likewise.
15055 * fs/ext2.c: New file.
15057 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15058 when the read failed before retrying.
15059 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15060 (_FILE_OFFSET_BITS): Likewise.
15061 * configure.ac: Added AC_SYS_LARGEFILE.
15063 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15065 * genmk.rb (PModule#rule): Make sure to get only symbol names
15066 from the output of nm.
15067 Reported by Robert Millan <zeratul2@wanadoo.es>.
15069 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15071 I forgot to check in these changes for a long time. This adds
15072 incomplete support for VGA console, and this is still very
15073 buggy. Also, a lot of consideration is required for I18N,
15074 UNICODE, and VGA font issues. Therefore, assume that this is
15075 such that "better than nothing".
15077 * font/manager.c: New file.
15078 * include/pupa/font.h: Likewise.
15079 * include/pupa/i386/pc/vga.h: Likewise.
15080 * term/i386/pc/vga.c: Likewise.
15081 * util/unifont2pff.rb: Likewise.
15083 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15084 (pkgdata_MODULES): Added vga.mod and font.mod.
15085 (vga_mod_SOURCES): New variables.
15086 (vga_mod_CFLAGS): Likewise.
15087 (font_mod_SOURCES): Likewise.
15088 (font_mod_CFLAGS): Likewise.
15090 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15092 * include/pupa/term.h: Include pupa/err.h.
15093 (struct pupa_term): Added init and fini.
15094 Changed the argument of putchar to pupa_uint32_t.
15096 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15097 (pupa_console_real_putchar): New prototype.
15098 (pupa_console_putchar): Removed.
15099 (pupa_console_checkkey): Exported.
15100 (pupa_console_getkey): Likewise.
15102 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15105 * kern/term.c (pupa_term_set_current): Rewritten.
15106 (pupa_putchar): Likewise.
15107 (pupa_putcode): New function.
15109 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15110 (pupa_console_real_putchar): ... this.
15111 (pupa_vga_set_mode): New function.
15112 (pupa_vga_get_font): Likewise.
15114 * normal/command.c: Include pupa/term.h.
15115 (terminal_command): New function.
15116 (pupa_command_init): Register the command "terminal".
15118 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15119 (DISP_UP): Likewise.
15120 (DISP_RIGHT): Likewise.
15121 (DISP_DOWN): Likewise.
15122 (DISP_HLINE): Likewise.
15123 (DISP_VLINE): Likewise.
15124 (DISP_UL): Likewise.
15125 (DISP_UR): Likewise.
15126 (DISP_LL): Likewise.
15127 (DISP_LR): Likewise.
15129 * term/i386/pc/console.c (pupa_console_putchar): New function.
15131 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15133 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15134 FIX. Reverse the path_list.
15136 * include/pupa/normal.h: Export pupa_register_command and
15137 pupa_unregister_command.
15139 * hello/hello.c (pupa_cmd_hello): New module.
15140 * conf/i386-pc.rmk: Added hello.mod.
15142 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15144 * kern/i386/pc/lzo1x.S: New file.
15146 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15147 (compress_kernel): New variable.
15148 (generate_image): Heavily modified to support compressing a
15149 large part of the core image.
15151 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15153 (pupa_util_load_image): New function.
15155 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15156 (pupa_compressed_size): New variable.
15157 (codestart): Enable Gate A20 here.
15158 Decompress the compressed part of the core image.
15159 Rearrange the code to put functions and variables which are
15160 required for initialization in the non-compressed part.
15163 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15166 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15168 * include/pupa/i386/pc/kernel.h
15169 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15170 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15171 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15172 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15173 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15175 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15177 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15178 (Utility#rule): Likewise.
15180 * configure.ac: Check if LZO is available.
15182 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15184 * include/pupa/normal.h: New file.
15185 * include/pupa/setjmp.h: Likewise.
15186 * include/pupa/i386/setjmp.h: Likewise.
15187 * normal/cmdline.c: Likewise.
15188 * normal/command.c: Likewise.
15189 * normal/main.c: Likewise.
15190 * normal/menu.c: Likewise.
15191 * normal/i386/setjmp.S: Likewise.
15193 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15194 (pupa_rescue_cmd_initrd): Likewise.
15196 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15199 * kern/i386/pc/startup.S (translation_table): New variable.
15200 (translate_keycode): New function.
15201 (pupa_console_getkey): Call translate_keycode.
15203 * kern/rescue.c (attempt_normal_mode): New function.
15204 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15205 it failed, print a message.
15207 * kern/mm.c (pupa_real_malloc): Print more information when a
15208 free magic is broken.
15209 (pupa_free): If the first free header is not free actually, set
15212 * kern/main.c (pupa_load_normal_mode): Just load the module
15214 (pupa_main): Don't print the message
15215 "Entering into rescue mode..." here.
15217 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15219 (pupa_rescue_cmd_initrd): Likewise.
15220 (pupa_rescue_cmd_initrd): Likewise.
15222 * include/pupa/symbol.h (FUNCTION): Specify the type.
15223 (VARIABLE): Likewise.
15225 * include/pupa/err.h (pupa_err_t): Added
15226 PUPA_ERR_UNKNOWN_COMMAND.
15228 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15229 (pupa_dl_get_prefix): Likewise.
15231 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15232 Added _chain.mod and _linux.mod instead of chain.mod and
15234 (chain_mod_SOURCES): Renamed to ...
15235 (_chain_mod_SOURCES): ... this.
15236 (chain_mod_CFLAGS): Renamed to ...
15237 (_chain_mod_CFLAGS): ... this.
15238 (linux_mod_SOURCES): Renamed to ...
15239 (_linux_mod_SOURCES): ... this.
15240 (linux_mod_CFLAGS): Renamed to ...
15241 (_linux_mod_CFLAGS): ... this.
15242 (normal_mod_SOURCES): New variable.
15243 (normal_mod_CFLAGS): Likewise.
15244 (normal_mod_ASFLAGS): Likewise.
15246 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
15248 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15251 * kern/dl.c (pupa_dl_ref): Refer depending modules
15253 (pupa_dl_unref): Unrefer depending modules recursively.
15254 Don't call pupa_dl_unload implicitly, because PUPA can crash if
15255 a module is unloaded before one depending on that module is
15257 (pupa_dl_unload): Unload depending modules explicitly,
15260 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
15262 * include/pupa/i386/pc/linux.h: New file.
15263 * loader/i386/pc/linux.c: Likewise.
15265 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15267 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15268 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
15269 of PUPA_CHAINLOADER_BOOT_SECTOR.
15271 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
15272 (pupa_linux_prot_size): New variable.
15273 (pupa_linux_tmp_addr): Likewise.
15274 (pupa_linux_real_addr): Likewise.
15275 (pupa_linux_boot_zimage): New function.
15276 (pupa_linux_boot_bzimage): Likewise.
15278 * kern/i386/pc/init.c (struct mem_region): New structure.
15279 (MAX_REGIONS): New macro.
15280 (mem_regions): New variable.
15281 (num_regions): Likewise.
15282 (pupa_os_area_addr): Likewise.
15283 (pupa_os_area_size): Likewise.
15284 (pupa_lower_mem): Likewise.
15285 (pupa_upper_mem): Likewise.
15286 (add_mem_region): New function.
15287 (compact_mem_regions): Likewise.
15288 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
15289 the size of the conventional memory and that of so-called upper
15290 memory (before the first memory hole).
15291 Instead of adding each found region to free memory, use
15292 add_mem_region and add them after removing overlaps.
15293 Also, add only 1/4 of the upper memory to free memory. The rest
15294 is used for loading OS images. Maybe this is ad hoc, but this
15295 makes it much easier to relocate OS images when booting.
15297 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
15298 (pupa_enter_rescue_mode): Don't register initrd and module.
15300 * kern/mm.c: Include pupa/dl.h.
15302 * kern/main.c: Include pupa/file.h and pupa/device.h.
15304 * kern/loader.c (pupa_loader_load_module_func): Removed.
15305 (pupa_loader_load_module): Likewise.
15307 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
15310 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
15311 (pupa_linux_tmp_addr): Likewise.
15312 (pupa_linux_real_addr): Likewise.
15313 (pupa_linux_boot_zimage): Likewise.
15314 (pupa_linux_boot_bzimage): Likewise.
15316 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
15317 (pupa_upper_mem): Likewise.
15318 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
15319 module is too dangerous.
15321 * include/pupa/loader.h (pupa_os_area_addr): Declared.
15322 (pupa_os_area_size): Likewise.
15323 (pupa_loader_set): Remove the first argument. Loader doesn't
15324 manage modules or initrd any longer.
15325 (pupa_loader_load_module): Removed.
15327 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15328 (linux_mod_SOURCES): New variable.
15329 (linux_mod_CFLAGS): Likewise.
15331 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
15333 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15334 the length of a blocklist correctly.
15336 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15337 Use ioctl only if the OS file is a block device.
15338 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15339 not very useful for normal files.
15341 * kern/main.c (pupa_set_root_dev): New function.
15342 (pupa_load_normal_mode): Likewise.
15343 (pupa_main): Call those above.
15345 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15348 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15350 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
15352 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15353 (setup): Configure the installed partition information and the
15356 * loader/i386/pc/chainloader.c (my_mod): New variable.
15357 (pupa_chainloader_unload): New function.
15358 (pupa_rescue_cmd_chainloader): Refer itself.
15359 (PUPA_MOD_INIT): Save its own module in MY_MOD.
15361 * kern/i386/pc/startup.S (install_partition): Removed.
15362 (version_string): Likewise.
15363 (config_file): Likewise.
15364 (pupa_install_dos_part): New variable.
15365 (pupa_install_bsd_part): Likewise.
15366 (pupa_prefix): Likewise.
15367 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15369 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15371 (make_install_device): New function.
15372 (pupa_machine_init): Set the dl prefix.
15374 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15375 (buf): Renamed to ...
15376 (linebuf): ... this.
15377 (pupa_rescue_cmd_prefix): New function.
15378 (pupa_rescue_cmd_insmod): Likewise.
15379 (pupa_rescue_cmd_rmmod): Likewise.
15380 (pupa_rescue_cmd_lsmod): Likewise.
15381 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15384 * kern/mm.c (pupa_memalign): If failed even after invalidating
15385 disk caches, unload unneeded modules and retry.
15387 * kern/misc.c (pupa_memmove): New function.
15388 (pupa_memcpy): Removed.
15389 (pupa_strcpy): New function.
15390 (pupa_itoa): Made static.
15392 * kern/dl.c (pupa_dl_iterate): New function.
15393 (pupa_dl_ref): Likewise.
15394 (pupa_dl_unref): Likewise.
15395 (pupa_dl_unload): Return if succeeded or not.
15396 (pupa_dl_unload_unneeded): New function.
15397 (pupa_dl_unload_all): Likewise.
15398 (pupa_dl_init): Renamed to ...
15399 (pupa_dl_set_prefix): ... this.
15400 (pupa_dl_get_prefix): New function.
15402 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15403 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15404 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15405 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15406 (pupa_install_dos_part): Declared.
15407 (pupa_install_bsd_part): Likewise.
15408 (pupa_prefix): Likewise.
15409 (pupa_boot_drive): Likewise.
15411 * include/pupa/types.h: Fix a typo.
15413 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15415 (pupa_memmove): Declared.
15416 (pupa_strcpy): Likewise.
15418 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15419 pupa_mod_init takes one argument, its own module.
15420 (pupa_dl_unload_unneeded): Declared.
15421 (pupa_dl_unload_all): Likewise.
15422 (pupa_dl_ref): Likewise.
15423 (pupa_dl_unref): Likewise.
15424 (pupa_dl_iterate): Likewise.
15425 (pupa_dl_init): Renamed to ...
15426 (pupa_dl_set_prefix): ... this.
15427 (pupa_dl_get_prefix): Declared.
15429 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15430 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15432 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15433 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15435 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15436 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15438 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15440 * util/i386/pc/pupa-setup.c (setup): Define the internal
15441 function find_first_partition_start at the top level, because GCC
15442 3.0.x cannot compile internal functions in deeper scopes
15444 (find_root_device): Use lstat instead of stat.
15445 Don't follow symbolic links.
15446 Fix the path-constructing code.
15448 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15449 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15450 by a BLKGETSIZE ioctl first, because block devices don't fill
15451 the member st_mode of the structure stat on Linux.
15452 [__linux__] (linux_find_partition): Use a temporary buffer
15453 REAL_DEV for the working space. Copy it to DEV before returning.
15454 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15455 buffer cache consistent.
15456 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15457 strncmp. The previous value was merely wrong.
15458 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15460 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15461 FAT size is 12. The previous value was merely wrong.
15463 * kern/main.c (pupa_main): Don't split the starting message from
15466 * kern/term.c (pupa_putchar): Put CR after LF instead of before
15467 LF, because BIOS goes crazy about character attributes in this
15470 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
15472 * include/i386/pc/util/biosdisk.h: New file.
15473 * util/i386/pc/biosdisk.c: Likewise.
15474 * util/i386/pc/pupa-setup.c: Likewise.
15476 * Makefile.in (INCLUDE_DISTFILES): Added
15477 include/pupa/i386/pc/util/biosdisk.h.
15478 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15479 directory util/i386/pc.
15480 (install-local): Added a rule for sbin_UTILITIES.
15481 (uninstall): Likewise.
15483 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15485 * util/misc.c (xrealloc): New function.
15486 (pupa_malloc): Likewise.
15487 (pupa_free): Likewise.
15488 (pupa_realloc): Likewise.
15489 (pupa_stop): Likewise.
15490 (pupa_putchar): Likewise.
15492 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15494 * include/pupa/util/misc.h (xrealloc): Declared.
15496 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15498 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15499 (PUPA_BOOT_MACHINE_BPB_END): ... this.
15501 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15502 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15504 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15505 way should be implemented.
15506 [PUPA_UTIL] (pupa_fat_fini): Likewise.
15508 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15509 the size of NAME for safety.
15510 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15513 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15514 (pupa_setup_SOURCES): Likewise.
15516 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15518 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15520 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15521 bunch of pushl's from pusha, because this destroys the return
15524 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
15526 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15527 This means that any missing prototypes could be fatal. Also, you
15528 must take care when writing assembly code. See the comments at
15529 the beginning of startup.S, for more details.
15531 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15532 compilation mechanism.
15533 (pupa_chainloader_real_boot): Likewise.
15534 (pupa_biosdisk_rw_int13_extensions): Likewise.
15535 (pupa_biosdisk_rw_standard): Likewise.
15536 (pupa_biosdisk_check_int13_extensions): Likewise.
15537 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15538 (pupa_biosdisk_get_diskinfo_standard): Likewise.
15539 (pupa_get_memsize): Likewise.
15540 (pupa_get_mmap_entry): Likewise.
15541 (pupa_console_putchar): Likewise.
15542 (pupa_console_setcursor): Likewise.
15543 (pupa_getrtsecs): Use pushl instead of push.
15545 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15546 memory instead of the stack for a mmap entry, because some
15547 BIOSes may ignore the maximum size and overflow.
15549 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15551 * genmk.rb (PModule#rule): Compile automatically generated
15552 sources with module-specific CFLAGS as well as other sources.
15554 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15556 * configure.ac: Check ld.
15557 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15558 respectively, before checking endianness and sizes.
15560 * Makefile.in (LD): New variable.
15562 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15564 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15566 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
15568 * Changelog: New file.