Fix mistake in the last description
[grub2/bean.git] / ChangeLog
blob89662be1439fc298f500c24e7ed4cf33a63c1421
1 2009-04-28  Pavel Roskin  <proski@gnu.org>
3         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
4         not disk.  Adjust all dependencies.
5         (grub_fs_uuid_close): Use grub_device_close(), not
6         grub_disk_close().
8         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
9         parent's partition, don't copy it by reference, as it gets freed
10         on close.
12 2009-04-27  Vladimir Serbinenko <phcoder@gmail.com>
14         Preboot hooks support
16         * commands/boot.c (struct grub_preboot_t): new declaration
17         (preboots_head): new variable
18         (preboots_tail): likewise
19         (grub_loader_register_preboot_hook): new function
20         (grub_loader_unregister_preboot_hook): likewise
21         (grub_loader_set): launch preboot hooks
22         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
23         (grub_loader_register_preboot_hook): new declaration
24         (grub_loader_unregister_preboot_hook): likewise
26 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
28         Warning fix
30         * disk/scsi.c (grub_scsi_open): added missing cast when 
31         calling grub_dprintf
33 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
35         Bug and warning fixes
37         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing 
38         declaration
39         * commands/test.c (test_parse): fixed bug with file tests and corrected
40         declaration of find_file
42 2009-04-26  Pavel Roskin  <proski@gnu.org>
44         * Makefile.in: Don't install empty manual pages if help2man is
45         missing.  Use help2man option for output, not shell redirection.
47 2009-04-26  David S. Miller  <davem@davemloft.net>
49         * util/grub-mkdevicemap.c (make_device_map): Add missing
50         NESTED_FUNC_ATTR to process_device().
52 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
54         Test command
56         * commands/test.c: rewritten to use bash-like test
58 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
60         Parttool autoloading and improvements
62         * Makefile.in (pkglib_DATA): add parttool.lst 
63         (parttool.lst): new target
64         * genmk.rb: generate parttool-*
65         (CLEANFILES): add #{parttool}
66         (PARTTOOLFILES): new variable
67         * genparttoollist.sh: new file
68         * parttool/pcpart.c (grub_pcpart_boot): more feedback 
69         (grub_pcpart_type): likewise
70         * commands/parttool.c (helpmsg): new variable
71         (grub_cmd_parttool): output help if not enough arguments are supplied
72         autoload modules
73         (GRUB_MOD_INIT(parttool)): use helpmsg
75 2009-04-24  David S. Miller  <davem@davemloft.net>
77         Avoiding openning same device multiple times in device iterator.
79         * kern/device.c: (grub_device_iterate): Define struct part_ent,
80         and use it to build a list of partitions in interate_disk() and
81         iterate_partition().
83         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
84         on disk->data.
86         * disk/ieee1275/nand.c (grub_nand_iterate): Return
87         grub_devalias_iterate() result instead of unconditional 0.
88         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
89         Also, capture hook return value, either directly or via
90         grub_children_iterate(), and propagate to caller.
91         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
92         grub_children_iterate): Return value is now 'int' instead of
93         'grub_err_t'.
94         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
95         like a proper iterator, stopping when hooks return non-zero.
96         (grub_devalias_iterate): Likewise.
98 2009-04-23  David S. Miller  <davem@davemloft.net>
100         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
102 2009-04-22  David S. Miller  <davem@davemloft.net>
104         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
105         is larger than address_cells, use that value for address_cells too.
107         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
108         IEEE1275_MAX_PATH_LEN): Define.
109         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
110         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
111         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
112         'devtype'.  Explicitly NULL terminate devalias expansion.
114         * util/sparc64/ieee1275/misc.c: New file.
115         * util/sparc64/ieee1275/grub-setup.c: New file.
116         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
117         * util/sparc64/ieee1275/grub-mkimage.c: New file.
118         * util/sparc64/ieee1275/grub-install.in: New file.
119         * util/ieee1275/ofpath.c: New file.
120         * util/ieee1275/devicemap.c: New file.
121         * util/devicemap.c: New file.
122         * util/deviceiter.c: New file.
123         * kern/sparc64/ieee1275/init.c: New file.
124         * include/grub/util/ofpath.h: New file.
125         * include/grub/util/deviceiter.h: New file.
126         * util/grub-mkdevicemap.c: Include deviceiter.h.
127         Implement using grub_util_emit_devicemap_entry and
128         grub_util_iterate_devices.
129         * conf/i386-corebook.rmk: Build util/deviceiter.c and
130         util/devicemap.c into grub-mkdevicemap
131         * conf/i386-efi.rmk: Likewise.
132         * conf/i386-ieee1275.rmk: Likewise.
133         * conf/i386-pc.rmk: Likewise.
134         * conf/powerpc-ieee1275.rmk: Likewise.
135         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
136         images and installation utilities.  Build kernel as image
137         instead of as elf binary.  Use common rules as much as possible.
139 2009-04-19  Vladimir Serbinenko <phcoder@gmail.com>
141         Correct GPT definition
143         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type 
144         of "attrib" member
146 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
148         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
150 2009-04-19  David S. Miller  <davem@davemloft.net>
152         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
153         (grub_rescue_cmd_linux): Rename to...
154         (grub_cmd_linux): and fix prototype.
155         (grub_rescue_cmd_initrd): Rename to...
156         (grub_cmd_initrd): and fix prototype.
157         (cmd_linux, cmd_initrd): New.
158         (GRUB_MOD_INIT(linux)): Use grub_register_command().
159         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
161 2009-04-17  Pavel Roskin  <proski@gnu.org>
163         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
164         format.
165         (grub_ohci_transfer): Likewise.
167         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
169         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
170         return without a value.  Fix inconsistent indentation.
172         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
173         match struct grub_fs.
175         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
176         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
177         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
178         * commands/lspci.c (grub_lspci_iter): Likewise.
180 2009-04-16  Bean  <bean123ch@gmail.com>
182         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
183         value.
185 2009-04-15  Pavel Roskin  <proski@gnu.org>
187         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
188         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
189         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
190         definitions.
192 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
194         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
195         that no multiple data or metadata areas are supported and `Unknown 
196         metadata header'.
198 2009-04-15  Vladimir Serbinenko <phcoder@gmail.com>
200         Move loader out of the kernel
202         * kern/loader.c: moved to ...
203         * commands/boot.c: ... moved here
204         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
205         * commands/boot.c (grub_cmd_boot): moved here. All users updated
206         * include/grub/kernel.h (grub_machine_fini): export
207         * include/grub/loader.h (grub_loader_is_loaded): update declaration
208         (grub_loader_set): likewise
209         (grub_loader_unset): likewise
210         (grub_loader_boot): likewise
211         * conf/common.rmk: new module boot.mod
212         (pkglib_MODULES): add boot.mod
213         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
214         (grub_emu_SOURCES): likewise
215         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
216         (grub_emu_SOURCES): likewise
217         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
218         (grub_emu_SOURCES): likewise
219         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
220         (grub_emu_SOURCES): likewise
221         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
222         (grub_emu_SOURCES): likewise
223         * conf/sparcs64-ieee1275.rmk (kernel_elf_SOURCES): likewise
224         (grub_emu_SOURCES): likewise   
225         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
226         (grub_emu_SOURCES): likewise 
228 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
230         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
231         
232         * kern/misc.c (grub_itoa): Removed function
233         (grub_ltoa): likewise
234         (grub_vsprintf): use grub_lltoa
236 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
238         Restore grub-emu
240         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
241         * conf/i386-coreboot.rmk: likewise
242         * conf/i386-ieee1275.rmk: likewise
243         * conf/powerpc-ieee1275.rmk: likewise
244         
245 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
247         * INSTALL: Add that `./autogen.sh' needs to be run before
248         `./configure.'.
250 2009-04-14  Bean  <bean123ch@gmail.com>
252         * Makefile.in (pkglib_DATA): Add handler.lst.
253         (handler.lst): New rule.
255         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
256         * conf/i386-coreboot.rmk: Likewise.
257         * conf/i386-ieee1275.rmk: Likewise.
258         * conf/i386-efi.rmk: Likewise.
259         * conf/x86_64-efi.rmk: Likewise.
260         * conf/powerpc-ieee1275.rmk: Likewise.
261         * conf/sparc64-ieee1275.rmk: Likewise.
263         * genhandlerlist.sh: New file.
265         * genmk.rb: Add rules to generate handler.lst.
267         * include/grub/normal.h (grub_file_getline): New function definition.
268         (read_handler_list): Likewise.
269         (free_handler_list): Likewise.
271         * include/grub/term.h (grub_term_register_input): Add name parameter
272         for auto generation of handler.lst.
273         (grub_term_register_output): Likewise.
275         * normal/handler.c: New file.
277         * normal/main.c (get_line): Renamed to grub_file_getline.
278         (read_config_file): Use the newly renamed grub_file_getline.
279         (read_command_list): Likewise.
280         (read_fs_list): Likewise.
281         (grub_normal_execute): Call read_handler_list to parse handler.lst.
282         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
284         * term/efi/console.c (grub_console_init): Add name parameter for auto
285         generation of handler.lst.
286         * term/gfxterm.c: Likewise.
287         * term/i386/pc/at_keyboard.c: Likewise.
288         * term/i386/pc/console.c: Likewise.
289         * term/i386/pc/serial.c: Likewise.
290         * term/i386/pc/vesafb.c: Likewise.
291         * term/i386/pc/vga.c: Likewise.
292         * term/i386/pc/vga_text.c: Likewise.
293         * term/ieee1275/ofconsole.c: Likewise.
294         * term/usb_keyboard.c: Likewise.
296 2009-04-14  Bean  <bean123ch@gmail.com>
298         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
299         properly with null character.
301 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
303         * configure: Remove.
304         * config.h.in: Likewise.
305         * stamp-h.in: Likewise.
306         * DISTLIST: Likewise.
307         * conf/common.mk: Likewise.
308         * conf/i386-coreboot.mk: Likewise.
309         * conf/i386-efi.mk: Likewise.
310         * conf/i386-ieee1275.mk: Likewise.
311         * conf/i386.mk: Likewise.
312         * conf/i386-pc.mk: Likewise.
313         * conf/powerpc-ieee1275.mk: Likewise.
314         * conf/sparc64-ieee1275.mk: Likewise.
315         * conf/x86_64-efi.mk: Likewise.
317         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
318         develop on GRUB.
320 2009-04-14  John Stanley <jpsinthemix@verizon.net>
321             David S. Miller  <davem@davemloft.net>
323         * util/hostdisk.c (make_device_name): Fix buffer length
324         calculations.
326 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
328         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
329         <sys/param.h> and <sys/sysctl.h>.
330         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
331         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
332         opening the device and reset them afterwards.
334 2009-04-13  Pavel Roskin  <proski@gnu.org>
336         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
337         Reported by John Stanley <jpsinthemix@verizon.net>
339 2009-04-13  Robert Millan  <rmh@aybabtu.com>
341         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
342         that name for menuentries when appropiate.
344 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
346         * util/grub.d/10_freebsd.in: Add a missing `fi'.
348 2009-04-13  Robert Millan  <rmh@aybabtu.com>
350         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
351         to Linux, simply abort telling the user it's no longer supported.
353 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
355         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
356         doestn't exist.  Check also for /boot/kernel/kernel.gz.  Print
357         `freebsd_loadenv' only when devices.hints exist.
359 2009-04-13  Pavel Roskin  <proski@gnu.org>
361         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
363 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
365         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
366         partition number.
367         (grub_drive): Likewise.
369 2009-04-13  David S. Miller  <davem@davemloft.net>
371         * kern/sparc64/ieee1275/ieee1275.c: New file.
372         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
373         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
374         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
375         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
376         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
377         grub_ieee1275_alloc_physmem): Declare new exported functions.
379         * include/grub/sparc64/ieee1275/loader.h: New file.
380         * include/grub/sparc64/ieee1275/memory.h: Likewise.
381         * include/grub/sparc64/kernel.h: Likewise.
382         * loader/sparc64/ieee1275/linux.c: Likewise.
384         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
385         (grub_fstest_SOURCES): Likewise.
387         * util/hostdisk.c (make_device_name): Do not make any assumptions
388         about the length of drive names.
390         * kern/dl.c (grub_dl_load_file): Close file immediately when
391         we are done using it.
393 2009-04-12  David S. Miller  <davem@davemloft.net>
395         * kern/misc.c (grub_ltoa): Fix cast when handling negative
396         values.  Noticed by Pavel Roskin.
398         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
399         target compiler.
400         
401         * genmk.rb: Add more flexible image type specification, also
402         pass --strip-unneeded to objcopy.
403         * conf/i386-pc.rmk: Use *_FORMAT.
404         * conf/i386-pc.mk: Rebuilt.
406         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
407         (OFDISK_HASH_SZ): Define.
408         (ofdisk_hash): New hash table.
409         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
410         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
411         instead of device phandle which is not unique.
413         * kern/sparc64/ieee1275/init.c: Delete, replace with...
414         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
415         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
416         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
417         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
418         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
419         GRUB_KERNEL_MACHINE_DATA_END): Define.
420         (grub_kernel_image_size, grub_total_module_size): Declare.
422 2009-04-12  Pavel Roskin  <proski@gnu.org>
424          * configure.ac: Change the logic when we check for target tools.
425          Do it when the target is specified and it's different from the
426          specified value of the host.
428 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
430         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
431         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
432         GNU/kFreeBSD. Check if a device is a character device. Use
433         DIOCGMEDIASIZE to get the size.
434         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
435         support for GNU/kFreeBSD.
436         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
437         is a character device instead of a block device. Add support for
438         FreeBSD device names.
440         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
441         is a character device instead of a block device.
443         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
444         is a character device instead of a block device.
446 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
448         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
449         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
450         FreeBSD. Check if a device is a character device. Use
451         DIOCGMEDIASIZE to get the size.
452         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
453         support for FreeBSD.
454         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
455         is a character device instead of a block device. Add support for
456         FreeBSD device names.
458         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
459         a character device instead of a block device.
460         (grub_util_check_char_device): New function.
462         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
463         a character device instead of a block device.
465         * include/grub/util/getroot.h (grub_util_check_char_device): New
466         prototype.
468 2009-04-11  David S. Miller  <davem@davemloft.net>
470         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
471         static libgcc.
472         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
473         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
474         function, if present.
475         (__bswapdi2): Likewise.
477         * include/grub/sparc64/ieee1275/boot.h: New file.
478         * boot/sparc64/ieee1275/boot.S: Likewise.
479         * boot/sparc64/ieee1275/diskboot.S: Likewise.
481         * kern/misc.c (grub_ltoa): New function.
482         (grub_vsprintf): Use it to format 'long' integers.
484 2009-04-10  David S. Miller  <davem@davemloft.net>
486         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
487         slots are of type grub_ieee1275_cell_t.
488         (grub_nand_read): Likewise.
489         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
490         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
491         macros are used to compare values in arg/ret block of the call.
492         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
493         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
494         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
495         grub_ieee1275_instance_to_path, grub_ieee1275_write,
496         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
497         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
498         grub_ieee1275_close, grub_ieee1275_set_property,
499         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
500         grub_ieee1275_cell_t.
501         * kern/ieee1275/openfw.c (grub_map): Likewise.
502         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
503         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
505         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
506         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
507         (grub_devalias_iterate): Likewise.
509 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
511         UFS improvements
513         * fs/ufs.c (INODE_NBLOCKS): new definition
514         (struct grub_ufs_dirent): added fields for non-BSD dirents
515         (grub_ufs_get_file_block): fixed double indirect handling
516         (grub_ufs_lookup_symlink): use more robust way to determine whether
517         symlink is inline
518         (grub_ufs_find_file): support for non-BSD dirents
519         (grub_ufs_dir): support for non-BSD dirents
521 2009-04-10  Bean  <bean123ch@gnail.com>
523         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
524         attribute, otherwise the size would be wrong for i386 platform.
526         * include/grub/pci.h (grub_pci_read_word): New inline function.
527         (grub_pci_read_byte): Likewise.
528         (grub_pci_write): Likewise.
529         (grub_pci_write_word): Likewise.
530         (grub_pci_write_byte): Likewise.
532         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
534         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
535         (find_framebuf): Scan pci to locate the frame buffer address.
537         * commands/efi/fixvideo.c: New file.
539         * commands/efi/loadbios.c: Likewise.
541         * commands/memrw.c: Likewise.
543         * util/grub-dumpbios.in: Likewise.
545         * conf/common.rmk (grub-dumpbios): New utility.
546         (pkglib_MODULES): New module memrw.mod.
547         (memrw_mod_SOURCE): New macro.
548         (memrw_mod_CFLAGS): Likewise.
549         (memrw_mod_LDFLAGS): Likewise.
551         * conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
552         fixvideo.mod.
553         (loadbios_mod_SOURCE): New macro.
554         (loadbios_mod_CFLAGS): Likewise.
555         (loadbios_mod_LDFLAGS): Likewise.
556         (fixvideo_mod_SOURCE): Likewise.
557         (fixvideo_mod_CFLAGS): Likewise.
558         (fixvideo_mod_LDFLAGS): Likewise.
560         * conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
561         fixvideo.mod.
562         (loadbios_mod_SOURCE): New macro.
563         (loadbios_mod_CFLAGS): Likewise.
564         (loadbios_mod_LDFLAGS): Likewise.
565         (fixvideo_mod_SOURCE): Likewise.
566         (fixvideo_mod_CFLAGS): Likewise.
567         (fixvideo_mod_LDFLAGS): Likewise.
569 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
571         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
573 2009-04-07  David S. Miller  <davem@davemloft.net>
575         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
576         support for R_SPARC_OLO10 relocations.  Fix compile warning for
577         R_SPARC_WDISP30 case.
578         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
580 2009-04-06  Pavel Roskin  <proski@gnu.org>
582         * include/grub/misc.h (ARRAY_SIZE): New macro.
583         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
584         New macro.
585         * loader/i386/linux.c (allocate_pages): Use free_pages().
586         (grub_linux_unload): Don't use free_pages().
587         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
588         wrong index.  Treat all other modes as text modes.
589         (grub_cmd_linux): Initialize vid_mode unconditionally to
590         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
592         * commands/help.c (print_command_help): Use cmd->prio, not
593         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
595 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
596         
597         Parttool
599         * parttool/pcpart.c: new file
600         * commands/parttool.c: likewise
601         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
602         (parttool_mod_SOURCES): new variable
603         (parttool_mod_CFLAGS): likewise
604         (parttool_mod_LDFLAGS): likewise
605         (pcpart_mod_SOURCES): likewise
606         (pcpart_mod_CFLAGS): likewise
607         (pcpart_mod_LDFLAGS): likewise
608         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c 
609         and parttool/pcpart.c
610         * conf/i386-efi.rmk: likewise
611         * conf/i386-ieee1275.rmk: likewise
612         * conf/i386-pc.rmk: likewise
613         * conf/powerpc-ieee1275.rmk: likewise
614         * conf/sparc64-ieee1275.rmk: likewise
615         * conf/x86_64-ieee1275.rmk: likewise
617 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
619         Support for mtime and further expandability of dir command
621         * include/grub/lib/datetime.h: moved to ...
622         * include/grub/datetime.h: ... moved here and added 
623         declaration of grub_unixtime2datetime. All users updated
624         * include/grub/fs.h: new syntax for dir and mtime functionin 
625         struct grub_fs 
626         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
627         and GRUB_FSHELP_FLAGS_MASK
628         * commands/ls.c (grub_ls_list_files): Write mtime in long format
629         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
630         (grub_ext2_mtime): new function
631         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
632         (grub_hfsplus_mtime): new function
633         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
634         (GRUB_UFS_ATTR_FILE): likewise
635         (GRUB_UFS_ATTR_LNK): likewise
636         (struct grub_ufs_sblock): new fields mtime
637         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
638         all users updated
639         (grub_ufs_dir): mtime support
640         (grub_ufs_mtime): new function
641         * fs/affs.c (grub_affs_dir): use new dir syntax
642         * fs/afs.c (grub_afs_dir): likewise
643         * fs/cpio.c (grub_cpio_dir): likewise
644         * fs/fat.c (grub_fat_find_dir): likewise
645         * fs/hfs.c (grub_hfs_dir): likewise
646         * fs/iso9660.c (grub_iso9660_dir): likewise
647         * fs/jfs.c (grub_jfs_dir): likewise
648         * fs/minix.c (grub_minix_dir): likewise
649         * fs/ntfs.c (grub_ntfs_dir): likewise
650         * fs/reiserfs.c (grub_reiserfs_dir): likewise
651         * fs/sfs.c (grub_sfs_dir): likewise
652         * fs/xfs.c (grub_xfs_dir): likewise
653         * util/hostfs.c (grub_hostfs_dir): likewise
654         * lib/datetime.c: moved to ...
655         * normal/datetime.c: ... moved here
656         (grub_unixtime2datetime): new function
657         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
658         * normal/completition.c (iterate_dir): use new dir syntax
659         * normal/misc.c (grub_normal_print_device_info): tell the 
660         last modification time of a volume
661         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax 
662         * conf/common.rmk: added lib/datetime.c to ls.mod
663         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c  
664         (normal_mod_SOURCES): likewise
665         (datetime_mod_SOURCES): Removed lib/datetime.c
666         * conf/i386-efi.rmk: likewise
667         * conf/i386-ieee1275.rmk: likewise      
668         * conf/i386-pc.rmk: likewise
669         * conf/powerpc-ieee1275.rmk: likewise
670         * conf/sparc64-ieee1275.rmk: likewise   
671         * conf/x86_64-efi.rmk: likewise 
673 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
675         Trim trailing spaces in FAT label and support mtools-like labels
676         
677         * fs/fat.c (grub_fat_iterate_dir): New function based 
678         on grub_fat_find_dir
679         (grub_fat_find_dir): use grub_fat_iterate_dir
680         (grub_fat_label): likewise
682 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
684         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h 
685         and command.h
686         remove extraneous kernel_elf_HEADERS
688 2009-04-04  Bean  <bean123ch@gnail.com>
690         * include/grub/util/misc.h: Add dummy function fsync for mingw.
692         * util/misc.c: Likewise.
694 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
696         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
697         instead of grub_printf.
699 2009-04-03  Robert Millan  <rmh@aybabtu.com>
701         * loader/i386/linux.c (grub_linux_setup_video): Fill
702         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
703         values from `mode info' structure instead of hardcoded
704         values.
706 2009-04-01  Pavel Roskin  <proski@gnu.org>
708         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
709         unused now.
710         * genmk.rb: Likewise.
711         * configure.ac: Likewise.
713 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
715         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
716         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
718 2009-04-01  David S. Miller  <davem@davemloft.net>
720         * normal/sparc64/setjmp.S: Fix setjmp implementation.
721         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.  
722         (grub_setjmp): Mark with 'returns_twice' attribute.
723         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
724         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
725         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
727 2009-04-01  Robert Millan  <rmh@aybabtu.com>
729         Reapply fix from 2008-07-28 which was accidentally reverted; also
730         perform the same fix to a similar check in same function.
732         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
733         with the same number are found, just use issue a warning with
734         grub_dprintf(), as this error has been reported to be non-fatal.
736 2009-03-31  Pavel Roskin  <proski@gnu.org>
738         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
739         for cross-compilation.
741 2009-03-30  Robert Millan  <rmh@aybabtu.com>
743         Fix i386-ieee1275 build.
745         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
746         Remove declaration.
748 2009-03-30  Pavel Roskin  <proski@gnu.org>
750         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
751         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
752         zero-terminated, rely only on the strlen value.  Fix comparison
753         of strings differing in length.
755 2009-03-30  Robert Millan  <rmh@aybabtu.com>
757         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
758         checking for abi version.  Improve error messages on BIOS to notify
759         user about `linux16' command.
761 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
763         Leak fixes
765         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
766         in case of collision
767         * disk/scsi.c (grub_scsi_open): free scsi in case of error
769 2009-03-29  Robert Millan  <rmh@aybabtu.com>
771         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
772         set `vid_mode' accordingly.
773         (grub_linux_boot): Process `vid_mode' and set video mode.
775 2009-03-29  Robert Millan  <rmh@aybabtu.com>
777         * util/grub.d/10_linux.in (linux_entry): New function.
778         Factorize generation of Linux boot entries.
780 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
782         Make the format of Environment Block plain text. The boot loader
783         part is not tested well yet.
784         
785         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
786         (buffer): Removed.
787         (envblk): Likewise.
788         (usage): Remove "info" and "clear". Add "unset". Update the
789         description of "set", as this does not delete variables any
790         longer.
791         (create_envblk_file): Complete rewrite.
792         (open_envblk_file): Likewise.
793         (cmd_info): Removed.
794         (cmd_list): Likewise.
795         (cmd_set): Likewise.
796         (cmd_clear): Likewise.
797         (list_variables): New function.
798         (write_envblk): Likewise.
799         (set_variables): Likewise.
800         (unset_variables): Likewise.
801         (main): Complete rewrite.
803         * commands/loadenv.c (buffer): Removed.
804         (envblk): Likewise.
805         (open_envblk_file): New function.
806         (read_envblk_file): Complete rewrite.
807         (grub_cmd_load_env): Likewise.
808         (grub_cmd_list_env): Likewise.
809         (struct blocklist): New struct.
810         (free_blocklists): New function.
811         (check_blocklists): Likewise.
812         (write_blocklists): Likewise.
813         (grub_cmd_save_env): Complete rewrite.
815         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
816         a plain text signature.
817         (GRUB_ENVBLK_MAXLEN): Removed.
818         (struct grub_envblk): Complete rewrite.
819         (grub_envblk_find): Removed.
820         (grub_envblk_insert): Likewise.
821         (grub_envblk_open): New prototype.
822         (grub_envblk_set): Likewise.
823         (grub_envblk_delete): Put const to VALUE.
824         (grub_envblk_iterate): Put const to NAME and VALUE.
825         (grub_envblk_close): New prototype.
826         (grub_envblk_buffer): New inline function.
827         (grub_envblk_size): Likewise.
829         * lib/envblk.c: Include grub/mm.h.
830         (grub_env_find): Removed.
831         (grub_envblk_open): New function.
832         (grub_envblk_close): Likewise.
833         (escaped_value_len): Likewise.
834         (find_next_line): Likewise.
835         (grub_envblk_insert): Removed.
836         (grub_envblk_set): New function.
837         (grub_envblk_delete): Complete rewrite.
838         (grub_envblk_iterate): Likewise.
840 2009-03-28  Robert Millan  <rmh@aybabtu.com>
842         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
843         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
844         variables.  Use 16-bit loader.
845         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
846         loader.
847         * kern/i386/loader.S (grub_linux_boot): Rename to ...
848         (grub_linux16_boot): ... this.  Update all users.
849         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
850         (grub_linux_boot): ... this.  Update all users.
852         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
853         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
854         commands to `linux16' and `initrd16'.
855         (GRUB_MOD_FINI(linux)): Rename to ...
856         (GRUB_MOD_FINI(linux16)): ... this.
858 2009-03-24  Pavel Roskin  <proski@gnu.org>
860         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
861         not just for compilation.
863 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
865         Move multiboot helper out of kernel
867         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
868         `loader/i386/multiboot_helper.S'.
869         * conf/i386-coreboot.rmk: Likewise
870         * conf/i386-ieee1275.rmk: Likewise
872         * kern/i386/loader.S: Move multiboot helpers from here...
873         * loader/i386/multiboot_helper.S: ...moved here
874         * include/grub/i386/loader.h: Move declarations of multiboot
875         helpers from here...
876         * include/grub/i386/multiboot.h: ...moved here
877         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
879 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
881         * kern/env.c (grub_env_context_open): Added an argument to specify
882         whether a new context inherits exported variables from current
883         one. This is useful when making a sandbox to interpret a config
884         file.
885         All callers updated.
887         * include/grub/env.h (grub_env_context_open): Updated the prototype.
889 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
891         * kern/env.c (grub_env_context_close): Fix memory leaks.
893 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
895         * normal/main.c (grub_normal_execute): Added an argument
896         BATCH to specify if an interactive interface should be provided
897         after reading a config file.
898         All callers updated.
899         (read_command_list): Prevent being executed twice.
900         (read_fs_list): Likewise.
902         * include/grub/normal.h (grub_normal_execute): Updated the
903         prototype.
905 2009-03-22  Pavel Roskin  <proski@gno.org>
907         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
908         _start.
909         * kern/i386/pc/startup.S: Likewise.
910         * kern/i386/efi/startup.S: Likewise.
911         * kern/i386/ieee1275/startup.S: Likewise.
912         * kern/i386/coreboot/startup.S: Likewise.
913         * kern/x86_64/efi/startup.S: Likewise.
915         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
916         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
917         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
919 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
921         Bugfixes in multiboot for bugs uncovered by solaris kernel.
923         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
924         limit detection.
925         Use vaddr of correct segment for entry_point.
927 2009-03-21  Bean  <bean123ch@gmail.com>
929         * commands/blocklist.c: Add include file <grub/command.h>, remove
930         <grub/normal.h> and <grub/arg.h>.
931         (grub_cmd_blocklist): Use the new command interface.
932         (GRUB_MOD_INIT): Likewise.
933         (GRUB_MOD_FINI): Likewise.
934         * commands/boot.c: Likewise.
935         * commands/cat.c: Likewise.
936         * commands/cmp.c: Likewise.
937         * commands/configfile.c: Likewise.
938         * commands/crc.c: Likewise.
939         * commands/echo.c: Likewise.
940         * commands/halt.c: Likewise.
941         * commands/handler.c: Likewise.
942         * commands/hdparm.c: Likewise.
943         * commands/help.c: Likewise.
944         * commands/hexdump.c: Likewise.
945         * commands/loadenv.c: Likewise.
946         * commands/ls.c: Likewise.
947         * commands/lsmmap.c: Likewise.
948         * commands/lspci.c: Likewise.
949         * commands/loadenv.c: Likewise.
950         * commands/read.c: Likewise.
951         * commands/reboot.c: Likewise.
952         * commands/search.c: Likewise.
953         * commands/sleep.c: Likewise.
954         * commands/test.c: Likewise.
955         * commands/usbtest.c: Likewise.
956         * commands/videotest.c: Likewise.
957         * commands/i386/cpuid.c: Likewise.
958         * commands/i386/pc/halt.c: Likewise.
959         * commands/i386/pc/play.c: Likewise.
960         * commands/i386/pc/pxecmd.c: Likewise.
961         * commands/i386/pc/vbeinfo.c: Likewise.
962         * commands/i386/pc/vbetest.c: Likewise.
963         * commands/ieee1275/suspend.c: Likewise.
964         * disk/loopback.c: Likewise.
965         * font/font_cmd.c: Likewise.
966         * hello/hello.c: Likewise.
967         * loader/efi/appleloader.c: Likewise.
968         * loader/efi/chainloader.c: Likewise.
969         * loader/i386/bsd.c: Likewise.
970         * loader/i386/efi/linux.c: Likewise.
971         * loader/i386/ieee1275/linux.c: Likewise.
972         * loader/i386/linux.c: Likewise.
973         * loader/i386/pc/chainloader.c: Likewise.
974         * loader/i386/pc/linux.c: Likewise.
975         * loader/powerpc/ieee1275/linux.c: Likewise.
976         * loader/multiboot_loader.c: Likewise.
977         * term/gfxterm.c: Likewise.
978         * term/i386/pc/serial.c: Likewise.
979         * term/terminfo.c: Likewise.
981         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
982         * term/i386/pc/vga.c: Likewise.
983         * video/readers/jpeg.c: Likewise.
984         * video/readers/png.c: Likewise.
985         * video/readers/tga.c: Likewise.
987         * util/grub-fstest (cmd_loopback): Removed.
988         (cmd_blocklist): Likewise.
989         (cmd_ls): Likewise.
990         (grub_register_command): Likewise.
991         (grub_unregister_command): Likewise.
992         (execute_command): Use grub_command_find to locate command and execute
993         it.
995         * include/grub/efi/chainloader.h: Removed.
996         * loader/efi/chainloader_normal.c: Likewise.
997         * loader/i386/bsd_normal.c: Likewise.
998         * loader/i386/pc/chainloader_normal.c: Likewise.
999         * loader/i386/pc/multiboot_normal.c: Likewise.
1000         * loader/linux_normal.c: Likewise.
1001         * loader/multiboot_loader_normal.c: Likewise.
1002         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1004         * gencmdlist.sh: Scan new registration command grub_register_extcmd
1005         and grub_register_command_p1.
1007         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1008         kern/command.c, lib/arg.c and commands/extcmd.c.
1009         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1010         (minicmd_mod_SOURCES): New variable.
1011         (minicmd_mod_CFLAGS): Likewise.
1012         (minicmd_mod_LDFLAGS): Likewise.
1013         (extcmd_mod_SOURCES): Likewise.
1014         (extcmd_mod_CFLAGS): Likewise.
1015         (extcmd_mod_LDFLAGS): Likewise.
1016         (boot_mod_SOURCES): Removed.
1017         (boot_mod_CFLAGS): Likewise.
1018         (boot_mod_LDFLAGS): Likewise.
1020         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1021         kern/corecmd.c.
1022         (kernel_img_HEADERS): Add command.h.
1023         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1024         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1025         and lib/arg.c.
1026         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1027         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1028         remove the corresponding normal mode command.
1029         (normal_mod_SOURCES): Remove normal/arg.c.
1030         * conf/i386-coreboot.rmk: Likewise.
1031         * conf/i386-efi.rmk: Likewise.
1032         * conf/i386-ieee1275.rmk: Likewise.
1033         * conf/powerpc-ieee1275.rmk: Likewise.
1034         * conf/x86_64-efi.rmk: Likewise.
1036         * include/grub/arg.h: Move from here ...
1037         * include/grub/lib/arg.h: ... to here.
1039         * normal/arg.c: Move from here ...
1040         * lib/arg.c: ... to here.
1042         * commands/extcmd.c: New file.
1043         * commands/minicmd.c: Likewise.
1044         * include/grub/command.h: Likewise.
1045         * include/grub/extcmd.h: Likewise.
1046         * kern/command.c: Likewise.
1047         * kern/corecmd.c: Likewise.
1049         * kern/list.c (grub_list_iterate): Return int instead of void.
1050         (grub_list_insert): New function.
1051         (grub_prio_list_insert): Likewise.
1053         * kern/rescue.c (grub_rescue_command): Removed.
1054         (grub_rescue_command_list): Likewise.
1055         (grub_rescue_register_command): Likewise.
1056         (grub_rescue_unregister_command): Likewise.
1057         (grub_rescue_cmd_boot): Move to minicmd.c
1058         (grub_rescue_cmd_help): Likewise.
1059         (grub_rescue_cmd_info): Likewise.
1060         (grub_rescue_cmd_boot): Likewise.
1061         (grub_rescue_cmd_testload): Likewise.
1062         (grub_rescue_cmd_dump): Likewise.
1063         (grub_rescue_cmd_rmmod): Likewise.
1064         (grub_rescue_cmd_lsmod): Likewise.
1065         (grub_rescue_cmd_exit): Likewise.
1066         (grub_rescue_print_devices): Moved to corecmd.c.
1067         (grub_rescue_print_files): Likewise.
1068         (grub_rescue_cmd_ls): Likewise.
1069         (grub_rescue_cmd_insmod): Likewise.
1070         (grub_rescue_cmd_set): Likewise.
1071         (grub_rescue_cmd_unset): Likewise.
1072         (attempt_normal_mode): Use grub_command_find to get normal module.
1073         (grub_enter_rescue_mode): Use grub_register_core_commands to register
1074         commands, remove grub_rescue_register_command calls.
1076         * normal/command.c (grub_register_command): Removed.
1077         (grub_unregister_command): Likewise.
1078         (grub_command_find): Likewise.
1079         (grub_iterate_commands): Likewise.
1080         (rescue_command): Likewise.
1081         (export_command): Moved to corecmd.c.
1082         (set_command): Removed.
1083         (unset_command): Likewise.
1084         (insmod_command): Likewise.
1085         (rmmod_command): Likewise.
1086         (lsmod_command): Likewise.
1087         (grub_command_init): Likewise.
1089         * normal/completion.c (iterate_command): Use cmd->prio to check for
1090         active command.
1091         (complete_arguments): Use grub_extcmd_t structure to find options.
1092         (grub_normal_do_completion): Change function grub_iterate_commands to
1093         grub_command_iterate.
1095         * normal/execute.c (grub_script_execute_cmd): No need to parse
1096         argument here.
1098         * normal/main.c (grub_dyncmd_dispatcher): New function.
1099         (read_command_list): Register unload commands as dyncmd.
1100         (grub_cmd_normal): Use new command interface, register rescue,
1101         unregister normal at entry, register normal, unregister rescue at exit.
1103         * include/grub/list.h (grub_list_test_t): New type.
1104         (grub_list_iterate): Return int instead of void.
1105         (grub_list_insert): New function.
1106         (GRUB_AS_NAMED_LIST_P): New macro.
1107         (GRUB_AS_PRIO_LIST): Likewise.
1108         (GRUB_AS_PRIO_LIST_P): Likewise.
1109         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1110         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1111         (grub_prio_list): New structure.
1112         (grub_prio_list_insert): New function.
1113         (grub_prio_list_remove): New inline function.
1115         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1116         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1117         (GRUB_COMMAND_FLAG_MENU): Likewise.
1118         (GRUB_COMMAND_FLAG_BOTH): Likewise.
1119         (GRUB_COMMAND_FLAG_TITLE): Likewise.
1120         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1121         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1122         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1123         (grub_command): Likewise.
1124         (grub_register_command): Likewise.
1125         (grub_command_find): Likewise.
1126         (grub_iterate_commands): Likewise.
1127         (grub_command_init): Likewise.
1128         (grub_arg_parse): Likewise.
1129         (grub_arg_show_help): Likewise.
1131         * include/grub/rescue.h (grub_rescue_register_command): Removed.
1132         (grub_rescue_unregister_command): Likewise.
1134         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1135         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1136         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1138         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1139         grub_rescue_cmd_initrd.
1140         * include/grub/i386/loader.h: Likewise.
1141         * include/grub/x86_64/loader.h: Likewise.
1143         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1145 2009-03-21  Bean  <bean123ch@gmail.com>
1147         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1148         instead of stat in mingw environment.
1150         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1152         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1154         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1155         AC_CONFIG_LINKS.
1157 2009-03-21  Bean  <bean123ch@gmail.com>
1159         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1160         out of range error.
1162 2009-03-18  Michel Dänzer  <michel@daenzer.net>
1164         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1165         checking inode flags for EXT4_EXTENTS_FLAG.
1167 2009-03-18  Robert Millan  <rmh@aybabtu.com>
1169         * loader/i386/linux.c: Include `<grub/video.h>' and
1170         `<grub/i386/pc/vbe.h>'..
1171         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
1172         (grub_linux32_boot): Attempt to configure video settings with
1173         grub_linux_setup_video().
1174         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1175         to avoid grub_console_fini() which would step out of graphical mode
1176         unconditionally.
1178 2009-03-14  Robert Millan  <rmh@aybabtu.com>
1180         Fix build on powerpc.
1181         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1183 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
1185         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1186         background image command.
1188 2009-03-12  Colin D Bennett  <colin@gibibit.com>
1190         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1191         (grub_gfxterm_putchar): Extract pairs of identical calls to
1192         draw_cursor out of conditional blocks.
1194 2009-03-11  Pavel Roskin  <proski@gnu.org>
1196         * fs/hfs.c (grub_hfs_strncasecmp): New function.
1197         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1199 2009-03-11  Robert Millan  <rmh@aybabtu.com>
1201         * loader/i386/multiboot_elfxx.c
1202         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1204 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
1206         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1207         `kern/handler.c'.
1209 2009-03-11  Robert Millan  <rmh@aybabtu.com>
1211         * loader/i386/multiboot.c (code_size): New variable.
1212         (grub_multiboot): Define offsets by adding to `code_size' rather
1213         than subtracting from `grub_multiboot_payload_size'.  Provide
1214         4-byte alignment to MBI and others by increasing
1215         `boot_loader_name_length' appropriately.
1217         * loader/i386/multiboot_elfxx.c
1218         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1220 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
1222         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1223         `fs/ext2.c'.
1225 2009-03-08  Robert Millan  <rmh@aybabtu.com>
1227         Make loader/i386/linux.c usable on i386-pc again.
1229         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1230         memory to heap.
1231         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1232         `#error' stanza.
1234 2009-03-07  Bean  <bean123ch@gmail.com>
1236         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1237         allocation.
1239 2009-03-06  Robert Millan  <rmh@aybabtu.com>
1241         Fix display issue on terminals with screen size other than 80x25
1242         (e.g. gfxterm with resolution higher than 640x480).
1244         * normal/main.c (grub_normal_init_page): Display title text in a
1245         position relative to the center of the terminal instead of relying
1246         on a hardcoded offset.
1248 2009-03-04  Robert Millan  <rmh@aybabtu.com>
1250         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1251         installed.
1253         * Makefile.in (host_kernel): New variable.
1254         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1255         scripts instead of just the windows one.
1256         * configure.ac: Initialize and AC_SUBST `host_kernel'.
1258 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
1260         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1261         `kern/handler.c'.
1262         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1263         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1264         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1265         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1266         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1267         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1269 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
1271         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1272         or if there's no space for the disk label and print the partition number on a
1273         invalid magic.
1275 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
1277         * util/misc.c: Include <time.h>.
1278         (grub_millisleep): New function.
1280 2009-03-04  Bean  <bean123ch@gmail.com>
1282         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1283         another option -mno-red-zone.
1285         * commands/handler.c: Change module description.
1287         * kern/handler.c: Add missing space at the end of description line.
1289         * kern/list.c: Likewise.
1291 2009-03-03  Robert Millan  <rmh@aybabtu.com>
1293         Move more components to the relocation area, and fix mbi pointer
1294         handling to use the destination rather than the origin (thanks to
1295         Vladimir Serbinenko for spotting).
1297         * loader/i386/multiboot.c (mbi_dest): New variable.
1298         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1299         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1300         relocation area.
1302 2009-03-01  Bean  <bean123ch@gmail.com>
1304         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
1305         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1306         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1307         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1309         * loader/i386/efi/linux.c (acpi_guid): New variable.
1310         (acpi_guid): Likewise.
1311         (EBDA_SEG_ADDR): New constant.
1312         (LOW_MEM_ADDR): Likewise.
1313         (FAKE_EBDA_SEG): Likewise.
1314         (fake_bios_data): New function.
1315         (grub_linux_boot): Call fake_bios_data.
1317 2009-03-01  Bean  <bean123ch@gmail.com>
1319         * commands/terminal.c: Removed.
1321         * commands/handler.c: New file.
1323         * include/grub/list.h: Likewise.
1325         * include/grub/handler.h: Likewise.
1327         * kern/list.c: Likewise.
1329         * kern/handler.c: Likewise.
1331         * kern/term.h: Include header file <grub/handler.h>.
1332         (grub_term_input): Move next field to the beginning.
1333         (grub_term_output): Likewise.
1334         (grub_term_input_class): New variable.
1335         (grub_term_output_class): Likewise.
1336         (grub_term_register_input): Changed to inline function.
1337         (grub_term_register_output): Likewise.
1338         (grub_term_unregister_input): Likewise.
1339         (grub_term_unregister_output): Likewise.
1340         (grub_term_set_current_input): Likewise.
1341         (grub_term_set_current_output): Likewise.
1342         (grub_term_get_current_input): Likewise.
1343         (grub_term_get_current_output): Likewise.
1344         (grub_term_iterate_input): Removed.
1345         (grub_term_iterate_output): Likewise.
1347         * kern/term.c (grub_term_list_input): Removed.
1348         (grub_term_list_output): Likewise.
1349         (grub_term_input_class): New variable.
1350         (grub_term_output_class): Likewise.
1351         (grub_cur_term_input): Change variable as macro.
1352         (grub_cur_term_output): Likewise.
1353         (grub_term_register_input): Removed.
1354         (grub_term_register_output): Likewise.
1355         (grub_term_unregister_input): Likewise.
1356         (grub_term_unregister_output): Likewise.
1357         (grub_term_set_current_input): Likewise.
1358         (grub_term_set_current_output): Likewise.
1359         (grub_term_iterate_input): Likewise.
1360         (grub_term_iterate_output): Likewise.
1361         (grub_term_get_current_input): Likewise.
1362         (grub_term_get_current_output): Likewise.
1364         * util/grub-editenv.c: Include header file <grub/handler.h>.
1365         (grub_term_get_current_input): Removed.
1366         (grub_term_get_current_output): Likewise.
1367         (grub_term_input_class): New variable.
1368         (grub_term_output_class): Likewise.
1370         * util/grub-fstest.c (grub_term_get_current_input): Removed.
1371         (grub_term_get_current_output): Likewise.
1372         (grub_term_input_class): New variable.
1373         (grub_term_output_class): Likewise.
1375         * util/grub-probe.c (grub_term_get_current_input): Removed.
1376         (grub_term_get_current_output): Likewise.
1377         (grub_term_input_class): New variable.
1378         (grub_term_output_class): Likewise.
1380         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1381         (grub_term_get_current_output): Likewise.
1382         (grub_term_input_class): New variable.
1383         (grub_term_output_class): Likewise.
1385         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1386         (terminal_mod_SOURCES): Likewise.
1387         (terminal_mod_CFLAGS): Likewise.
1388         (terminal_mod_LDFLAGS): Likewise.
1390         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1391         handler.c.
1392         (kernel_img_SOURCES): Add list.c and handler.c.
1393         (kernel_img_HEADERS): Add list.h and handler.h.
1395         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1396         handler.c.
1397         (kernel_mod_SOURCES): Add list.c and handler.c.
1398         (kernel_mod_HEADERS): Add list.h and handler.h.
1400         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1401         handler.c.
1402         (kernel_elf_SOURCES): Add list.c and handler.c.
1403         (kernel_elf_HEADERS): Add list.h and handler.h.
1405         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1406         handler.c.
1407         (kernel_elf_SOURCES): Add list.c and handler.c.
1408         (kernel_elf_HEADERS): Add list.h and handler.h.
1410         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1411         handler.c.
1412         (kernel_mod_SOURCES): Add list.c and handler.c.
1413         (kernel_mod_HEADERS): Add list.h and handler.h.
1415         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1416         handler.c.
1417         (kernel_elf_SOURCES): Add list.c and handler.c.
1418         (kernel_elf_HEADERS): Add list.h and handler.h.
1420 2009-02-27  Robert Millan  <rmh@aybabtu.com>
1422         Factorize elf32 / elf64 code in Multiboot loader.  This will
1423         prevent it from getting out of sync again.
1425         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1426         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1427         grub_multiboot_load_elf64): Move from here ...
1428         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1429         grub_multiboot_load_elf): ... to here (new file).
1431 2009-02-27  Robert Millan  <rmh@aybabtu.com>
1433         * util/grub.d/10_linux.in: Rename "single-user mode" to
1434         "recovery mode".
1436 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
1438         Don't leak in SCSI code.
1439         * disk/scsi.c (grub_scsi_close): free `scsi'.
1441 2009-02-27  Robert Millan  <rmh@aybabtu.com>
1443         * loader/i386/pc/multiboot.c: Move from here ...
1444         * loader/i386/multiboot.c: ... to here.  Update all users.
1446 2009-02-27  Robert Millan  <rmh@aybabtu.com>
1448         Patch from Alexandre Bique <bique.alexandre@gmail.com>
1449         * util/i386/pc/grub-setup.c (setup): Fix directory path.
1451 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
1453         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1454         b-tree.
1456 2009-02-27  Robert Millan  <rmh@aybabtu.com>
1458         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1459         `0x' qualifier as 0 when base is specified as parameter).
1461 2009-02-24  Bean  <bean123ch@gmail.com>
1463         * configure.ac: Check for -mcmodel=large in x86_64 target.
1465         * include/grub/efi/api.h (efi_call_10): New macro.
1466         (efi_wrap_10): New function.
1468         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1469         (GRUB_PE32_REL_BASED_HIGH): Likewise.
1470         (GRUB_PE32_REL_BASED_LOW): Likewise.
1471         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1472         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1473         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1474         (GRUB_PE32_REL_BASED_SECTION): Likewise.
1475         (GRUB_PE32_REL_BASED_REL): Likewise.
1476         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1477         (GRUB_PE32_REL_BASED_DIR64): Likewise.
1478         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1480         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1481         issue.
1483         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1484         (efi_wrap_10): New function.
1486         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1488         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1489         MB/MBP model (NV chipset).
1490         (devdata_devs): Add devpath_5 to the list.
1492         * load/i386/efi/linux.c (video_base): Remove variable.
1493         (RGB_MASK): New macro.
1494         (RGB_MAGIC): Likewise.
1495         (LINE_MIN): Likewise.
1496         (LINE_MAX): Likewise.
1497         (FBTEST_STEP): Likewise.
1498         (FBTEST_COUNT): Likewise.
1499         (fb_list): New variable.
1500         (grub_find_video_card): Remove function.
1501         (find_framebuf): New function.
1502         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1503         line length.
1505         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1506         problem for x86_64.
1508 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
1510         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1512         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1513         coding tool name.
1515 2009-02-22  Robert Millan  <rmh@aybabtu.com>
1517         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1518         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1519         in our relocation, instead of using it directly from heap.  Also
1520         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1522 2009-02-21  Robert Millan  <rmh@aybabtu.com>
1524         Implement USB keyboard support (based on patch by Marco Gerards)
1526         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1527         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1528         (usb_keyboard_mod_LDFLAGS): New variables.
1530         * term/usb_keyboard.c: New file.
1532 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
1534         Corrected wrong declaration
1536         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1538 2009-02-14  Christian Franke  <franke@computer.org>
1540         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1541         (grub_lspci_iter): Print class code and programming interface byte.
1543 2009-02-14  Christian Franke  <franke@computer.org>
1545         * gendistlist.sh: Ignore `.svn' directories.
1547 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
1549         * fs/fat.c: Add 2009 to Copyright line.
1551 2009-02-14  Christian Franke  <franke@computer.org>
1553         * commands/hdparm.c: New file.  Provides `hdparm' command
1554         which sends ATA commands via grub_disk_ata_pass_through ().
1556         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1558         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
1559         and <grub/cpu/io.h> to include/grub/ata.h.
1560         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1561         (GRUB_CDROM_SECTOR_SIZE): Remove.
1562         (GRUB_ATA_*): Move to include/grub/ata.h.
1563         (GRUB_ATAPI_*): Likewise.
1564         (enum grub_ata_commands): Likewise.
1565         (enum grub_ata_timeout_milliseconds): Likewise.
1566         (struct grub_ata_device): Likewise.
1567         (grub_ata_regset): Likewise.
1568         (grub_ata_regget): Likewise.
1569         (grub_ata_regset2): Likewise.
1570         (grub_ata_regget2): Likewise.
1571         (grub_ata_check_ready): Likewise.
1572         (grub_ata_wait_not_busy): Remove static, exported in
1573         include/grub/ata.h.
1574         (grub_ata_wait_drq): Likewise.
1575         (grub_ata_pio_read): Likewise.
1577         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
1578         function for hdparm.mod.
1580         * include/grub/ata.h: New file, contains declarations from
1581         disk/ata.c.
1582         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1584         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1585         (grub_disk_ata_pass_through): New exported variable.
1587         * kern/disk.c (grub_disk_ata_pass_through): New variable.
1589 2009-02-13  Colin D Bennett  <colin@gibibit.com>
1591         Support multiple fallback entries, and provide an API to support
1592         executing default+fallback menu entries.  Renamed the `terminal' menu
1593         viewer to `text'.
1595         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1596         variable declaration.
1597         (grub_menu_execute_callback): New structure declaration.
1598         (grub_menu_execute_callback_t): New typedef.
1599         (grub_menu_execute_with_fallback): New function declaration.
1600         (grub_menu_get_entry): Likewise.
1601         (grub_menu_get_timeout): Likewise.
1602         (grub_menu_set_timeout): Likewise.
1604         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1606         * normal/menu.c (grub_wait_after_message): Moved to
1607         `normal/menu_text.c'.
1608         (draw_border): Likewise.
1609         (print_message): Likewise.
1610         (print_entry): Likewise.
1611         (print_entries): Likewise.
1612         (grub_menu_init_page): Likewise.
1613         (get_entry_number): Likewise.
1614         (print_timeout): Likewise.
1615         (run_menu): Likewise.
1616         (grub_menu_execute_entry): Likewise.
1617         (show_text_menu): Likewise.
1618         (get_and_remove_first_entry_number): New function.
1619         (grub_menu_execute_with_fallback): Likewise.
1620         (get_entry): Renamed to ...
1621         (grub_menu_get_entry): .. this and made it global.
1622         (get_timeout): Renamed to ...
1623         (grub_menu_get_timeout): ... this and made it global.
1624         (set_timeout): Renamed to ...
1625         (grub_menu_set_timeout): ... this and made it global.
1626         (grub_normal_terminal_menu_viewer): Renamed to ...
1627         (grub_normal_text_menu_viewer): ... this.
1629         * normal/menu_text.c: New file.  Extracted text-menu-specific code
1630         from normal/menu.c.
1632         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1633         (normal_mod_SOURCES): Likewise.
1635         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1636         (normal_mod_SOURCES): Likewise.
1638         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1639         (normal_mod_SOURCES): Likewise.
1641         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
1642         (normal_mod_SOURCES): Likewise.
1644         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1645         (normal_mod_SOURCES): Likewise.
1647         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1648         (normal_mod_SOURCES): Likewise.
1650         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1651         (normal_mod_SOURCES): Likewise.
1653 2009-02-11  Robert Millan  <rmh@aybabtu.com>
1655         * util/grub.d/00_header.in: Update old reference to `font' command.
1657 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
1659         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
1661         Based on patch from Javier Martín.
1663 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
1665         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
1666         to avoid false positives with FAT.
1667         (grub_fstest_SOURCES): Likewise.
1668         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1669         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1670         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1671         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1672         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1673         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1675 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
1677         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
1678         bpb.version_specific.fat12_or_fat16.fstype and
1679         bpb.version_specific.fat32.fstype.
1681 2009-02-08  Robert Millan  <rmh@aybabtu.com>
1683         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
1685 2009-02-08  Robert Millan  <rmh@aybabtu.com>
1687         * Makefile.in (host_os, host_cpu): New variables.
1688         (target_os): Remove.  Update all users.
1690 2009-02-08  Marco Gerards  <marco@gnu.org>
1692         * Makefile.in (enable_grub_emu_usb): New variable.
1693         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
1694         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
1695         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
1696         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
1697         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
1698         `usbtest.mod' and `usbms.mod'.
1699         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
1700         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
1701         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
1702         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
1703         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
1704         variables.
1706         * disk/usbms.c: New file.
1708         * include/grub/usb.h: Likewise.
1710         * include/grub/usbtrans.h: Likewise.
1712         * include/grub/usbdesc.h: Likewise.
1714         * bus/usb/usbtrans.c: Likewise.
1716         * bus/usb/ohci.c: Likewise.
1718         * bus/usb/uhci.c: Likewise.
1720         * bus/usb/usbhub.c: Likewise.
1722         * bus/usb/usb.c: Likewise.
1724         * commands/usbtest.c: Likewise.
1726         * util/usb.c: Likewise.
1728         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
1730         * configure.ac: Test for libusb presence.
1732         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
1734 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
1736         * kern/mm.c: Add more comments.
1738 2009-02-08  Robert Millan  <rmh@aybabtu.com>
1740         Patch from Javier Martín.
1741         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
1742         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
1744 2009-02-08  Robert Millan  <rmh@aybabtu.com>
1746         * fs/cpio.c: Split tar functionality to ...
1747         * fs/tar.c: ... here (new file).  Update all users.
1749 2009-02-07  Robert Millan  <rmh@aybabtu.com>
1751         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
1752         backward-incompatible features.
1754         Based on patch from Javier Martín, with some adjustments.
1756 2009-02-07  Michael Scherer  <misc@mandriva.org>
1758         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
1760 2009-02-07  Robert Millan  <rmh@aybabtu.com>
1762         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
1763         position of `disk/lvm.c' to ensure grub_init_all() always picks it
1764         after the RAID stuff.
1766 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
1768         Fixes problem when running vbetest command as reported by
1769         Vladimir Serbinenko <phcoder@gmail.com>.
1771         * (grub_vbe_set_video_mode): Fixed problem with text modes.
1773 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
1775         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
1776         /dev/md/NpN style mdraid devices.
1778 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
1780         * util/unifont2pff.rb: Remove.
1782 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
1784         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
1785         `#'.
1787 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
1789         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
1790         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1791         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1792         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1793         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1794         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1795         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1797 2009-02-02  Christian Franke  <franke@computer.org>
1799         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
1801 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
1803         * INSTALL: Note that we now require at least autoconf 2.59 and
1804         that LZO is optional.
1806 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
1808         Base on patch on bug #24154 created by Tomas Tintera
1809         <trosos@seznam.cz>.
1811         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
1813 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
1815         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
1816         <bero@arklinux.org>.
1818         * normal/parser.y (script_init): Add missing semicolon.
1820 2009-01-31  Colin D Bennett  <colin@gibibit.com>
1822         * normal/main.c: Add include to grub/menu_viewer.h.
1823         (free_menu_entry_classes): Added.
1824         (grub_normal_menu_addentry): Added class property handling.
1825         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
1826         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
1828         * normal/menu_viewer.c: New file.
1830         * normal/menu.c (run_menu_entry): Renamed to ...
1831         (grub_menu_execute_entry): ... this and made it as global.
1832         (grub_menu_run): Renamed to ...
1833         (show_text_menu): ... this and made it local.
1834         (show_text_menu): Adapt to new function names.
1835         (grub_normal_terminal_menu_viewer): New global variable.
1837         * include/grub/menu.h: New file.
1839         * include/grub/menu_viewer.h: New file.
1841         * include/grub/normal.h: Added include to grub/menu.h.
1842         (grub_menu_entry): Moved to include/grub/menu.h.
1843         (grub_menu_entry_t): Likewise.
1844         (grub_menu): Likewise.
1845         (grub_menu_t): Likewise.
1846         (grub_normal_terminal_menu_viewer): Added.
1847         (grub_menu_execute_entry): Likewise.
1848         (grub_menu_run): Removed.
1850         * DISTLIST: Added include/grub/menu.h.
1851         Added include/grub/menu_viewer.h.
1852         Added normal/menu_viewer.c.
1854 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
1856         * normal/execute.c (grub_script_execute_menuentry): Changed to use
1857         arglist for menutitle arguments.
1859         * normal/main.c (grub_normal_menu_addentry): Likewise.
1861         * normal/parser.y (menuentry): Likewise.
1863         * normal/script.c (grub_script_create_cmdmenu): Likewise.
1865         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
1866         (grub_script_create_cmdmenu): Likewise.
1868         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
1870         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
1871         changes.
1873         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
1875         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
1877         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
1879         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1881         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1883         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
1885 2009-01-30  Christian Franke  <franke@computer.org>
1887         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
1888         in option help text.
1890 2009-01-27  Pavel Roskin  <proski@gnu.org>
1892         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
1894 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
1896         * commands/lsmmap.c: Add include to grub/machine/memory.h.
1898         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
1900         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
1901         unregister function.
1903 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
1905         * disk/scsi.c (grub_scsi_read): Fix sign problem.
1907         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
1909         * util/grub-mkfont.c (usage): Fix typo.
1911         * util/elf/grub-mkimage.c (load_modules): Fix warning.
1913 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
1915         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
1917         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
1919         * kern/misc.c (grub_strcasecmp): New function.
1920         (grub_strcasecmp): Use grub_size_t instead of int for length.
1921         Fix return value.
1922         * include/grub/misc.h: Update function prototypes.
1924 2009-01-26  Robert Millan  <rmh@aybabtu.com>
1926         * configure.ac: Fix cross-compilation check.
1928 2009-01-22  Christian Franke  <franke@computer.org>
1930         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
1931         (precision) digit string.  Allow `.format2' without `format1' (width).
1932         Limit input chars for `%s' output to `format2' if specified.  This is
1933         compatible with standard printf ().
1935 2009-01-22  Christian Franke  <franke@computer.org>
1937         * disk/ata.c (grub_ata_wait_status): Replace by ...
1938         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
1939         other status bits may be invalid while BSY is asserted.
1940         (grub_ata_check_ready): New function.
1941         (grub_ata_cmd): Removed.
1942         (grub_ata_wait_drq): New function.
1943         (grub_ata_strncpy): Remove inline.
1944         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
1945         and error check now done by grub_ata_wait_drq ().
1946         (grub_ata_pio_write): Likewise.
1947         (grub_atapi_identify): Set DEV before check for !BSY.  Use
1948         grub_ata_wait_drq () to wait for data.
1949         (grub_ata_device_initialize): Add status register check to
1950         detect missing SATA slave devices.  Add debug messages.
1951         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
1952         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
1953         transfer loop by grub_ata_pio_write ().
1954         (grub_ata_identify): Set DEV before check for !BSY. Use
1955         grub_ata_wait_drq () to wait for data.
1956         (grub_ata_setaddress): Set DEV before check for !BSY.
1957         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
1958         read/write in one loop.  Fix invalid command on write.  Fix incomplete
1959         command on (size % batch) == 0.  Add missing error check after write of
1960         last block.  Add debug messages.
1961         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
1963 2009-01-19  Christian Franke  <franke@computer.org>
1965         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
1966         (GRUB_ATAPI_IREASON_*): Likewise.
1967         (grub_ata_pio_write): Fix timeout error return.
1968         (grub_atapi_identify): Add grub_ata_wait () after cmd.
1969         (grub_atapi_wait_drq): New function.
1970         (grub_atapi_packet): New parameter `size'.
1971         Use grub_atapi_wait_drq () and direct write instead of
1972         grub_ata_pio_write ().
1973         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
1974         reads the number of bytes requested by the device for each DRQ
1975         assertion.
1976         (grub_atapi_write): Remove old implementation, return not
1977         implemented instead.
1979 2009-01-19  Christian Franke  <franke@computer.org>
1981         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
1982         of 512 to calculate data size.
1983         (grub_scsi_read12): Likewise.
1984         (grub_scsi_write10): Likewise.
1985         (grub_scsi_write12): Likewise.
1986         (grub_scsi_read): Adjust size according to blocksize.
1987         Add checks for invalid blocksize and unaligned transfer.
1989 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
1991         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
1993         * term/gfxterm.c (write_char): Fix background rendering for wide
1994         width glyphs.
1996 2009-01-19  Robert Millan  <rmh@aybabtu.com>
1998         * config.guess: Update to latest version from config git.
1999         * config.sub: Likewise.
2001 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
2003         * Makefile.in: Change font compilation to use new grub-mkfont instead
2004         of java version.
2006         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2007         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2008         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2009         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2010         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2011         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2012         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2013         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2014         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2016 2009-01-16  Christian Franke  <franke@computer.org>
2018         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2019         (enum grub_ata_timeout_milliseconds): New enum.
2020         (grub_ata_wait_status): Add parameter milliseconds.
2021         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
2022         recovery from timed-out commands.
2023         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
2024         return grub_errno instead of REG_ERROR.
2025         (grub_ata_pio_write): Add parameter milliseconds.
2026         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2027         Pass milliseconds to grub_ata_wait_status () and
2028         grub_ata_pio_read ().
2029         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2030         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
2031         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
2032         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2033         It is not suitable for device detection, because DEV bit is ignored,
2034         the command may run too long, and not all devices set the signature
2035         properly.
2036         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2037         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2038         Fix device selection, DEV bit must be set first to address the registers
2039         of the correct device.
2040         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2041         grub_ata_pio_read/write ().
2042         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2043         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2045 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
2047         * util/grub-editenv.c (main): Use fseeko(), not fseek().
2049 2009-01-13  Bean  <bean123ch@gmail.com>
2051         * util/grub-mkfont.c (write_font): forget to remove some debug code.
2053 2009-01-13  Bean  <bean123ch@gmail.com>
2055         * Makefile.in: (enable_grub_mkfont): New variable.
2056         (freetype_cflags): Likewise.
2057         (freetype_libs): Likewise.
2059         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2060         (grub_mkfont_SOURCES): New variable.
2061         (grub_mkfont_CFLAGS): Likewise.
2062         (grub_mkfont_LDFLAGS): Likewise.
2064         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2065         library if `--enable-grub-mkfont' is requested.
2066         (enable_grub_mkfont): New variable.
2067         (freetype_cflags): Likewise.
2068         (freetype_libs): Likewise.
2070         * util/grub-mkfont.c: New file.
2072 2009-01-12  Christian Franke  <franke@computer.org>
2074         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2075         mode check.  Fix setting of compat_use[].
2077 2009-01-10  Robert Millan  <rmh@aybabtu.com>
2079         Update a few copyright years which we forgot to do in 2008 (only for
2080         files whose changes made in 2008 were copyright-significant)
2082         * Makefile.in: Add 2008 to Copyright line.
2083         * disk/ieee1275/ofdisk.c: Likewise.
2084         * disk/efi/efidisk.c: Likewise.
2085         * kern/dl.c: Likewise.
2086         * kern/sparc64/ieee1275/init.c: Likewise.
2087         * kern/mm.c: Likewise.
2088         * kern/efi/mm.c: Likewise.
2089         * boot/i386/pc/boot.S: Likewise.
2090         * genfslist.sh: Likewise.
2091         * fs/iso9660.c: Likewise.
2092         * fs/hfs.c: Likewise.
2093         * fs/jfs.c: Likewise.
2094         * fs/minix.c: Likewise.
2095         * fs/ufs.c: Likewise.
2096         * gensymlist.sh.in: Likewise.
2097         * genkernsyms.sh.in: Likewise.
2098         * include/grub/misc.h: Likewise.
2099         * include/grub/types.h: Likewise.
2100         * include/grub/symbol.h: Likewise.
2101         * include/grub/elf.h: Likewise.
2102         * include/grub/kernel.h: Likewise.
2103         * include/grub/disk.h: Likewise.
2104         * include/grub/dl.h: Likewise.
2105         * include/grub/i386/linux.h: Likewise.
2106         * include/grub/i386/pc/biosdisk.h: Likewise.
2107         * include/grub/efi/api.h: Likewise.
2108         * include/grub/efi/pe32.h: Likewise.
2109         * include/grub/util/misc.h: Likewise.
2110         * normal/execute.c: Likewise.
2111         * normal/arg.c: Likewise.
2112         * normal/completion.c: Likewise.
2113         * normal/lexer.c: Likewise.
2114         * normal/parser.y: Likewise.
2115         * normal/misc.c: Likewise.
2116         * commands/i386/pc/vbeinfo.c: Likewise.
2117         * commands/hexdump.c: Likewise.
2118         * commands/terminal.c: Likewise.
2119         * commands/ls.c: Likewise.
2120         * commands/help.c: Likewise.
2121         * partmap/pc.c: Likewise.
2122         * loader/efi/chainloader.c: Likewise.
2123         * loader/multiboot_loader.c: Likewise.
2124         * loader/i386/pc/multiboot2.c: Likewise.
2125         * term/efi/console.c: Likewise.
2126         * term/i386/pc/serial.c: Likewise.
2127         * util/lvm.c: Likewise.
2128         * util/console.c: Likewise.
2129         * util/i386/efi/grub-mkimage.c: Likewise.
2130         * util/raid.c: Likewise.
2132 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
2134         * commands/videotest.c: Removed include to grub/machine/memory.h.
2136         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2137         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2138         (video_mod_SOURCES): Removed.
2139         (video_mod_CFLAGS): Likewise.
2140         (video_mod_LDFLAGS): Likewise.
2141         (gfxterm_mod_SOURCES): Likewise.
2142         (gfxterm_mod_CFLAGS): Likewise.
2143         (gfxterm_mod_LDFLAGS): Likewise.
2144         (videotest_mod_SOURCES): Likewise.
2145         (videotest_mod_CFLAGS): Likewise.
2146         (videotest_mod_LDFLAGS): Likewise.
2147         (bitmap_mod_SOURCES): Likewise.
2148         (bitmap_mod_CFLAGS): Likewise.
2149         (bitmap_mod_LDFLAGS): Likewise.
2150         (tga_mod_SOURCES): Likewise.
2151         (tga_mod_CFLAGS): Likewise.
2152         (tga_mod_LDFLAGS): Likewise.
2153         (jpeg_mod_SOURCES): Likewise.
2154         (jpeg_mod_CFLAGS): Likewise.
2155         (jpeg_mod_LDFLAGS): Likewise.
2156         (png_mod_SOURCES): Likewise.
2157         (png_mod_CFLAGS): Likewise.
2158         (png_mod_LDFLAGS): Likewise.
2160         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2161         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2162         (video_mod_SOURCES): Added.
2163         (video_mod_CFLAGS): Likewise.
2164         (video_mod_LDFLAGS): Likewise.
2165         (videotest_mod_SOURCES): Likewise.
2166         (videotest_mod_CFLAGS): Likewise.
2167         (videotest_mod_LDFLAGS): Likewise.
2168         (bitmap_mod_SOURCES): Likewise.
2169         (bitmap_mod_CFLAGS): Likewise.
2170         (bitmap_mod_LDFLAGS): Likewise.
2171         (tga_mod_SOURCES): Likewise.
2172         (tga_mod_CFLAGS): Likewise.
2173         (tga_mod_LDFLAGS): Likewise.
2174         (jpeg_mod_SOURCES): Likewise.
2175         (jpeg_mod_CFLAGS): Likewise.
2176         (jpeg_mod_LDFLAGS): Likewise.
2177         (png_mod_SOURCES): Likewise.
2178         (png_mod_CFLAGS): Likewise.
2179         (png_mod_LDFLAGS): Likewise.
2180         (gfxterm_mod_SOURCES): Likewise.
2181         (gfxterm_mod_CFLAGS): Likewise.
2182         (gfxterm_mod_LDFLAGS): Likewise.
2184         * term/gfxterm.c: Removed include to grub/machine/memory.h,
2185         grub/machine/console.h.
2187 2009-01-04  Jerone Young  <jerone@gmail.com>
2189         Make on screen instructions clearer
2191         Based on patch created by Jidanni <jidanni@jidanni.org>
2193         * normal/menu.c: print clearer instructions on the screen
2195 2009-01-02  Colin D Bennett  <colin@gibibit.com>
2197         New font engine.
2199         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2200         build system and fixed gfxterm.c to work with different sized fonts.
2202         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
2204         * configure: Re-generated.
2206         * DISTLIST: Removed font/manager.c.
2207         Added font/font.c.
2208         Added font/font_cmd.c.
2210         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
2211         compilation.
2213         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
2215         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
2217         * kern/term.c: Changed users of grub_utf8_to_ucs4.
2219         * normal/menu.c: Likewise.
2221         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2222         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
2224         * include/grub/font.h: Replaced with new file.
2226         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2227         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2228         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2229         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2230         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
2231         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
2232         fg_red, fg_green, fg_blue, fg_alpha.
2233         (grub_video_adapter): Removed blit_glyph.
2234         (grub_video_blit_glyph): Removed.
2236         * font/manager.c: Removed file.
2238         * font/font.c: New file.
2240         * font/font_cmd.c: Likewise.
2242         * video/video.c (grub_video_blit_glyph): Removed.
2244         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2245         (grub_video_vbe_map_rgba): Likewise.
2246         (grub_video_vbe_unmap_color_int): Likewise.
2247         (grub_video_vbe_blit_glyph): Removed.
2248         (grub_video_vbe_adapter): Removed blit_glyph.
2250         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2251         (get_pixel): Likewise.
2252         (set_pixel): Likewise.
2254         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
2256         * term/gfxterm.c: Adapted to new font engine.
2258         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
2260         * term/i386/pc/vga.c: Likewise.
2262         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
2264         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2266         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2268         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2270         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2272         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2274         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2276         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2278         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2280         * util/grub.d/00_header.in: Changed to use new loadfont command.
2282         * util/grub-mkconfig_lib.in: Changed font extension.
2284 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
2286         * util/getroot.c (grub_util_get_grub_dev): Add support for
2287         /dev/md/dNNpNN style partitionable mdraid devices.
2289 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
2291         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2292         at a time limit of the PXE TFTP API correctly.
2293         (grub_pxefs_close): Likewise.
2295 2008-11-29  Robert Millan  <rmh@aybabtu.com>
2297         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
2298         grub_ata_device_initialize() calls.
2300 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
2302         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2303         iteration failed.
2304         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2306 2008-11-28  Robert Millan  <rmh@aybabtu.com>
2308         Fix build on powerpc-ieee1275.  Based on patch created by
2309         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2310         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2311         `kern/ieee1275/mmap.c'.
2312         * include/grub/powerpc/ieee1275/memory.h: New file.
2314         Provide grub-install on coreboot.
2315         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2316         (grub_install_SOURCES): New variable.
2317         * util/i386/pc/grub-install.in: Add a few condition checks to make it
2318         usable on coreboot.
2320 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
2322         * util/grub-fstest.c (grub_term_get_current_input): Change return type
2323         to `grub_term_input_t'.
2324         (grub_term_get_current_output): Change return type to
2325         `grub_term_output_t'.
2327 2008-11-22  Robert Millan  <rmh@aybabtu.com>
2329         Fix breakage on coreboot due to declaration mismatch.
2330         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2331         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2332         grub_vga_text_cls().
2334         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
2335         comments.  Avoid copying one more byte than necessary (just in case).
2337         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2338         to 0x200000 (avoids trouble with some OFW implementations, and matches
2339         with the one in Yaboot).
2340         Reported by Manoel Abranches
2342 2008-11-20  Robert Millan  <rmh@aybabtu.com>
2344         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2345         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2347         * util/grub-mkconfig_lib.in (grub_warn): New function.
2348         (convert_system_path_to_grub_path): Use grub_warn() when issuing
2349         warnings, to obtain consistent formatting.
2350         * util/grub.d/00_header.in: Likewise.
2351         * util/update-grub_lib.in: Likewise.
2353         * loader/i386/linux.c (allocate_pages): Fix a warning.
2354         Move comment text to `#error' stanza.
2356         Harmonize ieee1275's grub_available_iterate() with the generic
2357         grub_machine_mmap_iterate() interface (fixes a recently-introduced
2358         build problem on i386-ieee1275):
2359         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2360         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
2361         parameter `type'.  Update all users of this function.
2362         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2363         `kern/ieee1275/mmap.c'.
2364         * kern/ieee1275/init.c
2365         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2366         with ...
2367         (grub_machine_mmap_iterate): ... this.
2368         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2369         return type to `grub_err_t'.  Update all implementations of this
2370         function prototype.
2371         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2372         Likewise.
2374         Add `lsmmap' command (lists firmware-provided memory map):
2375         * commands/lsmmap.c: New file.
2376         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2377         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2378         variables.
2379         * conf/powerpc-ieee1275.rmk: Likewise.
2380         * conf/i386-coreboot.rmk: Likewise.
2381         * conf/i386-ieee1275.rmk: Likewise.
2383 2008-11-19  Robert Millan  <rmh@aybabtu.com>
2385         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
2386         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2387         constraints to initrd allocation (based on code from
2388         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
2389         for Linux to find it.
2391 2008-11-14  Robert Millan  <rmh@aybabtu.com>
2393         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2394         order to cope with duplicate slashes.
2396 2008-11-14  Robert Millan  <rmh@aybabtu.com>
2398         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2399         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
2400         don't want to mess with lower memory, because it is used in the Linux
2401         loader.
2403         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
2404         an appropriate place in lower memory, between 0x10000 and 0x90000,
2405         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
2406         is in our heap (probably as a result of it being corrupted during
2407         decompression).  Add #error instance with comment to explain why this
2408         loader isn't currently usable on PC/BIOS.
2410 2008-11-14  Robert Millan  <rmh@aybabtu.com>
2412         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
2413         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
2415 2008-11-12  Robert Millan  <rmh@aybabtu.com>
2417         Make loader/i386/linux.c buildable on i386-pc (although disabled).
2419         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2420         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2421         from here ...
2422         * include/grub/i386/pc/memory.h: ... to here.
2424 2008-11-12  Robert Millan  <rmh@aybabtu.com>
2426         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2427         split).
2429         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2430         (grub_console_cur_color, grub_console_real_putchar)
2431         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2432         (grub_console_setcolorstate, grub_console_setcolor)
2433         (grub_console_getcolor): Move from here ...
2434         * include/grub/i386/vga_common.h: ... to here (new file).
2436         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2437         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2438         `<grub/i386/io.h>'.
2439         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2440         `<grub/i386/vga_common.h>'.
2442 2008-11-12  Robert Millan  <rmh@aybabtu.com>
2444         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2445         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2446         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2447         variables.
2448         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2449         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2451         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2452         grub_console_init() with call to grub_vga_text_init().
2453         (grub_machine_fini): Replace call to
2454         grub_console_fini() with call to grub_vga_text_fini() and
2455         grub_at_keyboard_fini().
2457         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2458         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2459         (grub_console_setcolorstate, grub_console_setcolor)
2460         (grub_console_getcolor): New function prototypes.
2462         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2463         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2464         (grub_vga_text_setcursor): Static-ize.
2465         (grub_vga_text_term): New structure.
2466         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2468         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2469         (grub_console_cur_color, grub_console_standard_color)
2470         (grub_console_normal_color, grub_console_highlight_color)
2471         (map_char, grub_console_putchar, grub_console_getcharwidth)
2472         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2473         (grub_console_getcolor): Move from here ...
2474         * term/i386/vga_common.c: ... to here (same function names).
2476 2008-11-12  Robert Millan  <rmh@aybabtu.com>
2478         Use newly-added Multiboot support in coreboot.
2480         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2481         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2483         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2484         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2485         (codestart): Store the MBI in `startup_multiboot_info' when we're
2486         being loaded using Multiboot.
2488         * kern/i386/coreboot/init.c (grub_machine_init): Move
2489         grub_at_keyboard_init() call to beginning of function (useful for
2490         debugging).  Call grub_machine_mmap_init() before attempting to use
2491         grub_machine_mmap_iterate().
2492         (grub_lower_mem, grub_upper_mem): Move from here ...
2493         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2494         here (new file).
2496         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2497         function prototype.
2499 2008-11-12  Robert Millan  <rmh@aybabtu.com>
2501         Fix a regression introduced by the at_keyboard.mod split.  Because
2502         some terminals are default on some platforms and non-default on
2503         others, the first terminal being registered determines which is
2504         going to be default.
2506         * kern/term.c (grub_term_register_input): If this is the first
2507         terminal being registered, set it as the current one.
2508         (grub_term_register_output): Likewise.
2510         * term/efi/console.c (grub_console_init): Do not call
2511         grub_term_set_current_output() or grub_term_set_current_input().
2512         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2513         * term/i386/pc/console.c (grub_console_init): Likewise.
2514         (grub_console_fini): Do not call grub_term_set_current_input()
2515         (but leave grub_term_set_current_output() to restore text mode).
2517 2008-11-10  Robert Millan  <rmh@aybabtu.com>
2519         * util/grub.d/00_header.in: Add backward compatibility check for
2520         versions of terminal.mod that don't understand `terminal_input' or
2521         `terminal_output'.
2523 2008-11-09  Robert Millan  <rmh@aybabtu.com>
2525         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2526         `terminal_input' / `terminal_output', not `terminal'.
2528 2008-11-08  Robert Millan  <rmh@aybabtu.com>
2530         * Makefile.in (include_DATA): Fix srcdir=. assumption.
2531         (DISTCLEANFILES): Add `build_env.mk'.
2533 2008-11-08  Robert Millan  <rmh@aybabtu.com>
2535         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
2536         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
2537         members.  Update all users.
2538         * util/console.c (grub_ncurses_term): Split in ...
2539         (grub_ncurses_term_input): ... this, and ...
2540         (grub_ncurses_term_output): ... this.  Update all users.
2541         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
2543 2008-11-08  Robert Millan  <rmh@aybabtu.com>
2545         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2546         (PKGDATA): Add $(pkgdata_SRCDIR).
2547         (pkglib_BUILDDIR): New variable.
2548         (pkgdata_SRCDIR): New variable.
2549         (build_env.mk): New target.
2550         (include_DATA): New variable.
2551         (install-local): Install $(include_DATA) files in $(includedir).
2553 2008-11-07  Pavel Roskin  <proski@gnu.org>
2555         * gendistlist.sh: Use C locale for sorting to ensure consistent
2556         output on all systems.
2558         * util/grub.d/00_header.in: Remove incorrect space before
2559         "serial".
2561 2008-11-07  Robert Millan  <rmh@aybabtu.com>
2563         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2564         per specification.
2565         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2566         * loader/multiboot_loader.c (find_multi_boot2_header): New function
2567         (based on find_multi_boot1_header).
2568         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2569         using find_multi_boot2_header(), and abort if neither Multiboot or
2570         Multiboot headers were found.
2572 2008-11-07  Robert Millan  <rmh@aybabtu.com>
2574         Modularize at_keyboard.mod:
2576         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2577         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2578         (at_keyboard_mod_LDFLAGS): New variables.
2580         Actual terminal split:
2582         * include/grub/term.h (struct grub_term): Split in ...
2583         (struct grub_term_input): ... this, and ...
2584         (struct grub_term_output): ... this.  Update all users.
2585         (grub_term_set_current): Split in ...
2586         (grub_term_set_current_input): ... this, and ...
2587         (grub_term_set_current_output): ... this.
2588         (grub_term_get_current): Split in ...
2589         (grub_term_get_current_input): ... this, and ...
2590         (grub_term_get_current_output): ... this.
2591         (grub_term_register): Split in ...
2592         (grub_term_register_input): ... this, and ...
2593         (grub_term_register_output): ... this.
2594         (grub_term_unregister): Split in ...
2595         (grub_term_unregister_input): ... this, and ...
2596         (grub_term_unregister_output): ... this.
2597         (grub_term_iterate): Split in ...
2598         (grub_term_iterate_input): ... this, and ...
2599         (grub_term_iterate_output): ... this.
2601         * kern/term.c (grub_term_list): Split in ...
2602         (grub_term_list_input): ... this, and ...
2603         (grub_term_list_output): ... this.  Update all users.
2604         (grub_cur_term): Split in ...
2605         (grub_cur_term_input): ... this, and ...
2606         (grub_cur_term_output): ... this.  Update all users.
2607         (grub_term_set_current): Split in ...
2608         (grub_term_set_current_input): ... this, and ...
2609         (grub_term_set_current_output): ... this.
2610         (grub_term_get_current): Split in ...
2611         (grub_term_get_current_input): ... this, and ...
2612         (grub_term_get_current_output): ... this.
2613         (grub_term_register): Split in ...
2614         (grub_term_register_input): ... this, and ...
2615         (grub_term_register_output): ... this.
2616         (grub_term_unregister): Split in ...
2617         (grub_term_unregister_input): ... this, and ...
2618         (grub_term_unregister_output): ... this.
2619         (grub_term_iterate): Split in ...
2620         (grub_term_iterate_input): ... this, and ...
2621         (grub_term_iterate_output): ... this.
2623         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2624         a check for input and one for output (and only attempt to get keys
2625         from user when input works).
2627         * util/grub-probe.c (grub_term_get_current): Split in ...
2628         (grub_term_get_current_input): ... this, and ...
2629         (grub_term_get_current_output): ... this.
2630         * util/grub-fstest.c: Likewise.
2631         * util/i386/pc/grub-setup.c: Likewise.
2632         * util/grub-editenv.c: Likewise.
2634         Portability adjustments:
2636         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2637         `term/i386/pc/at_keyboard.c'.
2638         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2639         grub_keyboard_controller_init() (now handled by terminal .init).
2640         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
2641         grub_at_keyboard_init().
2642         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
2643         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
2644         at_keyboard.mod via input terminal interface).
2645         * include/grub/i386/coreboot/console.h: Convert into a stub for
2646         `<grub/i386/pc/console.h>'.
2648         Migrate full terminals to new API:
2650         * term/efi/console.c (grub_console_term): Split into ...
2651         (grub_console_term_input): ... this, and ...
2652         (grub_console_term_output): ... this.  Update all users.
2653         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
2654         (grub_ofconsole_init): Split into ...
2655         (grub_ofconsole_init_input): ... this, and ...
2656         (grub_ofconsole_init_output): ... this.
2657         (grub_ofconsole_term): Split into ...
2658         (grub_ofconsole_term_input): ... this, and ...
2659         (grub_ofconsole_term_output): ... this.  Update all users.
2660         * term/i386/pc/serial.c (grub_serial_term): Split into ...
2661         (grub_serial_term_input): ... this, and ...
2662         (grub_serial_term_output): ... this.  Update all users.
2663         * term/i386/pc/console.c (grub_console_term): Split into ...
2664         (grub_console_term_input): ... this, and ...
2665         (grub_console_term_output): ... this.  Update all users.
2666         (grub_console_term_input): Only enable it on PC/BIOS platform.
2667         (grub_console_init): Remove grub_keyboard_controller_init() call.
2669         Migrate input terminals to new API:
2671         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
2672         `i386' and `i386/pc' to enable build on x86_64 (this driver is
2673         i386-specific anyway).
2674         (grub_console_checkkey): Rename to ...
2675         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
2676         users.
2677         (grub_keyboard_controller_orig): New variable.
2678         (grub_console_getkey): Rename to ...
2679         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
2680         users.
2681         (grub_keyboard_controller_init): Static-ize.  Save original
2682         controller value so that it can be restored ...
2683         (grub_keyboard_controller_fini): ... here (new function).
2684         (grub_at_keyboard_term): New structure.
2685         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
2686         functions.
2688         Migrate output terminals to new API:
2690         * term/i386/pc/vga.c (grub_vga_term): Change type to
2691         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
2692         members.  Update all users.
2693         * term/gfxterm.c (grub_video_term): Change type to
2694         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
2695         members.  Update all users.
2696         * include/grub/i386/pc/console.h (grub_console_checkkey)
2697         (grub_console_getkey): Do not export (no longer needed by gfxterm,
2698         etc).
2700         Migrate `terminal' command and userland tools to new API:
2702         * commands/terminal.c (grub_cmd_terminal): Split into ...
2703         (grub_cmd_terminal_input): ... this, and ...
2704         (grub_cmd_terminal_output): ... this.
2705         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
2706         `terminal_input' and `terminal_output'.
2707         * util/grub.d/00_header.in: Adjust `terminal' calls to new
2708         `terminal_input' / `terminal_output' API.
2709         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
2710         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
2711         provided ${GRUB_TERMINAL}, convert it).
2713 2008-11-04  Robert Millan  <rmh@aybabtu.com>
2715         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
2716         for FreeBSD.
2717         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
2719 2008-11-03  Bean  <bean123ch@gmail.com>
2721         * kern/elf.c (grub_elf32_load): Revert to previous code.
2722         (grub_elf64_load): Likewise.
2724         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
2726 2008-11-01  Robert Millan  <rmh@aybabtu.com>
2728         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
2729         (TARGET_CPPFLAGS): Likewise.
2730         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
2732 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
2734         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
2736 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
2738         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
2739         addition of objects until the code is not going to be able to fail.
2741 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
2743         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
2744         (add a missing NULL check, and correct them by moving the pointer
2745         operations after the actual check).
2747 2008-10-29  Robert Millan  <rmh@aybabtu.com>
2749         * util/i386/pc/grub-install.in: Handle empty string as output from
2750         make_system_path_relative_to_its_root().
2752 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
2754         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
2755         circular metadata worst case scenario. If the metadata is circular
2756         then copy the wrap in place.
2757         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
2758         project lib/format_text/layout.h
2759         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
2761 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
2763         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
2765 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
2767         * util/update-grub_lib.in: Mention filename in warning message.
2769 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
2771         * NEWS: Update for rename of update-grub to grub-mkconfig.
2773 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
2775         * util/update-grub_lib.in: Copy to ...
2776         * util/grub-mkconfig_lib.in: ... this.  Update all users.
2777         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
2778         * util/update-grub.in: Rename to ...
2779         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
2780         option. Add `--output' option to allow users to specify the generated
2781         configuration file.  Default to stdout.
2782         (update_grub_dir): Rename to ...
2783         (grub_mkconfig_dir): ... this.
2784         (grub_cfg): Default to an empty string.
2785         * conf/common.rmk (update-grub): Rename to ...
2786         (grub-mkconfig): ... this.
2787         (update-grub_lib): Copy to ...
2788         (grub-mkconfig_lib): ... this.
2789         (update-grub_SCRIPTS): Copy to ...
2790         (grub-mkconfig_SCRIPTS): ... this. Update all users.
2791         (update-grub_DATA): Rename to ...
2792         (grub-mkconfig_DATA): ... this.
2794 2008-09-28  Robert Millan  <rmh@aybabtu.com>
2796         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
2797         to `modified'.  Add the real `created' field.
2798         (grub_iso9660_uuid): Use `modified' rather than `created' for
2799         constructing the UUID.
2801 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
2803         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
2804         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
2806 2008-09-28  Bean  <bean123ch@gmail.com>
2808         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
2809         Thanks to Christian Franke for finding this bug.
2811 2008-09-25  Robert Millan  <rmh@aybabtu.com>
2813         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
2814         instances of grub_util_get_disk_name() (see previous commit).
2816 2008-09-25  Robert Millan  <rmh@aybabtu.com>
2818         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
2819         `util/i386/get_disk_name.c'.
2820         * conf/i386-efi.rmk: Likewise.
2821         * conf/x86_64-efi.rmk: Likewise.
2822         * conf/i386-coreboot.rmk: Likewise.
2823         * conf/i386-ieee1275.rmk: Likewise.
2824         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
2825         `util/ieee1275/get_disk_name.c'.
2826         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
2827         * util/ieee1275/get_disk_name.c: Remove file.
2828         * util/i386/get_disk_name.c: Remove file.
2829         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
2830         "hd%d" for device.map entries, rather than using
2831         grub_util_get_disk_name().
2833 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
2835         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
2836         warning.
2837         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
2839 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
2841         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
2842         Changed to 0x5100.
2843         (GRUB_TERM_PPAGE): Changed to 0x4900.
2845 2008-09-24  Robert Millan  <rmh@aybabtu.com>
2847         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
2848         macros (they were i386-pc specific).
2849         * include/grub/sparc64/ieee1275/console.h: Likewise.
2850         * include/grub/efi/console.h: Likewise.
2852 2008-09-22  Bean  <bean123ch@gmail.com>
2854         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
2855         resident and in attribute list.
2857         * include/grub/ntfs.h (BMP_LEN): Removed.
2859 2008-09-22  Bean  <bean123ch@gmail.com>
2861         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
2862         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
2864         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
2865         error occurs, as grub_disk_open will call grub_disk_close, which will
2866         call p->close (scsi).
2868 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
2870         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
2871         (AC_PREREQ): Bumped to 2.59.
2872         (AC_TRY_COMPILE): Replace obsolete macro with ...
2873         (AC_COMPILE_IFELSE): ... this.
2874         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
2875         (AC_LINK_IFELSE): ... this.
2877 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
2879         * autogen.sh: Add a call to `gendistlist.sh'.
2881 2008-09-19  Christian Franke  <franke@computer.org>
2883         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
2884         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
2885         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
2886         Export __enable_execute_stack() to modules.
2887         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
2888         New function.
2890 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
2892         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
2893         Sort the list.
2895 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
2897         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
2898         #include <grub/util/hostdisk.h>.
2900 2008-09-08  Robert Millan  <rmh@aybabtu.com>
2902         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
2903         segments when their filesz is zero (grub_file_read() interprets
2904         zero-size as "read until EOF", which results in memory corruption).
2905         Use `lowest_segment' rather than 0 for calculating the current
2906         segment load address.
2908 2008-09-08  Robert Millan  <rmh@aybabtu.com>
2910         * util/hostdisk.c (open_device): Replace a grub_util_info() call
2911         with grub_dprintf("hostdisk", ...), as it was so verbose that it
2912         clobbered useful information.
2914 2008-09-08  Robert Millan  <rmh@aybabtu.com>
2916         * include/grub/util/biosdisk.h: Move to ...
2917         * include/grub/util/hostdisk.h: ... here.  Update all users.
2918         * util/biosdisk.c: Move to ...
2919         * util/hostdisk.c: ... here.  Update all users.
2921 2008-09-07  Robert Millan  <rmh@aybabtu.com>
2923         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
2924         variables.
2925         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
2926         and length can be stored directly in the `mbi->mmap_addr' and
2927         `mbi->mmap_length' struct fields.
2929 2008-09-07  Robert Millan  <rmh@aybabtu.com>
2931         * conf/i386.rmk: New file.  Provides declaration for building
2932         `cpuid.mod'.
2933         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
2934         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
2935         variables.
2936         Include `conf/i386.mk'.
2937         * conf/i386-efi.rmk: Likewise.
2938         * conf/x86_64-efi.rmk: Likewise.
2939         * conf/i386-coreboot.rmk: Likewise.
2940         * conf/i386-ieee1275.rmk: Likewise.
2942 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
2944         Based on patch created by Colin D Bennett <colin@gibibit.com>.
2945         Adds optimization support for BGR based modes.
2947         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
2948         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2949         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2950         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2951         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2952         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2953         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2954         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2955         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2956         (grub_video_i386_vbeblit_index_index): Likewise.
2957         (grub_video_i386_vbeblit_replace_directN): Added.
2958         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
2959         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
2960         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
2961         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
2962         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
2963         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
2964         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
2965         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
2966         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
2967         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
2968         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
2969         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
2970         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
2972         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
2973         (grub_video_i386_vbefill_R8G8B8): Likewise.
2974         (grub_video_i386_vbefill_index): Likewise.
2975         (grub_video_i386_vbefill_direct32): Added.
2976         (grub_video_i386_vbefill_direct24): Likewise.
2977         (grub_video_i386_vbefill_direct16): Likewise.
2978         (grub_video_i386_vbefill_direct8): Likewise.
2980         * include/grub/video.h (grub_video_blit_format): Removed
2981         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
2982         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
2983         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
2984         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
2985         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
2987         * video/video.c (grub_video_get_blit_format): Updated to use new
2988         blit formats.  Added handling for 16 bit color modes.
2990         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
2991         fillers.
2992         (common_blitter): Updated to use new blitters.
2994         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
2995         Removed.
2996         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
2997         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2998         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2999         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3000         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3001         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3002         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3003         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3004         (grub_video_i386_vbeblit_index_index): Likewise.
3005         (grub_video_i386_vbeblit_replace_directN): Added.
3006         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3007         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3008         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3009         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3010         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3011         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3012         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3013         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3014         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3015         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3016         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3017         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3018         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3020         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3021         (grub_video_i386_vbefill_R8G8B8): Likewise.
3022         (grub_video_i386_vbefill_index): Likewise.
3023         (grub_video_i386_vbefill_direct32): Added.
3024         (grub_video_i386_vbefill_direct24): Likewise.
3025         (grub_video_i386_vbefill_direct16): Likewise.
3026         (grub_video_i386_vbefill_direct8): Likewise.
3028         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3029         types.
3031         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3032         types.
3034         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3035         blitter types.
3037         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3038         types.
3040 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
3042         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3043         RAID level 1.
3045 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
3047         * fs/iso9660.c (grub_iso9660_date): New structure.
3048         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3049         (grub_iso9660_uuid): New function.
3051 2008-09-05  Bean  <bean123ch@gmail.com>
3053         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3055         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3056         insensitive bit for names in Win32 and Win32 & DOS namespace.
3058         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3060         * include/grub/types.h (LONG_MAX): Likewise.
3062 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
3064         * util/getroot.c: Include <config.h>.
3065         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3066         add support for /dev/md/N devices and handle LVM double dash escaping.
3068 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
3070         * config.guess: Update to latest version from config git.
3071         * config.sub: Likewise.
3073 2008-09-03  Robert Millan  <rmh@aybabtu.com>
3075         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3076         `disk->total_sectors'.
3078 2008-09-01  Colin D Bennett  <colin@gibibit.com>
3080         * include/grub/normal.h: Fixed incorrect comment for
3081         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3083 2008-09-01  Colin D Bennett  <colin@gibibit.com>
3085         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3086         values with defines.
3088         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3089         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3090         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3091         (GRUB_VBE_MODEATTR_COLOR): Likewise.
3092         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3093         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3094         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3095         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3096         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3097         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3098         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3099         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3100         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3101         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3102         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3103         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3104         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3105         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3106         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3108 2008-08-31  Robert Millan  <rmh@aybabtu.com>
3110         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3111         declaration.
3112         (grub_multiboot): Fix a few warnings.
3114 2008-08-31  Robert Millan  <rmh@aybabtu.com>
3116         * loader/i386/pc/multiboot.c: Update comment not to say that
3117         boot_device support is unimplemented.
3119 2008-08-31  Robert Millan  <rmh@aybabtu.com>
3121         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3122         or memory map support are unimplemented.
3124 2008-08-31  Colin D Bennett  <colin@gibibit.com>
3126         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3128 2008-08-31  Colin D Bennett  <colin@gibibit.com>
3130         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3131         total video memory in 'vbeinfo' output; show color format details for
3132         each video mode.
3134 2008-08-30  Pavel Roskin  <proski@gnu.org>
3136         * util/genmoddep.c: Remove for real this time.
3137         * DISTLIST: Remove util/genmoddep.c.
3139 2008-08-30  Robert Millan  <rmh@aybabtu.com>
3141         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3142         as required by Multiboot spec (it was already 4-byte aligned, but
3143         only by chance).
3145 2008-08-29  Pavel Roskin  <proski@gnu.org>
3147         * kern/powerpc/ieee1275/crt0.S: Rename to ...
3148         * kern/powerpc/ieee1275/startup.S: ... this.
3149         * conf/powerpc-ieee1275.rmk: Adjust for the above.
3150         * DISTLIST: Likewise.
3152         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3153         grub/cpu/kernel.h.  Add start label for consistency with other
3154         platforms.  Add grub_prefix immediately after start.  Add jump
3155         to the code after grub_prefix.
3156         * include/grub/powerpc/kernel.h: Provide valid values for
3157         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3159 2008-08-29  Bean  <bean123ch@gmail.com>
3161         * configure.ac: Change host_os to cygwin for mingw.
3162         (asprintf): New check for function.
3164         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3165         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3167         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
3168         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
3169         sync, sleep and grub_util_get_disk_size for mingw.
3171         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3172         to get size in mingw.
3173         (open_device): Use flag O_BINARY if it's defined.
3174         (find_root_device): Add dummy code for mingw.
3176         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3177         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3178         (get_scsi_disk_name): Return 0 for mingw.
3180         * util/hostfs.c: #include <grub/util/misc.h>.
3181         (grub_hostfs_open): Use "rb" flag to open file, use
3182         grub_util_get_disk_size to get disk size for mingw.
3184         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3185         (asprintf): New function if HAVE_ASPRINTF is not set.
3186         (sync): New function for mingw.
3187         (sleep): Likewise.
3188         (grub_util_get_disk_size): Likewise.
3190 2008-08-28  Pavel Roskin  <proski@gnu.org>
3192         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3193         kern/time.c.
3195 2008-08-28  Robert Millan  <rmh@aybabtu.com>
3197         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3199 2008-08-28  Robert Millan  <rmh@aybabtu.com>
3201         Change find_grub_drive() syntax so it doesn't prevent it from
3202         detecting NULL names as errors.
3204         * util/biosdisk.c (find_grub_drive): Move free slot search code
3205         from here ...
3206         (find_free_slot): ... to here.
3207         (read_device_map): Use find_free_slot() to search for free slots.
3209 2008-08-27  Marco Gerards  <marco@gnu.org>
3211         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3212         (scsi_mod_SOURCES): New variable.
3213         (scsi_mod_CFLAGS): Likewise
3214         (scsi_mod_LDFLAGS): Likewise.
3216         * disk/scsi.c: New file.
3218         * include/grub/scsi.h: Likewise.
3220         * include/grub/scsicmd.h: Likewise.
3222         * disk/ata.c: Include <grub/scsi.h>.
3223         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3224         instead.
3225         (grub_ata_iterate): Skip ATAPI devices.
3226         (grub_ata_open): Only handle ATAPI devices.
3227         (struct grub_atapi_read): Removed.
3228         (grub_atapi_readsector): Likewise.
3229         (grub_ata_read): No longer handle ATAPI devices.
3230         (grub_ata_write): Likewise.
3231         (grub_atapi_iterate): New function.
3232         (grub_atapi_read): Likewise.
3233         (grub_atapi_write): Likewise.
3234         (grub_atapi_open): Likewise.
3235         (grub_atapi_close): Likewise.
3236         (grub_atapi_dev): New variable.
3237         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3238         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3240         * include/grub/disk.h (enum grub_disk_dev_id): Add
3241         `GRUB_DISK_DEVICE_SCSI_ID'.
3243 2008-08-26  Robert Millan  <rmh@aybabtu.com>
3245         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3246         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3247         descriptive.
3249 2008-08-23  Bean  <bean123ch@gmail.com>
3251         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3252         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3253         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3254         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3255         dm_nv.mod.
3256         (raid5rec_mod_SOURCES): New macro.
3257         (raid5rec_mod_CFLAGS): Likewise.
3258         (raid5rec_mod_LDFLAGS): Likewise.
3259         (raid6rec_mod_SOURCES): Likewise.
3260         (raid6rec_mod_CFLAGS): Likewise.
3261         (raid6rec_mod_LDFLAGS): Likewise.
3262         (mdraid_mod_SOURCES): Likewise.
3263         (mdraid_mod_CFLAGS): Likewise.
3264         (mdraid_mod_LDFLAGS): Likewise.
3265         (dm_nv_mod_SOURCES): Likewise.
3266         (dm_nv_mod_CFLAGS): Likewise.
3267         (dm_nv_mod_LDFLAGS): Likewise.
3269         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3270         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
3271         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3273         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3274         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3276         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3278         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3280         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3282         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3284         * disk/raid5_recover.c: New file.
3286         * disk/raid6_recover.c: Likewise.
3288         * disk/mdraid_linux.c: Likewise.
3290         * disk/dmraid_nvidia.c: Likewise.
3292         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3293         ULONG_MAX.
3295         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3296         calculate the size of raid device.
3297         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3298         different layout of raid5.
3299         (grub_raid_scan_device): Remove code specific to mdraid.
3300         (grub_raid_list): New variable.
3301         (free_array): New function.
3302         (grub_raid_register): Likewise.
3303         (grub_raid_unregister): Likewise.
3304         (grub_raid_rescan): Likewise.
3305         (GRUB_MOD_INIT): Don't iterate device here.
3306         (GRUB_MOD_FINI): Use free_array to release resource.
3308         * include/grub/raid.h: Remove macro and structure specific to mdraid.
3309         (grub_raid5_recover_func_t): New function variable type.
3310         (grub_raid6_recover_func_t): Likewise.
3311         (grub_raid5_recover_func): New variable.
3312         (grub_raid6_recover_func): Likewise.
3313         (grub_raid_register): New function.
3314         (grub_raid_unregister): Likewise.
3315         (grub_raid_rescan): Likewise.
3316         (grub_raid_block_xor): Likewise.
3318         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3319         (CMD_CRC): New macro.
3320         (part): Removed.
3321         (read_file): Handle device as well as file.
3322         (cmd_crc): New function.
3323         (fstest): Handle multiple disks.
3324         (options): Remove part, raw and long, add root and diskcount.
3325         (usage): Add crc, remove -p, -r, -l, add -r and -c.
3326         (main): Find the first non option entry and ignore subsequent options,
3327         add handling for the new options, support multiple disks.
3329         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3331 2008-08-23  Bean  <bean123ch@gmail.com>
3333         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3335         * genfslist.sh: Ignore kernel.mod.
3337         * genpartmaplist.sh: Likewise.
3339 2008-08-23  Robert Millan  <rmh@aybabtu.com>
3341         * util/getroot.c (find_root_device): Skip anything that starts with
3342         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
3344 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
3346         * util/update-grub.in (GRUB_GFXMODE): Export variable.
3347         * util/grub.d/00_header.in: Allow the administrator to change default
3348         gfxmode via ${GRUB_GFXMODE}.
3350 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
3352         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3354 2008-08-21  Robert Millan  <rmh@aybabtu.com>
3356         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
3357         loader.
3358         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3359         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3361 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
3363         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3364         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3366 2008-08-19  Robert Millan  <rmh@aybabtu.com>
3368         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3369         (struct grub_virtual_screen): Remove `cursor_color'.
3370         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3371         initialization.
3372         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3374 2008-08-18  Robert Millan  <rmh@aybabtu.com>
3376         Unify (identical) linux_normal.c files.
3377         * loader/i386/efi/linux_normal.c: Move from here ...
3378         * loader/linux_normal.c: ... to here.  Update all users.
3379         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
3380         * loader/i386/ieee1275/linux_normal.c: Likewise.
3382 2008-08-18  Robert Millan  <rmh@aybabtu.com>
3384         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3385         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3386         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3387         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3388         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3389         New macros.
3390         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3391         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3392         (GRUB_LINUX_CL_END_OFFSET): ... to here.
3393         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3394         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
3395         (GRUB_EFI_CL_END_OFFSET): Rename to ...
3396         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
3397         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3398         Initialize `params->video_cursor_x' and `params->video_cursor_y'
3399         portably using grub_getxy().
3400         Replace `-EFI' with `-bzImage' in boot message.
3402 2008-08-17  Robert Millan  <rmh@aybabtu.com>
3404         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3406 2008-08-17  Robert Millan  <rmh@aybabtu.com>
3408         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3410         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3411         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3412         (grub_machine_mmap_iterate): New function declaration.
3413         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3414         structure.
3415         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3416         macros.
3418         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3419         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3420         Move e820 parsing from here ...
3421         * kern/i386/pc/mmap.c: New file.
3422         (grub_machine_mmap_iterate): ... to here.
3424         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3425         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3426         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
3427         (grub_available_iterate): Redeclare to return `void', and redeclare
3428         its hook to use grub_uint64_t as addr and size parameters, and rename
3429         to ...
3430         (grub_machine_mmap_iterate): ... this.  Update all users.
3432         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3433         to make it more readable.  Rename to ...
3434         (grub_machine_mmap_iterate): ... this.
3436         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3437         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3438         (grub_multiboot): Allocate an extra region after the payload, and fill
3439         it with a Multiboot memory map.  Adjust a.out loader to calculate size
3440         with the extra space.
3441         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3442         with the extra space.
3444 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
3446         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
3448 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
3450         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3451         mdate-sh to the list `find' searches for.
3452         * DISTLIST: Regenerated.
3454 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
3456         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3457         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
3458         genmoddep.awk, gensymlist.sh.in.
3459         (DISTDIRS): Add bus, docs, hook, lib.
3460         * DISTLIST: Regenerated.
3461         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
3463 2008-08-16  Robert Millan  <rmh@aybabtu.com>
3465         * disk/raid.c (grub_raid_init): Handle/report errors set by
3466         grub_device_iterate().
3467         * disk/lvm.c (grub_lvm_init): Likewise.
3469 2008-08-15  Bean  <bean123ch@gmail.com>
3471         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3472         and datehook.mod.
3473         (datetime_mod_SOURCES): New macro.
3474         (datetime_mod_CFLAGS): Likewise.
3475         (datetime_mod_LDFLAGS): Likewise.
3476         (date_mod_SOURCES): Likewise.
3477         (date_mod_CFLAGS): Likewise.
3478         (date_mod_LDFLAGS): Likewise.
3479         (datehook_mod_SOURCES): Likewise.
3480         (datehook_mod_CFLAGS): Likewise.
3481         (datehook_mod_LDFLAGS): Likewise.
3483         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3484         and datehook.mod.
3485         (datetime_mod_SOURCES): New macro.
3486         (datetime_mod_CFLAGS): Likewise.
3487         (datetime_mod_LDFLAGS): Likewise.
3488         (date_mod_SOURCES): Likewise.
3489         (date_mod_CFLAGS): Likewise.
3490         (date_mod_LDFLAGS): Likewise.
3491         (datehook_mod_SOURCES): Likewise.
3492         (datehook_mod_CFLAGS): Likewise.
3493         (datehook_mod_LDFLAGS): Likewise.
3495         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3496         and datehook.mod.
3497         (datetime_mod_SOURCES): New macro.
3498         (datetime_mod_CFLAGS): Likewise.
3499         (datetime_mod_LDFLAGS): Likewise.
3500         (date_mod_SOURCES): Likewise.
3501         (date_mod_CFLAGS): Likewise.
3502         (date_mod_LDFLAGS): Likewise.
3503         (datehook_mod_SOURCES): Likewise.
3504         (datehook_mod_CFLAGS): Likewise.
3505         (datehook_mod_LDFLAGS): Likewise.
3507         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3508         and datehook.mod.
3509         (datetime_mod_SOURCES): New macro.
3510         (datetime_mod_CFLAGS): Likewise.
3511         (datetime_mod_LDFLAGS): Likewise.
3512         (date_mod_SOURCES): Likewise.
3513         (date_mod_CFLAGS): Likewise.
3514         (date_mod_LDFLAGS): Likewise.
3515         (datehook_mod_SOURCES): Likewise.
3516         (datehook_mod_CFLAGS): Likewise.
3517         (datehook_mod_LDFLAGS): Likewise.
3519         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3520         and datehook.mod.
3521         (datetime_mod_SOURCES): New macro.
3522         (datetime_mod_CFLAGS): Likewise.
3523         (datetime_mod_LDFLAGS): Likewise.
3524         (date_mod_SOURCES): Likewise.
3525         (date_mod_CFLAGS): Likewise.
3526         (date_mod_LDFLAGS): Likewise.
3527         (datehook_mod_SOURCES): Likewise.
3528         (datehook_mod_CFLAGS): Likewise.
3529         (datehook_mod_LDFLAGS): Likewise.
3531         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3533         * commands/date.c: New file.
3535         * hook/datehook.c: Likewise.
3537         * include/grub/lib/datetime.h: Likewise.
3539         * include/grub/i386/cmos.h: Likewise.
3541         * lib/datetime.c: Likewise.
3543         * lib/i386/datetime.c: Likewise.
3545         * lib/efi/datetime.c: Likewise.
3547 2008-08-14  Robert Millan  <rmh@aybabtu.com>
3549         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3550         (grub_mkelfimage_SOURCES): New variable.
3551         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3553         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3554         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3555         * conf/powerpc-ieee1275.rmk: Likewise.
3556         * conf/i386-ieee1275.rmk: Likewise.
3558         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3559         * kern/i386/coreboot/init.c: Likewise.
3561         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3562         with `<grub/cpu/kernel.h>'.
3563         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3564         to ...
3565         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3566         * kern/i386/coreboot/startup.S: Likewise.
3568         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3569         (GRUB_MOD_GAP): Remove.
3570         * include/grub/powerpc/kernel.h: New file.
3571         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3572         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3573         * include/grub/i386/kernel.h: New file.
3574         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3575         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3576         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3578         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3579         `grub-mkelfimage'.
3580         Use --directory when invoking grub_mkimage.
3582         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3583         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3584         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3585         and GRUB_KERNEL_CPU_PREFIX.
3587 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
3589         * include/grub/err.h (grub_err_printf): New function prototype.
3590         * util/misc.c (grub_err_printf): New function.
3591         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3592         grub_printf.
3593         * kern/err.c (grub_print_error): Use grub_err_printf.
3595 2008-08-13  Robert Millan  <rmh@aybabtu.com>
3597         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3599 2008-08-13  Robert Millan  <rmh@aybabtu.com>
3601         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3602         boot entry.
3604 2008-08-12  Robert Millan  <rmh@aybabtu.com>
3606         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3607         of the relocation code from here ...
3608         (grub_multiboot): ... to here.
3609         (forward_relocator, backward_relocator): Move from here ...
3610         * kern/i386/loader.S (grub_multiboot_forward_relocator)
3611         (grub_multiboot_backward_relocator): ... to here.
3612         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
3613         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
3614         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3615         (grub_multiboot_forward_relocator_end)
3616         (grub_multiboot_backward_relocator)
3617         (grub_multiboot_backward_relocator_end): New variables.
3619 2008-08-12  Bean  <bean123ch@gmail.com>
3621         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3623 2008-08-11  Robert Millan  <rmh@aybabtu.com>
3625         * kern/i386/linuxbios/startup.S: Move from here ...
3626         * kern/i386/coreboot/startup.S: ... to here.
3628         * kern/i386/linuxbios/init.c: Move from here ...
3629         * kern/i386/coreboot/init.c: ... to here.
3631         * kern/i386/linuxbios/table.c: Move from here ...
3632         * kern/i386/coreboot/mmap.c: ... to here.
3634         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3636 2008-08-11  Robert Millan  <rmh@aybabtu.com>
3638         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3639         errors.  Leave it to the upper layer to handle them.
3641 2008-08-09  Christian Franke  <franke@computer.org>
3643         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
3644         * conf/common.rmk: Install `grub-pe2elf' only if requested.
3645         Install `grub.d/10_windows' only on Cygwin.
3646         * configure.ac: Add subst of `target_os'.
3647         Check `target_os' also before setting TARGET_OBJ2ELF.
3648         Add `--enable-grub-pe2elf'.
3650 2008-08-08  Robert Millan  <rmh@aybabtu.com>
3652         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3653         (grub_last_time): Change type to grub_uint64_t.
3654         (grub_disk_open): Migrate code from to using grub_get_time_ms().
3655         (grub_disk_close): Likewise.
3657         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
3658         (run_menu): Migrate code from to using grub_get_time_ms().
3660         * util/misc.c (grub_get_time_ms): New function.
3662 2008-08-08  Marco Gerards  <marco@gnu.org>
3664         * disk/ata.c (grub_ata_regget): Change return type to
3665         `grub_uint8_t'.
3666         (grub_ata_regget2): Likewise.
3667         (grub_ata_wait_status): New function.
3668         (grub_ata_wait_busy): Removed function, updated all users to use
3669         `grub_ata_wait_status'.
3670         (grub_ata_wait_drq): Likewise.
3671         (grub_ata_cmd): New function.
3672         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
3673         error handling.
3674         (grub_ata_pio_write): Add error handling.
3675         (grub_atapi_identify): Likewise.
3676         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
3677         handling.
3678         (grub_ata_identify): Use `grub_ata_cmd' and improve error
3679         handling.  Actually use the detected registers.  Reorder the
3680         detection logic such that it is easier to read.
3681         (grub_ata_pciinit): Do not assign the same ID to each controller.
3682         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
3683         handling.
3684         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
3686         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
3688 2008-08-08  Marco Gerards  <marco@gnu.org>
3690         * NEWS: Update.
3692 2008-08-07  Bean  <bean123ch@gmail.com>
3694         * include/grub/x86_64/pci.h: New file.
3696 2008-08-07  Christian Franke  <franke@computer.org>
3698         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
3699         (TIMER2_GATE): Likewise.
3700         (grub_pit_wait): Add enable/disable of the timer2 gate
3701         bit of port 0x61.  This fixes a possible infinite loop.
3703 2008-08-07  Bean  <bean123ch@gmail.com>
3705         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
3706         kern/i386/tsc.c and kern/i386/pit.c.
3708         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
3709         x86_64 platform.
3711         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
3712         <grub/i386/tsc.h>.
3714         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
3716 2008-08-07  Bean  <bean123ch@gmail.com>
3718         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
3720         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
3722         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
3723         multiple inclusion. Add #include <grub/types.h>.
3725 2008-08-06  Christian Franke  <franke@computer.org>
3727         * conf/common.rmk: Build and install `10_windows'.
3728         * util/grub.d/10_windows.in: New script.
3730 2008-08-06  Pavel Roskin  <proski@gnu.org>
3732         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
3734 2008-08-06  Robert Millan  <rmh@aybabtu.com>
3736         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
3737         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
3739 2008-08-06  Bean  <bean123ch@gmail.com>
3741         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
3742         (grub_pxefs_fs_int): Remove dummy definition.
3743         (grub_pxefs_open): Use data->block_size to store the current block
3744         size setting.
3745         (grub_pxefs_read): Use block size stored in data->block_size. As the
3746         value of grub_pxe_blksize can be changed after the file is opened.
3748 2008-08-06  Bean  <bean123ch@gmail.com>
3750         * fs/i386/pc/pxe.c (curr_file): new variable.
3751         (grub_pxefs_open): Simply the handling of pxe file system. Don't
3752         require the dummy internal file system anymore.
3753         (grub_pxefs_read): Removed.
3754         (grub_pxefs_close): Likewise.
3755         (grub_pxefs_fs_int): Likewise.
3756         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
3757         connection when we switch file.
3758         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
3760 2008-08-06  Robert Millan  <rmh@aybabtu.com>
3762         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
3763         `halt.mod'.
3764         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
3765         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
3767         * kern/i386/halt.c: New file.
3768         * kern/i386/reboot.c: Likewise.
3769         * include/grub/i386/reboot.h: Likewise.
3770         * include/grub/i386/halt.h: Likewise.
3772         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
3773         Include `<grub/cpu/halt.h>'.
3774         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
3775         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
3777         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
3778         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
3779         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
3780         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
3781         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
3782         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
3783         from here ...
3784         * include/grub/i386/at_keyboard.h: ... to here.
3786 2008-08-05  Robert Millan  <rmh@aybabtu.com>
3788         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
3789         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
3790         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
3791         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3792         `kern/generic/millisleep.c'.
3794         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
3795         instead of grub_get_rtc().
3796         (grub_tsc_init): Initialize `tsc_boot_time'.
3798         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
3799         (grub_machine_init): Use grub_tsc_init() rather than
3800         installing an RTC-based handler via grub_install_get_time_ms().
3802         * kern/i386/pit.c: New file.
3803         * include/grub/i386/pit.h: Likewise.
3805 2008-08-05  Bean  <bean123ch@gmail.com>
3807         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
3809         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
3810         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
3811         (pxe_mod_SOURCES): New macro.
3812         (pxe_mod_CFLAGS): Likewise.
3813         (pxe_mod_LDFLAGS): Likewise.
3814         (pxecmd_mod_SOURCES): Likewise.
3815         (pxecmd_mod_CFLAGS): Likewise.
3816         (pxecmd_mod_LDFLAGS): Likewise.
3818         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
3819         (grub_pxe_call): Likewise.
3821         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
3823         * commands/i386/pc/pxecmd.c: New file.
3825         * fs/i386/pc/pxe.c: Likewise.
3827         * include/grub/i386/pc/pxe.h: Likewise.
3829 2008-08-05  Bean  <bean123ch@gmail.com>
3831         * util/console.c (grub_console_cur_color): New variable.
3832         (grub_console_standard_color): Likewise.
3833         (grub_console_normal_color): Likewise.
3834         (grub_console_highlight_color): Likewise.
3835         (color_map): Likewise.
3836         (use_color): Likewise.
3837         (NUM_COLORS): New macro.
3838         (grub_ncurses_setcolorstate): Handle color properly.
3839         (grub_ncurses_setcolor): Don't change color here, just remember the
3840         settings, color will be set in grub_ncurses_setcolorstate.
3841         (grub_ncurses_getcolor): New function.
3842         (grub_ncurses_init): Initialize color pairs.
3843         (grub_ncurses_term): New member grub_ncurses_getcolor.
3845 2008-08-05  Colin D Bennett  <colin@gibibit.com>
3847         High resolution timer support.  Implemented for x86 CPUs using TSC.
3848         Extracted generic grub_millisleep() so it's linked in only as needed.
3849         This requires a Pentium compatible CPU; if the RDTSC instruction is
3850         not supported, then it falls back on the generic grub_get_time_ms()
3851         implementation that uses the machine's RTC.
3853         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
3854         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
3855         `kern/generic/millisleep.c'.
3857         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
3858         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
3860         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
3861         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
3863         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3865         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3866         `kern/generic/millisleep.c'.
3868         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3870         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
3872         * kern/generic/rtc_get_time_ms.c: New file.
3874         * kern/generic/millisleep.c: New file.
3876         * kern/misc.c: Don't include
3877         <kern/time.h> anymore.
3878         (grub_millisleep_generic): Removed.
3880         * commands/sleep.c (grub_interruptible_millisleep): Uses
3881         grub_get_time_ms() instead of grub_get_rtc().
3883         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
3884         function.
3885         (grub_cpu_is_cpuid_supported): New inline function.
3886         (grub_cpu_is_tsc_supported): New inline function.
3887         (grub_tsc_init): New function prototype.
3888         (grub_tsc_get_time_ms): New function prototype.
3890         * kern/i386/tsc.c (grub_get_time_ms): New file.
3892         * include/grub/time.h: Include <grub/types.h.
3893         (grub_millisleep_generic): Removed.
3894         (grub_get_time_ms): New prototype.
3895         (grub_install_get_time_ms): New prototype.
3896         (grub_rtc_get_time_ms): New prototype.
3898         * kern/time.c (grub_get_time_ms): New function.
3899         (grub_install_get_time_ms): New function.
3901         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
3902         <grub/time.h> anymore.
3903         (grub_millisleep): Removed.
3904         (grub_machine_init): Call grub_tsc_init.
3906         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
3907         get_time_ms() implementation.
3909         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
3910         (ieee1275_get_time_ms): New function.
3911         (grub_machine_init): Install get_time_ms() implementation.
3913         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
3914         (grub_machine_init): Call grub_tsc_init().
3915         (grub_millisleep): Removed.
3917         * kern/ieee1275/init.c (grub_millisleep): Removed.
3918         (grub_machine_init): Install ieee1275_get_time_ms()
3919         implementation.
3920         (ieee1275_get_time_ms): New function.
3921         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
3922         real work.
3924 2008-08-05  Marco Gerards  <marco@gnu.org>
3926         * disk/ata.c: Include <grub/pci.h>.
3927         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
3928         (grub_ata_initialize): Rewritten.
3929         (grub_ata_device_initialize): New function.
3931 2008-08-04  Pavel Roskin  <proski@gnu.org>
3933         * kern/main.c: Include grub/mm.h.
3935 2008-08-04  Robert Millan  <rmh@aybabtu.com>
3937         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
3938         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
3939         corruption problem).
3941 2008-08-04  Robert Millan  <rmh@aybabtu.com>
3943         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
3944         warnings introduced in my last commit.
3946 2008-08-03  Robert Millan  <rmh@aybabtu.com>
3948         Make PCI available on all i386 architectures.
3950         * include/grub/i386/pc/pci.h: Move from here ...
3951         * include/grub/i386/pci.h: ... to here.
3953         * include/grub/i386/pc/pci.h: Remove.
3954         * include/grub/i386/efi/pci.h: Remove.
3955         * include/grub/x86_64/efi/pci.h: Remove.
3957         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
3958         `<grub/cpu/pci.h>'.
3960         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
3961         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
3962         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
3964         * conf/i386-ieee1275.rmk: Likewise.
3966 2008-08-03  Robert Millan  <rmh@aybabtu.com>
3968         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
3969         (grub_console_setcursor): Make it possible to set cursor off.
3971 2008-08-03  Robert Millan  <rmh@aybabtu.com>
3973         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
3974         of modules instead of assuming which platform provides what.
3975         * util/update-grub.in: Likewise.
3977 2008-08-03  Robert Millan  <rmh@aybabtu.com>
3979         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
3980         instead of `grub_install_dos_part' to determine whether a drive needs
3981         to be prepended to prefix (`grub_install_dos_part' is not reliable,
3982         because it can be overridden when loading GRUB via Multiboot).
3984 2008-08-02  Robert Millan  <rmh@aybabtu.com>
3986         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
3988 2008-08-02  Robert Millan  <rmh@aybabtu.com>
3990         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
3991         of informational grub_dprintf() calls.
3993 2008-08-02  Robert Millan  <rmh@aybabtu.com>
3995         * disk/memdisk.c (memdisk_size): Don't initialize.
3996         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
3998         * include/grub/i386/pc/kernel.h
3999         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4000         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4001         (grub_memdisk_image_size, grub_arch_memdisk_addr)
4002         (grub_arch_memdisk_size): Remove.
4004         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4005         field (was only used to transfer a constant).  Add `type' field to
4006         support multiple module types.
4007         (grub_module_iterate): New function.
4009         * kern/device.c (grub_device_open): Do not hide error messages
4010         when grub_disk_open() fails.  Use grub_print_error() instead.
4012         * kern/i386/pc/init.c (grub_arch_modules_addr)
4013         (grub_arch_memdisk_size): Remove functions.
4014         (grub_arch_modules_addr): Return the module address in high memory
4015         (now that it isn't copied anymore).
4017         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4018         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4019         decompression routine (grub_total_module_size already includes that
4020         now).  Don't copy modules back to low memory.
4022         * kern/main.c: Include `<grub/mm.h>'.
4023         (grub_load_modules): Split out (and use) ...
4024         (grub_module_iterate): ... this function, which iterates through
4025         module objects and runs a hook.
4026         Comment out grub_mm_init_region() call, as it would cause non-ELF
4027         modules to be overwritten.
4029         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4030         the memdisk image in its own region, make it part of the module list.
4031         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4032         (main): Parse --memdisk|-m option, and pass user-provided path as
4033         parameter to generate_image().
4034         (add_segments): Pass `memdisk_path' down to load_modules().
4035         (load_modules): Embed memdisk image in module section when requested.
4036         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4037         `header.type' instead of `header.offset'.
4039         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4040         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4041         (memdisk_mod_LDFLAGS): New variables.
4042         * conf/i386-coreboot.rmk: Likewise.
4043         * conf/i386-ieee1275.rmk: Likewise.
4045 2008-08-02  Robert Millan  <rmh@aybabtu.com>
4047         * loader/i386/pc/multiboot.c (playground, forward_relocator)
4048         (backward_relocator): New variables.  Used to allocate and relocate
4049         the payload, respectively.
4050         (grub_multiboot_load_elf32): Load into heap instead of requested
4051         address, install the appropriate relocator code in each bound of
4052         the payload, and set the entry point such that
4053         grub_multiboot_real_boot() will jump to one of them.
4055         * kern/i386/loader.S (grub_multiboot_payload_size)
4056         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4057         (grub_multiboot_payload_entry_offset): New variables.
4058         (grub_multiboot_real_boot): Set cpu context to what the relocator
4059         expects, and jump to the relocator instead of the payload.
4061         * include/grub/i386/loader.h (grub_multiboot_payload_size)
4062         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4063         (grub_multiboot_payload_entry_offset): Export.
4065 2008-08-01  Bean  <bean123ch@gmail.com>
4067         * normal/menu_entry.c (editor_getline): Don't return the original
4068         string as result, as it will be released by lexer once it has done
4069         using it.
4071 2008-08-01  Robert Millan  <rmh@aybabtu.com>
4073         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4074         within menuentries, not before them.
4075         util/grub.d/10_hurd.in: Likewise.
4077 2008-08-01  Bean  <bean123ch@gmail.com>
4079         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4080         (bufio_mod_SOURCES): New macro.
4081         (bufio_mod_CFLAGS): Likewise.
4082         (bufio_mod_LDFLAGS): Likewise.
4084         * include/grub/bufio.h: New file.
4086         * io/bufio.c: Likewise.
4088         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4089         (grub_video_reader_png): Use grub_buffile_open to open file.
4091         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4092         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4094         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4095         (grub_video_reader_tga): Use grub_buffile_open to open file.
4097         * font/manager.c: Include <grub/bufio.h>.
4098         (add_font): Use grub_buffile_open to open file.
4100 2008-07-31  Robert Millan  <rmh@aybabtu.com>
4102         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4103         ELF segments, use a macro for arbitrarily accessing any of them instead
4104         of preparing a pointer that allows access to one at a time.
4105         (grub_multiboot_load_elf64): Likewise.
4107 2008-07-31  Bean  <bean123ch@gmail.com>
4109         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4110         GRUB_KERNEL_MACHINE_DATA_END.
4112 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4114         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4115         Increase from 0x50 to 0x60.
4116         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4117         use UUIDs to identify the root drive for them.  If that's not
4118         possible, abort.
4119         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4120         check, for cross-disk installs.
4122 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4124         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4125         is non-empty, use it to set the `prefix' environment variable instead
4126         of the usual approach.
4127         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4128         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4129         environment variable instead of dummy make_install_device().
4131         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4132         (start): Insert a data section, with `grub_prefix' variable.
4133         * kern/i386/linuxbios/startup.S: Likewise.
4135         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4136         New variable reference.
4137         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4138         New macro.  Defines offset of `grub_prefix' within startup.S (relative
4139         to `start').
4140         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
4141         section within startup.S (relative to `start').
4142         * include/grub/i386/coreboot/kernel.h: Likewise.
4144         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4145         Overwrite grub_prefix with its contents, at the beginning of the
4146         first segment.
4147         (main): Understand -p|--prefix.
4149 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4151         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4153 2008-07-30  Robert Millan  <rmh@aybabtu.com>
4155         * term/i386/pc/vga_text.c (grub_console_cls): Use
4156         grub_console_gotoxy() to go back to beginning of the screen.
4157         Found by Patrick Georgi <patrick.georgi@coresystems.de>
4159 2008-07-29  Christian Franke  <franke@computer.org>
4161         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4162         Add conversion of emulated mount points on Cygwin.
4164 2008-07-29  Christian Franke  <franke@computer.org>
4166         * util/update-grub.in: Add a check for admin
4167         group on Cygwin.
4168         Remove old `grub.cfg.new' before creation.
4169         Add `-f' to `mv' to handle the different filesystem
4170         semantics of Windows.
4172 2008-07-29  Bean  <bean123ch@gmail.com>
4174         * normal/main.c (get_line): Fix buffer overflow bug.
4176 2008-07-28  Robert Millan  <rmh@aybabtu.com>
4178         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4179         (struct grub_apple_header): New struct.  Describes the layout of
4180         the partmap header.
4181         (apple_partition_map_iterate): Check the header magic as well as the
4182         partition magic (which was already being checked).
4184 2008-07-28  Pavel Roskin  <proski@gnu.org>
4186         * genmk.rb: Add a warning to the beginning of the output that
4187         it's a generated file and should not be edited.
4189 2008-07-28  Robert Millan  <rmh@aybabtu.com>
4191         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4192         with the same number are found, just use issue a warning with
4193         grub_dprintf(), as this error has been reported to be non-fatal.
4195 2008-07-27  Robert Millan  <rmh@aybabtu.com>
4197         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4198         information.
4200 2008-07-27  Bean  <bean123ch@gmail.com>
4202         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4203         (grub_fat_find_dir): Ignore case when comparing filename.
4205 2008-07-27  Bean  <bean123ch@gmail.com>
4207         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4208         smallino, as it's more descriptive, and i8count can be confused with
4209         the other field count.
4210         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4211         inode type.
4213 2008-07-27  Bean  <bean123ch@gmail.com>
4215         * commands/crc.c: New file.
4217         * lib/crc.c: Likewise.
4219         * include/grub/lib/crc.h: Likewise.
4221         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4223         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4224         (hexdump): Move this function to ...
4226         * lib/hexdump.c: ... here.
4228         * include/grub/hexdump.h: Renamed to ...
4230         * include/grub/lib/hexdump.h: ... this.
4232         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4234         * util/grub-editenv.c: Likewise.
4236         * include/envblk.h: Renamed to ...
4238         * include/lib/envblk.h: ... this.
4240         * util/envblk.c: Renamed to ...
4242         * lib/envblk.c: ... this.
4244         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4245         lib/hexdump.c.
4246         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4247         (pkglib_MODULES): Add crc.mod.
4248         (hexdump_mod_SOURCES): Add lib/hexdump.c.
4249         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4250         (crc_mod_SOURCES): New macro.
4251         (crc_mod_CFLAGS): Likewise.
4252         (crc_mod_LDFLAGS): Likewise.
4254         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4256         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4258         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4260         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4262         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4264 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
4266         * commands/help.c: Include <grub/term.h>.
4267         (TERM_WIDTH): Removed.  Updated all users.
4269 2008-07-27  Pavel Roskin  <proski@gnu.org>
4271         * util/getroot.c (find_root_device): Rephrase a comment to avoid
4272         spurious warnings about a comment within a comment.
4274 2008-07-25  Robert Millan  <rmh@aybabtu.com>
4276         * util/getroot.c (find_root_device): Skip devices that match
4277         /dev/dm-[0-9].  This lets the real device be found for any type of
4278         abstraction (LVM, EVMS, RAID..).
4279         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4280         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
4281         device is found first, find_root_device() will now skip it.
4283 2008-07-24  Pavel Roskin  <proski@gnu.org>
4285         * include/grub/types.h: Use __builtin_bswap32() and
4286         __builtin_bswap64() with gcc 4.3 and newer.
4288 2008-07-24  Christian Franke  <franke@computer.org>
4290         * util/i386/pc/grub-install.in: If `--debug' is specified,
4291         pass `--verbose' to grub-setup.
4292         Abort script if make_system_path_relative_to_its_root() fails.
4294 2008-07-24  Bean  <bean123ch@gmail.com>
4296         * configure.ac: Fixed a bug caused by the previous cygwin patch,
4297         variable `target_platform' should be `platform'.
4299 2008-07-24  Bean  <bean123ch@gmail.com>
4301         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
4302         (grub_png_init_fixed_block): New function.
4303         (grub_png_decode_image_data): Handle fixed huffman code compression.
4305 2008-07-24  Bean  <bean123ch@gmail.com>
4307         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4308         (grub_pe2elf_SOURCES): New macro.
4309         (CLEANFILES): Add grub-pe2elf.
4311         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4312         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4313         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4314         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4315         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4316         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4317         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4318         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4319         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4320         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4321         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4322         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4323         (GRUB_PE32_DT_FUNCTION): Likewise.
4324         (GRUB_PE32_REL_I386_DIR32): Likewise.
4325         (GRUB_PE32_REL_I386_REL32): Likewise.
4326         (grub_pe32_symbol): New structure.
4327         (grub_pe32_reloc): Likewise.
4329         * util/grub-pe2elf.c: New file.
4331         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4332         start symbol in non pc platform.
4334         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4336         The following patches are from Christian Franke.
4338         * include/grub/dl.h: Remove .previous, gas supports this only
4339         for ELF format.
4341         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4342         Remove .type, gas supports this only for ELF format.
4344         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4345         nullbytes in symbol table. This fixes an infinite loop if table is
4346         zero filled.
4348         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4349         TARGET_IMG_LDFLAGS and EXEEXT.
4351         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4352         TARGET_IMG_LDFLAGS_AC.
4353         (grub_CHECK_STACK_ARG_PROBE): New function.
4355         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4357         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4359         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4360         to set TARGET_IMG_LD* accordingly.
4361         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4362         Add call to grub_CHECK_STACK_ARG_PROBE.
4363         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4365         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4367         * genmk.rb: Add EXEEXT to CLEANFILES.
4369 2008-07-23  Robert Millan  <rmh@aybabtu.com>
4371         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4372         define the codes for arrows and lines used for the menu).
4373         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4374         as well.
4376         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4377         fonts, because the latter are too slow.
4379 2008-07-21  Bean  <bean123ch@gmail.com>
4381         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4382         a20. Run keyboard test last, as it will cause macbook to halt.
4384 2008-07-18  Pavel Roskin  <proski@gnu.org>
4386         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
4387         load foreign architecture modules correctly anyway.  Keep
4388         support for loading host architecture modules, whether we
4389         compile them or not.
4391 2008-07-17  Pavel Roskin  <proski@gnu.org>
4393         * configure.ac: Use -m32 or -m64 regardless of whether we had to
4394         change target_cpu.  The compiler default can mismatch target_cpu
4395         in any case.
4397         * disk/efi/efidisk.c: Fix format warnings on x86_64.
4398         * kern/efi/efi.c: Likewise.
4400         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
4401         target compiler is functional.
4402         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4403         are set up.
4405         * configure.ac: Default to efi platform for x86_64-apple.  Allow
4406         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
4407         adjustments from the rest, only do them if target is not
4408         explicitly given.  Merge other adjustments with the final sanity
4409         check.  Remove an extraneous check for supported CPU.  Be
4410         specific which CPU and which platform is not supported.
4412         * configure.ac: Default to pc platform for x86_64.
4414 2008-07-17  Robert Millan  <rmh@aybabtu.com>
4416         Partial LinuxBIOS -> Coreboot rename.
4418         * conf/i386-linuxbios.rmk: Renamed to ...
4419         * conf/i386-coreboot.rmk: ... this.
4420         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4421         * configure.ac: Accept "coreboot" as input platform (but maintain
4422         compatibility with "linuxbios").
4423         * include/grub/i386/linuxbios: Renamed to ...
4424         * include/grub/i386/coreboot: ... this.
4426 2008-07-17  Bean  <bean123ch@gmail.com>
4428         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
4429         (appleldr_mod_SOURCE): New variable.
4430         (appleldr_mod_CFLAGS): Likewise.
4431         (appleldr_mod_LDFLAGS): Likewise.
4432         (pci_mod_SOURCES): Likewise.
4433         (pci_mod_CFLAGS): Likewise.
4434         (pci_mod_LDFLAGS): Likewise.
4435         (lspci_mod_SOURCES): Likewise.
4436         (lspci_mod_CFLAGS): Likewise.
4437         (lspci_mod_LDFLAGS): Likewise.
4439         * conf/x86_64-efi.rmk: New file.
4441         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4442         macro.
4443         (grub_efidisk_write): Likewise.
4445         * include/efi/api.h (efi_call_0): New macro.
4446         (efi_call_1): Likewise.
4447         (efi_call_2): Likewise.
4448         (efi_call_3): Likewise.
4449         (efi_call_4): Likewise.
4450         (efi_call_5): Likewise.
4451         (efi_call_6): Likewise.
4453         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4454         grub_rescue_cmd_chainloader.
4456         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4457         (grub_pe32_optional_header): Change some fields based on i386 or
4458         x86_64 platform.
4459         (GRUB_PE32_PE32_MAGIC): Likewise.
4461         * include/grub/efi/uga_draw.h: New file.
4463         * include/grub/elf.h (STN_ABS): New constant.
4464         (R_X86_64_NONE): Relocation constant for x86_64.
4465         (R_X86_64_64): Likewise.
4466         (R_X86_64_PC32): Likewise.
4467         (R_X86_64_GOT32): Likewise.
4468         (R_X86_64_PLT32): Likewise.
4469         (R_X86_64_COPY): Likewise.
4470         (R_X86_64_GLOB_DAT): Likewise.
4471         (R_X86_64_JUMP_SLOT): Likewise.
4472         (R_X86_64_RELATIVE): Likewise.
4473         (R_X86_64_GOTPCREL): Likewise.
4474         (R_X86_64_32): Likewise.
4475         (R_X86_64_32S): Likewise.
4476         (R_X86_64_16): Likewise.
4477         (R_X86_64_PC16): Likewise.
4478         (R_X86_64_8): Likewise.
4479         (R_X86_64_PC8): Likewise.
4481         * include/grub/i386/efi/pci.h: New file.
4483         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4484         Change it value based on platform.
4485         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4486         (GRUB_E820_RAM): Likewise.
4487         (GRUB_E820_RESERVED): Likewise.
4488         (GRUB_E820_ACPI): Likewise.
4489         (GRUB_E820_NVS): Likewise.
4490         (GRUB_E820_EXEC_CODE): Likewise.
4491         (GRUB_E820_MAX_ENTRY): Likewise.
4492         (grub_e820_mmap): New structure.
4493         (linux_kernel_header): Change the efi field according to different
4494         kernel version, also field from linux_kernel_header.
4496         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4498         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4499         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4500         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4501         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4502         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4503         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4504         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4505         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4506         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4507         (GRUB_PCI_ADDR_IO_MASK): Likewise.
4509         * include/grub/x86_64/efi/kernel.h: New file.
4511         * include/grub/x86_64/efi/loader.h: Likewise.
4513         * include/grub/x86_64/efi/machine.h: Likewise.
4515         * include/grub/x86_64/efi/pci.h: Likewise.
4517         * include/grub/x86_64/efi/time.h: Likewise.
4519         * include/grub/x86_64/linux.h: Likewise.
4521         * include/grub/x86_64/setjmp.h: Likewise.
4523         * include/grub/x86_64/time.h: Likewise.
4525         * include/grub/x86_64/types.h: Likewise.
4527         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4528          GRUB_TARGET_SIZEOF_VOID_P.
4530         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4531         (grub_efi_locate_handle): Likewise.
4532         (grub_efi_open_protocol): Likewise.
4533         (grub_efi_set_text_mode): Likewise.
4534         (grub_efi_stall): Likewise.
4535         (grub_exit): Likewise.
4536         (grub_reboot): Likewise.
4537         (grub_halt): Likewise.
4538         (grub_efi_exit_boot_services): Likewise.
4539         (grub_get_rtc): Likewise.
4541         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4542         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4543         (grub_efi_allocate_pages): Wrap efi calls.
4544         (grub_efi_free_pages): Wrap efi calls.
4545         (grub_efi_get_memory_map): Wrap efi calls.
4547         * kern/x86_64/dl.c: New file.
4549         * kern/x86_64/efi/callwrap.S: Likewise.
4551         * kern/x86_64/efi/startup.S: Likewise.
4553         * loader/efi/appleloader.c: Likewise.
4555         * loader/efi/chainloader.c (cmdline): New variable.
4556         (grub_chainloader_unload): Wrap efi calls.
4557         (grub_chainloader_boot): Likewise.
4558         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4559         command line.
4561         * loader/efi/chainloader_normal.c (chainloader_command):
4562         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4563         command line.
4565         * loader/i386/efi/linux.c (allocate_pages): Change allocation
4566         method.
4567         (grub_e820_add_region): New function.
4568         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4569         booting.
4570         (grub_find_video_card): New function.
4571         (grub_linux_setup_video): New function.
4572         (grub_rescue_cmd_linux): Probe for video information.
4574         * normal/x86_64/setjmp.S: New file.
4576         * term/efi/console.c (map_char): New function.
4577         (grub_console_putchar): Map unicode char.
4578         (grub_console_checkkey): Wrap efi calls.
4579         (grub_console_getkey): Likewise.
4580         (grub_console_getwh): Likewise.
4581         (grub_console_gotoxy): Likewise.
4582         (grub_console_cls): Likewise.
4583         (grub_console_setcolorstate): Likewise.
4584         (grub_console_setcursor): Likewise.
4586         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4588 2008-07-16  Pavel Roskin  <proski@gnu.org>
4590         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4591         format strings.
4593         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4594         pointer, not an integer.  This fixes a warning and prevents
4595         precision loss on 64-bit systems.
4596         (relocate_addresses): Remove unneeded cast.
4598 2008-07-15  Pavel Roskin  <proski@gnu.org>
4600         * kern/i386/ieee1275/init.c: Include grub/cache.h.
4602         * term/ieee1275/ofconsole.c: Disable code unused on i386.
4604         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4605         Fix comparison between signed and unsigned.
4607         * include/grub/i386/ieee1275/console.h: Declare
4608         grub_console_init() and grub_console_fini().
4610         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4611         It's empty and unused.
4613         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4614         beginning to avoid warnings with some compilers.
4616         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4617         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4619 2008-07-14  Pavel Roskin  <proski@gnu.org>
4621         * kern/env.c (grub_register_variable_hook): Don't copy empty
4622         string, it leaks memory.  Pass "" to grub_env_set(), it should
4623         handle constant strings.
4625         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4626         * commands/cmp.c (grub_cmd_cmp): Likewise.
4627         * kern/dl.c (grub_dl_flush_cache): Likewise.
4628         (grub_dl_load_core): Likewise.
4629         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4630         (grub_elf64_load_phdrs): Likewise.
4632 2008-07-13  Pavel Roskin  <proski@gnu.org>
4634         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4635         between signed and unsigned.
4636         (LzmaEnc_Finish): Fix warning about an unused parameter.
4638 2008-07-13  Bean  <bean123ch@gmail.com>
4640         * Makefile.in (enable_lzo): New rule.
4642         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
4644         * configure.ac (ENABLE_LZO): New option --enable-lzo.
4646         * boot/i386/pc/lnxboot.S: #include <config.h>.
4648         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
4649         its value according to the compression algorithm used, lzo or lzma.
4651         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
4652         compression algorithm according to configure macro.
4654         * kern/i386/pc/startup.S (codestart): Likewise.
4656         * kern/i386/pc/lzma_decode.S: New file.
4658         * include/grub/lib/LzFind.h: Likewise.
4660         * include/grub/lib/LzHash.h: Likewise.
4662         * include/grub/lib/LzmaDec.h: Likewise.
4664         * include/grub/lib/LzmaEnc.h: Likewise.
4666         * include/grub/lib/LzmaTypes.h: Likewise.
4668         * lib/LzFind.c: Likewise.
4670         * lib/LzmaDec.c: Likewise.
4672         * lib/LzmaEnc.c: Likewise.
4674 2008-07-13  Bean  <bean123ch@gmail.com>
4676         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
4677         (grub_ext4_extent_header): New structure.
4678         (grub_ext4_extent): Likewise.
4679         (grub_ext4_extent_idx): Likewise.
4680         (grub_ext4_find_leaf): New function.
4681         (grub_ext2_read_block): Handle extents.
4683 2008-07-12  Robert Millan  <rmh@aybabtu.com>
4685         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
4687 2008-07-11  Robert Millan  <rmh@aybabtu.com>
4689         * util/grub.d/40_custom.in: New file. Example on how to add custom
4690         entries to /etc/grub.d.
4691         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
4692         40_custom (implicitly, by merging all the grub.d rules).
4694 2008-07-11  Pavel Roskin  <proski@gnu.org>
4696         * commands/read.c (grub_getline): Fix invalid memory access.
4697         Don't add newline to the variable value.
4699         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
4700         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
4701         (serial_hw_get_port): Check validity of the port number.
4702         (grub_cmd_serial): Check return value of serial_hw_get_port().
4704 2008-07-07  Pavel Roskin  <proski@gnu.org>
4706         * boot/i386/pc/diskboot.S (notification_string): Replace
4707         "Loading kernel" with just "loading".  This is shorter, less
4708         confusing and saves a few bytes for possible future changes.
4710 2008-07-05  Pavel Roskin  <proski@gnu.org>
4712         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
4713         size for ATAPI devices, they are undefined.  Output sector
4714         number in decimal form.
4716         * disk/ata.c: Use named constants for status bits.
4718 2008-07-04  Pavel Roskin  <proski@gnu.org>
4720         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
4721         grub_addr_t before casting it to the void pointer to fix a
4722         warning.  Non-addressable regions are discarded earlier.
4723         (grub_arch_modules_addr): Cast _end to grub_addr_t.
4724         * kern/i386/linuxbios/table.c: Include grub/misc.h.
4725         (check_signature): Don't shadow table_header.
4726         (grub_linuxbios_table_iterate): Cast numeric constants to
4727         grub_linuxbios_table_header_t.
4728         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
4729         grub_stop().
4731         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
4732         prevent warnings.
4734         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
4735         pointer, which can cause warnings.  Support 64-bit addresses.
4737         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
4738         of sizeof(long).  This fixes PowerPC image generation on x86_64.
4740 2008-07-04  Robert Millan  <rmh@aybabtu.com>
4742         This fixes a performance issue when pc & gpt partmap iterators
4743         didn't abort iteration even after our hook found what it was
4744         looking for (often causing expensive probes of non-existent drives).
4746         Some callers relied on previous buggy behaviour, since they would
4747         raise an error when their own hooks caused early abortion of its
4748         iteration.
4750         * kern/device.c (grub_device_open): Improve error message.
4751         * disk/lvm.c (grub_lvm_open): Likewise.
4752         * disk/raid.c (grub_raid_open): Likewise.
4754         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
4755         when hook requests it, independently of grub_errno.
4756         (pc_partition_map_probe): Do not fail when find_func() caused
4757         early abortion of pc_partition_map_iterate().
4759         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
4760         when hook requests it, independently of grub_errno.
4761         (gpt_partition_map_probe): Do not fail when find_func() caused
4762         early abortion of gpt_partition_map_iterate().
4764         * kern/partition.c (grub_partition_iterate): Abort parent iteration
4765         when hook requests it, independently of grub_errno.  Do not fail when
4766         part_map_iterate_hook() caused early abortion of p->iterate().
4768         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
4769         when grub_partition_iterate() returned with non-zero.
4771 2008-07-03  Pavel Roskin  <proski@gnu.org>
4773         * disk/ata.c (grub_ata_pio_write): Check status before writing,
4774         like we do in grub_ata_pio_read().
4775         (grub_ata_readwrite): Always write individual sectors.  Fix the
4776         sector count for the remainder.
4777         (grub_ata_write): Enable writing to ATA devices.  Correctly
4778         report error for ATAPI devices.
4780 2008-07-02  Pavel Roskin  <proski@gnu.org>
4782         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
4783         warning.
4785         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
4786         for every read sector, we already increment it for the whole
4787         batch.  This fixes reading more than 256 sectors at once.
4789         * util/grub-editenv.c (cmd_info): Cast argument to long
4790         explicitly.  ptrdiff_t reduces to int on i386.
4792         * util/grub-editenv.c (main): Be specific which parameter is
4793         missing.
4795         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
4796         (memdisk): Make memdisk_orig_addr a pointer.
4798         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
4799         for file offsets, use grub_off_t instead.  Fix printf format
4800         warnings.
4802         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
4803         there.  Real unexpected warnings should not drown in the noise
4804         about known problems.
4806         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
4807         grub_disk_addr_t for memory addresses.
4809         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
4810         explicitly to fix a warning.
4812         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
4814         * Makefile.in (MODULE_LDFLAGS): New variable.
4815         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
4816         the linker accepts --build-id=none.
4817         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
4818         MODULE_LDFLAGS.
4819         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
4821         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
4822         those in Linux XFS code.  Provide a way to access 64-bit parent
4823         inode.
4824         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
4825         the end of struct grub_xfs_dir_header.
4827 2008-07-02  Bean  <bean123ch@gmail.com>
4829         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
4830         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4831         and GRUB_IEEE1275_FLAG_NO_ANSI.
4833         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
4834         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
4835         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
4837         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
4838         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
4840         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
4841         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
4843         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
4844         esc sequence on non ANSI terminal.
4845         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
4847         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
4848         beginning of file.
4850 2008-07-02  Bean  <bean123ch@gmail.com>
4852         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
4853         (grub_editenv_SOURCES): New variable.
4854         (pkglib_MODULES): Add loadenv.mod.
4855         (loadenv_mod_SOURCES): New variable.
4856         (loadenv_mod_CFLAGS): Likewise.
4857         (loadenv_mod_LDFLAGS): Likewise.
4859         * include/grub/envblk.h: New file.
4861         * util/envblk.c: New file.
4863         * util/grub-editenv.c: New file.
4865         * commands/loadenv.c: New file.
4867 2008-07-01  Pavel Roskin  <proski@gnu.org>
4869         * include/multiboot2.h (struct multiboot_tag_module): Use char,
4870         not unsigned char.  This fixes warnings and is consistent with
4871         other tags.
4873         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
4875         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
4877         * term/tparm.c (analyze): Always set *popcount.
4879         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
4880         cast to fix a warning.
4882         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
4883         cast to suppress a warning.
4885         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
4886         grub_fshelp_read_file() expects.
4888         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
4889         write uuid as a 32-bit value in CPU byte order, so declare and
4890         use it as such.
4892         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
4893         long if the format specifier expects it.
4894         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
4895         * partmap/pc.c (pc_partition_map_iterate): Likewise.
4896         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
4897         long to fix a warning.
4898         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
4899         grub_dprintf() arguments to fix warnings.
4901 2008-06-30  Pavel Roskin  <proski@gnu.org>
4903         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
4904         install_bsd_part immediately before core.img is embedded or
4905         modified on disk.  This fixes core.img verification if core.img
4906         cannot be embedded.
4908         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
4909         core_path to calculate the blocklist.
4910         Patch from Javier Martín <lordhabbit@gmail.com>
4912 2008-06-29  Robert Millan  <rmh@aybabtu.com>
4914         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
4915         block to disk block.
4916         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
4917         Patch from Niels Böhm <bitbucket@arcor.de>
4919 2008-06-29  Robert Millan  <rmh@aybabtu.com>
4921         * util/update-grub_lib.in (font_path): Search for fonts in
4922         /boot/grub first, which is more likely to be readable (we aren't
4923         deciding where fonts live, just looking for them).
4925 2008-06-26  Pavel Roskin  <proski@gnu.org>
4927         * util/biosdisk.c (read_device_map): Don't leave dead map
4928         entries for devices failing stat() check.
4930         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
4931         core_path_dev for the core.img path on the target device.
4933 2008-06-26  Robert Millan  <rmh@aybabtu.com>
4935         * disk/fs_uuid.c: New file.
4936         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
4937         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
4938         (fs_uuid_mod_LDFLAGS): New variables.
4939         * include/grub/disk.h (grub_disk_dev_id): Add
4940         `GRUB_DISK_DEVICE_UUID_ID'.
4941         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
4942         implement iterate().
4944 2008-06-26  Robert Millan  <rmh@aybabtu.com>
4946         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
4947         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
4948         Linux image includes no initrd.
4950 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
4952         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
4953         call to resolve the core image location that effectively appended the
4954         name twice.
4956 2008-06-21  Robert Millan  <rmh@aybabtu.com>
4958         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
4959         call from here ...
4961         * util/grub.d/10_hurd.in: ... to here ...
4962         * util/grub.d/10_linux.in: ... and here.
4964 2008-06-19  Robert Millan  <rmh@aybabtu.com>
4966         * kern/main.c (grub_main): Export `prefix' variable immediately
4967         after it has been set by grub_machine_set_prefix().
4969 2008-06-19  Robert Millan  <rmh@aybabtu.com>
4971         * commands/search.c (search_label, search_fs_uuid, search_file): Print
4972         search result when not saving to variable, not the other way around.
4973         When saving to variable, abort iteration as soon as a match is found.
4975 2008-06-19  Robert Millan  <rmh@aybabtu.com>
4977         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
4978         check for partition that provides /boot/grub.  Its logic is flawed,
4979         as it prevents prepare_grub_to_access_device() from being called
4980         multiple times.
4982 2008-06-19  Robert Millan  <rmh@aybabtu.com>
4984         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
4985         "insmod" command directly when abstraction modules are needed,
4986         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
4987         since it had already been processed).
4989 2008-06-19  Pavel Roskin  <proski@gnu.org>
4991         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
4992         changed.  This is needed in case GRUB_LIBDIR changes.
4993         * conf/i386-ieee1275.rmk: Likewise.
4994         * conf/i386-linuxbios.rmk: Likewise.
4995         * conf/i386-pc.rmk: Likewise.
4996         * conf/powerpc-ieee1275.rmk: Likewise.
4998 2008-06-18  Pavel Roskin  <proski@gnu.org>
5000         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5001         kernel_elf_symlist.c to symlist.c for consistency with other
5002         architectures.  Update all users.
5003         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5005 2008-06-18  Robert Millan  <rmh@aybabtu.com>
5007         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5008         it in prefix.
5010         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
5011         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
5012         a RAID device, run setup() for all members independently on whether
5013         LVM abstraction is being used.
5014         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5015         If grub-mkimage has set `*install_dos_part == -2', don't override this
5016         value.
5017         Perform *install_dos_part adjustments independently on whether
5018         we're embedding or not.
5019         Clarify error message when image is too big for embedding.
5020         Remove duplicate *install_dos_part stanza.
5022 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5024         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5025         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5026         variables.
5027         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5028         values in grub_ofconsole_normal_color and
5029         grub_ofconsole_highlight_color (they're not directly related to
5030         background and foreground).
5031         (grub_ofconsole_setcolorstate): Extract background and foreground
5032         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5034 2008-06-17  Robert Millan  <rmh@aybabtu.com>
5036         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5037         /boot/grub for the check in last commit, not /boot (they could be
5038         different partitions).
5040 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5042         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5043         asked to setup access for the same partition that provides /boot,
5044         don't bother using UUIDs since our root already has the value we
5045         want.
5047 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5049         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5050         I2O devices.
5051         Patch from Sven Mueller <sven@debian.org>.
5053 2008-06-16  Robert Millan  <rmh@aybabtu.com>
5055         * util/update-grub.in: Check for $EUID instead of $UID.
5056         Reported by Vincent Zweije.
5058 2008-06-16  Bean  <bean123ch@gmail.com>
5060         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5061         (grub_ext2_read_block): Likewise.
5062         (grub_ext2_read_inode): Likewise.
5063         (grub_ext2_mount): Likewise.
5064         (grub_ext2_close): Likewise.
5065         (grub_ext3_get_journal): Removed.
5067         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5068         (grub_reiserfs_read_symlink): Likewise.
5069         (grub_reiserfs_mount): Likewise.
5070         (grub_reiserfs_open): Likewise.
5071         (grub_reiserfs_read): Likewise.
5072         (grub_reiserfs_close): Likewise.
5073         (grub_reiserfs_get_journal): Removed.
5075         * fs/fshelp.c (grub_fshelp_read): Removed.
5076         (grub_fshelp_map_block): Likewise.
5078         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5079         (grub_fshelp_journal): Likewise.
5080         (grub_fshelp_read): Likewise.
5081         (grub_fshelp_map_block): Likewise.
5083 2008-06-16  Pavel Roskin  <proski@gnu.org>
5085         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5086         floating point anymore.
5087         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5089 2008-06-15  Pavel Roskin  <proski@gnu.org>
5091         * commands/ls.c (grub_ls_list_files): Use integer calculations
5092         for human readable format, avoid floating point use.
5093         * kern/misc.c (grub_ftoa): Remove.
5094         (grub_vsprintf): Remove floating point support.
5096 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5098         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5099         devices.
5100         Reported by Max Vozeler.
5102 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5104         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5105         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5106         skipped later.
5107         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5108         the beginning of the prefix.
5110         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5111         It is assumed that if we have a memdisk, grub-mkimage has set
5112         grub_prefix to include the "(memdisk)" drive in it.
5114 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5116         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5117         Initialize keyboard controller after registering the terminal, so that
5118         grub_printf() can be called from grub_keyboard_controller_init().
5120 2008-06-15  Robert Millan  <rmh@aybabtu.com>
5122         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5123         extent-btree which is written as big endian on disk.
5124         Reported by Alain Greppin  <al@chilibi.org>.
5126 2008-06-14  Robert Millan  <rmh@aybabtu.com>
5128         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5129         * util/i386/pc/grub-install.in (modules): Likewise.
5131 2008-06-13  Pavel Roskin  <proski@gnu.org>
5133         * commands/ls.c (grub_ls_list_files): Fix format warnings.
5135 2008-06-13  Bean  <bean123ch@gmail.com>
5137         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5139         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5141         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5142         to indicate sparse block.
5144 2008-06-12  Pavel Roskin  <proski@gnu.org>
5146         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5147         number, grub_fshelp_read() does it for us.
5149         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
5150         linear disk read with journal translation.
5151         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5152         * include/grub/fshelp.h: Declare grub_fshelp_read().
5154 2008-06-09  Pavel Roskin  <proski@gnu.org>
5156         * fs/minix.c (grub_minix_mount): Handle error reading
5157         superblock.
5159 2008-06-08  Robert Millan  <rmh@aybabtu.com>
5161         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5162         don't append the RAID prefix afterwards.
5163         Reported by Clint Adams.
5165 2008-06-08  Robert Millan  <rmh@aybabtu.com>
5167         Based on description from Pavel:
5168         * kern/disk.c (grub_disk_check_range): Rename to ...
5169         (grub_disk_adjust_range): ... this.  Add a comment explaining the
5170         tasks performed by this function.
5172 2008-06-08  Robert Millan  <rmh@aybabtu.com>
5174         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5175         `num_serial' (for consistency with other variables).
5176         (struct grub_ntfs_data): Add `uuid' member.
5177         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5178         (grub_ntfs_uuid): New function.
5179         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5181 2008-06-07  Pavel Roskin  <proski@gnu.org>
5183         * util/biosdisk.c (open_device): Revert last change to the
5184         function, it broke installation.  The sector needs to be
5185         different dependent on which device is opened.
5187 2008-06-06  Robert Millan  <rmh@aybabtu.com>
5189         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5190         rest of GRUB, and breakage doesn't happen if its value were modified.
5192         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5193         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5194         a constant (same value).
5195         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5196         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5198 2008-06-06  Robert Millan  <rmh@aybabtu.com>
5200         * util/biosdisk.c (open_device): Do not modify sector offset when
5201         accessing a partition.  kern/disk.c already handles this for us.
5203 2008-06-06  Robert Millan  <rmh@aybabtu.com>
5205         * util/grub-emu.c (grub_machine_init): Move code in this function from
5206         here ...
5207         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5208         segfault in case grub_printf() is called).
5210         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5211         grub_probe.  Update all users not to explicitly add it again.
5212         (grub_device): New variable; contains corresponding device for grubdir.
5213         (fs_module, partmap_module, devabstraction_module): Pass
5214         `--device ${grub_device}' to grub_probe to avoid traversing /dev
5215         every time.
5217 2008-06-05  Robert Millan  <rmh@aybabtu.com>
5219         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5220         is found, print it (same layout as with labels).
5222 2008-06-04  Robert Millan  <rmh@aybabtu.com>
5224         * util/biosdisk.c (get_drive): Rename to ...
5225         (find_grub_drive): ... this.  Update all users.
5227         (get_os_disk): Rename to ...
5228         (convert_system_partition_to_system_disk): ... this.  Update all users.
5230         (find_drive): Rename to ...
5231         (find_system_device): ... this.  Update all users.
5233 2008-06-04  Robert Millan  <rmh@aybabtu.com>
5235         * util/biosdisk.c (get_os_disk): Handle IDA devices.
5236         * util/grub-mkdevicemap.c (get_mmc_disk_name)
5237         (make_device_map): Likewise.
5239 2008-06-01  Robert Millan  <rmh@aybabtu.com>
5241         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5242         before dereferencing it.
5244         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5245         union with fat12/fat16-specific ones.  Add some new fields, including
5246         `num_serial' for both versions.
5247         (struct grub_fat_data): Add `uuid' member.
5248         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5249         names.  Initialize `data->uuid' using `num_serial'.
5250         (grub_fat_uuid): New function.
5251         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5253         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5254         (grub_reiserfs_uuid): New function.
5255         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5256         member.
5258         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5259         (grub_xfs_uuid): New function.
5260         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5262 2008-06-01  Robert Millan  <rmh@aybabtu.com>
5264         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5265         code that is backward compatible with pre-uuid search command.
5267 2008-05-31  Robert Millan  <rmh@aybabtu.com>
5269         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5270         floppies after everything else, to ensure floppy drive isn't accessed
5271         unnecessarily (patch from Bean).
5273 2008-05-31  Robert Millan  <rmh@aybabtu.com>
5275         * commands/search.c (search_label, search_fs_uuid, search_file): Do
5276         not print device names when we were asked to set a variable.
5278 2008-05-31  Robert Millan  <rmh@aybabtu.com>
5280         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5281         using "cursor-on" and "cursor-off" commands (understood at least by
5282         the Open Firmware flavour on OLPC).
5284 2008-05-31  Michael Gorven  <michael@gorven.za.net>
5286         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5287         on and off sequences.
5289 2008-05-31  Robert Millan  <rmh@aybabtu.com>
5291         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5292         * util/update-grub.in: Likewise.
5294 2008-05-30  Pavel Roskin  <proski@gnu.org>
5296         * util/biosdisk.c (linux_find_partition): Simplify logic and
5297         make the code more universal.  Keep special processing for
5298         devfs, but use a simple rule for all other devices.  If the
5299         device ends with a number, append 'p' and the partition number.
5300         Otherwise, append only the partition number.
5302 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5304         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5305         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5306         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5307         the `root' parameter to Linux.
5309 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5311         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5312         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5313         --fs_uuid with --fs-uuid.
5314         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5315         all filesystems support them).
5317 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5319         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
5320         grub_printf() flags, since we're printing in units of 2 bytes.
5322 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5324         * util/grub.d/00_header.in: Remove obsolete comment referencing
5325         convert_system_path_to_grub_path().
5326         * util/update-grub.in: Likewise.
5327         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5328         (convert_system_path_to_grub_path): Add a warning message explaining
5329         that this function is deprecated.  Rely on is_path_readable_by_grub()
5330         for the readability checks.
5331         (font_path): Use is_path_readable_by_grub() for the readability
5332         check rather than convert_system_path_to_grub_path().
5334 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5336         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5337         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5338         converting it first.
5339         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5340         grub.cfg for access to font file, and afterwards call it again to set
5341         the root device.
5343 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5345         * commands/search.c (options): Add --fs_uuid option.
5346         (search_fs_uuid): New function.
5347         (grub_cmd_search): Fix --set argument passing.
5348         Use search_fs_uuid() when requested via --fs_uuid.
5349         (grub_search_init): Update help message.
5350         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5351         and redeclare it as an array of 16-bit words.
5352         (grub_ext2_uuid): New function.
5353         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5354         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5355         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5356         (GRUB_DEVICE_BOOT_UUID): New variables.
5357         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5358         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5359         whenever possible.
5360         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
5361         just assume `root' variable has the right value.
5362         * util/grub.d/10_linux.in: Likewise.
5363         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5364         via PRINT_FS_UUID.
5365         (main): Recognise `-t fs_uuid' argument.
5367 2008-05-30  Robert Millan  <rmh@aybabtu.com>
5369         * util/biosdisk.c (map): Redefine structure to hold information
5370         about GRUB drive name.
5371         (get_drive): Reimplement without assuming (and verifying) BIOS-like
5372         drive names.
5373         (call_hook): Remove.
5374         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5375         member.  Assume drive has partitions.
5376         (grub_util_biosdisk_open): Access device names via `.device' struct
5377         member.
5378         (open_device): Likewise.
5379         (find_drive): Likewise.
5380         (read_device_map): Adjust map[] usage to match the new struct
5381         definition.  Don't check for duplicates (still possible, but not cheap
5382         anymore).
5383         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5384         (make_device_name): Remove assumption of BIOS-like drive names.
5386 2008-05-30  Pavel Roskin  <proski@gnu.org>
5388         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5389         compiling execute.c doesn't need grub_script.tab.h anymore.
5390         (normal/command.c_DEPENDENCIES): Likewise.
5391         (normal/function.c_DEPENDENCIES): Likewise.
5392         * conf/i386-ieee1275.rmk: Likewise.
5393         * conf/i386-linuxbios.rmk: Likewise.
5394         * conf/i386-pc.rmk: Likewise.
5395         * conf/powerpc-ieee1275.rmk: Likewise.
5396         * conf/sparc64-ieee1275.rmk: Likewise.
5398 2008-05-29  Pavel Roskin  <proski@gnu.org>
5400         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5401         when scanning metadata for volume group name.
5403         * include/grub/script.h: Don't include grub_script.tab.h.  It's
5404         a generated file, which may only be included from the files with
5405         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
5406         use union YYSTYPE, as the later allows forward declaration.
5407         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5409 2008-05-29  Robert Millan  <rmh@aybabtu.com>
5411         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5412         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5413         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5414         (grub_console_checkkey): Add grub_dprintf() call to report unknown
5415         scan codes.
5417 2008-05-29  Robert Millan  <rmh@aybabtu.com>
5419         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5420         control key combinations.
5422 2008-05-29  Robert Millan  <rmh@aybabtu.com>
5424         * util/powerpc/ieee1275/grub-install.in: Move from here ...
5425         * util/ieee1275/grub-install.in: ... to here.
5426         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5427         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5428         (grub_install_SOURCES): Likewise.
5430 2008-05-29  Robert Millan  <rmh@aybabtu.com>
5432         * fs/affs.c: Update copyright year.
5433         * fs/ext2.c: Likewise.
5434         * fs/fshelp.c: Likewise.
5435         * fs/hfsplus.c: Likewise.
5436         * fs/ntfs.c: Likewise.
5437         * fs/xfs.c: Likewise.
5438         * include/grub/fshelp.h: Likewise.
5439         * util/grub-mkdevicemap.c: Likewise.
5441 2008-05-28  Robert Millan  <rmh@aybabtu.com>
5443         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5444         might need to be fatfs to support some firmware implementations
5445         (e.g. OFW or EFI).
5447 2008-05-28  Robert Millan  <rmh@aybabtu.com>
5449         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5450         devices.
5451         * util/grub-mkdevicemap.c (get_mmc_disk_name)
5452         (make_device_map): Likewise.
5454 2008-05-20  Bean  <bean123ch@gmail.com>
5456         * fs/fshelp.c (grub_fshelp_map_block): New function.
5457         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5458         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5460         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5461         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5462         (grub_fshelp_journal): New structure.
5463         (grub_fshelp_map_block): New function prototype.
5464         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5465         (grub_fshelp_map_block): Likewise.
5467         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5468         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5469         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5470         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5471         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5472         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5473         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5474         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5475         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5476         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5477         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5478         (grub_ext2_sblock): New members for journal support.
5479         (grub_ext3_journal_header): New structure.
5480         (grub_ext3_journal_revoke_header): Likewise.
5481         (grub_ext3_journal_block_tag): Likewise.
5482         (grub_ext3_journal_sblock): Likewise.
5483         (grub_fshelp_node): New members logfile and journal.
5484         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5485         grub_fshelp_map_block to get real block number.
5486         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5487         number.
5488         (grub_ext2_read_inode): Likewise.
5489         (grub_ext3_get_journal): New function.
5490         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5491         (grub_ext2_close): Release memory used by journal.
5493         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5494         (REISERFS_MAGIC_DESC_BLOCK): New macro.
5495         (grub_reiserfs_transaction_header): Renamed to
5496         grub_reiserfs_description_block, replace field data with real_blocks.
5497         (grub_reiserfs_commit_block): New structure.
5498         (grub_reiserfs_data): New member journal.
5499         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5500         number.
5501         (grub_reiserfs_read_symlink): Likewise.
5502         (grub_reiserfs_iterate_dir): Likewise.
5503         (grub_reiserfs_open): Likewise.
5504         (grub_reiserfs_read): Likewise.
5505         (grub_reiserfs_get_journal): New function.
5506         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5507         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5508         using grub_reiserfs_get_journal.
5509         (grub_reiserfs_close): Release memory used by journal.
5511         * fs/affs.c (grub_affs_read_block): Change block type to
5512         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5514         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5516         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5518         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5520         * fs/udf.c (grub_udf_read_block): Change block type to
5521         grub_disk_addr_t. Use type cast to avoid warning.
5523         * fs/xfs.c (grub_xfs_read_block): Likewise.
5525 2008-05-16  Christian Franke  <franke@computer.org>
5527         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5528         to ensure that break with ESC will always work.
5529         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5530         Remove ESC from keyboard queue.
5532 2008-05-16  Christian Franke  <franke@computer.org>
5534         * util/biosdisk.c: [__CYGWIN__] Add includes.
5535         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5536         (get_os_disk): Move variable declarations to OS specific
5537         parts to avoid warning.
5538         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5539         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5540         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5541         Cygwin.
5542         * util/getroot.c: [__CYGWIN__] Add includes.
5543         (strip_extra_slashes): Fix "/" case.
5544         [__CYGWIN__] (get_win32_path): New function.
5545         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5546         [__CYGWIN__] (find_root_device): Disable.
5547         [__CYGWIN__] (get_bootsec_serial): New function.
5548         [__CYGWIN__] (find_cygwin_root_device): Likewise.
5549         [__linux__] (grub_guess_root_device): Add early returns to simplify
5550         structure.
5551         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5552         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5553         check for Linux only.
5555 2008-05-15  Bean  <bean123ch@gmail.com>
5557         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5558         keyboard hang problem in apple's intel mac.
5560 2008-05-09  Robert Millan  <rmh@aybabtu.com>
5562         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5563         devices.
5564         * util/grub-mkdevicemap.c (get_virtio_disk_name)
5565         (make_device_map): Likewise.
5566         Reported by Aurelien Jarno <aurel32@debian.org>
5568 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
5570         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5571         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5572         (make_device_map): Output entries for xvd type disks.
5574 2008-05-07  Robert Millan  <rmh@aybabtu.com>
5576         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5577         devices.
5578         * util/grub-mkdevicemap.c (get_cciss_disk_name)
5579         (make_device_map): Likewise.
5580         Reported by Roland Dreier <rdreier@cisco.com>
5582 2008-05-07  Robert Millan  <rmh@aybabtu.com>
5584         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5585         grub_strstr() call.  Correct a few mistakes in failure path handling.
5587 2008-05-06  Robert Millan  <rmh@aybabtu.com>
5589         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5590         Do not print a trailing slash (therefore, the root directory is an
5591         empty string).
5592         (convert_system_path_to_grub_path): Do not remove trailing slash
5593         from make_system_path_relative_to_its_root() output.
5595         * util/i386/pc/grub-install.in: Add trailing slash to output from
5596         make_system_path_relative_to_its_root().
5598 2008-05-06  Robert Millan  <rmh@aybabtu.com>
5600         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
5601         ensures that output lines aren't intermangled with those sent to
5602         stderr (via grub_util_info()).
5603         * util/grub-probe.c (grub_refresh): Likewise.
5604         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5606 2008-05-05  Christian Franke  <franke@computer.org>
5608         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5609         Add Cygwin device names.
5610         (get_ide_disk_name) [__CYGWIN__]: Likewise.
5611         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5612         (check_device): Return error instead of success on empty name.
5613         (make_device_map): Move label inside linux specific code to
5614         prevent compiler warning.
5616 2008-04-30  Robert Millan  <rmh@aybabtu.com>
5618         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5619         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5620         first boot option.
5621         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5623 2008-04-29  Robert Millan  <rmh@aybabtu.com>
5625         * docs/grub.cfg: New file (example GRUB configuration).
5627 2008-04-26  Robert Millan  <rmh@aybabtu.com>
5629         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
5630         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5631         and `disk/ieee1275/nand.c'.
5633 2008-04-25  Bean  <bean123ch@gmail.com>
5635         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5636         i386-linuxbios.
5638         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5639         change the buffer size to 4096 for cdrom device.
5641         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
5642         and nand.mod.
5643         (_linux_mod_SOURCES): New variable.
5644         (_linux_mod_CFLAGS): Likewise.
5645         (_linux_mod_LDFLAGS): Likewise.
5646         (linux_mod_SOURCES): Likewise.
5647         (linux_mod_CFLAGS): Likewise.
5648         (linux_mod_LDFLAGS): Likewise.
5649         (nand_mod_SOURCES): Likewise.
5650         (nand_mod_CFLAGS): Likewise.
5651         (nand_mod_LDFLAGS): Likewise.
5653         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
5654         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
5655         type property. (nand device in olpc don't have this property)
5657         * include/grub/disk.h (grub_disk_dev_id): New macro
5658         GRUB_DISK_DEVICE_NAND_ID.
5660         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
5661         function prototype.
5662         (grub_rescue_cmd_initrd): Likewise.
5664         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
5665         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
5666         ofw_cif_handler and ofw_idt, adjust padding number.
5668         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
5669         GRUB_MACHINE_IEEE1275 is defined.
5671         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
5672         Use NESTED_FUNC_ATTR attribute on the hook parameter.
5674         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
5675         on nested function heap_init.
5676         (grub_upper_mem): New variable for i386-ieee1275.
5677         (grub_get_extended_memory): New function for i386-ieee1275.
5678         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
5680         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
5681         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
5682         property.
5684         * loader/i386/ieee1275/linux.c: New file.
5686         * loader/i386/ieee1275/linux_normal.c: New file.
5688         * disk/ieee1275/nand.c: New file.
5690 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
5692         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
5693         value.
5694         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
5696 2008-04-18  Robert Millan  <rmh@aybabtu.com>
5698         Restructures early code path on ieee1275 to unify grub_main() as
5699         the first C function that is executed in every platform.
5701         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
5702         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
5703         cmain().
5704         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
5705         * kern/ieee1275/cmain.c (cmain): Rename to ...
5706         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
5707         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
5708         at the beginning.
5710 2008-04-18  Robert Millan  <rmh@aybabtu.com>
5712         * util/update-grub.in: Fix syntax error when setting
5713         `GRUB_PRELOAD_MODULES'.
5714         Reported by Stephane Chazelas <stephane@artesyncp.com>
5716 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
5718         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
5719         section into account, newer toolchains generate unique build ids
5720         * configure.ac: remove the test for --build-id=none acceptance,
5721         we want build ids to be preserved
5722         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
5723         far from other sections don't cause the raw binary images grow
5724         size
5726 2008-04-15  Robert Millan  <rmh@aybabtu.com>
5728         * disk/lvm.c: Update copyright year.
5729         * kern/misc.c: Likewise.
5731 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
5733         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
5734         there is no memory left for physical volume name.
5736 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
5738         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
5739         volume name mapping to support bigger than 9 character names properly.
5741 2008-04-13  Robert Millan  <rmh@aybabtu.com>
5743         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
5744         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
5746 2008-04-13  Christian Franke  <franke@computer.org>
5748         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
5749         to create a floppy emulation boot CD when non emulation mode
5750         does not work.
5751         Enable Joliet CD filesystem extension.
5753 2008-04-13  Robert Millan  <rmh@aybabtu.com>
5755         * kern/misc.c (grub_strncat): Fix off-by-one error.
5756         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
5758         * kern/env.c (grub_env_context_close): Clear current context, not
5759         previous one.
5760         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
5762         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
5764 2008-04-13  Robert Millan  <rmh@aybabtu.com>
5766         Improve robustness when handling LVM.
5768         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
5769         (and leave `*p' unmodified).
5770         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
5771         through it.
5772         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
5773         iterating through it.
5774         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
5775         through it.
5776         (grub_lvm_scan_device): Check the return value (and fail gracefully
5777         when due) on each grub_lvm_getvalue() or grub_strstr() call.
5778         Don't assume `vg->pvs != NULL' when iterating through it.
5780 2008-04-13  Robert Millan  <rmh@aybabtu.com>
5782         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
5783         * genmk.rb (partmap): New variable.
5784         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
5785         (#{partmap}): New target rule.
5786         * genpartmaplist.sh: New file.
5787         * Makefile.in (pkglib_DATA): Add partmap.lst.
5788         (partmap.lst): New target rule.
5789         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
5790         modules (including all partition maps), instead of preloading them.
5792 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
5794         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
5795         `linux-boot-prober' (if installed) to detect other operating
5796         systems which are installed on the computer and add them to
5797         the boot menu.
5798         * conf/common.rmk: Build and install 30_os-prober.
5800 2008-04-12  Robert Millan  <rmh@aybabtu.com>
5802         * kern/powerpc/ieee1275/init.c: Move from here ...
5803         * kern/ieee1275/init.c: ... to here.  Update all users.
5805         * kern/powerpc/ieee1275/cmain.c: Move from here ...
5806         * kern/ieee1275/cmain.c: ... to here.  Update all users.
5808         * kern/powerpc/ieee1275/openfw.c: Move from here ...
5809         * kern/ieee1275/openfw.c: ... to here.  Update all users.
5811         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
5812         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
5814 2008-04-10  Pavel Roskin  <proski@gnu.org>
5816         * configure.ac: Always use "_cv_" in cache variables for
5817         compatibility with Autoconf 2.62.
5819 2008-04-07  Robert Millan  <rmh@aybabtu.com>
5821         Revert grub/machine/init.h addition by Pavel (since it breaks on
5822         i386-ieee1275 and others):
5823         * util/i386/pc/misc.c: Remove grub/machine/init.h.
5824         * util/powerpc/ieee1275/misc.c: Likewise.
5826 2008-04-07  Robert Millan  <rmh@aybabtu.com>
5828         * util/grub-probe.c (probe): Improve error message.
5830 2008-04-07  Robert Millan  <rmh@aybabtu.com>
5832         * util/biosdisk.c (read_device_map): Skip devices that don't exist
5833         (this prevents the presence of a bogus entry from ruining the whole
5834         thing).
5836 2008-04-06  Pavel Roskin  <proski@gnu.org>
5838         * util/biosdisk.c: Include grub/util/biosdisk.h.
5839         * util/grub-fstest.c (execute_command): Make static.
5840         * util/grub-mkdevicemap.c (check_device): Likewise.
5841         * util/i386/pc/misc.c: Include grub/machine/init.h.
5842         * util/powerpc/ieee1275/misc.c: Likewise.
5843         * util/lvm.c: Include grub/util/lvm.h.
5844         * util/misc.c: Include grub/kernel.h, grub/misc.h and
5845         grub/cache.h.
5846         * util/raid.c: Include grub/util/raid.h.
5847         (grub_util_getdiskname): Make static.
5849         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
5850         grub_hostfs_fini(), as they are called from grub_init_all() and
5851         grub_fini_all() respectively.  This fixes an infinite loop in
5852         grub-fstest due to double registration of hostfs.
5853         Reported by Christian Franke <Christian.Franke@t-online.de>
5855 2008-04-05  Pavel Roskin  <proski@gnu.org>
5857         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
5858         all 8 functions.  Otherwise, probe function 0 only.
5860 2008-04-04  Pavel Roskin  <proski@gnu.org>
5862         * commands/lspci.c (grub_lspci_iter): Print the bus number
5863         correctly.
5865         * commands/lspci.c (grub_pci_classes): Fix typos.
5866         (grub_lspci_iter): Don't print func twice.  Print vendor ID
5867         before device ID, as it's normally done.
5869         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5870         Fix signedness warnings.
5871         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
5872         Likewise.
5873         * util/ieee1275/get_disk_name.c: Include config.h so that
5874         _GNU_SOURCE is defined and getline() is declared.  Mark an
5875         unused argument as such.  Fix a signedness warning.
5877 2008-04-02  Pavel Roskin  <proski@gnu.org>
5879         * genkernsyms.sh.in: Use more robust assignments for CC and
5880         srcdir.  Quote srcdir.
5881         * gensymlist.sh.in: Likewise.  Assert at the compile time that
5882         the symbol table is not empty.
5884         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
5885         * fs/cpio.c (grub_cpio_read): Likewise.
5887 2008-04-01  Pavel Roskin  <proski@gnu.org>
5889         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
5890         * disk/host.c (grub_host_open): Likewise.
5891         * disk/loopback.c (grub_loopback_open): Likewise.
5892         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
5893         disk->id as in disk/host.c, not a multi-character constant.
5895         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
5896         later is obsolete, potentially dangerous and sets a bad example.
5897         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
5898         * util/misc.c (grub_util_get_image_size): Likewise.
5900         * disk/loopback.c (options): Improve help for "--partitions".
5902         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
5903         options to align them with the short options, e.g. "echo -e".
5905 2008-03-31  Bean  <bean123ch@gmail.com>
5907         * video/reader/png.c (grub_png_data): New member is_16bit and
5908         image_data.
5909         (grub_png_decode_image_header): Detect 16 bit png image.
5910         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
5911         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
5912         (grub_video_reader_png): Release memory occupied by image_data.
5914         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
5915         4096 bytes.
5916         (grub_nfs_mount): Skip the test for sector per cluster.
5918         * include/grub/ntfs.h (MAX_SPC): Removed.
5920 2008-03-31  Bean  <bean123ch@gmail.com>
5922         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
5923         (grub_probe_SOURCES): Add fs/afs.c.
5924         (grub_fstest_SOURCES): Likewise.
5925         (afs_mod_SOURCES): New variable.
5926         (afs_mod_CFLAGS): Likewise.
5927         (afs_mod_LDFLAGS): Likewise.
5929         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
5930         (grub_emu_SOURCES): Likewise.
5932         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5934         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5936         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5938         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5940         * fs/afs.c: New file.
5942 2008-03-30  Pavel Roskin  <proski@gnu.org>
5944         * disk/host.c: Include grub/misc.h to fix a warning.
5945         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
5946         warnings about implicit declarations.
5948         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
5949         variable.
5950         * include/grub/i386/loader.h: Change declaration of
5951         grub_linux_boot() to match what grub_loader_set() expects.
5952         * util/getroot.c (grub_guess_root_device): Return const char* to
5953         fix a warning.
5954         * util/grub-probe.c (probe): Fix a warning about uninitialized
5955         abstraction_name variable.
5956         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
5957         second argument as unused to fix a warning.
5959         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
5960         missing grub_error() call.
5962         * util/update-grub_lib.in: Define datarootdir, since Autoconf
5963         2.60 and newer uses it to define datadir.
5965         * commands/sleep.c: Fix warning about implicit declaration.
5966         * disk/memdisk.c: Likewise.
5967         * loader/aout.c: Likewise.
5968         * loader/i386/bsd_normal.c: Likewise.
5969         * util/grub-probe.c: Likewise.
5971         * commands/i386/cpuid.c (has_longmode): Make static.
5972         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
5973         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
5975         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
5976         GDT.  This is more robust, as %ds can change.
5977         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
5978         calling real_to_prot().
5979         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
5981 2008-03-28  Pavel Roskin  <proski@gnu.org>
5983         * kern/i386/pc/startup.S: Assert that uncompressed functions
5984         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
5985         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
5986         code, as they push parts of the code (error handlers) beyond
5987         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
5988         code as correctness and size.
5990 2008-03-28  Pavel Roskin  <proski@gnu.org>
5992         * kern/i386/pc/startup.S
5993         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
5994         data block address to the real mode, keep offset minimal.  This
5995         works around a bug in AWARD BIOS on old Athlon systems, which
5996         makes CD detection hang.
5998 2008-03-26  Pavel Roskin  <proski@gnu.org>
6000         * normal/color.c (grub_parse_color_name_pair): Make `name' a
6001         const.
6002         * include/grub/normal.h: Add grub_parse_color_name_pair()
6003         declaration.
6005 2008-03-24  Bean  <bean123ch@gmail.com>
6007         * disk/i386/pc/biosdisk.c (cd_start): Removed.
6008         (cd_count): Removed.
6009         (cd_drive): New variable.
6010         (grub_biosdisk_get_drive): Don't check for (cdN) device.
6011         (grub_biosdisk_call_hook): Likewise.
6012         (grub_biosdisk_iterate): Change cdrom detection method.
6013         (grub_biosdisk_open): Replace cd_start with cd_drive.
6014         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6015         detect cdrom device.
6017         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6018         Removed.
6019         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6020         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6021         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6022         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6023         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6024         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6025         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6026         (grub_biosdisk_cdrp): New structure.
6027         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6029         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6031         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6032         device.
6034         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6035         New function.
6037 2008-03-20  Robert Millan  <rmh@aybabtu.com>
6039         Remove 2 TiB limit in ata.mod.
6040         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6041         (grub_ata_dumpinfo): Print sector count with 0x%llx.
6042         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6043         grub_uint64_t instead of grub_uint32_t.
6045 2008-03-05  Bean  <bean123ch@gmail.com>
6047         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6048         (grub_multiboot): Set boot device.
6050         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6052 2008-03-02  Bean  <bean123ch@gmail.com>
6054         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6055         symlink_buffer.
6057 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
6059         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6060         texinfo.tex.
6062         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6063         modified.
6065         * docs/fdl.texi: New file.
6067         * docs/mdate-sh: New file. Copied from gnulib.
6068         * docs/texinfo.tex: Likewise.
6070         * config.guess: Updated from gnulib.
6071         * install-sh: Likewise.
6073 2008-02-28  Robert Millan  <rmh@aybabtu.com>
6075         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6076         (aout_mod_SOURCES): New variable.
6077         (aout_mod_CFLAGS): Likewise.
6078         (aout_mod_LDFLAGS): Likewise.
6080         * conf/i386-ieee1275.rmk: Likewise.
6082 2008-02-28  Robert Millan  <rmh@aybabtu.com>
6084         * util/update-grub.in: Reorganise terminal validity check.  Accept
6085         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6086         Based on suggestion by Franklin PIAT.
6088 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
6090         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6091         function.
6092         * util/getroot.c (grub_util_check_block_device): New function that
6093         returns the given argument if it is a block device and returns NULL else.
6094         * util/grub-probe.c (argument_is_device): New variable.
6095         (probe): Promote device_name from a variable to an argument. Receive
6096         device_name from grub_util_check_block_device() if path is NULL and from
6097         grub_guess_root_device() else. Do not free() device_name anymore.
6098         (options): Introduce new parameter '-d, --device'.
6099         (main): Add description of the new parameter to the help screen.
6100         Rename path variable to argument. Set argument_is_device if the '-d'
6101         option is given. Pass argument to probe() depending on
6102         argument_is_device.
6104 2008-02-24  Bean  <bean123ch@gmail.com>
6106         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6107         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6108         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6109         (GRUB_ISO9660_VOLDESC_PART): Likewise.
6110         (GRUB_ISO9660_VOLDESC_END): Likewise.
6111         (grub_iso9660_primary_voldesc): New member escape.
6112         (grub_iso9660_data): New member joliet.
6113         (grub_iso9660_convert_string): New function.
6114         (grub_iso9660_mount): Detect joliet extension.
6115         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6116         (grub_iso9660_iso9660_label): Likewise.
6118         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6119         (grub_setup_SOURCES): Add fs/udf.c.
6120         (grub_fstest_SOURCES): Likewise.
6121         (udf_mod_SOURCES): New variable.
6122         (udf_mod_CFLAGS): Likewise.
6123         (udf_mod_LDFLAGS): Likewise.
6125         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6126         (grub_emu_SOURCES): Likewise.
6128         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6130         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6132         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6134         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6136         * fs/udf.c: New file.
6138 2008-02-24  Robert Millan  <rmh@aybabtu.com>
6140         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6141         (normal/lexer.c_DEPENDENCIES): New variables.
6142         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6143         (normal/lexer.c_DEPENDENCIES): Likewise.
6144         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6145         (normal/lexer.c_DEPENDENCIES): Likewise.
6146         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6147         (normal/lexer.c_DEPENDENCIES): Likewise.
6148         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6149         (normal/lexer.c_DEPENDENCIES): Likewise.
6150         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6151         (normal/lexer.c_DEPENDENCIES): Likewise.
6153 2008-02-23  Robert Millan  <rmh@aybabtu.com>
6155         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6156         since they were intended to be in hex.  This didn't break previously
6157         because of a bug in gpt_partition_map_iterate() (see below).
6159         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6160         when checking the validity of GPT header.
6161         Remove `partno', since it always provides the same information as `i'.
6163 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
6165         * include/grub/efi/time.h: Fix a wrong comment.
6167 2008-02-19  Pavel Roskin  <proski@gnu.org>
6169         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6170         message.
6172 2008-02-19  Bean  <bean123ch@gmail.com>
6174         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6175         (aout_mod_SOURCES): New variable.
6176         (aout_mod_CFLAGS): Likewise.
6177         (aout_mod_LDFLAGS): Likewise.
6178         (_bsd_mod_SOURCES): New variable.
6179         (_bsd_mod_CFLAGS): Likewise.
6180         (_bsd_mod_LDFLAGS): Likewise.
6181         (bsd_mod_SOURCES): New variable.
6182         (bsd_mod_CFLAGS): Likewise.
6183         (bsd_mod_LDFLAGS): Likewise.
6185         * include/grub/aout.h: New file.
6187         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6189         * include/grub/i386/bsd.h: New file.
6191         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6192         to make it public.
6194         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6195         function is called, so that it's possible to change it inside the hook.
6196         (grub_elf64_load): Likewise.
6197         (grub_elf_file): Don't close the file if elf header is not found.
6198         (grub_elf_close): Close the file if grub_elf_file fails (The new
6199         grub_elf_file won't close it).
6200         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6201         (grub_elf64_size): Likewise.
6203         * kern/i386/loader.S (grub_unix_real_boot): New function.
6205         * loader/aout.c: New file.
6207         * loader/i386/bsd.c: New file.
6209         * loader/i386/bsd_normal.c: New file.
6211         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6213         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
6214         can test other formats.
6216 2008-02-19  Robert Millan  <rmh@aybabtu.com>
6218         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6219         (grub_gpt_partition_type_empty): Redefine with macro from
6220         `<grub/gpt_partition.h>'.
6221         (gpt_partition_map_iterate): Adjust partition type comparison.
6223         Export `entry' as partmap-specific `part.data' struct.
6224         (grub_gpt_header, grub_gpt_partentry): Move from here ...
6226         * include/grub/gpt_partition.h (grub_gpt_header)
6227         (grub_gpt_partentry): ... to here (new file).
6229         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6231         (grub_gpt_partition_type_bios_boot): New const variable, defined
6232         with macro from `<grub/gpt_partition.h>'.
6234         (setup): Replace `first_start' with `embed_region', which keeps
6235         track of the embed region (and is partmap-agnostic).
6237         Replace find_first_partition_start() with find_usable_region(),
6238         which finds a usable region for embedding using partmap-specific
6239         knowledge (supports PC/MSDOS and GPT).
6241         Fix all assumptions that the embed region start at sector 1, using
6242         `embed_region.start' from now on.  Similarly, use `embed_region.end'
6243         rather than `first_start' to calculate available size.
6245         In grub_util_info() message, replace "into after the MBR" with an
6246         indication of the specific sector our embed region starts at.
6248 2008-02-19  Robert Millan  <rmh@aybabtu.com>
6250         * DISTLIST: Replace `commands/ieee1275/halt.c' and
6251         `commands/ieee1275/reboot.c' with `commands/halt.c' and
6252         `commands/reboot.c'.
6253         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6254         (halt_mod_SOURCES): Likewise.
6255         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6256         (halt_mod_SOURCES): Likewise.
6258 2008-02-17  Christian Franke  <franke@computer.org>
6260         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6262 2008-02-17  Robert Millan  <rmh@aybabtu.com>
6264         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6265         set `first_start' to 0 for non-PC/MSDOS partition maps.
6267 2008-02-16  Robert Millan  <rmh@aybabtu.com>
6269         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6270         do not assume partition map is PC/MSDOS before performing checks that
6271         are specific to that layout.
6273 2008-02-13  Robert Millan  <rmh@aybabtu.com>
6275         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6276         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6277         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6279 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
6281         * configure.ac: Only a cosmetic change on the handling of
6282         -fno-stack-protector.
6284 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
6286         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6287         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6288         reboot.c.
6289         (grub_install_SOURCES): Add halt.mod and reboot.mod.
6290         (halt_mod_SOURCES): New variable.
6291         (halt_mod_CFLAGS): Likewise.
6292         (halt_mod_LDFLAGS): Likewise.
6293         (reboot_mod_SOURCES): Likewise.
6294         (reboot_mod_CFLAGS): Likewise.
6295         (reboot_mod_LDFLAGS): Likewise.
6297         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6298         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6299         reboot.c.
6300         (halt_mod_SOURCES): Likewise.
6301         (reboot_mod_SOURCES): Likewise.
6303         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6304         commands/i386/pc/reboot.c by commands/reboot.c.
6305         (reboot_mod_SOURCES): Likewise.
6307         * commands/i386/pc/reboot.c: merge this file ...
6309         * commands/ieee1275/reboot.c: ... and this file ...
6311         * commands/reboot.c: ... to this file.
6312         Add some precompiler directive to include the correct header for
6313         each machine.
6315         * commands/ieee1275/halt.c: move this file ...
6317         * commands/halt.c: ... to here.
6318         Add some precompiler directive to include the correct header for
6319         each machine.
6321         * include/grub/efi/efi.h (grub_reboot): New function declaration.
6322         (grub_halt): Likewise.
6324         * kern/efi/efi.c (grub_reboot): New function.
6325         (grub_halt): Likewise.
6327 2008-02-12  Robert Millan  <rmh@aybabtu.com>
6329         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6330         /dev (like it is done for /dev/mapper).  This doesn't provide support
6331         for EVMS, but at least it is now easy to identify the problem when it
6332         arises.
6334 2008-02-11  Robert Millan  <rmh@aybabtu.com>
6336         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6337         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6338         comparing it with -1, not 0.
6340 2008-02-10  Robert Millan  <rmh@aybabtu.com>
6342         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6343         `disk/lvm.c'.
6344         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6345         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6347         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6348         `disk/lvm.c' to the end of the list.
6349         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6350         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6352 2008-02-10  Robert Millan  <rmh@aybabtu.com>
6354         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
6355         grub_print_error() instead.  This will let user know why we're entering
6356         rescue mode.
6357         Based on suggestions from Sam Morris.
6359 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
6361         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6362         on remaining N args, instead of "--" arg N times.
6364 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
6366         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6367         (fill_with_default_glyph): Changed to use unknown_glyph for fill
6368         pattern for unknown glyphs.
6370 2008-02-09  Robert Millan  <rmh@aybabtu.com>
6372         * configure.ac: Probe for `help2man'.
6373         * Makefile.in (builddir): New variable.
6374         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
6375         or otherwise add a few flags/options to it.
6376         (install-local): For every executable utility or script that is
6377         installed, invoke $(HELP2MAN) to install a manpage based on --help
6378         output.
6380         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6381         that it doesn't prevent --help from working in build tree.
6383         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6384         with `bug-grub@gnu.org'.
6385         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6386         * util/update-grub.in (usage): New function.
6387         Implement proper argument check, with support for --help and --version
6388         (as well as existing -y).
6390 2008-02-09  Christian Franke  <franke@computer.org>
6392         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6393         avoid overwriting previous output.
6394         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6396 2008-02-09  Robert Millan  <rmh@aybabtu.com>
6398         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6399         drawing the menu.
6401 2008-02-09  Robert Millan  <rmh@aybabtu.com>
6403         * commands/sleep.c: New file.
6404         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6405         (sleep_mod_SOURCES): New variable.
6406         (sleep_mod_CFLAGS): Likewise.
6407         (sleep_mod_LDFLAGS): Likewise.
6409 2008-02-09  Robert Millan  <rmh@aybabtu.com>
6411         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6412         situations in which we can deduce the RAID size and the superblock
6413         doesn't match it.
6415 2008-02-09  Robert Millan  <rmh@aybabtu.com>
6417         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
6418         and return a grub_diskmemberlist_t composed of LVM physical volumes.
6419         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6421         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
6422         and return a grub_diskmemberlist_t composed of physical array members.
6423         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6425         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6426         prototype.
6427         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6428         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6429         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6431         * util/grub-probe.c (probe): Move partmap probing code from here ...
6432         (probe_partmap): ... to here.
6433         (probe): Use probe_partmap() once for the disk we're probing, and
6434         additionally, when such disk contains a memberlist() struct member,
6435         once for each disk that is contained in the structure returned by
6436         memberlist().
6438 2008-02-09  Robert Millan  <rmh@aybabtu.com>
6440         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6441         environment variable to 'all' in order to obtain debug output from
6442         non-util/ code.
6443         * util/i386/pc/grub-setup.c (main): Likewise.
6445 2008-02-08  Robert Millan  <rmh@aybabtu.com>
6447         * disk/raid.c (grub_raid_scan_device): Check for
6448         `array->device[sb.this_disk.number]' rather than for
6449         `array->device[sb.this_disk.number]->name', since the latter is not
6450         guaranteed to be accessible.
6452 2008-02-08  Robert Millan  <rmh@aybabtu.com>
6454         * disk/raid.c: Update copyright.
6455         * fs/cpio.c: Likewise.
6456         * include/grub/raid.h: Likewise.
6457         * loader/i386/pc/multiboot.c: Likewise.
6458         * util/hostfs.c: Likewise.
6460 2008-02-08  Robert Millan  <rmh@aybabtu.com>
6462         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6463         to a grub_disk_t array.
6464         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6465         `device[x]'.
6466         (grub_raid_scan_device): Replace `device[x].name' accesses with
6467         `device[x]->name'.  Simplify initialization of `array->device[x]'.
6469 2008-02-08  Robert Millan  <rmh@aybabtu.com>
6471         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6472         grub_dprintf() calls.
6473         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6474         error message.
6476 2008-02-07  Christian Franke  <franke@computer.org>
6478         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6479         instead of fseek and ftell to support large files.
6480         (grub_hostfs_read): Likewise.
6482 2008-02-07  Robert Millan  <rmh@aybabtu.com>
6484         Patch from Jeroen Dekkers.
6485         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
6486         failure, since successfully reading all array members might not be
6487         required.
6489 2008-02-06  Robert Millan  <rmh@aybabtu.com>
6491         * util/grub-probe.c (probe): Simplify partmap probing (with the
6492         assumption that the first word up to the underscore equals to
6493         the module name).
6495 2008-02-06  Christian Franke  <franke@computer.org>
6497         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6498         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6499         last block of a cpio or tar stream.
6500         Check for "TRAILER!!!" instead of any empty data
6501         block to detect last block of a cpio stream.
6502         (grub_cpio_dir): Fix constness of variable np.
6503         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6504         cpio or tar trailer is detected.  This fixes a crash
6505         on open of a non existing file.
6507 2008-02-05  Bean  <bean123ch@gmail.com>
6509         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6510         address of entry.
6511         (grub_multiboot_load_elf64): Likewise.
6512         (grub_multiboot): Initialize mbi structure.
6514         * util/grub-fstest.c: Don't include unused header file script.h.
6516         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
6517         of file.
6518         (grub_fstest_SOURCES): Likewise.
6520 2008-02-05  Robert Millan  <rmh@aybabtu.com>
6522         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6523         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6524         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6525         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6527         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6528         (translation_table): Replace hardcoded values with macros
6529         provided by `<grub/term.h>'.
6531         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6532         (keyboard_map): Correct/add a few values, with macros provided
6533         by `<grub/term.h>'.
6534         (keyboard_map_shift): Zero values that don't differ from their
6535         `keyboard_map' equivalents.
6536         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6537         Discard the second scan code that is always sent by Caps lock.
6538         Only use `keyboard_map_shift' when it provides a non-zero value,
6539         otherwise fallback to `keyboard_map'.
6541 2008-02-04  Bean  <bean123ch@gmail.com>
6543         * Makefile.in (enable_grub_fstest): New variable.
6545         * conf/common.rmk (grub_fstest_init.lst): New rule.
6546         (grub_fstest_init.h): Likewise.
6547         (grub_fstest_init.c): Likewise.
6548         (util/grub-fstest.c_DEPENDENCIES): New variable.
6549         (grub_fstest_SOURCES): Likewise.
6551         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6553         * util/grub-fstest.c: New file.
6555 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
6557         Make grub-setup handle a separate root device.
6559         * util/i386/pc/grub-setup.c (setup): Always open the root device,
6560         so that the root device can be compared with the destination
6561         device.
6562         When embedding the core image, if the root and destination devices
6563         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6564         0xFF.
6565         When not embedding, set ROOT_DRIVE to 0xFF.
6567 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
6569         Add support for having a grub directory in a different drive. This
6570         is still only the data handling part.
6572         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6573         (codestart): Save %dh in GRUB_ROOT_DRIVE.
6574         (grub_root_drive): New variable.
6576         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6577         instead of GRUB_BOOT_DRIVE to construct a device name. Set
6578         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6579         as it was.
6581         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6583         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6584         macro.
6585         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6587         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6588         is bogus, because PXE booting does not specify any drive
6589         correctly.
6591         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6592         am not sure if this is really correct.
6594         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6595         is always identical to the boot drive when booting from a CD.
6597         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6598         longer.
6599         (root_drive): New variable.
6600         (real_start): Unconditionally set %dh to ROOT_DRIVE.
6601         (setup_sectors): Push %dx right after popping it, because %dh will
6602         be modified later.
6603         (copy_buffer): Restore %dx.
6605 2008-02-03  Robert Millan  <rmh@aybabtu.com>
6607         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6608         use `cdboot.img' for cdrom images.
6610 2008-02-03  Robert Millan  <rmh@aybabtu.com>
6612         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6613         only setup gfxterm when `font' command has succeeded.
6615 2008-02-03  Robert Millan  <rmh@aybabtu.com>
6617         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6618         (grub_rescue_cmd_multiboot_loader)
6619         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6621 2008-02-03  Pavel Roskin  <proski@gnu.org>
6623         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
6624         %edx and %esi from stack only after grub_gate_a20() is called.
6625         grub_gate_a20() clobbers %edx.
6627 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
6629         * configure.ac (AC_INIT): Bumped to 1.96.
6631         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6632         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6633         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6634         video/readers/png.c.
6636 2008-02-03  Bean  <bean123ch@gmail.com>
6638         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6639         (cdboot_img_SOURCES): New variable.
6640         (cdboot_img_ASFLAGS): New variable.
6641         (cdboot_img_LDFLAGS): New variable.
6643         * boot/i386/pc/cdboot.S: New file.
6645         * disk/i386/pc/biosdisk.c (cd_start): New variable.
6646         (cd_count): Likewise.
6647         (grub_biosdisk_get_drive): Add support for cd device.
6648         (grub_biosdisk_call_hook): Likewise.
6649         (grub_biosdisk_iterate): Likewise.
6650         (grub_biosdisk_open): Likewise.
6651         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
6652         (grub_biosdisk_rw): Support reading from cd device.
6653         (GRUB_MOD_INIT): Iterate cd devices.
6655         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
6656         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
6657         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
6659         * kern/i386/pc/init.c (make_install_device): Check for cd device.
6661 2008-02-02  Robert Millan  <rmh@aybabtu.com>
6663         * commands/read.c: New file.
6664         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
6665         (read_mod_SOURCES): New variable.
6666         (read_mod_CFLAGS): Likewise.
6667         (read_mod_LDFLAGS): Likewise.
6669 2008-02-02  Robert Millan  <rmh@aybabtu.com>
6671         * normal/main.c (grub_normal_execute): Check for `menu->size' when
6672         determining whether menu has to be displayed.
6674 2008-02-02  Marco Gerards  <marco@gnu.org>
6676         * bus/pci.c: New file.
6678         * include/grub/pci.h: Likewise.
6680         * include/grub/i386/pc/pci.h: Likewise.
6682         * commands/lspci.c: Likewise.
6684         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
6685         `lspci.mod'.
6686         (pci_mod_SOURCES): New variable.
6687         (pci_mod_CFLAGS): Likewise.
6688         (pci_mod_LDFLAGS): Likewise.
6689         (lspci_mod_SOURCES): Likewise.
6690         (lspci_mod_CFLAGS): Likewise.
6691         (lspci_mod_LDFLAGS): Likewise.
6693 2008-02-02  Bean  <bean123ch@gmail.com>
6695         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
6696         (grub_ufs_get_file_block): Fix indirect block calculation problem.
6698         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
6699         (grub_xfs_btree_node): New structure.
6700         (grub_xfs_btree_root): New structure.
6701         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
6702         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
6703         (GRUB_XFS_EXTENT_BLOCK): Likewise.
6704         (GRUB_XFS_EXTENT_SIZE): Likewise.
6705         (grub_xfs_read_block): Support btree format type.
6706         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
6707         Use directory block as basic unit.
6709         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
6711         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
6712         __attribute__ ((__regparm__ (1))).
6714 2008-02-01  Robert Millan  <rmh@aybabtu.com>
6716         Correct a mistake in previous commit.
6718         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
6719         top.
6720         (normal/command.c_DEPENDENCIES): New variable.
6722 2008-02-01  Robert Millan  <rmh@aybabtu.com>
6724         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
6725         top.
6726         (normal/command.c_DEPENDENCIES): New variable.
6727         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
6728         * conf/i386-ieee1275.rmk: Likewise.
6729         * conf/i386-linuxbios.rmk: Likewise.
6730         * conf/i386-pc.rmk: Likewise.
6731         * conf/sparc64-ieee1275.rmk: Likewise.
6732         * conf/powerpc-ieee1275.rmk: Likewise.
6733         (grub_emu_SOURCES): Add `fs/fshelp.c'.
6735         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
6737 2008-02-01  Robert Millan  <rmh@aybabtu.com>
6739         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
6740         call at beginning of function.
6742 2008-01-31  Pavel Roskin  <proski@gnu.org>
6744         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
6745         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
6746         (grub_mkrescue_SOURCES): Likewise.
6747         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
6749 2008-01-30  Robert Millan  <rmh@aybabtu.com>
6751         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
6752         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
6753         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6754         (grub_probe_SOURCES): ... to here.
6756         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
6757         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
6758         * conf/i386-ieee1275.rmk: Likewise.
6759         * conf/i386-linuxbios.rmk: Likewise.
6760         * conf/powerpc-ieee1275.rmk: Likewise.
6762 2008-01-30  Tristan Gingold  <gingold@free.fr>
6764         * kern/rescue.c: Silently accept empty lines.
6766 2008-01-29  Bean  <bean123ch@gmail.com>
6768         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
6769         (real_code_2): Code cleanup and change comment style.
6770         (move_memory): Avoid using 32-bit address mode.
6772 2008-01-29  Bean  <bean123ch@gmail.com>
6774         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
6775         (png_mod_SOURCES): New variable.
6776         (png_mod_CFLAGS): Likewise.
6777         (png_mod_LDFLAGS): Likewise.
6779         * video/readers/png.c: New file.
6781 2008-01-28  Robert Millan  <rmh@aybabtu.com>
6783         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
6784         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
6785         `ifndef GRUB_MOD_GAP' hack.
6786         * util/elf/grub-mkimage.c (add_segments): Likewise.
6788 2008-01-27  Robert Millan  <rmh@aybabtu.com>
6790         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
6791         `GRUB_MOD_GAP' for platforms in which it's not defined.
6792         * util/elf/grub-mkimage.c (add_segments): Likewise.
6794 2008-01-27  Robert Millan  <rmh@aybabtu.com>
6796         Get grub-emu to build again (including parallel builds).
6798         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
6799         Split into ...
6800         (util/grub-emu.c_DEPENDENCIES): ... this, ...
6801         (normal/execute.c_DEPENDENCIES): ... this, ...
6802         (grub-emu_DEPENDENCIES): ... and this.
6804         * conf/i386-efi.rmk: Likewise.
6805         * conf/i386-linuxbios.rmk: Likewise.
6806         * conf/i386-ieee1275.rmk: Likewise.
6807         * conf/powerpc-ieee1275.rmk: Likewise.
6808         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
6810 2008-01-27  Robert Millan  <rmh@aybabtu.com>
6812         * NEWS: Add a few items.
6814 2008-01-27  Robert Millan  <rmh@aybabtu.com>
6816         Fix parallel builds with grub-emu.  Based on earlier commit for
6817         grub-probe and grub-setup.
6819         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6820         (util/grub-emu.c_DEPENDENCIES): ... this.
6821         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6822         (util/grub-emu.c_DEPENDENCIES): ... this.
6823         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6824         (util/grub-emu.c_DEPENDENCIES): ... this.
6825         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6826         (util/grub-emu.c_DEPENDENCIES): ... this.
6827         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
6828         (util/grub-emu.c_DEPENDENCIES): ... this.
6830 2008-01-27  Pavel Roskin  <proski@gnu.org>
6832         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
6833         to create a gap between _end and the modules added to the image
6834         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
6835         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
6836         * util/elf/grub-mkimage.c (add_segments): Likewise.
6838 2008-01-26  Pavel Roskin  <proski@gnu.org>
6840         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
6841         just return an error.
6843 2008-01-26  Bean  <bean123ch@gmail.com>
6845         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
6846         (grub_reiserfs_get_item): Save offset of the next item.
6847         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
6849 2008-01-25  Robert Millan  <rmh@aybabtu.com>
6851         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
6852         make all filesystem sources appear together (possibly fixing omissions
6853         while at it).
6854         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6855         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6856         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6857         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6859         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
6860         add `kern/file.c'.
6861         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
6862         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6863         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
6864         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
6866         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
6867         (probe): Add a sanity check to make sure of our ability to read
6868         requested files when probing for filesystem type.
6870         * genmk.rb: Update copyright year (2007).
6872         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
6873         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
6874         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
6875         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
6876         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
6877         : Remove function prototypes.
6879 2008-01-25  Robert Millan  <rmh@aybabtu.com>
6881         Revert my previous commits (based on wrong assumption of how grub_errno
6882         works).
6884         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
6885         * kern/file.c (grub_file_open): Likewise.
6887 2008-01-24  Pavel Roskin  <proski@gnu.org>
6889         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
6890         that hang if GRUB tries to setup colors.
6891         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
6892         colors for firmwares that don't support it.
6893         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
6894         Recognize Open Hack'Ware, set flags to work around its
6895         limitations.
6897 2008-01-24  Robert Millan  <rmh@aybabtu.com>
6899         * kern/file.c (grub_file_open): Do not account previous failures of
6900         unrelated functions when grub_errno is checked for.
6901         Reported by Oleg Strikov.
6903 2008-01-24  Bean  <bean123ch@gmail.com>
6905         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
6906         (grub_ufs_sblock): New member volume name.
6907         (grub_ufs_find_file): Fix string copy bug.
6908         (grub_ufs_label): Implement this function properly.
6910         * fs/hfs.c (grub_hfs_cnid_type): New enum.
6911         (grub_hfs_iterate_records): Use the correct file number for extents
6912         and catalog file. Fix problem in next index calculation.
6913         (grub_hfs_find_node): Replace recursive function call with loop.
6914         (grub_hfs_iterate_dir): Replace recursive function call with loop.
6916 2008-01-23  Robert Millan  <rmh@aybabtu.com>
6918         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
6919         `<grub/symbol.h>' and `<grub/multiboot.h>'.
6920         (grub_multiboot2_real_boot): New function prototype.
6922         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
6923         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
6925         * kern/i386/ieee1275/init.c (grub_os_area_addr)
6926         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
6928 2008-01-23  Robert Millan  <rmh@aybabtu.com>
6930         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
6931         #ifdef'ed out grub_printf().
6933 2008-01-23  Robert Millan  <rmh@aybabtu.com>
6935         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
6936         grub_dprintf calls, since they make "debug=all" mode unusable.
6937         (grub_console_checkkey): Likewise.
6939 2008-01-23  Robert Millan  <rmh@aybabtu.com>
6941         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
6942         `term/i386/pc/at_keyboard.c'.
6943         (pkglib_MODULES): Add `serial.mod'.
6944         (serial_mod_SOURCES): New variable.
6945         (serial_mod_CFLAGS): Likewise.
6946         (serial_mod_LDFLAGS): Likewise.
6948         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
6949         `<grub/powerpc/ieee1275/console.h>'.
6950         (grub_keyboard_controller_init): New function prototype.
6951         (grub_console_checkkey): Likewise.
6952         (grub_console_getkey): Likewise.
6954         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
6955         keyboard on i386.
6957         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
6958         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
6960 2008-01-23  Robert Millan  <rmh@aybabtu.com>
6962         * kern/i386/pc/init.c (make_install_device): When memdisk image is
6963         present, "(memdisk)/boot/grub" becomes the default prefix.
6965         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
6966         a memdisk tarball with all the modules.  Add --overlay=DIR option that
6967         allows users to overlay additional files into the image.
6969 2008-01-23  Robert Millan  <rmh@aybabtu.com>
6971         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
6972         and `machine/memory.h'.
6973         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
6974         (_multiboot_mod_SOURCES): New variable.
6975         (_multiboot_mod_CFLAGS): Likewise.
6976         (_multiboot_mod_LDFLAGS): Likewise.
6977         (multiboot_mod_SOURCES): Likewise.
6978         (multiboot_mod_CFLAGS): Likewise.
6979         (multiboot_mod_LDFLAGS): Likewise.
6981         * include/grub/i386/ieee1275/loader.h: New file.
6983         * include/grub/i386/ieee1275/machine.h: Likewise.
6985         * include/grub/i386/ieee1275/memory.h: Likewise.
6987         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
6988         variable declaration.
6989         (grub_os_area_size): Likewise.
6991         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
6992         (grub_lower_mem, grub_upper_mem): New variables.
6993         (grub_stop_floppy): New function (just to make
6994         grub_multiboot2_real_boot() happy).
6996         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
6997         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
6998         (grub_stop): New function.
6999         Include `"../realmode.S"' and `"../loader.S"'.
7001         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7002         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7004         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7005         rely on grub_multiboot2_real_boot() for final boot.
7007 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7009         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7010         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7011         device that doesn't look like an SD card.
7012         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7013         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7014         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7015         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7016         found.
7018 2008-01-22  Robert Millan  <rmh@aybabtu.com>
7020         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7021         avoid claiming over our own code.
7023 2008-01-22  Bean  <bean123ch@gmail.com>
7025         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7026         (jpeg_mod_SOURCES): New variable.
7027         (jpeg_mod_CFLAGS): Likewise.
7028         (jpeg_mod_LDFLAGS): Likewise.
7030         * video/readers/jpeg.c : New file.
7032 2008-01-22  Bean  <bean123ch@gmail.com>
7034         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7035         there are no more items.
7037 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7039         * kern/mm.c (grub_mm_init_region): Improve debug message.
7041 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7043         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7044         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7045         address.
7046         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7047         a C macro.
7048         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7049         Indicates start of upper memory.
7050         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7051         (generate_image): Abort when image size is big enough to corrupt
7052         upper memory.
7054         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7055         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7056         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7057         instead of hardcoding 0xA0000.
7058         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7059         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7060         instead of hardcoding 0xA0000.
7062 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7064         * disk/memdisk.c (memdisk_size): New variable.
7065         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7066         `memdisk_size'.
7067         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
7068         image to dynamic memory.
7069         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7070         `memdisk_size'.  Free memdisk block.
7072 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7074         Fix detection of very small filesystems (like tar).
7076         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7077         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7078         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7079         a problem with this disk).
7081 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7083         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7084         on grub_biosdisk_rw_standard() error.
7086 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7088         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7089         recent changes.
7090         * kern/elf.c: Likewise.
7091         * kern/ieee1275/ieee1275.c: Likewise.
7092         * kern/powerpc/ieee1275/openfw.c: Likewise.
7093         * term/ieee1275/ofconsole.c: Likewise.
7095 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7097         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7099         * include/grub/kernel.h (grub_arch_memdisk_addr)
7100         (grub_arch_memdisk_size): Moved from here ...
7102         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7103         (grub_arch_memdisk_size): ... to here.
7105 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7107         Mostly based on bugfix from Bean.
7109         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7110         attribute with hook() parameter.
7111         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7112         declaration.
7113         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7114         attribute with hook() parameter.
7115         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7116         declaration.
7118 2008-01-21  Robert Millan  <rmh@aybabtu.com>
7120         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7121         (pkglib_MODULES): Add `memdisk.mod'.
7122         (memdisk_mod_SOURCES): New variable.
7123         (memdisk_mod_CFLAGS): Likewise.
7124         (memdisk_mod_LDFLAGS): Likewise.
7126         * disk/memdisk.c: New file.
7128         * include/grub/disk.h (grub_disk_dev_id): Add
7129         `GRUB_DISK_DEVICE_MEMDISK_ID'.
7131         * include/grub/i386/pc/kernel.h
7132         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7133         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7134         (grub_kernel_image_size): New variable declaration.
7135         (grub_total_module_size): Likewise.
7136         (grub_memdisk_image_size): Likewise.
7138         * include/grub/i386/pc/memory.h
7139         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7141         * include/grub/kernel.h: Include `<grub/symbol.h>'.
7142         (grub_arch_memdisk_addr): New variable declaration.
7143         (grub_arch_memdisk_size): Likewise.
7145         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7146         (grub_arch_memdisk_size): Likewise.
7148         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7149         (codestart): Replace hardcoded `0x100000' with
7150         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7152         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7153         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
7154         not NULL, append the contents of the file it refers to, at the end of
7155         the compressed kernel image.  Initialize `grub_memdisk_image_size'
7156         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7157         (options): Add "memdisk"|'m' option.
7158         (main): Parse --memdisk|-m option, and pass user-provided path as
7159         parameter to generate_image().
7161 2008-01-20  Robert Millan  <rmh@aybabtu.com>
7163         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7164         grub_dprintf() calls from here ...
7165         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7167 2008-01-20  Robert Millan  <rmh@aybabtu.com>
7169         Fix detection of "real mode" when /options/real-mode? doesn't exist.
7171         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7172         declaration.
7173         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7174         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7175         `GRUB_IEEE1275_FLAG_REAL_MODE'.
7176         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
7177         property).
7178         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7179         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7181 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7183         Get rid of confusing function (superseded by
7184         `grub_ieee1275_get_integer_property')
7185         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7186         prototype.
7187         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7188         function.
7189         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7190         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
7191         in native endianness from grub_ieee1275_get_integer_property().
7193 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7195         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7196         command after "shut-down", since implementations differ on which
7197         the command for halt is.
7199 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7201         * include/grub/i386/linuxbios/console.h: Add header protection.
7202         (grub_keyboard_controller_init): New function prototype.
7203         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7204         (KEYBOARD_COMMAND_READ): Likewise.
7205         (KEYBOARD_COMMAND_WRITE): Likewise.
7206         (KEYBOARD_SCANCODE_SET1): Likewise.
7207         (grub_keyboard_controller_write): New function.
7208         (grub_keyboard_controller_read): Likewise.
7209         (grub_keyboard_controller_init): Likewise.
7211         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7212         (grub_console_init): On coreboot/LinuxBIOS, call
7213         grub_keyboard_controller_init().
7215 2008-01-19  Robert Millan  <rmh@aybabtu.com>
7217         PowerPC changes provided by Pavel Roskin.
7219         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7220         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7221         don't rely on cmain() doing it.
7222         * kern/i386/ieee1275/startup.S (_start): Store %eax in
7223         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7225 2008-01-16  Robert Millan  <rmh@aybabtu.com>
7227         * include/grub/i386/linuxbios/memory.h
7228         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7229         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7230         receive `table_header' as argument.  Instead, probe for it in the
7231         known memory ranges where it can be present.
7232         (grub_available_iterate): Do not pass a fixed `table_header' address
7233         to grub_linuxbios_table_iterate().
7235 2008-01-15  Robert Millan  <rmh@aybabtu.com>
7237         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7238         * conf/i386-ieee1275.rmk: New file.
7239         * include/grub/i386/ieee1275/console.h: Likewise.
7240         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7241         * include/grub/i386/ieee1275/kernel.h: Likewise.
7242         * include/grub/i386/ieee1275/time.h: Likewise.
7243         * kern/i386/ieee1275/init.c: Likewise.
7244         * kern/i386/ieee1275/startup.S: Likewise.
7246 2008-01-15  Robert Millan  <rmh@aybabtu.com>
7248         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7249         when pointers are 32-bit (but still do set it to one when they are
7250         64-bit).
7252 2008-01-15  Robert Millan  <rmh@aybabtu.com>
7254         * include/grub/ieee1275/ieee1275.h
7255         (grub_ieee1275_get_integer_property): New function prototype.
7257         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7258         (grub_ieee1275_get_integer_property): New function.  Wraps around
7259         grub_ieee1275_get_property() to handle endianness.
7261         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7262         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
7263         where appropriate.
7264         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7265         (grub_map): Likewise.
7266         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7268 2008-01-15  Bean  <bean123ch@gmail.com>
7270         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7271         (grub_script_execute_cmdline): Reset grub_errno.
7273         * normal/main.c (read_config_file): Reset grub_errno.
7275         * normal/parse.y (script_init): New.
7276         (script): Move function and menuentry here.
7277         (delimiter): New.
7278         (command): Add delimiter at the end of command.
7279         (commands): Adjust to match the new command.
7280         (commandblock): Remove grub_script_lexer_record_start.
7281         (menuentry): Add grub_script_lexer_record_start, use the new commands.
7282         (if): Use the new commands.
7284         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7286 2008-01-15  Robert Millan  <rmh@aybabtu.com>
7288         * normal/menu.c (run_menu): Move timeout message from here ...
7289         (print_timeout): ... to here.
7290         (run_menu): Use print_timeout() once during initial draw to print
7291         the whole message, and again in every clock tick to update only
7292         the number of seconds.
7294 2008-01-15  Robert Millan  <rmh@aybabtu.com>
7296         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7297         actual size of `available' from grub_ieee1275_get_property(), and
7298         restrict parsing to that bound.
7300 2008-01-15  Christian Franke  <franke@computer.org>
7302         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7303         (argp_program_version): Remove variable.
7304         (argp_program_bug_address): Likewise.
7305         (options): Convert from struct argp_option to struct option.
7306         (struct arguments): Remove.
7307         (parse_opt): Remove.
7308         (usage): New function.
7309         (main): Replace struct args members by simple variables.
7310         Replace argp_parse() by getopt_long().
7311         Add switch to evaluate options.
7312         Add missing "(...)" around root_dev in prefix string.
7314 2008-01-14  Robert Millan  <rmh@aybabtu.com>
7316         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7317         for grub_ieee1275_exit(), in order to improve portability.
7319 2008-01-14  Robert Millan  <rmh@aybabtu.com>
7321         * util/grub.d/10_linux.in (prefix): Define.
7322         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
7324 2008-01-13  Pavel Roskin  <proski@gnu.org>
7326         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7327         grub_errno if no errors have been detected.
7329 2008-01-12  Robert Millan  <rmh@aybabtu.com>
7331         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7332         (grub_util_get_dev_abstraction): New function prototype.
7334         * util/getroot.c: Include `<grub/util/getroot.h>'
7335         (grub_util_get_grub_dev): Move detection of abstraction type to ...
7336         (grub_util_get_dev_abstraction): ... here (new function).
7338         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
7339         `PRINT_ABSTRACTION'.
7340         (probe): Probe for abstraction type when requested.
7341         (main): Understand `--target=abstraction'.
7343         * util/i386/efi/grub-install.in: Add abstraction module to core
7344         image when it is found to be necessary.
7345         * util/i386/pc/grub-install.in: Likewise.
7346         * util/powerpc/ieee1275/grub-install.in: Likewise.
7348         * util/update-grub_lib.in (font_path): Return system path without
7349         converting to GRUB path.
7350         * util/update-grub.in: Convert system path returned by font_path()
7351         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
7352         abstraction module is needed for loading fonts (if any).  Export
7353         that as `GRUB_PRELOAD_MODULES'.
7354         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7355         insmod commands).
7357 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
7359         Remove some unused code from reiserfs.
7361         * fs/reiserfs.c (struct grub_reiserfs_key)
7362         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7363         (struct grub_reiserfs_node_body): Removed.
7364         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7365         Likewise.
7366         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7367         Likewise.
7368         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7369         Likewise.
7370         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7371         Likewise.
7372         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7373         Likewise.
7374         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7375         Likewise.
7376         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7377         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7378         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7380 2008-01-10  Robert Millan  <rmh@aybabtu.com>
7382         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7383         Determines if a file is garbage left by packaging systems, etc.
7384         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7385         for processing /etc/grub.d scripts.
7386         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7387         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
7388         as a condition for processing Linux images.
7390 2008-01-10  Pavel Roskin  <proski@gnu.org>
7392         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
7393         to compile reiserfs.c on PowerPC.
7395 2008-01-10  Robert Millan  <rmh@aybabtu.com>
7397         * kern/device.c (grub_device_iterate): Do not abort device iteration
7398         when one of the devices cannot be opened.
7399         * kern/disk.c (grub_disk_open): Do not account previous failures of
7400         unrelated functions when grub_errno is checked for.
7402 2008-01-08  Robert Millan  <rmh@aybabtu.com>
7404         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7405         `! grub_linux_is_bzimage', change order of address comparison to make
7406         it more intuitive, and improve "too big zImage" error message.
7408 2008-01-08  Robert Millan  <rmh@aybabtu.com>
7410         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7411         `$(update-grub_DATA)'.
7412         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7413         targets.
7415 2008-01-07  Robert Millan  <rmh@aybabtu.com>
7417         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7418         which instruction is modified by grub-setup during installation
7419         (since it wasn't obvious by only looking at this file).
7421 2008-01-07  Robert Millan  <rmh@aybabtu.com>
7423         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
7424         listing actual TODO items.
7426 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
7428         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7429         correctly.
7430         (grub_reiserfs_get_key_offset): Likewise.
7431         (grub_reiserfs_set_key_offset): Likewise.
7432         (grub_reiserfs_set_key_type): Likewise.
7433         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
7435         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7436         better to remove the bitfield version completely.
7438 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
7440         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7441         allocated from the heap, due to the fshelp implementation.
7442         (grub_reiserfs_dir): Free NODE, due to the same reason.
7444 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
7446         Mostly from Vincent Pelletier:
7448         * fs/reiserfs.c: New file.
7450         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7451         (reiserfs_mod_SOURCES): New variable.
7452         (reiserfs_mod_CFLAGS): Likewise.
7453         (reiserfs_mod_LDFLAGS): Likewise.
7455         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7456         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7457         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7458         normal/color.c.
7460 2008-01-06  Robert Millan  <rmh@aybabtu.com>
7462         * normal/color.c: Remove `<grub/env.h>'.
7464 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
7466         * include/grub/normal.h: Include <grub/env.h>.
7468 2008-01-05  Robert Millan  <rmh@aybabtu.com>
7470         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7471         usage example with `(hd0,1)'.
7472         Reported by Samuel Thibault.
7474 2008-01-05  Robert Millan  <rmh@aybabtu.com>
7476         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7477         (grub_linux_boot_zimage): Rename to ...
7478         (grub_linux_boot): ... this.
7479         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7480         (grub_linux_boot_zimage): Conditionalize zImage copy.
7482         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7483         (grub_linux_boot_bzimage): Remove prototype.
7484         (grub_linux_boot_zimage): Rename to ...
7485         (grub_linux_boot): ... this.
7487         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7488         (grub_linux_boot): Remove function.
7490 2008-01-05  Robert Millan  <rmh@aybabtu.com>
7492         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7493         (grub_env_write_color_highlight): Likewise.
7494         (grub_wait_after_message): Likewise.
7496         * normal/color.c: New file.
7498         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7499         (normal_mod_DEPENDENCIES): Likewise.
7501         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7502         (normal_mod_DEPENDENCIES): Likewise.
7504         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7505         (normal_mod_DEPENDENCIES): Likewise.
7507         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7508         (normal_mod_DEPENDENCIES): Likewise.
7510         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7511         for waiting after a message is printed.
7512         * normal/main.c (read_config_file): Likewise.
7513         (grub_normal_init): Register grub_env_write_color_normal() and
7514         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
7515         `color_highlight' variables as global.
7517         * normal/menu.c (grub_wait_after_message): New function.
7518         (grub_color_menu_normal): New variable.  Replaces ...
7519         (GRUB_COLOR_MENU_NORMAL): ... this macro.
7520         (grub_color_menu_highlight): New variable.  Replaces ...
7521         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7522         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7523         `GRUB_TERM_COLOR_STANDARD'.
7524         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
7525         `normal_code' and `highlight_code' to `old_color_normal' and
7526         `old_color_highlight', respectively.
7527         (grub_menu_init_page): Update colors when drawing the menu, based on
7528         `menu_color_normal' and `menu_color_highlight' variables.
7529         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7530         a message is printed.
7532 2008-01-05  Robert Millan  <rmh@aybabtu.com>
7534         * kern/env.c (grub_env_context_open): Propagate hooks for global
7535         variables to new context.
7537         * kern/main.c (grub_set_root_dev): Export `root' variable.
7539 2008-01-05  Robert Millan  <rmh@aybabtu.com>
7541         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
7542         discs unconditionally, since udev and others have options to provide
7543         them.
7545 2008-01-05  Robert Millan  <rmh@aybabtu.com>
7547         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7549 2008-01-04  Christian Franke  <franke@computer.org>
7551         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7552         of eisa_mmap.
7554 2008-01-03  Pavel Roskin  <proski@gnu.org>
7556         * kern/i386/linuxbios/init.c: Put "void" to all function
7557         declarations with no arguments.
7558         * kern/powerpc/ieee1275/init.c: Likewise.
7559         * term/i386/pc/at_keyboard.c: Likewise.
7560         * term/i386/pc/vga_text.c: Likewise.
7561         * util/grub-mkdevicemap.c: Likewise.
7563 2008-01-02  Robert Millan  <rmh@aybabtu.com>
7565         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7566         message when loaded image is out of bounds.
7567         (grub_multiboot_load_elf64): Likewise.
7569 2008-01-02  Pavel Roskin  <proski@gnu.org>
7571         * util/grub.d/10_linux.in: Try version without ".old" when
7572         looking for initrd.  It's better to use initrd from the newer
7573         kernel of the same version than no initrd at all.
7575 2008-01-01  Robert Millan  <rmh@aybabtu.com>
7577         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7579 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
7581         * include/grub/video.h: Added grub_video_unmap_color and
7582         grub_video_get_active_render_target.
7583         (grub_video_adapter): Added unmap_color and get_active_render_target.
7585         * video/video.c: Added grub_video_unmap_color and
7586         grub_video_get_active_render_target.
7587         (grub_video_get_info): Changed method to accept NULL pointer as an
7588         argument to allow detection of active video adapter.
7590         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7591         grub_video_vbe_unmap_color_int.
7592         Added grub_video_vbe_unmap_color and
7593         grub_video_vbe_get_active_render_target.
7594         (grub_video_vbe_adapter): Added unmap_color and
7595         get_active_render_target.
7597         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
7598         with grub_video_vbe_unmap_color_int.
7600         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7601         (DEFAULT_NORMAL_COLOR): Likewise.
7602         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7603         (DEFAULT_FG_COLOR): Removed.
7604         (DEFAULT_BG_COLOR): Likewise.
7605         (DEFAULT_CURSOR_COLOR): Changed value.
7606         (grub_virtual_screen): Added standard_color_setting,
7607         normal_color_setting, highlight_color_setting and term_color.
7608         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7609         (bitmap_width): Added.
7610         (bitmap_height): Likewise.
7611         (bitmap): Likewise.
7612         (set_term_color): Likewise.
7613         (grub_virtual_screen_setup): Changed to use new terminal coloring
7614         settings.
7615         (grub_gfxterm_init): Added init for bitmap.
7616         (grub_gfxterm_fini): Added destroy for bitmap.
7617         (redraw_screen_rect): Updated to use background bitmap and new
7618         terminal coloring.
7619         (scroll_up): Added optimization for case when there is no bitmap.
7620         (grub_gfxterm_cls): Fixed to use correct background color.
7621         (grub_virtual_screen_setcolorstate): Changed to use new terminal
7622         coloring.
7623         (grub_virtual_screen_setcolor): Likewise.
7624         (grub_virtual_screen_getcolor): Added.
7625         (grub_gfxterm_background_image_cmd): Likewise.
7626         (grub_video_term): Added setcolor and getcolor.
7627         (MOD_INIT): Added registration of background_image command.
7628         (MOD_TERM): Added unregistration for background_image command.
7630 2007-12-30  Pavel Roskin  <proski@gnu.org>
7632         * loader/multiboot_loader.c: Fix multiboot command
7633         unregistration.  Fix all typos in the word "multiboot".
7635 2007-12-29  Pavel Roskin  <proski@gnu.org>
7637         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
7638         support for initrd names used in Fedora.
7640 2007-12-26  Bean  <bean123ch@gmail.com>
7642         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
7643         (cpio_mod_SOURCES): New variable.
7644         (cpio_mod_CFLAGS): Likewise.
7645         (cpio_mod_LDFLAGS): Likewise.
7647         * fs/cpio.c: New file.
7649         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
7651         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7653         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7655         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7657 2007-12-25  Robert Millan  <rmh@aybabtu.com>
7659         * include/grub/term.h (struct grub_term): Add `getcolor' function.
7660         (grub_getcolor): New function.
7662         * kern/term.c (grub_getcolor): New function.
7663         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
7664         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
7665         (print_entry): Set normal and highlight colors to
7666         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
7667         respectively, before printing and restore them to old
7668         values afterwards.
7669         (grub_menu_init_page): Likewise.  Fill an additional colored space
7670         that would otherwise be left blank.
7672         * term/efi/console.c (grub_console_getcolor): New function.
7673         (struct grub_console_term.getcolor): New variable.
7674         * term/i386/pc/console.c (grub_console_getcolor): New function.
7675         (struct grub_console_term.getcolor): New variable.
7676         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
7677         (struct grub_console_term.getcolor): New variable.
7679         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
7680         (struct grub_console_term.setcolor): Remove variable.
7681         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
7682         (struct grub_console_term.setcolor): Remove variable.
7683         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
7684         (struct grub_console_term.setcolor): Remove variable.
7685         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
7686         (struct grub_console_term.setcolor): Remove variable.
7688 2007-12-25  Robert Millan  <rmh@aybabtu.com>
7690         * configure.ac: Search for possible unifont.hex locations, and
7691         define UNIFONT_HEX if found.
7693         * Makefile.in (UNIFONT_HEX): Define variable.
7694         (DATA): Rename to ...
7695         (PKGLIB): ... this.  Update all users.
7696         (PKGDATA): New variable.
7697         (pkgdata_IMAGES): Rename to ...
7698         (pkglib_IMAGES): ... this. Update all users.
7699         (pkgdata_MODULES): Rename to ...
7700         (pkglib_MODULES): ... this. Update all users.
7701         (pkgdata_PROGRAMS): Rename to ...
7702         (pkglib_PROGRAMS): ... this. Update all users.
7703         (pkgdata_DATA): Rename to ...
7704         (pkglib_DATA): ... this. Update all users.
7705         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
7706         (unicode.pff, ascii.pff): New rules.
7707         (all-local): Add `$(PKGDATA)' dependency.
7708         (install-local): Process `$(PKGDATA)'.
7710         * util/update-grub_lib.in (font_path): Search for *.pff files in
7711         a few more locations, including `${pkgdata}'.
7713 2007-12-23  Robert Millan  <rmh@aybabtu.com>
7715         Patch from Bean  <bean123ch@gmail.com>:
7716         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
7717         `size'.
7719 2007-12-21  Bean  <bean123ch@gmail.com>
7721         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
7722         (ntfscomp_mod_SOURCES): New variable.
7723         (ntfscomp_mod_CFLAGS): Likewise.
7724         (ntfscomp_mod_LDFLAGS): Likewise.
7726         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
7727         (grub_probe_SOURCES): Likewise.
7728         (grub_emu_SOURCES): Likewise.
7730         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7731         (grub_emu_SOURCES): Likewise.
7733         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7734         (grub_emu_SOURCES): Likewise.
7736         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
7737         (grub_emu_SOURCES): Likewise.
7739         * fs/ntfs.c (grub_ntfscomp_func): New variable.
7740         (read_run_list): Renamed to grub_ntfs_read_run_list.
7741         (decomp_nextvcn): Moved to ntfscomp.c.
7742         (decomp_getch): Likewise.
7743         (decomp_get16): Likewise.
7744         (decomp_block): Likewise.
7745         (read_block): Likewise.
7746         (read_data): Partially moved to ntfscomp.c.
7747         (fixup): Change unsigned to grub_uint16_t.
7748         (read_mft): Change unsigned long to grub_uint32_t.
7749         (read_attr): Likewise.
7750         (read_data): Likewise.
7751         (read_run_data): Likewise.
7752         (read_run_list): Likewise.
7753         (read_mft): Likewise.
7755         * fs/ntfscomp.c: New file.
7757         * include/grub/ntfs.h: New file.
7759 2007-12-16  Robert Millan  <rmh@aybabtu.com>
7761         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
7762         IDE disk check, since Linux is known to support 20 IDE disks.
7763         Reported by Colin Watson.
7765 2007-12-15  Bean  <bean123ch@gmail.com>
7767         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
7768         (lnxboot_img_SOURCES): New variable.
7769         (lnxboot_img_ASFLAGS): Likewise.
7770         (lnxboot_img_LDFLAGS): Likewise.
7772         * boot/i386/pc/lnxboot.S: New file.
7774 2007-11-24  Pavel Roskin  <proski@gnu.org>
7776         * configure.ac: Test if '--build-id=none' is supported by the
7777         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
7778         objcopy to generate incorrect binary files (binutils
7779         2.17.50.0.18-1 as shipped by Fedora 8).
7780         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
7781         linking, so that build ID doesn't break the test.
7783 2007-11-24  Pavel Roskin  <proski@gnu.org>
7785         * include/grub/i386/time.h: use "void" in the argument list
7786         of grub_cpu_idle().
7787         * include/grub/powerpc/time.h: Likewise.
7788         * include/grub/sparc64/time.h: Likewise.
7790 2007-11-18  Christian Franke  <franke@computer.org>
7792         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
7793         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
7794         This fixes the problem that function keys did not work in grub-emu.
7796 2007-11-18  Christian Franke  <franke@computer.org>
7798         * disk/host.c (grub_host_open): Remove attribute unused from
7799         name parameter. Add check for "host". This fixes the problem
7800         that grub-emu does not find partitions.
7802 2007-11-18  Christian Franke  <franke@computer.org>
7804         * util/hostfs.c (is_dir): New function.
7805         (grub_hostfs_dir):  Handle missing dirent.d_type case.
7806         (grub_hostfs_read): Add missing fseek().
7807         (grub_hostfs_label): Clear label pointer.  This fixes a crash
7808         of grub-emu on "ls (host)".
7810 2007-11-18  Christian Franke  <franke@computer.org>
7812         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
7813         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
7814         to 64 bit boundary by default.
7816 2007-11-18  Bean  <bean123ch@gmail.com>
7818         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
7819         (hexdump_mod_SOURCES): New variable.
7820         (hexdump_mod_CFLAGS): Likewise.
7821         (hexdump_mod_LDFLAGS): Likewise.
7823         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7825         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7827         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7829         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
7831         * include/grub/hexdump.h: New file.
7833         * commands/hexdump.c: New file.
7835 2007-11-10  Robert Millan  <rmh@aybabtu.com>
7837         * commands/i386/pc/play.c (beep_off): Switch order of arguments
7838         in grub_outb() calls.
7839         (beep_on): Likewise.
7841 2007-11-10  Christian Franke  <franke@computer.org>
7843         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
7844         (grub_menu_run): Likewise.
7846 2007-11-10  Robert Millan  <rmh@aybabtu.com>
7848         * include/grub/i386/efi/machine.h: New file.
7849         * include/grub/i386/linuxbios/machine.h: Likewise.
7850         * include/grub/i386/pc/machine.h: Likewise.
7851         * include/grub/powerpc/ieee1275/machine.h: Likewise.
7852         * include/grub/sparc64/ieee1275/machine.h: Likewise.
7854         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
7855         (serial_hw_io_addr): New variable.
7856         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
7857         instead of `(unsigned short *) 0x400'.
7859 2007-11-10  Bean  <bean123ch@gmail.com>
7861         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
7863 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
7865         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
7866         (vga_mod_SOURCES): Added.
7867         (vga_mod_CFLAGS): Likewise.
7868         (vga_mod_LDFLAGS): Likewise.
7870         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
7871         grub_outb() calls.
7872         (set_map_mask): Likewise.
7873         (set_read_map): Likewise.
7874         (set_read_address): Likewise.
7875         (vga_font): Removed variable.
7876         (get_vga_glyph): Removed function.
7877         (invalidate_char): Likewise.
7878         (write_char): Changed to use grub_font_get_glyph() for font
7879         information.
7880         (grub_vga_putchar): Likewise.
7881         (grub_vga_getcharwidth): Likewise.
7883 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
7885         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
7886         flags.
7887         (pxeboot_img_LDFLAGS): Likewise.
7888         (diskboot_img_LDFLAGS): Likewise.
7889         (kernel_img_LDFLAGS): Likewise.
7891 2007-11-06  Robert Millan  <rmh@aybabtu.com>
7893         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
7894         in grub_outb() calls.
7895         (serial_hw_init): Likewise.
7897 2007-11-05  Robert Millan  <rmh@aybabtu.com>
7899         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
7900         spaces.  Skip non-regular files.
7902 2007-11-05  Robert Millan  <rmh@aybabtu.com>
7904         * kern/disk.c (grub_disk_firmware_fini)
7905         (grub_disk_firmware_is_tainted): New variables.
7907         * include/grub/disk.h (grub_disk_firmware_fini)
7908         (grub_disk_firmware_is_tainted): Likewise.
7910         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
7911         (grub_disk_biosdisk_fini): ... to here.
7912         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
7913         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
7914         is set.  Register grub_disk_biosdisk_fini() in
7915         `grub_disk_firmware_fini'.
7917         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
7918         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
7919         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
7920         to finish existing firmware disk interface.
7922         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
7923         (ata_mod_SOURCES): New variable.
7924         (ata_mod_CFLAGS): Likewise.
7925         (ata_mod_LDFLAGS): Likewise.
7927 2007-11-05  Robert Millan  <rmh@aybabtu.com>
7929         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
7930         (grub_ata_wait): Reimplement using grub_millisleep().
7932         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
7933         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
7935 2007-11-03  Marco Gerards  <marco@gnu.org>
7937         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
7938         (CRTC_ADDR_PORT): New macro.
7939         (CRTC_DATA_PORT): Likewise.
7940         (CRTC_CURSOR): Likewise.
7941         (CRTC_CURSOR_ADDR_HIGH): Likewise.
7942         (CRTC_CURSOR_ADDR_LOW): Likewise.
7943         (update_cursor): New function.
7944         (grub_console_real_putchar): Call `update_cursor'.
7945         (grub_console_gotoxy): Likewise.
7946         (grub_console_cls): Set the default color when clearing the
7947         screen.
7948         (grub_console_setcursor): Implemented.
7950 2007-11-03  Marco Gerards  <marco@gnu.org>
7952         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
7953         become activate.
7954         (grub_ata_pio_write): Likewise.
7956         (grub_atapi_identify): Wait after issuing an ATA command.
7957         (grub_atapi_packet): Likewise.
7958         (grub_ata_identify): Likewise.
7959         (grub_ata_readwrite): Likewise.
7961 2007-11-03  Marco Gerards  <marco@gnu.org>
7963         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
7964         (grub_ata_pio_write): Likewise.
7965         (grub_ata_readwrite): Use `grub_error', instead of
7966         returning `grub_errno'.
7968 2007-11-03  Marco Gerards  <marco@gnu.org>
7970         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
7971         grub_ata_pio_write once for every single sector, instead of for
7972         multiple sectors.
7974 2007-10-31  Robert Millan  <rmh@aybabtu.com>
7976         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
7978         * conf/i386-linuxbios.rmk: New file.
7980         * kern/i386/pc/hardware.c: Likewise.
7981         * term/i386/pc/at_keyboard.c: Likewise.
7982         * term/i386/pc/vga_text.c: Likewise.
7984         * include/grub/i386/linuxbios/boot.h: Likewise.
7985         * include/grub/i386/linuxbios/console.h: Likewise.
7986         * include/grub/i386/linuxbios/init.h: Likewise.
7987         * include/grub/i386/linuxbios/kernel.h: Likewise.
7988         * include/grub/i386/linuxbios/loader.h: Likewise.
7989         * include/grub/i386/linuxbios/memory.h: Likewise.
7990         * include/grub/i386/linuxbios/serial.h: Likewise.
7991         * include/grub/i386/linuxbios/time.h: Likewise.
7993         * kern/i386/linuxbios/init.c: Likewise.
7994         * kern/i386/linuxbios/startup.S: Likewise.
7995         * kern/i386/linuxbios/table.c: Likewise.
7997 2007-10-31  Marco Gerards  <marco@gnu.org>
7999         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8000         (ata_mod_SOURCES): New variable.
8001         (ata_mod_CFLAGS): Likewise.
8002         (ata_mod_LDFLAGS): Likewise.
8004         * disk/ata.c: New file.
8006         * include/grub/disk.h (grub_disk_dev_id): Add
8007         `GRUB_DISK_DEV_ATA_ID'.
8009 2007-10-31  Robert Millan  <rmh@aybabtu.com>
8011         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8012         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8014         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8015         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8017         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8018         `<grub/types.h>'.
8020         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8022 2007-10-27  Robert Millan  <rmh@aybabtu.com>
8024         * include/grub/types.h (ULONG_MAX): Define macro.
8026 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8028         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
8029         `"../realmode.S"'.
8030         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
8032 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8034         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8035         (pkgdata_MODULES): Add `biosdisk.mod'.
8036         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8037         variables.
8039         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8040         (grub_biosdisk_init): Replace with ...
8041         (GRUB_MOD_INIT(biosdisk)): ... this.
8042         (grub_biosdisk_fini): Replace with ...
8043         (GRUB_MOD_FINI(biosdisk)): ... this.
8045         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8046         (grub_machine_init): Remove call to grub_biosdisk_init().
8047         (grub_machine_fini): Remove call to grub_machine_fini().
8049         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8051 2007-10-22  Robert Millan  <rmh@aybabtu.com>
8053         * include/grub/time.h: New file.
8054         * include/grub/i386/time.h: Likewise.
8055         * include/grub/powerpc/time.h: Likewise.
8056         * include/grub/sparc64/time.h: Likewise.
8058         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8059         instances to ...
8060         (KERNEL_MACHINE_TIME_HEADER): ... this.
8061         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8062         instances to ...
8063         (KERNEL_MACHINE_TIME_HEADER): ... this.
8064         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8065         instances to ...
8066         (KERNEL_MACHINE_TIME_HEADER): ... this.
8068         * kern/i386/efi/init.c: Include `<grub/time.h>'.
8069         (grub_millisleep): New function.
8070         * kern/i386/pc/init.c: Include `<grub/time.h>'.
8071         (grub_millisleep): New function.
8072         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8073         Remove `grub/machine/time.h' include.
8074         (grub_millisleep): New function.
8075         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8076         Remove `grub/machine/time.h' include.
8077         (grub_millisleep): New function.
8079         * include/grub/misc.h (grub_div_roundup): New function.
8081         * kern/misc.c: Include `<grub/time.h>'.
8082         (grub_millisleep_generic): New function.
8084         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8085         Add `time.h'.
8086         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8087         Add `time.h'.
8088         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8089         `machine/time.h'.  Add `time.h'.
8090         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8092 2007-10-21  Robert Millan  <rmh@aybabtu.com>
8094         * include/grub/misc.h (grub_max): New function.
8096 2007-10-21  Robert Millan  <rmh@aybabtu.com>
8098         * util/misc.c (grub_util_info): Call fflush() before returning.
8100 2007-10-20  Robert Millan  <rmh@aybabtu.com>
8102         * genmk.rb (Image): Copy `extra_flags' from here ...
8103         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
8105         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8106         to `argc' and `args' arguments.
8108 2007-10-17  Robert Millan  <rmh@aybabtu.com>
8110         * kern/i386/loader.S: New file.
8112         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8113         * kern/i386/loader.S (grub_linux_prot_size)... to here.
8114         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8115         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8116         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8117         * kern/i386/loader.S (grub_linux_real_addr)... to here.
8118         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8119         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8120         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8121         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8122         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8123         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8124         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8125         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8127         * kern/i386/realmode.S: New file.
8129         * kern/i386/pc/startup.S (protstack): Moved from here ...
8130         * kern/i386/realmode.S (protstack)... to here.
8131         * kern/i386/pc/startup.S (gdt): Moved from here ...
8132         * kern/i386/realmode.S (gdt)... to here.
8133         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8134         * kern/i386/realmode.S (prot_to_real)... to here.
8136         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8137         `kern/i386/realmode.S'.
8139 2007-10-17  Robert Millan  <rmh@aybabtu.com>
8141         * include/grub/i386/loader.h: New file.
8143         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8144         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8145         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8146         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8147         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8148         * include/grub/i386/loader.h (grub_linux_prot_size)
8149         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8150         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8151         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8152         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8154         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8156 2007-10-15  Robert Millan  <rmh@aybabtu.com>
8158         * normal/misc.c (grub_normal_print_device_info): Do not probe for
8159         filesystem when dev->disk is unset.
8160         Do probe for filesystem even when dev->disk->has_partitions is set.
8161         In case a filesystem is found, always report it.
8162         In case it isn't, if dev->disk->has_partitions is set, report that
8163         a partition table was found instead of reporting that no filesystem
8164         could be identified.
8166 2007-10-12  Robert Millan  <rmh@aybabtu.com>
8168         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8169         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8171         * include/grub/types.h (grub_host_to_target16): New macro.
8172         (grub_host_to_target32): Likewise.
8173         (grub_host_to_target64): Likewise.
8174         (grub_target_to_host16): Likewise.
8175         (grub_target_to_host32): Likewise.
8176         (grub_target_to_host64): Likewise.
8178         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8179         Renamed from to ...
8180         (GRUB_MOD_ALIGN): ...this.  Update all users.
8182         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8183         grub_host_to_target32.
8184         Replace grub_be_to_cpu32 with grub_target_to_host32.
8185         (load_modules): Likewise.
8186         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8187         Replace grub_be_to_cpu32 with grub_target_to_host32.
8188         Replace grub_cpu_to_be16 with grub_host_to_target16.
8189         Replace grub_cpu_to_be32 grub_host_to_target32.
8191 2007-10-12  Robert Millan  <rmh@aybabtu.com>
8193         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8194         * util/elf/grub-mkimage.c: ... here.
8196         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
8197         `util/powerpc/ieee1275/grub-mkimage.c'.
8199 2007-10-07  Robert Millan  <rmh@aybabtu.com>
8201         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8202         and make it easier to figure out.
8203         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8204         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8205         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8206         leave us with less than HEAP_MIN_SIZE total heap.
8207         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
8209 2007-10-03  Robert Millan  <rmh@aybabtu.com>
8211         * include/grub/i386/io.h: New file.
8212         * commands/i386/pc/play.c (inb): Removed.
8213         (outb): Removed.
8214         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
8215         with grub_outb().
8216         * term/i386/pc/serial.c  (inb): Removed.
8217         (outb): Removed.
8218         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
8219         with grub_outb().
8220         * term/i386/pc/vga.c  (inb): Removed.
8221         (outb): Removed.
8222         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
8223         with grub_outb().
8225 2007-10-02  Robert Millan  <rmh@aybabtu.com>
8227         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8228         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8229         Reported by Marcin Kurek.
8231 2007-09-07  Robert Millan  <rmh@aybabtu.com>
8233         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8234         SmartFirmware version updates (as released by Sven Luther), and avoid
8235         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8236         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8237         known broken.
8239 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
8241         From Hitoshi Ozeki:
8242         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8243         when merging two regions.
8245 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
8247         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8248         * normal/completion.c (grub_normal_do_completion): Likewise.
8249         Reported by Hitoshi Ozeki.
8251 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
8253         Do not use devices at boot in chainloading.
8255         * loader/i386/pc/chainloader.c (boot_drive): New variable.
8256         (boot_part_addr): Likewise.
8257         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8258         with BOOT_DRIVE and BOOT_PART_ADDR.
8259         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8260         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8262 2007-08-29  Robert Millan  <rmh@aybabtu.com>
8264         Patch from Simon Peter <dn.tlp@gmx.net>:
8265         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8266         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8267         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
8268         util/i386/pc/grub-setup.c_DEPENDENCIES.
8269         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8270         util/grub-probe.c_DEPENDENCIES.
8271         * conf/powerpc-ieee1275.rmk: Likewise.
8273 2007-08-28  Robert Millan  <rmh@aybabtu.com>
8275         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
8276         to tell grub-mkdevicemap how to name devices.
8277         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8278         feature).
8280         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8281         util/i386/get_disk_name.c.
8282         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8283         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8284         util/ieee1275/get_disk_name.c.
8286         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8288         * DISTLIST: Add util/i386/get_disk_name.c and
8289         util/ieee1275/get_disk_name.c.
8291         * util/grub-mkdevicemap.c: Replace device naming logic with
8292         grub_util_get_disk_name() calls.
8294 2007-08-20  Robert Millan  <rmh@aybabtu.com>
8296         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8297         (so that it works for both plural and singular quantities).
8299 2007-08-05  Robert Millan  <rmh@aybabtu.com>
8301         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8302         so that [xz] isn't taken into account when determining order.
8304 2007-08-02  Marco Gerards  <marco@gnu.org>
8306         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8307         `include/multiboot2.h', `include/grub/elfload.h',
8308         `include/multiboot.h', `include/grub/multiboot.h',
8309         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8310         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8311         `kern/elf.c', `loader/multiboot_loader.c',
8312         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8313         `loader/i386/pc/multiboot2.c',
8314         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8315         `util/i386/pc/grub-mkrescue.in'.  Remove
8316         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8317         `include/grub/i386/pc/util/biosdisk.h' and
8318         `include/grub/powerpc/ieee1275/multiboot.h'.
8320 2007-08-02  Bean  <bean123ch@gmail.com>
8322         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8323         (ntfs_mod_SOURCES): New variable.
8324         (ntfs_mod_CFLAGS): Likewise.
8325         (ntfs_mod_LDFLAGS): Likewise.
8327         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8328         (grub_probe_SOURCES): Likewise.
8329         (grub_emu_SOURCES): Likewise.
8331         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8332         (grub_emu_SOURCES): Likewise.
8334         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8335         (grub_emu_SOURCES): Likewise.
8337         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8339         * fs/ntfs.c: New file.
8341 2007-08-02  Bean  <bean123ch@gmail.com>
8343         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8345         * file.h (grub_file): Likewise.
8347         * fshelp.h (grub_fshelp_read_file): Likewise.
8349         * util/i386/pc/grub-setup.c (setup): Likewise.
8350         (save_first_sector): Likewise.
8351         (save_blocklists): Likewise.
8353         * fs/affs.c (grub_affs_read_file): Likewise.
8355         * fs/ext2.c (grub_ext2_read_file): Likewise.
8357         * fs/fat.c (grub_fat_read_data): Likewise.
8359         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8361         * fs/hfs.c (grub_hfs_read_file): Likewise.
8363         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8365         * fs/jfs.c (grub_jfs_read_file): Likewise.
8367         * fs/minix.c (grub_minix_read_file): Likewise.
8369         * fs/sfs.c (grub_sfs_read_file): Likewise.
8371         * fs/ufs.c (grub_ufs_read_file): Likewise.
8373         * fs/xfs.c (grub_xfs_read_file): Likewise.
8375         * command/blocklist.c (read_blocklist): Likewise.
8376         (print_blocklist): Likewise.
8378 2007-08-02  Marco Gerards  <marco@gnu.org>
8380         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8381         `util/hostfs.c'.
8383         * disk/host.c: New file.
8385         * util/hostfs.c: Likewise.
8387         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8388         return `GRUB_ERR_BAD_FS'.
8389         * fs/sfs.c (grub_sfs_mount): Likewise.
8390         * fs/xfs.c (grub_xfs_mount): Likewise.
8392         * include/grub/disk.h (enum grub_disk_dev_id): Add
8393         `GRUB_DISK_DEVICE_HOST_ID'.
8395         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8397 2007-07-24  Jerone Young  <jerone@gmail.com>
8399         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
8400         modules for compilation.
8401         * conf/powerpc-ieee1275.rmk: Likewise.
8403         * include/multiboot.h: Move multiboot definitions to one file. Rename
8404         many definitions to not get grub specific.
8405         * include/multiboot2.h: Create header with multiboot 2 definitions.
8406         * include/grub/multiboot.h: Header for grub specific function
8407         prototypes and definitions.
8408         * include/grub/multiboot2.h: Likewise.
8409         * include/grub/multiboot_loader.h: Likewise.
8410         * include/grub/i386/pc/multiboot.h: Removed.
8411         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8413         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8414         and 2 to allow for one multiboot and module commands.
8415         * loader/multiboot2.c: Add multiboot2 functionality.
8416         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8417         and definition names.
8418         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8419         2 functions.
8420         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8421         ieee1275 specific multiboot2 code.
8423         * kern/i386/pc/startup.S: Change headers and definition names for
8424         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8426 2007-07-22  Robert Millan  <rmh@aybabtu.com>
8428         * geninitheader.sh: Process file specified in first parameter rather
8429         than hardcoding grub_modules_init.lst.
8430         * geninit.sh: Likewise.  Also, construct header name dynamically rather
8431         than hardcoding grub_modules_init.h.
8433         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8434         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
8435         grub_probe_init.[ch] and grub_setup_init.[ch].
8437         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8438         grub_modules_init.h with grub_emu_init.h.
8439         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8440         grub_probe_init.[ch] files.
8441         * conf/i386-efi.rmk: Likewise.
8442         * conf/i386-pc.rmk: Likewise.
8443         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8444         grub_setup_init.[ch] files.
8446         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8447         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
8448         to initialize modules rather than a list of hardcoded functions.
8449         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
8450         grub_init_all() to initialize modules rather than a list of hardcoded
8451         functions.
8453 2007-07-22  Robert Millan  <rmh@aybabtu.com>
8455         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8456         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8458 2007-07-22  Robert Millan  <rmh@aybabtu.com>
8460         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8461         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8462         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8463         flag when running on SmartFirmware.
8464         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8465         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8466         was set.
8468         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8469         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8470         rather than decreasing it.
8472         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8473         there's not enough space to do it, fail in the same way as when it
8474         can't be done because there are no partitions.
8476         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8477         when nvsetenv failed.
8479 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
8481         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8482         because this rule is automatically generated.
8483         (grub-mkrescue): Removed for the same reason as above.
8485 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
8487         Migrate to GNU General Public License Version 3.
8489         * COPYING: Replaced with the plain text version of GPLv3.
8491         * config.guess: Updated from gnulib.
8492         * config.sub: Likewise.
8494         * geninit.sh: Output a GPLv3 copyright notice.
8495         * geninitheader.sh: Likewise.
8496         * genmodsrc.sh: Likewise.
8497         * gensymlist.sh.in: Likewise.
8499         * boot/i386/pc/boot.S: Upgraded to GPLv3.
8500         * boot/i386/pc/diskboot.S: Likewise.
8501         * boot/i386/pc/pxeboot.S: Likewise.
8502         * commands/blocklist.c: Likewise.
8503         * commands/boot.c: Likewise.
8504         * commands/cat.c: Likewise.
8505         * commands/cmp.c: Likewise.
8506         * commands/configfile.c: Likewise.
8507         * commands/echo.c: Likewise.
8508         * commands/help.c: Likewise.
8509         * commands/ls.c: Likewise.
8510         * commands/search.c: Likewise.
8511         * commands/terminal.c: Likewise.
8512         * commands/test.c: Likewise.
8513         * commands/videotest.c: Likewise.
8514         * commands/i386/cpuid.c: Likewise.
8515         * commands/i386/pc/halt.c: Likewise.
8516         * commands/i386/pc/play.c: Likewise.
8517         * commands/i386/pc/reboot.c: Likewise.
8518         * commands/i386/pc/vbeinfo.c: Likewise.
8519         * commands/i386/pc/vbetest.c: Likewise.
8520         * commands/ieee1275/halt.c: Likewise.
8521         * commands/ieee1275/reboot.c: Likewise.
8522         * commands/ieee1275/suspend.c: Likewise.
8523         * disk/loopback.c: Likewise.
8524         * disk/lvm.c: Likewise.
8525         * disk/raid.c: Likewise.
8526         * disk/efi/efidisk.c: Likewise.
8527         * disk/i386/pc/biosdisk.c: Likewise.
8528         * disk/ieee1275/ofdisk.c: Likewise.
8529         * font/manager.c: Likewise.
8530         * fs/affs.c: Likewise.
8531         * fs/ext2.c: Likewise.
8532         * fs/fat.c: Likewise.
8533         * fs/fshelp.c: Likewise.
8534         * fs/hfs.c: Likewise.
8535         * fs/hfsplus.c: Likewise.
8536         * fs/iso9660.c: Likewise.
8537         * fs/jfs.c: Likewise.
8538         * fs/minix.c: Likewise.
8539         * fs/sfs.c: Likewise.
8540         * fs/ufs.c: Likewise.
8541         * fs/xfs.c: Likewise.
8542         * hello/hello.c: Likewise.
8543         * include/grub/acorn_filecore.h: Likewise.
8544         * include/grub/arg.h: Likewise.
8545         * include/grub/bitmap.h: Likewise.
8546         * include/grub/boot.h: Likewise.
8547         * include/grub/cache.h: Likewise.
8548         * include/grub/device.h: Likewise.
8549         * include/grub/disk.h: Likewise.
8550         * include/grub/dl.h: Likewise.
8551         * include/grub/elfload.h: Likewise.
8552         * include/grub/env.h: Likewise.
8553         * include/grub/err.h: Likewise.
8554         * include/grub/file.h: Likewise.
8555         * include/grub/font.h: Likewise.
8556         * include/grub/fs.h: Likewise.
8557         * include/grub/fshelp.h: Likewise.
8558         * include/grub/gzio.h: Likewise.
8559         * include/grub/hfs.h: Likewise.
8560         * include/grub/kernel.h: Likewise.
8561         * include/grub/loader.h: Likewise.
8562         * include/grub/lvm.h: Likewise.
8563         * include/grub/misc.h: Likewise.
8564         * include/grub/mm.h: Likewise.
8565         * include/grub/net.h: Likewise.
8566         * include/grub/normal.h: Likewise.
8567         * include/grub/parser.h: Likewise.
8568         * include/grub/partition.h: Likewise.
8569         * include/grub/pc_partition.h: Likewise.
8570         * include/grub/raid.h: Likewise.
8571         * include/grub/rescue.h: Likewise.
8572         * include/grub/script.h: Likewise.
8573         * include/grub/setjmp.h: Likewise.
8574         * include/grub/symbol.h: Likewise.
8575         * include/grub/term.h: Likewise.
8576         * include/grub/terminfo.h: Likewise.
8577         * include/grub/tparm.h: Likewise.
8578         * include/grub/types.h: Likewise.
8579         * include/grub/video.h: Likewise.
8580         * include/grub/efi/api.h: Likewise.
8581         * include/grub/efi/chainloader.h: Likewise.
8582         * include/grub/efi/console.h: Likewise.
8583         * include/grub/efi/console_control.h: Likewise.
8584         * include/grub/efi/disk.h: Likewise.
8585         * include/grub/efi/efi.h: Likewise.
8586         * include/grub/efi/pe32.h: Likewise.
8587         * include/grub/efi/time.h: Likewise.
8588         * include/grub/i386/linux.h: Likewise.
8589         * include/grub/i386/setjmp.h: Likewise.
8590         * include/grub/i386/types.h: Likewise.
8591         * include/grub/i386/efi/kernel.h: Likewise.
8592         * include/grub/i386/efi/loader.h: Likewise.
8593         * include/grub/i386/efi/time.h: Likewise.
8594         * include/grub/i386/pc/biosdisk.h: Likewise.
8595         * include/grub/i386/pc/boot.h: Likewise.
8596         * include/grub/i386/pc/chainloader.h: Likewise.
8597         * include/grub/i386/pc/console.h: Likewise.
8598         * include/grub/i386/pc/init.h: Likewise.
8599         * include/grub/i386/pc/kernel.h: Likewise.
8600         * include/grub/i386/pc/loader.h: Likewise.
8601         * include/grub/i386/pc/memory.h: Likewise.
8602         * include/grub/i386/pc/multiboot.h: Likewise.
8603         * include/grub/i386/pc/serial.h: Likewise.
8604         * include/grub/i386/pc/time.h: Likewise.
8605         * include/grub/i386/pc/vbe.h: Likewise.
8606         * include/grub/i386/pc/vbeblit.h: Likewise.
8607         * include/grub/i386/pc/vbefill.h: Likewise.
8608         * include/grub/i386/pc/vbeutil.h: Likewise.
8609         * include/grub/i386/pc/vga.h: Likewise.
8610         * include/grub/ieee1275/ieee1275.h: Likewise.
8611         * include/grub/ieee1275/ofdisk.h: Likewise.
8612         * include/grub/powerpc/libgcc.h: Likewise.
8613         * include/grub/powerpc/setjmp.h: Likewise.
8614         * include/grub/powerpc/types.h: Likewise.
8615         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8616         * include/grub/powerpc/ieee1275/console.h: Likewise.
8617         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8618         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8619         * include/grub/powerpc/ieee1275/loader.h: Likewise.
8620         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8621         * include/grub/powerpc/ieee1275/time.h: Likewise.
8622         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8623         * include/grub/sparc64/libgcc.h: Likewise.
8624         * include/grub/sparc64/setjmp.h: Likewise.
8625         * include/grub/sparc64/types.h: Likewise.
8626         * include/grub/sparc64/ieee1275/console.h: Likewise.
8627         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8628         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8629         * include/grub/sparc64/ieee1275/time.h: Likewise.
8630         * include/grub/util/biosdisk.h: Likewise.
8631         * include/grub/util/getroot.h: Likewise.
8632         * include/grub/util/lvm.h: Likewise.
8633         * include/grub/util/misc.h: Likewise.
8634         * include/grub/util/raid.h: Likewise.
8635         * include/grub/util/resolve.h: Likewise.
8636         * io/gzio.c: Likewise.
8637         * kern/device.c: Likewise.
8638         * kern/disk.c: Likewise.
8639         * kern/dl.c: Likewise.
8640         * kern/elf.c: Likewise.
8641         * kern/env.c: Likewise.
8642         * kern/err.c: Likewise.
8643         * kern/file.c: Likewise.
8644         * kern/fs.c: Likewise.
8645         * kern/loader.c: Likewise.
8646         * kern/main.c: Likewise.
8647         * kern/misc.c: Likewise.
8648         * kern/mm.c: Likewise.
8649         * kern/parser.c: Likewise.
8650         * kern/partition.c: Likewise.
8651         * kern/rescue.c: Likewise.
8652         * kern/term.c: Likewise.
8653         * kern/efi/efi.c: Likewise.
8654         * kern/efi/init.c: Likewise.
8655         * kern/efi/mm.c: Likewise.
8656         * kern/i386/dl.c: Likewise.
8657         * kern/i386/efi/init.c: Likewise.
8658         * kern/i386/efi/startup.S: Likewise.
8659         * kern/i386/pc/init.c: Likewise.
8660         * kern/i386/pc/lzo1x.S: Likewise.
8661         * kern/i386/pc/startup.S: Likewise.
8662         * kern/ieee1275/ieee1275.c: Likewise.
8663         * kern/powerpc/cache.S: Likewise.
8664         * kern/powerpc/dl.c: Likewise.
8665         * kern/powerpc/ieee1275/cmain.c: Likewise.
8666         * kern/powerpc/ieee1275/crt0.S: Likewise.
8667         * kern/powerpc/ieee1275/init.c: Likewise.
8668         * kern/powerpc/ieee1275/openfw.c: Likewise.
8669         * kern/sparc64/cache.S: Likewise.
8670         * kern/sparc64/dl.c: Likewise.
8671         * kern/sparc64/ieee1275/init.c: Likewise.
8672         * kern/sparc64/ieee1275/openfw.c: Likewise.
8673         * loader/efi/chainloader.c: Likewise.
8674         * loader/efi/chainloader_normal.c: Likewise.
8675         * loader/i386/efi/linux.c: Likewise.
8676         * loader/i386/efi/linux_normal.c: Likewise.
8677         * loader/i386/pc/chainloader.c: Likewise.
8678         * loader/i386/pc/chainloader_normal.c: Likewise.
8679         * loader/i386/pc/linux.c: Likewise.
8680         * loader/i386/pc/linux_normal.c: Likewise.
8681         * loader/i386/pc/multiboot.c: Likewise.
8682         * loader/i386/pc/multiboot_normal.c: Likewise.
8683         * loader/powerpc/ieee1275/linux.c: Likewise.
8684         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8685         * normal/arg.c: Likewise.
8686         * normal/cmdline.c: Likewise.
8687         * normal/command.c: Likewise.
8688         * normal/completion.c: Likewise.
8689         * normal/execute.c: Likewise.
8690         * normal/function.c: Likewise.
8691         * normal/lexer.c: Likewise.
8692         * normal/main.c: Likewise.
8693         * normal/menu.c: Likewise.
8694         * normal/menu_entry.c: Likewise.
8695         * normal/misc.c: Likewise.
8696         * normal/parser.y: Likewise.
8697         * normal/script.c: Likewise.
8698         * normal/i386/setjmp.S: Likewise.
8699         * normal/powerpc/setjmp.S: Likewise.
8700         * normal/sparc64/setjmp.S: Likewise.
8701         * partmap/acorn.c: Likewise.
8702         * partmap/amiga.c: Likewise.
8703         * partmap/apple.c: Likewise.
8704         * partmap/gpt.c: Likewise.
8705         * partmap/pc.c: Likewise.
8706         * partmap/sun.c: Likewise.
8707         * term/gfxterm.c: Likewise.
8708         * term/terminfo.c: Likewise.
8709         * term/efi/console.c: Likewise.
8710         * term/i386/pc/console.c: Likewise.
8711         * term/i386/pc/serial.c: Likewise.
8712         * term/i386/pc/vesafb.c: Likewise.
8713         * term/i386/pc/vga.c: Likewise.
8714         * term/ieee1275/ofconsole.c: Likewise.
8715         * util/biosdisk.c: Likewise.
8716         * util/console.c: Likewise.
8717         * util/genmoddep.c: Likewise.
8718         * util/getroot.c: Likewise.
8719         * util/grub-emu.c: Likewise.
8720         * util/grub-mkdevicemap.c: Likewise.
8721         * util/grub-probe.c: Likewise.
8722         * util/lvm.c: Likewise.
8723         * util/misc.c: Likewise.
8724         * util/raid.c: Likewise.
8725         * util/resolve.c: Likewise.
8726         * util/update-grub.in: Likewise.
8727         * util/update-grub_lib.in: Likewise.
8728         * util/grub.d/00_header.in: Likewise.
8729         * util/grub.d/10_hurd.in: Likewise.
8730         * util/grub.d/10_linux.in: Likewise.
8731         * util/i386/efi/grub-install.in: Likewise.
8732         * util/i386/efi/grub-mkimage.c: Likewise.
8733         * util/i386/pc/grub-install.in: Likewise.
8734         * util/i386/pc/grub-mkimage.c: Likewise.
8735         * util/i386/pc/grub-mkrescue.in: Likewise.
8736         * util/i386/pc/grub-setup.c: Likewise.
8737         * util/i386/pc/misc.c: Likewise.
8738         * util/powerpc/ieee1275/grub-install.in: Likewise.
8739         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
8740         * util/powerpc/ieee1275/misc.c: Likewise.
8741         * video/bitmap.c: Likewise.
8742         * video/video.c: Likewise.
8743         * video/i386/pc/vbe.c: Likewise.
8744         * video/i386/pc/vbeblit.c: Likewise.
8745         * video/i386/pc/vbefill.c: Likewise.
8746         * video/i386/pc/vbeutil.c: Likewise.
8747         * video/readers/tga.c: Likewise.
8749 2007-07-02  Robert Millan  <rmh@aybabtu.com>
8751         * conf/i386-efi.rmk: Replace obsolete reference to
8752         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
8753         with util/getroot.c.
8754         * conf/powerpc-ieee1275.rmk: Likewise.
8755         * conf/sparc64-ieee1275.rmk: Likewise.
8757         * util/grub-emu.c (main): Fix unchecked pointer handling.
8759 2007-07-02  Robert Millan  <rmh@aybabtu.com>
8761         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
8762         invocation to fail, in order to support partition-less media.
8764         * util/i386/pc/grub-install.in: Likewise.
8766         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
8767         which fs or partmap modules are needed (akin to its sister scripts).
8769         Also use grub-probe to get rid of unportable /proc/mounts check.
8771         Print the same informational message that the other scripts do, before
8772         exiting.
8774 2007-06-23  Robert Millan  <rmh@aybabtu.com>
8776         * util/update-grub_lib.in (font_path): New function.  Determine whether
8777         a font file can be found and, if so, echo the GRUB path to it.
8779         * util/update-grub.in: Handle multiple terminals depending on user
8780         input, platform availability and font file presence.  Propagate
8781         variables of our findings to /etc/grub.d/ children.
8783         * util/grub.d/00_header.in: Handle multiple terminals, based on
8784         environment setup by update-grub.
8786 2007-06-23  Robert Millan  <rmh@aybabtu.com>
8788         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
8790 2007-06-21  Robert Millan  <rmh@aybabtu.com>
8792         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
8793         indicate end of data section in kernel image.
8794         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
8795         GRUB_KERNEL_MACHINE_DATA_END.
8797         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
8798         space for it.
8799         * kern/i386/efi/startup.S: Likewise.
8801         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
8802         during image generation.  Implement --prefix option to override this
8803         patch.
8804         * util/i386/efi/grub-mkimage.c: Likewise.
8806         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
8807         code to make path relative to its root into a separate function.
8809         * util/i386/pc/grub-install.in: Use newly provided
8810         make_system_path_relative_to_its_root() to convert ${grubdir}, then
8811         pass the result to grub-install --prefix.
8813 2007-06-13  Robert Millan  <rmh@aybabtu.com>
8815         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
8816         DEFAULT_DEVICE_MAP.
8817         * util/grub-emu.c: Use above definitions from misc.h instead of
8818         defining them.
8819         * util/grub-mkdevicemap.c: Likewise.
8820         * util/i386/pc/grub-setup.c: Likewise.
8821         * util/grub-probe.c: Likewise.
8822         (probe): Abort with grub_util_error() when either
8823         grub_guess_root_device or grub_util_get_grub_dev fails.
8825 2007-06-12  Robert Millan  <rmh@aybabtu.com>
8827         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
8828         "pager" assignment.
8829         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
8830         "pcdata".
8831         * util/grub-probe.c (probe): Likewise for "drive_name".
8833 2007-06-11  Robert Millan  <rmh@aybabtu.com>
8835         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
8836         not just the cdrom one.
8838 2007-06-11  Robert Millan  <rmh@aybabtu.com>
8840         * util/i386/pc/grub-mkrescue.in: Add "set -e".
8841         Add --pkglibdir=DIR option to override pkglibdir.
8842         Mention --image-type=TYPE in help output.
8843         Fix --grub-mkimage (it was a no-op).
8844         Abort gracefully when no parameter is given.
8846 2007-06-11  Robert Millan  <rmh@aybabtu.com>
8848         * util/i386/pc/grub-mkrescue.in: New file.
8849         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
8850         * Makefile.in: Handle bin_SCRIPTS.
8852 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
8854         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
8855         list of video modes.
8857 2007-06-06  Robert Millan  <rmh@aybabtu.com>
8859         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
8860         file doesn't exist, or if it is in a filesystem grub can't read.
8862         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
8863         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
8864         header comment to fit in 80 columns when the variables are resolved.
8866         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
8867         could be identified by update-grub.  Remove redundant check for
8868         unifont.pff existence (since convert_system_path_to_grub_path now
8869         handles that).
8871 2007-06-04  Robert Millan  <rmh@aybabtu.com>
8873         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
8875         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
8877         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
8879 2007-06-04  Robert Millan  <rmh@aybabtu.com>
8881         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
8883         * include/grub/partition.h: Declare grub_apple_partition_map_init and
8884         grub_apple_partition_map_fini.
8886         * util/biosdisk.c
8887         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
8888         to access >2 TiB disks).
8890         Print disk->total_sectors with %llu instead of %lu, since this
8891         variable is always 64-bit (prevents wrong disk size from being displayed
8892         on either >2 TiB disk or big-endian CPU).
8894         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
8895         into a generic case that supports all (sane) partition maps.
8897         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
8898         breaks big-endian.
8900         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
8901         and grub_apple_partition_map_fini() after that.
8903 2007-06-01  Robert Millan  <rmh@aybabtu.com>
8905         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
8907         * util/grub.d/00_header.in: Only enable gfxterm when
8908         convert_system_path_to_grub_path() succeeds.
8910 2007-05-20  Robert Millan  <rmh@aybabtu.com>
8912         * util/update-grub_lib.in: New file.
8913         * DISTLIST: Add update-grub_lib.in.
8914         * conf/common.rmk: Generate update-grub_lib and install it in
8915         $(lib_DATA).
8916         * Makefile.in: Add install routine for $(lib_DATA).
8918         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
8919         function provided by update-grub_lib to support arbitrary paths of
8920         unifont.pff.
8921         * util/update-grub.in: Use convert_system_path_to_grub_path() to
8922         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
8924 2007-05-19  Robert Millan  <rmh@aybabtu.com>
8926         * commands/i386/cpuid.c: New module.
8927         * DISTLIST: Add it.
8928         * conf/i386-efi.rmk: Enable cpuid.mod.
8929         * conf/i386-pc.rmk: Likewise.
8931 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
8933         * kern/disk.c (grub_disk_read): Check return value of
8934         grub_realloc().
8936 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
8938         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
8939         arrays.
8940         * disk/raid.c (grub_raid_open): Likewise.
8942 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
8944         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
8945         stack instead of on the heap.
8947         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
8948         before doing a read on it.
8950         * configure.ac: Only use -fno-stack-protector for the target
8951         environment.
8953 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
8955         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
8956         __attribute_ ((unused)) to mode_type argument.
8958         * util/getroot.c (grub_guess_root_device): Fix #endif.
8960         * kern/misc.c (memcmp): Fix prototype.
8962         * include/grub/partition.h [GRUB_UTIL]
8963         (grub_gpt_partition_map_init): Add prototype.
8964         (grub_gpt_partition_map_fini): Likewise.
8966         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
8967         at the right place.
8969         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
8970         (grub_fat_read_data): Likewise.
8971         (grub_fat_find_dir): Likewise.
8973         * font/manager.c (find_glyph): Make table a const.
8974         (grub_font_get_glyph): Remove bitmap from if statement.
8976 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
8978         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
8979         code, first search for device in /dev/mapper, then in /dev.
8980         (grub_util_get_grub_dev): New function.
8981         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
8982         prototype.
8983         * util/grub-probe.c (probe): Remove check for RAID, call
8984         grub_util_get_grub_dev() instead of
8985         grub_util_biosdisk_get_grub_dev().
8986         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
8987         grub_util_biosdisk_get_grub_dev().
8988         * util/i386/pc/grub-setup.c (main): Likewise.
8990 2007-05-16  Robert Millan  <rmh@aybabtu.com>
8992         * DISTLIST: Update for the latest changes.
8993         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
8994         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
8995         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
8996         grub/util/biosdisk.h.
8997         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
8998         grub/util/biosdisk.h.
9000 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9002         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9004 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9006         * util/i386/efi/grub-install.in: New.
9007         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9008         newly added grub-install.
9009         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9010         include.
9011         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9012         grub/util/biosdisk.h.
9013         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9014         grub/util/biosdisk.h.
9016 2007-05-16  Robert Millan  <rmh@aybabtu.com>
9018         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9019         * include/grub/util/biosdisk.h: ... here.
9020         * util/i386/pc/biosdisk.c: Moved to ...
9021         * util/biosdisk.c: ... here.
9022         * util/i386/pc/getroot.c: Moved to ...
9023         * util/getroot.c: ... here.
9024         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9025         * util/grub-mkdevicemap.c: ... here.
9026         * util/i386/pc/grub-probe.c: Moved to ...
9027         * util/grub-probe.c: ... here.
9029 2007-05-15  Robert Millan  <rmh@aybabtu.com>
9031         * util/update-grub.in: Remove duplicated line in grub.cfg header
9032         message.
9034 2007-05-13  Robert Millan  <rmh@aybabtu.com>
9036         * util/update-grub.in: Fix a few assumptions about the devices holding
9037         /, /boot and /boot/grub being the same.
9038         * util/grub.d/00_header.in: Likewise.
9039         * util/grub.d/10_hurd.in: Likewise.
9040         * util/grub.d/10_linux.in: Likewise.
9042         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9043         patterns.  Use that to define the `.old' suffix as older than `'.
9045         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9047         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9048         the grub.cfg header message.
9050 2007-05-11  Robert Millan  <rmh@aybabtu.com>
9052         * util/update-grub.in: Create device.map if it doesn't already exist,
9053         before attempting to run grub-probe.
9054         Check for grub-probe and grub-mkdevicemap with the same code
9055         grub-install is using.
9056         Remove test mode.
9058 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
9060         * Makefile.in: Add the datarootdir autoconf variable.
9062 2007-05-09  Robert Millan  <rmh@aybabtu.com>
9064         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9065         fail gracefully if dev->disk->partition == NULL.
9067 2007-05-07  Robert Millan  <rmh@aybabtu.com>
9069         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9070         determine partition map module.
9071         * util/i386/pc/grub-install.in: Use this feature to decide which
9072         partition module to load, instead of hardcoding pc and gpt.
9074 2007-05-07  Robert Millan  <rmh@aybabtu.com>
9076         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9077         source directory differs from build directory.
9079 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9081         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9082         initialisation.
9084 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9086         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9088 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9090         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9091         command-line arguments via ${GRUB_CMDLINE_LINUX}.
9093 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9095         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9096         (grub_probe_SOURCES): Likewise.
9097         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9098         GPT and initialize dos_part and bsd_part accordingly.
9099         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9100         install_bsd_part.
9101         (main): Activate gpt module for use during partition identification,
9102         and deactivate it afterwards.
9103         * util/i386/pc/grub-install.in: Add gpt module to core.img.
9104         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9105         partition identification, and deactivate it afterwards.
9107 2007-05-05  Robert Millan  <rmh@aybabtu.com>
9109         * term/i386/pc/console.c (grub_console_fini): Call
9110         grub_term_set_current() before grub_term_unregister().
9112 2007-05-04  Robert Millan  <rmh@aybabtu.com>
9114         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9115         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9116         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
9117         and update-grub_DATA.
9118         * conf/common.rmk: Build and install update-grub components.
9119         * conf/common.mk: Regenerate.
9120         * util/update-grub.in: New.  Core of update-grub.
9121         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
9122         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
9123         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
9124         * util/grub.d/README: New.  Document grub.d directory layout.
9126 2007-05-01  Robert Millan  <rmh@aybabtu.com>
9128         * util/grub-emu.c: Move initialization functions
9129         grub_util_biosdisk_init() and grub_init_all() before
9130         grub_util_biosdisk_get_grub_dev(), which relies on them.
9132 2007-04-19  Robert Millan  <rmh@aybabtu.com>
9134         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9135         it is used later.
9137 2007-04-18  Jerone Young  <jerone@gmail.com>
9139         * kernel/elf.c: Add missing parenthesis for conditional statement
9140         stanza.
9142 2007-04-10  Jerone Young  <jerone@gmail.com>
9144         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9145         continue on and look for device node with real device name.
9147 2007-04-10  Jerone Young  <jerone@gmail.com>
9149         * configure.ac: Add argument for autoconf to use transformation
9150         ability.
9151         * Makefile.in: Add autoconf package transformation code.
9152         * util/i386/pc/grub-install.in: Likewise.
9153         * util/powerpc/ieee1275/grub-install.in: Likewise.
9155 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
9157         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9158         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9159         (EXT2_REVISION): Likewise.
9160         (EXT2_INODE_SIZE): Likewise.
9161         (struct grub_ext2_block_group): Added a missing member
9162         "used_dirs".
9163         (grub_ext2_read_inode): Divide by the inode size in a superblock
9164         instead of 128 to obtain INODES_PER_BLOCK.
9165         Use the macro EXT2_INODE_SIZE instead of directly using
9166         SBLOCK->INODE_SIZE.
9168 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
9170         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9171         superblock instead of the structure size to compute an
9172         offset. This fixes the problem that GRUB could not read a
9173         filesystem when inode size is different from 128-byte.
9175 2007-03-05  Marco Gerards  <marco@gnu.org>
9177         * normal/main.c (read_config_file): When "menu" is not set, create
9178         an initial context.
9180 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
9182         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9183         (HEAP_LIMIT): New macro.
9184         (grub_claim_heap): Claim memory up to `heaplimit'.
9186 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
9188         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9189         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9190         (_start): Likewise.
9191         (grub_arch_modules_addr): Return address after `_end'.
9192         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9193         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9194         (add_segments): Calculate `_end' from phdr size and location.
9195         (ALIGN_UP): Moved to ...
9196         * include/grub/misc.h: here.
9197         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9198         New macro.
9199         (GRUB_IEEE1275_MODULE_BASE): Removed.
9201 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
9203         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9204         loop boundary.
9206 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
9208         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9209         All users updated.
9210         (grub_elf64_load_hook_t): Likewise.
9211         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9212         debug output.
9214 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
9216         * kern/mm.c: Update copyright.
9217         (grub_mm_debug): Correct syntax error.
9218         (grub_mm_dump_free): New function.
9219         (grub_debug_free): Call `grub_free'.
9220         * include/grub/mm.h: Update copyright.
9221         (grub_mm_dump_free): Add declaration.
9223 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
9225         * include/grub/ieee1275/ieee1275.h: Update copyright.
9226         * kern/powerpc/ieee1275/init.c: Likewise.
9227         * kern/powerpc/ieee1275/openfw.c: Likewise.
9229         * loader/powerpc/ieee1275/linux.c: Likewise.
9230         * include/grub/elfload.h: Likewise.
9231         * kern/elf.c: Likewise.
9232         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
9233         callers.
9234         (grub_elf64_load): Likewise.
9235         (grub_elf32_load_segment): Move to a nested function.
9236         (grub_elf64_load_segment): Likewise.
9238 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
9240         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9241         prototype.
9242         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9243         (grub_heap_len): Likewise.
9244         (HEAP_SIZE): New macro.
9245         (grub_claim_heap): New function.
9246         (grub_machine_init): Don't claim heap directly.  Call
9247         `grub_claim_heap'.
9248         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9249         (grub_available_iterate): New function.
9251 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
9253         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9254         * configure.ac: Use it for testing the HOST and TARGET compilers.
9256 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
9258         * Makefile.in (enable_grub_emu): New variable.
9259         * configure.ac (--enable-grub-emu): New option.
9260         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9261         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9262         * conf/i386-pc.rmk: Likewise.
9263         * conf/powerpc-ieee1275.rmk: Likewise.
9264         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9266 2006-12-12  Marco Gerards  <marco@gnu.org>
9268         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9270         * kern/env.c (grub_env_unset): Don't free the member `value' when
9271         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9272         pointer.
9274         * normal/main.c (current_menu): Removed.
9275         (free_menu): Unset the `menu' environment variable.
9276         (grub_normal_menu_addentry): Make use of the environment variable
9277         `menu', instead of using the global `current_menu'.  Allocate
9278         memory for the sourcecode of this entry.
9279         (read_config_file): New argument `nested', changed all callers.
9280         Only in the case of a new context, initialize a new menu.  Set the
9281         `menu' environment variable.
9282         (grub_normal_execute): Don't set and unset the environment
9283         variable `menu' here anymore.  Only free the menu when leaving the
9284         context.
9286         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9287         leak.
9289 2006-12-11  Marco Gerards  <marco@gnu.org>
9291         * normal/menu_entry.c (run): Fix off by one bug so the last line
9292         is executed.  Move the loader check to outside the loop.
9294 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
9296         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9298 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
9300         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9301         the number of sectors.  Reported by Andrey Shuvikov
9302         <mr_hyro@yahoo.com>.
9304 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
9306         * kern/disk.c (grub_disk_read): When there is a read error, always
9307         try to read only the necessary data.
9309         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9310         disk/raid.c.
9311         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9312         prototype.
9313         [GRUB_UTIL] (grub_raid_fini): Likewise.
9314         [GRUB_UTIL] (grub_lvm_init): Likewise.
9315         [GRUB_UTIL] (grub_lvm_fini): Likewise.
9316         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9317         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9318         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9319         and grub_raid_fini().
9321 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
9323         * include/grub/types.h (__unused): Rename to UNUSED.
9324         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9325         (grub_elf64_size): Likewise.
9327 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9329         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9330         grub_error_push and grub_error_pop in the error-handling path.
9331         (grub_elf32_load_segment): Only call grub_file_read with non-zero
9332         length.
9334 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
9336         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9337         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9338         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9339         (kernel_elf_SOURCES): Likewise.
9340         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9341         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9342         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9343         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9344         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9345         (elf_mod_SOURCES): New variable.
9346         (elf_mod_CFLAGS): Likewise.
9347         (elf_mod_LDFLAGS): Likewise.
9348         * include/grub/types.h (__unused): New macro.
9349         * include/grub/elfload.h: New file.
9350         * kern/elf.c: Likewise.
9351         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9352         (ELF32_LOADMASK): New macro.
9353         (ELF64_LOADMASK): Likewise.
9354         (vmlinux): Removed.
9355         (grub_linux_load32): New function.
9356         (grub_linux_load64): Likewise.
9357         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9358         Use grub_elf_t instead of grub_file_t.
9360 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
9362         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9363         `catch_result' to struct set_color_args.
9365 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
9367         * normal/menu.c: Include grub/script.h.
9368         * normal/menu_entry.c: Likewise.
9369         * include/grub/normal.h: Do not include grub/script.h.
9371 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
9373         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9375 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
9377         * kern/disk.c (grub_disk_open): Print debug messages when opening a
9378         disk.
9379         (grub_disk_close): Print debug messages when closing a disk.
9380         (grub_disk_read): Print debug messages when disk read fails.
9381         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9382         filesystem type.
9383         * kern/partition.c: Include misc.h.
9384         (grub_partition_iterate): Print debug messages when detecting
9385         partition type.
9387 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
9389         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9390         is negative.
9391         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9393 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
9395         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9396         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9398 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
9400         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9401         instead of sizeof(lv). Patch by Michael Guntsche.
9403 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
9405         * disk/lvm.c: Rename VGS to VG_LIST.
9406         (grub_lvm_iterate): Change VGS->LV to VG-LV.
9407         (grub_lvm_open): Likewise.
9408         Thanks to Michael Guntsche for finding this bug.
9410 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
9412         * configure.ac (AC_INIT): Bumped to 1.95.
9414 2006-10-14  Robert Millan  <rmh@aybabtu.com>
9416         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9417         with "/dev/.static/dev/md".
9419 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
9421         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9422         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9423         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9424         DRIVE_NAME are always freed.
9426         * util/i386/pc/biosdisk.c (make_device_name): Add one into
9427         DOS_PART, as a DOS partition is counted from one instead of zero
9428         now. Reported by Robert Millan.
9430 2006-10-14  Robert Millan  <rmh@aybabtu.com>
9432         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9433         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9434         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9435         string returned by grub_guess_root_device.
9436         * util/i386/pc/grub-setup.c: Likewise.
9437         * util/i386/pc/grub-probefs.c: Likewise.
9439         * util/i386/pc/grub-probefs.c: Rename to ...
9440         * util/i386/pc/grub-probe.c: ... this.
9441         * DISTLIST: Remove grub-probefs, add grub-probe.
9442         * conf/i386-efi.rmk: Likewise.
9443         * conf/i386-pc.rmk: Likewise.
9444         * util/i386/pc/grub-install.in: Likewise.
9446         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9447         choose which information we want to print.
9449 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
9451         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9452         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9453         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9454         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9455         video/readers/tga.c and video/i386/pc/vbeutil.c.
9457 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
9459         Added support for RAID and LVM.
9461         * disk/lvm.c: New file.
9462         * disk/raid.c: Likewise.
9463         * include/grub/lvm.h: Likewise.
9464         * include/grub/raid.h: Likewise.
9465         * include/grub/util/lvm.h: Likewise.
9466         * include/grub/util/raid.h: Likewise.
9467         * util/lvm.c: Likewise.
9468         * util/raid.c: Likewise.
9470         * include/grub/disk.h (grub_disk_dev_id): Add
9471         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9472         (grub_disk_get_size): New prototype.
9473         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9474         returns a partition.
9475         (grub_disk_get_size): New function.
9477         * kern/i386/pc/init.c (make_install_device): Copy the prefix
9478         verbatim if grub_install_dos_part is -2.
9480         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9481         and LVM devices.
9483         * util/i386/pc/grub-setup.c (setup): New argument
9484         MUST_EMBED. Force embedding of GRUB when the argument is
9485         true. Close FILE before returning.
9486         (main): Add support for RAID and LVM.
9488         * conf/common.rmk: Add RAID and LVM modules.
9489         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9490         util/lvm.c.
9491         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9493         * kern/misc.c (grub_strstr): New function.
9494         * include/grub/misc.h (grub_strstr): New prototype.
9496 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
9498         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9500 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
9502         * kern/misc.c (grub_strtoull): Guess the base only if not
9503         specified.
9505 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
9507         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9508         PowerMac support.
9510 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
9512         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9514         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9515         Remove `flags' argument.  All callers changed.
9516         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9517         (IEEE1275_IHANDLE_INVALID): New variable.
9518         (IEEE1275_CELL_INVALID): New variable.
9519         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9520         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9521         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9522         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9523         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9524         codes from Open Firmware.  All callers updated.
9525         (grub_ieee1275_next_property): Directly return Open Firmware return
9526         code.
9527         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9528         Standardize error checking from `grub_ieee1275_get_property'.
9529         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9530         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
9532 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
9534         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9535         `instance_to_package_args' to `instance_to_path_args'.
9537         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9538         `grub_ieee1275_chosen'.
9540         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9541         `grub_ieee1275_interpret'.
9543 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
9545         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9547 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
9549         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9550         (__cmpdi): Likewise.
9552         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9553         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
9554         `grub_ssize_t'.
9556         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
9558         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9559         to type `grub_ssize_t'.
9560         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9562 2006-09-22  Marco Gerards  <marco@gnu.org>
9564         * normal/script.c (grub_script_create_cmdmenu): Skip leading
9565         newlines.
9567 2006-09-22  Marco Gerards  <marco@gnu.org>
9569         * commands/echo.c: New file.
9571         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9573         * conf/common.rmk (echo_mod_SOURCES): New variable.
9574         (echo_mod_CFLAGS): Likewise.
9575         (echo_mod_LDFLAGS): Likewise.
9577 2006-09-22  Marco Gerards  <marco@gnu.org>
9579         * normal/main.c (get_line): Malloc memory instead of using
9580         preallocated memory.  Removed the arguments `cmdline' and
9581         `max_len'.  Updated all callers.
9583 2006-09-22  Marco Gerards  <marco@gnu.org>
9585         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9586         (normal_mod_DEPENDENCIES): Likewise.
9588         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9589         (normal_mod_DEPENDENCIES): Likewise.
9591         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9593 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
9595         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9596         programs.
9597         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9598         (normal_mod_DEPENDENCIES): Likewise.
9599         * conf/i386-pc.mk: Regenerate.
9600         * conf/i386-efi.mk: Likewise
9601         * conf/common.mk: Likewise.
9602         * conf/powerpc-ieee1275.mk: Likewise.
9603         * conf/sparc64-ieee1275.mk: Likewise.
9605 2006-09-22  Robert Millan  <rmh@aybabtu.com>
9607         Sync with i386 version.
9608         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9609         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9611 2006-09-21  Robert Millan  <rmh@aybabtu.com>
9613         Import from GRUB Legacy (lib/device.c):
9614         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9615         (init_device_map) [__linux__]: Add support for I2O devices.
9617 2006-09-14  Marco Gerards  <marco@gnu.org>
9619         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9620         `-melf_i386'.
9622 2006-09-14  Robert Millan  <rmh@aybabtu.com>
9624         * util/i386/pc/grub-install.in: Skip menu.lst when removing
9625         /boot/grub/*.lst.
9627         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
9629         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9630         before adding it to device.map.
9632 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
9634         * genmk.rb: Let GCC generate dependencies the first time it
9635         compiles a file; using the -MD option.
9636         * conf/common.mk: Regenerate.
9637         * conf/i386-pc.mk: Likewise.
9638         * conf/i386-efi.mk: Likewise.
9639         * conf/powerpc-ieee1275.mk: Likewise.
9640         * conf/sparc64-ieee1275.mk: Likewise.
9642 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
9644         Move the prototypes of grub_setjmp and grub_longjmp to
9645         cpu/setjmp.h, so that each architecture may specify different
9646         attributes.
9648         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
9649         (grub_longjmp): Likewise.
9650         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
9651         (grub_longjmp): Likewise.
9652         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
9653         (grub_longjmp): Likewise.
9655         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
9656         [!GRUB_UTIL] (grub_longjmp): Removed.
9658 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
9660         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
9661         "color!" method does not return any value.
9663 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
9665         * include/grub/bitmap.h: New file.
9667         * include/grub/i386/pc/vbeutil.h: Likewise.
9669         * video/bitmap.c: Likewise.
9671         * video/readers/tga.c: Likewise.
9673         * video/i386/pc/vbeutil.c: Likewise.
9675         * commands/videotest.c: Code cleanup and updated to reflect to new
9676         video API.
9678         * term/gfxterm.c: Likewise.
9680         * video/video.c: Likewise.
9682         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
9683         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
9684         (bitmap_mod_SOURCES): New entry.
9685         (bitmap_mod_CFLAGS): Likewise.
9686         (bitmap_mod_LDFLAGS): Likewise.
9687         (tga_mod_SOURCES): Likewise.
9688         (tga_mod_CFLAGS): Likewise.
9689         (tga_mod_LDFLAGS): Likewise.
9691         * include/grub/video.h (grub_video_blit_operators): New enum type.
9692         (grub_video_render_target): Changed as forward declaration and moved
9693         actual definition to be video driver specific.
9694         (grub_video_adapter.blit_bitmap): Added blitting operator.
9695         (grub_video_adapter.blit_render_target): Likewise.
9696         (grub_video_blit_bitmap): Likewise.
9697         (grub_video_blit_render_target): Likewise.
9699         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
9700         driver specific render target definition.
9701         (grub_video_vbe_map_rgba): Added driver internal helper.
9702         (grub_video_vbe_unmap_color): Updated to use
9703         grub_video_i386_vbeblit_info.
9704         (grub_video_vbe_get_video_ptr): Likewise.
9706         * include/grub/i386/pc/vbeblit.h
9707         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
9708         grub_video_i386_vbeblit_info.
9709         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
9710         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
9711         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
9712         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
9713         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
9714         (grub_video_i386_vbeblit_index_index): Likewise.
9715         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
9716         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
9717         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
9718         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
9719         operator.
9720         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
9721         operator.
9723         * video/i386/pc/vbeblit.c: Updated to reflect changes on
9724         include/grub/i386/pc/vbeblit.h.
9726         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
9727         Updated to use grub_video_i386_vbeblit_info.
9728         (grub_video_i386_vbefill_R8G8B8): Likewise.
9729         (grub_video_i386_vbefill_index): Likewise.
9730         (grub_video_i386_vbefill): Added generic filler.
9732         * video/i386/pc/vbefill.c: Updated to reflect changes on
9733         include/grub/i386/pc/vbefill.h.
9735         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
9736         grub_video_i386_vbeblit_info.
9737         (grub_video_vbe_unmap_color): Likewise.
9738         (grub_video_vbe_blit_glyph): Likewise.
9739         (grub_video_vbe_scroll): Likewise.
9740         (grub_video_vbe_draw_pixel): Removed function.
9741         (grub_video_vbe_get_pixel): Likewise.
9742         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
9743         updated code to use it.
9744         (common_blitter): Added common blitter for render target and bitmap.
9745         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
9746         (grub_video_vbe_blit_render_target): Likewise.
9748 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
9750         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
9751         is in text mode if there is no console control protocol instance
9752         available.
9754 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
9756         * include/grub/video.h: Code cleanup.
9758         * include/grub/i386/pc/vbe.h: Likewise.
9760         * video/i386/pc/vbe.c: Likewise.
9762         * video/i386/pc/vbeblit.c: Likewise.
9764         * video/i386/pc/vbefill.c: Likewise.
9766         * video/video.c: Likewise.  Also added more comments.
9768 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
9770         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
9771         (struct grub_biosdisk_dap): Likewise.
9773         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
9774         linkage settings for all functions.
9776 2006-07-12  Marco Gerards  <marco@gnu.org>
9778         * configure.ac (--enable-mm-debug): Fix typo.
9780         * genkernsyms.sh.in: Use proper quoting for `CC'.
9782 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
9784         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
9785         (normal_mod_ASFLAGS): Remove "-m32".
9787 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
9789         * util/misc.c: Include config.h.
9790         [!HAVE_MEMALIGN]: Do not include malloc.h.
9791         (grub_memalign): Use posix_memalign, if present. Then, use
9792         memalign, if present. Otherwise, emit an error.
9794         * util/grub-emu.c: Do not include malloc.h.
9796         * include/grub/util/misc.h: Include unistd.h. This is required for
9797         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
9798         D. Eades III <hde@foobar-qux.org>.
9800         * configure.ac (AC_GNU_SOURCE): Added.
9801         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
9802         type.
9804 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
9806         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
9807         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
9809 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
9811         * include/grub/types.h (grub_host_addr_t): Rename to
9812         grub_target_addr_t.
9813         (grub_host_off_t): Rename to grub_target_off_t.
9814         (grub_host_size_t): Rename to grub_target_size_t.
9815         (grub_host_ssize_t): Rename to grub_target_ssize_t.
9816         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
9818         * include/grub/kernel.h (struct grub_module_header): Change type
9819         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
9820         (grub_module_info): Likewise.
9822 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
9824         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
9825         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
9826         Velazquez <jesus.velazquez@gmail.com>.
9828 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
9830         Count partitions from 1 instead of 0 in the string representation
9831         of partitions. Still use 0-based internally.
9833         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
9834         (sun_partition_map_iterate): Use grub_partition_t instead of
9835         struct grub_partition *. Cast DESC->START_CYLINDER to
9836         grub_uint64_t after converting the endian.
9837         (sun_partition_map_probe): Subtract 1 for PARTNUM.
9838         (sun_partition_map_get_name): Add 1 to P->INDEX.
9840         * partmap/pc.c (grub_partition_parse): Subtract 1 for
9841         PCDATA->DOS_PART.
9842         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
9844         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
9845         zero instead of one.
9846         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
9847         (gpt_partition_map_get_name): Add 1 into P->INDEX.
9849         * partmap/apple.c (apple_partition_map_iterate): Change the type
9850         of POS to unsigned.
9851         (apple_partition_map_probe): Subtract 1 for PARTNUM.
9852         (apple_partition_map_get_name): Add 1 into P->INDEX.
9854         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
9855         of POS to unsigned.
9856         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
9857         calculate the offset of a partition.
9858         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
9859         (amiga_partition_map_get_name): Add 1 into P->INDEX.
9861         * partmap/acorn.c (acorn_partition_map_find): Change the type of
9862         SECTOR to grub_disk_addr_t.
9863         (acorn_partition_map_iterate): Likewise.
9864         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
9865         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
9866         top.
9867         (acorn_partition_map_get_name): Add 1 into P->INDEX.
9869         * kern/i386/pc/init.c (make_install_device): Add 1 into
9870         GRUB_INSTALL_DOS_PART.
9872         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
9873         conditional.
9875 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
9877         Clean up the code to support 64-bit addressing in disks and
9878         files. This change is not enough for filesystems yet.
9880         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
9881         type of "start" to grub_uint64_t.
9882         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
9883         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
9884         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
9885         convert addresses.
9887         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
9888         to grub_disk_addr_t.
9890         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
9891         string.
9893         * partmap/pc.c (pc_partition_map_iterate): Likewise.
9895         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
9896         to char *.
9898         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
9900         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
9902         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
9904         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
9905         to grub_off_t, to detect an error from grub_file_seek.
9906         (grub_multiboot_load_elf32): Likewise.
9908         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
9909         maximum unsigned long value when an overflow is detected.
9910         (grub_strtoull): New function.
9911         (grub_divmod64): Likewise.
9912         (grub_lltoa): use grub_divmod64.
9914         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
9915         grub_disk_addr_t.
9916         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
9917         the pointer to next character. Use grub_strtoull instead of
9918         grub_strtoul.
9919         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
9920         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
9921         respectively.
9923         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
9924         return value is signed.
9925         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
9926         test if OFFSET is less than zero, as OFFSET is unsigned now.
9928         * kern/disk.c (struct grub_disk_cache): Change the type of
9929         "sector" to grub_disk_addr_t.
9930         (grub_disk_cache_get_index): Change the type of SECTOR to
9931         grub_disk_addr_t. Calculate the hash with SECTOR casted to
9932         unsigned after shifting.
9933         (grub_disk_cache_invalidate): Change the type of SECTOR to
9934         grub_disk_addr_t.
9935         (grub_disk_cache_unlock): Likewise.
9936         (grub_disk_cache_store): Likewise.
9937         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
9938         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
9939         grub_disk_addr_t and grub_uint64_t, respectively.
9940         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
9941         body, as the value of OFFSET is tweaked by
9942         grub_disk_check_range. Change the types of START_SECTOR, LEN and
9943         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
9944         respectively.
9945         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
9946         body, as the value of OFFSET is tweaked by
9947         grub_disk_check_range. Change the types of LEN and N to
9948         grub_size_t.
9950         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
9951         and "saved_offset" to grub_off_t.
9952         (test_header): Cast BUF to char *.
9953         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
9954         to char *.
9955         (grub_gzio_read): Change the types of OFFSET and SIZE to
9956         grub_off_t and grub_size_t, respectively.
9958         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
9959         Removed.
9960         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
9961         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
9962         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
9963         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
9964         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
9966         * include/grub/types.h (grub_off_t): Unconditionally set to
9967         grub_uint64_t.
9968         (grub_disk_addr_t): Changed to grub_uint64_t.
9970         * include/grub/partition.h (struct grub_partition): Change the
9971         types of "start", "len" and "offset" to grub_disk_addr_t,
9972         grub_uint64_t and grub_disk_addr_t, respectively.
9973         (grub_partition_get_start): Return grub_disk_addr_t.
9974         (grub_partition_get_len): Return grub_uint64_t.
9976         * include/grub/misc.h (grub_strtoull): New prototype.
9977         (grub_divmod64): Likewise.
9979         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
9980         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
9981         grub_off_t, respectively.
9982         All callers and references changed.
9984         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
9985         grub_size_t in "read".
9986         All callers and references changed.
9988         * include/grub/file.h (struct grub_file): Change the types of
9989         "offset" and "size" to grub_off_t and grub_off_t,
9990         respectively. Change the type of SECTOR to grub_disk_addr_t in
9991         "read_hook".
9992         (grub_file_read): Change the type of LEN to grub_size_t.
9993         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
9994         grub_off_t.
9995         (grub_file_size): Return grub_off_t.
9996         (grub_file_tell): Likewise.
9997         All callers and references changed.
9999         * include/grub/disk.h (struct grub_disk_dev): Change the types of
10000         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10001         "write".
10002         (struct grub_disk): Change the type of "total_sectors" to
10003         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10004         "read_hook".
10005         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10006         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10007         (grub_disk_write): Likewise.
10008         All callers and references changed.
10010         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10011         char * for grub_strncmp to silence gcc.
10012         (grub_iso9660_mount): Likewise.
10013         (grub_iso9660_mount): Likewise.
10014         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10015         return statement.
10016         (grub_iso9660_iterate_dir): Likewise.
10017         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10019         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10020         LEN to grub_disk_addr_t and grub_size_t, respectively.
10022         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10024         * fs/jfs.c (grub_jfs_read_file): Likewise.
10026         * fs/minix.c (grub_jfs_read_file): Likewise.
10028         * fs/sfs.c (grub_jfs_read_file): Likewise.
10030         * fs/ufs.c (grub_jfs_read_file): Likewise.
10032         * fs/xfs.c (grub_jfs_read_file): Likewise.
10034         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10035         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10036         respectively.
10038         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10039         BLKNR to -1 instead of returning GRUB_ERRNO.
10040         (grub_ext2_read_file): Change the types of SECTOR and
10041         LEN to grub_disk_addr_t and grub_size_t, respectively.
10043         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10044         LEN to grub_disk_addr_t and grub_size_t, respectively.
10046         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10047         grub_file_read.
10049         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10050         string. Do not cast SECTOR explicitly.
10052         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10053         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10054         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10055         grub_disk_addr_t and grub_size_t, respectively. If the sector is
10056         over 2TB and LBA mode is not supported, raise an error.
10057         (get_safe_sectors): New function.
10058         (grub_biosdisk_read): Use get_safe_sectors.
10059         (grub_biosdisk_write): Likewise.
10061         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10062         (grub_efidisk_write): Likewise.
10064         * disk/loopback.c (delete_loopback): Cosmetic changes.
10065         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10066         correctly.
10067         (grub_loopback_open): Likewise.
10068         (grub_loopback_read): Likewise. Also, change the type of POS to
10069         grub_off_t, and fix the usage of grub_memset.
10071         * commands/i386/pc/play.c: Include grub/machine/time.h.
10073         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10074         print FILE->SIZE.
10076         * commands/configfile.c: Include grub/env.h.
10078         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10079         GRUB_ERRNO directly instead. Change the type of POS to
10080         grub_off_t. Follow the coding standard.
10082         * commands/blocklist.c: Include grub/partition.h.
10083         (grub_cmd_blocklist): Return an error if the underlying device is
10084         not a disk. Take the starting sector of a partition into account,
10085         if a partition is used.
10087         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10088         a length field.
10089         (lba_mode): Support 64-bit addresses.
10090         (chs_mode): Likewise.
10091         (copy_buffer): Adapted to the new offsets of a length field and a
10092         segment field.
10093         (blocklist_default_start): Allocate 64-bit space.
10095         * boot/i386/pc/boot.S (force_lba): Removed.
10096         (boot_drive): Moved to under KERNEL_SECTOR.
10097         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10098         space.
10099         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10100         is useless.
10101         (lba_mode): Refactored to support a 64-bit address. More size
10102         optimization.
10103         (setup_sectors): Likewise.
10105 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
10107         * DISTLIST: Added include/grub/i386/linux.h. Removed
10108         include/grub/i386/pc/linux.h
10110         * configure.ac (AC_INIT): Bumped to 1.94.
10112         * config.guess: Updated from gnulib.
10113         * config.sub: Likewise.
10114         * install-sh: Likewise.
10115         * mkinstalldirs: Likewise.
10117 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
10119         * conf/common.rmk (grub_modules_init.lst): Depended on
10120         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10121         MODSRCFILES.
10123         * genmk.rb (PModule::rule): Reverted the previous change.
10125 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
10127         * conf/common.rmk (grub_modules_init.lst): Depends on
10128         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10129         that the target does not exist before producing.
10130         (grub_modules_init.h): Remove the target before generating.
10131         (grub_emu_init.c): Likewise.
10133         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10135 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
10137         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10138         for the target-specific tests. Make sure that we also have the
10139         up-to-date target variables for those tests.
10141 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
10143         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10144         (PModule::rule): Likewise.
10146 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
10148         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10149         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10150         target-specific flags should be prefixed.
10151         (PModule::rule): Likewise.
10153 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
10155         * configure.ac (CMP): Check if cmp is available explicitly.
10157 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
10159         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10160         (target_cpu): New variable.
10161         (pkglibdir): Use target_cpu instead of host_cpu.
10163         * util/i386/pc/grub-install.in (host_cpu): Removed.
10164         (target_cpu): New variable.
10165         (pkglibdir): Use target_cpu instead of host_cpu.
10167         * util/genmoddep.c: Removed.
10169         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10170         instead of GRUB_HOST_SIZEOF_VOID_P.
10171         * kern/dl.c: Likewise.
10173         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10174         ...
10175         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10176         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10177         (GRUB_TARGET_SIZEOF_LONG): ... this.
10178         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10179         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10180         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10181         to ...
10182         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10183         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10184         (GRUB_TARGET_SIZEOF_LONG): ... this.
10185         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10186         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10187         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10188         to ...
10189         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10190         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10191         (GRUB_TARGET_SIZEOF_LONG): ... this.
10192         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10193         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10195         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10196         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10197         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10198         instead of GRUB_HOST_SIZEOF_LONG.
10199         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10200         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10201         GRUB_CPU_WORDS_BIGENDIAN.
10202         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10203         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10204         grub_host_ssize_t.
10206         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10207         (genmoddep_SOURCES): Likewise.
10208         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10209         (genmoddep_SOURCES): Likewise.
10210         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10211         (genmoddep_SOURCES): Likewise.
10212         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10213         Likewise.
10214         (genmoddep_SOURCES): Likewise.
10216         * genmoddep.awk: New file.
10218         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10219         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10220         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10221         (PModule::rule): Likewise.
10222         (Program::rule): Likewise.
10223         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10224         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10225         respectively.
10227         * configure.ac: Rewritten intensively to use host and target
10228         instead of build and host, respectively.
10230         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10231         (host_cpu): Removed.
10232         (target_cpu): New variable.
10233         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10234         (BUILD_CC): Removed.
10235         (BUILD_CFLAGS): Likewise.
10236         (BUILD_CPPFLAGS): Likewise.
10237         (TARGET_CC): New variable.
10238         (TARGET_CFLAGS): Likewise.
10239         (TARGET_CPPFLAGS): Likewise.
10240         (TARGET_LDFLAGS): Likewise.
10241         (AWK): Likewise.
10242         (include): Use target_cpu instead of host_cpu.
10243         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
10245         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10247 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
10249         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10250         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
10251         field 'false' to 'exec_on_false'.
10252         (grub_script_create_cmdif): Renamed argument names to reflect above
10253         changes.
10255         * normal/execute.c (grub_script_execute_cmdif): Likewise.
10257         * normal/script.c (grub_script_create_cmdif): Likewise.
10259 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
10261         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10262         top.
10263         (grub_hfsplus_btree_recptr): Likewise.
10264         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10265         FILEBLOCK both to pass a block number and store next block
10266         number.
10267         (grub_hfsplus_read_block): Rewritten heavily to support an extent
10268         overflow file correctly. Specify errors appropriately, because
10269         fshelp expects that GRUB_ERRNO is set when fails. Reuse
10270         grub_hfsplus_btree_recptr to get the pointer to a found key.
10271         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10272         is found.
10274         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10275         linux.mod.
10276         (_linux_mod_SOURCES): New variable.
10277         (_linux_mod_CFLAGS): Likewise.
10278         (_linux_mod_LDFLAGS): Likewise.
10279         (linux_mod_SOURCES): Likewise.
10280         (linux_mod_CFLAGS): Likewise.
10281         (linux_mod_LDFLAGS): Likewise.
10283         * DISTLIST: Added loader/i386/efi/linux.c,
10284         loader/i386/efi/linux_normal.c and
10285         include/grub/i386/efi/loader.h.
10287         * loader/i386/efi/linux.c: New file.
10288         * loader/i386/efi/linux_normal.c: Likewise.
10289         * include/grub/i386/efi/loader.h: Likewise.
10291 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
10293         * commands/blocklist.c: New file.
10295         * DISTLIST: Added commands/blocklist.c.
10297         * term/efi/console.c (grub_console_highlight_color): Use a lighter
10298         color for the background, and a darker color for the foreground.
10299         (grub_console_checkkey): Return READ_KEY.
10300         (grub_console_cls): Set the background to
10301         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10303         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10305         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10306         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10308         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10309         prototype.
10311         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10312         BG. The spec is wrong again.
10314         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10315         prototype.
10316         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10318         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10319         commands/blocklist.c.
10320         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10322         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10323         (blocklist_mod_SOURCES): New variable.
10324         (blocklist_mod_CFLAGS): Likewise.
10325         (blocklist_mod_LDFLAGS): Likewise.
10327 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
10329         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10330         duplication.
10331         (lba_mode): Use %eax more intensively to reduce the code size.
10333 2006-05-20  Marco Gerards  <marco@gnu.org>
10335         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10337         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
10338         for `menuentry'.
10339         (script): Accept leading newlines.
10340         (newlines): New rule to describe 0 or more newlines.
10341         (commands): Accept `command' with trailing newline.  Fixed the
10342         order in which arguments were passed to `grub_script_add_cmd'.
10343         Accept commands separated by newlines.
10344         (function): Changed to accept newlines.
10345         (menuentry) Rewritten.
10347         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10348         front of the list, instead of to the end.
10350 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
10352         * util/i386/pc/grub-install.in (bindir): New variable.
10353         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10354         Shaver <lbgwjl@gmail.com>.
10356 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
10358         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10359         grub/machine/linux.h
10360         * loader/i386/pc/linux.c: Likewise.
10362         * include/grub/i386/pc/linux.h: Moved to ...
10363         * include/grub/i386/linux.h: ... here.
10365         * include/grub/i386/linux.h (struct linux_kernel_params): New
10366         struct.
10368 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
10370         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10371         checking.
10372         (grub_video_vbe_blit_glyph): Likewise.
10373         (grub_video_vbe_blit_bitmap): Likewise.
10374         (grub_video_vbe_blit_render_target): Likewise.
10376 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
10378         * configure.ac (--with-platform): Properly quote the square
10379         brackets.
10381 2006-05-08  Marco Gerards  <marco@gnu.org>
10383         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10384         this...
10385         (kernel_elf_HEADERS): ...to this.  Updated all users.
10386         (grubof_symlist.c): Renamed from this...
10387         (kernel_elf_symlist.c): ...to this.  Updated all users.
10388         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10389         (grubof_SOURCES): Renamed from this...
10390         (kernel_elf_SOURCES): ...to this.
10391         (grubof_HEADERS): Renamed from this...
10392         (kernel_elf_HEADERS): ...to this.
10393         (grubof_CFLAGS): Renamed from this...
10394         (kernel_elf_CFLAGS): ...to this.
10395         (grubof_ASFLAGS): Renamed from this...
10396         (kernel_elf_ASFLAGS): ...to this.
10397         (grubof_LDFLAGS): Renamed from this...
10398         (kernel_elf_LDFLAGS): ...to this.
10400         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10401         this...
10402         (kernel_elf_HEADERS): ...to this.  Updated all users.
10403         (grubof_symlist.c): Renamed from this...
10404         (kernel_elf_symlist.c): ...to this.  Updated all users.
10405         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10406         (grubof_SOURCES): Renamed from this...
10407         (kernel_elf_SOURCES): ...to this.
10408         (grubof_HEADERS): Renamed from this...
10409         (kernel_elf_HEADERS): ...to this.
10410         (grubof_CFLAGS): Renamed from this...
10411         (kernel_elf_CFLAGS): ...to this.
10412         (grubof_ASFLAGS): Renamed from this...
10413         (kernel_elf_ASFLAGS): ...to this.
10414         (grubof_LDFLAGS): Renamed from this...
10415         (kernel_elf_LDFLAGS): ...to this.
10417         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10418         `kernel.elf' instead of `grubof'.
10420 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
10422         Add --with-platform to configure. Use pkglibdir instead of
10423         pkgdatadir. This is reported by Roger Leigh.
10425         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10426         (host_vendor): Likewise.
10427         (host_os): Likewise.
10428         (pkgdatadir): Likewise.
10429         (platform): New variable.
10430         (pkglibdir): Likewise.
10431         Use PKGLIBDIR instead of PKGDATADIR.
10433         * util/i386/pc/grub-install.in (datadir): Removed.
10434         (host_vendor): Likewise.
10435         (host_os): Likewise.
10436         (pkgdatadir): Likewise.
10437         (platform): New variable.
10438         (pkglibdir): Likewise.
10439         Use PKGLIBDIR instead of PKGDATADIR.
10441         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10442         instead of GRUB_DATADIR.
10443         (main): Likewise.
10444         * util/i386/pc/grub-mkimage.c (usage): Likewise.
10445         (main): Likewise.
10446         * util/i386/efi/grub-mkimage.c (usage): Likewise.
10447         (main): Likewise.
10449         * configure.ac (--with-platform): New option.
10450         Use PLATFORM instead of HOST_VENDOR to specify a platform.
10452         * Makefile.in: Include a makefile based on PLATFORM instead of
10453         HOST_VENDOR.
10454         (pkgdatadir): Not appended by the machine type.
10455         (pkglibdir): Appended by the machine type.
10456         (host_vendor): Removed.
10457         (platform): New variable.
10458         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10459         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10460         (uninstall): Likewise.
10462 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
10464         Use the environment context in the menu. Remove the commands
10465         "default" and "timeout", and use variables instead.
10467         * normal/menu.c: Include grub/env.h.
10468         (print_entry): Cast TITLE to silence gcc.
10469         (get_timeout): New function.
10470         (set_timeout): Likewise.
10471         (get_entry_number): Likewise.
10472         (run_menu): Use a default entry, a fallback entry and a timeout
10473         in the environment variables "default", "fallback" and
10474         "timeout". Also, tweak the default entry if it is not within the
10475         current menu entries.
10476         (grub_menu_run): Use a fallback entry in the environment variable
10477         "fallback".
10479         * normal/main.c (read_config_file): Do not initialize
10480         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10481         NEWMENU->TIMEOUT.
10482         (grub_normal_execute): Use a data slot to store the menu.
10484         * include/grub/normal.h (struct grub_menu): Removed default_entry,
10485         fallback_entry and timeout.
10486         (struct grub_menu_list): Removed.
10487         (grub_menu_list_t): Likewise.
10488         (struct grub_context): Likewise.
10489         (grub_context_t): Likewise.
10490         (grub_context_get): Likewise.
10491         (grub_context_get_current_menu): Likewise.
10492         (grub_context_push_menu): Likewise.
10493         (grub_context_pop_menu): Likewise.
10494         (grub_default_init): Likewise.
10495         (grub_default_fini): Likewise.
10496         (grub_timeout_init): Likewise.
10497         (grub_timeout_fini): Likewise.
10499         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10500         and timeout.mod.
10501         (normal_mod_SOURCES): Removed normal/context.c.
10503         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10504         commands/default.c, commands/timeout.c and normal/context.c.
10505         (normal_mod_SOURCES): Removed normal/context.c.
10507         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10508         commands/timeout.c and normal/context.c.
10509         (normal_mod_SOURCES): Removed normal/context.c.
10511         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10512         commands/default.c, commands/timeout.c and normal/context.c.
10513         (normal_mod_SOURCES): Removed normal/context.c.
10515         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10516         timeout.mod.
10517         (default_mod_SOURCES): Removed.
10518         (default_mod_CFLAGS): Likewise.
10519         (default_mod_LDFLAGS): Likewise.
10520         (timeout_mod_SOURCES): Removed.
10521         (timeout_mod_CFLAGS): Likewise.
10522         (timeout_mod_LDFLAGS): Likewise.
10524         * DISTLIST: Removed commands/default.c, commands/timeout.c and
10525         normal/context.c.
10527         * commands/default.c: Removed.
10528         * commands/timeout.c: Likewise.
10529         * normal/context.c: Likewise.
10531 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
10533         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10535 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
10537         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10538         "next" to "prev" for readability.
10539         (struct grub_env_sorted_var): New struct.
10540         (grub_env_context): Renamed to ...
10541         (initial_context): ... this.
10542         (grub_env_var_context): Renamed to ...
10543         (current_context): ... this.
10544         (grub_env_find): Look only at CURRENT_CONTEXT.
10545         (grub_env_context_open): Rewritten to copy exported variables from
10546         previous context.
10547         (grub_env_context_close): Rewritten according to the new
10548         scheme. Also, add an assertion to prevent the initial context from
10549         removed.
10550         (grub_env_insert): Removed the code for the sorted list.
10551         (grub_env_remove): Likewise.
10552         (grub_env_export): Simply mark the variable with
10553         GRUB_ENV_VAR_GLOBAL.
10554         (grub_env_set): A cosmetic change for naming consistency.
10555         (grub_env_get): Likewise.
10556         (grub_env_unset): Likewise.
10557         (grub_env_iterate): Rewritten to sort variables within this
10558         function.
10559         (grub_register_variable_hook): Fixed for naming consistency. Call
10560         grub_env_find again, only if NAME is not found at the first time.
10561         (mangle_data_slot_name): New function.
10562         (grub_env_set_data_slot): Likewise.
10563         (grub_env_get_data_slot): Likewise.
10564         (grub_env_unset_data_slot): Likewise.
10566         * include/grub/env.h (grub_env_var_type): New enum.
10567         (GRUB_ENV_VAR_LOCAL): New constant.
10568         (GRUB_ENV_VAR_GLOBAL): Likewise.
10569         (GRUB_ENV_VAR_DATA): Likewise.
10570         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10571         "type".
10572         (grub_env_set): Replace VAR with NAME for consistency.
10573         (grub_register_variable_hook): Likewise.
10574         (grub_env_export): Specify the name of the argument.
10575         (grub_env_set_data_slot): New prototype.
10576         (grub_env_get_data_slot): Likewise.
10577         (grub_env_unset_data_slot): Likewise.
10579 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
10581         Extend the loader so that GRUB can accept a loader which comes
10582         back to GRUB when a loaded image exits. Also, this change adds
10583         support for a chainloader on EFI.
10585         * term/efi/console.c: Include grub/misc.h.
10586         (grub_console_checkkey): Display a scan code on the top for
10587         debugging. This will be removed once the EFI port gets stable.
10588         Correct the scan code mapping.
10590         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10591         allocate memory from larger regions, in order to reduce the number
10592         of allocated regions. Otherwise, the MacOSX loader panics.
10593         (filter_memory_map): Avoid less than 1MB for compatibility with
10594         other loaders.
10595         (add_memory_regions): Allocate from the tail of a region, if
10596         possible, to avoid allocating a region near to 1MB, for the MacOSX
10597         loader.
10599         * kern/efi/init.c (grub_efi_set_prefix): Specify
10600         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10602         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10603         argument IMAGE_HANDLE and specify it to get a loaded image.
10604         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10605         grub_efi_get_loaded_image.
10606         (grub_efi_get_filename): Divide the length by the size of
10607         grub_efi_char16_t.
10608         (grub_efi_get_device_path): New function.
10609         (grub_efi_print_device_path): Print End Device Path nodes. Divide
10610         the length by the size of grub_efi_char16_t for a file path device
10611         path node.
10613         * kern/loader.c (grub_loader_noreturn): New variable.
10614         (grub_loader_set): Accept a new argument NORETURN. Set
10615         GRUB_LOADER_NORETURN to NORETURN.
10616         All callers changed.
10617         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10618         grub_machine_fini.
10620         * include/grub/efi/efi.h (grub_efi_get_device_path): New
10621         prototype.
10622         (grub_efi_get_loaded_image): Take an argument to specify an image
10623         handle.
10625         * include/grub/loader.h (grub_loader_set): Added one more argument
10626         NORETURN.
10628         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10629         instead of grub_efi_open_protocol.
10630         (grub_efidisk_get_device_name): Likewise.
10631         (grub_efidisk_close): Print a newline.
10632         (grub_efidisk_get_device_handle): Fixed to use
10633         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10634         GRUB_EFI_DEVICE_PATH_TYPE.
10636         * disk/efi/efidisk.c (device_path_guid): Moved to ...
10637         * kern/efi/efi.c (device_path_guid): ... here.
10639         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
10640         chain.mod.
10641         (kernel_mod_HEADERS): Added efi/disk.h.
10642         (_chain_mod_SOURCES): New variable.
10643         (_chain_mod_CFLAGS): Likewise.
10644         (_chain_mod_LDFLAGS): Likewise.
10645         (chain_mod_SOURCES): Likewise.
10646         (chain_mod_CFLAGS): Likewise.
10647         (chain_mod_LDFLAGS): Likewise.
10649         * DISTLIST: Added include/grub/efi/chainloader.h,
10650         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
10652         * include/grub/efi/chainloader.h: New file.
10653         * loader/efi/chainloader.c: Likewise.
10654         * loader/efi/chainloader_normal.c: Likewise.
10656 2006-04-30  Marco Gerards  <marco@gnu.org>
10658         * commands/configfile.c (grub_cmd_source): New function.
10659         (GRUB_MOD_INIT): Register the commands `source' and `.'.
10660         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
10662 2006-04-30  Marco Gerards  <marco@gnu.org>
10664         * normal/execute.c (grub_script_execute_cmd): Change the return
10665         type to `grub_err_t'.  Correctly return the error.
10666         (grub_script_execute_cmdline): In case a command line is not a
10667         command or a function, try to interpret it as an assignment.
10669 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
10671         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
10672         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
10673         skip a node whose name is obviously invalid as UTF-16,
10674         i.e. contains a NUL character. Stop the iteration when the last
10675         directory entry is found. Instead of using the return value of
10676         grub_hfsplus_btree_iterate_node, store the value in RET and use
10677         it, because the iterator can be stopped by the last directory
10678         entry.
10680 2006-04-30  Marco Gerards  <marco@gnu.org>
10682         * include/grub/env.h (grub_env_export): New prototype.  Reported
10683         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
10685 2006-04-30  Marco Gerards  <marco@gnu.org>
10687         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
10688         size of the extents in a catalog file record.
10690 2006-04-29  Marco Gerards  <marco@gnu.org>
10692         * commands/configfile.c (grub_cmd_configfile): Execute the
10693         configfile within its own context.
10695         * include/grub/env.h (grub_env_context_open): New prototype.
10696         (grub_env_context_close): Likewise.
10698         * kern/env.c (grub_env): Removed.
10699         (grub_env_sorted): Likewise.
10700         (grub_env_context): New variable.
10701         (grub_env_var_context): Likewise.
10702         (grub_env_find): Search both the active context and the global
10703         context.
10704         (grub_env_context_open): New function.
10705         (grub_env_context_close): Likewise.
10706         (grub_env_insert): Likewise.
10707         (grub_env_remove): Likewise.
10708         (grub_env_export): Likewise.
10709         (grub_env_set): Changed to use helper functions to avoid code
10710         duplication.
10711         (grub_env_iterate): Rewritten so both the current context and the
10712         global context are being used.
10714         * normal/command.c (export_command): New function.
10715         (grub_command_init): Register the `export' function.
10717 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
10719         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
10720         explicitly to suppress gcc's warnings.
10721         * fs/fat.c (grub_fat_find_dir): Likewise.
10722         (grub_fat_label): Likewise.
10723         * fs/xfs.c (grub_xfs_read_inode): Likewise.
10724         (grub_xfs_mount): Likewise.
10725         (grub_xfs_label): Likewise.
10726         * fs/affs.c (grub_affs_mount): Likewise.
10727         (grub_affs_label): Likewise.
10728         (grub_affs_iterate_dir): Likewise.
10729         * fs/sfs.c (grub_sfs_mount): Likewise.
10730         (grub_sfs_iterate_dir): Likewise.
10731         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
10732         * fs/hfs.c (grub_hfs_mount): Likewise.
10733         (grub_hfs_cmp_catkeys): Likewise.
10734         (grub_hfs_find_dir): Likewise.
10735         (grub_hfs_dir): Likewise.
10736         (grub_hfs_label): Likewise.
10737         * fs/jfs.c (grub_jfs_mount): Likewise.
10738         (grub_jfs_opendir): Likewise.
10739         (grub_jfs_getent): Likewise.
10740         (grub_jfs_lookup_symlink): Likewise.
10741         (grub_jfs_label): Likewise.
10742         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
10743         (grub_hfsplus_iterate_dir): Likewise.
10744         (grub_hfsplus_btree_iterate_node): Made static.
10746         * util/grub-emu.c (prefix): New variable.
10747         (grub_machine_set_prefix): New function.
10748         (main): Do not set the environment variable "prefix" here. Only
10749         set PREFIX, which is used later by grub_machine_set_prefix.
10751         * include/grub/video.h: Do not include grub/symbol.h.
10752         (grub_video_register): Not exported. This symbol is not defined in
10753         the kernel.
10754         (grub_video_unregister): Likewise.
10755         (grub_video_iterate): Likewise.
10756         (grub_video_setup): Likewise.
10757         (grub_video_restore): Likewise.
10758         (grub_video_get_info): Likewise.
10759         (grub_video_get_blit_format): Likewise.
10760         (grub_video_set_palette): Likewise.
10761         (grub_video_get_palette): Likewise.
10762         (grub_video_set_viewport): Likewise.
10763         (grub_video_get_viewport): Likewise.
10764         (grub_video_map_color): Likewise.
10765         (grub_video_map_rgb): Likewise.
10766         (grub_video_map_rgba): Likewise.
10767         (grub_video_fill_rect): Likewise.
10768         (grub_video_blit_glyph): Likewise.
10769         (grub_video_blit_bitmap): Likewise.
10770         (grub_video_blit_render_target): Likewise.
10771         (grub_video_scroll): Likewise.
10772         (grub_video_swap_buffers): Likewise.
10773         (grub_video_create_render_target): Likewise.
10774         (grub_video_delete_render_target): Likewise.
10775         (grub_video_set_active_render_target): Likewise.
10777         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
10778         Undefined.
10779         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
10781         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
10782         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10783         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10784         instead of $(srcdir)/genkernsyms.sh.
10786         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
10787         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10788         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10789         instead of $(srcdir)/genkernsyms.sh.
10791         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
10792         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10793         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10794         instead of $(srcdir)/genkernsyms.sh.
10796         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
10797         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
10798         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
10799         instead of $(srcdir)/genkernsyms.sh.
10801         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
10802         genkernsyms.sh.
10804         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
10805         genkernsyms.sh.
10806         (gensymlist.sh): New target.
10807         (genkernsyms.sh): Likewise.
10809         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
10810         genkernsyms.sh.in and gensymlist.sh.in.
10812         * genkernsyms.sh: Removed.
10813         * gensymlist.sh: Likewise.
10815         * genkernsyms.sh.in: New file.
10816         * gensymlist.sh.in: Likewise.
10818 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
10820         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
10821         clobber "prefix", since we may have already set it manually.
10823 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
10825         * kern/misc.c (abort): New alias for grub_abort.
10827 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
10829         A new machine-specific function "grub_machine_set_prefix" is
10830         defined. This is called after loading modules, so that a prefix
10831         initialization can use modules. Also, this change adds an
10832         intensive debugging feature for the memory manager via the
10833         configure option "--enable-mm-debug".
10835         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
10836         PART.LEN.
10838         * kern/sparc64/ieee1275/init.c (abort): Removed.
10839         (grub_stop): Likewise.
10840         (grub_exit): New function.
10841         (grub_set_prefix): Renamed to ...
10842         (grub_machine_set_prefix): ... this.
10843         (grub_machine_init): Do not call grub_set_prefix.
10845         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
10846         (grub_machine_set_prefix): ... this.
10847         (grub_machine_init): Do not call grub_set_prefix.
10849         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
10850         (grub_machine_init): Do not set the prefix here.
10852         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
10854         * kern/efi/init.c: Include grub/mm.h.
10855         (grub_efi_set_prefix): New function.
10857         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
10858         (grub_efi_get_filename): New function.
10859         (grub_print_device_path): Renamed to ...
10860         (grub_efi_print_device_path): ... this.
10862         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
10863         [MM_DEBUG] (grub_realloc): Likewise.
10864         [MM_DEBUG] (grub_free): Likewise.
10865         [MM_DEBUG] (grub_memalign): Likewise.
10866         [MM_DEBUG] (grub_mm_debug): New variable.
10867         [MM_DEBUG] (grub_debug_malloc): New function.
10868         [MM_DEBUG] (grub_debug_free): New function.
10869         [MM_DEBUG] (grub_debug_realloc): New function.
10870         [MM_DEBUG] (grub_debug_memalign): New function.
10872         * kern/misc.c (grub_abort): Print a newline to distinguish
10873         the message.
10875         * kern/main.c (grub_main): Call grub_machine_set_prefix and
10876         grub_set_root_dev after loading modules. This is necessary when
10877         setting a prefix depends on modules.
10879         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
10880         (grub_efi_print_device_path): ... this.
10881         (grub_efi_get_filename): New prototype.
10882         (grub_efi_set_prefix): Likewise.
10884         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
10885         and grub/disk.h.
10886         (grub_efidisk_get_device_handle): New prototype.
10887         (grub_efidisk_get_device_name): Likewise.
10889         * include/grub/mm.h: Include config.h.
10890         (MM_DEBUG): Removed.
10891         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
10892         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
10893         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
10894         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
10895         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
10896         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
10897         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
10898         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
10899         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
10901         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
10903         * disk/efi/efidisk.c: Include grub/partition.h.
10904         (iterate_child_devices): New function.
10905         (add_device): First, compare only last device path nodes, so that
10906         devices are sorted by the types.
10907         (grub_efidisk_get_device_handle): New function.
10908         (grub_efidisk_get_device_name): Likewise.
10910         * configure.ac (--enable-mm-debug): New option to enable the
10911         memory manager debugging feature. This makes the binary much
10912         bigger, so is disabled by default.
10914 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
10916         Use grub_abort instead of grub_stop, and grub_exit must be
10917         define in each architecture now. Also, this change adds support
10918         for EFI disks.
10920         * util/i386/pc/grub-probefs.c: Include grub/term.h.
10921         (grub_getkey): New function.
10922         (grub_term_get_current): Likewise.
10924         * util/i386/pc/grub-setup.c: Include grub/term.h.
10925         (grub_getkey): New function.
10926         (grub_term_get_current): Likewise.
10928         * util/misc.c (grub_stop): Renamed to ...
10929         (grub_exit): ... this.
10931         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
10932         (grub_exit): ... this.
10933         (grub_machine_init): Use grub_abort instead of abort.
10934         (grub_stop): Removed.
10936         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
10937         abort.
10939         * kern/i386/pc/startup.S (grub_exit): New function.
10940         (cold_reboot): New label.
10942         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
10943         (grub_efi_init): Call grub_efidisk_init.
10944         (grub_efi_fini): Call grub_efidisk_fini.
10946         * kern/efi/efi.c: Include grub/mm.h.
10947         (grub_efi_console_control_guid): Renamed to ...
10948         (console_control_guid): ... this.
10949         (grub_efi_loaded_image_guid): Renamed to ...
10950         (loaded_image_guid): ... this.
10951         (grub_efi_locate_handle): New function.
10952         (grub_efi_open_protocol): Likewise.
10953         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
10954         GRUB_EFI_CONSOLE_CONTROL_GUID.
10955         (grub_efi_exit): Removed.
10956         (grub_stop): Likewise.
10957         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
10958         (grub_exit): New function.
10959         (grub_print_device_path): Likewise.
10961         * kern/rescue.c (grub_rescue_cmd_exit): New function.
10962         (grub_enter_rescue_mode): Register "exit".
10964         * kern/misc.c (grub_real_dprintf): A cosmetic change.
10965         (grub_abort): New function.
10967         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
10969         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
10971         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
10973         * include/grub/efi/efi.h (grub_efi_exit): Removed.
10974         (grub_print_device_path): New prototype.
10975         (grub_efi_locate_handle): Likewise.
10976         (grub_efi_open_protocol): Likewise.
10978         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
10979         * disk/efi/efidisk.c: Likewise.
10981         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
10983         * include/grub/efi/console_control.h
10984         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
10986         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
10987         last 8 bytes as an array.
10988         (GRUB_EFI_DISK_IO_GUID): New macro.
10989         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
10990         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
10991         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
10992         grub_uint8_t.
10993         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
10994         (struct grub_efi_device_path): Rename the member "sub_type" to
10995         "subtype".
10996         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
10997         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
10998         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
10999         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11000         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11001         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11002         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11003         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11004         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11005         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11006         (struct grub_efi_pci_device_path): New structure.
11007         (grub_efi_pci_device_path_t): New type.
11008         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11009         (struct grub_efi_pccard_device_path): New structure.
11010         (grub_efi_pccard_device_path_t): New type.
11011         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11012         (struct grub_efi_memory_mapped_device_path): New structure.
11013         (grub_efi_memory_mapped_device_path_t): New type.
11014         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11015         (struct grub_efi_vendor_device_path): New structure.
11016         (grub_efi_vendor_device_path_t): New type.
11017         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11018         (struct grub_efi_controller_device_path): New structure.
11019         (grub_efi_controller_device_path_t): New type.
11020         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11021         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11022         (struct grub_efi_acpi_device_path): New structure.
11023         (grub_efi_acpi_device_path_t): New type.
11024         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11025         (struct grub_efi_expanded_acpi_device_path): New structure.
11026         (grub_efi_expanded_acpi_device_path_t): New type.
11027         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11028         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11029         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11030         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11031         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11032         (struct grub_efi_atapi_device_path): New structure.
11033         (grub_efi_atapi_device_path_t): New type.
11034         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11035         (struct grub_efi_fibre_channel_device_path): New structure.
11036         (grub_efi_fibre_channel_device_path_t): New type.
11037         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11038         (struct grub_efi_1394_device_path): New structure.
11039         (grub_efi_1394_device_path_t): New type.
11040         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11041         (struct grub_efi_usb_device_path): New structure.
11042         (grub_efi_usb_device_path_t): New type.
11043         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11044         (struct grub_efi_usb_class_device_path): New structure.
11045         (grub_efi_usb_class_device_path_t): New type.
11046         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11047         (struct grub_efi_i2o_device_path): New structure.
11048         (grub_efi_i2o_device_path_t): New type.
11049         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11050         (struct grub_efi_mac_address_device_path): New structure.
11051         (grub_efi_mac_address_device_path_t): New type.
11052         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11053         (struct grub_efi_ipv4_device_path): New structure.
11054         (grub_efi_ipv4_device_path_t): New type.
11055         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11056         (struct grub_efi_ipv6_device_path): New structure.
11057         (grub_efi_ipv6_device_path_t): New type.
11058         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11059         (struct grub_efi_infiniband_device_path): New structure.
11060         (grub_efi_infiniband_device_path_t): New type.
11061         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11062         (struct grub_efi_uart_device_path): New structure.
11063         (grub_efi_uart_device_path_t): New type.
11064         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11065         (struct grub_efi_vendor_messaging_device_path): New structure.
11066         (grub_efi_vendor_messaging_device_path_t): New type.
11067         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11068         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11069         (struct grub_efi_hard_drive_device_path): New structure.
11070         (grub_efi_hard_drive_device_path_t): New type.
11071         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11072         (struct grub_efi_cdrom_device_path): New structure.
11073         (grub_efi_cdrom_device_path_t): New type.
11074         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11075         (struct grub_efi_vendor_media_device_path): New structure.
11076         (grub_efi_vendor_media_device_path_t): New type.
11077         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11078         (struct grub_efi_file_path_device_path): New structure.
11079         (grub_efi_file_path_device_path_t): New type.
11080         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11081         (struct grub_efi_protocol_device_path): New structure.
11082         (grub_efi_protocol_device_path_t): New type.
11083         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11084         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11085         (struct grub_efi_bios_device_path): New structure.
11086         (grub_efi_bios_device_path_t): New type.
11087         (struct grub_efi_disk_io): New structure.
11088         (grub_efi_disk_io_t): New type.
11089         (struct grub_efi_block_io_media): New structure.
11090         (grub_efi_block_io_media_t): New type.
11091         (struct grub_efi_block_io): New structure.
11092         (grub_efi_block_io_t): New type.
11094         * include/grub/misc.h (grub_stop): Removed.
11095         (grub_exit): New prototype.
11096         (grub_abort): Likewise.
11098         * include/grub/disk.h (enum grub_disk_dev_id): Added
11099         GRUB_DISK_DEVICE_EFIDISK_ID.
11101         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11102         disk/efi/efidisk.c.
11103         (kernel_syms.lst): Remove the target if an error occurs.
11105 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
11107         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11108         as it was simply too buggy.
11110 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
11112         * kern/misc.c (grub_lltoa): New function.
11113         (grub_vsprintf): Added support for the long long suffix,
11114         i.e. "ll".
11116 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
11118         * Makefile.in (LDFLAGS): Add variable.
11119         (LD): Remove variable.
11120         * configure.ac: Add -m32 to LDFLAGS.
11121         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11122         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11123         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11124         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11125         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11126         variables.
11127         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11128         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11129         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11131 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
11133         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11134         length for unknown glyph.
11136 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
11138         Add support for pre-loaded modules into the EFI port.
11140         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11141         completely. Accept one more argument DIR. The caller has changed.
11143         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11145         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11146         (grub_efi_loaded_image_guid): New variable.
11147         (grub_efi_get_loaded_image): New function.
11148         (grub_arch_modules_addr): Likewise.
11150         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11151         prototype.
11153         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11154         (struct grub_efi_loaded_image): New structure.
11155         (grub_efi_loaded_image_t): New type.
11157 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
11159         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11160         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11161         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11163 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
11165         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11167 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
11169         * DISTLIST: Added include/grub/efi/console.h,
11170         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11171         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11173         * include/grub/efi/console.h: New file.
11174         * include/grub/efi/time.h: Likewise.
11175         * include/grub/i386/efi/kernel.h: Likewise.
11176         * kern/efi/init.c: Likewise.
11177         * kern/efi/mm.c: Likewise.
11178         * term/efi/console.c: Likewise.
11180         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11181         (grub_stop): Removed.
11182         (grub_get_rtc): Likewise.
11183         (grub_machine_init): Simply call grub_efi_init.
11184         (grub_machine_fini): Call grub_efi_fini.
11186         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11187         (grub_efi_output_string): Removed.
11188         (grub_efi_stall): New function.
11189         (grub_stop): Likewise.
11190         (grub_get_rtc): Likewise.
11192         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11193         (grub_efi_stall): New prototype.
11194         (grub_efi_allocate_pages): Likewise.
11195         (grub_efi_free_pages): Likewise.
11196         (grub_efi_get_memory_map): Likewise.
11197         (grub_efi_mm_init): Likewise.
11198         (grub_efi_mm_fini): Likewise.
11199         (grub_efi_init): Likewise.
11200         (grub_efi_fini): Likewise.
11202         * include/grub/i386/efi/time.h: Do not include
11203         grub/symbol.h. Include grub/efi/time.h.
11204         (GRUB_TICKS_PER_SECOND): Removed.
11205         (grub_get_rtc): Likewise.
11207         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11208         Added padding. The EFI spec is buggy.
11209         (GRUB_EFI_BLACK): New macro.
11210         (GRUB_EFI_BLUE): Likewise.
11211         (GRUB_EFI_GREEN): Likewise.
11212         (GRUB_EFI_CYAN): Likewise.
11213         (GRUB_EFI_RED): Likewise.
11214         (GRUB_EFI_MAGENTA): Likewise.
11215         (GRUB_EFI_BROWN): Likewise.
11216         (GRUB_EFI_LIGHTGRAY): Likewise.
11217         (GRUB_EFI_BRIGHT): Likewise.
11218         (GRUB_EFI_DARKGRAY): Likewise.
11219         (GRUB_EFI_LIGHTBLUE): Likewise.
11220         (GRUB_EFI_LIGHTGREEN): Likewise.
11221         (GRUB_EFI_LIGHTCYAN): Likewise.
11222         (GRUB_EFI_LIGHTRED): Likewise.
11223         (GRUB_EFI_LIGHTMAGENTA): Likewise.
11224         (GRUB_EFI_YELLOW): Likewise.
11225         (GRUB_EFI_WHITE): Likewise.
11226         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11227         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11228         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11229         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11230         (GRUB_EFI_BACKGROUND_RED): Likewise.
11231         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11232         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11233         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11234         (GRUB_EFI_TEXT_ATTR): Likewise.
11236         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11237         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11238         (kernel_mod_HEADERS): Added efi/time.h.
11240 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
11242         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11243         include/grub/efi/api.h, include/grub/efi/console_control.h,
11244         include/grub/efi/efi.h, include/grub/efi/pe32.h,
11245         include/grub/i386/efi/time.h, kern/efi/efi.c,
11246         kern/i386/efi/init.c, kern/i386/efi/startup.S,
11247         and util/i386/efi/grub-mkimage.c.
11249         * Makefile.in (RMKFILES): Added i386-efi.rmk.
11251         * genmk.rb (PModule#rule): Do not export symbols if
11252         #{prefix}_EXPORTS is set to "no".
11254         * conf/i386-efi.mk: New file.
11255         * conf/i386-efi.rmk: Likewise.
11256         * include/grub/efi/api.h: Likewise.
11257         * include/grub/efi/console_control.h: Likewise.
11258         * include/grub/efi/efi.h: Likewise.
11259         * include/grub/efi/pe32.h: Likewise.
11260         * include/grub/i386/efi/time.h: Likewise.
11261         * kern/efi/efi.c: Likewise.
11262         * kern/i386/efi/init.c: Likewise.
11263         * kern/i386/efi/startup.S: Likewise.
11264         * util/i386/efi/grub-mkimage.c: Likewise.
11266 2006-04-17  Marco Gerards  <marco@gnu.org>
11268         * include/grub/script.h: Include <grub/parser.h> and
11269         "grub_script.tab.h".
11270         (struct grub_lexer_param): New struct.
11271         (struct grub_parser_param): Likewise.
11272         (grub_script_create_arglist): Pass the state in an argument.
11273         (grub_script_add_arglist): Likewise.
11274         (grub_script_create_cmdline): Likewise.
11275         (grub_script_create_cmdblock): Likewise.
11276         (grub_script_create_cmdif): Likewise.
11277         (grub_script_create_cmdmenu): Likewise.
11278         (grub_script_add_cmd): Likewise.
11279         (grub_script_arg_add): Likewise.
11280         (grub_script_lexer_ref): Likewise.
11281         (grub_script_lexer_deref): Likewise.
11282         (grub_script_lexer_record_start): Likewise.
11283         (grub_script_lexer_record_stop): Likewise.
11284         (grub_script_mem_record): Likewise.
11285         (grub_script_mem_record_stop): Likewise.
11286         (grub_script_malloc): Likewise.
11287         (grub_script_yylex): Likewise.
11288         (grub_script_yyparse): Likewise.
11289         (grub_script_yyerror): Likewise.
11290         (grub_script_yylex): Likewise.
11291         (grub_script_lexer_init): Return the state.
11293         * normal/lexer.c (grub_script_lexer_state): Removed variable.
11294         (grub_script_lexer_done): Likewise.
11295         (grub_script_lexer_getline): Likewise.
11296         (grub_script_lexer_refs): Likewise.
11297         (script): Likewise.
11298         (newscript): Likewise.
11299         (record): Likewise.
11300         (recording): Likewise.
11301         (recordpos): Likewise.
11302         (recordlen): Likewise.
11303         (grub_script_lexer_init): Return the state instead of setting
11304         global variables.
11305         (grub_script_lexer_ref): Use the newly added argument for state
11306         instead of globals.
11307         (grub_script_lexer_deref): Likewise.
11308         (grub_script_lexer_record_start): Likewise.
11309         (grub_script_lexer_record_stop): Likewise.
11310         (recordchar): Likewise.
11311         (nextchar): Likewise.
11312         (grub_script_yylex2): Likewise.
11313         (grub_script_yylex): Likewise.
11314         (grub_script_yyerror): Likewise.
11316         * normal/parser.y (func_mem): Removed variable.
11317         (menu_entry): Likewise.
11318         (err): Likewise.
11319         (%lex-param): New parser option.
11320         (%parse-param): Likewise.
11321         (script): Always return the AST.
11322         (argument): Pass the state around.
11323         (arguments): Likewise.
11324         (grubcmd): Likewise.
11325         (commands): Likewise.
11326         (function): Likewise.
11327         (menuentry): Likewise.
11328         (if_statement): Likewise.
11329         (if): Likewise.
11331         * normal/script.c (grub_script_memused): Removed variable.
11332         (grub_script_parsed): Likewise.
11333         (grub_script_malloc): Added a state argument.  Use that instead of
11334         global variables.
11335         (grub_script_mem_record): Likewise.
11336         (grub_script_mem_record_stop): Likewise.
11337         (grub_script_arg_add): Likewise.
11338         (grub_script_add_arglist): Likewise.
11339         (grub_script_create_cmdline): Likewise.
11340         (grub_script_create_cmdif): Likewise.
11341         (grub_script_create_cmdmenu): Likewise.
11342         (grub_script_add_cmd): Likewise.
11343         (grub_script_parse): Setup the state before calling the parser.
11345 2006-04-16  Marco Gerards  <marco@gnu.org>
11347         * normal/command.c (grub_command_init): Remove the title command.
11349         * normal/lexer.c (grub_script_yylex): Renamed from this...
11350         (grub_script_yylex2): ... to this.
11351         (grub_script_yylex): New function.  Temporary
11352         introduced to filter some tokens.
11353         (grub_script_yyerror): Print a newline.
11355         * normal/main.c (read_config_file): Output information about the
11356         lines that contain errors.  Wait for a key after all lines have
11357         been processed.  Don't return an empty menu.
11359         * normal/parser.y (func_mem): Don't initialize.
11360         (menu_entry): Likewise.
11361         (err): New variable.
11362         (script): Don't return anything when an error was encountered.
11363         (ws, returns): Removed rules.
11364         (argument): Disabled concatenated variable support.
11365         (arguments): Remove explicit separators.
11366         (grubcmd): Likewise.
11367         (function): Likewise.
11368         (menuentry): Likewise.
11369         (if): Likewise.
11370         (commands): Likewise.  Add error handling.
11372         * normal/script.c (grub_script_create_cmdline): If
11373         `grub_script_parsed' is 0, assume the parser encountered an error.
11375 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
11377         * configure.ac: Add support for EFI. Fix the typo
11378         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11380 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
11382         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
11383         foreign multibyte characters should be shown correctly.
11385 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
11387         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11388         calculation.
11389         (read_config_file): Made it to close file before returning.
11391 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
11393         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11394         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11395         video/i386/pc/vbefill.c.
11397         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11398         video/i386/pc/vbefill.c.
11400         * include/grub/video.h (grub_video_blit_format): New enum.
11401         (grub_video_mode_info): Added new member blit_format.
11402         (grub_video_get_blit_format): New function prototype.
11404         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11405         function prototype.
11406         (grub_video_vbe_map_rgb): Likewise.
11407         (grub_video_vbe_unmap_color): Likewise.
11409         * include/grub/i386/pc/vbeblit.h: New file.
11411         * include/grub/i386/pc/vbefill.h: New file.
11413         * video/video.c (grub_video_get_blit_format): New function.
11414         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11415         (grub_video_vbe_map_rgb): Likewise.
11416         (grub_video_vbe_unmap_color): Likewise.
11418         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11419         optimized fills.
11420         (grub_video_vbe_blit_render_target): Changed to use more optimized
11421         blits.
11422         (grub_video_vbe_setup): Added detection for optimized settings.
11423         (grub_video_vbe_create_render_target): Likewise.
11425         * video/i386/pc/vbeblit.c: New file.
11427         * video/i386/pc/vbefill.c: New file.
11429 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
11431         * font/manager.c (grub_font_get_glyph): Removed font fixup from
11432         here...
11434         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
11435         parsing to support both hex and dec ranges.  If filename was missing
11436         show usage information.
11438 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
11440         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11441         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
11443         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11444         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
11445         (video_mod_SOURCES): Added.
11446         (video_mod_CFLAGS): Likewise.
11447         (video_mod_LDFLAGS): Likewise.
11448         (gfxterm_mod_SOURCES): Likewise.
11449         (gfxterm_mod_CFLAGS): Likewise.
11450         (gfxterm_mod_LDFLAGS): Likewise.
11451         (videotest_mod_SOURCES): Likewise.
11452         (videotest_mod_CFLAGS): Likewise.
11453         (videotest_mod_LDFLAGS): Likewise.
11454         (vesafb_mod_SOURCES): Removed.
11455         (vesafb_mod_CFLAGS): Likewise.
11456         (vesafb_mod_LDFLAGS): Likewise.
11457         (vga_mod_SOURCES): Likewise.
11458         (vga_mod_CFLAGS): Likewise.
11459         (vga_mod_LDFLAGS): Likewise.
11461         * commands/videotest.c: New file.
11463         * font/manager.c (fill_with_default_glyph): Modified to use
11464         grub_font_glyph.
11465         (grub_font_get_glyph): Likewise.
11466         (fontmanager): Renamed from this...
11467         (font_manager): ... to this.
11469         * include/grub/font.h (grub_font_glyph): Added new structure.
11470         (grub_font_get_glyph): Modified to use grub_font_glyph.
11472         * include/grub/misc.h (grub_abs): Added as inline function.
11474         * include/grub/video.h: New file.
11476         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11477         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11478         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11479         (grub_vbe_get_controller_info): Renamed from this...
11480         (grub_vbe_bios_get_controller_info): ... to this.
11481         (grub_vbe_get_mode_info): Renamed from this...
11482         (grub_vbe_bios_get_mode_info): ... to this.
11483         (grub_vbe_set_mode): Renamed from this...
11484         (grub_vbe_bios_set_mode): ... to this.
11485         (grub_vbe_get_mode): Renamed from this...
11486         (grub_vbe_bios_get_mode): ... to this.
11487         (grub_vbe_set_memory_window): Renamed from this...
11488         (grub_vbe_bios_set_memory_window): ... to this.
11489         (grub_vbe_get_memory_window): Renamed from this...
11490         (grub_vbe_bios_get_memory_window): ... to this.
11491         (grub_vbe_set_scanline_length): Renamed from this...
11492         (grub_vbe_set_scanline_length): ... to this.
11493         (grub_vbe_get_scanline_length): Renamed from this...
11494         (grub_vbe_bios_get_scanline_length): ... to this.
11495         (grub_vbe_set_display_start): Renamed from this...
11496         (grub_vbe_bios_set_display_start): ... to this.
11497         (grub_vbe_get_display_start): Renamed from this...
11498         (grub_vbe_bios_get_display_start): ... to this.
11499         (grub_vbe_set_palette_data): Renamed from this...
11500         (grub_vbe_bios_set_palette_data): ... to this.
11501         (grub_vbe_set_pixel_rgb): Removed.
11502         (grub_vbe_set_pixel_index): Likewise.
11504         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11505         from this...
11506         (grub_vbe_bios_get_controller_info): ... to this.
11507         (grub_vbe_get_mode_info): Renamed from this...
11508         (grub_vbe_bios_get_mode_info): ... to this.
11509         (grub_vbe_set_mode): Renamed from this...
11510         (grub_vbe_bios_set_mode): ... to this.
11511         (grub_vbe_get_mode): Renamed from this...
11512         (grub_vbe_bios_get_mode): ... to this.
11513         (grub_vbe_set_memory_window): Renamed from this...
11514         (grub_vbe_bios_set_memory_window): ... to this.
11515         (grub_vbe_get_memory_window): Renamed from this...
11516         (grub_vbe_bios_get_memory_window): ... to this.
11517         (grub_vbe_set_scanline_length): Renamed from this...
11518         (grub_vbe_set_scanline_length): ... to this.
11519         (grub_vbe_get_scanline_length): Renamed from this...
11520         (grub_vbe_bios_get_scanline_length): ... to this.
11521         (grub_vbe_set_display_start): Renamed from this...
11522         (grub_vbe_bios_set_display_start): ... to this.
11523         (grub_vbe_get_display_start): Renamed from this...
11524         (grub_vbe_bios_get_display_start): ... to this.
11525         (grub_vbe_set_palette_data): Renamed from this...
11526         (grub_vbe_bios_set_palette_data): ... to this.
11527         (grub_vbe_bios_get_controller_info): Fixed problem with registers
11528         getting corrupted after calling it.  Added more pushes and pops.
11529         (grub_vbe_bios_set_mode): Likewise.
11530         (grub_vbe_bios_get_mode): Likewise.
11531         (grub_vbe_bios_get_memory_window): Likewise.
11532         (grub_vbe_bios_set_scanline_length): Likewise.
11533         (grub_vbe_bios_get_scanline_length): Likewise.
11534         (grub_vbe_bios_get_display_start): Likewise.
11535         (grub_vbe_bios_set_palette_data): Likewise.
11537         * normal/cmdline.c (cl_set_pos): Refresh the screen.
11538         (cl_insert): Likewise.
11539         (cl_delete): Likewise.
11541         * term/gfxterm.c: New file.
11543         * term/i386/pc/vesafb.c: Removed file.
11545         * video/video.c: New file.
11547         * video/i386/pc/vbe.c (real2pm): Added new function.
11548         (grub_video_vbe_draw_pixel): Likewise.
11549         (grub_video_vbe_get_video_ptr): Likewise.
11550         (grub_video_vbe_get_pixel): Likewise
11551         (grub_video_vbe_init): Likewise.
11552         (grub_video_vbe_fini): Likewise.
11553         (grub_video_vbe_setup): Likewise.
11554         (grub_video_vbe_get_info): Likewise.
11555         (grub_video_vbe_set_palette): Likewise.
11556         (grub_video_vbe_get_palette): Likewise.
11557         (grub_video_vbe_set_viewport): Likewise.
11558         (grub_video_vbe_get_viewport): Likewise.
11559         (grub_video_vbe_map_color): Likewise.
11560         (grub_video_vbe_map_rgb): Likewise.
11561         (grub_video_vbe_map_rgba): Likewise.
11562         (grub_video_vbe_unmap_color): Likewise.
11563         (grub_video_vbe_fill_rect): Likewise.
11564         (grub_video_vbe_blit_glyph): Likewise.
11565         (grub_video_vbe_blit_bitmap): Likewise.
11566         (grub_video_vbe_blit_render_target): Likewise.
11567         (grub_video_vbe_scroll): Likewise.
11568         (grub_video_vbe_swap_buffers): Likewise.
11569         (grub_video_vbe_create_render_target): Likewise.
11570         (grub_video_vbe_delete_render_target): Likewise.
11571         (grub_video_vbe_set_active_render_target): Likewise.
11572         (grub_vbe_set_pixel_rgb): Remove function.
11573         (grub_vbe_set_pixel_index): Likewise.
11574         (index_color_mode): Remove static variable.
11575         (active_mode): Likewise.
11576         (framebuffer): Likewise.
11577         (bytes_per_scan_line): Likewise.
11578         (grub_video_vbe_adapter): Added new static variable.
11579         (framebuffer): Likewise.
11580         (render_target): Likewise.
11581         (initial_mode): Likewise.
11582         (mode_in_use): Likewise.
11583         (mode_list): Likewise.
11585 2006-03-10  Marco Gerards  <marco@gnu.org>
11587         * configure.ac (AC_INIT): Bumped to 1.93.
11589         * DISTLIST: Added `include/grub/hfs.h'.
11591 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
11593         * boot/i386/pc/boot.S (general_error): Before looping, try INT
11594         18H, which might help the BIOS falling back to next boot media.
11596 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
11598         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11599         Poe Chen <poe.poechen@gmail.com>.
11601 2006-01-17  Marco Gerards  <marco@gnu.org>
11603         * include/grub/normal.h: Include <grub/script.h>.
11604         (grub_command_list): Removed struct.
11605         (grub_command_list_t): Removed type.
11606         (grub_menu_entry): Remove members `num' and `command_list'.  Add
11607         members `commands' and `sourcecode'.
11608         * include/grub/script.h: Add inclusion guards.
11609         (grub_script_cmd_menuentry): New struct.
11610         (grub_script_execute_menuentry): New prototype.
11611         (grub_script_lexer_record_start): Likewise.
11612         (grub_script_lexer_record_stop): Likewise.
11613         * normal/execute.c (grub_script_execute_menuentry): New function.
11614         * normal/lexer.c (record, recording, recordpos, recordlen): New
11615         variables.
11616         (grub_script_lexer_record_start): New function.
11617         (grub_script_lexer_record_stop): Likewise.
11618         (recordchar): Likewise.
11619         (nextchar): Likewise.
11620         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
11621         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
11622         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11623         (current_menu): New variable.
11624         (free_menu): Mainly rewritten.
11625         (grub_normal_menu_addentry): New function.
11626         (read_config_file): Rewritten.
11627         * normal/menu.c (run_menu_entry): Mainly rewritten.
11628         * normal/menu_entry.c (make_screen): Rewritten the code to insert
11629         the menu entry.
11630         (run): Mainly rewritten.
11631         * normal/parser.y (menu_entry): New variable.
11632         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11633         (menuentry): New rule.
11634         (command): Add `menuentry'.
11635         (if_statement): Allow additional returns before `fi'.
11636         * normal/script.c (grub_script_create_cmdmenu): New function.
11638 2006-01-03  Marco Gerards  <marco@gnu.org>
11640         * INSTALL: GNU Bison is required.
11641         * configure.ac: Rewritten the test to detect Bison.
11642         * Makefile.in (YACC): New variable.  Reported by Xun Sun
11643         <xun.sun.cn@gmail.com>.
11645 2006-01-03  Marco Gerards  <marco@gnu.org>
11647         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
11648         the HFS+ filesystem to filesystem blocks.
11649         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
11650         GCC warning is silenced.
11652 2006-01-03  Marco Gerards  <marco@gnu.org>
11654         * partmap/apple.c (apple_partition_map_iterate): Convert the data
11655         read from disk from big endian to host byte order.
11657 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
11659         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
11660         documentation.
11661         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
11662         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
11663         embedded HFS+ filesystem.
11664         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
11665         (grub_hfs_sblock): Move from here...
11666         * include/grub/hfs.h: To here...  New file.
11667         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
11668         documentation.
11669         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
11670         New macros.
11671         (grub_hfsplus_volheader): Change type of member `magic' to
11672         `grub_uint16_t'.
11673         (grub_hfsplus_data): Add new member `embedded_offset'.
11674         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
11675         returned block.
11676         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
11677         Calculate the offset.
11679 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
11681         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
11682         Removed.
11683         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
11685 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
11687         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
11688         ENV->NAME is NULL after allocating ENV->VALUE.
11690 2005-12-25  Marco Gerards  <marco@gnu.org>
11692         * kern/env.c (grub_env_set): Rewritten the error handling code.
11694 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
11696         * geninit.sh: Made more robust, and more portable.
11698 2005-12-25  Marco Gerards  <marco@gnu.org>
11700         Add support for Apple HFS+ filesystems.
11702         * fs/hfsplus.c: New file.
11704         * DISTLIST: Added `fs/hfsplus.c'.
11706         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
11707         (hfsplus_mod_SOURCES): New variable.
11708         (hfsplus_mod_CFLAGS): Likewise.
11709         (hfsplus_mod_LDFLAGS): Likewise.
11710         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
11711         (grub_setup_SOURCES): Likewise.
11712         (grub_mkdevicemap_SOURCES): Likewise.
11713         (grub_emu_SOURCES): Likewise.
11714         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11716         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
11718         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
11720 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
11722         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
11723         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
11724         include/grub/parser.h, include/grub/script.h, kern/parser.c,
11725         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
11726         normal/lexer.c, normal/parser.y, normal/script.c, and
11727         partmap/gpt.c.
11728         Removed kern/sparc64/cache.c.
11730         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
11731         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
11732         grub_emu_init.c.
11734         * configure.ac (AC_INIT): Bumped to 1.92.
11736 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
11738         * kern/err.c (grub_error_push): Added new function to support error
11739         stacks.
11740         (grub_error_pop): Likewise.
11741         (grub_error_stack_items): New local variable to support error stacks.
11742         (grub_error_stack_pos): Likewise.
11743         (grub_error_stack_assert): Likewise.
11744         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
11745         stack depth.
11746         (grub_print_error): Added support to print errors from error stack.
11748         * include/grub/err.h (grub_error_push): Added function prototype.
11749         (grub_error_pop): Likewise.
11751 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
11753         * configure.ac: Accept `powerpc64' as host_cpu.
11754         (amd64): Rename to `biarch32'.
11756         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
11757         non-cacheline-aligned addresses.
11759         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
11760         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
11761         if `size' is non-zero.
11763 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
11765         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
11766         and `cd' to make sure the filename is not prefixed with a
11767         directory name.
11768         (pkgdata_MODULES): Add `gpt.mod'.
11769         (gpt_mod_SOURCES): New variable.
11770         (gpt_mod_CFLAGS): Likewise.
11771         (gpt_mod_LDFLAGS): Likewise.
11773         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
11775         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
11776         New macro.
11778         * partmap/gpt.c: New file.
11780         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
11781         GPT partition map is detected.
11783 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
11785         * commands/i386/pc/play.c: New file.
11786         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
11787         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
11788         macros.
11790 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
11792         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
11793         ((unused))' to silence gcc warning.
11795 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
11797         * configure.ac: Correct `AC_PROG_YACC' test.
11799 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
11801         * util/powerpc/ieee1275/grub-install.in: Run the mount point
11802         check before installing files.
11804 2005-11-22  Mike Small  <smallm@panix.com>
11806         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
11807         number regex so multidigit numbers are recognized correctly.
11809 2005-11-22  Mike Small  <smallm@panix.com>
11811         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
11812         debugging message before attempting to claim memory.
11813         (grub_rescue_cmd_initrd): Add a claim debugging message and try
11814         multiple addresses in case of failure.
11816 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
11818         * term/tparm.c (get_space): Remove empty `if' statement.
11820         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
11822         * kern/parser.c (check_varstate): Rename `state' to 's'.
11824 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
11826         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
11827         variable definitions to the beginning of each function.  Sort stack
11828         variables by size.
11829         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
11830         `buf' argument to `char *'.
11832 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
11834         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
11835         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11836         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11837         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11838         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11839         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11840         configfile.mod, search.mod, gzio.mod and test.mod.
11841         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11842         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11843         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11844         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11845         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11846         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11847         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11848         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11849         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11850         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11851         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11852         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11853         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11854         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11855         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11856         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11857         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11858         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11859         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11860         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11861         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11862         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11863         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
11865         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
11866         `grep --include'.
11867         (pkgdata_MODULES): Add test.mod.
11869 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11871         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
11872         appending to variables with "+=".
11873         (PModule): Use full pathname to generate *.lst filenames.
11875         * Makefile.in: Fixed list rules moved from genmk.rb.
11876         (.DELETE_ON_ERROR): New special target.
11877         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
11879         * conf/i386-pc.rmk: Include conf/common.mk.
11880         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
11881         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
11882         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
11883         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
11884         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
11885         configfile.mod, search.mod, gzio.mod and test.mod.
11886         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
11887         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
11888         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
11889         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
11890         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
11891         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
11892         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
11893         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
11894         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
11895         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
11896         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11897         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11898         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
11899         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
11900         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
11901         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
11902         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11903         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
11904         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
11905         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
11906         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
11907         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
11908         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
11909         here...
11910         * conf/common.rmk: ... to here.  New file.
11912         * conf/common.mk: New file.
11914 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
11916         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
11917         (grub_script.tab.c): ... here.
11919         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
11920         (grub_script.tab.c): ... here.
11922         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
11923         (grub_script.tab.c): ... here.
11925         * normal/command.c (grub_command_find): Fixed a memory leak of
11926         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
11928 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11930         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
11931         "@" which marks the start of a comment on ARM.
11932         (VARIABLE): Likewise.
11934 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
11936         Add support for Linux/ADFS partition tables.
11938         * partmap/acorn.c: New file.
11940         * include/grub/acorn_filecore.h: Likewise.
11942         * DISTLIST: Added `partmap/acorn.c' and
11943         `include/grub/acorn_filecore.h'.
11945         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11946         `partmap/acorn.c'.
11947         (pkgdata_MODULES): Add `acorn.mod'.
11948         (acorn_mod_SOURCES): New variable.
11949         (acorn_mod_CFLAGS): Likewise.
11951         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
11952         `partmap/acorn.c'.
11953         (pkgdata_MODULES): Add `acorn.mod'.
11954         (acorn_mod_SOURCES): New variable.
11955         (acorn_mod_CFLAGS): Likewise.
11957         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
11958         (pkgdata_MODULES): Add `acorn.mod'.
11959         (acorn_mod_SOURCES): New variable.
11960         (acorn_mod_CFLAGS): Likewise.
11961         (acorn_mod_LDFLAGS): Likewise.
11963         * include/types.h (grub_disk_addr_t): New typedef.
11965 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
11967         * geninit.sh: New file.
11969         * geninitheader.sh: Likewise.
11971         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
11972         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
11973         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
11974         * commands/configfile.c (grub_configfile_init)
11975         (grub_configfile_fini): Likewise.
11976         * commands/default.c (grub_default_init, grub_default_fini):
11977         Likewise.
11978         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
11979         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
11980         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
11981         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
11982         Likewise.
11983         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
11984         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
11985         Likewise.
11986         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
11987         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
11988         Likewise.
11989         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
11990         Likewise.
11991         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
11992         Likewise.
11993         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
11994         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
11995         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
11996         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
11997         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
11998         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
11999         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12000         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12001         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12002         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12003         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12004         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12005         * partmap/amiga.c (grub_amiga_partition_map_init)
12006         (grub_amiga_partition_map_fini): Likewise.
12007         * partmap/apple.c (grub_apple_partition_map_init)
12008         (grub_apple_partition_map_fini): Likewise.
12009         * partmap/pc.c (grub_pc_partition_map_init)
12010         (grub_pc_partition_map_fini): Likewise.
12011         * partmap/sun.c (grub_sun_partition_map_init,
12012         grub_sun_partition_map_fini): Likewise.
12013         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12014         Likewise.
12016         * util/grub-emu.c: Include <grub_modules_init.h>.
12017         (main): Don't initialize and de-initialize any modules directly,
12018         use `grub_init_all' and `grub_fini_all' instead.
12020         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12021         `grub_vesafb_mod_init'.
12022         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
12023         all users.
12024         * term/i386/pc/vga.c (grub_vga_init): Renamed to
12025         `grub_vga_mod_init'.  Updated all users.
12026         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12028         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12029         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12030         rules.
12032         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12033         Generate a function to initialize the module in utilities.
12034         Updated all callers.
12035         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
12036         initialize the module in utilities.  Updated all callers.
12038 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
12040         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12041         escape sequence and a literal ^L to clear the screen.
12043         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12044         when returning from Open Firmware.
12046 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
12048         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12049         (grub_ofconsole_height): Likewise.
12050         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12051         manually insert a '\n'.
12052         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12053         `grub_ofconsole_height'.  Return early if these are already set.
12055 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
12057         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12058         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12059         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12060         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12061         and `normal/script.c'.
12062         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12063         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12064         (test_mod_SOURCES): New variable.
12065         (test_mod_CFLAGS): Likewise.
12066         (test_mod_LDFLAGS): Likewise.
12067         (pkgdata_MODULES): Add `test.mod'.
12068         (grub_script.tab.c): New rule.
12069         (grub_script.tab.h): Likewise.
12071 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
12073         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12074         `commands/test.c', `normal/execute.c', `normal/lexer.c',
12075         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12076         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12077         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12078         (test_mod_SOURCES): New variable.
12079         (test_mod_CFLAGS): Likewise.
12080         (pkgdata_MODULES): Add `test.mod'.
12081         (grub_script.tab.c): New rule.
12082         (grub_script.tab.h): Likewise.
12084 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
12086         Add initial scripting support.
12088         * commands/test.c: New file.
12089         * include/grub/script.h: Likewise.
12090         * normal/execute.c: Likewise.
12091         * normal/function.c: Likewise.
12092         * normal/lexer.c: Likewise.
12093         * normal/parser.y: Likewise.
12094         * normal/script.c: Likewise.
12096         * configure.ac: Add `AC_PROG_YACC' test.
12098         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12099         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12100         `normal/function.c' and `normal/script.c'.
12101         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12102         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12103         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12104         variables.
12105         (pkgdata_MODULES): Add `test.mod'.
12106         (grub_script.tab.c): New rule.
12107         (grub_script.tab.h): Likewise.
12109         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12111         * include/grub/normal.h (grub_test_init): New prototype.
12112         (grub_test_fini): Likewise.
12114         * normal/command.c: Include <grub/script.h>.
12115         (grub_command_execute): Rewritten.
12117         * util/grub-emu.c (main): Call `grub_test_init' and
12118         `grub_test_fini'.
12120 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
12122         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12123         to 0.
12124         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12125         there are no pending characters.
12127 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
12129         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12130         `grub_strndup' to drop device arguments. Replace unnecessary
12131         `grub_strndup' with `grub_strdup'.
12133 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
12135         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12136         `debug' environment variable has been set.
12138 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
12140         * Makefile.in (install-local): Use $(DATA).
12141         (uninstall): Likewise.
12142         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12143         (sbin_UTILITIES): ... to here.
12144         (sbin_SCRIPTS): New variable.
12145         (grub_install_SOURCES): New variable.
12146         * util/powerpc/ieee1275/grub-install.in: New file.
12147         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12148         variable.
12149         (add_segments): Call `grub_util_get_path'.
12151 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
12153         From Timothy Baldwin:
12154         * commands/ls.c (grub_ls_list_files): Close FILE with
12155         grub_file_close.
12156         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12158 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
12160         * include/grub/parser.h: New file.
12162         * kern/parser.c: Likewise.
12164         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12165         (grub_setup_SOURCES): Likewise.
12166         (grub_probefs_SOURCES): Likewise.
12167         (grub_emu_SOURCES): Likewise.
12168         (kernel_img_HEADERS): Add `parser.h'.
12170         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12171         (grub_emu_SOURCES): Add `kern/parser.c'.
12172         (grubof_SOURCES): Likewise.
12174         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12175         (grubof_SOURCES): Add `kern/parser.c'.
12177         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12179         * kern/misc.c (grub_split_cmdline): Removed function.
12181         * kern/rescue.c: Include <grub/parser.h>.
12182         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12183         of `grub_split_cmdline'.
12185         * normal/command.c: Include <grub/parser.h>.
12186         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
12187         of `grub_split_cmdline'.
12189         * normal/completion.c: Include <grub/parser.h>.
12190         (cmdline_state): New variable.
12191         (iterate_dir): End the filename with a quote depending on the
12192         command line state.
12193         (get_state): new function.
12194         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12195         split the arguments and determine the current argument.  When the
12196         argument string is not quoted, escape all spaces.
12198 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
12200         * normal/sparc64/setjmp.S: New file.
12202 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
12204         * include/grub/sparc64/libgcc.h: New file.
12205         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12206         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12207         normal/sparc64/setjmp.c.
12209 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
12211         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12212         * kern/sparc64/cache.S: New file.
12213         * kern/sparc64/cache.c: Removed.
12214         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12215         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
12216         -mtune=ultrasparc.
12217         (COMMON_LDFLAGS): Add -melf64_sparc.
12218         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12219         (grubof_SOURCES): Use cache.S instead of cache.c.
12220         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
12221         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12222         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12223         commented though.
12224         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12225         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12226         (linux_mod_CFLAGS): Commented out.
12227         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12228         out because module isn't built.
12229         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12230         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12231         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12232         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12233         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12234         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12235         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12236         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12237         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12238         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12239         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12240         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12241         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12242         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12244 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
12246         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12247         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12248         longer, because HFS should not be used on PC.
12250 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
12252         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12253         consistently within the loop.
12255 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
12257         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12258         directory can not be read.
12260 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
12262         * configure.ac (AC_INIT): Increase the version number to 1.91.
12264         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12265         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12266         term/i386/pc/serial.c.
12268 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
12270         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12271         file size must be permitted.
12273         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12274         between %ah and %al.
12276 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
12278         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12279         grub_uint64_t.
12280         Call the hook with a NUL-terminated filename.
12281         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12282         grub_cpu_to_be32.
12284         * kern/term.c (cursor_state): New variable.
12285         (grub_term_set_current): Reset the cursor state on a new
12286         terminal.
12287         (grub_setcursor): Rewritten to use CURSOR_STATE.
12288         (grub_getcursor): New function.
12290         * include/grub/term.h (grub_getcursor): New prototype.
12292         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12293         integers on ARM. Reported by Timothy Baldwin
12294         <T.E.Baldwin99@members.leeds.ac.uk>.
12296 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
12298         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12299         allocated.
12300         (grub_sfs_dir): Likewise.
12302 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
12304         Add support for the SFS filesystem.
12306         * fs/sfs.c: New file.
12308         * DISTLIST: Added `fs/sfs.c'.
12310         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12311         (grub_probefs_SOURCES): Likewise.
12312         (grub_emu_SOURCES): Likewise.
12313         (pkgdata_MODULES): Add `sfs.mod'.
12314         (sfs_mod_SOURCES): New variable.
12315         (sfs_mod_CFLAGS): Likewise.
12316         (sfs_mod_LDFLAGS): Likewise.
12318         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12319         (pkgdata_MODULES): Add `sfs.mod'.
12320         (sfs_mod_SOURCES): New variable.
12321         (sfs_mod_CFLAGS): Likewise.
12323         * util/grub-emu.c (main): Call `grub_sfs_init' and
12324         `grub_sfs_fini'.
12326         * include/grub/fs.h (grub_sfs_init): New prototype.
12327         (grub_sfs_fini): Likewise.
12329 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
12331         Add support for the AFFS filesystem.
12333         * fs/affs.c: New file.
12335         * DISTLIST: Added `fs/affs.c'.
12337         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12338         (grub_probefs_SOURCES): Likewise.
12339         (grub_emu_SOURCES): Likewise.
12340         (pkgdata_MODULES): Add `affs.mod'.
12341         (affs_mod_SOURCES): New variable.
12342         (affs_mod_CFLAGS): Likewise.
12343         (affs_mod_LDFLAGS): Likewise.
12345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12346         (pkgdata_MODULES): Add `affs.mod'.
12347         (affs_mod_SOURCES): New variable.
12348         (affs_mod_CFLAGS): Likewise.
12350         * util/grub-emu.c (main): Call `grub_affs_init' and
12351         `grub_affs_fini'.
12353         * include/grub/fs.h (grub_affs_init): New prototype.
12354         (grub_affs_fini): Likewise.
12356 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
12358         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12360 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
12362         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
12363         `-m32' to CFLAGS.
12365         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12366         linking.
12368         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12369         (COMMON_LDFLAGS): New variable.
12370         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12371         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12372         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12373         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12374         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12375         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12376         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12377         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12378         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12379         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12380         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12381         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12382         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12383         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12384         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12385         variables.
12386         (normal_mod_ASFLAGS): Add `-m32'.
12388         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12389         (grub_host_size_t, grub_host_ssize_t): New types.
12390         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
12391         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
12392         `GRUB_HOST_SIZEOF_VOID_P'.
12394         * include/grub/kernel.h (struct grub_module_header): Type of
12395         member offset changed to `grub_host_off_t'.  Type of member size
12396         changed to `grub_host_size_t'.
12397         (struct grub_module_info): Type of member offset changed to
12398         `grub_host_off_t'.  Type of member size changed to
12399         `grub_host_size_t'.
12401 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
12403         Make GRUB's kernel compliant to Multiboot Specification.
12405         * kern/i386/pc/startup.S (multiboot_header): New label.
12406         (multiboot_entry): Likewise.
12407         (multiboot_trampoline): Likewise.
12409         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12410         Increased to 0x4A0.
12412         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12413         put parentheses after a question mark.
12414         [!GRUB_UTIL] (my_mod): New variable.
12416         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12418 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
12420         Adds support for the XFS filesystem.  Btrees are not supported
12421         yet.
12423         * fs/xfs.c: New file.
12425         * DISTLIST: Added `fs/xfs.c'.
12427         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12428         (grub_probefs_SOURCES): Likewise.
12429         (grub_emu_SOURCES): Likewise.
12430         (pkgdata_MODULES): Add `xfs.mod'.
12431         (xfs_mod_SOURCES): New variable.
12432         (xfs_mod_CFLAGS): Likewise.
12434         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12435         (pkgdata_MODULES): Add `xfs.mod'.
12436         (xfs_mod_SOURCES): New variable.
12437         (xfs_mod_CFLAGS): Likewise.
12439         * util/grub-emu.c (main): Call `grub_xfs_init' and
12440         `grub_xfs_fini'.
12442         * include/grub/fs.h (grub_xfs_init): New prototype.
12443         (grub_xfs_fini): Likewise.
12446 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
12448         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12449         color modes, allow greater than 16 colors to be configured as
12450         a default palette.
12452 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
12454         * normal/completion.c (complete_arguments): Add the qualifier
12455         const into OPTIONS.
12457         From Omniflux <omniflux+lists@omniflux.com>:
12458         * include/grub/terminfo.h: New file.
12459         * include/grub/tparm.h: Likewise.
12460         * include/grub/i386/pc/serial.h: Likewise.
12461         * term/terminfo.c: Likewise.
12462         * term/tparm.c: Likewise.
12463         * term/i386/pc/serial.c: Likewise.
12464         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12465         serial.mod.
12466         (terminfo_mod_SOURCES): New variable.
12467         (terminfo_mod_CFLAGS): Likewise.
12468         (serial_mod_SOURCES): Likewise.
12469         (serial_mod_CFLAGS): Likewise.
12471 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
12473         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12474         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12475         and kern/powerpc/ieee1275/cmain.c, respectively.
12477         * boot/powerpc/ieee1275/crt0.S: Moved to ...
12478         * kern/powerpc/ieee1275/crt0.S: ... here.
12480         * boot/powerpc/ieee1275/cmain.c: Moved to ...
12481         * kern/powerpc/ieee1275/cmain.c: ... here.
12483         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12484         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12485         instead of boot/powerpc/ieee1275/crt0.S and
12486         boot/powerpc/ieee1275/cmain.c, respectively.
12488         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12489         sectors. It was not used anyway.
12491 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
12493         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12494         `unused parameter' warning.
12496 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
12498         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12499         function.
12500         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12501         getcharwidth.
12503 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
12505         * include/grub/normal.h (enum grub_completion_type): Added
12506         `GRUB_COMPLETION_TYPE_ARGUMENT'.
12508         * normal/cmdline.c (print_completion): Handle
12509         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12510         * normal/menu_entry.c (store_completion): Likewise.
12512         * normal/completion.c (complete_arguments): New function.
12513         (grub_normal_do_completion): Call `complete_arguments' when the
12514         current words start with a dash.
12516 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
12518         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12519         `gzio.mod' instead of `io.mod').
12521 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
12523         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12524         (DISTDIRS): Added io and video.
12525         Rewrite the search routine to make an output consistently.
12527         * DISTLIST: Added conf/sparc64-ieee1275.mk,
12528         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12529         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12530         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12531         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12532         util/powerpc/ieee1275/misc.c.
12534         * include/grub/gzio.h: New file.
12535         * io/gzio.c: Likewise.
12537         * kern/file.c (grub_file_close): Call grub_device_close only if
12538         FILE->DEVICE is not NULL.
12540         * include/grub/mm.h [!NULL] (NULL): New macro.
12542         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12544         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12545         (pkgdata_MODULES): Added gzio.mod.
12546         (gzio_mod_SOURCES): New variable.
12547         (gzio_mod_CFLAGS): Likewise.
12549         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12550         (pkgdata_MODULES): Added gzio.mod.
12551         (gzio_mod_SOURCES): New variable.
12552         (gzio_mod_CFLAGS): Likewise.
12554         * commands/cat.c: Include grub/gzio.h.
12555         (grub_cmd_cat): Use grub_gzfile_open instead of
12556         grub_file_open.
12558         * commands/cmp.c: Include grub/gzio.h.
12559         (grub_cmd_cmp): Use grub_gzfile_open instead of
12560         grub_file_open.
12562         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12563         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12564         grub_file_open.
12565         (grub_rescue_cmd_module): Likewise.
12567 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
12569         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12570         kern/sparc64/ieee1275/init.c because it contains _start.
12571         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12573 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
12575         * configure.ac: Add support for sparc64 host with ieee1275
12576         firmware.
12577         * configure: Generated from configure.ac.
12578         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12579         instead of int.
12580         (grub_ofdisk_read): Likewise.
12581         (grub_ofdisk_open): Use %p to print pointer values, and cast the
12582         pointers as (void *) to remove a warning.
12583         (grub_ofdisk_close): Likewise.
12584         (grub_ofdisk_read): Likewise.
12585         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12586         returns, so make it return void to remove a warning.
12587         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12588         Corresponding prototype change.
12589         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12590         values, and cast the pointers as (void *) to remove a warning.
12591         (grub_mm_dump): Likewise.
12592         * conf/sparc64-ieee1275.mk: New file.
12593         * conf/sparc64-ieee1275.rmk: Likewise.
12594         * include/grub/sparc64/setjmp.h: Likewise.
12595         * include/grub/sparc64/types.h: Likewise.
12596         * include/grub/sparc64/ieee1275/console.h: Likewise.
12597         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12598         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12599         * include/grub/sparc64/ieee1275/time.h: Likewise.
12600         * kern/sparc64/cache.c: Likewise.
12601         * kern/sparc64/dl.c: Likewise.
12602         * kern/sparc64/ieee1275/init.c: Likewise.
12603         * kern/sparc64/ieee1275/openfw.c: Likewise.
12605 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
12607         * util/console.c (grub_ncurses_putchar): If C is greater than
12608         0x7f, set C to a question mark.
12609         (grub_ncurses_getcharwidth): New function.
12610         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12611         getcharwidth.
12613         * normal/menu.c (print_entry): Made aware of Unicode. First,
12614         convert TITLE to UCS-4, and predict the cursor position by
12615         grub_getcharwidth.
12617         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12618         const to SRC.
12619         * kern/misc.c (grub_utf16_to_utf8): Likewise.
12621 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
12623         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12624         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12625         grub_strcat.
12627         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12628         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12629         grub_strcpy and grub_strlen. Take it into account that a space
12630         character is inserted as a delimiter.
12632 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
12634         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
12635         invalid magic in the error.
12637         * commands/search.c: New file.
12639         * util/grub-emu.c (main): Call grub_search_init and
12640         grub_search_fini.
12642         * kern/rescue.c (grub_rescue_print_disks): Removed.
12643         (grub_rescue_print_devices): New function.
12644         (grub_rescue_cmd_ls): Use grub_device_iterate with
12645         grub_rescue_print_devices instead of grub_disk_dev_iterate with
12646         grub_rescue_print_disks.
12648         * kern/partition.c (grub_partition_iterate): Return the result of
12649         PARTMAP->ITERATE instead of GRUB_ERRNO.
12651         * kern/device.c: Include grub/partition.h.
12652         (grub_device_iterate): New function.
12654         * include/grub/partition.h (grub_partition_iterate): Return int
12655         instead of grub_err_t.
12657         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
12658         prototype.
12659         [GRUB_UTIL] (grub_search_fini): Likewise.
12661         * include/grub/device.h (grub_device_iterate): New prototype.
12663         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12664         commands/search.c.
12665         (pkgdata_MODULES): Added search.mod.
12666         (search_mod_SOURCES): New variable.
12667         (search_mod_CFLAGS): Likewise.
12669         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
12670         (pkgdata_MODULES): Added search.mod.
12671         (search_mod_SOURCES): New variable.
12672         (search_mod_CFLAGS): Likewise.
12674         * commands/ls.c (grub_ls_list_disks): Renamed to ...
12675         (grub_ls_list_devices): ... this, and use grub_device_iterate.
12676         All callers changed.
12678         * DISTLIST: Added commands/search.c.
12680 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
12682         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
12683         conversion.
12684         (grub_getcharwidth): New function.
12686         * kern/misc.c (grub_utf8_to_ucs4): New function.
12688         * include/grub/term.h (struct grub_term): Added a new member
12689         "getcharwidth".
12690         (grub_getcharwidth): New prototype.
12692         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
12694         * term/i386/pc/console.c (map_char): New function. Segregated from
12695         grub_console_putchar.
12696         (grub_console_putchar): Use map_char.
12697         (grub_console_getcharwidth): New function.
12698         (grub_console_term): Specified grub_console_getcharwidth as
12699         getcharwidth.
12701         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
12702         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
12704         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
12705         GRUB_ERRNO.
12706         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
12707         on grub_strtoul completely.
12708         (write_char): Declare local variables in the beginning of the
12709         function.
12710         (grub_vesafb_getcharwidth): New function.
12711         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
12712         getcharwidth.
12714 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
12716         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
12717         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
12718         commands/i386/pc/vbetest.c.
12720         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
12721         call grub_vbe_get_controller_info again, because the returned
12722         information is volatile.
12723         (grub_vbe_set_video_mode): Mostly rewritten.
12724         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
12725         grub_vbe_status_t correctly.
12726         (grub_vbe_get_video_mode_info): Likewise.
12727         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
12728         several if statements.
12730         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
12731         * commands/i386/pc/vbeinfo.c: ... this.
12733         * commands/i386/pc/vbe_test.c: Renamed to ...
12734         * commands/i386/pc/vbetest.c: ... this.
12736         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
12737         ...
12738         (grub_cmd_vbeinfo): ... this. Save video modes before
12739         iterating. Skip a video mode, if it is not available, not enough
12740         information is given or it is monochrome. Show the memory
12741         model. Leave the interpretation of MODEVAR to grub_strtoul
12742         completely.
12743         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
12744         (GRUB_MOD_FINI): Likewise.
12746         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
12747         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
12748         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
12749         duplicated grub_env_get. Leave the interpretation of MODEVAR to
12750         grub_strtoul completely.
12751         (real2pm): Removed.
12752         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
12753         (GRUB_MOD_FINI): Likewise.
12755         * normal/misc.c: Include grub/mm.h.
12757         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
12758         vbe_list_modes with vbetest.mod and vbeinfo.mod.
12759         (vbe_list_modes_mod_SOURCES): Removed.
12760         (vbe_list_modes_mod_CFLAGS): Likewise.
12761         (vbe_test_mod_SOURCES): Likewise.
12762         (vbe_test_mod_CFLAGS): Likewise.
12763         (vbeinfo_mod_SOURCES): New variable.
12764         (vbeinfo_mod_CFLAGS): Likewise.
12765         (vbetest_mod_SOURCES): Likewise.
12766         (vbetest_mod_CFLAGS): Likewise.
12768 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
12770         * normal/misc.c: New file.
12772         * DISTLIST: Added normal/misc.c.
12774         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
12775         DISK to HOOK. Call HOOK with DISK.
12776         * partmap/apple.c (apple_partition_map_iterate): Likewise.
12777         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12778         * partmap/sun.c (sun_partition_map_iterate): Likewise.
12780         * normal/menu_entry.c (struct screen): Added a new member
12781         "completion_shown".
12782         (completion_buffer): New global variable.
12783         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
12784         (store_completion): New function.
12785         (complete): Likewise.
12786         (clear_completions): Likewise.
12787         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
12788         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
12789         a tab, call complete.
12791         * normal/completion.c (disk_dev): Removed.
12792         (print_simple_completion): Likewise.
12793         (print_partition_completion): Likewise.
12794         (print_func): New global variable.
12795         (add_completion): Do not take the arguments WHAT or PRINT any
12796         longer. Added a new argument TYPE. Instead of printing directly,
12797         call PRINT_FUNC if not NULL.
12798         All callers changed.
12799         (complete_device): Use a local variable DEV instead of
12800         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
12801         (grub_normal_do_completion): Take a new argument HOOK. Do not
12802         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
12803         empty string, return NULL instead.
12804         All callers changed.
12806         * normal/cmdline.c (print_completion): New function.
12808         * kern/partition.c (grub_partition_iterate): Add an argument DISK
12809         to HOOK.
12810         All callers changed.
12812         * kern/disk.c (grub_print_partinfo): Removed.
12814         * include/grub/partition.h (struct grub_partition_map): Add a new
12815         argument DISK into HOOK of ITERATE.
12816         (grub_partition_iterate): Add a new argument DISK to HOOK.
12818         * include/grub/normal.h (enum grub_completion_type): New enum.
12819         (grub_completion_type_t): New type.
12820         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
12821         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
12822         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
12823         (GRUB_COMPLETION_TYPE_FILE): Likewise.
12824         (grub_normal_do_completion): Added a new argument HOOK.
12825         (grub_normal_print_device_info): New prototype.
12827         * include/grub/disk.h (grub_print_partinfo): Removed.
12829         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
12830         (normal_mod_SOURCES): Likewise.
12831         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12832         (normal_mod_SOURCES): Likewise.
12834         * commands/ls.c (grub_ls_list_disks): Use
12835         grub_normal_print_device_info instead of grub_print_partinfo. Free
12836         PNAME.
12837         (grub_ls_list_files): Use grub_normal_print_device_info instead of
12838         duplicating the code.
12840 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
12842         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
12843         follow GCS more precisely.
12844         * commands/i386/pc/vbe_test.c: Likewise.
12845         * include/grub/i386/pc/vbe.h: Likewise.
12846         * term/i386/pc/vesafb.c: Likewise.
12847         * video/i386/pc/vbe.c: Likewise.
12849 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
12851         * DISTLIST: Added term/i386/pc/vesafb.c
12852         DISTLIST: Added video/i386/pc/vbe.c
12853         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
12854         DISTLIST: Added commands/i386/pc/vbe_test.c.
12855         * commands/i386/pc/vbe_list_modes.c: New file.
12856         * commands/i386/pc/vbe_test.c: Likewise.
12857         * term/i386/pc/vesafb.c: Likewise.
12858         * video/i386/pc/vbe.c: Likewise.
12859         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
12860         (grub_vbe_probe) Added prototype.
12861         (grub_vbe_set_video_mode) Likewise.
12862         (grub_vbe_get_video_mode) Likewise.
12863         (grub_vbe_get_video_mode_info) Likewise.
12864         (grub_vbe_set_pixel_rgb) Likewise.
12865         (grub_vbe_set_pixel_index) Likewise.
12866         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
12867         (pkgdata_MODULES): Added vesafb.mod.
12868         (pkgdata_MODULES): Added vbe_list_modes.mod.
12869         (pkgdata_MODULES): Added vbe_test.mod.
12870         (vbe_mod_SOURCES): Added.
12871         (vbe_mod_CFLAGS): Likewise.
12872         (vesafb_mod_SOURCES): Likewise.
12873         (vesafb_mod_CFLAGS): Likewise.
12874         (vbe_list_modes_mod_SOURCES): Likewise.
12875         (vbe_list_modes_mod_CFLAGS): Likewise.
12876         (vbe_test_mod_SOURCES): Likewise.
12877         (vbe_test_mod_CFLAGS): Likewise.
12879 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
12881         * normal/command.c (grub_command_execute): If INTERACTIVE is
12882         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
12883         CMDLINE. Disable the pager if INTERACTIVE is true.
12884         All callers are changed.
12886         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
12887         before reading a config file.
12888         * normal/main.c (read_config_file): Even if a command is not
12889         found, register it if it is within an entry.
12891         * util/grub-emu.c: Include sys/types.h and unistd.h.
12892         (options): Added --hold.
12893         (struct arguments): Added a new member "hold".
12894         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
12895         missing.
12896         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
12897         cleared by a debugger, if it is not zero.
12899         * include/grub/normal.h (grub_command_execute): Add an argument
12900         INTERACTIVE.
12902 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
12904         * DISTLIST: Added include/grub/i386/pc/vbe.h.
12906 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
12908         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
12909         program with another one, because the old one didn't detect a bug
12910         in gcc-3.4. Always use regparm 2, because the new test is still
12911         not enough for gcc-4.0. Someone must investigate a simple test
12912         case which detects a bug in gcc-4.0.
12914 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
12916         * DISTLIST: Added normal/completion.c.
12918         * normal/completion.c: New file.
12920         * term/i386/pc/console.c (grub_console_getwh): New function.
12921         (grub_console_term): Assign grub_console_getwh to getwh.
12923         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
12924         function is defined in normal/completion.c as
12925         grub_normal_do_completion.
12926         (grub_cmdline_get): Use grub_normal_do_completion instead of
12927         grub_tab_complete.
12929         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
12930         returns non-zero, otherwise return 0.
12931         (grub_partition_iterate): First, probe the partition map. Then,
12932         call ITERATE only for this partition map.
12934         * kern/misc.c (grub_strncmp): Rewritten.
12936         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
12937         returns non-zero. Otherwise return 0.
12939         * include/grub/partition.h (grub_partition_map_iterate): Return
12940         int instead of void.
12942         * include/grub/normal.h (grub_normal_do_completion): New prototype.
12944         * include/grub/misc.h (grub_strncmp): Change the type of N to
12945         grub_size_t.
12947         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
12948         of void.
12950         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
12951         unsigned explicitly before comparing it with I.
12953         * kern/main.c (grub_env_write_root): Add the attribute unused into
12954         VAR.
12956         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12957         normal/completion.c.
12958         (normal_mod_SOURCES): Likewise.
12959         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12960         (normal_mod_SOURCES): Likewise.
12962         * normal/command.c (grub_iterate_commands): If ITERATE returns
12963         non-zero, return one immediately.
12965 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
12967         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
12968         * kern/i386/pc/startup.S: Updated Global Descriptor table's
12969         descriptions.
12970         (grub_vbe_get_controller_info): New function.
12971         (grub_vbe_get_mode_info): Likewise.
12972         (grub_vbe_set_mode): Likewise.
12973         (grub_vbe_get_mode): Likewise.
12974         (grub_vbe_set_memory_window): Likewise.
12975         (grub_vbe_get_memory_window): Likewise.
12976         (grub_vbe_set_scanline_length): Likewise.
12977         (grub_vbe_get_scanline_length): Likewise.
12978         (grub_vbe_set_display_start): Likewise.
12979         (grub_vbe_get_display_start): Likewise.
12980         (grub_vbe_set_palette_data): Likewise.
12981         * include/grub/i386/pc/vbe.h: New file.
12983 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
12985         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
12986         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
12987         * DISTLIST: Likewise.
12988         * kern/ieee1275/of.c: Moved to ...
12989         * kern/ieee1275/ieee1275.c: ... here.
12991 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
12993         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
12994         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
12995         Pass 0 as `end' parameter to grub_strtoul().
12997 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
12999         * include/grub/powerpc/ieee1275/console.h: Do not include
13000         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
13001         ifdef.
13002         (grub_console_cur_color): Remove i386-specific prototype.
13003         (grub_console_real_putchar): Likewise.
13004         (grub_console_checkkey): Likewise.
13005         (grub_console_getkey): Likewise.
13006         (grub_console_getxy): Likewise.
13007         (grub_console_gotoxy): Likewise.
13008         (grub_console_cls): Likewise.
13009         (grub_console_setcursor): Likewise.
13010         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13011         Include <grub/machine/console.h>.
13012         * term/ieee1275/ofconsole.c: Likewise.
13014 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
13016         * Makefile.in (LIBLZO): New variable.
13018         * configure.ac: Check for LZO version 2.
13020         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13021         lzo/lzo1x.h instead of lzo1x.h.
13023         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13024         of -llzo.
13026         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13027         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13029         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13030         copying the data from PARTITION to P.
13032 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13034         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13035         negative, unload the module.
13037         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13038         map is "pc_partition_map" but not "pc".
13039         (usage): Fix the description. The options are --boot-image and
13040         --core-image but not --boot-file or --core-file.
13041         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13042         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13043         DEFAULT_DIRECTORY.
13045         * util/i386/pc/grub-install.in: Do not specify --boot-file or
13046         --core-file. Specify INSTALL_DEVICE as an argument.
13048         * util/console.c: Include config.h.
13049         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13050         [HAVE_NCURSES_H]: Include ncurses.h.
13051         [HAVE_CURSES_H]: Include curses.h.
13052         [!A_NORMAL] (A_NORMAL): Defined as zero.
13053         [!A_STANDOUT] (A_STANDOUT): Likewise.
13055         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13056         -lncurses.
13057         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13059         * configure.ac: Check for curses libraries and headers.
13061         * Makefile.in (LIBCURSES): New variable.
13063         * genmk.rb (Script::rule): Set the executable bits.
13065         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13066         name of the PC partition map is "pc_partition_map" but not "pc".
13068 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13070         * util/i386/pc/grub-install.in (grub_probefs): New variable.
13071         (modules): Likewise.
13072         (usage): Added descriptions for --modules and --grub-probefs.
13073         Handle --modules and --grub-probefs. Save the arguments in MODULES
13074         and GRUB_PROBEFS, respectively.
13075         Auto-detect a filesystem module against GRUBDIR. If the result is
13076         empty and modules are not specified explicitly, abort the
13077         installation. Add the result to MODULES.
13079         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13080         disk/powerpc/ieee1275/ofdisk.c,
13081         include/grub/powerpc/ieee1275/init.h and
13082         term/powerpc/ieee1275/ofconsole.c.
13083         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13084         term/ieee1275/ofconsole.c.
13086         * include/grub/powerpc/ieee1275/console.h: Resurrected.
13088         * COPYING: Upgraded to the latest version. Only the address of the
13089         FSF office has changed.
13091 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
13093         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13094         kern/ieee1275.c with kern/ieee1275/of.c.
13096         * kern/ieee1275.c: Moved to ...
13097         * kern/ieee1275/of.c: ... here.
13099 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
13101         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
13102         readability.
13104         * config.guess: Updated to the latest version from gnulib.
13105         * config.sub: Likewise.
13106         * install.sh: Likewise.
13107         * mkinstalldirs: Likewise.
13109         * include/grub/console.h: Removed. This file is arch-specific. Do
13110         not put this in include/grub.
13112         * include/grub/i386/pc/console.h: Resurrected.
13114         * util/console.c: Include grub/machine/console.h instead of
13115         grub/console.h.
13116         * util/grub-emu.c: Likewise.
13118 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
13120         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13121         hardcoded value.
13123         From Vincent Pelletier  <subdino2004@yahoo.fr>
13124         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13125         Redefined to use grub_getwh.
13126         (grub_term): New member named getwh.
13127         (grub_getwh): New prototype.
13128         * kern/term.c (grub_getwh): New function.
13129         * term/i386/pc/console.c (grub_console_getwh): New function.
13130         (grub_console_term): New member `getwh'.
13131         * term/i386/pc/vga.c (grub_vga_getwh): New function.
13132         (grub_vga_term): New member `getwh'.
13133         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
13134         grub_ssize_t.
13135         (grub_ofconsole_getw): New function.
13136         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13137         (grub_ofconsole_term): New field named getwh and new initial
13138         value.
13140 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
13142         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13143         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
13144         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13145         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13146         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13147         of <grub/machine/ieee1275.h>.
13148         * commands/ieee1275/reboot.c: Likewise.
13149         * boot/powerpc/ieee1275/ieee1275.c: Move ...
13150         * kern/ieee1275.c: ... to here.  All users updated.  Change all
13151         parameter structs to use new type `grub_ieee1275_cell_t'.
13152         * term/powerpc/ieee1275/ofconsole.c: Move ...
13153         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
13154         * disk/powerpc/ieee1275/ofdisk.c: Move ...
13155         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
13156         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13157         to return int.
13158         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13159         Remove unused prototypes.  All users updated.
13160         * include/grub/powerpc/ieee1275/console.h: Removed.
13161         * include/grub/powerpc/ieee1275/ieee1275.h: Define
13162         `grub_ieee1275_cell_t'.
13163         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13164         Cast comparisons with -1 to the correct type.
13165         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13166         type to match `grub_ieee1275_entry_fn'.
13168 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
13170         * DISTLIST: Added util/i386/pc/grub-probefs.c.
13172         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13173         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13174         partmap/sun.c.
13175         (grub_probefs_SOURCES): New variable.
13177         * util/i386/pc/grub-probefs.c: New file.
13179         * util/i386/pc/grub-setup.c (main): Call
13180         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13181         grub_hfs_init and grub_jfs_init to initialize the system. Call
13182         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13183         grub_pc_partition_map_fini to finish the system.
13185 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
13187         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13188         function.
13189         (grub_multiboot_load_elf32): Likewise.
13190         (grub_multiboot_is_elf64): Likewise.
13191         (grub_multiboot_load_elf64): Likewise.
13192         (grub_multiboot_load_elf): Likewise.
13193         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13194         an ELF32 or ELF64 file.
13195         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13197         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13198         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13199         NULL before calling FS->LABEL.
13200         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13201         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13202         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13203         before calling FS->LABEL.
13205 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
13207         * util/i386/pc/grub-install.in (datadir): New variable.
13208         (libdir): Removed.
13209         (pkgdatadir): New variable.
13210         (pkglibdir): Removed.
13212 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
13214         * DISTLIST: Added util/i386/pc/grub-install.in.
13216         * util/i386/pc/grub-install.in: New file.
13218         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13219         (grub_install_SOURCES): Likewise.
13221         * genmk.rb: Added support for scripts.
13222         (Script): New class.
13223         (scripts): New variable.
13225         * Makefile.in (install-local): Install sbin_SCRIPTS by
13226         INSTALL_SCRIPT.
13227         (uninstall): Remove sbin_SCRIPTS.
13229         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13230         device, try to get a GRUB device by
13231         grub_util_biosdisk_get_grub_dev.
13232         Free DEST_DEV.
13234         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13235         description for --device-map.
13237 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
13239         Change the semantics of variable hooks. They now return strings
13240         instead of error values.
13242         * util/i386/pc/grub-setup.c: Include grub/env.h.
13243         (setup): Use grub_device_set_root instead of grub_env_set.
13245         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13246         grub_env_get instead of grub_device_set_root and
13247         grub_device_get_root, respectively.
13249         * kern/main.c (grub_env_write_root): New function.
13250         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13251         grub_env_set instead of grub_device_set_root.
13253         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13254         many variables.
13255         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13256         rather than calling ENV->WRITE_HOOK afterwards.
13257         (grub_env_get): Return the result of ENV->READ_HOOK rather than
13258         passing a pointer of a pointer.
13259         (grub_register_variable_hook): Change the types of "read_hook" and
13260         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13261         respectively.
13262         Allocate the default empty string on the heap, because this string
13263         may be freed later.
13265         * kern/device.c: Include grub/env.h.
13266         (grub_device_set_root): Removed.
13267         (grub_device_get_root): Likewise.
13268         (grub_device_open): Use grub_env_get instead of
13269         grub_device_get_root.
13271         * include/grub/env.h (grub_env_read_hook_t): New type.
13272         (grub_env_write_hook_t): Likewise.
13273         (grub_env_var): Change the types of "read_hook" and "write_hook"
13274         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13275         (grub_register_variable_hook): Likewise.
13277         * include/grub/device.h (grub_device_set_root): Removed.
13278         (grub_device_set_root): Likewise.
13280         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13281         make sure that DIRNAME terminates with '/', so that
13282         grub_fat_find_dir will fail if PATH is not a directory.
13284         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13285         from DIRNAME.
13286         Use the qualifier auto for print_files and print_files_long.
13287         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13288         as a regular file.
13289         Put a newline only if there is no error.
13290         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13291         used.
13293 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
13295         * kern/partition.c (grub_partition_probe): Initialize PART to
13296         NULL. Otherwise, when no partition map is registered, this returns
13297         a garbage.
13299 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
13301         * partmap/apple.c (apple_partition_map_iterate): Check if POS
13302         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13303         valid.
13305 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
13307         * commands/ls.c (grub_ls_list_disks): Print the filesystem
13308         information on each device, if it does not have partitions. Print
13309         "Device" instead of "Disk", because this function is not specific
13310         to disk devices.
13312         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13313         static to ensure that it is put on the memory rather than a
13314         register.
13316 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
13318         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13319         (grub_cat_init): Likewise.
13320         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13321         (options): Likewise.
13322         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13323         (grub_configfile_init): Likewise.
13324         * font/manager.c (GRUB_MOD_INIT): Likewise.
13325         * commands/help.c (GRUB_MOD_INIT): Likewise.
13326         (grub_help_init): Likewise.
13327         * normal/command.c (grub_command_init): Likewise.
13328         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13329         * disk/loopback.c (grub_loop_init): Likewise.
13330         (GRUB_MOD_INIT): Likewise.
13331         * commands/ls.c (grub_ls_init): Likewise.
13332         (GRUB_MOD_INIT): Likewise.
13333         (options): Likewise.
13334         * commands/boot.c (grub_boot_init): Likewise.
13335         (GRUB_MOD_INIT): Likewise.
13336         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13337         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13338         (GRUB_MOD_INIT): Likewise.
13339         * commands/cmp.c (grub_cmp_init): Likewise.
13340         (GRUB_MOD_INIT): Likewise.
13342         * normal/arg.c: Use <> instead of "" to include header files.
13343         (SHORT_ARG_HELP): New macro.
13344         (SHORT_ARG_USAGE): Likewise.
13345         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13346         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13347         descriptions.
13348         (find_short): Check if C is 'h' or 'u' explicitly.
13349         (grub_arg_show_help): Use space characters instead of tabs. Treat
13350         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13351         are shown with --help and --usage only if they are not used for
13352         the command itself.
13353         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13354         'h' and 'u'.
13356         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13357         const into "longarg". Change the type of "shortarg" to int.
13359 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
13361         * boot/i386/pc/boot.S (boot_drive_check): New label.
13363         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13364         macro.
13366         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13367         which do not pass a boot drive correctly. Copied from GRUB Legacy.
13369 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
13371         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13372         When turning off Gate A20, skip the check and return immediately,
13373         because this is not fatal usually.
13375 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
13377         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13378         be 0x7C00 instead of 0x8000.
13380         * boot/i386/pc/pxeboot.S: Rewritten.
13382         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13383         EXT_C.
13384         (gate_a20_check_state): Read a byte from 0x108000. Invert the
13385         result.
13387 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
13389         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13390         robustness. This routine now supports a BIOS call and System
13391         Control Port A to modify the gate A20.
13393         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13394         Increased to 0x440.
13396 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
13398         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13399         device path and resulting ihandle.
13400         (grub_ofdisk_close): dprintf the ihandle being closed.
13401         (grub_ofdisk_read): dprintf function parameters.
13402         * kern/mm.c (grub_mm_init_region): Likewise.
13403         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13404         (grub_linux_boot): dprintf the Linux entry point, initrd address and
13405         size, and boot arguments.
13406         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13407         before loading into memory.
13408         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13409         before loading into memory.
13411 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
13413         * kern/mm.c: Added much documentation.
13414         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13415         8, set to 5 instead of 8.
13417 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
13419         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13421         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13422         (grub_mkdevicemap_SOURCES): New variable.
13424         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13425         lib/device.c of GRUB Legacy.
13427 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
13429         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13430         instead of PATH is NULL.
13432 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
13434         * commands/cmp.c (BUFFER_SIZE): New macro.
13435         (grub_cmd_cmp): Close the right file at the right time.  Compare
13436         only data just read.  Don't report files of different  size as
13437         identical.  Dynamically allocate buffers.  Move variable
13438         declarations at the beginning of function.
13440 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
13442         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13443         reverse.
13445 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
13447         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13448         when backspace is pressed at beginning of line.
13450 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
13452         * DISTLIST: Added genfslist.sh.
13454         * normal/main.c (fs_module_list): New variable.
13455         (autoload_fs_module): New function.
13456         (read_fs_list): Likewise.
13457         (grub_normal_execute): Call read_fs_list.
13459         * kern/fs.c (grub_fs_autoload_hook): New variable.
13460         (grub_fs_probe): Added support for auto-loading.
13462         * include/grub/normal.h (struct grub_fs_module_list): New struct.
13463         (grub_fs_module_list_t): New type.
13465         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13466         (grub_fs_autoload_hook): New prototype.
13468         * genfslist.sh: New file.
13470         * genmk.rb: Added a rule to generate a filesystem list.
13472 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
13474         * configure.ac: Fix the test for cross-compiling.
13476         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
13477         define GRUB_UTIL anymore.
13479         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13480         so this function works on other systems than just big endian.
13481         (load_modules): Likewise.
13482         (add_segments): Likewise.
13484 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
13486         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
13487         contains `l' modifier, get a long from va_arg().
13489 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
13491         * kern/mm.c (grub_free): If the next free block which is being
13492         merged is the first free block, set the first block to the block
13493         being freed.
13494         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13496 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
13498         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13499         `grub_ieee1275_chosen'.
13501 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
13503         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13504         (grub_ieee1275_chosen): New variable.
13505         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13506         `chosen'.
13507         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13508         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13509         Rename first argument to `phandle' for consistency.
13510         (grub_ieee1275_get_property_length): Likewise.
13511         (grub_ieee1275_next_property): Likewise.  Change type of first argument
13512         to grub_ieee1275_phandle_t.
13513         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13514         Move export next to declaration.
13515         (grub_ieee1275_chosen): New variable.
13516         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13517         Correct cosmetic typo.
13518         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13519         `grub_ieee1275_chosen'.
13520         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13521         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13522         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13523         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13524         `grub_ieee1275_chosen'.
13526 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
13528         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13529         /chosen/bootargs.
13530         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13531         /chosen/bootargs as "variable=value" pairs.
13533 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
13535         * include/grub/misc.h (grub_dprintf): New macro.
13536         (grub_real_dprintf): New prototype.
13537         (grub_strword): Likewise.
13538         (grub_iswordseparator): Likewise.
13539         * kern/misc.c (grub_real_dprintf): New function.
13540         (grub_strword): Likewise.
13541         (grub_iswordseparator): Likewise.
13543 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
13545         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13546         (roundup): Remove macro.
13547         (grub_ieee1275_flags): Make static.
13548         (grub_ieee1275_realmode): Remove.
13549         (grub_ieee1275_test_flag): New function.
13550         (grub_ieee1275_set_flag): Likewise.
13551         (find_options): Rename to `grub_ieee1275_find_options'; update
13552         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13553         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13554         (cmain): New prototype.
13555         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13556         `grub_ieee1275_flags' directly.
13557         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13558         machine/biosdisk.h.
13559         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13560         Don't include grub/machine/init.h.
13561         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13562         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13563         Remove prototype.
13564         (grub_ieee1275_realmode): Likewise.
13565         (grub_ieee1275_flag): New enum.
13566         (grub_ieee1275_test_flag): New prototype.
13567         (grub_ieee1275_set_flag): New prototype.
13568         * include/grub/powerpc/ieee1275/init.h: Remove file.
13569         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13570         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13571         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
13572         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
13573         comment.
13574         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13575         `grub_ieee1275_test_flag'.
13576         (grub_ieee1275_encode_devname): Likewise.
13578 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
13580         * include/grub/powerpc/ieee1275/ieee1275.h
13581         (grub_ieee1275_encode_devname): New prototype.
13582         (grub_ieee1275_get_filename): Likewise.
13583         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13584         function.
13585         (grub_set_prefix): Likewise.
13586         (grub_machine_init): Call grub_set_prefix.
13587         * kern/powerpc/ieee1275/openfw.c: Fix typos.
13588         (grub_parse_type): New enum.
13589         (grub_ieee1275_get_devargs): New function.
13590         (grub_ieee1275_get_devname): Likewise.
13591         (grub_ieee1275_parse_args): Likewise.
13592         (grub_ieee1275_get_filename): Likewise.
13593         (grub_ieee1275_encode_devname): Likewise.
13595 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
13597         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13598         `grub_loader_unset'.
13600 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
13602         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13603         instead of grub_ieee1275_interpret.
13604         (grub_halt_init): New function.
13605         (grub_halt_fini): Likewise.
13606         (GRUB_MOD_INIT): Correct message grammar.
13607         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13608         instead of grub_ieee1275_interpret.
13609         (grub_reboot_init): New function.
13610         (grub_reboot_fini): Likewise.
13611         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13612         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13613         util/i386/pc/misc.c with commands/ieee1275/halt.c,
13614         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13615         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13616         function.
13617         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13618         Add prototype.
13619         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13620         prototype.
13621         (grub_halt): Likewise.
13622         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13623         (cmain): Remove __attribute__((unused)).
13624         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13625         (grub_heap_len): Likewise.
13626         (grub_machine_fini): New function.
13627         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13628         (grub_halt): Likewise.
13629         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13630         function.
13631         * util/powerpc/ieee1275/misc.c: New file.
13633 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
13635         * DISTLIST: New file.
13636         * gendistlist.sh: Likewise.
13638         * Makefile.in (COMMON_DISTFILES): Removed.
13639         (BOOT_DISTFILES): Likewise.
13640         (CONF_DISTFILES): Likewise.
13641         (DISK_DISTFILES): Likewise.
13642         (FS_DISTFILES): Likewise.
13643         (INCLUDE_DISTFILES): Likewise.
13644         (KERN_DISTFILES): Likewise.
13645         (LOADER_DISTFILES): Likewise.
13646         (TERM_DISTFILES): Likewise.
13647         (UTIL_DISTFILES): Likewise.
13648         (DISTFILES): Likewise.
13649         (uninstall): Uninstall files in $(pkgdata_DATA).
13650         (DISTLIST): New target.
13651         (distdir): Use the contents of the file DISTLIST to get a list of
13652         distributed files.
13654 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
13656         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
13657         descriptor. This is ported from GRUB Legacy.
13659         * gencmdlist.sh: Added an extra semicolon to make it work with
13660         old sed versions. Reported by Robert Bihlmeyer
13661         <robbe@orcus.priv.at>.
13663 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
13665         Automatic loading of commands is supported.
13667         * normal/main.c (read_command_list): New function.
13668         (grub_normal_execute): Call read_command_list.
13670         * normal/command.c (grub_register_command): Return zero or CMD.
13671         Allocate CMD->NAME from the heap.
13672         Initialize CMD->MODULE_NAME to zero.
13673         Find the same name as well. If the same command is found and it is
13674         a dummy command, overwrite members. If it is not a dummy command,
13675         return zero.
13676         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
13677         (grub_command_find): If a dummy command is found, load a module
13678         and retry to find a command only once.
13680         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
13681         make sure that each command is loaded.
13683         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
13684         macro.
13685         (struct grub_command): Remove const from the member `name'.
13686         Add a new member `module_name'.
13687         (grub_register_command): Return grub_command_t.
13689         * commands/help.c (grub_cmd_help): Call grub_command_find to make
13690         sure that each command is loaded.
13692         * genmk.rb (PModule::rule): Specify a module name without the
13693         suffix ".mod" to gencmdlist.sh.
13695 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
13697         * gencmdlist.sh: New file.
13699         * genmk.rb (PModule::rule): Generate a rule for a command list.
13700         Clean command.lst.
13701         Generate command.lst from $(COMMANDFILES).
13703         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
13704         (DATA): Added $(pkgdata_DATA).
13705         (install-local): Install files in $(pkgdata_DATA).
13707 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
13709         * term/i386/pc/vga.c (debug_command): Removed.
13710         (GRUB_MOD_INIT): Do not register the command "debug".
13712         From Hollis Blanchard:
13713         * commands/configfile.c: New file.
13714         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13715         commands/configfile.c.
13716         (pkgdata_MODULES): Added configfile.mod.
13717         (configfile_mod_SOURCES): New variable.
13718         (configfile_mod_CFLAGS): Likewise.
13719         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13720         commands/configfile.c.
13721         (pkgdata_MODULES): Added configfile.mod.
13722         (configfile_mod_SOURCES): New variable.
13723         (configfile_mod_CFLAGS): Likewise.
13724         * util/grub-emu.c (main): Call grub_configfile_init and
13725         grub_configfile_fini.
13726         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
13727         prototype.
13728         [GRUB_UTIL] (grub_configfile_fini): Likewise.
13730 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
13732         * normal/arg.c (grub_arg_show_help): Do not show the bug report
13733         address.
13735         * commands/help.c (grub_cmd_help): Do not print newlines after
13736         the last command in print_command_help.
13738 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
13740         * commands/default.h: New file.
13741         * commands/timeout.h: Likewise.
13742         * normal/context.c: Likewise.
13744         * util/misc.c: Do not include sys/times.h.
13745         Include sys/time.h and grub/machine/time.h.
13746         (grub_get_rtc): Rewritten with gettimeofday.
13748         * util/grub-emu.c (main): Call grub_default_init and
13749         grub_timeout_init before grub_normal_init, and call
13750         grub_timeout_fini and grub_default_fini after grub_main.
13752         * util/console.c (grub_ncurses_checkkey): Return the read
13753         character or -1.
13755         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
13756         timeouts.
13758         * normal/main.c (read_config_file): Push MENU. If this fails,
13759         print an error and wait for a user input.
13760         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
13761         If a menu is empty or an error occurs, pop MENU.
13762         (grub_normal_execute): Pop and free MENU after grub_menu_run
13763         returns.
13765         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
13767         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
13768         include time.h.
13769         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13770         without GRUB_UTIL.
13771         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
13772         time.h.
13773         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
13774         without GRUB_UTIL.
13776         * include/grub/normal.h (struct grub_menu_list): New struct.
13777         (grub_menu_list_t): New type.
13778         (struct grub_context): New struct.
13779         (grub_context_t): New type.
13780         (grub_register_command): Got rid of EXPORT_FUNC.
13781         (grub_unregister_command): Likewise.
13782         (grub_context_get): New prototype.
13783         (grub_context_get_current_menu): Likewise.
13784         (grub_context_push_menu): Likewise.
13785         (grub_context_pop_menu): Likewise.
13786         [GRUB_UTIL] (grub_default_init): Likewise.
13787         [GRUB_UTIL] (grub_default_fini): Likewise.
13788         [GRUB_UTIL] (grub_timeout_init): Likewise.
13789         [GRUB_UTIL] (grub_timeout_fini): Likewise.
13791         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
13792         commands/timeout.c and normal/context.c.
13793         (pkgdata_MODULES): Added default.mod and timeout.mod.
13794         (normal_mod_SOURCES): Added normal/context.c.
13795         (default_mod_SOURCES): New variable.
13796         (default_mod_CFLAGS): Likewise.
13797         (timeout_mod_SOURCES): Likewise.
13798         (timeout_mod_CFLAGS): Likewise.
13799         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
13800         conf/i386-pc.rmk.
13801         (pkgdata_MODULES): Added default.mod and timeout.mod.
13802         (normal_mod_SOURCES): Added normal/context.c.
13803         (default_mod_SOURCES): New variable.
13804         (default_mod_CFLAGS): Likewise.
13805         (timeout_mod_SOURCES): Likewise.
13806         (timeout_mod_CFLAGS): Likewise.
13808         * Makefile.in (all-local): Added $(MKFILES).
13810 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
13812         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
13813         (grub_emu_SOURCES): Likewise.
13814         (pkgdata_MODULES): Add `sun.mod'.
13815         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13816         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13817         `partmap/sun.c'.
13818         (pkgdata_MODULES): Add `sun.mod'.
13819         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
13820         * include/grub/partition.h (grub_sun_partition_map_init): New
13821         prototype.
13822         (grub_sun_partition_map_fini): Likewise.
13823         * partmap/sun.c: New file.
13824         * util/grub-emu.c (main): Initialize and de-initialize the sun
13825         partitionmap support.
13827 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
13829         This implements an Emacs-like menu entry editor.
13831         * normal/menu_entry.c: New file.
13833         * util/console.c (grub_ncurses_putchar): Translate some Unicode
13834         characters to ASCII.
13835         (saved_char): New variable.
13836         (grub_ncurses_checkkey): Rewritten completely.
13837         (grub_ncurses_getkey): Likewise.
13838         (grub_ncurses_init): Call raw instead of cbreak.
13840         * normal/menu.c (print_entry): Do not put a space.
13841         (init_page): Renamed to ...
13842         (grub_menu_init_page): ... this. All callers changed.
13843         (edit_menu_entry): Removed.
13844         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
13846         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
13848         * kern/misc.c (grub_vprintf): Call grub_refresh.
13850         * normal/menu.c (DISP_LEFT): Renamed to ...
13851         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
13852         * normal/menu.c (DISP_UP): Renamed to ...
13853         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
13854         * normal/menu.c (DISP_RIGHT): Renamed to ...
13855         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
13856         * normal/menu.c (DISP_DOWN): Renamed to ...
13857         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
13858         * normal/menu.c (DISP_HLINE): Renamed to ...
13859         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
13860         * normal/menu.c (DISP_VLINE): Renamed to ...
13861         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
13862         * normal/menu.c (DISP_UL): Renamed to ...
13863         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
13864         * normal/menu.c (DISP_UR): Renamed to ...
13865         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
13866         * normal/menu.c (DISP_LL): Renamed to ...
13867         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
13868         * normal/menu.c (DISP_LR): Renamed to ...
13869         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
13870         * normal/menu.c (TERM_WIDTH): Renamed to ...
13871         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
13872         * normal/menu.c (TERM_HEIGHT): Renamed to ...
13873         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
13874         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
13875         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
13876         * normal/menu.c (TERM_MARGIN): Renamed to ...
13877         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
13878         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
13879         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
13880         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
13881         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
13882         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
13883         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
13884         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
13885         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
13886         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
13887         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
13888         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
13889         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
13890         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
13891         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
13892         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
13893         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
13894         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
13895         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
13896         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
13897         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
13898         All callers changed.
13900         * include/grub/normal.h: New prototype.
13902         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13903         normal/menu_entry.c.
13904         (normal_mod_SOURCES): Likewise.
13905         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13906         (normal_mod_SOURCES): Likewise.
13908 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
13910         * include/grub/normal.h (grub_halt_init): New prototype.
13911         (grub_halt_fini): Likewise.
13912         (grub_reboot_init): Likewise.
13913         (grub_reboot_fini): Likewise.
13915         * util/grub-emu.c: Include signal.h.
13916         (main_env): New global variable.
13917         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
13918         catch C-c.
13919         (grub_machine_fini): New function.
13920         (main): Call grub_halt_init and grub_reboot_init before
13921         grub_main, and grub_reboot_fini and grub_halt_fini after it.
13922         Call setjmp with MAIN_ENV to go back afterwards.
13923         Call grub_machine_fini right before return.
13925         * include/grub/util/misc.h: Include setjmp.h.
13926         (main_env): New prototype.
13928         * include/grub/kernel.h (grub_machine_fini): New prototype.
13929         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
13930         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
13932         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
13933         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
13934         * term/i386/pc/console.c (grub_console_fini): Likewise.
13936         * util/i386/pc/misc.c: New file.
13938         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13939         util/i386/pc/misc.c, commands/i386/pc/halt.c and
13940         commands/i386/pc/reboot.c.
13942 2005-02-14  Guillem Jover  <guillem@hadrons.org>
13944         * include/grub/dl.h (grub_dl_check_header): New prototype.
13945         (grub_arch_dl_check_header): Change return type to grub_err_t,
13946         remove size parameter and export function.  Update all callers.
13947         * kern/dl.c (grub_dl_check_header): New function.
13948         (grub_dl_load_core): Use `grub_dl_check_header' instead of
13949         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
13950         are inside the core.
13951         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
13952         independent ELF header checks.
13953         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
13954         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
13955         `grub_dl_check_header' instead of explicit checks.  Check for the
13956         ELF type.
13957         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
13958         `grub_dl_check_header' instead of explicit checks.  Remove arch
13959         specific ELF header checks.
13961         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
13962         argument SIZE.
13964 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
13966         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
13967         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
13969 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
13971         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
13972         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
13973         (part_map_iterate): Clear `grub_errno' and return 0 if
13974         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
13975         * partmap/amiga.c (amiga_partition_map_iterate): Return
13976         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
13977         * partmap/apple.c (apple_partition_map_iterate): Likewise.
13979 2005-02-01  Guillem Jover  <guillem@hadrons.org>
13981         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
13982         help info.
13984 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
13986         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
13987         Removed prototype.
13988         (grub_rescue_cmd_linux): New prototype.
13989         (grub_rescue_cmd_initrd): Likewise.
13990         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
13991         `bi_rec'.
13992         (grub_linux_release_mem): Release the memory for the initrd.
13993         (grub_load_linux): Renamed from this...
13994         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
13995         Changed `entry' not to be static.  Loop over memory regions to
13996         find another one when the default fails.
13997         (grub_rescue_cmd_initrd): New function.
13998         (grub_linux_init): Remove function.
13999         (grub_linux_fini): Likewise.
14000         (GRUB_MOD_INIT): Register `initrd'.
14001         (GRUB_MOD_FINI): Unregister `initrd'.
14002         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14003         Function removed.
14004         (grub_linux_normal_fini): Likewise.
14005         (GRUB_MOD_INIT): Register `initrd'.
14006         (GRUB_MOD_FINI): Unregister `initrd'.
14008 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14010         * commands/help.c: New file.
14011         * normal/arg.c (show_help): Renamed to...
14012         (grub_arg_show_help): ... this.
14013         * commands/i386/pc/halt.c: New file.
14014         * commands/i386/pc/reboot.c: Likewise.
14015         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14016         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14017         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14018         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14019         variables.
14020         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14021         `commands/help.c'.
14022         (pkgdata_MODULES): Add `help.mod'.
14023         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14024         * grub/i386/pc/init.h (grub_reboot): New prototype.
14025         (grub_halt): Likewise.
14026         * include/grub/normal.h (grub_arg_show_help): New prototype.
14027         (grub_help_init): Likewise.
14028         (grub_help_fini): Likewise.
14029         * util/grub-emu.c (main): Initialize and deinitialize the help
14030         command.
14032         * normal/cmdline.c (grub_cmdline_get): Doc fix.
14034         * normal/command.c (grub_command_init): Fixed the description of
14035         the `set' and `unset' commands.
14037 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
14039         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14040         function.
14041         * commands/ieee1275/halt.c: New file.
14042         * commands/ieee1275/reboot.c: Likewise.
14043         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14044         `__attribute__ ((unused))'.  Some GCS related fixed.
14045         (grub_suspend_init) [GRUB_UTIL]: Function removed.
14046         (grub_suspend_fini): Likewise.
14047         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14048         and `halt.mod'.
14049         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14050         (halt_mod_CFLAGS): New variables.
14051         * include/grub/powerpc/ieee1275/ieee1275.h
14052         (grub_ieee1275_interpret): New prototype.
14054 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
14056         * include/grub/misc.h (memmove): New prototype.
14057         (memcpy): Likewise.
14059 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
14061         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14062         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
14064 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
14066         * kern/misc.c (grub_strndup): Function rewritten.
14068 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
14070         * normal/menu.c (TERM_WIDTH): Macro redefined.
14071         (TERM_TOP_BORDER_Y): Likewise.
14072         (draw_border): Replaced while-loop by a for-loop.  Make the number
14073         of lines consistent with the number of lines displayed in
14074         print_entries.  Added a margin below the rectangle.
14075         (print_entry): Make the entry fit in the rectangle.
14076         (print_entries): Display the scroll arrows next to the right
14077         border.
14079 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
14081         * fs/minix.c (grub_minix_find_file): Reserve more space for
14082         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
14083         `grub_strncpy' to copy `path' into it.
14085 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
14087         Add the loopback device, a device via which files can be accessed
14088         as devices.
14090         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14091         (pkgdata_MODULES): Add loopback.mod.
14092         (loopback_mod_SOURCES): New variable.
14093         (loopback_mod_CFLAGS): Likewise.
14094         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14095         `disk/loopback.c'.
14096         (pkgdata_MODULES): Add loopback.mod.
14097         (loopback_mod_SOURCES): New variable.
14098         (loopback_mod_CFLAGS): Likewise.
14099         * disk/loopback.c: new file.
14100         * include/grub/normal.h (grub_loop_init): New prototype.
14101         (grub_loop_fini): New prototype.
14102         * util/grub-emu.c (main): Initialize and de-initialize loopback
14103         support.
14104         * include/grub/disk.h (grub_disk_dev_id): Add
14105         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14107 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
14109         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14110         function.
14111         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14112         (suspend_mod_SOURCES): New variable.
14113         (suspend_mod_CFLAGS): Likewise.
14114         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14115         New prototype.
14116         * commands/ieee1275/suspend.c: New file.
14118 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14120         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
14121         ((unused))' to `__attribute__ ((used))'.
14122         (GRUB_MOD_FINI): Likewise.
14123         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14124         * genmk.rb (PModule): Assign space to common symbols when linking
14125         modules.
14127 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
14129         * include/grub/mm.h (grub_mm_init_region): Change the type of the
14130         `unsigned' arguments to `grub_size_t'.
14131         (grub_malloc): Likewise.
14132         (grub_realloc): Likewise.
14133         (grub_memalign): Likewise.
14134         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14135         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14136         * util/misc.c (grub_malloc): Likewise.
14137         (grub_realloc): Likewise.
14138         * kern/mm.c (get_header_from_pointer): Change the casts to
14139         `unsigned' into a cast to `grub_size_t'.
14141         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14142         point to `currnode' when `currnode' is changed.
14144         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
14145         Schottelius <nico-linux@schottelius.org>.
14147 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
14149         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14150         (note_path): Remove variable.
14151         (GRUB_IEEE1275_NOTE_NAME): New macro.
14152         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14153         (grub_ieee1275_note_hdr): New structure.
14154         (grub_ieee1275_note_desc): Likewise.
14155         (grub_ieee1275_note): Likewise.
14156         (load_note): Remove `dir' argument.  All callers updated.  Remove
14157         `note_img' and `path'.  Do not load a file from `note_path'.
14158         Initialize a struct grub_ieee1275_note and write that to `out'.
14159         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14161 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
14163         * util/misc.c (grub_util_read_image): Revert last change.  It
14164         called `grub_util_read_at', which seeks from the beginning of the
14165         file.
14167 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
14169         * TODO: Add note about endianness in grub-mkimage.
14170         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14171         section.
14172         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14173         (grub_mkimage_SOURCES): New target.
14174         * include/grub/kernel.h (grub_start_addr): Remove variable.
14175         (grub_end_addr): Likewise.
14176         (grub_total_module_size): Likewise.
14177         (grub_kernel_image_size): Likewise.
14178         (GRUB_MODULE_MAGIC): New constant.
14179         (grub_module_info): New structure.
14180         (grub_arch_modules_addr): New prototype.
14181         (grub_get_end_addr): Remove prototype.
14182         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14183         * include/grub/powerpc/ieee1275/kernel.h: New file.
14184         * include/grub/util/misc.h (grub_util_get_fp_size): New
14185         prototype.
14186         (grub_util_read_at): Likewise.
14187         (grub_util_write_image_at): Likewise.
14188         * kern/main.c (grub_get_end_addr): Remove function.
14189         (grub_load_modules): Call grub_arch_modules_addr instead of using
14190         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
14191         the grub_module_info fields instead of calling grub_get_end_addr
14192         as loop conditions.  Move grub_add_unused_region code here.
14193         (grub_add_unused_region): Remove function.
14194         * kern/i386/pc/init.c: Include grub/cache.h.
14195         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
14196         one call to add_mem_region.
14197         (grub_arch_modules_addr): New function.
14198         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14199         (grub_total_module_size): Likewise.
14200         Include grub/machine/kernel.h.
14201         (grub_arch_modules_addr): New function.
14202         * util/grub-emu.c (grub_end_addr): Remove variable.
14203         (grub_total_module_size): Likewise.
14204         (grub_arch_modules_addr): New function.
14205         * util/misc.c: Include unistd.h.
14206         (grub_util_get_fp_size): New function.
14207         (grub_util_read_at): Likewise.
14208         (grub_util_write_image_at): Likewise.
14209         (grub_util_read_image): Call grub_util_read_at.
14210         (grub_util_write_image): Call grub_util_write_image_at.
14211         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14212         additional memory in kernel_img for a struct grub_module_info.
14213         Fill in that grub_module_info.
14214         * util/powerpc/ieee1275/grub-mkimage.c: New file.
14216 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14218         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14219         New function.
14220         * include/grub/powerpc/ieee1275/ieee1275.h
14221         (grub_ieee1275_milliseconds): New prototype.
14222         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14223         Change to 1000.
14224         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14225         grub_ieee1275_milliseconds.
14227 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14229         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14230         variable.
14231         (find_options): New function.
14232         (cmain): Call find_options.
14233         * include/grub/powerpc/ieee1275/ieee1275.h
14234         (grub_ieee1275_realmode): New extern variable.
14235         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14236         grub_map if grub_ieee1275_realmode is false.
14238 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
14240         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14241         lines are inserted and make it work like readline.  Reported by
14242         Vincent Pelletier <subdino2004@yahoo.fr>.
14244 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
14246         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14248         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14249         `kern/powerpc/cache.S'.
14251 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
14253         * genmk.rb: Handle the `Program' class in the main loop.  Written
14254         by Johan Rydberg <jrydberg@gnu.org>.
14255         (Program): New class.
14256         (programs): New variable.
14257         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14258         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
14259         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
14260         (help_arch): Function removed.
14261         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14262         `powerpc/libgcc.h' and `loader.h'.
14263         (pkgdata_PROGRAMS): New variable.
14264         (sbin_UTILITIES): Variable removed.
14265         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14266         (grubof_SOURCES): Variable re-defined so it only includes the
14267         core functionality.
14268         (grubof_CFLAGS): Remove `-DGRUBOF'.
14269         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14270         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14271         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14272         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14273         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14274         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14275         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14276         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14277         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14278         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14279         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14280         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14281         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14282         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14283         (pc_mod_CFLAGS): New variables.
14284         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14285         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14286         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14287         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14288         Moved from here...
14289         * include/grub/i386/pc/init.h (grub_os_area_addr)
14290         (rub_os_area_size): ... to here.
14291         * include/grub/powerpc/ieee1275/ieee1275.h
14292         (grub_ieee1275_entry_fn): Export symbol.
14293         * include/grub/powerpc/ieee1275/init.h: New file.
14294         * include/grub/powerpc/libgcc.h: Likewise.
14295         * include/grub/cache.h: Likewise.
14296         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
14297         <hollis@penguinppc.org>.
14298         * kern/dl.c: Include <grub/cache.h>.
14299         (grub_dl_flush_cache): New function.
14300         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14301         for this module.
14302         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14303         (grub_console_init): Removed prototypes.
14304         (grub_machine_init): Don't initialize the modules anymore.
14305         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14306         static.
14307         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14308         Macro undef removed.
14309         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14310         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14311         relocation `R_PPC_REL32'.  Return an error when the relocation is
14312         unknown.
14313         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14314         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14315         * util/misc.c (grub_arch_sync_caches): Likewise.
14317 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
14319         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14320         `symlist.c', add `grubof_symlist.c'.
14321         (symlist.c): Variable removed.
14322         (grubof_HEADERS): Variable added.
14323         (grubof_symlist.c): New target.
14324         (kernel_syms.lst): Use `grubof_HEADERS' instead of
14325         `kernel_img_HEADERS'.
14326         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14327         * kern/powerpc/dl.c: New file.
14328         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14329         Function removed.
14330         (grub_arch_dl_relocate_symbols): Likewise.
14331         (grub_register_exported_symbols): Likewise.
14333 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
14335         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14336         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
14337         to fail instead.  Reported by Vincent Pelletier
14338         <subdino2004@yahoo.fr>.
14340         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14341         it is not allocated.  Reported by Vincent Pelletier
14342         <subdino2004@yahoo.fr>.
14344         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14345         output so the output looks better.
14347 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
14349         Modulize the partition map support and add support for the amiga
14350         partition map.
14352         * commands/ls.c: Include <grub/partition.h> instead of
14353         <grub/machine/partition.h>.
14354         * kern/disk.c: Likewise.
14355         * kern/rescue.c: Likewise.
14356         * loader/i386/pc/chainloader.c: Likewise.
14357         * normal/cmdline.c: Likewise.
14358         * kern/powerpc/ieee1275/init.c: Likewise.
14359         (grub_machine_init): Call `grub_pc_partition_map_init',
14360         `grub_amiga_partition_map_init' and
14361         `grub_apple_partition_map_init'.
14362         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14363         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
14364         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
14365         `partition.h' and `pc_partition.h'.
14366         (grub_setup_SOURCES): Remove
14367         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
14368         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14369         (grub_emu_SOURCES): Likewise.
14370         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14371         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14372         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14373         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14374         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
14375         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14376         (grubof_SOURCES): Likewise.
14377         * disk/i386/pc/partition.c: File removed.
14378         * disk/powerpc/ieee1275/partition.c: Likewise.
14379         * include/grub/powerpc/ieee1275/partition.h: Likewise.
14380         * include/grub/i386/pc/partition.h: Likewise.
14381         * kern/partition.c: New file.
14382         * partmap/amiga.c: Likewise.
14383         * partmap/apple.c: Likewise.
14384         * partmap/pc.c: Likewise.
14385         * include/grub/partition.h: Likewise..
14386         * include/grub/pc_partition.h: Likewise.
14387         * util/grub-emu.c: Include <grub/partition.h> instead of
14388         <grub/machine/partition.h>.
14389         (main): Call `grub_pc_partition_map_init',
14390         `grub_amiga_partition_map_init' and
14391         `grub_apple_partition_map_init' and deinitialize afterwards.
14392         * util/i386/pc/biosdisk.c: Include `#include
14393         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14394         `<grub/machine/partition.h>'.
14395         * util/i386/pc/grub-setup.c: Likewise.
14396         * util/i386/pc/biosdisk.c: Likewise.
14397         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14398         partition information in case of a PC partition.
14399         * util/i386/pc/grub-setup.c: Include `#include
14400         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14401         `<grub/machine/partition.h>'.
14402         (setup): Only access the PC specific partition information in case
14403         of a PC partition.
14405 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
14407         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14408         (grub_longjmp): Likewise.
14409         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14410         20.
14411         * normal/powerpc/setjmp.S: New file.
14412         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14413         `normal/powerpc/setjmp.S'.
14414         (grubof_CFLAGS): Add `-DGRUBOF'.
14415         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14416         [GRUB_UTIL && !GRUBOF].
14418 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
14420         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14421         property named `name'.  Correctly handle the error returned by
14422         `grub_ieee1275_finddevice' if a device can not be opened.
14424 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14426         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14427         `actual' for negativity.
14428         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14429         kern/fshelp.c.
14431 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
14433         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14434         (PAGE_OFFSET): New macro.
14435         (CRTC_ADDR_PORT): Likewise.
14436         (CRTC_DATA_PORT): Likewise.
14437         (START_ADDR_HIGH_REGISTER): Likewise.
14438         (START_ADDR_LOW_REGISTER): Likewise.
14439         (GRAPHICS_ADDR_PORT): Likewise.
14440         (GRAPHICS_DATA_PORT): Likewise.
14441         (READ_MAP_REGISTER): Likewise.
14442         (INPUT_STATUS1_REGISTER): Likewise.
14443         (INPUT_STATUS1_VERTR_BIT): Likewise.
14444         (page): New variable.
14445         (wait_vretrace): New function.
14446         (set_read_map): Likewise.
14447         (set_start_address): Likewise.
14448         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
14449         the right page.
14450         (check_vga_mem): Take the page into account.
14451         (write_char): Likewise.
14452         (write_cursor): Likewise.
14453         (scroll_up): Likewise.  Copy the page to the page that is not
14454         shown and switch between both pages.
14455         (grub_vga_putchar): Fix off by one error.
14456         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
14457         account.
14459 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
14461         Add support for iso9660 (including rockridge).
14463         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14464         (iso9660_mod_SOURCES): New variable.
14465         (iso9660_mod_CFLAGS): Likewise.
14466         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14467         * include/grub/fs.h (grub_iso9660_init): New prototype.
14468         * util/grub-emu.c (main): Call `grub_iso9660_init'.
14469         * fs/iso9660.c: New file.
14471         * include/grub/misc.h (grub_strncat): New prototype.
14472         * kern/misc.c (grub_strncat): New function.
14474         * fs/hfs.c (grub_hfs_mount): Translate the error
14475         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14476         * fs/jfs.c (grub_jfs_mount): Likewise.
14477         * fs/ufs.c (grub_ufs_mount): Likewise.
14479 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
14481         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14482         which initialized BAT registers.
14483         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14484         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14485         Move from here...
14486         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14487         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14488         ... to here.
14489         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14490         (grub_mapclaim): Likewise.
14491         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14492         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
14493         hand.
14495 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
14497         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14498         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14499         -ffreestanding and -msoft-float.
14501 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
14503         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14504         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14505         set in grub_ieee1275_flags.
14507 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
14509         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14510         prototype.
14511         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14512         grub_console_init first.
14513         Change the memory range used for grub_ieee1275_claim and
14514         grub_mm_init_region.
14515         Print an error message if the claim fails.
14516         Include <grub/misc.h>.
14518 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
14520         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14521         Call grub_children_iterate for device nodes of type `scsi',
14522         `ide', or `ata'.
14523         (grub_ofdisk_open): Remove manual device alias resolution.
14524         Fix memory leak when device cannot be opened.
14525         * include/grub/powerpc/ieee1275/ieee1275.h
14526         (grub_children_iterate): New prototype.
14527         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14528         New function.
14529         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14530         Return -1 if args.size was -1.
14532 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
14534         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14535         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14536         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14537         Open Firmware's memory for it; claim memory from _start to _end.
14538         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14539         (_end): New extern.
14540         (_start): Zero BSS from __bss_start to _end.
14541         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14542         New extern.
14543         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14545 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
14547         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14548         -1 if args.base was -1.
14550 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
14552         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14553         escape sequence instead of a literal ^L. Also call
14554         grub_ofconsole_gotoxy.
14556 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
14558         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14559         void *  arguments to grub_addr_t.  All callers updated.  Also make
14560         the `result' argument optional.
14561         (grub_ieee1275_release): change void * arguments to grub_addr_t.
14562         All callers updated.
14564 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
14566         * commands/ls.c (grub_ls_list_files): Use the string following the
14567         initial ')', if present, as the filesystem path.
14568         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14570         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14572 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
14574         Make the source code of the menu interface more readable.
14576         * normal/menu.c: Include grub/mm.h.
14577         (TERM_WIDTH): New macro.
14578         (TERM_HEIGHT): Likewise.
14579         (TERM_INFO_HEIGHT): Likewise.
14580         (TERM_MARGIN): Likewise.
14581         (TERM_SCROLL_WIDTH): Likewise.
14582         (TERM_TOP_BORDER_Y): Likewise.
14583         (TERM_LEFT_BORDER_X): Likewise.
14584         (TERM_BORDER_WIDTH): Likewise.
14585         (TERM_MESSAGE_HEIGHT): Likewise.
14586         (TERM_BORDER_HEIGHT): Likewise.
14587         (TERM_NUM_ENTRIES): Likewise.
14588         (TERM_FIRST_ENTRY_Y): Likewise.
14589         (TERM_ENTRY_WIDTH): Likewise.
14590         (TERM_CURSOR_X): Likewise.
14591         (draw_border): Use macros instead of magic numbers.
14592         (print_entry): Likewise.
14593         (print_entries): Likewise.
14594         (run_menu): Likewise. Also, handle the key 'e'.
14595         (run_menu_entry): Ignore empty command lines.
14596         (print_message): Added a new argument EDIT. If EDIT is true,
14597         print a different message.
14598         (init_page): Likewise.
14599         (edit_menu_entry): New function. Not implemented yet.
14601 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
14603         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14604         can be loaded from normal mode.
14606         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14607         `multiboot.mod'.
14608         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14609         (multiboot_mod_CFLAGS): New variables.
14610         * loader/i386/pc/linux_normal.c: New file.
14611         * loader/i386/pc/multiboot_normal.c: Likewise.
14613         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14614         attribute `unused'.
14616         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
14617         `fdiro' to read the mode information from instead of `diro'.
14619         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14620         looking up a symlink.
14622         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14623         macro.
14624         * normal/command.c (grub_command_execute): Don't parse the
14625         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14626         flags of the command.
14628         * normal/menu.c (grub_menu_run): Fix typo.
14630 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
14632         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14634         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14635         `y + 1' instead of `y - 1'.
14637         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
14639 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
14641         From Hollis Blanchard <hollis@penguinppc.org>:
14642         * kern/misc.c (memmove): New alias for grub_memmove.
14643         (memcmp): New alias for grub_memcmp.
14644         (memset): New alias for grub_memset.
14645         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14646         Change "int handle" to "grub_ieee1275_phandle_t handle".
14647         * include/grub/powerpc/ieee1275/ieee1275.h
14648         (grub_ieee1275_get_property): Likewise.
14650 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
14652         Added normal mode command `chainloader' as module chain.mod, which
14653         depends on normal.mod and _chain.mod.
14655         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
14656         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
14657         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
14658         Deleted prototype.
14659         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
14660         but arguments parsing moved to ...
14661         (grub_chainloader_cmd): ... here.  New function.
14662         * include/grub/i386/pc/chainloader.h: New file.
14663         * loader/i386/pc/chainloader_normal.c: Likewise.
14665 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
14667         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
14668         (grub_mkimage_LDFLAGS): Likewise.
14669         (grub_emu_SOURCES): Likewise.
14670         (kernel_img_HEADERS): Added fshelp.h.
14671         * fs/ext2.c: Include <grub/fshelp.h>.
14672         (FILETYPE_REG): New macro.
14673         (FILETYPE_INO_REG): Likewise.
14674         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
14675         Changed all users.
14676         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
14677         all users.
14678         (grub_fshelp_node): New struct.
14679         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
14680         to a pointer.
14681         (grub_ext2_get_file_block): Removed function.
14682         (grub_ext2_read_block): New function.
14683         (grub_ext2_read_file): Replaced parameter `data' by `node'.
14684         This function was written.
14685         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
14686         (grub_ext2_find_file): Removed function.
14687         (grub_ext2_read_symlink): New function.
14688         (grub_ext2_iterate_dir): Likewise.
14689         (grub_ext2_open): Rewritten.
14690         (grub_ext2_dir): Rewritten.
14691         * include/grub/fshelp.h: New file.
14692         * fs/fshelp.c: Likewise.
14694 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
14696         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
14697         (print_message): Add a missing newline.
14698         (run_menu): Added timeout support.
14699         (run_menu_entry): New local function.
14700         (grub_menu_run): Added support for booting.
14702         * kern/loader.c (grub_loader_is_loaded): New function.
14704         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
14705         (grub_get_rtc): Exported.
14707         * include/grub/i386/pc/time.h: Include grub/symbol.h.
14708         (grub_get_rtc): Exported.
14710         * include/grub/normal.h (struct grub_command_list): Remove
14711         constant from the member `command'.
14713         * include/grub/loader.h (grub_loader_is_loaded): Declared.
14715         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
14717         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
14719 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
14721         Add support for the JFS filesystem.
14723         * fs/jfs.c: New file.
14724         * include/grub/fs.h (grub_jfs_init): New prototype.
14725         (grub_jfs_fini): New prototype.
14726         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
14727         (grub_emu_SOURCES): Likewise.
14728         (pkgdata_MODULES): Add jfs.mod.
14729         (jfs_mod_SOURCES): New variable.
14730         (jfs_mod_CFLAGS): Likewise.
14731         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
14732         (grubof_SOURCES): Likewise.
14733         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
14735         * fs/fat.c (grub_fat_find_dir): Convert the filename little
14736         endian to the host endian.
14737         (grub_fat_utf16_to_utf8): Move function from there...
14738         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
14739         the endianness of the source string anymore.
14740         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
14742 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
14744         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
14745         (grub_boot_fini) [GRUB_UTIL]: Likewise.
14746         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
14747         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
14749         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
14750         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
14751         for `node_found' and `it_dir'.
14752         (grub_hfs_dir): Add prototype for `dir_hook'.
14754         * fs/minix.c (grub_minix_get_file_block): Add prototype for
14755         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
14756         and `indir32' to silence a gcc warning.
14758         * include/grub/fs.h (grub_hfs_init): New prototype.
14759         (grub_hfs_fini): Likewise.
14762 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14764         Each disk device has its own id now. This is useful to make use
14765         of multiple disk devices.
14767         * include/grub/disk.h (grub_disk_dev_id): New enum.
14768         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
14769         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
14771         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
14772         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14774         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
14775         GRUB_DISK_DEVICE_OFDISK_ID as an id.
14777         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
14778         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
14780         * include/grub/disk.h (struct grub_disk_dev): Added a new member
14781         "id" which is used by the cache manager.
14783         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
14784         of just "GRUB".
14786 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
14788         * fs/hfs.c: New file.
14789         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
14790         (grub_emu_SOURCES): Likewise.
14791         (pkgdata_MODULES): Add hfs.mod.
14792         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
14793         (grubof_SOURCES): Likewise.
14794         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
14796         * include/grub/misc.h (grub_strncasecmp): Add prototype.
14797         * kern/misc.c (grub_strncasecmp): Add function.
14799 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
14801         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
14802         with parentheses.
14804         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
14805         (grub_ext2_dir): In case the directory entry type is unknown, read
14806         it from the inode.
14808 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
14810         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
14811         grub_load_linux instead of grub_rescue_cmd_linux as second
14812         argument of grub_rescue_register_command.
14814         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
14816 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
14818         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
14819         function.
14820         * commands/boot.c: Remove the check for `GRUB_UTIL'.
14821         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14822         `loader/powerpc/ieee1275/linux.c',
14823         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
14824         * include/grub/powerpc/ieee1275/ieee1275.h
14825         (grub_ieee1275_release): New prototype.
14826         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
14827         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
14828         normal, boot, linux and linux_normal.
14829         * loader/powerpc/ieee1275/linux.c: New file.
14830         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
14832 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
14834         * normal/arg.c (grub_arg_parse): Correct error handling after
14835         reallocating the argumentlist (check if `argl' is not null instead
14836         of checking if `args' is not null).
14837         * kern/mm.c (grub_realloc): Return the same pointer when using the
14838         same region, instead of returning the header address.
14840 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
14842         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
14843         one block instead of two when looking for the initial partition.
14844         (grub_partition_probe): Initialize the local variable `p' with 0.
14845         Use base 10 for the grub_strtoul call.
14846         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
14847         need for one local variable.
14848         (grub_strtoul): Don't add the new value to `num', instead of that
14849         just assign it.
14851 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
14853         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
14854         (pxeboot_img_SOURCES): New variable.
14855         (pxeboot_img_ASFLAGS): Likewise.
14856         (pxeboot_img_LDFLAGS): Likewise.
14857         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
14858         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
14859         <lode_leroy@hotmail.com>.
14861 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
14863         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
14864         there was no input.
14866 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
14868         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
14869         the history buffer logic.
14871 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
14873         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
14874         (FILETYPE_INO_SYMLINK): New macros.
14875         (grub_ext2_find_file): Check if the node is a directory using the
14876         inode stat information instead of using the filetype in the
14877         dirent.  Exclude the first character of an absolute symlink.
14878         (grub_ext2_dir): Mask out the filetype part of the mode member of
14879         the inode.
14881 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
14883         Add support for UFS version 1 and 2.  Add support for the minix
14884         filesystem version 1 and 2, both the variants with 14 and 30 long
14885         filenames.
14887         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
14888         fs/minix.c.
14889         (grub_emu_SOURCES): Likewise.
14890         (pkgdata_MODULES): Add ufs.mod and minix.mod.
14891         (ufs_mod_SOURCES): New variable.
14892         (ufs_mod_CFLAGS): Likewise.
14893         (minix_mod_SOURCES): Likewise.
14894         (minix_mod_CFLAGS): Likewise.
14895         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
14896         fs/minix.c.
14897         (grubof_SOURCES): Likewise.
14898         * fs/ufs.c: New file.
14899         * fs/minix.c: New file.
14900         * include/grub/fs.h (grub_ufs_init): New prototype.
14901         (grub_ufs_fini): Likewise.
14902         (grub_minix_init): Likewise.
14903         (grub_minix_fini): Likewise.
14904         * util/grub-emu.c (main): Initialize and deinitialize UFS and
14905         minix fs.
14907 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
14909         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
14910         commands/ls.c, commands/terminal.c, commands/boot.c,
14911         commands/cmp.c and commands/cat.c.
14912         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
14914         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
14915         "env.h"
14917 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
14919         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
14920         and grub_, respectively. Because the conversion is trivial and
14921         mechanical, I omit the details here. Please refer to the CVS
14922         if you need more information.
14924 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
14926         * include/pupa: Renamed to ...
14927         * include/grub: ... this.
14928         * util/i386/pc/pupa-mkimage.c: Renamed to ...
14929         * util/i386/pc/grub-mkimage.c: ... this.
14930         * util/i386/pc/pupa-setup.c: Renamed to ...
14931         * util/i386/pc/grub-setup.c: ... this.
14932         * util/pupa-emu.c: Renamed to ...
14933         * util/grub-emu.c: ... this.
14935 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
14937         Add support for the newworld apple macintosh (PPC).  This has been
14938         tested on the powerbook 2000 only.  It only adds support for
14939         generic ieee1275 functions, console and disk support.  This should
14940         be easy to port to other architectures with support for Open
14941         Firmware.
14943         * configure.ac: Accept the powerpc as host_cpu.  In the case of
14944         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
14945         specific tests are only executed while building for the i386.
14946         Inverse test for crosscompile.
14947         * genmk.rb (Utility): Allow assembler files.
14948         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
14949         * conf/powerpc-ieee1275.rmk: New file.
14950         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
14951         * disk/powerpc/ieee1275/partition.c: Likewise.
14952         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
14953         * include/pupa/powerpc/ieee1275/console.h: Likewise.
14954         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
14955         * include/pupa/powerpc/ieee1275/time.h: Likewise.
14956         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
14957         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
14958         * include/pupa/powerpc/ieee1275/loader.h
14959         * include/pupa/powerpc/setjmp.h: Likewise.
14960         * include/pupa/powerpc/types.h: Likewise.
14961         * kern/powerpc/ieee1275/init.c: Likewise.
14962         * kern/powerpc/ieee1275/openfw.c: Likewise.
14963         * term/powerpc/ieee1275/ofconsole.c: Likewise.
14965         These files were written by Johan Rydberg
14966         (jrydberg@night.trouble.net) and I only modified them slightly.
14968         * boot/powerpc/ieee1275/cmain.c: New file.
14969         * boot/powerpc/ieee1275/crt0.S: Likewise.
14970         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
14971         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
14973 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
14975         * Makefile.in: Update copyright.
14976         * genmodsrc.sh: Likewise.
14977         * gensymlist.sh: Likewise.
14978         * term/i386/pc/vga.c: Indent correctly.
14980         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
14981         bugreporting address.
14982         * util/i386/pc/pupa-setup.c (usage): Likewise,
14983         (main): Call pupa_ext2_init and pupa_ext2_fini.
14985         * fs/fat.c (log2): Renamed to ...
14986         (fat_log2): ... this.
14987         All callers changed.
14988         * kern/misc.c (memcpy): Alias to pupa_memmove.
14989         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
14990         lvalue cast.
14991         * util/console.c (pupa_ncurses_fini): Return 0.
14993         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
14994         Move fail label here.
14995         [__GNU__]: Don't warn when using stat.
14996         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
14997         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
14998         long int. Use strtol instead of strtoul.
15000 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
15002         * commands/boot.c: New file.
15003         * commands/cat.c: Likewise.
15004         * commands/cmp.c: Likewise.
15005         * commands/ls.c: Likewise.
15006         * commands/terminal.c: Likewise.
15007         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15008         (pupa_register_command): Changed interface to match the new
15009         argument parser.
15010         (pupa_command_execute): Changed (almost rewritten) so it uses
15011         pupa_split_command.  Added support for setting variables using the
15012         syntax `foo=bar'.
15013         (rescue_command): Changed to work with the new argument parser.
15014         (terminal_command): Moved from here to commands/terminal.c.
15015         (set_command): New function.
15016         (unset_command): New function.
15017         (insmod_command): New function.
15018         (rmmod_command): New function.
15019         (lsmod_command): New function.
15020         (pupa_command_init): Don't initialize the command terminal
15021         anymore.  Initialize the commands set, unset, insmod, rmmod and
15022         lsmod.
15023         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15024         (kernel_img_HEADERS): Add arg.h and env.h.
15025         (pupa_mkimage_LDFLAGS): Add kern/env.c.
15026         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15027         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15028         normal/arg.c.
15029         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15030         terminal.mod.
15031         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15032         (boot_mod_SOURCES): New variable.
15033         (terminal_mod_SOURCES): Likewise.
15034         (ls_mod_SOURCES): Likewise.
15035         (cmp_mod_SOURCES): Likewise.
15036         (cat_mod_SOURCES): Likewise.
15038         * normal/arg.c: New file.
15039         * kern/env.c: Likewise.
15040         * include/pupa/arg.h: Likewise.
15041         * include/pupa/env.h: Likewise.
15042         * font/manager.c (font_command): Changed to match argument parsing
15043         interface changes.
15044         (PUPA_MOD_INIT): Likewise.
15045         * hello/hello.c (pupa_cmd_hello): Likewise.
15046         (PUPA_MOD_INIT): Likewise.
15047         * include/pupa/disk.h: Include <pupa/device.h>.
15048         (pupa_print_partinfo): New prototype.
15049         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15050         (pupa_dl_get_prefix): Likewise.
15051         * include/pupa/misc.h: Include <pupa/err.h>.
15052         (pupa_isgraph): New prototype.
15053         (pupa_isdigit): Likewise.
15054         (pupa_split_cmdline): Likewise.
15055         * include/pupa/normal.h: Include <pupa/arg.h>.
15056         (pupa_command): Changed the prototype of the member `func' to
15057         match the argument parsing interface.  Added member `options'.
15058         (pupa_register_command): Updated to match function.
15059         (pupa_arg_parse): New prototype.
15060         (pupa_hello_init) [PUPA_UTIL]: New prototype.
15061         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15062         (pupa_ls_init) [PUPA_UTIL]: Likewise.
15063         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15064         (pupa_cat_init) [PUPA_UTIL]: Likewise.
15065         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15066         (pupa_boot_init) [PUPA_UTIL]: Likewise.
15067         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15068         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15069         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15070         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15071         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15072         * kern/disk.c: Include <pupa/file.h>.
15073         (pupa_print_partinfo): New function.
15074         * kern/dl.c: Include <pupa/env.h>.
15075         (pupa_dl_dir): Variable removed.
15076         (pupa_dl_load): Use the environment variable `prefix' instead of
15077         the variable pupa_dl_dir.
15078         (pupa_dl_set_prefix): Function removed.
15079         (pupa_dl_get_prefix): Likewise.
15080         * kern/i386/pc/init.c: Include <pupa/env.h>.
15081         (pupa_machine_init): Use the environment variable `prefix' instead of
15082         using pupa_dl_set_prefix to set the prefix.
15083         * kern/main.c: Include <pupa/env.h>.
15084         (pupa_set_root_dev): Use the environment variable `prefix' instead of
15085         using pupa_dl_get_prefix to get the prefix.
15086         * kern/misc.c: Include <pupa/env.h>.
15087         (pupa_isdigit): New function.
15088         (pupa_isgraph): Likewise.
15089         (pupa_ftoa): Likewise.
15090         (pupa_vsprintf): Added support for printing values of the type
15091         `double'.  Make it possible to format variable output when using
15092         formatting like `%1.2%f'.
15093         (pupa_split_cmdline): New function.
15094         * kern/rescue.c: Include <pupa/env.h>.
15095         (next_word): Removed function.
15096         (pupa_rescue_cmd_prefix): Likewise.
15097         (pupa_rescue_cmd_set): New function.
15098         (pupa_rescue_cmd_unset): New function.
15099         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15100         split the command line instead of splitting it here.  Added
15101         support for setting variables using the syntax `foo=bar'.  Don't
15102         initialize the prefix command anymore.  Initialized the set and
15103         unset commands.
15104         * normal/cmdline.c: Include <pupa/env.h>.
15105         (pupa_tab_complete): Added prototypes for print_simple_completion,
15106         print_partition_completion, add_completion, iterate_commands,
15107         iterate_dev, iterate_part and iterate_dir. Moved code to print
15108         partition information from here to kern/disk.c.
15109         (pupa_cmdline_run): Don't check if the function exists anymore.
15110         * normal/main.c: Include <pupa/env.h>.
15111         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15112         instead of using pupa_dl_get_prefix to get the prefix.
15113         * term/i386/pc/vga.c: Include <pupa/arg.h>.
15114         (check_vga_mem): Cast pointers to `void *' to silence a gcc
15115         warning.
15116         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15117         (pupa_vga_setcolor): Declare unused variables with `__attribute__
15118         ((unused))' to silence a gcc warning.
15119         (pupa_vga_setcolor): Likewise.
15120         (debug_command): Changed to match argument parsing
15121         interface changes.
15122         * util/pupa-emu.c: Include <pupa/env.h>.
15123         (options): Added 0's for unused fields to silence a gcc warning.
15124         (argp): Likewise.
15125         (main): Use the environment variable `prefix' instead of using
15126         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
15127         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
15128         and terminal.
15130         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15131         * util/misc.c: Include <malloc.h>.
15132         (pupa_malloc): Rewritten so errors are correctly reported.
15133         (pupa_realloc): Likewise.
15134         (pupa_memalign): Likewise.
15135         (pupa_mm_init_region): Declare unused variables with
15136         `__attribute__ ((unused))' to silence a gcc warning.
15137         * normal/i386/setjmp.S: Remove tab at the end of the file to
15138         silence a gcc warning.
15139         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15140         variables with `__attribute__ ((unused))' to silence a gcc
15141         warning.
15142         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15143         local variable i unsigned to silence a gcc warning.
15145         * kern/term.c: Include <pupa/misc.h>.
15146         (pupa_more_lines): New variable.
15147         (pupa_more): Likewise.
15148         (pupa_putcode): When the pager is active pause at the end of every
15149         screen.
15150         (pupa_set_more): New function.
15151         * include/pupa/term.h (pupa_set_more): New prototype.
15154 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
15156         Now this project is GRUB 2 rather than PUPA. The location of
15157         the CVS repository was moved to GRUB's.
15159         * configure.ac: Use bug-grub as the reporting address.
15160         Use GRUB instead of PUPA.
15161         Change the version number to 1.90.
15163 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
15165         * genkernsyms.sh: Updated copyright information.
15166         * genmk.rb: Likewise.
15167         * genmodsrc.sh: Likewise.
15168         * gensymlist.sh: Likewise.
15169         * boot/i386/pc/boot.S: Likewise.
15170         * boot/i386/pc/diskboot.S: Likewise.
15171         * disk/i386/pc/biosdisk.c: Likewise.
15172         * disk/i386/pc/partition.c: Likewise.
15173         * font/manager.c: Likewise.
15174         * fs/ext2.c: Likewise.
15175         * fs/fat.c: Likewise.
15176         * include/pupa/boot.h: Likewise.
15177         * include/pupa/device.h: Likewise.
15178         * include/pupa/disk.h: Likewise.
15179         * include/pupa/dl.h: Likewise.
15180         * include/pupa/elf.h: Likewise.
15181         * include/pupa/err.h: Likewise.
15182         * include/pupa/file.h: Likewise.
15183         * include/pupa/font.h: Likewise.
15184         * include/pupa/fs.h: Likewise.
15185         * include/pupa/kernel.h: Likewise.
15186         * include/pupa/loader.h: Likewise.
15187         * include/pupa/misc.h: Likewise.
15188         * include/pupa/mm.h: Likewise.
15189         * include/pupa/net.h: Likewise.
15190         * include/pupa/normal.h: Likewise.
15191         * include/pupa/rescue.h: Likewise.
15192         * include/pupa/setjmp.h: Likewise.
15193         * include/pupa/symbol.h: Likewise.
15194         * include/pupa/term.h: Likewise.
15195         * include/pupa/types.h: Likewise.
15196         * include/pupa/i386/setjmp.h: Likewise.
15197         * include/pupa/i386/types.h: Likewise.
15198         * include/pupa/i386/pc/biosdisk.h: Likewise.
15199         * include/pupa/i386/pc/boot.h: Likewise.
15200         * include/pupa/i386/pc/console.h: Likewise.
15201         * include/pupa/i386/pc/init.h: Likewise.
15202         * include/pupa/i386/pc/kernel.h: Likewise.
15203         * include/pupa/i386/pc/linux.h: Likewise.
15204         * include/pupa/i386/pc/loader.h: Likewise.
15205         * include/pupa/i386/pc/memory.h: Likewise.
15206         * include/pupa/i386/pc/multiboot.h: Likewise.
15207         * include/pupa/i386/pc/partition.h: Likewise.
15208         * include/pupa/i386/pc/time.h: Likewise.
15209         * include/pupa/i386/pc/vga.h: Likewise.
15210         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15211         * include/pupa/util/getroot.h: Likewise.
15212         * include/pupa/util/misc.h: Likewise.
15213         * include/pupa/util/resolve.h: Likewise.
15214         * kern/device.c: Likewise.
15215         * kern/disk.c: Likewise.
15216         * kern/dl.c: Likewise.
15217         * kern/err.c: Likewise.
15218         * kern/file.c: Likewise.
15219         * kern/fs.c: Likewise.
15220         * kern/loader.c: Likewise.
15221         * kern/main.c: Likewise.
15222         * kern/misc.c: Likewise.
15223         * kern/mm.c: Likewise.
15224         * kern/rescue.c: Likewise.
15225         * kern/term.c: Likewise.
15226         * kern/i386/dl.c: Likewise.
15227         * kern/i386/pc/init.c: Likewise.
15228         * kern/i386/pc/lzo1x.S: Likewise.
15229         * kern/i386/pc/startup.S: Likewise.
15230         * loader/i386/pc/chainloader.c: Likewise.
15231         * loader/i386/pc/linux.c: Likewise.
15232         * loader/i386/pc/multiboot.c: Likewise.
15233         * normal/cmdline.c: Likewise.
15234         * normal/command.c: Likewise.
15235         * normal/main.c: Likewise.
15236         * normal/menu.c: Likewise.
15237         * normal/i386/setjmp.S: Likewise.
15238         * term/i386/pc/console.c: Likewise.
15239         * term/i386/pc/vga.c: Likewise.
15240         * util/console.c: Likewise.
15241         * util/genmoddep.c: Likewise.
15242         * util/misc.c: Likewise.
15243         * util/pupa-emu.c: Likewise.
15244         * util/resolve.c: Likewise.
15245         * util/unifont2pff.rb: Likewise.
15246         * util/i386/pc/biosdisk.c: Likewise.
15247         * util/i386/pc/getroot.c: Likewise.
15248         * util/i386/pc/pupa-mkimage.c: Likewise.
15249         * util/i386/pc/pupa-setup.c: Likewise.
15251 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
15253         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15254         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
15255         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
15256         reading and reset it after reading.
15257         (pupa_ext2_close): Return PUPA_ERR_NONE.
15259         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15260         Correct value.
15261         (struct linux_kernel_header): Add kernel_version and
15262         initrd_addr_max.
15263         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15264         pupa_file_read succeeds.
15265         (pupa_rescue_cmd_initrd): Implement.
15267 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
15269         * fs/ext2.c (pupa_ext2_label): New function.
15270         (pupa_ext2_fs): Added label.
15271         * fs/fat.c (pupa_fat_label): New function.
15272         (pupa_fat_fs): Added label.
15273         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15275         * kern/misc.c (pupa_strndup): New function.
15276         * include/pupa/misc.h (pupa_strndup): New prototype.
15278         * include/pupa/normal.h: Include <pupa/err.h>.
15279         (pupa_set_history): New prototype.
15280         (pupa_iterate_commands): New prototype.
15281         * normal/cmdline.c: Include <pupa/machine/partition.h>,
15282         <pupa/disk.h>, <pupa/file.h>.
15283         (hist_size): New variable.
15284         (hist_lines): Likewise.
15285         (hist_end): Likewise.
15286         (hist_used): Likewise.
15287         (pupa_set_history): New function.
15288         (pupa_history_get): Likewise.
15289         (pupa_history_add): Likewise.
15290         (pupa_history_replace): Likewise.
15291         (pupa_tab_complete): Likewise.
15292         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
15293         completion shows partitionnames while completing partitions, this
15294         feature was suggested by Jeff Bailey.
15295         * normal/command.c (pupa_iterate_commands): New function.
15296         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15297         (pupa_normal_init): Initialize history buffer.
15298         (PUPA_MOD_INIT): Likewise.
15299         (pupa_normal_fini): Free the history buffer.
15300         (PUPA_MOD_FINI): Likewise.
15302         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15303         key.
15305         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15306         * configure.ac [i386]: Check for regparam bug.
15307         (NESTED_FUNC_ATTR) [! i386]: Defined.
15309 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
15311         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15312         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15313         (pupa_emu_SOURCES): New variable.
15314         (pupa_emu_LDFLAGS): Likewise.
15315         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15316         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15317         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15318         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15319         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15320         (pupa_jmp_buf): New typedef.
15321         (pupa_setjmp) [PUPA_UTIL]: New macro.
15322         (pupa_longjmp) [PUPA_UTIL]: Likewise.
15323         * include/pupa/term.h (struct pupa_term): New member `refresh'.
15324         (pupa_refresh): New prototype.
15325         * include/pupa/util/getroot.h: New file.
15326         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15327         it.
15328         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15329         (pupa_rescue_cmd_cat): Likewise.
15330         (pupa_rescue_cmd_ls): Likewise.
15331         (pupa_rescue_cmd_testload): Likewise.
15332         (pupa_rescue_cmd_lsmod): Likewise.
15333         * normal/cmdline.c (pupa_cmdline_get): Likewise.
15334         * normal/menu.c (run_menu): Likewise.
15335         * kern/term.c (pupa_cls): Likewise.
15336         (pupa_refresh): New function.
15337         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15338         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15339         * util/console.c: New file.
15341         * util/i386/pc/getroot.c: New file.
15342         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15343         (pupa_putchar): New function.
15344         (pupa_refresh): Likewise.
15345         (xgetcwd): Function moved to ...
15346         (strip_extra_slashes): Likewise.
15347         (get_prefix): Likewise.
15348         * util/i386/pc/getroot.c: ... here.
15349         (find_root_device): Function moved and renamed to...
15350         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15351         Changed all callers.
15352         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15353         and renamed to...
15354         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15355         Changed all callers.
15356         * util/misc.c (pupa_memalign): New function.
15357         (pupa_mm_init_region): Likewise.
15358         (pupa_register_exported_symbols): Likewise.
15359         (pupa_putchar): Function removed.
15360         * util/pupa-emu.c: New file.
15362 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
15364         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15365         (_multiboot_mod_SOURCES): New variable.
15366         (_multiboot_mod_CFLAGS): Likewise.
15367         * loader/i386/pc/multiboot.c: New file.
15368         * include/pupa/i386/pc/multiboot.h: Likewise.
15369         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15370         (pupa_multiboot_real_boot): New function.
15371         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15372         (pupa_multiboot_real_boot): New prototype.
15373         (pupa_rescue_cmd_multiboot): Likewise
15374         (pupa_rescue_cmd_module): Likewise.
15376         * kern/loader.c (pupa_loader_set): Continue when
15377         pupa_loader_unload_func() fails.
15378         (pupa_loader_unset): New function.
15379         * include/pupa/loader.h (pupa_loader_unset): New prototype.
15381         * kern/misc.c (pupa_stpcpy): New function.
15382         * include/pupa/misc.h (pupa_stpcpy): New prototype.
15384 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
15386         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15387         for available extensions.
15389         * include/pupa/i386/pc/time.h: New file.
15390         * kern/disk.c: Include <pupa/machine/time.h>.
15391         (PUPA_CACHE_TIMEOUT): New macro.
15392         (pupa_last_time): New variable.
15393         (pupa_disk_open): Flush the cache when there was a timeout.
15394         (pupa_disk_close): Reset the timer.
15395         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15396         pupa_currticks.
15397         * util/misc.c: Include <sys/times.h>
15398         (pupa_get_rtc): New function.
15400 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
15402         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15403         as blocks.
15404         (pupa_ext2_get_file_block): Use blocks member.
15406         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15407         first block. Return -1 instead of pupa_errno on error.
15409 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
15411         * README: In the pupa-mkimage example use _chain instead of chain
15412         and ext2 instead of fat.
15413         * TODO: Replace ext2fs with jfs as an example.  Add an item for
15414         adding journal playback for ext2fs.
15415         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15416         (pkgdata_MODULES): Added ext2.mod.
15417         (ext2_mod_SOURCES): New variable.
15418         (ext2_mod_CFLAGS): Likewise.
15419         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15420         * include/pupa/misc.h (pupa_strncpy): New prototype.
15421         (pupa_strcat): Likewise.
15422         (pupa_strncmp): Likewise.
15423         * kern/misc.c (pupa_strcat): Enable function.
15424         (pupa_strncpy): New function.
15425         (pupa_strncmp): Likewise.
15426         * fs/ext2.c: New file.
15428         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15429         when the read failed before retrying.
15430         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15431         (_FILE_OFFSET_BITS): Likewise.
15432         * configure.ac: Added AC_SYS_LARGEFILE.
15434 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
15436         * genmk.rb (PModule#rule): Make sure to get only symbol names
15437         from the output of nm.
15438         Reported by Robert Millan <zeratul2@wanadoo.es>.
15440 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
15442         I forgot to check in these changes for a long time. This adds
15443         incomplete support for VGA console, and this is still very
15444         buggy. Also, a lot of consideration is required for I18N,
15445         UNICODE, and VGA font issues. Therefore, assume that this is
15446         such that "better than nothing".
15448         * font/manager.c: New file.
15449         * include/pupa/font.h: Likewise.
15450         * include/pupa/i386/pc/vga.h: Likewise.
15451         * term/i386/pc/vga.c: Likewise.
15452         * util/unifont2pff.rb: Likewise.
15454         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15455         (pkgdata_MODULES): Added vga.mod and font.mod.
15456         (vga_mod_SOURCES): New variables.
15457         (vga_mod_CFLAGS): Likewise.
15458         (font_mod_SOURCES): Likewise.
15459         (font_mod_CFLAGS): Likewise.
15461         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15463         * include/pupa/term.h: Include pupa/err.h.
15464         (struct pupa_term): Added init and fini.
15465         Changed the argument of putchar to pupa_uint32_t.
15467         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15468         (pupa_console_real_putchar): New prototype.
15469         (pupa_console_putchar): Removed.
15470         (pupa_console_checkkey): Exported.
15471         (pupa_console_getkey): Likewise.
15473         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15474         characters.
15476         * kern/term.c (pupa_term_set_current): Rewritten.
15477         (pupa_putchar): Likewise.
15478         (pupa_putcode): New function.
15480         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15481         (pupa_console_real_putchar): ... this.
15482         (pupa_vga_set_mode): New function.
15483         (pupa_vga_get_font): Likewise.
15485         * normal/command.c: Include pupa/term.h.
15486         (terminal_command): New function.
15487         (pupa_command_init): Register the command "terminal".
15489         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15490         (DISP_UP): Likewise.
15491         (DISP_RIGHT): Likewise.
15492         (DISP_DOWN): Likewise.
15493         (DISP_HLINE): Likewise.
15494         (DISP_VLINE): Likewise.
15495         (DISP_UL): Likewise.
15496         (DISP_UR): Likewise.
15497         (DISP_LL): Likewise.
15498         (DISP_LR): Likewise.
15500         * term/i386/pc/console.c (pupa_console_putchar): New function.
15502 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
15504         * util/resolve.c (pupa_util_resolve_dependencies): BUG
15505         FIX. Reverse the path_list.
15507         * include/pupa/normal.h: Export pupa_register_command and
15508         pupa_unregister_command.
15510         * hello/hello.c (pupa_cmd_hello): New module.
15511         * conf/i386-pc.rmk: Added hello.mod.
15513 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
15515         * kern/i386/pc/lzo1x.S: New file.
15517         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15518         (compress_kernel): New variable.
15519         (generate_image): Heavily modified to support compressing a
15520         large part of the core image.
15522         * util/misc.c (pupa_util_read_image): Fix a file descriptor
15523         leak.
15524         (pupa_util_load_image): New function.
15526         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15527         (pupa_compressed_size): New variable.
15528         (codestart): Enable Gate A20 here.
15529         Decompress the compressed part of the core image.
15530         Rearrange the code to put functions and variables which are
15531         required for initialization in the non-compressed part.
15532         Include lzo1x.S.
15534         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15535         here.
15537         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15539         * include/pupa/i386/pc/kernel.h
15540         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15541         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15542         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15543         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15544         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15546         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15548         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15549         (Utility#rule): Likewise.
15551         * configure.ac: Check if LZO is available.
15553 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
15555         * include/pupa/normal.h: New file.
15556         * include/pupa/setjmp.h: Likewise.
15557         * include/pupa/i386/setjmp.h: Likewise.
15558         * normal/cmdline.c: Likewise.
15559         * normal/command.c: Likewise.
15560         * normal/main.c: Likewise.
15561         * normal/menu.c: Likewise.
15562         * normal/i386/setjmp.S: Likewise.
15564         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15565         (pupa_rescue_cmd_initrd): Likewise.
15567         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15568         Likewise.
15570         * kern/i386/pc/startup.S (translation_table): New variable.
15571         (translate_keycode): New function.
15572         (pupa_console_getkey): Call translate_keycode.
15574         * kern/rescue.c (attempt_normal_mode): New function.
15575         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15576         it failed, print a message.
15578         * kern/mm.c (pupa_real_malloc): Print more information when a
15579         free magic is broken.
15580         (pupa_free): If the first free header is not free actually, set
15581         it to P.
15583         * kern/main.c (pupa_load_normal_mode): Just load the module
15584         "normal".
15585         (pupa_main): Don't print the message
15586         "Entering into rescue mode..." here.
15588         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15589         Declared.
15590         (pupa_rescue_cmd_initrd): Likewise.
15591         (pupa_rescue_cmd_initrd): Likewise.
15593         * include/pupa/symbol.h (FUNCTION): Specify the type.
15594         (VARIABLE): Likewise.
15596         * include/pupa/err.h (pupa_err_t): Added
15597         PUPA_ERR_UNKNOWN_COMMAND.
15599         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15600         (pupa_dl_get_prefix): Likewise.
15602         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15603         Added _chain.mod and _linux.mod instead of chain.mod and
15604         linux.mod.
15605         (chain_mod_SOURCES): Renamed to ...
15606         (_chain_mod_SOURCES): ... this.
15607         (chain_mod_CFLAGS): Renamed to ...
15608         (_chain_mod_CFLAGS): ... this.
15609         (linux_mod_SOURCES): Renamed to ...
15610         (_linux_mod_SOURCES): ... this.
15611         (linux_mod_CFLAGS): Renamed to ...
15612         (_linux_mod_CFLAGS): ... this.
15613         (normal_mod_SOURCES): New variable.
15614         (normal_mod_CFLAGS): Likewise.
15615         (normal_mod_ASFLAGS): Likewise.
15617 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
15619         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15620         possible.
15622         * kern/dl.c (pupa_dl_ref): Refer depending modules
15623         recursively.
15624         (pupa_dl_unref): Unrefer depending modules recursively.
15625         Don't call pupa_dl_unload implicitly, because PUPA can crash if
15626         a module is unloaded before one depending on that module is
15627         unloaded.
15628         (pupa_dl_unload): Unload depending modules explicitly,
15629         if possible.
15631 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
15633         * include/pupa/i386/pc/linux.h: New file.
15634         * loader/i386/pc/linux.c: Likewise.
15636         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15637         Removed.
15638         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15639         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
15640         of PUPA_CHAINLOADER_BOOT_SECTOR.
15642         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
15643         (pupa_linux_prot_size): New variable.
15644         (pupa_linux_tmp_addr): Likewise.
15645         (pupa_linux_real_addr): Likewise.
15646         (pupa_linux_boot_zimage): New function.
15647         (pupa_linux_boot_bzimage): Likewise.
15649         * kern/i386/pc/init.c (struct mem_region): New structure.
15650         (MAX_REGIONS): New macro.
15651         (mem_regions): New variable.
15652         (num_regions): Likewise.
15653         (pupa_os_area_addr): Likewise.
15654         (pupa_os_area_size): Likewise.
15655         (pupa_lower_mem): Likewise.
15656         (pupa_upper_mem): Likewise.
15657         (add_mem_region): New function.
15658         (compact_mem_regions): Likewise.
15659         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
15660         the size of the conventional memory and that of so-called upper
15661         memory (before the first memory hole).
15662         Instead of adding each found region to free memory, use
15663         add_mem_region and add them after removing overlaps.
15664         Also, add only 1/4 of the upper memory to free memory. The rest
15665         is used for loading OS images. Maybe this is ad hoc, but this
15666         makes it much easier to relocate OS images when booting.
15668         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
15669         (pupa_enter_rescue_mode): Don't register initrd and module.
15671         * kern/mm.c: Include pupa/dl.h.
15673         * kern/main.c: Include pupa/file.h and pupa/device.h.
15675         * kern/loader.c (pupa_loader_load_module_func): Removed.
15676         (pupa_loader_load_module): Likewise.
15678         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
15679         ``.o''.
15681         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
15682         (pupa_linux_tmp_addr): Likewise.
15683         (pupa_linux_real_addr): Likewise.
15684         (pupa_linux_boot_zimage): Likewise.
15685         (pupa_linux_boot_bzimage): Likewise.
15687         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
15688         (pupa_upper_mem): Likewise.
15689         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
15690         module is too dangerous.
15692         * include/pupa/loader.h (pupa_os_area_addr): Declared.
15693         (pupa_os_area_size): Likewise.
15694         (pupa_loader_set): Remove the first argument. Loader doesn't
15695         manage modules or initrd any longer.
15696         (pupa_loader_load_module): Removed.
15698         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
15699         (linux_mod_SOURCES): New variable.
15700         (linux_mod_CFLAGS): Likewise.
15702 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
15704         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
15705         the length of a blocklist correctly.
15707         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
15708         Use ioctl only if the OS file is a block device.
15709         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
15710         not very useful for normal files.
15712         * kern/main.c (pupa_set_root_dev): New function.
15713         (pupa_load_normal_mode): Likewise.
15714         (pupa_main): Call those above.
15716         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
15717         pupa_uint16_t.
15719         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
15721 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
15723         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
15724         (setup): Configure the installed partition information and the
15725         dl prefix.
15727         * loader/i386/pc/chainloader.c (my_mod): New variable.
15728         (pupa_chainloader_unload): New function.
15729         (pupa_rescue_cmd_chainloader): Refer itself.
15730         (PUPA_MOD_INIT): Save its own module in MY_MOD.
15732         * kern/i386/pc/startup.S (install_partition): Removed.
15733         (version_string): Likewise.
15734         (config_file): Likewise.
15735         (pupa_install_dos_part): New variable.
15736         (pupa_install_bsd_part): Likewise.
15737         (pupa_prefix): Likewise.
15738         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
15740         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
15741         and pupa/misc.h.
15742         (make_install_device): New function.
15743         (pupa_machine_init): Set the dl prefix.
15745         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
15746         (buf): Renamed to ...
15747         (linebuf): ... this.
15748         (pupa_rescue_cmd_prefix): New function.
15749         (pupa_rescue_cmd_insmod): Likewise.
15750         (pupa_rescue_cmd_rmmod): Likewise.
15751         (pupa_rescue_cmd_lsmod): Likewise.
15752         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
15753         rmmod and lsmod.
15755         * kern/mm.c (pupa_memalign): If failed even after invalidating
15756         disk caches, unload unneeded modules and retry.
15758         * kern/misc.c (pupa_memmove): New function.
15759         (pupa_memcpy): Removed.
15760         (pupa_strcpy): New function.
15761         (pupa_itoa): Made static.
15763         * kern/dl.c (pupa_dl_iterate): New function.
15764         (pupa_dl_ref): Likewise.
15765         (pupa_dl_unref): Likewise.
15766         (pupa_dl_unload): Return if succeeded or not.
15767         (pupa_dl_unload_unneeded): New function.
15768         (pupa_dl_unload_all): Likewise.
15769         (pupa_dl_init): Renamed to ...
15770         (pupa_dl_set_prefix): ... this.
15771         (pupa_dl_get_prefix): New function.
15773         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
15774         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
15775         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15776         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15777         (pupa_install_dos_part): Declared.
15778         (pupa_install_bsd_part): Likewise.
15779         (pupa_prefix): Likewise.
15780         (pupa_boot_drive): Likewise.
15782         * include/pupa/types.h: Fix a typo.
15784         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
15785         pupa_memmove.
15786         (pupa_memmove): Declared.
15787         (pupa_strcpy): Likewise.
15789         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
15790         pupa_mod_init takes one argument, its own module.
15791         (pupa_dl_unload_unneeded): Declared.
15792         (pupa_dl_unload_all): Likewise.
15793         (pupa_dl_ref): Likewise.
15794         (pupa_dl_unref): Likewise.
15795         (pupa_dl_iterate): Likewise.
15796         (pupa_dl_init): Renamed to ...
15797         (pupa_dl_set_prefix): ... this.
15798         (pupa_dl_get_prefix): Declared.
15800         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
15801         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
15802         unloaded.
15803         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
15804         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
15806         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
15807         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
15809 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
15811         * util/i386/pc/pupa-setup.c (setup): Define the internal
15812         function find_first_partition_start at the top level, because GCC
15813         3.0.x cannot compile internal functions in deeper scopes
15814         correctly.
15815         (find_root_device): Use lstat instead of stat.
15816         Don't follow symbolic links.
15817         Fix the path-constructing code.
15819         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
15820         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
15821         by a BLKGETSIZE ioctl first, because block devices don't fill
15822         the member st_mode of the structure stat on Linux.
15823         [__linux__] (linux_find_partition): Use a temporary buffer
15824         REAL_DEV for the working space. Copy it to DEV before returning.
15825         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
15826         buffer cache consistent.
15827         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
15828         strncmp. The previous value was merely wrong.
15829         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
15831         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
15832         FAT size is 12. The previous value was merely wrong.
15834         * kern/main.c (pupa_main): Don't split the starting message from
15835         newlines.
15837         * kern/term.c (pupa_putchar): Put CR after LF instead of before
15838         LF, because BIOS goes crazy about character attributes in this
15839         case.
15841 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
15843         * include/i386/pc/util/biosdisk.h: New file.
15844         * util/i386/pc/biosdisk.c: Likewise.
15845         * util/i386/pc/pupa-setup.c: Likewise.
15847         * Makefile.in (INCLUDE_DISTFILES): Added
15848         include/pupa/i386/pc/util/biosdisk.h.
15849         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
15850         directory util/i386/pc.
15851         (install-local): Added a rule for sbin_UTILITIES.
15852         (uninstall): Likewise.
15854         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
15856         * util/misc.c (xrealloc): New function.
15857         (pupa_malloc): Likewise.
15858         (pupa_free): Likewise.
15859         (pupa_realloc): Likewise.
15860         (pupa_stop): Likewise.
15861         (pupa_putchar): Likewise.
15863         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
15865         * include/pupa/util/misc.h (xrealloc): Declared.
15867         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
15868         macro.
15869         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
15870         (PUPA_BOOT_MACHINE_BPB_END): ... this.
15872         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
15873         [PUPA_UTIL] (pupa_fat_fini): Likewise.
15875         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
15876         way should be implemented.
15877         [PUPA_UTIL] (pupa_fat_fini): Likewise.
15879         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
15880         the size of NAME for safety.
15881         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
15882         0x88.
15884         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
15885         (pupa_setup_SOURCES): Likewise.
15887         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
15889 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
15891         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
15892         bunch of pushl's from pusha, because this destroys the return
15893         value.
15895 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
15897         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
15898         This means that any missing prototypes could be fatal. Also, you
15899         must take care when writing assembly code. See the comments at
15900         the beginning of startup.S, for more details.
15902         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
15903         compilation mechanism.
15904         (pupa_chainloader_real_boot): Likewise.
15905         (pupa_biosdisk_rw_int13_extensions): Likewise.
15906         (pupa_biosdisk_rw_standard): Likewise.
15907         (pupa_biosdisk_check_int13_extensions): Likewise.
15908         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
15909         (pupa_biosdisk_get_diskinfo_standard): Likewise.
15910         (pupa_get_memsize): Likewise.
15911         (pupa_get_mmap_entry): Likewise.
15912         (pupa_console_putchar): Likewise.
15913         (pupa_console_setcursor): Likewise.
15914         (pupa_getrtsecs): Use pushl instead of push.
15916         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
15917         memory instead of the stack for a mmap entry, because some
15918         BIOSes may ignore the maximum size and overflow.
15920         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
15922         * genmk.rb (PModule#rule): Compile automatically generated
15923         sources with module-specific CFLAGS as well as other sources.
15925 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
15927         * configure.ac: Check ld.
15928         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
15929         respectively, before checking endianness and sizes.
15931         * Makefile.in (LD): New variable.
15933 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
15935         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
15937 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
15939         * Changelog: New file.