1 2008-07-27 Pavel Roskin <proski@gnu.org>
3 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4 spurious warnings about a comment within a comment.
6 2008-07-25 Robert Millan <rmh@aybabtu.com>
8 * util/getroot.c (find_root_device): Skip devices that match
9 /dev/dm-[0-9]. This lets the real device be found for any type of
10 abstraction (LVM, EVMS, RAID..).
11 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
12 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
13 device is found first, find_root_device() will now skip it.
15 2008-07-24 Pavel Roskin <proski@gnu.org>
17 * include/grub/types.h: Use __builtin_bswap32() and
18 __builtin_bswap64() with gcc 4.3 and newer.
20 2008-07-24 Christian Franke <franke@computer.org>
22 * util/i386/pc/grub-install.in: If `--debug' is specified,
23 pass `--verbose' to grub-setup.
24 Abort script if make_system_path_relative_to_its_root() fails.
26 2008-07-24 Bean <bean123ch@gmail.com>
28 * configure.ac: Fixed a bug caused by the previous cygwin patch,
29 variable `target_platform' should be `platform'.
31 2008-07-24 Bean <bean123ch@gmail.com>
33 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
34 (grub_png_init_fixed_block): New function.
35 (grub_png_decode_image_data): Handle fixed huffman code compression.
37 2008-07-24 Bean <bean123ch@gmail.com>
39 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
40 (grub_pe2elf_SOURCES): New macro.
41 (CLEANFILES): Add grub-pe2elf.
43 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
44 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
45 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
46 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
47 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
48 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
49 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
50 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
51 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
52 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
53 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
54 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
55 (GRUB_PE32_DT_FUNCTION): Likewise.
56 (GRUB_PE32_REL_I386_DIR32): Likewise.
57 (GRUB_PE32_REL_I386_REL32): Likewise.
58 (grub_pe32_symbol): New structure.
59 (grub_pe32_reloc): Likewise.
61 * util/grub-pe2elf.c: New file.
63 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
64 start symbol in non pc platform.
66 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
68 The following patches are from Christian Franke.
70 * include/grub/dl.h: Remove .previous, gas supports this only
73 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
74 Remove .type, gas supports this only for ELF format.
76 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
77 nullbytes in symbol table. This fixes an infinite loop if table is
80 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
81 TARGET_IMG_LDFLAGS and EXEEXT.
83 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
84 TARGET_IMG_LDFLAGS_AC.
85 (grub_CHECK_STACK_ARG_PROBE): New function.
87 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
89 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
91 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
92 to set TARGET_IMG_LD* accordingly.
93 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
94 Add call to grub_CHECK_STACK_ARG_PROBE.
95 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
97 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
99 * genmk.rb: Add EXEEXT to CLEANFILES.
101 2008-07-23 Robert Millan <rmh@aybabtu.com>
103 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
104 define the codes for arrows and lines used for the menu).
105 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
108 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
109 fonts, because the latter are too slow.
111 2008-07-21 Bean <bean123ch@gmail.com>
113 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
114 a20. Run keyboard test last, as it will cause macbook to halt.
116 2008-07-18 Pavel Roskin <proski@gnu.org>
118 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
119 load foreign architecture modules correctly anyway. Keep
120 support for loading host architecture modules, whether we
123 2008-07-17 Pavel Roskin <proski@gnu.org>
125 * configure.ac: Use -m32 or -m64 regardless of whether we had to
126 change target_cpu. The compiler default can mismatch target_cpu
129 * disk/efi/efidisk.c: Fix format warnings on x86_64.
130 * kern/efi/efi.c: Likewise.
132 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
133 target compiler is functional.
134 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
137 * configure.ac: Default to efi platform for x86_64-apple. Allow
138 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
139 adjustments from the rest, only do them if target is not
140 explicitly given. Merge other adjustments with the final sanity
141 check. Remove an extraneous check for supported CPU. Be
142 specific which CPU and which platform is not supported.
144 * configure.ac: Default to pc platform for x86_64.
146 2008-07-17 Robert Millan <rmh@aybabtu.com>
148 Partial LinuxBIOS -> Coreboot rename.
150 * conf/i386-linuxbios.rmk: Renamed to ...
151 * conf/i386-coreboot.rmk: ... this.
152 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
153 * configure.ac: Accept "coreboot" as input platform (but maintain
154 compatibility with "linuxbios").
155 * include/grub/i386/linuxbios: Renamed to ...
156 * include/grub/i386/coreboot: ... this.
158 2008-07-17 Bean <bean123ch@gmail.com>
160 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
161 (appleldr_mod_SOURCE): New variable.
162 (appleldr_mod_CFLAGS): Likewise.
163 (appleldr_mod_LDFLAGS): Likewise.
164 (pci_mod_SOURCES): Likewise.
165 (pci_mod_CFLAGS): Likewise.
166 (pci_mod_LDFLAGS): Likewise.
167 (lspci_mod_SOURCES): Likewise.
168 (lspci_mod_CFLAGS): Likewise.
169 (lspci_mod_LDFLAGS): Likewise.
171 * conf/x86_64-efi.rmk: New file.
173 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
175 (grub_efidisk_write): Likewise.
177 * include/efi/api.h (efi_call_0): New macro.
178 (efi_call_1): Likewise.
179 (efi_call_2): Likewise.
180 (efi_call_3): Likewise.
181 (efi_call_4): Likewise.
182 (efi_call_5): Likewise.
183 (efi_call_6): Likewise.
185 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
186 grub_rescue_cmd_chainloader.
188 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
189 (grub_pe32_optional_header): Change some fields based on i386 or
191 (GRUB_PE32_PE32_MAGIC): Likewise.
193 * include/grub/efi/uga_draw.h: New file.
195 * include/grub/elf.h (STN_ABS): New constant.
196 (R_X86_64_NONE): Relocation constant for x86_64.
197 (R_X86_64_64): Likewise.
198 (R_X86_64_PC32): Likewise.
199 (R_X86_64_GOT32): Likewise.
200 (R_X86_64_PLT32): Likewise.
201 (R_X86_64_COPY): Likewise.
202 (R_X86_64_GLOB_DAT): Likewise.
203 (R_X86_64_JUMP_SLOT): Likewise.
204 (R_X86_64_RELATIVE): Likewise.
205 (R_X86_64_GOTPCREL): Likewise.
206 (R_X86_64_32): Likewise.
207 (R_X86_64_32S): Likewise.
208 (R_X86_64_16): Likewise.
209 (R_X86_64_PC16): Likewise.
210 (R_X86_64_8): Likewise.
211 (R_X86_64_PC8): Likewise.
213 * include/grub/i386/efi/pci.h: New file.
215 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
216 Change it value based on platform.
217 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
218 (GRUB_E820_RAM): Likewise.
219 (GRUB_E820_RESERVED): Likewise.
220 (GRUB_E820_ACPI): Likewise.
221 (GRUB_E820_NVS): Likewise.
222 (GRUB_E820_EXEC_CODE): Likewise.
223 (GRUB_E820_MAX_ENTRY): Likewise.
224 (grub_e820_mmap): New structure.
225 (linux_kernel_header): Change the efi field according to different
226 kernel version, also field from linux_kernel_header.
228 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
230 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
231 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
232 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
233 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
234 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
235 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
236 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
237 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
238 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
239 (GRUB_PCI_ADDR_IO_MASK): Likewise.
241 * include/grub/x86_64/efi/kernel.h: New file.
243 * include/grub/x86_64/efi/loader.h: Likewise.
245 * include/grub/x86_64/efi/machine.h: Likewise.
247 * include/grub/x86_64/efi/pci.h: Likewise.
249 * include/grub/x86_64/efi/time.h: Likewise.
251 * include/grub/x86_64/linux.h: Likewise.
253 * include/grub/x86_64/setjmp.h: Likewise.
255 * include/grub/x86_64/time.h: Likewise.
257 * include/grub/x86_64/types.h: Likewise.
259 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
260 GRUB_TARGET_SIZEOF_VOID_P.
262 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
263 (grub_efi_locate_handle): Likewise.
264 (grub_efi_open_protocol): Likewise.
265 (grub_efi_set_text_mode): Likewise.
266 (grub_efi_stall): Likewise.
267 (grub_exit): Likewise.
268 (grub_reboot): Likewise.
269 (grub_halt): Likewise.
270 (grub_efi_exit_boot_services): Likewise.
271 (grub_get_rtc): Likewise.
273 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
274 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
275 (grub_efi_allocate_pages): Wrap efi calls.
276 (grub_efi_free_pages): Wrap efi calls.
277 (grub_efi_get_memory_map): Wrap efi calls.
279 * kern/x86_64/dl.c: New file.
281 * kern/x86_64/efi/callwrap.S: Likewise.
283 * kern/x86_64/efi/startup.S: Likewise.
285 * loader/efi/appleloader.c: Likewise.
287 * loader/efi/chainloader.c (cmdline): New variable.
288 (grub_chainloader_unload): Wrap efi calls.
289 (grub_chainloader_boot): Likewise.
290 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
293 * loader/efi/chainloader_normal.c (chainloader_command):
294 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
297 * loader/i386/efi/linux.c (allocate_pages): Change allocation
299 (grub_e820_add_region): New function.
300 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
302 (grub_find_video_card): New function.
303 (grub_linux_setup_video): New function.
304 (grub_rescue_cmd_linux): Probe for video information.
306 * normal/x86_64/setjmp.S: New file.
308 * term/efi/console.c (map_char): New function.
309 (grub_console_putchar): Map unicode char.
310 (grub_console_checkkey): Wrap efi calls.
311 (grub_console_getkey): Likewise.
312 (grub_console_getwh): Likewise.
313 (grub_console_gotoxy): Likewise.
314 (grub_console_cls): Likewise.
315 (grub_console_setcolorstate): Likewise.
316 (grub_console_setcursor): Likewise.
318 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
320 2008-07-16 Pavel Roskin <proski@gnu.org>
322 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
325 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
326 pointer, not an integer. This fixes a warning and prevents
327 precision loss on 64-bit systems.
328 (relocate_addresses): Remove unneeded cast.
330 2008-07-15 Pavel Roskin <proski@gnu.org>
332 * kern/i386/ieee1275/init.c: Include grub/cache.h.
334 * term/ieee1275/ofconsole.c: Disable code unused on i386.
336 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
337 Fix comparison between signed and unsigned.
339 * include/grub/i386/ieee1275/console.h: Declare
340 grub_console_init() and grub_console_fini().
342 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
343 It's empty and unused.
345 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
346 beginning to avoid warnings with some compilers.
348 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
349 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
351 2008-07-14 Pavel Roskin <proski@gnu.org>
353 * kern/env.c (grub_register_variable_hook): Don't copy empty
354 string, it leaks memory. Pass "" to grub_env_set(), it should
355 handle constant strings.
357 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
358 * commands/cmp.c (grub_cmd_cmp): Likewise.
359 * kern/dl.c (grub_dl_flush_cache): Likewise.
360 (grub_dl_load_core): Likewise.
361 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
362 (grub_elf64_load_phdrs): Likewise.
364 2008-07-13 Pavel Roskin <proski@gnu.org>
366 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
367 between signed and unsigned.
368 (LzmaEnc_Finish): Fix warning about an unused parameter.
370 2008-07-13 Bean <bean123ch@gmail.com>
372 * Makefile.in (enable_lzo): New rule.
374 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
376 * configure.ac (ENABLE_LZO): New option --enable-lzo.
378 * boot/i386/pc/lnxboot.S: #include <config.h>.
380 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
381 its value according to the compression algorithm used, lzo or lzma.
383 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
384 compression algorithm according to configure macro.
386 * kern/i386/pc/startup.S (codestart): Likewise.
388 * kern/i386/pc/lzma_decode.S: New file.
390 * include/grub/lib/LzFind.h: Likewise.
392 * include/grub/lib/LzHash.h: Likewise.
394 * include/grub/lib/LzmaDec.h: Likewise.
396 * include/grub/lib/LzmaEnc.h: Likewise.
398 * include/grub/lib/LzmaTypes.h: Likewise.
400 * lib/LzFind.c: Likewise.
402 * lib/LzmaDec.c: Likewise.
404 * lib/LzmaEnc.c: Likewise.
406 2008-07-13 Bean <bean123ch@gmail.com>
408 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
409 (grub_ext4_extent_header): New structure.
410 (grub_ext4_extent): Likewise.
411 (grub_ext4_extent_idx): Likewise.
412 (grub_ext4_find_leaf): New function.
413 (grub_ext2_read_block): Handle extents.
415 2008-07-12 Robert Millan <rmh@aybabtu.com>
417 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
419 2008-07-11 Robert Millan <rmh@aybabtu.com>
421 * util/grub.d/40_custom.in: New file. Example on how to add custom
422 entries to /etc/grub.d.
423 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
424 40_custom (implicitly, by merging all the grub.d rules).
426 2008-07-11 Pavel Roskin <proski@gnu.org>
428 * commands/read.c (grub_getline): Fix invalid memory access.
429 Don't add newline to the variable value.
431 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
432 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
433 (serial_hw_get_port): Check validity of the port number.
434 (grub_cmd_serial): Check return value of serial_hw_get_port().
436 2008-07-07 Pavel Roskin <proski@gnu.org>
438 * boot/i386/pc/diskboot.S (notification_string): Replace
439 "Loading kernel" with just "loading". This is shorter, less
440 confusing and saves a few bytes for possible future changes.
442 2008-07-05 Pavel Roskin <proski@gnu.org>
444 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
445 size for ATAPI devices, they are undefined. Output sector
446 number in decimal form.
448 * disk/ata.c: Use named constants for status bits.
450 2008-07-04 Pavel Roskin <proski@gnu.org>
452 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
453 grub_addr_t before casting it to the void pointer to fix a
454 warning. Non-addressable regions are discarded earlier.
455 (grub_arch_modules_addr): Cast _end to grub_addr_t.
456 * kern/i386/linuxbios/table.c: Include grub/misc.h.
457 (check_signature): Don't shadow table_header.
458 (grub_linuxbios_table_iterate): Cast numeric constants to
459 grub_linuxbios_table_header_t.
460 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
463 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
466 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
467 pointer, which can cause warnings. Support 64-bit addresses.
469 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
470 of sizeof(long). This fixes PowerPC image generation on x86_64.
472 2008-07-04 Robert Millan <rmh@aybabtu.com>
474 This fixes a performance issue when pc & gpt partmap iterators
475 didn't abort iteration even after our hook found what it was
476 looking for (often causing expensive probes of non-existent drives).
478 Some callers relied on previous buggy behaviour, since they would
479 rise an error when their own hooks caused early abortion of its
482 * kern/device.c (grub_device_open): Improve error message.
483 * disk/lvm.c (grub_lvm_open): Likewise.
484 * disk/raid.c (grub_raid_open): Likewise.
486 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
487 when hook requests it, independently of grub_errno.
488 (pc_partition_map_probe): Do not fail when find_func() caused
489 early abortion of pc_partition_map_iterate().
491 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
492 when hook requests it, independently of grub_errno.
493 (gpt_partition_map_probe): Do not fail when find_func() caused
494 early abortion of gpt_partition_map_iterate().
496 * kern/partition.c (grub_partition_iterate): Abort parent iteration
497 when hook requests it, independently of grub_errno. Do not fail when
498 part_map_iterate_hook() caused early abortion of p->iterate().
500 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
501 when grub_partition_iterate() returned with non-zero.
503 2008-07-03 Pavel Roskin <proski@gnu.org>
505 * disk/ata.c (grub_ata_pio_write): Check status before writing,
506 like we do in grub_ata_pio_read().
507 (grub_ata_readwrite): Always write individual sectors. Fix the
508 sector count for the remainder.
509 (grub_ata_write): Enable writing to ATA devices. Correctly
510 report error for ATAPI devices.
512 2008-07-02 Pavel Roskin <proski@gnu.org>
514 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
517 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
518 for every read sector, we already increment it for the whole
519 batch. This fixes reading more than 256 sectors at once.
521 * util/grub-editenv.c (cmd_info): Cast argument to long
522 explicitly. ptrdiff_t reduces to int on i386.
524 * util/grub-editenv.c (main): Be specific which parameter is
527 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
528 (memdisk): Make memdisk_orig_addr a pointer.
530 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
531 for file offsets, use grub_off_t instead. Fix printf format
534 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
535 there. Real unexpected warnings should not drown in the noise
536 about known problems.
538 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
539 grub_disk_addr_t for memory addresses.
541 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
542 explicitly to fix a warning.
544 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
546 * Makefile.in (MODULE_LDFLAGS): New variable.
547 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
548 the linker accepts --build-id=none.
549 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
551 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
553 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
554 those in Linux XFS code. Provide a way to access 64-bit parent
556 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
557 the end of struct grub_xfs_dir_header.
559 2008-07-02 Bean <bean123ch@gmail.com>
561 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
562 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
563 and GRUB_IEEE1275_FLAG_NO_ANSI.
565 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
566 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
567 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
569 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
570 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
572 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
573 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
575 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
576 esc sequence on non ANSI terminal.
577 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
579 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
582 2008-07-02 Bean <bean123ch@gmail.com>
584 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
585 (grub_editenv_SOURCES): New variable.
586 (pkglib_MODULES): Add loadenv.mod.
587 (loadenv_mod_SOURCES): New variable.
588 (loadenv_mod_CFLAGS): Likewise.
589 (loadenv_mod_LDFLAGS): Likewise.
591 * include/grub/envblk.h: New file.
593 * util/envblk.c: New file.
595 * util/grub-editenv.c: New file.
597 * commands/loadenv.c: New file.
599 2008-07-01 Pavel Roskin <proski@gnu.org>
601 * include/multiboot2.h (struct multiboot_tag_module): Use char,
602 not unsigned char. This fixes warnings and is consistent with
605 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
607 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
609 * term/tparm.c (analyze): Always set *popcount.
611 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
612 cast to fix a warning.
614 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
615 cast to suppress a warning.
617 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
618 grub_fshelp_read_file() expects.
620 * fs/fat.c: Fix UUID calculation on big-endian systems. We
621 write uuid as a 32-bit value in CPU byte order, so declare and
624 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
625 long if the format specifier expects it.
626 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
627 * partmap/pc.c (pc_partition_map_iterate): Likewise.
628 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
629 long to fix a warning.
630 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
631 grub_dprintf() arguments to fix warnings.
633 2008-06-30 Pavel Roskin <proski@gnu.org>
635 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
636 install_bsd_part immediately before core.img is embedded or
637 modified on disk. This fixes core.img verification if core.img
640 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
641 core_path to calculate the blocklist.
642 Patch from Javier MartÃn <lordhabbit@gmail.com>
644 2008-06-29 Robert Millan <rmh@aybabtu.com>
646 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
648 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
649 Patch from Niels Böhm <bitbucket@arcor.de>
651 2008-06-29 Robert Millan <rmh@aybabtu.com>
653 * util/update-grub_lib.in (font_path): Search for fonts in
654 /boot/grub first, which is more likely to be readable (we aren't
655 deciding where fonts live, just looking for them).
657 2008-06-26 Pavel Roskin <proski@gnu.org>
659 * util/biosdisk.c (read_device_map): Don't leave dead map
660 entries for devices failing stat() check.
662 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
663 core_path_dev for the core.img path on the target device.
665 2008-06-26 Robert Millan <rmh@aybabtu.com>
667 * disk/fs_uuid.c: New file.
668 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
669 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
670 (fs_uuid_mod_LDFLAGS): New variables.
671 * include/grub/disk.h (grub_disk_dev_id): Add
672 `GRUB_DISK_DEVICE_UUID_ID'.
673 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
676 2008-06-26 Robert Millan <rmh@aybabtu.com>
678 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
679 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
680 Linux image includes no initrd.
682 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
684 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
685 call to resolve the core image location that effectively appended the
688 2008-06-21 Robert Millan <rmh@aybabtu.com>
690 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
693 * util/grub.d/10_hurd.in: ... to here ...
694 * util/grub.d/10_linux.in: ... and here.
696 2008-06-19 Robert Millan <rmh@aybabtu.com>
698 * kern/main.c (grub_main): Export `prefix' variable immediately
699 after it has been set by grub_machine_set_prefix().
701 2008-06-19 Robert Millan <rmh@aybabtu.com>
703 * commands/search.c (search_label, search_fs_uuid, search_file): Print
704 search result when not saving to variable, not the other way around.
705 When saving to variable, abort iteration as soon as a match is found.
707 2008-06-19 Robert Millan <rmh@aybabtu.com>
709 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
710 check for partition that provides /boot/grub. Its logic is flawed,
711 as it prevents prepare_grub_to_access_device() from being called
714 2008-06-19 Robert Millan <rmh@aybabtu.com>
716 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
717 "insmod" command directly when abstraction modules are needed,
718 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
719 since it had already been processed).
721 2008-06-19 Pavel Roskin <proski@gnu.org>
723 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
724 changed. This is needed in case GRUB_LIBDIR changes.
725 * conf/i386-ieee1275.rmk: Likewise.
726 * conf/i386-linuxbios.rmk: Likewise.
727 * conf/i386-pc.rmk: Likewise.
728 * conf/powerpc-ieee1275.rmk: Likewise.
730 2008-06-18 Pavel Roskin <proski@gnu.org>
732 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
733 kernel_elf_symlist.c to symlist.c for consistency with other
734 architectures. Update all users.
735 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
737 2008-06-18 Robert Millan <rmh@aybabtu.com>
739 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
742 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
743 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
744 a RAID device, run setup() for all members independently on whether
745 LVM abstraction is being used.
746 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
747 If grub-mkimage has set `*install_dos_part == -2', don't override this
749 Perform *install_dos_part adjustments independently on whether
750 we're embedding or not.
751 Clarify error message when image is too big for embedding.
752 Remove duplicate *install_dos_part stanza.
754 2008-06-17 Robert Millan <rmh@aybabtu.com>
756 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
757 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
759 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
760 values in grub_ofconsole_normal_color and
761 grub_ofconsole_highlight_color (they're not directly related to
762 background and foreground).
763 (grub_ofconsole_setcolorstate): Extract background and foreground
764 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
766 2008-06-17 Robert Millan <rmh@aybabtu.com>
768 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
769 /boot/grub for the check in last commit, not /boot (they could be
770 different partitions).
772 2008-06-16 Robert Millan <rmh@aybabtu.com>
774 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
775 asked to setup access for the same partition that provides /boot,
776 don't bother using UUIDs since our root already has the value we
779 2008-06-16 Robert Millan <rmh@aybabtu.com>
781 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
783 Patch from Sven Mueller <sven@debian.org>.
785 2008-06-16 Robert Millan <rmh@aybabtu.com>
787 * util/update-grub.in: Check for $EUID instead of $UID.
788 Reported by Vincent Zweije.
790 2008-06-16 Bean <bean123ch@gmail.com>
792 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
793 (grub_ext2_read_block): Likewise.
794 (grub_ext2_read_inode): Likewise.
795 (grub_ext2_mount): Likewise.
796 (grub_ext2_close): Likewise.
797 (grub_ext3_get_journal): Removed.
799 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
800 (grub_reiserfs_read_symlink): Likewise.
801 (grub_reiserfs_mount): Likewise.
802 (grub_reiserfs_open): Likewise.
803 (grub_reiserfs_read): Likewise.
804 (grub_reiserfs_close): Likewise.
805 (grub_reiserfs_get_journal): Removed.
807 * fs/fshelp.c (grub_fshelp_read): Removed.
808 (grub_fshelp_map_block): Likewise.
810 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
811 (grub_fshelp_journal): Likewise.
812 (grub_fshelp_read): Likewise.
813 (grub_fshelp_map_block): Likewise.
815 2008-06-16 Pavel Roskin <proski@gnu.org>
817 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
818 floating point anymore.
819 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
821 2008-06-15 Pavel Roskin <proski@gnu.org>
823 * commands/ls.c (grub_ls_list_files): Use integer calculations
824 for human readable format, avoid floating point use.
825 * kern/misc.c (grub_ftoa): Remove.
826 (grub_vsprintf): Remove floating point support.
828 2008-06-15 Robert Millan <rmh@aybabtu.com>
830 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
832 Reported by Max Vozeler.
834 2008-06-15 Robert Millan <rmh@aybabtu.com>
836 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
837 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
839 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
840 the beginning of the prefix.
842 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
843 It is assumed that if we have a memdisk, grub-mkimage has set
844 grub_prefix to include the "(memdisk)" drive in it.
846 2008-06-15 Robert Millan <rmh@aybabtu.com>
848 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
849 Initialize keyboard controller after registering the terminal, so that
850 grub_printf() can be called from grub_keyboard_controller_init().
852 2008-06-15 Robert Millan <rmh@aybabtu.com>
854 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
855 extent-btree which is written as big endian on disk.
856 Reported by Alain Greppin <al@chilibi.org>.
858 2008-06-14 Robert Millan <rmh@aybabtu.com>
860 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
861 * util/i386/pc/grub-install.in (modules): Likewise.
863 2008-06-13 Pavel Roskin <proski@gnu.org>
865 * commands/ls.c (grub_ls_list_files): Fix format warnings.
867 2008-06-13 Bean <bean123ch@gmail.com>
869 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
871 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
873 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
874 to indicate sparse block.
876 2008-06-12 Pavel Roskin <proski@gnu.org>
878 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
879 number, grub_fshelp_read() does it for us.
881 * fs/fshelp.c (grub_fshelp_read): New function. Implement
882 linear disk read with journal translation.
883 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
884 * include/grub/fshelp.h: Declare grub_fshelp_read().
886 2008-06-09 Pavel Roskin <proski@gnu.org>
888 * fs/minix.c (grub_minix_mount): Handle error reading
891 2008-06-08 Robert Millan <rmh@aybabtu.com>
893 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
894 don't append the RAID prefix afterwards.
895 Reported by Clint Adams.
897 2008-06-08 Robert Millan <rmh@aybabtu.com>
899 Based on description from Pavel:
900 * kern/disk.c (grub_disk_check_range): Rename to ...
901 (grub_disk_adjust_range): ... this. Add a comment explaining the
902 tasks performed by this function.
904 2008-06-08 Robert Millan <rmh@aybabtu.com>
906 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
907 `num_serial' (for consistency with other variables).
908 (struct grub_ntfs_data): Add `uuid' member.
909 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
910 (grub_ntfs_uuid): New function.
911 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
913 2008-06-07 Pavel Roskin <proski@gnu.org>
915 * util/biosdisk.c (open_device): Revert last change to the
916 function, it broke installation. The sector needs to be
917 different dependent on which device is opened.
919 2008-06-06 Robert Millan <rmh@aybabtu.com>
921 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
922 rest of GRUB, and breakage doesn't happen if its value were modified.
924 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
925 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
926 a constant (same value).
927 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
928 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
930 2008-06-06 Robert Millan <rmh@aybabtu.com>
932 * util/biosdisk.c (open_device): Do not modify sector offset when
933 accessing a partition. kern/disk.c already handles this for us.
935 2008-06-06 Robert Millan <rmh@aybabtu.com>
937 * util/grub-emu.c (grub_machine_init): Move code in this function from
939 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
940 segfault in case grub_printf() is called).
942 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
943 grub_probe. Update all users not to explicitly add it again.
944 (grub_device): New variable; contains corresponding device for grubdir.
945 (fs_module, partmap_module, devabstraction_module): Pass
946 `--device ${grub_device}' to grub_probe to avoid traversing /dev
949 2008-06-05 Robert Millan <rmh@aybabtu.com>
951 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
952 is found, print it (same layout as with labels).
954 2008-06-04 Robert Millan <rmh@aybabtu.com>
956 * util/biosdisk.c (get_drive): Rename to ...
957 (find_grub_drive): ... this. Update all users.
959 (get_os_disk): Rename to ...
960 (convert_system_partition_to_system_disk): ... this. Update all users.
962 (find_drive): Rename to ...
963 (find_system_device): ... this. Update all users.
965 2008-06-04 Robert Millan <rmh@aybabtu.com>
967 * util/biosdisk.c (get_os_disk): Handle IDA devices.
968 * util/grub-mkdevicemap.c (get_mmc_disk_name)
969 (make_device_map): Likewise.
971 2008-06-01 Robert Millan <rmh@aybabtu.com>
973 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
974 before dereferencing it.
976 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
977 union with fat12/fat16-specific ones. Add some new fields, including
978 `num_serial' for both versions.
979 (struct grub_fat_data): Add `uuid' member.
980 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
981 names. Initialize `data->uuid' using `num_serial'.
982 (grub_fat_uuid): New function.
983 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
985 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
986 (grub_reiserfs_uuid): New function.
987 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
990 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
991 (grub_xfs_uuid): New function.
992 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
994 2008-06-01 Robert Millan <rmh@aybabtu.com>
996 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
997 code that is backward compatible with pre-uuid search command.
999 2008-05-31 Robert Millan <rmh@aybabtu.com>
1001 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1002 floppies after everything else, to ensure floppy drive isn't accessed
1003 unnecessarily (patch from Bean).
1005 2008-05-31 Robert Millan <rmh@aybabtu.com>
1007 * commands/search.c (search_label, search_fs_uuid, search_file): Do
1008 not print device names when we were asked to set a variable.
1010 2008-05-31 Robert Millan <rmh@aybabtu.com>
1012 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1013 using "cursor-on" and "cursor-off" commands (understood at least by
1014 the Open Firmware flavour on OLPC).
1016 2008-05-31 Michael Gorven <michael@gorven.za.net>
1018 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1019 on and off sequences.
1021 2008-05-31 Robert Millan <rmh@aybabtu.com>
1023 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1024 * util/update-grub.in: Likewise.
1026 2008-05-30 Pavel Roskin <proski@gnu.org>
1028 * util/biosdisk.c (linux_find_partition): Simplify logic and
1029 make the code more universal. Keep special processing for
1030 devfs, but use a simple rule for all other devices. If the
1031 device ends with a number, append 'p' and the partition number.
1032 Otherwise, append only the partition number.
1034 2008-05-30 Robert Millan <rmh@aybabtu.com>
1036 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1037 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1038 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1039 the `root' parameter to Linux.
1041 2008-05-30 Robert Millan <rmh@aybabtu.com>
1043 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1044 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1045 --fs_uuid with --fs-uuid.
1046 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1047 all filesystems support them).
1049 2008-05-30 Robert Millan <rmh@aybabtu.com>
1051 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
1052 grub_printf() flags, since we're printing in units of 2 bytes.
1054 2008-05-30 Robert Millan <rmh@aybabtu.com>
1056 * util/grub.d/00_header.in: Remove obsolete comment referencing
1057 convert_system_path_to_grub_path().
1058 * util/update-grub.in: Likewise.
1059 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1060 (convert_system_path_to_grub_path): Add a warning message explaining
1061 that this function is deprecated. Rely on is_path_readable_by_grub()
1062 for the readability checks.
1063 (font_path): Use is_path_readable_by_grub() for the readability
1064 check rather than convert_system_path_to_grub_path().
1066 2008-05-30 Robert Millan <rmh@aybabtu.com>
1068 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1069 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1070 converting it first.
1071 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1072 grub.cfg for access to font file, and afterwards call it again to set
1075 2008-05-30 Robert Millan <rmh@aybabtu.com>
1077 * commands/search.c (options): Add --fs_uuid option.
1078 (search_fs_uuid): New function.
1079 (grub_cmd_search): Fix --set argument passing.
1080 Use search_fs_uuid() when requested via --fs_uuid.
1081 (grub_search_init): Update help message.
1082 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1083 and redeclare it as an array of 16-bit words.
1084 (grub_ext2_uuid): New function.
1085 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1086 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1087 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1088 (GRUB_DEVICE_BOOT_UUID): New variables.
1089 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1090 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1092 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
1093 just assume `root' variable has the right value.
1094 * util/grub.d/10_linux.in: Likewise.
1095 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1097 (main): Recognise `-t fs_uuid' argument.
1099 2008-05-30 Robert Millan <rmh@aybabtu.com>
1101 * util/biosdisk.c (map): Redefine structure to hold information
1102 about GRUB drive name.
1103 (get_drive): Reimplement without assuming (and verifying) BIOS-like
1105 (call_hook): Remove.
1106 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1107 member. Assume drive has partitions.
1108 (grub_util_biosdisk_open): Access device names via `.device' struct
1110 (open_device): Likewise.
1111 (find_drive): Likewise.
1112 (read_device_map): Adjust map[] usage to match the new struct
1113 definition. Don't check for duplicates (still possible, but not cheap
1115 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1116 (make_device_name): Remove assumption of BIOS-like drive names.
1118 2008-05-30 Pavel Roskin <proski@gnu.org>
1120 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1121 compiling execute.c doesn't need grub_script.tab.h anymore.
1122 (normal/command.c_DEPENDENCIES): Likewise.
1123 (normal/function.c_DEPENDENCIES): Likewise.
1124 * conf/i386-ieee1275.rmk: Likewise.
1125 * conf/i386-linuxbios.rmk: Likewise.
1126 * conf/i386-pc.rmk: Likewise.
1127 * conf/powerpc-ieee1275.rmk: Likewise.
1128 * conf/sparc64-ieee1275.rmk: Likewise.
1130 2008-05-29 Pavel Roskin <proski@gnu.org>
1132 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1133 when scanning metadata for volume group name.
1135 * include/grub/script.h: Don't include grub_script.tab.h. It's
1136 a generated file, which may only be included from the files with
1137 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
1138 use union YYSTYPE, as the later allows forward declaration.
1139 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1141 2008-05-29 Robert Millan <rmh@aybabtu.com>
1143 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1144 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1145 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1146 (grub_console_checkkey): Add grub_dprintf() call to report unknown
1149 2008-05-29 Robert Millan <rmh@aybabtu.com>
1151 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1152 control key combinations.
1154 2008-05-29 Robert Millan <rmh@aybabtu.com>
1156 * util/powerpc/ieee1275/grub-install.in: Move from here ...
1157 * util/ieee1275/grub-install.in: ... to here.
1158 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1159 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1160 (grub_install_SOURCES): Likewise.
1162 2008-05-29 Robert Millan <rmh@aybabtu.com>
1164 * fs/affs.c: Update copyright year.
1165 * fs/ext2.c: Likewise.
1166 * fs/fshelp.c: Likewise.
1167 * fs/hfsplus.c: Likewise.
1168 * fs/ntfs.c: Likewise.
1169 * fs/xfs.c: Likewise.
1170 * include/grub/fshelp.h: Likewise.
1171 * util/grub-mkdevicemap.c: Likewise.
1173 2008-05-28 Robert Millan <rmh@aybabtu.com>
1175 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1176 might need to be fatfs to support some firmware implementations
1179 2008-05-28 Robert Millan <rmh@aybabtu.com>
1181 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1183 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1184 (make_device_map): Likewise.
1186 2008-05-20 Bean <bean123ch@gmail.com>
1188 * fs/fshelp.c (grub_fshelp_map_block): New function.
1189 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1190 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1192 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1193 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
1194 (grub_fshelp_journal): New structure.
1195 (grub_fshelp_map_block): New function prototype.
1196 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
1197 (grub_fshelp_map_block): Likewise.
1199 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
1200 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
1201 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
1202 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
1203 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
1204 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
1205 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
1206 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
1207 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
1208 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
1209 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
1210 (grub_ext2_sblock): New members for journal support.
1211 (grub_ext3_journal_header): New structure.
1212 (grub_ext3_journal_revoke_header): Likewise.
1213 (grub_ext3_journal_block_tag): Likewise.
1214 (grub_ext3_journal_sblock): Likewise.
1215 (grub_fshelp_node): New members logfile and journal.
1216 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
1217 grub_fshelp_map_block to get real block number.
1218 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
1220 (grub_ext2_read_inode): Likewise.
1221 (grub_ext3_get_journal): New function.
1222 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
1223 (grub_ext2_close): Release memory used by journal.
1225 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
1226 (REISERFS_MAGIC_DESC_BLOCK): New macro.
1227 (grub_reiserfs_transaction_header): Renamed to
1228 grub_reiserfs_description_block, replace field data with real_blocks.
1229 (grub_reiserfs_commit_block): New structure.
1230 (grub_reiserfs_data): New member journal.
1231 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
1233 (grub_reiserfs_read_symlink): Likewise.
1234 (grub_reiserfs_iterate_dir): Likewise.
1235 (grub_reiserfs_open): Likewise.
1236 (grub_reiserfs_read): Likewise.
1237 (grub_reiserfs_get_journal): New function.
1238 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
1239 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
1240 using grub_reiserfs_get_journal.
1241 (grub_reiserfs_close): Release memory used by journal.
1243 * fs/affs.c (grub_affs_read_block): Change block type to
1244 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
1246 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
1248 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
1250 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
1252 * fs/udf.c (grub_udf_read_block): Change block type to
1253 grub_disk_addr_t. Use type cast to avoid warning.
1255 * fs/xfs.c (grub_xfs_read_block): Likewise.
1257 2008-05-16 Christian Franke <franke@computer.org>
1259 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
1260 to ensure that break with ESC will always work.
1261 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
1262 Remove ESC from keyboard queue.
1264 2008-05-16 Christian Franke <franke@computer.org>
1266 * util/biosdisk.c: [__CYGWIN__] Add includes.
1267 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
1268 (get_os_disk): Move variable declarations to OS specific
1269 parts to avoid warning.
1270 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
1271 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
1272 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
1274 * util/getroot.c: [__CYGWIN__] Add includes.
1275 (strip_extra_slashes): Fix "/" case.
1276 [__CYGWIN__] (get_win32_path): New function.
1277 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
1278 [__CYGWIN__] (find_root_device): Disable.
1279 [__CYGWIN__] (get_bootsec_serial): New function.
1280 [__CYGWIN__] (find_cygwin_root_device): Likewise.
1281 [__linux__] (grub_guess_root_device): Add early returns to simplify
1283 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
1284 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
1285 check for Linux only.
1287 2008-05-15 Bean <bean123ch@gmail.com>
1289 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
1290 keyboard hang problem in apple's intel mac.
1292 2008-05-09 Robert Millan <rmh@aybabtu.com>
1294 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
1296 * util/grub-mkdevicemap.c (get_virtio_disk_name)
1297 (make_device_map): Likewise.
1298 Reported by Aurelien Jarno <aurel32@debian.org>
1300 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
1302 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
1303 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
1304 (make_device_map): Output entries for xvd type disks.
1306 2008-05-07 Robert Millan <rmh@aybabtu.com>
1308 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
1310 * util/grub-mkdevicemap.c (get_cciss_disk_name)
1311 (make_device_map): Likewise.
1312 Reported by Roland Dreier <rdreier@cisco.com>
1314 2008-05-07 Robert Millan <rmh@aybabtu.com>
1316 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
1317 grub_strstr() call. Correct a few mistakes in failure path handling.
1319 2008-05-06 Robert Millan <rmh@aybabtu.com>
1321 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1322 Do not print a trailing slash (therefore, the root directory is an
1324 (convert_system_path_to_grub_path): Do not remove trailing slash
1325 from make_system_path_relative_to_its_root() output.
1327 * util/i386/pc/grub-install.in: Add trailing slash to output from
1328 make_system_path_relative_to_its_root().
1330 2008-05-06 Robert Millan <rmh@aybabtu.com>
1332 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
1333 ensures that output lines aren't intermangled with those sent to
1334 stderr (via grub_util_info()).
1335 * util/grub-probe.c (grub_refresh): Likewise.
1336 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
1338 2008-05-05 Christian Franke <franke@computer.org>
1340 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
1341 Add Cygwin device names.
1342 (get_ide_disk_name) [__CYGWIN__]: Likewise.
1343 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
1344 (check_device): Return error instead of success on empty name.
1345 (make_device_map): Move label inside linux specific code to
1346 prevent compiler warning.
1348 2008-04-30 Robert Millan <rmh@aybabtu.com>
1350 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
1351 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
1353 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
1355 2008-04-29 Robert Millan <rmh@aybabtu.com>
1357 * docs/grub.cfg: New file (example GRUB configuration).
1359 2008-04-26 Robert Millan <rmh@aybabtu.com>
1361 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
1362 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
1363 and `disk/ieee1275/nand.c'.
1365 2008-04-25 Bean <bean123ch@gmail.com>
1367 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
1370 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
1371 change the buffer size to 4096 for cdrom device.
1373 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
1375 (_linux_mod_SOURCES): New variable.
1376 (_linux_mod_CFLAGS): Likewise.
1377 (_linux_mod_LDFLAGS): Likewise.
1378 (linux_mod_SOURCES): Likewise.
1379 (linux_mod_CFLAGS): Likewise.
1380 (linux_mod_LDFLAGS): Likewise.
1381 (nand_mod_SOURCES): Likewise.
1382 (nand_mod_CFLAGS): Likewise.
1383 (nand_mod_LDFLAGS): Likewise.
1385 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
1386 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
1387 type property. (nand device in olpc don't have this property)
1389 * include/grub/disk.h (grub_disk_dev_id): New macro
1390 GRUB_DISK_DEVICE_NAND_ID.
1392 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
1394 (grub_rescue_cmd_initrd): Likewise.
1396 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
1397 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
1398 ofw_cif_handler and ofw_idt, adjust padding number.
1400 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
1401 GRUB_MACHINE_IEEE1275 is defined.
1403 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
1404 Use NESTED_FUNC_ATTR attribute on the hook parameter.
1406 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
1407 on nested function heap_init.
1408 (grub_upper_mem): New variable for i386-ieee1275.
1409 (grub_get_extended_memory): New function for i386-ieee1275.
1410 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
1412 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
1413 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
1416 * loader/i386/ieee1275/linux.c: New file.
1418 * loader/i386/ieee1275/linux_normal.c: New file.
1420 * disk/ieee1275/nand.c: New file.
1422 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
1424 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
1426 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
1428 2008-04-18 Robert Millan <rmh@aybabtu.com>
1430 Restructures early code path on ieee1275 to unify grub_main() as
1431 the first C function that is executed in every platform.
1433 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
1434 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
1436 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
1437 * kern/ieee1275/cmain.c (cmain): Rename to ...
1438 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
1439 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
1442 2008-04-18 Robert Millan <rmh@aybabtu.com>
1444 * util/update-grub.in: Fix syntax error when setting
1445 `GRUB_PRELOAD_MODULES'.
1446 Reported by Stephane Chazelas <stephane@artesyncp.com>
1448 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
1450 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
1451 section into account, newer toolchains generate unique build ids
1452 * configure.ac: remove the test for --build-id=none acceptance,
1453 we want build ids to be preserved
1454 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
1455 far from other sections don't cause the raw binary images grow
1458 2008-04-15 Robert Millan <rmh@aybabtu.com>
1460 * disk/lvm.c: Update copyright year.
1461 * kern/misc.c: Likewise.
1463 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1465 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
1466 there is no memory left for physical volume name.
1468 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1470 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
1471 volume name mapping to support bigger than 9 character names properly.
1473 2008-04-13 Robert Millan <rmh@aybabtu.com>
1475 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
1476 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
1478 2008-04-13 Christian Franke <franke@computer.org>
1480 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
1481 to create a floppy emulation boot CD when non emulation mode
1483 Enable Joliet CD filesystem extension.
1485 2008-04-13 Robert Millan <rmh@aybabtu.com>
1487 * kern/misc.c (grub_strncat): Fix off-by-one error.
1488 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
1490 * kern/env.c (grub_env_context_close): Clear current context, not
1492 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
1494 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
1496 2008-04-13 Robert Millan <rmh@aybabtu.com>
1498 Improve robustness when handling LVM.
1500 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
1501 (and leave `*p' unmodified).
1502 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
1504 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
1505 iterating through it.
1506 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
1508 (grub_lvm_scan_device): Check the return value (and fail gracefully
1509 when due) on each grub_lvm_getvalue() or grub_strstr() call.
1510 Don't assume `vg->pvs != NULL' when iterating through it.
1512 2008-04-13 Robert Millan <rmh@aybabtu.com>
1514 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
1515 * genmk.rb (partmap): New variable.
1516 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
1517 (#{partmap}): New target rule.
1518 * genpartmaplist.sh: New file.
1519 * Makefile.in (pkglib_DATA): Add partmap.lst.
1520 (partmap.lst): New target rule.
1521 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
1522 modules (including all partition maps), instead of preloading them.
1524 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
1526 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
1527 `linux-boot-prober' (if installed) to detect other operating
1528 systems which are installed on the computer and add them to
1530 * conf/common.rmk: Build and install 30_os-prober.
1532 2008-04-12 Robert Millan <rmh@aybabtu.com>
1534 * kern/powerpc/ieee1275/init.c: Move from here ...
1535 * kern/ieee1275/init.c: ... to here. Update all users.
1537 * kern/powerpc/ieee1275/cmain.c: Move from here ...
1538 * kern/ieee1275/cmain.c: ... to here. Update all users.
1540 * kern/powerpc/ieee1275/openfw.c: Move from here ...
1541 * kern/ieee1275/openfw.c: ... to here. Update all users.
1543 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
1544 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
1546 2008-04-10 Pavel Roskin <proski@gnu.org>
1548 * configure.ac: Always use "_cv_" in cache variables for
1549 compatibility with Autoconf 2.62.
1551 2008-04-07 Robert Millan <rmh@aybabtu.com>
1553 Revert grub/machine/init.h addition by Pavel (since it breaks on
1554 i386-ieee1275 and others):
1555 * util/i386/pc/misc.c: Remove grub/machine/init.h.
1556 * util/powerpc/ieee1275/misc.c: Likewise.
1558 2008-04-07 Robert Millan <rmh@aybabtu.com>
1560 * util/grub-probe.c (probe): Improve error message.
1562 2008-04-07 Robert Millan <rmh@aybabtu.com>
1564 * util/biosdisk.c (read_device_map): Skip devices that don't exist
1565 (this prevents the presence of a bogus entry from ruining the whole
1568 2008-04-06 Pavel Roskin <proski@gnu.org>
1570 * util/biosdisk.c: Include grub/util/biosdisk.h.
1571 * util/grub-fstest.c (execute_command): Make static.
1572 * util/grub-mkdevicemap.c (check_device): Likewise.
1573 * util/i386/pc/misc.c: Include grub/machine/init.h.
1574 * util/powerpc/ieee1275/misc.c: Likewise.
1575 * util/lvm.c: Include grub/util/lvm.h.
1576 * util/misc.c: Include grub/kernel.h, grub/misc.h and
1578 * util/raid.c: Include grub/util/raid.h.
1579 (grub_util_getdiskname): Make static.
1581 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
1582 grub_hostfs_fini(), as they are called from grub_init_all() and
1583 grub_fini_all() respectively. This fixes an infinite loop in
1584 grub-fstest due to double registration of hostfs.
1585 Reported by Christian Franke <Christian.Franke@t-online.de>
1587 2008-04-05 Pavel Roskin <proski@gnu.org>
1589 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
1590 all 8 functions. Otherwise, probe function 0 only.
1592 2008-04-04 Pavel Roskin <proski@gnu.org>
1594 * commands/lspci.c (grub_lspci_iter): Print the bus number
1597 * commands/lspci.c (grub_pci_classes): Fix typos.
1598 (grub_lspci_iter): Don't print func twice. Print vendor ID
1599 before device ID, as it's normally done.
1601 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
1602 Fix signedness warnings.
1603 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
1605 * util/ieee1275/get_disk_name.c: Include config.h so that
1606 _GNU_SOURCE is defined and getline() is declared. Mark an
1607 unused argument as such. Fix a signedness warning.
1609 2008-04-02 Pavel Roskin <proski@gnu.org>
1611 * genkernsyms.sh.in: Use more robust assignments for CC and
1612 srcdir. Quote srcdir.
1613 * gensymlist.sh.in: Likewise. Assert at the compile time that
1614 the symbol table is not empty.
1616 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
1617 * fs/cpio.c (grub_cpio_read): Likewise.
1619 2008-04-01 Pavel Roskin <proski@gnu.org>
1621 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
1622 * disk/host.c (grub_host_open): Likewise.
1623 * disk/loopback.c (grub_loopback_open): Likewise.
1624 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
1625 disk->id as in disk/host.c, not a multi-character constant.
1627 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
1628 later is obsolete, potentially dangerous and sets a bad example.
1629 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
1630 * util/misc.c (grub_util_get_image_size): Likewise.
1632 * disk/loopback.c (options): Improve help for "--partitions".
1634 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
1635 options to align them with the short options, e.g. "echo -e".
1637 2008-03-31 Bean <bean123ch@gmail.com>
1639 * video/reader/png.c (grub_png_data): New member is_16bit and
1641 (grub_png_decode_image_header): Detect 16 bit png image.
1642 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
1643 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
1644 (grub_video_reader_png): Release memory occupied by image_data.
1646 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
1648 (grub_nfs_mount): Skip the test for sector per cluster.
1650 * include/grub/ntfs.h (MAX_SPC): Removed.
1652 2008-03-31 Bean <bean123ch@gmail.com>
1654 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
1655 (grub_probe_SOURCES): Add fs/afs.c.
1656 (grub_fstest_SOURCES): Likewise.
1657 (afs_mod_SOURCES): New variable.
1658 (afs_mod_CFLAGS): Likewise.
1659 (afs_mod_LDFLAGS): Likewise.
1661 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
1662 (grub_emu_SOURCES): Likewise.
1664 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1666 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1668 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1670 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1672 * fs/afs.c: New file.
1674 2008-03-30 Pavel Roskin <proski@gnu.org>
1676 * disk/host.c: Include grub/misc.h to fix a warning.
1677 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
1678 warnings about implicit declarations.
1680 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
1682 * include/grub/i386/loader.h: Change declaration of
1683 grub_linux_boot() to match what grub_loader_set() expects.
1684 * util/getroot.c (grub_guess_root_device): Return const char* to
1686 * util/grub-probe.c (probe): Fix a warning about uninitialized
1687 abstraction_name variable.
1688 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
1689 second argument as unused to fix a warning.
1691 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
1692 missing grub_error() call.
1694 * util/update-grub_lib.in: Define datarootdir, since Autoconf
1695 2.60 and newer uses it to define datadir.
1697 * commands/sleep.c: Fix warning about implicit declaration.
1698 * disk/memdisk.c: Likewise.
1699 * loader/aout.c: Likewise.
1700 * loader/i386/bsd_normal.c: Likewise.
1701 * util/grub-probe.c: Likewise.
1703 * commands/i386/cpuid.c (has_longmode): Make static.
1704 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
1705 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
1707 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
1708 GDT. This is more robust, as %ds can change.
1709 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
1710 calling real_to_prot().
1711 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
1713 2008-03-28 Pavel Roskin <proski@gnu.org>
1715 * kern/i386/pc/startup.S: Assert that uncompressed functions
1716 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
1717 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
1718 code, as they push parts of the code (error handlers) beyond
1719 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
1720 code as correctness and size.
1722 2008-03-28 Pavel Roskin <proski@gnu.org>
1724 * kern/i386/pc/startup.S
1725 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
1726 data block address to the real mode, keep offset minimal. This
1727 works around a bug in AWARD BIOS on old Athlon systems, which
1728 makes CD detection hang.
1730 2008-03-26 Pavel Roskin <proski@gnu.org>
1732 * normal/color.c (grub_parse_color_name_pair): Make `name' a
1734 * include/grub/normal.h: Add grub_parse_color_name_pair()
1737 2008-03-24 Bean <bean123ch@gmail.com>
1739 * disk/i386/pc/biosdisk.c (cd_start): Removed.
1740 (cd_count): Removed.
1741 (cd_drive): New variable.
1742 (grub_biosdisk_get_drive): Don't check for (cdN) device.
1743 (grub_biosdisk_call_hook): Likewise.
1744 (grub_biosdisk_iterate): Change cdrom detection method.
1745 (grub_biosdisk_open): Replace cd_start with cd_drive.
1746 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
1747 detect cdrom device.
1749 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
1751 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
1752 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
1753 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
1754 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
1755 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
1756 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
1757 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
1758 (grub_biosdisk_cdrp): New structure.
1759 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
1761 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
1763 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
1766 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
1769 2008-03-20 Robert Millan <rmh@aybabtu.com>
1771 Remove 2 TiB limit in ata.mod.
1772 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
1773 (grub_ata_dumpinfo): Print sector count with 0x%llx.
1774 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
1775 grub_uint64_t instead of grub_uint32_t.
1777 2008-03-05 Bean <bean123ch@gmail.com>
1779 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
1780 (grub_multiboot): Set boot device.
1782 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
1784 2008-03-02 Bean <bean123ch@gmail.com>
1786 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
1789 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
1791 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
1794 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
1797 * docs/fdl.texi: New file.
1799 * docs/mdate-sh: New file. Copied from gnulib.
1800 * docs/texinfo.tex: Likewise.
1802 * config.guess: Updated from gnulib.
1803 * install-sh: Likewise.
1805 2008-02-28 Robert Millan <rmh@aybabtu.com>
1807 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
1808 (aout_mod_SOURCES): New variable.
1809 (aout_mod_CFLAGS): Likewise.
1810 (aout_mod_LDFLAGS): Likewise.
1812 * conf/i386-ieee1275.rmk: Likewise.
1814 2008-02-28 Robert Millan <rmh@aybabtu.com>
1816 * util/update-grub.in: Reorganise terminal validity check. Accept
1817 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
1818 Based on suggestion by Franklin PIAT.
1820 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
1822 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
1824 * util/getroot.c (grub_util_check_block_device): New function that
1825 returns the given argument if it is a block device and returns NULL else.
1826 * util/grub-probe.c (argument_is_device): New variable.
1827 (probe): Promote device_name from a variable to an argument. Receive
1828 device_name from grub_util_check_block_device() if path is NULL and from
1829 grub_guess_root_device() else. Do not free() device_name anymore.
1830 (options): Introduce new parameter '-d, --device'.
1831 (main): Add description of the new parameter to the help screen.
1832 Rename path variable to argument. Set argument_is_device if the '-d'
1833 option is given. Pass argument to probe() depending on
1836 2008-02-24 Bean <bean123ch@gmail.com>
1838 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
1839 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
1840 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
1841 (GRUB_ISO9660_VOLDESC_PART): Likewise.
1842 (GRUB_ISO9660_VOLDESC_END): Likewise.
1843 (grub_iso9660_primary_voldesc): New member escape.
1844 (grub_iso9660_data): New member joliet.
1845 (grub_iso9660_convert_string): New function.
1846 (grub_iso9660_mount): Detect joliet extension.
1847 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
1848 (grub_iso9660_iso9660_label): Likewise.
1850 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
1851 (grub_setup_SOURCES): Add fs/udf.c.
1852 (grub_fstest_SOURCES): Likewise.
1853 (udf_mod_SOURCES): New variable.
1854 (udf_mod_CFLAGS): Likewise.
1855 (udf_mod_LDFLAGS): Likewise.
1857 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
1858 (grub_emu_SOURCES): Likewise.
1860 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1862 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1864 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1866 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1868 * fs/udf.c: New file.
1870 2008-02-24 Robert Millan <rmh@aybabtu.com>
1872 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
1873 (normal/lexer.c_DEPENDENCIES): New variables.
1874 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1875 (normal/lexer.c_DEPENDENCIES): Likewise.
1876 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
1877 (normal/lexer.c_DEPENDENCIES): Likewise.
1878 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
1879 (normal/lexer.c_DEPENDENCIES): Likewise.
1880 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1881 (normal/lexer.c_DEPENDENCIES): Likewise.
1882 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1883 (normal/lexer.c_DEPENDENCIES): Likewise.
1885 2008-02-23 Robert Millan <rmh@aybabtu.com>
1887 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
1888 since they were intended to be in hex. This didn't break previously
1889 because of a bug in gpt_partition_map_iterate() (see below).
1891 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
1892 when checking the validity of GPT header.
1893 Remove `partno', since it always provides the same information as `i'.
1895 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
1897 * include/grub/efi/time.h: Fix a wrong comment.
1899 2008-02-19 Pavel Roskin <proski@gnu.org>
1901 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
1904 2008-02-19 Bean <bean123ch@gmail.com>
1906 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
1907 (aout_mod_SOURCES): New variable.
1908 (aout_mod_CFLAGS): Likewise.
1909 (aout_mod_LDFLAGS): Likewise.
1910 (_bsd_mod_SOURCES): New variable.
1911 (_bsd_mod_CFLAGS): Likewise.
1912 (_bsd_mod_LDFLAGS): Likewise.
1913 (bsd_mod_SOURCES): New variable.
1914 (bsd_mod_CFLAGS): Likewise.
1915 (bsd_mod_LDFLAGS): Likewise.
1917 * include/grub/aout.h: New file.
1919 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
1921 * include/grub/i386/bsd.h: New file.
1923 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
1926 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
1927 function is called, so that it's possible to change it inside the hook.
1928 (grub_elf64_load): Likewise.
1929 (grub_elf_file): Don't close the file if elf header is not found.
1930 (grub_elf_close): Close the file if grub_elf_file fails (The new
1931 grub_elf_file won't close it).
1932 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
1933 (grub_elf64_size): Likewise.
1935 * kern/i386/loader.S (grub_unix_real_boot): New function.
1937 * loader/aout.c: New file.
1939 * loader/i386/bsd.c: New file.
1941 * loader/i386/bsd_normal.c: New file.
1943 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
1945 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
1946 can test other formats.
1948 2008-02-19 Robert Millan <rmh@aybabtu.com>
1950 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
1951 (grub_gpt_partition_type_empty): Redefine with macro from
1952 `<grub/gpt_partition.h>'.
1953 (gpt_partition_map_iterate): Adjust partition type comparison.
1955 Export `entry' as partmap-specific `part.data' struct.
1956 (grub_gpt_header, grub_gpt_partentry): Move from here ...
1958 * include/grub/gpt_partition.h (grub_gpt_header)
1959 (grub_gpt_partentry): ... to here (new file).
1961 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
1963 (grub_gpt_partition_type_bios_boot): New const variable, defined
1964 with macro from `<grub/gpt_partition.h>'.
1966 (setup): Replace `first_start' with `embed_region', which keeps
1967 track of the embed region (and is partmap-agnostic).
1969 Replace find_first_partition_start() with find_usable_region(),
1970 which finds a usable region for embedding using partmap-specific
1971 knowledge (supports PC/MSDOS and GPT).
1973 Fix all assumptions that the embed region start at sector 1, using
1974 `embed_region.start' from now on. Similarly, use `embed_region.end'
1975 rather than `first_start' to calculate available size.
1977 In grub_util_info() message, replace "into after the MBR" with an
1978 indication of the specific sector our embed region starts at.
1980 2008-02-19 Robert Millan <rmh@aybabtu.com>
1982 * DISTLIST: Replace `commands/ieee1275/halt.c' and
1983 `commands/ieee1275/reboot.c' with `commands/halt.c' and
1984 `commands/reboot.c'.
1985 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1986 (halt_mod_SOURCES): Likewise.
1987 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
1988 (halt_mod_SOURCES): Likewise.
1990 2008-02-17 Christian Franke <franke@computer.org>
1992 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
1994 2008-02-17 Robert Millan <rmh@aybabtu.com>
1996 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
1997 set `first_start' to 0 for non-PC/MSDOS partition maps.
1999 2008-02-16 Robert Millan <rmh@aybabtu.com>
2001 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2002 do not assume partition map is PC/MSDOS before performing checks that
2003 are specific to that layout.
2005 2008-02-13 Robert Millan <rmh@aybabtu.com>
2007 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2008 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2009 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2011 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
2013 * configure.ac: Only a cosmetic change on the handling of
2014 -fno-stack-protector.
2016 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
2018 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2019 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2021 (grub_install_SOURCES): Add halt.mod and reboot.mod.
2022 (halt_mod_SOURCES): New variable.
2023 (halt_mod_CFLAGS): Likewise.
2024 (halt_mod_LDFLAGS): Likewise.
2025 (reboot_mod_SOURCES): Likewise.
2026 (reboot_mod_CFLAGS): Likewise.
2027 (reboot_mod_LDFLAGS): Likewise.
2029 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2030 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2032 (halt_mod_SOURCES): Likewise.
2033 (reboot_mod_SOURCES): Likewise.
2035 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2036 commands/i386/pc/reboot.c by commands/reboot.c.
2037 (reboot_mod_SOURCES): Likewise.
2039 * commands/i386/pc/reboot.c: merge this file ...
2041 * commands/ieee1275/reboot.c: ... and this file ...
2043 * commands/reboot.c: ... to this file.
2044 Add some precompiler directive to include the correct header for
2047 * commands/ieee1275/halt.c: move this file ...
2049 * commands/halt.c: ... to here.
2050 Add some precompiler directive to include the correct header for
2053 * include/grub/efi/efi.h (grub_reboot): New function declaration.
2054 (grub_halt): Likewise.
2056 * kern/efi/efi.c (grub_reboot): New function.
2057 (grub_halt): Likewise.
2059 2008-02-12 Robert Millan <rmh@aybabtu.com>
2061 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2062 /dev (like it is done for /dev/mapper). This doesn't provide support
2063 for EVMS, but at least it is now easy to identify the problem when it
2066 2008-02-11 Robert Millan <rmh@aybabtu.com>
2068 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2069 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2070 comparing it with -1, not 0.
2072 2008-02-10 Robert Millan <rmh@aybabtu.com>
2074 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2076 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2077 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2079 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2080 `disk/lvm.c' to the end of the list.
2081 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2082 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2084 2008-02-10 Robert Millan <rmh@aybabtu.com>
2086 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
2087 grub_print_error() instead. This will let user know why we're entering
2089 Based on suggestions from Sam Morris.
2091 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
2093 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2094 on remaining N args, instead of "--" arg N times.
2096 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
2098 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2099 (fill_with_default_glyph): Changed to use unknown_glyph for fill
2100 pattern for unknown glyphs.
2102 2008-02-09 Robert Millan <rmh@aybabtu.com>
2104 * configure.ac: Probe for `help2man'.
2105 * Makefile.in (builddir): New variable.
2106 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
2107 or otherwise add a few flags/options to it.
2108 (install-local): For every executable utility or script that is
2109 installed, invoke $(HELP2MAN) to install a manpage based on --help
2112 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2113 that it doesn't prevent --help from working in build tree.
2115 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2116 with `bug-grub@gnu.org'.
2117 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2118 * util/update-grub.in (usage): New function.
2119 Implement proper argument check, with support for --help and --version
2120 (as well as existing -y).
2122 2008-02-09 Christian Franke <franke@computer.org>
2124 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2125 avoid overwriting previous output.
2126 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2128 2008-02-09 Robert Millan <rmh@aybabtu.com>
2130 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2133 2008-02-09 Robert Millan <rmh@aybabtu.com>
2135 * commands/sleep.c: New file.
2136 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2137 (sleep_mod_SOURCES): New variable.
2138 (sleep_mod_CFLAGS): Likewise.
2139 (sleep_mod_LDFLAGS): Likewise.
2141 2008-02-09 Robert Millan <rmh@aybabtu.com>
2143 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2144 situations in which we can deduce the RAID size and the superblock
2147 2008-02-09 Robert Millan <rmh@aybabtu.com>
2149 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
2150 and return a grub_diskmemberlist_t composed of LVM physical volumes.
2151 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2153 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
2154 and return a grub_diskmemberlist_t composed of physical array members.
2155 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2157 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2159 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2160 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2161 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2163 * util/grub-probe.c (probe): Move partmap probing code from here ...
2164 (probe_partmap): ... to here.
2165 (probe): Use probe_partmap() once for the disk we're probing, and
2166 additionally, when such disk contains a memberlist() struct member,
2167 once for each disk that is contained in the structure returned by
2170 2008-02-09 Robert Millan <rmh@aybabtu.com>
2172 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2173 environment variable to 'all' in order to obtain debug output from
2175 * util/i386/pc/grub-setup.c (main): Likewise.
2177 2008-02-08 Robert Millan <rmh@aybabtu.com>
2179 * disk/raid.c (grub_raid_scan_device): Check for
2180 `array->device[sb.this_disk.number]' rather than for
2181 `array->device[sb.this_disk.number]->name', since the latter is not
2182 guaranteed to be accessible.
2184 2008-02-08 Robert Millan <rmh@aybabtu.com>
2186 * disk/raid.c: Update copyright.
2187 * fs/cpio.c: Likewise.
2188 * include/grub/raid.h: Likewise.
2189 * loader/i386/pc/multiboot.c: Likewise.
2190 * util/hostfs.c: Likewise.
2192 2008-02-08 Robert Millan <rmh@aybabtu.com>
2194 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
2195 to a grub_disk_t array.
2196 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
2198 (grub_raid_scan_device): Replace `device[x].name' accesses with
2199 `device[x]->name'. Simplify initialization of `array->device[x]'.
2201 2008-02-08 Robert Millan <rmh@aybabtu.com>
2203 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
2204 grub_dprintf() calls.
2205 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
2208 2008-02-07 Christian Franke <franke@computer.org>
2210 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
2211 instead of fseek and ftell to support large files.
2212 (grub_hostfs_read): Likewise.
2214 2008-02-07 Robert Millan <rmh@aybabtu.com>
2216 Patch from Jeroen Dekkers.
2217 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
2218 failure, since successfully reading all array members might not be
2221 2008-02-06 Robert Millan <rmh@aybabtu.com>
2223 * util/grub-probe.c (probe): Simplify partmap probing (with the
2224 assumption that the first word up to the underscore equals to
2227 2008-02-06 Christian Franke <franke@computer.org>
2229 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
2230 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
2231 last block of a cpio or tar stream.
2232 Check for "TRAILER!!!" instead of any empty data
2233 block to detect last block of a cpio stream.
2234 (grub_cpio_dir): Fix constness of variable np.
2235 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
2236 cpio or tar trailer is detected. This fixes a crash
2237 on open of a non existing file.
2239 2008-02-05 Bean <bean123ch@gmail.com>
2241 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
2243 (grub_multiboot_load_elf64): Likewise.
2244 (grub_multiboot): Initialize mbi structure.
2246 * util/grub-fstest.c: Don't include unused header file script.h.
2248 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
2250 (grub_fstest_SOURCES): Likewise.
2252 2008-02-05 Robert Millan <rmh@aybabtu.com>
2254 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
2255 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
2256 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
2257 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
2259 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
2260 (translation_table): Replace hardcoded values with macros
2261 provided by `<grub/term.h>'.
2263 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
2264 (keyboard_map): Correct/add a few values, with macros provided
2266 (keyboard_map_shift): Zero values that don't differ from their
2267 `keyboard_map' equivalents.
2268 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
2269 Discard the second scan code that is always sent by Caps lock.
2270 Only use `keyboard_map_shift' when it provides a non-zero value,
2271 otherwise fallback to `keyboard_map'.
2273 2008-02-04 Bean <bean123ch@gmail.com>
2275 * Makefile.in (enable_grub_fstest): New variable.
2277 * conf/common.rmk (grub_fstest_init.lst): New rule.
2278 (grub_fstest_init.h): Likewise.
2279 (grub_fstest_init.c): Likewise.
2280 (util/grub-fstest.c_DEPENDENCIES): New variable.
2281 (grub_fstest_SOURCES): Likewise.
2283 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
2285 * util/grub-fstest.c: New file.
2287 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2289 Make grub-setup handle a separate root device.
2291 * util/i386/pc/grub-setup.c (setup): Always open the root device,
2292 so that the root device can be compared with the destination
2294 When embedding the core image, if the root and destination devices
2295 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
2297 When not embedding, set ROOT_DRIVE to 0xFF.
2299 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2301 Add support for having a grub directory in a different drive. This
2302 is still only the data handling part.
2304 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
2305 (codestart): Save %dh in GRUB_ROOT_DRIVE.
2306 (grub_root_drive): New variable.
2308 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
2309 instead of GRUB_BOOT_DRIVE to construct a device name. Set
2310 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
2313 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
2315 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
2317 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
2319 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
2320 is bogus, because PXE booting does not specify any drive
2323 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
2324 am not sure if this is really correct.
2326 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
2327 is always identical to the boot drive when booting from a CD.
2329 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
2331 (root_drive): New variable.
2332 (real_start): Unconditionally set %dh to ROOT_DRIVE.
2333 (setup_sectors): Push %dx right after popping it, because %dh will
2335 (copy_buffer): Restore %dx.
2337 2008-02-03 Robert Millan <rmh@aybabtu.com>
2339 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
2340 use `cdboot.img' for cdrom images.
2342 2008-02-03 Robert Millan <rmh@aybabtu.com>
2344 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
2345 only setup gfxterm when `font' command has succeeded.
2347 2008-02-03 Robert Millan <rmh@aybabtu.com>
2349 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
2350 (grub_rescue_cmd_multiboot_loader)
2351 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
2353 2008-02-03 Pavel Roskin <proski@gnu.org>
2355 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
2356 %edx and %esi from stack only after grub_gate_a20() is called.
2357 grub_gate_a20() clobbers %edx.
2359 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2361 * configure.ac (AC_INIT): Bumped to 1.96.
2363 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
2364 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
2365 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
2366 video/readers/png.c.
2368 2008-02-03 Bean <bean123ch@gmail.com>
2370 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
2371 (cdboot_img_SOURCES): New variable.
2372 (cdboot_img_ASFLAGS): New variable.
2373 (cdboot_img_LDFLAGS): New variable.
2375 * boot/i386/pc/cdboot.S: New file.
2377 * disk/i386/pc/biosdisk.c (cd_start): New variable.
2378 (cd_count): Likewise.
2379 (grub_biosdisk_get_drive): Add support for cd device.
2380 (grub_biosdisk_call_hook): Likewise.
2381 (grub_biosdisk_iterate): Likewise.
2382 (grub_biosdisk_open): Likewise.
2383 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
2384 (grub_biosdisk_rw): Support reading from cd device.
2385 (GRUB_MOD_INIT): Iterate cd devices.
2387 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
2388 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
2389 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
2391 * kern/i386/pc/init.c (make_install_device): Check for cd device.
2393 2008-02-02 Robert Millan <rmh@aybabtu.com>
2395 * commands/read.c: New file.
2396 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
2397 (read_mod_SOURCES): New variable.
2398 (read_mod_CFLAGS): Likewise.
2399 (read_mod_LDFLAGS): Likewise.
2401 2008-02-02 Robert Millan <rmh@aybabtu.com>
2403 * normal/main.c (grub_normal_execute): Check for `menu->size' when
2404 determining whether menu has to be displayed.
2406 2008-02-02 Marco Gerards <marco@gnu.org>
2408 * bus/pci.c: New file.
2410 * include/grub/pci.h: Likewise.
2412 * include/grub/i386/pc/pci.h: Likewise.
2414 * commands/lspci.c: Likewise.
2416 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
2418 (pci_mod_SOURCES): New variable.
2419 (pci_mod_CFLAGS): Likewise.
2420 (pci_mod_LDFLAGS): Likewise.
2421 (lspci_mod_SOURCES): Likewise.
2422 (lspci_mod_CFLAGS): Likewise.
2423 (lspci_mod_LDFLAGS): Likewise.
2425 2008-02-02 Bean <bean123ch@gmail.com>
2427 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
2428 (grub_ufs_get_file_block): Fix indirect block calculation problem.
2430 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
2431 (grub_xfs_btree_node): New structure.
2432 (grub_xfs_btree_root): New structure.
2433 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
2434 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
2435 (GRUB_XFS_EXTENT_BLOCK): Likewise.
2436 (GRUB_XFS_EXTENT_SIZE): Likewise.
2437 (grub_xfs_read_block): Support btree format type.
2438 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
2439 Use directory block as basic unit.
2441 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
2443 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
2444 __attribute__ ((__regparm__ (1))).
2446 2008-02-01 Robert Millan <rmh@aybabtu.com>
2448 Correct a mistake in previous commit.
2450 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
2452 (normal/command.c_DEPENDENCIES): New variable.
2454 2008-02-01 Robert Millan <rmh@aybabtu.com>
2456 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
2458 (normal/command.c_DEPENDENCIES): New variable.
2459 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
2460 * conf/i386-ieee1275.rmk: Likewise.
2461 * conf/i386-linuxbios.rmk: Likewise.
2462 * conf/i386-pc.rmk: Likewise.
2463 * conf/sparc64-ieee1275.rmk: Likewise.
2464 * conf/powerpc-ieee1275.rmk: Likewise.
2465 (grub_emu_SOURCES): Add `fs/fshelp.c'.
2467 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2469 2008-02-01 Robert Millan <rmh@aybabtu.com>
2471 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
2472 call at beginning of function.
2474 2008-01-31 Pavel Roskin <proski@gnu.org>
2476 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
2477 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
2478 (grub_mkrescue_SOURCES): Likewise.
2479 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
2481 2008-01-30 Robert Millan <rmh@aybabtu.com>
2483 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
2484 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
2485 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
2486 (grub_probe_SOURCES): ... to here.
2488 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
2489 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
2490 * conf/i386-ieee1275.rmk: Likewise.
2491 * conf/i386-linuxbios.rmk: Likewise.
2492 * conf/powerpc-ieee1275.rmk: Likewise.
2494 2008-01-30 Tristan Gingold <gingold@free.fr>
2496 * kern/rescue.c: Silently accept empty lines.
2498 2008-01-29 Bean <bean123ch@gmail.com>
2500 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
2501 (real_code_2): Code cleanup and change comment style.
2502 (move_memory): Avoid using 32-bit address mode.
2504 2008-01-29 Bean <bean123ch@gmail.com>
2506 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
2507 (png_mod_SOURCES): New variable.
2508 (png_mod_CFLAGS): Likewise.
2509 (png_mod_LDFLAGS): Likewise.
2511 * video/readers/png.c: New file.
2513 2008-01-28 Robert Millan <rmh@aybabtu.com>
2515 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
2516 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
2517 `ifndef GRUB_MOD_GAP' hack.
2518 * util/elf/grub-mkimage.c (add_segments): Likewise.
2520 2008-01-27 Robert Millan <rmh@aybabtu.com>
2522 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
2523 `GRUB_MOD_GAP' for platforms in which it's not defined.
2524 * util/elf/grub-mkimage.c (add_segments): Likewise.
2526 2008-01-27 Robert Millan <rmh@aybabtu.com>
2528 Get grub-emu to build again (including parallel builds).
2530 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
2532 (util/grub-emu.c_DEPENDENCIES): ... this, ...
2533 (normal/execute.c_DEPENDENCIES): ... this, ...
2534 (grub-emu_DEPENDENCIES): ... and this.
2536 * conf/i386-efi.rmk: Likewise.
2537 * conf/i386-linuxbios.rmk: Likewise.
2538 * conf/i386-ieee1275.rmk: Likewise.
2539 * conf/powerpc-ieee1275.rmk: Likewise.
2540 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
2542 2008-01-27 Robert Millan <rmh@aybabtu.com>
2544 * NEWS: Add a few items.
2546 2008-01-27 Robert Millan <rmh@aybabtu.com>
2548 Fix parallel builds with grub-emu. Based on earlier commit for
2549 grub-probe and grub-setup.
2551 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2552 (util/grub-emu.c_DEPENDENCIES): ... this.
2553 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2554 (util/grub-emu.c_DEPENDENCIES): ... this.
2555 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2556 (util/grub-emu.c_DEPENDENCIES): ... this.
2557 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2558 (util/grub-emu.c_DEPENDENCIES): ... this.
2559 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2560 (util/grub-emu.c_DEPENDENCIES): ... this.
2562 2008-01-27 Pavel Roskin <proski@gnu.org>
2564 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
2565 to create a gap between _end and the modules added to the image
2566 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
2567 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
2568 * util/elf/grub-mkimage.c (add_segments): Likewise.
2570 2008-01-26 Pavel Roskin <proski@gnu.org>
2572 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
2573 just return an error.
2575 2008-01-26 Bean <bean123ch@gmail.com>
2577 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
2578 (grub_reiserfs_get_item): Save offset of the next item.
2579 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
2581 2008-01-25 Robert Millan <rmh@aybabtu.com>
2583 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
2584 make all filesystem sources appear together (possibly fixing omissions
2586 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2587 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2588 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2589 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2591 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
2593 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
2594 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2595 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
2596 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2598 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
2599 (probe): Add a sanity check to make sure of our ability to read
2600 requested files when probing for filesystem type.
2602 * genmk.rb: Update copyright year (2007).
2604 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
2605 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
2606 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
2607 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
2608 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
2609 : Remove function prototypes.
2611 2008-01-25 Robert Millan <rmh@aybabtu.com>
2613 Revert my previous commits (based on wrong assumption of how grub_errno
2616 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
2617 * kern/file.c (grub_file_open): Likewise.
2619 2008-01-24 Pavel Roskin <proski@gnu.org>
2621 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
2622 that hang if GRUB tries to setup colors.
2623 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
2624 colors for firmwares that don't support it.
2625 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
2626 Recognize Open Hack'Ware, set flags to work around its
2629 2008-01-24 Robert Millan <rmh@aybabtu.com>
2631 * kern/file.c (grub_file_open): Do not account previous failures of
2632 unrelated functions when grub_errno is checked for.
2633 Reported by Oleg Strikov.
2635 2008-01-24 Bean <bean123ch@gmail.com>
2637 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
2638 (grub_ufs_sblock): New member volume name.
2639 (grub_ufs_find_file): Fix string copy bug.
2640 (grub_ufs_label): Implement this function properly.
2642 * fs/hfs.c (grub_hfs_cnid_type): New enum.
2643 (grub_hfs_iterate_records): Use the correct file number for extents
2644 and catalog file. Fix problem in next index calculation.
2645 (grub_hfs_find_node): Replace recursive function call with loop.
2646 (grub_hfs_iterate_dir): Replace recursive function call with loop.
2648 2008-01-23 Robert Millan <rmh@aybabtu.com>
2650 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
2651 `<grub/symbol.h>' and `<grub/multiboot.h>'.
2652 (grub_multiboot2_real_boot): New function prototype.
2654 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
2655 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
2657 * kern/i386/ieee1275/init.c (grub_os_area_addr)
2658 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
2660 2008-01-23 Robert Millan <rmh@aybabtu.com>
2662 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
2663 #ifdef'ed out grub_printf().
2665 2008-01-23 Robert Millan <rmh@aybabtu.com>
2667 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
2668 grub_dprintf calls, since they make "debug=all" mode unusable.
2669 (grub_console_checkkey): Likewise.
2671 2008-01-23 Robert Millan <rmh@aybabtu.com>
2673 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2674 `term/i386/pc/at_keyboard.c'.
2675 (pkglib_MODULES): Add `serial.mod'.
2676 (serial_mod_SOURCES): New variable.
2677 (serial_mod_CFLAGS): Likewise.
2678 (serial_mod_LDFLAGS): Likewise.
2680 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
2681 `<grub/powerpc/ieee1275/console.h>'.
2682 (grub_keyboard_controller_init): New function prototype.
2683 (grub_console_checkkey): Likewise.
2684 (grub_console_getkey): Likewise.
2686 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
2689 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
2690 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
2692 2008-01-23 Robert Millan <rmh@aybabtu.com>
2694 * kern/i386/pc/init.c (make_install_device): When memdisk image is
2695 present, "(memdisk)/boot/grub" becomes the default prefix.
2697 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
2698 a memdisk tarball with all the modules. Add --overlay=DIR option that
2699 allows users to overlay additional files into the image.
2701 2008-01-23 Robert Millan <rmh@aybabtu.com>
2703 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
2704 and `machine/memory.h'.
2705 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
2706 (_multiboot_mod_SOURCES): New variable.
2707 (_multiboot_mod_CFLAGS): Likewise.
2708 (_multiboot_mod_LDFLAGS): Likewise.
2709 (multiboot_mod_SOURCES): Likewise.
2710 (multiboot_mod_CFLAGS): Likewise.
2711 (multiboot_mod_LDFLAGS): Likewise.
2713 * include/grub/i386/ieee1275/loader.h: New file.
2715 * include/grub/i386/ieee1275/machine.h: Likewise.
2717 * include/grub/i386/ieee1275/memory.h: Likewise.
2719 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
2720 variable declaration.
2721 (grub_os_area_size): Likewise.
2723 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
2724 (grub_lower_mem, grub_upper_mem): New variables.
2725 (grub_stop_floppy): New function (just to make
2726 grub_multiboot2_real_boot() happy).
2728 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
2729 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
2730 (grub_stop): New function.
2731 Include `"../realmode.S"' and `"../loader.S"'.
2733 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
2734 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
2736 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
2737 rely on grub_multiboot2_real_boot() for final boot.
2739 2008-01-22 Robert Millan <rmh@aybabtu.com>
2741 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
2742 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
2743 device that doesn't look like an SD card.
2744 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2745 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
2746 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
2747 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
2750 2008-01-22 Robert Millan <rmh@aybabtu.com>
2752 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
2753 avoid claiming over our own code.
2755 2008-01-22 Bean <bean123ch@gmail.com>
2757 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
2758 (jpeg_mod_SOURCES): New variable.
2759 (jpeg_mod_CFLAGS): Likewise.
2760 (jpeg_mod_LDFLAGS): Likewise.
2762 * video/readers/jpeg.c : New file.
2764 2008-01-22 Bean <bean123ch@gmail.com>
2766 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
2767 there are no more items.
2769 2008-01-21 Robert Millan <rmh@aybabtu.com>
2771 * kern/mm.c (grub_mm_init_region): Improve debug message.
2773 2008-01-21 Robert Millan <rmh@aybabtu.com>
2775 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
2776 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
2778 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
2780 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
2781 Indicates start of upper memory.
2782 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
2783 (generate_image): Abort when image size is big enough to corrupt
2786 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
2787 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
2788 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2789 instead of hardcoding 0xA0000.
2790 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
2791 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2792 instead of hardcoding 0xA0000.
2794 2008-01-21 Robert Millan <rmh@aybabtu.com>
2796 * disk/memdisk.c (memdisk_size): New variable.
2797 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
2799 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
2800 image to dynamic memory.
2801 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
2802 `memdisk_size'. Free memdisk block.
2804 2008-01-21 Robert Millan <rmh@aybabtu.com>
2806 Fix detection of very small filesystems (like tar).
2808 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
2809 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
2810 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
2811 a problem with this disk).
2813 2008-01-21 Robert Millan <rmh@aybabtu.com>
2815 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
2816 on grub_biosdisk_rw_standard() error.
2818 2008-01-21 Robert Millan <rmh@aybabtu.com>
2820 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
2822 * kern/elf.c: Likewise.
2823 * kern/ieee1275/ieee1275.c: Likewise.
2824 * kern/powerpc/ieee1275/openfw.c: Likewise.
2825 * term/ieee1275/ofconsole.c: Likewise.
2827 2008-01-21 Robert Millan <rmh@aybabtu.com>
2829 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
2831 * include/grub/kernel.h (grub_arch_memdisk_addr)
2832 (grub_arch_memdisk_size): Moved from here ...
2834 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
2835 (grub_arch_memdisk_size): ... to here.
2837 2008-01-21 Robert Millan <rmh@aybabtu.com>
2839 Mostly based on bugfix from Bean.
2841 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
2842 attribute with hook() parameter.
2843 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
2845 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
2846 attribute with hook() parameter.
2847 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
2850 2008-01-21 Robert Millan <rmh@aybabtu.com>
2852 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
2853 (pkglib_MODULES): Add `memdisk.mod'.
2854 (memdisk_mod_SOURCES): New variable.
2855 (memdisk_mod_CFLAGS): Likewise.
2856 (memdisk_mod_LDFLAGS): Likewise.
2858 * disk/memdisk.c: New file.
2860 * include/grub/disk.h (grub_disk_dev_id): Add
2861 `GRUB_DISK_DEVICE_MEMDISK_ID'.
2863 * include/grub/i386/pc/kernel.h
2864 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
2865 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
2866 (grub_kernel_image_size): New variable declaration.
2867 (grub_total_module_size): Likewise.
2868 (grub_memdisk_image_size): Likewise.
2870 * include/grub/i386/pc/memory.h
2871 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
2873 * include/grub/kernel.h: Include `<grub/symbol.h>'.
2874 (grub_arch_memdisk_addr): New variable declaration.
2875 (grub_arch_memdisk_size): Likewise.
2877 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
2878 (grub_arch_memdisk_size): Likewise.
2880 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
2881 (codestart): Replace hardcoded `0x100000' with
2882 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
2884 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
2885 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
2886 not NULL, append the contents of the file it refers to, at the end of
2887 the compressed kernel image. Initialize `grub_memdisk_image_size'
2888 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
2889 (options): Add "memdisk"|'m' option.
2890 (main): Parse --memdisk|-m option, and pass user-provided path as
2891 parameter to generate_image().
2893 2008-01-20 Robert Millan <rmh@aybabtu.com>
2895 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
2896 grub_dprintf() calls from here ...
2897 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
2899 2008-01-20 Robert Millan <rmh@aybabtu.com>
2901 Fix detection of "real mode" when /options/real-mode? doesn't exist.
2903 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
2905 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
2906 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
2907 `GRUB_IEEE1275_FLAG_REAL_MODE'.
2908 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
2910 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
2911 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
2913 2008-01-19 Robert Millan <rmh@aybabtu.com>
2915 Get rid of confusing function (superseded by
2916 `grub_ieee1275_get_integer_property')
2917 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
2919 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
2921 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
2922 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
2923 in native endianness from grub_ieee1275_get_integer_property().
2925 2008-01-19 Robert Millan <rmh@aybabtu.com>
2927 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
2928 command after "shut-down", since implementations differ on which
2929 the command for halt is.
2931 2008-01-19 Robert Millan <rmh@aybabtu.com>
2933 * include/grub/i386/linuxbios/console.h: Add header protection.
2934 (grub_keyboard_controller_init): New function prototype.
2935 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
2936 (KEYBOARD_COMMAND_READ): Likewise.
2937 (KEYBOARD_COMMAND_WRITE): Likewise.
2938 (KEYBOARD_SCANCODE_SET1): Likewise.
2939 (grub_keyboard_controller_write): New function.
2940 (grub_keyboard_controller_read): Likewise.
2941 (grub_keyboard_controller_init): Likewise.
2943 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
2944 (grub_console_init): On coreboot/LinuxBIOS, call
2945 grub_keyboard_controller_init().
2947 2008-01-19 Robert Millan <rmh@aybabtu.com>
2949 PowerPC changes provided by Pavel Roskin.
2951 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
2952 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
2953 don't rely on cmain() doing it.
2954 * kern/i386/ieee1275/startup.S (_start): Store %eax in
2955 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
2957 2008-01-16 Robert Millan <rmh@aybabtu.com>
2959 * include/grub/i386/linuxbios/memory.h
2960 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
2961 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
2962 receive `table_header' as argument. Instead, probe for it in the
2963 known memory ranges where it can be present.
2964 (grub_available_iterate): Do not pass a fixed `table_header' address
2965 to grub_linuxbios_table_iterate().
2967 2008-01-15 Robert Millan <rmh@aybabtu.com>
2969 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
2970 * conf/i386-ieee1275.rmk: New file.
2971 * include/grub/i386/ieee1275/console.h: Likewise.
2972 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
2973 * include/grub/i386/ieee1275/kernel.h: Likewise.
2974 * include/grub/i386/ieee1275/time.h: Likewise.
2975 * kern/i386/ieee1275/init.c: Likewise.
2976 * kern/i386/ieee1275/startup.S: Likewise.
2978 2008-01-15 Robert Millan <rmh@aybabtu.com>
2980 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
2981 when pointers are 32-bit (but still do set it to one when they are
2984 2008-01-15 Robert Millan <rmh@aybabtu.com>
2986 * include/grub/ieee1275/ieee1275.h
2987 (grub_ieee1275_get_integer_property): New function prototype.
2989 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
2990 (grub_ieee1275_get_integer_property): New function. Wraps around
2991 grub_ieee1275_get_property() to handle endianness.
2993 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
2994 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
2996 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
2997 (grub_map): Likewise.
2998 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3000 2008-01-15 Bean <bean123ch@gmail.com>
3002 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3003 (grub_script_execute_cmdline): Reset grub_errno.
3005 * normal/main.c (read_config_file): Reset grub_errno.
3007 * normal/parse.y (script_init): New.
3008 (script): Move function and menuentry here.
3010 (command): Add delimiter at the end of command.
3011 (commands): Adjust to match the new command.
3012 (commandblock): Remove grub_script_lexer_record_start.
3013 (menuentry): Add grub_script_lexer_record_start, use the new commands.
3014 (if): Use the new commands.
3016 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3018 2008-01-15 Robert Millan <rmh@aybabtu.com>
3020 * normal/menu.c (run_menu): Move timeout message from here ...
3021 (print_timeout): ... to here.
3022 (run_menu): Use print_timeout() once during initial draw to print
3023 the whole message, and again in every clock tick to update only
3024 the number of seconds.
3026 2008-01-15 Robert Millan <rmh@aybabtu.com>
3028 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3029 actual size of `available' from grub_ieee1275_get_property(), and
3030 restrict parsing to that bound.
3032 2008-01-15 Christian Franke <franke@computer.org>
3034 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3035 (argp_program_version): Remove variable.
3036 (argp_program_bug_address): Likewise.
3037 (options): Convert from struct argp_option to struct option.
3038 (struct arguments): Remove.
3039 (parse_opt): Remove.
3040 (usage): New function.
3041 (main): Replace struct args members by simple variables.
3042 Replace argp_parse() by getopt_long().
3043 Add switch to evaluate options.
3044 Add missing "(...)" around root_dev in prefix string.
3046 2008-01-14 Robert Millan <rmh@aybabtu.com>
3048 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3049 for grub_ieee1275_exit(), in order to improve portability.
3051 2008-01-14 Robert Millan <rmh@aybabtu.com>
3053 * util/grub.d/10_linux.in (prefix): Define.
3054 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
3056 2008-01-13 Pavel Roskin <proski@gnu.org>
3058 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3059 grub_errno if no errors have been detected.
3061 2008-01-12 Robert Millan <rmh@aybabtu.com>
3063 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3064 (grub_util_get_dev_abstraction): New function prototype.
3066 * util/getroot.c: Include `<grub/util/getroot.h>'
3067 (grub_util_get_grub_dev): Move detection of abstraction type to ...
3068 (grub_util_get_dev_abstraction): ... here (new function).
3070 * util/grub-probe.c: Convert PRINT_* to an enum. Add
3071 `PRINT_ABSTRACTION'.
3072 (probe): Probe for abstraction type when requested.
3073 (main): Understand `--target=abstraction'.
3075 * util/i386/efi/grub-install.in: Add abstraction module to core
3076 image when it is found to be necessary.
3077 * util/i386/pc/grub-install.in: Likewise.
3078 * util/powerpc/ieee1275/grub-install.in: Likewise.
3080 * util/update-grub_lib.in (font_path): Return system path without
3081 converting to GRUB path.
3082 * util/update-grub.in: Convert system path returned by font_path()
3083 to a GRUB path. Use `grub-probe -t abstraction' to determine what
3084 abstraction module is needed for loading fonts (if any). Export
3085 that as `GRUB_PRELOAD_MODULES'.
3086 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3089 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
3091 Remove some unused code from reiserfs.
3093 * fs/reiserfs.c (struct grub_reiserfs_key)
3094 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3095 (struct grub_reiserfs_node_body): Removed.
3096 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3098 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3100 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3102 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3104 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3106 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3108 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3109 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3110 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3112 2008-01-10 Robert Millan <rmh@aybabtu.com>
3114 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3115 Determines if a file is garbage left by packaging systems, etc.
3116 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3117 for processing /etc/grub.d scripts.
3118 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3119 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
3120 as a condition for processing Linux images.
3122 2008-01-10 Pavel Roskin <proski@gnu.org>
3124 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
3125 to compile reiserfs.c on PowerPC.
3127 2008-01-10 Robert Millan <rmh@aybabtu.com>
3129 * kern/device.c (grub_device_iterate): Do not abort device iteration
3130 when one of the devices cannot be opened.
3131 * kern/disk.c (grub_disk_open): Do not account previous failures of
3132 unrelated functions when grub_errno is checked for.
3134 2008-01-08 Robert Millan <rmh@aybabtu.com>
3136 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3137 `! grub_linux_is_bzimage', change order of address comparison to make
3138 it more intuitive, and improve "too big zImage" error message.
3140 2008-01-08 Robert Millan <rmh@aybabtu.com>
3142 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3143 `$(update-grub_DATA)'.
3144 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3147 2008-01-07 Robert Millan <rmh@aybabtu.com>
3149 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3150 which instruction is modified by grub-setup during installation
3151 (since it wasn't obvious by only looking at this file).
3153 2008-01-07 Robert Millan <rmh@aybabtu.com>
3155 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
3156 listing actual TODO items.
3158 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3160 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3162 (grub_reiserfs_get_key_offset): Likewise.
3163 (grub_reiserfs_set_key_offset): Likewise.
3164 (grub_reiserfs_set_key_type): Likewise.
3165 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
3167 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3168 better to remove the bitfield version completely.
3170 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3172 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3173 allocated from the heap, due to the fshelp implementation.
3174 (grub_reiserfs_dir): Free NODE, due to the same reason.
3176 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3178 Mostly from Vincent Pelletier:
3180 * fs/reiserfs.c: New file.
3182 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3183 (reiserfs_mod_SOURCES): New variable.
3184 (reiserfs_mod_CFLAGS): Likewise.
3185 (reiserfs_mod_LDFLAGS): Likewise.
3187 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3188 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3189 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3192 2008-01-06 Robert Millan <rmh@aybabtu.com>
3194 * normal/color.c: Remove `<grub/env.h>'.
3196 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
3198 * include/grub/normal.h: Include <grub/env.h>.
3200 2008-01-05 Robert Millan <rmh@aybabtu.com>
3202 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
3203 usage example with `(hd0,1)'.
3204 Reported by Samuel Thibault.
3206 2008-01-05 Robert Millan <rmh@aybabtu.com>
3208 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
3209 (grub_linux_boot_zimage): Rename to ...
3210 (grub_linux_boot): ... this.
3211 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
3212 (grub_linux_boot_zimage): Conditionalize zImage copy.
3214 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
3215 (grub_linux_boot_bzimage): Remove prototype.
3216 (grub_linux_boot_zimage): Rename to ...
3217 (grub_linux_boot): ... this.
3219 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
3220 (grub_linux_boot): Remove function.
3222 2008-01-05 Robert Millan <rmh@aybabtu.com>
3224 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
3225 (grub_env_write_color_highlight): Likewise.
3226 (grub_wait_after_message): Likewise.
3228 * normal/color.c: New file.
3230 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3231 (normal_mod_DEPENDENCIES): Likewise.
3233 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3234 (normal_mod_DEPENDENCIES): Likewise.
3236 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3237 (normal_mod_DEPENDENCIES): Likewise.
3239 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3240 (normal_mod_DEPENDENCIES): Likewise.
3242 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
3243 for waiting after a message is printed.
3244 * normal/main.c (read_config_file): Likewise.
3245 (grub_normal_init): Register grub_env_write_color_normal() and
3246 grub_env_write_color_highlight() hooks. Mark `color_normal' and
3247 `color_highlight' variables as global.
3249 * normal/menu.c (grub_wait_after_message): New function.
3250 (grub_color_menu_normal): New variable. Replaces ...
3251 (GRUB_COLOR_MENU_NORMAL): ... this macro.
3252 (grub_color_menu_highlight): New variable. Replaces ...
3253 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
3254 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
3255 `GRUB_TERM_COLOR_STANDARD'.
3256 (print_message): Use `grub_setcolorstate' to reload colors. Rename
3257 `normal_code' and `highlight_code' to `old_color_normal' and
3258 `old_color_highlight', respectively.
3259 (grub_menu_init_page): Update colors when drawing the menu, based on
3260 `menu_color_normal' and `menu_color_highlight' variables.
3261 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
3262 a message is printed.
3264 2008-01-05 Robert Millan <rmh@aybabtu.com>
3266 * kern/env.c (grub_env_context_open): Propagate hooks for global
3267 variables to new context.
3269 * kern/main.c (grub_set_root_dev): Export `root' variable.
3271 2008-01-05 Robert Millan <rmh@aybabtu.com>
3273 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
3274 discs unconditionally, since udev and others have options to provide
3277 2008-01-05 Robert Millan <rmh@aybabtu.com>
3279 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
3281 2008-01-04 Christian Franke <franke@computer.org>
3283 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
3286 2008-01-03 Pavel Roskin <proski@gnu.org>
3288 * kern/i386/linuxbios/init.c: Put "void" to all function
3289 declarations with no arguments.
3290 * kern/powerpc/ieee1275/init.c: Likewise.
3291 * term/i386/pc/at_keyboard.c: Likewise.
3292 * term/i386/pc/vga_text.c: Likewise.
3293 * util/grub-mkdevicemap.c: Likewise.
3295 2008-01-02 Robert Millan <rmh@aybabtu.com>
3297 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
3298 message when loaded image is out of bounds.
3299 (grub_multiboot_load_elf64): Likewise.
3301 2008-01-02 Pavel Roskin <proski@gnu.org>
3303 * util/grub.d/10_linux.in: Try version without ".old" when
3304 looking for initrd. It's better to use initrd from the newer
3305 kernel of the same version than no initrd at all.
3307 2008-01-01 Robert Millan <rmh@aybabtu.com>
3309 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
3311 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
3313 * include/grub/video.h: Added grub_video_unmap_color and
3314 grub_video_get_active_render_target.
3315 (grub_video_adapter): Added unmap_color and get_active_render_target.
3317 * video/video.c: Added grub_video_unmap_color and
3318 grub_video_get_active_render_target.
3319 (grub_video_get_info): Changed method to accept NULL pointer as an
3320 argument to allow detection of active video adapter.
3322 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
3323 grub_video_vbe_unmap_color_int.
3324 Added grub_video_vbe_unmap_color and
3325 grub_video_vbe_get_active_render_target.
3326 (grub_video_vbe_adapter): Added unmap_color and
3327 get_active_render_target.
3329 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
3330 with grub_video_vbe_unmap_color_int.
3332 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
3333 (DEFAULT_NORMAL_COLOR): Likewise.
3334 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
3335 (DEFAULT_FG_COLOR): Removed.
3336 (DEFAULT_BG_COLOR): Likewise.
3337 (DEFAULT_CURSOR_COLOR): Changed value.
3338 (grub_virtual_screen): Added standard_color_setting,
3339 normal_color_setting, highlight_color_setting and term_color.
3340 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
3341 (bitmap_width): Added.
3342 (bitmap_height): Likewise.
3344 (set_term_color): Likewise.
3345 (grub_virtual_screen_setup): Changed to use new terminal coloring
3347 (grub_gfxterm_init): Added init for bitmap.
3348 (grub_gfxterm_fini): Added destroy for bitmap.
3349 (redraw_screen_rect): Updated to use background bitmap and new
3351 (scroll_up): Added optimization for case when there is no bitmap.
3352 (grub_gfxterm_cls): Fixed to use correct background color.
3353 (grub_virtual_screen_setcolorstate): Changed to use new terminal
3355 (grub_virtual_screen_setcolor): Likewise.
3356 (grub_virtual_screen_getcolor): Added.
3357 (grub_gfxterm_background_image_cmd): Likewise.
3358 (grub_video_term): Added setcolor and getcolor.
3359 (MOD_INIT): Added registration of background_image command.
3360 (MOD_TERM): Added unregistration for background_image command.
3362 2007-12-30 Pavel Roskin <proski@gnu.org>
3364 * loader/multiboot_loader.c: Fix multiboot command
3365 unregistration. Fix all typos in the word "multiboot".
3367 2007-12-29 Pavel Roskin <proski@gnu.org>
3369 * util/grub.d/10_linux.in: Refactor search for initrd. Add
3370 support for initrd names used in Fedora.
3372 2007-12-26 Bean <bean123ch@gmail.com>
3374 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
3375 (cpio_mod_SOURCES): New variable.
3376 (cpio_mod_CFLAGS): Likewise.
3377 (cpio_mod_LDFLAGS): Likewise.
3379 * fs/cpio.c: New file.
3381 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
3383 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3385 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3387 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3389 2007-12-25 Robert Millan <rmh@aybabtu.com>
3391 * include/grub/term.h (struct grub_term): Add `getcolor' function.
3392 (grub_getcolor): New function.
3394 * kern/term.c (grub_getcolor): New function.
3395 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
3396 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
3397 (print_entry): Set normal and highlight colors to
3398 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
3399 respectively, before printing and restore them to old
3401 (grub_menu_init_page): Likewise. Fill an additional colored space
3402 that would otherwise be left blank.
3404 * term/efi/console.c (grub_console_getcolor): New function.
3405 (struct grub_console_term.getcolor): New variable.
3406 * term/i386/pc/console.c (grub_console_getcolor): New function.
3407 (struct grub_console_term.getcolor): New variable.
3408 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
3409 (struct grub_console_term.getcolor): New variable.
3411 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
3412 (struct grub_console_term.setcolor): Remove variable.
3413 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
3414 (struct grub_console_term.setcolor): Remove variable.
3415 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
3416 (struct grub_console_term.setcolor): Remove variable.
3417 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
3418 (struct grub_console_term.setcolor): Remove variable.
3420 2007-12-25 Robert Millan <rmh@aybabtu.com>
3422 * configure.ac: Search for possible unifont.hex locations, and
3423 define UNIFONT_HEX if found.
3425 * Makefile.in (UNIFONT_HEX): Define variable.
3426 (DATA): Rename to ...
3427 (PKGLIB): ... this. Update all users.
3428 (PKGDATA): New variable.
3429 (pkgdata_IMAGES): Rename to ...
3430 (pkglib_IMAGES): ... this. Update all users.
3431 (pkgdata_MODULES): Rename to ...
3432 (pkglib_MODULES): ... this. Update all users.
3433 (pkgdata_PROGRAMS): Rename to ...
3434 (pkglib_PROGRAMS): ... this. Update all users.
3435 (pkgdata_DATA): Rename to ...
3436 (pkglib_DATA): ... this. Update all users.
3437 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
3438 (unicode.pff, ascii.pff): New rules.
3439 (all-local): Add `$(PKGDATA)' dependency.
3440 (install-local): Process `$(PKGDATA)'.
3442 * util/update-grub_lib.in (font_path): Search for *.pff files in
3443 a few more locations, including `${pkgdata}'.
3445 2007-12-23 Robert Millan <rmh@aybabtu.com>
3447 Patch from Bean <bean123ch@gmail.com>:
3448 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
3451 2007-12-21 Bean <bean123ch@gmail.com>
3453 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
3454 (ntfscomp_mod_SOURCES): New variable.
3455 (ntfscomp_mod_CFLAGS): Likewise.
3456 (ntfscomp_mod_LDFLAGS): Likewise.
3458 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
3459 (grub_probe_SOURCES): Likewise.
3460 (grub_emu_SOURCES): Likewise.
3462 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3463 (grub_emu_SOURCES): Likewise.
3465 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3466 (grub_emu_SOURCES): Likewise.
3468 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3469 (grub_emu_SOURCES): Likewise.
3471 * fs/ntfs.c (grub_ntfscomp_func): New variable.
3472 (read_run_list): Renamed to grub_ntfs_read_run_list.
3473 (decomp_nextvcn): Moved to ntfscomp.c.
3474 (decomp_getch): Likewise.
3475 (decomp_get16): Likewise.
3476 (decomp_block): Likewise.
3477 (read_block): Likewise.
3478 (read_data): Partially moved to ntfscomp.c.
3479 (fixup): Change unsigned to grub_uint16_t.
3480 (read_mft): Change unsigned long to grub_uint32_t.
3481 (read_attr): Likewise.
3482 (read_data): Likewise.
3483 (read_run_data): Likewise.
3484 (read_run_list): Likewise.
3485 (read_mft): Likewise.
3487 * fs/ntfscomp.c: New file.
3489 * include/grub/ntfs.h: New file.
3491 2007-12-16 Robert Millan <rmh@aybabtu.com>
3493 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
3494 IDE disk check, since Linux is known to support 20 IDE disks.
3495 Reported by Colin Watson.
3497 2007-12-15 Bean <bean123ch@gmail.com>
3499 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
3500 (lnxboot_img_SOURCES): New variable.
3501 (lnxboot_img_ASFLAGS): Likewise.
3502 (lnxboot_img_LDFLAGS): Likewise.
3504 * boot/i386/pc/lnxboot.S: New file.
3506 2007-11-24 Pavel Roskin <proski@gnu.org>
3508 * configure.ac: Test if '--build-id=none' is supported by the
3509 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
3510 objcopy to generate incorrect binary files (binutils
3511 2.17.50.0.18-1 as shipped by Fedora 8).
3512 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
3513 linking, so that build ID doesn't break the test.
3515 2007-11-24 Pavel Roskin <proski@gnu.org>
3517 * include/grub/i386/time.h: use "void" in the argument list
3519 * include/grub/powerpc/time.h: Likewise.
3520 * include/grub/sparc64/time.h: Likewise.
3522 2007-11-18 Christian Franke <franke@computer.org>
3524 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
3525 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
3526 This fixes the problem that function keys did not work in grub-emu.
3528 2007-11-18 Christian Franke <franke@computer.org>
3530 * disk/host.c (grub_host_open): Remove attribute unused from
3531 name parameter. Add check for "host". This fixes the problem
3532 that grub-emu does not find partitions.
3534 2007-11-18 Christian Franke <franke@computer.org>
3536 * util/hostfs.c (is_dir): New function.
3537 (grub_hostfs_dir): Handle missing dirent.d_type case.
3538 (grub_hostfs_read): Add missing fseek().
3539 (grub_hostfs_label): Clear label pointer. This fixes a crash
3540 of grub-emu on "ls (host)".
3542 2007-11-18 Christian Franke <franke@computer.org>
3544 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
3545 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
3546 to 64 bit boundary by default.
3548 2007-11-18 Bean <bean123ch@gmail.com>
3550 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
3551 (hexdump_mod_SOURCES): New variable.
3552 (hexdump_mod_CFLAGS): Likewise.
3553 (hexdump_mod_LDFLAGS): Likewise.
3555 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3557 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3559 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3561 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3563 * include/grub/hexdump.h: New file.
3565 * commands/hexdump.c: New file.
3567 2007-11-10 Robert Millan <rmh@aybabtu.com>
3569 * commands/i386/pc/play.c (beep_off): Switch order of arguments
3570 in grub_outb() calls.
3571 (beep_on): Likewise.
3573 2007-11-10 Christian Franke <franke@computer.org>
3575 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
3576 (grub_menu_run): Likewise.
3578 2007-11-10 Robert Millan <rmh@aybabtu.com>
3580 * include/grub/i386/efi/machine.h: New file.
3581 * include/grub/i386/linuxbios/machine.h: Likewise.
3582 * include/grub/i386/pc/machine.h: Likewise.
3583 * include/grub/powerpc/ieee1275/machine.h: Likewise.
3584 * include/grub/sparc64/ieee1275/machine.h: Likewise.
3586 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
3587 (serial_hw_io_addr): New variable.
3588 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
3589 instead of `(unsigned short *) 0x400'.
3591 2007-11-10 Bean <bean123ch@gmail.com>
3593 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
3595 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3597 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
3598 (vga_mod_SOURCES): Added.
3599 (vga_mod_CFLAGS): Likewise.
3600 (vga_mod_LDFLAGS): Likewise.
3602 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
3604 (set_map_mask): Likewise.
3605 (set_read_map): Likewise.
3606 (set_read_address): Likewise.
3607 (vga_font): Removed variable.
3608 (get_vga_glyph): Removed function.
3609 (invalidate_char): Likewise.
3610 (write_char): Changed to use grub_font_get_glyph() for font
3612 (grub_vga_putchar): Likewise.
3613 (grub_vga_getcharwidth): Likewise.
3615 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3617 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
3619 (pxeboot_img_LDFLAGS): Likewise.
3620 (diskboot_img_LDFLAGS): Likewise.
3621 (kernel_img_LDFLAGS): Likewise.
3623 2007-11-06 Robert Millan <rmh@aybabtu.com>
3625 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
3626 in grub_outb() calls.
3627 (serial_hw_init): Likewise.
3629 2007-11-05 Robert Millan <rmh@aybabtu.com>
3631 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
3632 spaces. Skip non-regular files.
3634 2007-11-05 Robert Millan <rmh@aybabtu.com>
3636 * kern/disk.c (grub_disk_firmware_fini)
3637 (grub_disk_firmware_is_tainted): New variables.
3639 * include/grub/disk.h (grub_disk_firmware_fini)
3640 (grub_disk_firmware_is_tainted): Likewise.
3642 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
3643 (grub_disk_biosdisk_fini): ... to here.
3644 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
3645 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
3646 is set. Register grub_disk_biosdisk_fini() in
3647 `grub_disk_firmware_fini'.
3649 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
3650 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
3651 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
3652 to finish existing firmware disk interface.
3654 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
3655 (ata_mod_SOURCES): New variable.
3656 (ata_mod_CFLAGS): Likewise.
3657 (ata_mod_LDFLAGS): Likewise.
3659 2007-11-05 Robert Millan <rmh@aybabtu.com>
3661 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
3662 (grub_ata_wait): Reimplement using grub_millisleep().
3664 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
3665 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
3667 2007-11-03 Marco Gerards <marco@gnu.org>
3669 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
3670 (CRTC_ADDR_PORT): New macro.
3671 (CRTC_DATA_PORT): Likewise.
3672 (CRTC_CURSOR): Likewise.
3673 (CRTC_CURSOR_ADDR_HIGH): Likewise.
3674 (CRTC_CURSOR_ADDR_LOW): Likewise.
3675 (update_cursor): New function.
3676 (grub_console_real_putchar): Call `update_cursor'.
3677 (grub_console_gotoxy): Likewise.
3678 (grub_console_cls): Set the default color when clearing the
3680 (grub_console_setcursor): Implemented.
3682 2007-11-03 Marco Gerards <marco@gnu.org>
3684 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
3686 (grub_ata_pio_write): Likewise.
3688 (grub_atapi_identify): Wait after issuing an ATA command.
3689 (grub_atapi_packet): Likewise.
3690 (grub_ata_identify): Likewise.
3691 (grub_ata_readwrite): Likewise.
3693 2007-11-03 Marco Gerards <marco@gnu.org>
3695 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
3696 (grub_ata_pio_write): Likewise.
3697 (grub_ata_readwrite): Use `grub_error', instead of
3698 returning `grub_errno'.
3700 2007-11-03 Marco Gerards <marco@gnu.org>
3702 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
3703 grub_ata_pio_write once for every single sector, instead of for
3706 2007-10-31 Robert Millan <rmh@aybabtu.com>
3708 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
3710 * conf/i386-linuxbios.rmk: New file.
3712 * kern/i386/pc/hardware.c: Likewise.
3713 * term/i386/pc/at_keyboard.c: Likewise.
3714 * term/i386/pc/vga_text.c: Likewise.
3716 * include/grub/i386/linuxbios/boot.h: Likewise.
3717 * include/grub/i386/linuxbios/console.h: Likewise.
3718 * include/grub/i386/linuxbios/init.h: Likewise.
3719 * include/grub/i386/linuxbios/kernel.h: Likewise.
3720 * include/grub/i386/linuxbios/loader.h: Likewise.
3721 * include/grub/i386/linuxbios/memory.h: Likewise.
3722 * include/grub/i386/linuxbios/serial.h: Likewise.
3723 * include/grub/i386/linuxbios/time.h: Likewise.
3725 * kern/i386/linuxbios/init.c: Likewise.
3726 * kern/i386/linuxbios/startup.S: Likewise.
3727 * kern/i386/linuxbios/table.c: Likewise.
3729 2007-10-31 Marco Gerards <marco@gnu.org>
3731 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
3732 (ata_mod_SOURCES): New variable.
3733 (ata_mod_CFLAGS): Likewise.
3734 (ata_mod_LDFLAGS): Likewise.
3736 * disk/ata.c: New file.
3738 * include/grub/disk.h (grub_disk_dev_id): Add
3739 `GRUB_DISK_DEV_ATA_ID'.
3741 2007-10-31 Robert Millan <rmh@aybabtu.com>
3743 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
3744 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
3746 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
3747 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
3749 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
3752 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
3754 2007-10-27 Robert Millan <rmh@aybabtu.com>
3756 * include/grub/types.h (ULONG_MAX): Define macro.
3758 2007-10-22 Robert Millan <rmh@aybabtu.com>
3760 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
3762 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
3764 2007-10-22 Robert Millan <rmh@aybabtu.com>
3766 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
3767 (pkgdata_MODULES): Add `biosdisk.mod'.
3768 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
3771 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
3772 (grub_biosdisk_init): Replace with ...
3773 (GRUB_MOD_INIT(biosdisk)): ... this.
3774 (grub_biosdisk_fini): Replace with ...
3775 (GRUB_MOD_FINI(biosdisk)): ... this.
3777 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
3778 (grub_machine_init): Remove call to grub_biosdisk_init().
3779 (grub_machine_fini): Remove call to grub_machine_fini().
3781 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
3783 2007-10-22 Robert Millan <rmh@aybabtu.com>
3785 * include/grub/time.h: New file.
3786 * include/grub/i386/time.h: Likewise.
3787 * include/grub/powerpc/time.h: Likewise.
3788 * include/grub/sparc64/time.h: Likewise.
3790 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
3792 (KERNEL_MACHINE_TIME_HEADER): ... this.
3793 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3795 (KERNEL_MACHINE_TIME_HEADER): ... this.
3796 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3798 (KERNEL_MACHINE_TIME_HEADER): ... this.
3800 * kern/i386/efi/init.c: Include `<grub/time.h>'.
3801 (grub_millisleep): New function.
3802 * kern/i386/pc/init.c: Include `<grub/time.h>'.
3803 (grub_millisleep): New function.
3804 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
3805 Remove `grub/machine/time.h' include.
3806 (grub_millisleep): New function.
3807 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
3808 Remove `grub/machine/time.h' include.
3809 (grub_millisleep): New function.
3811 * include/grub/misc.h (grub_div_roundup): New function.
3813 * kern/misc.c: Include `<grub/time.h>'.
3814 (grub_millisleep_generic): New function.
3816 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
3818 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
3820 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
3821 `machine/time.h'. Add `time.h'.
3822 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3824 2007-10-21 Robert Millan <rmh@aybabtu.com>
3826 * include/grub/misc.h (grub_max): New function.
3828 2007-10-21 Robert Millan <rmh@aybabtu.com>
3830 * util/misc.c (grub_util_info): Call fflush() before returning.
3832 2007-10-20 Robert Millan <rmh@aybabtu.com>
3834 * genmk.rb (Image): Copy `extra_flags' from here ...
3835 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
3837 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
3838 to `argc' and `args' arguments.
3840 2007-10-17 Robert Millan <rmh@aybabtu.com>
3842 * kern/i386/loader.S: New file.
3844 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
3845 * kern/i386/loader.S (grub_linux_prot_size)... to here.
3846 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
3847 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
3848 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
3849 * kern/i386/loader.S (grub_linux_real_addr)... to here.
3850 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
3851 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
3852 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
3853 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
3854 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
3855 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
3856 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
3857 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
3859 * kern/i386/realmode.S: New file.
3861 * kern/i386/pc/startup.S (protstack): Moved from here ...
3862 * kern/i386/realmode.S (protstack)... to here.
3863 * kern/i386/pc/startup.S (gdt): Moved from here ...
3864 * kern/i386/realmode.S (gdt)... to here.
3865 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
3866 * kern/i386/realmode.S (prot_to_real)... to here.
3868 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
3869 `kern/i386/realmode.S'.
3871 2007-10-17 Robert Millan <rmh@aybabtu.com>
3873 * include/grub/i386/loader.h: New file.
3875 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
3876 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3877 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3878 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3879 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
3880 * include/grub/i386/loader.h (grub_linux_prot_size)
3881 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3882 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3883 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3884 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
3886 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
3888 2007-10-15 Robert Millan <rmh@aybabtu.com>
3890 * normal/misc.c (grub_normal_print_device_info): Do not probe for
3891 filesystem when dev->disk is unset.
3892 Do probe for filesystem even when dev->disk->has_partitions is set.
3893 In case a filesystem is found, always report it.
3894 In case it isn't, if dev->disk->has_partitions is set, report that
3895 a partition table was found instead of reporting that no filesystem
3896 could be identified.
3898 2007-10-12 Robert Millan <rmh@aybabtu.com>
3900 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
3901 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
3903 * include/grub/types.h (grub_host_to_target16): New macro.
3904 (grub_host_to_target32): Likewise.
3905 (grub_host_to_target64): Likewise.
3906 (grub_target_to_host16): Likewise.
3907 (grub_target_to_host32): Likewise.
3908 (grub_target_to_host64): Likewise.
3910 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3912 (GRUB_MOD_ALIGN): ...this. Update all users.
3914 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
3915 grub_host_to_target32.
3916 Replace grub_be_to_cpu32 with grub_target_to_host32.
3917 (load_modules): Likewise.
3918 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
3919 Replace grub_be_to_cpu32 with grub_target_to_host32.
3920 Replace grub_cpu_to_be16 with grub_host_to_target16.
3921 Replace grub_cpu_to_be32 grub_host_to_target32.
3923 2007-10-12 Robert Millan <rmh@aybabtu.com>
3925 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
3926 * util/elf/grub-mkimage.c: ... here.
3928 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
3929 `util/powerpc/ieee1275/grub-mkimage.c'.
3931 2007-10-07 Robert Millan <rmh@aybabtu.com>
3933 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
3934 and make it easier to figure out.
3935 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
3936 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
3937 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
3938 leave us with less than HEAP_MIN_SIZE total heap.
3939 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
3941 2007-10-03 Robert Millan <rmh@aybabtu.com>
3943 * include/grub/i386/io.h: New file.
3944 * commands/i386/pc/play.c (inb): Removed.
3946 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3948 * term/i386/pc/serial.c (inb): Removed.
3950 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3952 * term/i386/pc/vga.c (inb): Removed.
3954 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
3957 2007-10-02 Robert Millan <rmh@aybabtu.com>
3959 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
3960 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3961 Reported by Marcin Kurek.
3963 2007-09-07 Robert Millan <rmh@aybabtu.com>
3965 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
3966 SmartFirmware version updates (as released by Sven Luther), and avoid
3967 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
3968 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
3971 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3974 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
3975 when merging two regions.
3977 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3979 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
3980 * normal/completion.c (grub_normal_do_completion): Likewise.
3981 Reported by Hitoshi Ozeki.
3983 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
3985 Do not use devices at boot in chainloading.
3987 * loader/i386/pc/chainloader.c (boot_drive): New variable.
3988 (boot_part_addr): Likewise.
3989 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
3990 with BOOT_DRIVE and BOOT_PART_ADDR.
3991 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
3992 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
3994 2007-08-29 Robert Millan <rmh@aybabtu.com>
3996 Patch from Simon Peter <dn.tlp@gmx.net>:
3997 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
3998 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
3999 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
4000 util/i386/pc/grub-setup.c_DEPENDENCIES.
4001 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4002 util/grub-probe.c_DEPENDENCIES.
4003 * conf/powerpc-ieee1275.rmk: Likewise.
4005 2007-08-28 Robert Millan <rmh@aybabtu.com>
4007 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
4008 to tell grub-mkdevicemap how to name devices.
4009 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4012 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4013 util/i386/get_disk_name.c.
4014 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4015 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4016 util/ieee1275/get_disk_name.c.
4018 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4020 * DISTLIST: Add util/i386/get_disk_name.c and
4021 util/ieee1275/get_disk_name.c.
4023 * util/grub-mkdevicemap.c: Replace device naming logic with
4024 grub_util_get_disk_name() calls.
4026 2007-08-20 Robert Millan <rmh@aybabtu.com>
4028 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4029 (so that it works for both plural and singular quantities).
4031 2007-08-05 Robert Millan <rmh@aybabtu.com>
4033 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4034 so that [xz] isn't taken into account when determining order.
4036 2007-08-02 Marco Gerards <marco@gnu.org>
4038 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4039 `include/multiboot2.h', `include/grub/elfload.h',
4040 `include/multiboot.h', `include/grub/multiboot.h',
4041 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4042 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4043 `kern/elf.c', `loader/multiboot_loader.c',
4044 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4045 `loader/i386/pc/multiboot2.c',
4046 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4047 `util/i386/pc/grub-mkrescue.in'. Remove
4048 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4049 `include/grub/i386/pc/util/biosdisk.h' and
4050 `include/grub/powerpc/ieee1275/multiboot.h'.
4052 2007-08-02 Bean <bean123ch@gmail.com>
4054 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4055 (ntfs_mod_SOURCES): New variable.
4056 (ntfs_mod_CFLAGS): Likewise.
4057 (ntfs_mod_LDFLAGS): Likewise.
4059 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4060 (grub_probe_SOURCES): Likewise.
4061 (grub_emu_SOURCES): Likewise.
4063 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4064 (grub_emu_SOURCES): Likewise.
4066 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4067 (grub_emu_SOURCES): Likewise.
4069 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4071 * fs/ntfs.c: New file.
4073 2007-08-02 Bean <bean123ch@gmail.com>
4075 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4077 * file.h (grub_file): Likewise.
4079 * fshelp.h (grub_fshelp_read_file): Likewise.
4081 * util/i386/pc/grub-setup.c (setup): Likewise.
4082 (save_first_sector): Likewise.
4083 (save_blocklists): Likewise.
4085 * fs/affs.c (grub_affs_read_file): Likewise.
4087 * fs/ext2.c (grub_ext2_read_file): Likewise.
4089 * fs/fat.c (grub_fat_read_data): Likewise.
4091 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4093 * fs/hfs.c (grub_hfs_read_file): Likewise.
4095 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4097 * fs/jfs.c (grub_jfs_read_file): Likewise.
4099 * fs/minix.c (grub_minix_read_file): Likewise.
4101 * fs/sfs.c (grub_sfs_read_file): Likewise.
4103 * fs/ufs.c (grub_ufs_read_file): Likewise.
4105 * fs/xfs.c (grub_xfs_read_file): Likewise.
4107 * command/blocklist.c (read_blocklist): Likewise.
4108 (print_blocklist): Likewise.
4110 2007-08-02 Marco Gerards <marco@gnu.org>
4112 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4115 * disk/host.c: New file.
4117 * util/hostfs.c: Likewise.
4119 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4120 return `GRUB_ERR_BAD_FS'.
4121 * fs/sfs.c (grub_sfs_mount): Likewise.
4122 * fs/xfs.c (grub_xfs_mount): Likewise.
4124 * include/grub/disk.h (enum grub_disk_dev_id): Add
4125 `GRUB_DISK_DEVICE_HOST_ID'.
4127 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4129 2007-07-24 Jerone Young <jerone@gmail.com>
4131 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
4132 modules for compilation.
4133 * conf/powerpc-ieee1275.rmk: Likewise.
4135 * include/multiboot.h: Move multiboot definitions to one file. Rename
4136 many definitions to not get grub specific.
4137 * include/multiboot2.h: Create header with multiboot 2 definitions.
4138 * include/grub/multiboot.h: Header for grub specific function
4139 prototypes and definitions.
4140 * include/grub/multiboot2.h: Likewise.
4141 * include/grub/multiboot_loader.h: Likewise.
4142 * include/grub/i386/pc/multiboot.h: Removed.
4143 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4145 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4146 and 2 to allow for one multiboot and module commands.
4147 * loader/multiboot2.c: Add multiboot2 functionality.
4148 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4149 and definition names.
4150 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4152 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4153 ieee1275 specific multiboot2 code.
4155 * kern/i386/pc/startup.S: Change headers and definition names for
4156 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4158 2007-07-22 Robert Millan <rmh@aybabtu.com>
4160 * geninitheader.sh: Process file specified in first parameter rather
4161 than hardcoding grub_modules_init.lst.
4162 * geninit.sh: Likewise. Also, construct header name dynamically rather
4163 than hardcoding grub_modules_init.h.
4165 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4166 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
4167 grub_probe_init.[ch] and grub_setup_init.[ch].
4169 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4170 grub_modules_init.h with grub_emu_init.h.
4171 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4172 grub_probe_init.[ch] files.
4173 * conf/i386-efi.rmk: Likewise.
4174 * conf/i386-pc.rmk: Likewise.
4175 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4176 grub_setup_init.[ch] files.
4178 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4179 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
4180 to initialize modules rather than a list of hardcoded functions.
4181 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
4182 grub_init_all() to initialize modules rather than a list of hardcoded
4185 2007-07-22 Robert Millan <rmh@aybabtu.com>
4187 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4188 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4190 2007-07-22 Robert Millan <rmh@aybabtu.com>
4192 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4193 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
4194 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
4195 flag when running on SmartFirmware.
4196 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
4197 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
4200 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4201 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
4202 rather than decreasing it.
4204 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
4205 there's not enough space to do it, fail in the same way as when it
4206 can't be done because there are no partitions.
4208 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
4209 when nvsetenv failed.
4211 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4213 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
4214 because this rule is automatically generated.
4215 (grub-mkrescue): Removed for the same reason as above.
4217 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4219 Migrate to GNU General Public License Version 3.
4221 * COPYING: Replaced with the plain text version of GPLv3.
4223 * config.guess: Updated from gnulib.
4224 * config.sub: Likewise.
4226 * geninit.sh: Output a GPLv3 copyright notice.
4227 * geninitheader.sh: Likewise.
4228 * genmodsrc.sh: Likewise.
4229 * gensymlist.sh.in: Likewise.
4231 * boot/i386/pc/boot.S: Upgraded to GPLv3.
4232 * boot/i386/pc/diskboot.S: Likewise.
4233 * boot/i386/pc/pxeboot.S: Likewise.
4234 * commands/blocklist.c: Likewise.
4235 * commands/boot.c: Likewise.
4236 * commands/cat.c: Likewise.
4237 * commands/cmp.c: Likewise.
4238 * commands/configfile.c: Likewise.
4239 * commands/echo.c: Likewise.
4240 * commands/help.c: Likewise.
4241 * commands/ls.c: Likewise.
4242 * commands/search.c: Likewise.
4243 * commands/terminal.c: Likewise.
4244 * commands/test.c: Likewise.
4245 * commands/videotest.c: Likewise.
4246 * commands/i386/cpuid.c: Likewise.
4247 * commands/i386/pc/halt.c: Likewise.
4248 * commands/i386/pc/play.c: Likewise.
4249 * commands/i386/pc/reboot.c: Likewise.
4250 * commands/i386/pc/vbeinfo.c: Likewise.
4251 * commands/i386/pc/vbetest.c: Likewise.
4252 * commands/ieee1275/halt.c: Likewise.
4253 * commands/ieee1275/reboot.c: Likewise.
4254 * commands/ieee1275/suspend.c: Likewise.
4255 * disk/loopback.c: Likewise.
4256 * disk/lvm.c: Likewise.
4257 * disk/raid.c: Likewise.
4258 * disk/efi/efidisk.c: Likewise.
4259 * disk/i386/pc/biosdisk.c: Likewise.
4260 * disk/ieee1275/ofdisk.c: Likewise.
4261 * font/manager.c: Likewise.
4262 * fs/affs.c: Likewise.
4263 * fs/ext2.c: Likewise.
4264 * fs/fat.c: Likewise.
4265 * fs/fshelp.c: Likewise.
4266 * fs/hfs.c: Likewise.
4267 * fs/hfsplus.c: Likewise.
4268 * fs/iso9660.c: Likewise.
4269 * fs/jfs.c: Likewise.
4270 * fs/minix.c: Likewise.
4271 * fs/sfs.c: Likewise.
4272 * fs/ufs.c: Likewise.
4273 * fs/xfs.c: Likewise.
4274 * hello/hello.c: Likewise.
4275 * include/grub/acorn_filecore.h: Likewise.
4276 * include/grub/arg.h: Likewise.
4277 * include/grub/bitmap.h: Likewise.
4278 * include/grub/boot.h: Likewise.
4279 * include/grub/cache.h: Likewise.
4280 * include/grub/device.h: Likewise.
4281 * include/grub/disk.h: Likewise.
4282 * include/grub/dl.h: Likewise.
4283 * include/grub/elfload.h: Likewise.
4284 * include/grub/env.h: Likewise.
4285 * include/grub/err.h: Likewise.
4286 * include/grub/file.h: Likewise.
4287 * include/grub/font.h: Likewise.
4288 * include/grub/fs.h: Likewise.
4289 * include/grub/fshelp.h: Likewise.
4290 * include/grub/gzio.h: Likewise.
4291 * include/grub/hfs.h: Likewise.
4292 * include/grub/kernel.h: Likewise.
4293 * include/grub/loader.h: Likewise.
4294 * include/grub/lvm.h: Likewise.
4295 * include/grub/misc.h: Likewise.
4296 * include/grub/mm.h: Likewise.
4297 * include/grub/net.h: Likewise.
4298 * include/grub/normal.h: Likewise.
4299 * include/grub/parser.h: Likewise.
4300 * include/grub/partition.h: Likewise.
4301 * include/grub/pc_partition.h: Likewise.
4302 * include/grub/raid.h: Likewise.
4303 * include/grub/rescue.h: Likewise.
4304 * include/grub/script.h: Likewise.
4305 * include/grub/setjmp.h: Likewise.
4306 * include/grub/symbol.h: Likewise.
4307 * include/grub/term.h: Likewise.
4308 * include/grub/terminfo.h: Likewise.
4309 * include/grub/tparm.h: Likewise.
4310 * include/grub/types.h: Likewise.
4311 * include/grub/video.h: Likewise.
4312 * include/grub/efi/api.h: Likewise.
4313 * include/grub/efi/chainloader.h: Likewise.
4314 * include/grub/efi/console.h: Likewise.
4315 * include/grub/efi/console_control.h: Likewise.
4316 * include/grub/efi/disk.h: Likewise.
4317 * include/grub/efi/efi.h: Likewise.
4318 * include/grub/efi/pe32.h: Likewise.
4319 * include/grub/efi/time.h: Likewise.
4320 * include/grub/i386/linux.h: Likewise.
4321 * include/grub/i386/setjmp.h: Likewise.
4322 * include/grub/i386/types.h: Likewise.
4323 * include/grub/i386/efi/kernel.h: Likewise.
4324 * include/grub/i386/efi/loader.h: Likewise.
4325 * include/grub/i386/efi/time.h: Likewise.
4326 * include/grub/i386/pc/biosdisk.h: Likewise.
4327 * include/grub/i386/pc/boot.h: Likewise.
4328 * include/grub/i386/pc/chainloader.h: Likewise.
4329 * include/grub/i386/pc/console.h: Likewise.
4330 * include/grub/i386/pc/init.h: Likewise.
4331 * include/grub/i386/pc/kernel.h: Likewise.
4332 * include/grub/i386/pc/loader.h: Likewise.
4333 * include/grub/i386/pc/memory.h: Likewise.
4334 * include/grub/i386/pc/multiboot.h: Likewise.
4335 * include/grub/i386/pc/serial.h: Likewise.
4336 * include/grub/i386/pc/time.h: Likewise.
4337 * include/grub/i386/pc/vbe.h: Likewise.
4338 * include/grub/i386/pc/vbeblit.h: Likewise.
4339 * include/grub/i386/pc/vbefill.h: Likewise.
4340 * include/grub/i386/pc/vbeutil.h: Likewise.
4341 * include/grub/i386/pc/vga.h: Likewise.
4342 * include/grub/ieee1275/ieee1275.h: Likewise.
4343 * include/grub/ieee1275/ofdisk.h: Likewise.
4344 * include/grub/powerpc/libgcc.h: Likewise.
4345 * include/grub/powerpc/setjmp.h: Likewise.
4346 * include/grub/powerpc/types.h: Likewise.
4347 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
4348 * include/grub/powerpc/ieee1275/console.h: Likewise.
4349 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
4350 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
4351 * include/grub/powerpc/ieee1275/loader.h: Likewise.
4352 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
4353 * include/grub/powerpc/ieee1275/time.h: Likewise.
4354 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
4355 * include/grub/sparc64/libgcc.h: Likewise.
4356 * include/grub/sparc64/setjmp.h: Likewise.
4357 * include/grub/sparc64/types.h: Likewise.
4358 * include/grub/sparc64/ieee1275/console.h: Likewise.
4359 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4360 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4361 * include/grub/sparc64/ieee1275/time.h: Likewise.
4362 * include/grub/util/biosdisk.h: Likewise.
4363 * include/grub/util/getroot.h: Likewise.
4364 * include/grub/util/lvm.h: Likewise.
4365 * include/grub/util/misc.h: Likewise.
4366 * include/grub/util/raid.h: Likewise.
4367 * include/grub/util/resolve.h: Likewise.
4368 * io/gzio.c: Likewise.
4369 * kern/device.c: Likewise.
4370 * kern/disk.c: Likewise.
4371 * kern/dl.c: Likewise.
4372 * kern/elf.c: Likewise.
4373 * kern/env.c: Likewise.
4374 * kern/err.c: Likewise.
4375 * kern/file.c: Likewise.
4376 * kern/fs.c: Likewise.
4377 * kern/loader.c: Likewise.
4378 * kern/main.c: Likewise.
4379 * kern/misc.c: Likewise.
4380 * kern/mm.c: Likewise.
4381 * kern/parser.c: Likewise.
4382 * kern/partition.c: Likewise.
4383 * kern/rescue.c: Likewise.
4384 * kern/term.c: Likewise.
4385 * kern/efi/efi.c: Likewise.
4386 * kern/efi/init.c: Likewise.
4387 * kern/efi/mm.c: Likewise.
4388 * kern/i386/dl.c: Likewise.
4389 * kern/i386/efi/init.c: Likewise.
4390 * kern/i386/efi/startup.S: Likewise.
4391 * kern/i386/pc/init.c: Likewise.
4392 * kern/i386/pc/lzo1x.S: Likewise.
4393 * kern/i386/pc/startup.S: Likewise.
4394 * kern/ieee1275/ieee1275.c: Likewise.
4395 * kern/powerpc/cache.S: Likewise.
4396 * kern/powerpc/dl.c: Likewise.
4397 * kern/powerpc/ieee1275/cmain.c: Likewise.
4398 * kern/powerpc/ieee1275/crt0.S: Likewise.
4399 * kern/powerpc/ieee1275/init.c: Likewise.
4400 * kern/powerpc/ieee1275/openfw.c: Likewise.
4401 * kern/sparc64/cache.S: Likewise.
4402 * kern/sparc64/dl.c: Likewise.
4403 * kern/sparc64/ieee1275/init.c: Likewise.
4404 * kern/sparc64/ieee1275/openfw.c: Likewise.
4405 * loader/efi/chainloader.c: Likewise.
4406 * loader/efi/chainloader_normal.c: Likewise.
4407 * loader/i386/efi/linux.c: Likewise.
4408 * loader/i386/efi/linux_normal.c: Likewise.
4409 * loader/i386/pc/chainloader.c: Likewise.
4410 * loader/i386/pc/chainloader_normal.c: Likewise.
4411 * loader/i386/pc/linux.c: Likewise.
4412 * loader/i386/pc/linux_normal.c: Likewise.
4413 * loader/i386/pc/multiboot.c: Likewise.
4414 * loader/i386/pc/multiboot_normal.c: Likewise.
4415 * loader/powerpc/ieee1275/linux.c: Likewise.
4416 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4417 * normal/arg.c: Likewise.
4418 * normal/cmdline.c: Likewise.
4419 * normal/command.c: Likewise.
4420 * normal/completion.c: Likewise.
4421 * normal/execute.c: Likewise.
4422 * normal/function.c: Likewise.
4423 * normal/lexer.c: Likewise.
4424 * normal/main.c: Likewise.
4425 * normal/menu.c: Likewise.
4426 * normal/menu_entry.c: Likewise.
4427 * normal/misc.c: Likewise.
4428 * normal/parser.y: Likewise.
4429 * normal/script.c: Likewise.
4430 * normal/i386/setjmp.S: Likewise.
4431 * normal/powerpc/setjmp.S: Likewise.
4432 * normal/sparc64/setjmp.S: Likewise.
4433 * partmap/acorn.c: Likewise.
4434 * partmap/amiga.c: Likewise.
4435 * partmap/apple.c: Likewise.
4436 * partmap/gpt.c: Likewise.
4437 * partmap/pc.c: Likewise.
4438 * partmap/sun.c: Likewise.
4439 * term/gfxterm.c: Likewise.
4440 * term/terminfo.c: Likewise.
4441 * term/efi/console.c: Likewise.
4442 * term/i386/pc/console.c: Likewise.
4443 * term/i386/pc/serial.c: Likewise.
4444 * term/i386/pc/vesafb.c: Likewise.
4445 * term/i386/pc/vga.c: Likewise.
4446 * term/ieee1275/ofconsole.c: Likewise.
4447 * util/biosdisk.c: Likewise.
4448 * util/console.c: Likewise.
4449 * util/genmoddep.c: Likewise.
4450 * util/getroot.c: Likewise.
4451 * util/grub-emu.c: Likewise.
4452 * util/grub-mkdevicemap.c: Likewise.
4453 * util/grub-probe.c: Likewise.
4454 * util/lvm.c: Likewise.
4455 * util/misc.c: Likewise.
4456 * util/raid.c: Likewise.
4457 * util/resolve.c: Likewise.
4458 * util/update-grub.in: Likewise.
4459 * util/update-grub_lib.in: Likewise.
4460 * util/grub.d/00_header.in: Likewise.
4461 * util/grub.d/10_hurd.in: Likewise.
4462 * util/grub.d/10_linux.in: Likewise.
4463 * util/i386/efi/grub-install.in: Likewise.
4464 * util/i386/efi/grub-mkimage.c: Likewise.
4465 * util/i386/pc/grub-install.in: Likewise.
4466 * util/i386/pc/grub-mkimage.c: Likewise.
4467 * util/i386/pc/grub-mkrescue.in: Likewise.
4468 * util/i386/pc/grub-setup.c: Likewise.
4469 * util/i386/pc/misc.c: Likewise.
4470 * util/powerpc/ieee1275/grub-install.in: Likewise.
4471 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
4472 * util/powerpc/ieee1275/misc.c: Likewise.
4473 * video/bitmap.c: Likewise.
4474 * video/video.c: Likewise.
4475 * video/i386/pc/vbe.c: Likewise.
4476 * video/i386/pc/vbeblit.c: Likewise.
4477 * video/i386/pc/vbefill.c: Likewise.
4478 * video/i386/pc/vbeutil.c: Likewise.
4479 * video/readers/tga.c: Likewise.
4481 2007-07-02 Robert Millan <rmh@aybabtu.com>
4483 * conf/i386-efi.rmk: Replace obsolete reference to
4484 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
4485 with util/getroot.c.
4486 * conf/powerpc-ieee1275.rmk: Likewise.
4487 * conf/sparc64-ieee1275.rmk: Likewise.
4489 * util/grub-emu.c (main): Fix unchecked pointer handling.
4491 2007-07-02 Robert Millan <rmh@aybabtu.com>
4493 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
4494 invocation to fail, in order to support partition-less media.
4496 * util/i386/pc/grub-install.in: Likewise.
4498 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
4499 which fs or partmap modules are needed (akin to its sister scripts).
4501 Also use grub-probe to get rid of unportable /proc/mounts check.
4503 Print the same informational message that the other scripts do, before
4506 2007-06-23 Robert Millan <rmh@aybabtu.com>
4508 * util/update-grub_lib.in (font_path): New function. Determine whether
4509 a font file can be found and, if so, echo the GRUB path to it.
4511 * util/update-grub.in: Handle multiple terminals depending on user
4512 input, platform availability and font file presence. Propagate
4513 variables of our findings to /etc/grub.d/ children.
4515 * util/grub.d/00_header.in: Handle multiple terminals, based on
4516 environment setup by update-grub.
4518 2007-06-23 Robert Millan <rmh@aybabtu.com>
4520 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
4522 2007-06-21 Robert Millan <rmh@aybabtu.com>
4524 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
4525 indicate end of data section in kernel image.
4526 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
4527 GRUB_KERNEL_MACHINE_DATA_END.
4529 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
4531 * kern/i386/efi/startup.S: Likewise.
4533 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
4534 during image generation. Implement --prefix option to override this
4536 * util/i386/efi/grub-mkimage.c: Likewise.
4538 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
4539 code to make path relative to its root into a separate function.
4541 * util/i386/pc/grub-install.in: Use newly provided
4542 make_system_path_relative_to_its_root() to convert ${grubdir}, then
4543 pass the result to grub-install --prefix.
4545 2007-06-13 Robert Millan <rmh@aybabtu.com>
4547 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
4549 * util/grub-emu.c: Use above definitions from misc.h instead of
4551 * util/grub-mkdevicemap.c: Likewise.
4552 * util/i386/pc/grub-setup.c: Likewise.
4553 * util/grub-probe.c: Likewise.
4554 (probe): Abort with grub_util_error() when either
4555 grub_guess_root_device or grub_util_get_grub_dev fails.
4557 2007-06-12 Robert Millan <rmh@aybabtu.com>
4559 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
4561 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
4563 * util/grub-probe.c (probe): Likewise for "drive_name".
4565 2007-06-11 Robert Millan <rmh@aybabtu.com>
4567 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
4568 not just the cdrom one.
4570 2007-06-11 Robert Millan <rmh@aybabtu.com>
4572 * util/i386/pc/grub-mkrescue.in: Add "set -e".
4573 Add --pkglibdir=DIR option to override pkglibdir.
4574 Mention --image-type=TYPE in help output.
4575 Fix --grub-mkimage (it was a no-op).
4576 Abort gracefully when no parameter is given.
4578 2007-06-11 Robert Millan <rmh@aybabtu.com>
4580 * util/i386/pc/grub-mkrescue.in: New file.
4581 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
4582 * Makefile.in: Handle bin_SCRIPTS.
4584 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
4586 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
4587 list of video modes.
4589 2007-06-06 Robert Millan <rmh@aybabtu.com>
4591 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
4592 file doesn't exist, or if it is in a filesystem grub can't read.
4594 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
4595 not abort if GRUB_DRIVE could not be defined. Rearrange generated
4596 header comment to fit in 80 columns when the variables are resolved.
4598 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
4599 could be identified by update-grub. Remove redundant check for
4600 unifont.pff existence (since convert_system_path_to_grub_path now
4603 2007-06-04 Robert Millan <rmh@aybabtu.com>
4605 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
4607 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
4609 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
4611 2007-06-04 Robert Millan <rmh@aybabtu.com>
4613 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
4615 * include/grub/partition.h: Declare grub_apple_partition_map_init and
4616 grub_apple_partition_map_fini.
4619 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
4620 to access >2 TiB disks).
4622 Print disk->total_sectors with %llu instead of %lu, since this
4623 variable is always 64-bit (prevents wrong disk size from being displayed
4624 on either >2 TiB disk or big-endian CPU).
4626 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
4627 into a generic case that supports all (sane) partition maps.
4629 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
4632 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
4633 and grub_apple_partition_map_fini() after that.
4635 2007-06-01 Robert Millan <rmh@aybabtu.com>
4637 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
4639 * util/grub.d/00_header.in: Only enable gfxterm when
4640 convert_system_path_to_grub_path() succeeds.
4642 2007-05-20 Robert Millan <rmh@aybabtu.com>
4644 * util/update-grub_lib.in: New file.
4645 * DISTLIST: Add update-grub_lib.in.
4646 * conf/common.rmk: Generate update-grub_lib and install it in
4648 * Makefile.in: Add install routine for $(lib_DATA).
4650 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
4651 function provided by update-grub_lib to support arbitrary paths of
4653 * util/update-grub.in: Use convert_system_path_to_grub_path() to
4654 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
4656 2007-05-19 Robert Millan <rmh@aybabtu.com>
4658 * commands/i386/cpuid.c: New module.
4660 * conf/i386-efi.rmk: Enable cpuid.mod.
4661 * conf/i386-pc.rmk: Likewise.
4663 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4665 * kern/disk.c (grub_disk_read): Check return value of
4668 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4670 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
4672 * disk/raid.c (grub_raid_open): Likewise.
4674 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4676 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
4677 stack instead of on the heap.
4679 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
4680 before doing a read on it.
4682 * configure.ac: Only use -fno-stack-protector for the target
4685 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4687 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
4688 __attribute_ ((unused)) to mode_type argument.
4690 * util/getroot.c (grub_guess_root_device): Fix #endif.
4692 * kern/misc.c (memcmp): Fix prototype.
4694 * include/grub/partition.h [GRUB_UTIL]
4695 (grub_gpt_partition_map_init): Add prototype.
4696 (grub_gpt_partition_map_fini): Likewise.
4698 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
4701 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
4702 (grub_fat_read_data): Likewise.
4703 (grub_fat_find_dir): Likewise.
4705 * font/manager.c (find_glyph): Make table a const.
4706 (grub_font_get_glyph): Remove bitmap from if statement.
4708 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
4710 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
4711 code, first search for device in /dev/mapper, then in /dev.
4712 (grub_util_get_grub_dev): New function.
4713 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
4715 * util/grub-probe.c (probe): Remove check for RAID, call
4716 grub_util_get_grub_dev() instead of
4717 grub_util_biosdisk_get_grub_dev().
4718 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
4719 grub_util_biosdisk_get_grub_dev().
4720 * util/i386/pc/grub-setup.c (main): Likewise.
4722 2007-05-16 Robert Millan <rmh@aybabtu.com>
4724 * DISTLIST: Update for the latest changes.
4725 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
4726 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
4727 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
4728 grub/util/biosdisk.h.
4729 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
4730 grub/util/biosdisk.h.
4732 2007-05-16 Robert Millan <rmh@aybabtu.com>
4734 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
4736 2007-05-16 Robert Millan <rmh@aybabtu.com>
4738 * util/i386/efi/grub-install.in: New.
4739 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
4740 newly added grub-install.
4741 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
4743 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
4744 grub/util/biosdisk.h.
4745 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
4746 grub/util/biosdisk.h.
4748 2007-05-16 Robert Millan <rmh@aybabtu.com>
4750 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
4751 * include/grub/util/biosdisk.h: ... here.
4752 * util/i386/pc/biosdisk.c: Moved to ...
4753 * util/biosdisk.c: ... here.
4754 * util/i386/pc/getroot.c: Moved to ...
4755 * util/getroot.c: ... here.
4756 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
4757 * util/grub-mkdevicemap.c: ... here.
4758 * util/i386/pc/grub-probe.c: Moved to ...
4759 * util/grub-probe.c: ... here.
4761 2007-05-15 Robert Millan <rmh@aybabtu.com>
4763 * util/update-grub.in: Remove duplicated line in grub.cfg header
4766 2007-05-13 Robert Millan <rmh@aybabtu.com>
4768 * util/update-grub.in: Fix a few assumptions about the devices holding
4769 /, /boot and /boot/grub being the same.
4770 * util/grub.d/00_header.in: Likewise.
4771 * util/grub.d/10_hurd.in: Likewise.
4772 * util/grub.d/10_linux.in: Likewise.
4774 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
4775 patterns. Use that to define the `.old' suffix as older than `'.
4777 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
4779 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
4780 the grub.cfg header message.
4782 2007-05-11 Robert Millan <rmh@aybabtu.com>
4784 * util/update-grub.in: Create device.map if it doesn't already exist,
4785 before attempting to run grub-probe.
4786 Check for grub-probe and grub-mkdevicemap with the same code
4787 grub-install is using.
4790 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
4792 * Makefile.in: Add the datarootdir autoconf variable.
4794 2007-05-09 Robert Millan <rmh@aybabtu.com>
4796 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
4797 fail gracefully if dev->disk->partition == NULL.
4799 2007-05-07 Robert Millan <rmh@aybabtu.com>
4801 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
4802 determine partition map module.
4803 * util/i386/pc/grub-install.in: Use this feature to decide which
4804 partition module to load, instead of hardcoding pc and gpt.
4806 2007-05-07 Robert Millan <rmh@aybabtu.com>
4808 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
4809 source directory differs from build directory.
4811 2007-05-05 Robert Millan <rmh@aybabtu.com>
4813 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
4816 2007-05-05 Robert Millan <rmh@aybabtu.com>
4818 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
4820 2007-05-05 Robert Millan <rmh@aybabtu.com>
4822 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
4823 command-line arguments via ${GRUB_CMDLINE_LINUX}.
4825 2007-05-05 Robert Millan <rmh@aybabtu.com>
4827 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
4828 (grub_probe_SOURCES): Likewise.
4829 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
4830 GPT and initialize dos_part and bsd_part accordingly.
4831 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
4833 (main): Activate gpt module for use during partition identification,
4834 and deactivate it afterwards.
4835 * util/i386/pc/grub-install.in: Add gpt module to core.img.
4836 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
4837 partition identification, and deactivate it afterwards.
4839 2007-05-05 Robert Millan <rmh@aybabtu.com>
4841 * term/i386/pc/console.c (grub_console_fini): Call
4842 grub_term_set_current() before grub_term_unregister().
4844 2007-05-04 Robert Millan <rmh@aybabtu.com>
4846 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
4847 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
4848 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
4849 and update-grub_DATA.
4850 * conf/common.rmk: Build and install update-grub components.
4851 * conf/common.mk: Regenerate.
4852 * util/update-grub.in: New. Core of update-grub.
4853 * util/grub.d/00_header.in: New. Generates grub.cfg header.
4854 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
4855 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
4856 * util/grub.d/README: New. Document grub.d directory layout.
4858 2007-05-01 Robert Millan <rmh@aybabtu.com>
4860 * util/grub-emu.c: Move initialization functions
4861 grub_util_biosdisk_init() and grub_init_all() before
4862 grub_util_biosdisk_get_grub_dev(), which relies on them.
4864 2007-04-19 Robert Millan <rmh@aybabtu.com>
4866 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
4869 2007-04-18 Jerone Young <jerone@gmail.com>
4871 * kernel/elf.c: Add missing parenthesis for conditional statement
4874 2007-04-10 Jerone Young <jerone@gmail.com>
4876 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
4877 continue on and look for device node with real device name.
4879 2007-04-10 Jerone Young <jerone@gmail.com>
4881 * configure.ac: Add argument for autoconf to use transformation
4883 * Makefile.in: Add autoconf package transformation code.
4884 * util/i386/pc/grub-install.in: Likewise.
4885 * util/powerpc/ieee1275/grub-install.in: Likewise.
4887 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
4889 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
4890 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
4891 (EXT2_REVISION): Likewise.
4892 (EXT2_INODE_SIZE): Likewise.
4893 (struct grub_ext2_block_group): Added a missing member
4895 (grub_ext2_read_inode): Divide by the inode size in a superblock
4896 instead of 128 to obtain INODES_PER_BLOCK.
4897 Use the macro EXT2_INODE_SIZE instead of directly using
4900 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
4902 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
4903 superblock instead of the structure size to compute an
4904 offset. This fixes the problem that GRUB could not read a
4905 filesystem when inode size is different from 128-byte.
4907 2007-03-05 Marco Gerards <marco@gnu.org>
4909 * normal/main.c (read_config_file): When "menu" is not set, create
4912 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4914 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
4915 (HEAP_LIMIT): New macro.
4916 (grub_claim_heap): Claim memory up to `heaplimit'.
4918 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
4920 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
4921 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
4923 (grub_arch_modules_addr): Return address after `_end'.
4924 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
4925 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
4926 (add_segments): Calculate `_end' from phdr size and location.
4927 (ALIGN_UP): Moved to ...
4928 * include/grub/misc.h: here.
4929 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4931 (GRUB_IEEE1275_MODULE_BASE): Removed.
4933 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4935 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
4938 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4940 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
4942 (grub_elf64_load_hook_t): Likewise.
4943 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
4946 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
4948 * kern/mm.c: Update copyright.
4949 (grub_mm_debug): Correct syntax error.
4950 (grub_mm_dump_free): New function.
4951 (grub_debug_free): Call `grub_free'.
4952 * include/grub/mm.h: Update copyright.
4953 (grub_mm_dump_free): Add declaration.
4955 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4957 * include/grub/ieee1275/ieee1275.h: Update copyright.
4958 * kern/powerpc/ieee1275/init.c: Likewise.
4959 * kern/powerpc/ieee1275/openfw.c: Likewise.
4961 * loader/powerpc/ieee1275/linux.c: Likewise.
4962 * include/grub/elfload.h: Likewise.
4963 * kern/elf.c: Likewise.
4964 (grub_elf32_load): Pass `base' and `size' parameters. Update all
4966 (grub_elf64_load): Likewise.
4967 (grub_elf32_load_segment): Move to a nested function.
4968 (grub_elf64_load_segment): Likewise.
4970 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
4972 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
4974 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
4975 (grub_heap_len): Likewise.
4976 (HEAP_SIZE): New macro.
4977 (grub_claim_heap): New function.
4978 (grub_machine_init): Don't claim heap directly. Call
4980 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
4981 (grub_available_iterate): New function.
4983 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
4985 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
4986 * configure.ac: Use it for testing the HOST and TARGET compilers.
4988 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
4990 * Makefile.in (enable_grub_emu): New variable.
4991 * configure.ac (--enable-grub-emu): New option.
4992 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
4993 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
4994 * conf/i386-pc.rmk: Likewise.
4995 * conf/powerpc-ieee1275.rmk: Likewise.
4996 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
4998 2006-12-12 Marco Gerards <marco@gnu.org>
5000 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5002 * kern/env.c (grub_env_unset): Don't free the member `value' when
5003 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5006 * normal/main.c (current_menu): Removed.
5007 (free_menu): Unset the `menu' environment variable.
5008 (grub_normal_menu_addentry): Make use of the environment variable
5009 `menu', instead of using the global `current_menu'. Allocate
5010 memory for the sourcecode of this entry.
5011 (read_config_file): New argument `nested', changed all callers.
5012 Only in the case of a new context, initialize a new menu. Set the
5013 `menu' environment variable.
5014 (grub_normal_execute): Don't set and unset the environment
5015 variable `menu' here anymore. Only free the menu when leaving the
5018 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5021 2006-12-11 Marco Gerards <marco@gnu.org>
5023 * normal/menu_entry.c (run): Fix off by one bug so the last line
5024 is executed. Move the loader check to outside the loop.
5026 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
5028 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5030 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
5032 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5033 the number of sectors. Reported by Andrey Shuvikov
5034 <mr_hyro@yahoo.com>.
5036 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
5038 * kern/disk.c (grub_disk_read): When there is a read error, always
5039 try to read only the necessary data.
5041 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5043 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5045 [GRUB_UTIL] (grub_raid_fini): Likewise.
5046 [GRUB_UTIL] (grub_lvm_init): Likewise.
5047 [GRUB_UTIL] (grub_lvm_fini): Likewise.
5048 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5049 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5050 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5051 and grub_raid_fini().
5053 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5055 * include/grub/types.h (__unused): Rename to UNUSED.
5056 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5057 (grub_elf64_size): Likewise.
5059 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5061 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5062 grub_error_push and grub_error_pop in the error-handling path.
5063 (grub_elf32_load_segment): Only call grub_file_read with non-zero
5066 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5068 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5069 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5070 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5071 (kernel_elf_SOURCES): Likewise.
5072 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5073 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5074 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5075 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5076 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5077 (elf_mod_SOURCES): New variable.
5078 (elf_mod_CFLAGS): Likewise.
5079 (elf_mod_LDFLAGS): Likewise.
5080 * include/grub/types.h (__unused): New macro.
5081 * include/grub/elfload.h: New file.
5082 * kern/elf.c: Likewise.
5083 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5084 (ELF32_LOADMASK): New macro.
5085 (ELF64_LOADMASK): Likewise.
5087 (grub_linux_load32): New function.
5088 (grub_linux_load64): Likewise.
5089 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5090 Use grub_elf_t instead of grub_file_t.
5092 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
5094 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5095 `catch_result' to struct set_color_args.
5097 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5099 * normal/menu.c: Include grub/script.h.
5100 * normal/menu_entry.c: Likewise.
5101 * include/grub/normal.h: Do not include grub/script.h.
5103 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5105 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5107 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5109 * kern/disk.c (grub_disk_open): Print debug messages when opening a
5111 (grub_disk_close): Print debug messages when closing a disk.
5112 (grub_disk_read): Print debug messages when disk read fails.
5113 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5115 * kern/partition.c: Include misc.h.
5116 (grub_partition_iterate): Print debug messages when detecting
5119 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5121 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5123 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5125 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
5127 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5128 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5130 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
5132 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5133 instead of sizeof(lv). Patch by Michael Guntsche.
5135 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
5137 * disk/lvm.c: Rename VGS to VG_LIST.
5138 (grub_lvm_iterate): Change VGS->LV to VG-LV.
5139 (grub_lvm_open): Likewise.
5140 Thanks to Michael Guntsche for finding this bug.
5142 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5144 * configure.ac (AC_INIT): Bumped to 1.95.
5146 2006-10-14 Robert Millan <rmh@aybabtu.com>
5148 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5149 with "/dev/.static/dev/md".
5151 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5153 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5154 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5155 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5156 DRIVE_NAME are always freed.
5158 * util/i386/pc/biosdisk.c (make_device_name): Add one into
5159 DOS_PART, as a DOS partition is counted from one instead of zero
5160 now. Reported by Robert Millan.
5162 2006-10-14 Robert Millan <rmh@aybabtu.com>
5164 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5165 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5166 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5167 string returned by grub_guess_root_device.
5168 * util/i386/pc/grub-setup.c: Likewise.
5169 * util/i386/pc/grub-probefs.c: Likewise.
5171 * util/i386/pc/grub-probefs.c: Rename to ...
5172 * util/i386/pc/grub-probe.c: ... this.
5173 * DISTLIST: Remove grub-probefs, add grub-probe.
5174 * conf/i386-efi.rmk: Likewise.
5175 * conf/i386-pc.rmk: Likewise.
5176 * util/i386/pc/grub-install.in: Likewise.
5178 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5179 choose which information we want to print.
5181 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5183 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5184 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5185 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5186 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5187 video/readers/tga.c and video/i386/pc/vbeutil.c.
5189 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
5191 Added support for RAID and LVM.
5193 * disk/lvm.c: New file.
5194 * disk/raid.c: Likewise.
5195 * include/grub/lvm.h: Likewise.
5196 * include/grub/raid.h: Likewise.
5197 * include/grub/util/lvm.h: Likewise.
5198 * include/grub/util/raid.h: Likewise.
5199 * util/lvm.c: Likewise.
5200 * util/raid.c: Likewise.
5202 * include/grub/disk.h (grub_disk_dev_id): Add
5203 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
5204 (grub_disk_get_size): New prototype.
5205 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
5206 returns a partition.
5207 (grub_disk_get_size): New function.
5209 * kern/i386/pc/init.c (make_install_device): Copy the prefix
5210 verbatim if grub_install_dos_part is -2.
5212 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
5215 * util/i386/pc/grub-setup.c (setup): New argument
5216 MUST_EMBED. Force embedding of GRUB when the argument is
5217 true. Close FILE before returning.
5218 (main): Add support for RAID and LVM.
5220 * conf/common.rmk: Add RAID and LVM modules.
5221 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
5223 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
5225 * kern/misc.c (grub_strstr): New function.
5226 * include/grub/misc.h (grub_strstr): New prototype.
5228 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
5230 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
5232 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
5234 * kern/misc.c (grub_strtoull): Guess the base only if not
5237 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5239 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
5242 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5244 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
5246 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
5247 Remove `flags' argument. All callers changed.
5248 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
5249 (IEEE1275_IHANDLE_INVALID): New variable.
5250 (IEEE1275_CELL_INVALID): New variable.
5251 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5252 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
5253 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
5254 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
5255 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
5256 codes from Open Firmware. All callers updated.
5257 (grub_ieee1275_next_property): Directly return Open Firmware return
5259 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5260 Standardize error checking from `grub_ieee1275_get_property'.
5261 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
5262 `devalias' to `aliases'. Correct comments. Consolidate error paths.
5264 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
5266 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
5267 `instance_to_package_args' to `instance_to_path_args'.
5269 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
5270 `grub_ieee1275_chosen'.
5272 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
5273 `grub_ieee1275_interpret'.
5275 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
5277 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
5279 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
5281 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
5282 (__cmpdi): Likewise.
5284 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
5285 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
5288 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
5290 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
5291 to type `grub_ssize_t'.
5292 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
5294 2006-09-22 Marco Gerards <marco@gnu.org>
5296 * normal/script.c (grub_script_create_cmdmenu): Skip leading
5299 2006-09-22 Marco Gerards <marco@gnu.org>
5301 * commands/echo.c: New file.
5303 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
5305 * conf/common.rmk (echo_mod_SOURCES): New variable.
5306 (echo_mod_CFLAGS): Likewise.
5307 (echo_mod_LDFLAGS): Likewise.
5309 2006-09-22 Marco Gerards <marco@gnu.org>
5311 * normal/main.c (get_line): Malloc memory instead of using
5312 preallocated memory. Removed the arguments `cmdline' and
5313 `max_len'. Updated all callers.
5315 2006-09-22 Marco Gerards <marco@gnu.org>
5317 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
5318 (normal_mod_DEPENDENCIES): Likewise.
5320 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
5321 (normal_mod_DEPENDENCIES): Likewise.
5323 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
5325 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
5327 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
5329 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
5330 (normal_mod_DEPENDENCIES): Likewise.
5331 * conf/i386-pc.mk: Regenerate.
5332 * conf/i386-efi.mk: Likewise
5333 * conf/common.mk: Likewise.
5334 * conf/powerpc-ieee1275.mk: Likewise.
5335 * conf/sparc64-ieee1275.mk: Likewise.
5337 2006-09-22 Robert Millan <rmh@aybabtu.com>
5339 Sync with i386 version.
5340 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
5341 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
5343 2006-09-21 Robert Millan <rmh@aybabtu.com>
5345 Import from GRUB Legacy (lib/device.c):
5346 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
5347 (init_device_map) [__linux__]: Add support for I2O devices.
5349 2006-09-14 Marco Gerards <marco@gnu.org>
5351 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
5354 2006-09-14 Robert Millan <rmh@aybabtu.com>
5356 * util/i386/pc/grub-install.in: Skip menu.lst when removing
5359 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
5361 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
5362 before adding it to device.map.
5364 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
5366 * genmk.rb: Let GCC generate dependencies the first time it
5367 compiles a file; using the -MD option.
5368 * conf/common.mk: Regenerate.
5369 * conf/i386-pc.mk: Likewise.
5370 * conf/i386-efi.mk: Likewise.
5371 * conf/powerpc-ieee1275.mk: Likewise.
5372 * conf/sparc64-ieee1275.mk: Likewise.
5374 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
5376 Move the prototypes of grub_setjmp and grub_longjmp to
5377 cpu/setjmp.h, so that each architecture may specify different
5380 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
5381 (grub_longjmp): Likewise.
5382 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
5383 (grub_longjmp): Likewise.
5384 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
5385 (grub_longjmp): Likewise.
5387 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
5388 [!GRUB_UTIL] (grub_longjmp): Removed.
5390 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
5392 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
5393 "color!" method does not return any value.
5395 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5397 * include/grub/bitmap.h: New file.
5399 * include/grub/i386/pc/vbeutil.h: Likewise.
5401 * video/bitmap.c: Likewise.
5403 * video/readers/tga.c: Likewise.
5405 * video/i386/pc/vbeutil.c: Likewise.
5407 * commands/videotest.c: Code cleanup and updated to reflect to new
5410 * term/gfxterm.c: Likewise.
5412 * video/video.c: Likewise.
5414 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
5415 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
5416 (bitmap_mod_SOURCES): New entry.
5417 (bitmap_mod_CFLAGS): Likewise.
5418 (bitmap_mod_LDFLAGS): Likewise.
5419 (tga_mod_SOURCES): Likewise.
5420 (tga_mod_CFLAGS): Likewise.
5421 (tga_mod_LDFLAGS): Likewise.
5423 * include/grub/video.h (grub_video_blit_operators): New enum type.
5424 (grub_video_render_target): Changed as forward declaration and moved
5425 actual definition to be video driver specific.
5426 (grub_video_adapter.blit_bitmap): Added blitting operator.
5427 (grub_video_adapter.blit_render_target): Likewise.
5428 (grub_video_blit_bitmap): Likewise.
5429 (grub_video_blit_render_target): Likewise.
5431 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
5432 driver specific render target definition.
5433 (grub_video_vbe_map_rgba): Added driver internal helper.
5434 (grub_video_vbe_unmap_color): Updated to use
5435 grub_video_i386_vbeblit_info.
5436 (grub_video_vbe_get_video_ptr): Likewise.
5438 * include/grub/i386/pc/vbeblit.h
5439 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
5440 grub_video_i386_vbeblit_info.
5441 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5442 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5443 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5444 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5445 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5446 (grub_video_i386_vbeblit_index_index): Likewise.
5447 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
5448 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5449 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5450 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
5452 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
5455 * video/i386/pc/vbeblit.c: Updated to reflect changes on
5456 include/grub/i386/pc/vbeblit.h.
5458 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
5459 Updated to use grub_video_i386_vbeblit_info.
5460 (grub_video_i386_vbefill_R8G8B8): Likewise.
5461 (grub_video_i386_vbefill_index): Likewise.
5462 (grub_video_i386_vbefill): Added generic filler.
5464 * video/i386/pc/vbefill.c: Updated to reflect changes on
5465 include/grub/i386/pc/vbefill.h.
5467 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
5468 grub_video_i386_vbeblit_info.
5469 (grub_video_vbe_unmap_color): Likewise.
5470 (grub_video_vbe_blit_glyph): Likewise.
5471 (grub_video_vbe_scroll): Likewise.
5472 (grub_video_vbe_draw_pixel): Removed function.
5473 (grub_video_vbe_get_pixel): Likewise.
5474 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
5475 updated code to use it.
5476 (common_blitter): Added common blitter for render target and bitmap.
5477 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
5478 (grub_video_vbe_blit_render_target): Likewise.
5480 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
5482 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
5483 is in text mode if there is no console control protocol instance
5486 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5488 * include/grub/video.h: Code cleanup.
5490 * include/grub/i386/pc/vbe.h: Likewise.
5492 * video/i386/pc/vbe.c: Likewise.
5494 * video/i386/pc/vbeblit.c: Likewise.
5496 * video/i386/pc/vbefill.c: Likewise.
5498 * video/video.c: Likewise. Also added more comments.
5500 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5502 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
5503 (struct grub_biosdisk_dap): Likewise.
5505 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
5506 linkage settings for all functions.
5508 2006-07-12 Marco Gerards <marco@gnu.org>
5510 * configure.ac (--enable-mm-debug): Fix typo.
5512 * genkernsyms.sh.in: Use proper quoting for `CC'.
5514 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
5516 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
5517 (normal_mod_ASFLAGS): Remove "-m32".
5519 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
5521 * util/misc.c: Include config.h.
5522 [!HAVE_MEMALIGN]: Do not include malloc.h.
5523 (grub_memalign): Use posix_memalign, if present. Then, use
5524 memalign, if present. Otherwise, emit an error.
5526 * util/grub-emu.c: Do not include malloc.h.
5528 * include/grub/util/misc.h: Include unistd.h. This is required for
5529 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
5530 D. Eades III <hde@foobar-qux.org>.
5532 * configure.ac (AC_GNU_SOURCE): Added.
5533 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
5536 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
5538 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
5539 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
5541 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
5543 * include/grub/types.h (grub_host_addr_t): Rename to
5545 (grub_host_off_t): Rename to grub_target_off_t.
5546 (grub_host_size_t): Rename to grub_target_size_t.
5547 (grub_host_ssize_t): Rename to grub_target_ssize_t.
5548 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
5550 * include/grub/kernel.h (struct grub_module_header): Change type
5551 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
5552 (grub_module_info): Likewise.
5554 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5556 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
5557 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
5558 Velazquez <jesus.velazquez@gmail.com>.
5560 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5562 Count partitions from 1 instead of 0 in the string representation
5563 of partitions. Still use 0-based internally.
5565 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
5566 (sun_partition_map_iterate): Use grub_partition_t instead of
5567 struct grub_partition *. Cast DESC->START_CYLINDER to
5568 grub_uint64_t after converting the endian.
5569 (sun_partition_map_probe): Subtract 1 for PARTNUM.
5570 (sun_partition_map_get_name): Add 1 to P->INDEX.
5572 * partmap/pc.c (grub_partition_parse): Subtract 1 for
5574 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
5576 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
5577 zero instead of one.
5578 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
5579 (gpt_partition_map_get_name): Add 1 into P->INDEX.
5581 * partmap/apple.c (apple_partition_map_iterate): Change the type
5583 (apple_partition_map_probe): Subtract 1 for PARTNUM.
5584 (apple_partition_map_get_name): Add 1 into P->INDEX.
5586 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
5588 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
5589 calculate the offset of a partition.
5590 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
5591 (amiga_partition_map_get_name): Add 1 into P->INDEX.
5593 * partmap/acorn.c (acorn_partition_map_find): Change the type of
5594 SECTOR to grub_disk_addr_t.
5595 (acorn_partition_map_iterate): Likewise.
5596 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
5597 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
5599 (acorn_partition_map_get_name): Add 1 into P->INDEX.
5601 * kern/i386/pc/init.c (make_install_device): Add 1 into
5602 GRUB_INSTALL_DOS_PART.
5604 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
5607 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5609 Clean up the code to support 64-bit addressing in disks and
5610 files. This change is not enough for filesystems yet.
5612 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
5613 type of "start" to grub_uint64_t.
5614 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
5615 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
5616 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
5619 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
5620 to grub_disk_addr_t.
5622 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
5625 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5627 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
5630 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
5632 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
5634 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
5636 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
5637 to grub_off_t, to detect an error from grub_file_seek.
5638 (grub_multiboot_load_elf32): Likewise.
5640 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
5641 maximum unsigned long value when an overflow is detected.
5642 (grub_strtoull): New function.
5643 (grub_divmod64): Likewise.
5644 (grub_lltoa): use grub_divmod64.
5646 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
5648 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
5649 the pointer to next character. Use grub_strtoull instead of
5651 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
5652 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
5655 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
5656 return value is signed.
5657 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
5658 test if OFFSET is less than zero, as OFFSET is unsigned now.
5660 * kern/disk.c (struct grub_disk_cache): Change the type of
5661 "sector" to grub_disk_addr_t.
5662 (grub_disk_cache_get_index): Change the type of SECTOR to
5663 grub_disk_addr_t. Calculate the hash with SECTOR casted to
5664 unsigned after shifting.
5665 (grub_disk_cache_invalidate): Change the type of SECTOR to
5667 (grub_disk_cache_unlock): Likewise.
5668 (grub_disk_cache_store): Likewise.
5669 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
5670 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
5671 grub_disk_addr_t and grub_uint64_t, respectively.
5672 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
5673 body, as the value of OFFSET is tweaked by
5674 grub_disk_check_range. Change the types of START_SECTOR, LEN and
5675 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
5677 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
5678 body, as the value of OFFSET is tweaked by
5679 grub_disk_check_range. Change the types of LEN and N to
5682 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
5683 and "saved_offset" to grub_off_t.
5684 (test_header): Cast BUF to char *.
5685 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
5687 (grub_gzio_read): Change the types of OFFSET and SIZE to
5688 grub_off_t and grub_size_t, respectively.
5690 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
5692 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
5693 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
5694 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
5695 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
5696 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
5698 * include/grub/types.h (grub_off_t): Unconditionally set to
5700 (grub_disk_addr_t): Changed to grub_uint64_t.
5702 * include/grub/partition.h (struct grub_partition): Change the
5703 types of "start", "len" and "offset" to grub_disk_addr_t,
5704 grub_uint64_t and grub_disk_addr_t, respectively.
5705 (grub_partition_get_start): Return grub_disk_addr_t.
5706 (grub_partition_get_len): Return grub_uint64_t.
5708 * include/grub/misc.h (grub_strtoull): New prototype.
5709 (grub_divmod64): Likewise.
5711 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
5712 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
5713 grub_off_t, respectively.
5714 All callers and references changed.
5716 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
5717 grub_size_t in "read".
5718 All callers and references changed.
5720 * include/grub/file.h (struct grub_file): Change the types of
5721 "offset" and "size" to grub_off_t and grub_off_t,
5722 respectively. Change the type of SECTOR to grub_disk_addr_t in
5724 (grub_file_read): Change the type of LEN to grub_size_t.
5725 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
5727 (grub_file_size): Return grub_off_t.
5728 (grub_file_tell): Likewise.
5729 All callers and references changed.
5731 * include/grub/disk.h (struct grub_disk_dev): Change the types of
5732 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
5734 (struct grub_disk): Change the type of "total_sectors" to
5735 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
5737 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
5738 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
5739 (grub_disk_write): Likewise.
5740 All callers and references changed.
5742 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
5743 char * for grub_strncmp to silence gcc.
5744 (grub_iso9660_mount): Likewise.
5745 (grub_iso9660_mount): Likewise.
5746 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
5748 (grub_iso9660_iterate_dir): Likewise.
5749 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
5751 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
5752 LEN to grub_disk_addr_t and grub_size_t, respectively.
5754 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5756 * fs/jfs.c (grub_jfs_read_file): Likewise.
5758 * fs/minix.c (grub_jfs_read_file): Likewise.
5760 * fs/sfs.c (grub_jfs_read_file): Likewise.
5762 * fs/ufs.c (grub_jfs_read_file): Likewise.
5764 * fs/xfs.c (grub_jfs_read_file): Likewise.
5766 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
5767 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
5770 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
5771 BLKNR to -1 instead of returning GRUB_ERRNO.
5772 (grub_ext2_read_file): Change the types of SECTOR and
5773 LEN to grub_disk_addr_t and grub_size_t, respectively.
5775 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
5776 LEN to grub_disk_addr_t and grub_size_t, respectively.
5778 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
5781 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
5782 string. Do not cast SECTOR explicitly.
5784 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
5785 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
5786 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
5787 grub_disk_addr_t and grub_size_t, respectively. If the sector is
5788 over 2TB and LBA mode is not supported, raise an error.
5789 (get_safe_sectors): New function.
5790 (grub_biosdisk_read): Use get_safe_sectors.
5791 (grub_biosdisk_write): Likewise.
5793 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
5794 (grub_efidisk_write): Likewise.
5796 * disk/loopback.c (delete_loopback): Cosmetic changes.
5797 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
5799 (grub_loopback_open): Likewise.
5800 (grub_loopback_read): Likewise. Also, change the type of POS to
5801 grub_off_t, and fix the usage of grub_memset.
5803 * commands/i386/pc/play.c: Include grub/machine/time.h.
5805 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
5808 * commands/configfile.c: Include grub/env.h.
5810 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
5811 GRUB_ERRNO directly instead. Change the type of POS to
5812 grub_off_t. Follow the coding standard.
5814 * commands/blocklist.c: Include grub/partition.h.
5815 (grub_cmd_blocklist): Return an error if the underlying device is
5816 not a disk. Take the starting sector of a partition into account,
5817 if a partition is used.
5819 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
5821 (lba_mode): Support 64-bit addresses.
5822 (chs_mode): Likewise.
5823 (copy_buffer): Adapted to the new offsets of a length field and a
5825 (blocklist_default_start): Allocate 64-bit space.
5827 * boot/i386/pc/boot.S (force_lba): Removed.
5828 (boot_drive): Moved to under KERNEL_SECTOR.
5829 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
5831 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
5833 (lba_mode): Refactored to support a 64-bit address. More size
5835 (setup_sectors): Likewise.
5837 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5839 * DISTLIST: Added include/grub/i386/linux.h. Removed
5840 include/grub/i386/pc/linux.h
5842 * configure.ac (AC_INIT): Bumped to 1.94.
5844 * config.guess: Updated from gnulib.
5845 * config.sub: Likewise.
5846 * install-sh: Likewise.
5847 * mkinstalldirs: Likewise.
5849 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5851 * conf/common.rmk (grub_modules_init.lst): Depended on
5852 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
5855 * genmk.rb (PModule::rule): Reverted the previous change.
5857 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5859 * conf/common.rmk (grub_modules_init.lst): Depends on
5860 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
5861 that the target does not exist before producing.
5862 (grub_modules_init.h): Remove the target before generating.
5863 (grub_emu_init.c): Likewise.
5865 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
5867 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
5869 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
5870 for the target-specific tests. Make sure that we also have the
5871 up-to-date target variables for those tests.
5873 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5875 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
5876 (PModule::rule): Likewise.
5878 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5880 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
5881 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
5882 target-specific flags should be prefixed.
5883 (PModule::rule): Likewise.
5885 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
5887 * configure.ac (CMP): Check if cmp is available explicitly.
5889 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
5891 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
5892 (target_cpu): New variable.
5893 (pkglibdir): Use target_cpu instead of host_cpu.
5895 * util/i386/pc/grub-install.in (host_cpu): Removed.
5896 (target_cpu): New variable.
5897 (pkglibdir): Use target_cpu instead of host_cpu.
5899 * util/genmoddep.c: Removed.
5901 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
5902 instead of GRUB_HOST_SIZEOF_VOID_P.
5903 * kern/dl.c: Likewise.
5905 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
5907 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5908 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5909 (GRUB_TARGET_SIZEOF_LONG): ... this.
5910 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5911 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5912 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5914 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5915 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5916 (GRUB_TARGET_SIZEOF_LONG): ... this.
5917 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5918 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5919 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
5921 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
5922 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
5923 (GRUB_TARGET_SIZEOF_LONG): ... this.
5924 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
5925 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
5927 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
5928 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
5929 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
5930 instead of GRUB_HOST_SIZEOF_LONG.
5931 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
5932 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
5933 GRUB_CPU_WORDS_BIGENDIAN.
5934 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
5935 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
5938 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
5939 (genmoddep_SOURCES): Likewise.
5940 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
5941 (genmoddep_SOURCES): Likewise.
5942 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
5943 (genmoddep_SOURCES): Likewise.
5944 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
5946 (genmoddep_SOURCES): Likewise.
5948 * genmoddep.awk: New file.
5950 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
5951 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
5952 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
5953 (PModule::rule): Likewise.
5954 (Program::rule): Likewise.
5955 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
5956 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
5959 * configure.ac: Rewritten intensively to use host and target
5960 instead of build and host, respectively.
5962 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
5963 (host_cpu): Removed.
5964 (target_cpu): New variable.
5965 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
5966 (BUILD_CC): Removed.
5967 (BUILD_CFLAGS): Likewise.
5968 (BUILD_CPPFLAGS): Likewise.
5969 (TARGET_CC): New variable.
5970 (TARGET_CFLAGS): Likewise.
5971 (TARGET_CPPFLAGS): Likewise.
5972 (TARGET_LDFLAGS): Likewise.
5974 (include): Use target_cpu instead of host_cpu.
5975 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
5977 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
5979 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
5981 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
5982 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
5983 field 'false' to 'exec_on_false'.
5984 (grub_script_create_cmdif): Renamed argument names to reflect above
5987 * normal/execute.c (grub_script_execute_cmdif): Likewise.
5989 * normal/script.c (grub_script_create_cmdif): Likewise.
5991 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
5993 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
5995 (grub_hfsplus_btree_recptr): Likewise.
5996 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
5997 FILEBLOCK both to pass a block number and store next block
5999 (grub_hfsplus_read_block): Rewritten heavily to support an extent
6000 overflow file correctly. Specify errors appropriately, because
6001 fshelp expects that GRUB_ERRNO is set when fails. Reuse
6002 grub_hfsplus_btree_recptr to get the pointer to a found key.
6003 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6006 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6008 (_linux_mod_SOURCES): New variable.
6009 (_linux_mod_CFLAGS): Likewise.
6010 (_linux_mod_LDFLAGS): Likewise.
6011 (linux_mod_SOURCES): Likewise.
6012 (linux_mod_CFLAGS): Likewise.
6013 (linux_mod_LDFLAGS): Likewise.
6015 * DISTLIST: Added loader/i386/efi/linux.c,
6016 loader/i386/efi/linux_normal.c and
6017 include/grub/i386/efi/loader.h.
6019 * loader/i386/efi/linux.c: New file.
6020 * loader/i386/efi/linux_normal.c: Likewise.
6021 * include/grub/i386/efi/loader.h: Likewise.
6023 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
6025 * commands/blocklist.c: New file.
6027 * DISTLIST: Added commands/blocklist.c.
6029 * term/efi/console.c (grub_console_highlight_color): Use a lighter
6030 color for the background, and a darker color for the foreground.
6031 (grub_console_checkkey): Return READ_KEY.
6032 (grub_console_cls): Set the background to
6033 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6035 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6037 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6038 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6040 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6043 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6044 BG. The spec is wrong again.
6046 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6048 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6050 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6051 commands/blocklist.c.
6052 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6054 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6055 (blocklist_mod_SOURCES): New variable.
6056 (blocklist_mod_CFLAGS): Likewise.
6057 (blocklist_mod_LDFLAGS): Likewise.
6059 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
6061 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6063 (lba_mode): Use %eax more intensively to reduce the code size.
6065 2006-05-20 Marco Gerards <marco@gnu.org>
6067 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6069 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
6071 (script): Accept leading newlines.
6072 (newlines): New rule to describe 0 or more newlines.
6073 (commands): Accept `command' with trailing newline. Fixed the
6074 order in which arguments were passed to `grub_script_add_cmd'.
6075 Accept commands separated by newlines.
6076 (function): Changed to accept newlines.
6077 (menuentry) Rewritten.
6079 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6080 front of the list, instead of to the end.
6082 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
6084 * util/i386/pc/grub-install.in (bindir): New variable.
6085 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6086 Shaver <lbgwjl@gmail.com>.
6088 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
6090 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6091 grub/machine/linux.h
6092 * loader/i386/pc/linux.c: Likewise.
6094 * include/grub/i386/pc/linux.h: Moved to ...
6095 * include/grub/i386/linux.h: ... here.
6097 * include/grub/i386/linux.h (struct linux_kernel_params): New
6100 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
6102 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6104 (grub_video_vbe_blit_glyph): Likewise.
6105 (grub_video_vbe_blit_bitmap): Likewise.
6106 (grub_video_vbe_blit_render_target): Likewise.
6108 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
6110 * configure.ac (--with-platform): Properly quote the square
6113 2006-05-08 Marco Gerards <marco@gnu.org>
6115 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6117 (kernel_elf_HEADERS): ...to this. Updated all users.
6118 (grubof_symlist.c): Renamed from this...
6119 (kernel_elf_symlist.c): ...to this. Updated all users.
6120 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6121 (grubof_SOURCES): Renamed from this...
6122 (kernel_elf_SOURCES): ...to this.
6123 (grubof_HEADERS): Renamed from this...
6124 (kernel_elf_HEADERS): ...to this.
6125 (grubof_CFLAGS): Renamed from this...
6126 (kernel_elf_CFLAGS): ...to this.
6127 (grubof_ASFLAGS): Renamed from this...
6128 (kernel_elf_ASFLAGS): ...to this.
6129 (grubof_LDFLAGS): Renamed from this...
6130 (kernel_elf_LDFLAGS): ...to this.
6132 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6134 (kernel_elf_HEADERS): ...to this. Updated all users.
6135 (grubof_symlist.c): Renamed from this...
6136 (kernel_elf_symlist.c): ...to this. Updated all users.
6137 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6138 (grubof_SOURCES): Renamed from this...
6139 (kernel_elf_SOURCES): ...to this.
6140 (grubof_HEADERS): Renamed from this...
6141 (kernel_elf_HEADERS): ...to this.
6142 (grubof_CFLAGS): Renamed from this...
6143 (kernel_elf_CFLAGS): ...to this.
6144 (grubof_ASFLAGS): Renamed from this...
6145 (kernel_elf_ASFLAGS): ...to this.
6146 (grubof_LDFLAGS): Renamed from this...
6147 (kernel_elf_LDFLAGS): ...to this.
6149 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6150 `kernel.elf' instead of `grubof'.
6152 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
6154 Add --with-platform to configure. Use pkglibdir instead of
6155 pkgdatadir. This is reported by Roger Leigh.
6157 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6158 (host_vendor): Likewise.
6159 (host_os): Likewise.
6160 (pkgdatadir): Likewise.
6161 (platform): New variable.
6162 (pkglibdir): Likewise.
6163 Use PKGLIBDIR instead of PKGDATADIR.
6165 * util/i386/pc/grub-install.in (datadir): Removed.
6166 (host_vendor): Likewise.
6167 (host_os): Likewise.
6168 (pkgdatadir): Likewise.
6169 (platform): New variable.
6170 (pkglibdir): Likewise.
6171 Use PKGLIBDIR instead of PKGDATADIR.
6173 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6174 instead of GRUB_DATADIR.
6176 * util/i386/pc/grub-mkimage.c (usage): Likewise.
6178 * util/i386/efi/grub-mkimage.c (usage): Likewise.
6181 * configure.ac (--with-platform): New option.
6182 Use PLATFORM instead of HOST_VENDOR to specify a platform.
6184 * Makefile.in: Include a makefile based on PLATFORM instead of
6186 (pkgdatadir): Not appended by the machine type.
6187 (pkglibdir): Appended by the machine type.
6188 (host_vendor): Removed.
6189 (platform): New variable.
6190 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6191 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6192 (uninstall): Likewise.
6194 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
6196 Use the environment context in the menu. Remove the commands
6197 "default" and "timeout", and use variables instead.
6199 * normal/menu.c: Include grub/env.h.
6200 (print_entry): Cast TITLE to silence gcc.
6201 (get_timeout): New function.
6202 (set_timeout): Likewise.
6203 (get_entry_number): Likewise.
6204 (run_menu): Use a default entry, a fallback entry and a timeout
6205 in the environment variables "default", "fallback" and
6206 "timeout". Also, tweak the default entry if it is not within the
6207 current menu entries.
6208 (grub_menu_run): Use a fallback entry in the environment variable
6211 * normal/main.c (read_config_file): Do not initialize
6212 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
6214 (grub_normal_execute): Use a data slot to store the menu.
6216 * include/grub/normal.h (struct grub_menu): Removed default_entry,
6217 fallback_entry and timeout.
6218 (struct grub_menu_list): Removed.
6219 (grub_menu_list_t): Likewise.
6220 (struct grub_context): Likewise.
6221 (grub_context_t): Likewise.
6222 (grub_context_get): Likewise.
6223 (grub_context_get_current_menu): Likewise.
6224 (grub_context_push_menu): Likewise.
6225 (grub_context_pop_menu): Likewise.
6226 (grub_default_init): Likewise.
6227 (grub_default_fini): Likewise.
6228 (grub_timeout_init): Likewise.
6229 (grub_timeout_fini): Likewise.
6231 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
6233 (normal_mod_SOURCES): Removed normal/context.c.
6235 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
6236 commands/default.c, commands/timeout.c and normal/context.c.
6237 (normal_mod_SOURCES): Removed normal/context.c.
6239 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
6240 commands/timeout.c and normal/context.c.
6241 (normal_mod_SOURCES): Removed normal/context.c.
6243 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
6244 commands/default.c, commands/timeout.c and normal/context.c.
6245 (normal_mod_SOURCES): Removed normal/context.c.
6247 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
6249 (default_mod_SOURCES): Removed.
6250 (default_mod_CFLAGS): Likewise.
6251 (default_mod_LDFLAGS): Likewise.
6252 (timeout_mod_SOURCES): Removed.
6253 (timeout_mod_CFLAGS): Likewise.
6254 (timeout_mod_LDFLAGS): Likewise.
6256 * DISTLIST: Removed commands/default.c, commands/timeout.c and
6259 * commands/default.c: Removed.
6260 * commands/timeout.c: Likewise.
6261 * normal/context.c: Likewise.
6263 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
6265 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
6267 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
6269 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
6270 "next" to "prev" for readability.
6271 (struct grub_env_sorted_var): New struct.
6272 (grub_env_context): Renamed to ...
6273 (initial_context): ... this.
6274 (grub_env_var_context): Renamed to ...
6275 (current_context): ... this.
6276 (grub_env_find): Look only at CURRENT_CONTEXT.
6277 (grub_env_context_open): Rewritten to copy exported variables from
6279 (grub_env_context_close): Rewritten according to the new
6280 scheme. Also, add an assertion to prevent the initial context from
6282 (grub_env_insert): Removed the code for the sorted list.
6283 (grub_env_remove): Likewise.
6284 (grub_env_export): Simply mark the variable with
6285 GRUB_ENV_VAR_GLOBAL.
6286 (grub_env_set): A cosmetic change for naming consistency.
6287 (grub_env_get): Likewise.
6288 (grub_env_unset): Likewise.
6289 (grub_env_iterate): Rewritten to sort variables within this
6291 (grub_register_variable_hook): Fixed for naming consistency. Call
6292 grub_env_find again, only if NAME is not found at the first time.
6293 (mangle_data_slot_name): New function.
6294 (grub_env_set_data_slot): Likewise.
6295 (grub_env_get_data_slot): Likewise.
6296 (grub_env_unset_data_slot): Likewise.
6298 * include/grub/env.h (grub_env_var_type): New enum.
6299 (GRUB_ENV_VAR_LOCAL): New constant.
6300 (GRUB_ENV_VAR_GLOBAL): Likewise.
6301 (GRUB_ENV_VAR_DATA): Likewise.
6302 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
6304 (grub_env_set): Replace VAR with NAME for consistency.
6305 (grub_register_variable_hook): Likewise.
6306 (grub_env_export): Specify the name of the argument.
6307 (grub_env_set_data_slot): New prototype.
6308 (grub_env_get_data_slot): Likewise.
6309 (grub_env_unset_data_slot): Likewise.
6311 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6313 Extend the loader so that GRUB can accept a loader which comes
6314 back to GRUB when a loaded image exits. Also, this change adds
6315 support for a chainloader on EFI.
6317 * term/efi/console.c: Include grub/misc.h.
6318 (grub_console_checkkey): Display a scan code on the top for
6319 debugging. This will be removed once the EFI port gets stable.
6320 Correct the scan code mapping.
6322 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
6323 allocate memory from larger regions, in order to reduce the number
6324 of allocated regions. Otherwise, the MacOSX loader panics.
6325 (filter_memory_map): Avoid less than 1MB for compatibility with
6327 (add_memory_regions): Allocate from the tail of a region, if
6328 possible, to avoid allocating a region near to 1MB, for the MacOSX
6331 * kern/efi/init.c (grub_efi_set_prefix): Specify
6332 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
6334 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
6335 argument IMAGE_HANDLE and specify it to get a loaded image.
6336 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
6337 grub_efi_get_loaded_image.
6338 (grub_efi_get_filename): Divide the length by the size of
6340 (grub_efi_get_device_path): New function.
6341 (grub_efi_print_device_path): Print End Device Path nodes. Divide
6342 the length by the size of grub_efi_char16_t for a file path device
6345 * kern/loader.c (grub_loader_noreturn): New variable.
6346 (grub_loader_set): Accept a new argument NORETURN. Set
6347 GRUB_LOADER_NORETURN to NORETURN.
6348 All callers changed.
6349 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
6352 * include/grub/efi/efi.h (grub_efi_get_device_path): New
6354 (grub_efi_get_loaded_image): Take an argument to specify an image
6357 * include/grub/loader.h (grub_loader_set): Added one more argument
6360 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
6361 instead of grub_efi_open_protocol.
6362 (grub_efidisk_get_device_name): Likewise.
6363 (grub_efidisk_close): Print a newline.
6364 (grub_efidisk_get_device_handle): Fixed to use
6365 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
6366 GRUB_EFI_DEVICE_PATH_TYPE.
6368 * disk/efi/efidisk.c (device_path_guid): Moved to ...
6369 * kern/efi/efi.c (device_path_guid): ... here.
6371 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
6373 (kernel_mod_HEADERS): Added efi/disk.h.
6374 (_chain_mod_SOURCES): New variable.
6375 (_chain_mod_CFLAGS): Likewise.
6376 (_chain_mod_LDFLAGS): Likewise.
6377 (chain_mod_SOURCES): Likewise.
6378 (chain_mod_CFLAGS): Likewise.
6379 (chain_mod_LDFLAGS): Likewise.
6381 * DISTLIST: Added include/grub/efi/chainloader.h,
6382 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
6384 * include/grub/efi/chainloader.h: New file.
6385 * loader/efi/chainloader.c: Likewise.
6386 * loader/efi/chainloader_normal.c: Likewise.
6388 2006-04-30 Marco Gerards <marco@gnu.org>
6390 * commands/configfile.c (grub_cmd_source): New function.
6391 (GRUB_MOD_INIT): Register the commands `source' and `.'.
6392 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
6394 2006-04-30 Marco Gerards <marco@gnu.org>
6396 * normal/execute.c (grub_script_execute_cmd): Change the return
6397 type to `grub_err_t'. Correctly return the error.
6398 (grub_script_execute_cmdline): In case a command line is not a
6399 command or a function, try to interpret it as an assignment.
6401 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6403 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
6404 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
6405 skip a node whose name is obviously invalid as UTF-16,
6406 i.e. contains a NUL character. Stop the iteration when the last
6407 directory entry is found. Instead of using the return value of
6408 grub_hfsplus_btree_iterate_node, store the value in RET and use
6409 it, because the iterator can be stopped by the last directory
6412 2006-04-30 Marco Gerards <marco@gnu.org>
6414 * include/grub/env.h (grub_env_export): New prototype. Reported
6415 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
6417 2006-04-30 Marco Gerards <marco@gnu.org>
6419 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
6420 size of the extents in a catalog file record.
6422 2006-04-29 Marco Gerards <marco@gnu.org>
6424 * commands/configfile.c (grub_cmd_configfile): Execute the
6425 configfile within its own context.
6427 * include/grub/env.h (grub_env_context_open): New prototype.
6428 (grub_env_context_close): Likewise.
6430 * kern/env.c (grub_env): Removed.
6431 (grub_env_sorted): Likewise.
6432 (grub_env_context): New variable.
6433 (grub_env_var_context): Likewise.
6434 (grub_env_find): Search both the active context and the global
6436 (grub_env_context_open): New function.
6437 (grub_env_context_close): Likewise.
6438 (grub_env_insert): Likewise.
6439 (grub_env_remove): Likewise.
6440 (grub_env_export): Likewise.
6441 (grub_env_set): Changed to use helper functions to avoid code
6443 (grub_env_iterate): Rewritten so both the current context and the
6444 global context are being used.
6446 * normal/command.c (export_command): New function.
6447 (grub_command_init): Register the `export' function.
6449 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
6451 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
6452 explicitly to suppress gcc's warnings.
6453 * fs/fat.c (grub_fat_find_dir): Likewise.
6454 (grub_fat_label): Likewise.
6455 * fs/xfs.c (grub_xfs_read_inode): Likewise.
6456 (grub_xfs_mount): Likewise.
6457 (grub_xfs_label): Likewise.
6458 * fs/affs.c (grub_affs_mount): Likewise.
6459 (grub_affs_label): Likewise.
6460 (grub_affs_iterate_dir): Likewise.
6461 * fs/sfs.c (grub_sfs_mount): Likewise.
6462 (grub_sfs_iterate_dir): Likewise.
6463 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
6464 * fs/hfs.c (grub_hfs_mount): Likewise.
6465 (grub_hfs_cmp_catkeys): Likewise.
6466 (grub_hfs_find_dir): Likewise.
6467 (grub_hfs_dir): Likewise.
6468 (grub_hfs_label): Likewise.
6469 * fs/jfs.c (grub_jfs_mount): Likewise.
6470 (grub_jfs_opendir): Likewise.
6471 (grub_jfs_getent): Likewise.
6472 (grub_jfs_lookup_symlink): Likewise.
6473 (grub_jfs_label): Likewise.
6474 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
6475 (grub_hfsplus_iterate_dir): Likewise.
6476 (grub_hfsplus_btree_iterate_node): Made static.
6478 * util/grub-emu.c (prefix): New variable.
6479 (grub_machine_set_prefix): New function.
6480 (main): Do not set the environment variable "prefix" here. Only
6481 set PREFIX, which is used later by grub_machine_set_prefix.
6483 * include/grub/video.h: Do not include grub/symbol.h.
6484 (grub_video_register): Not exported. This symbol is not defined in
6486 (grub_video_unregister): Likewise.
6487 (grub_video_iterate): Likewise.
6488 (grub_video_setup): Likewise.
6489 (grub_video_restore): Likewise.
6490 (grub_video_get_info): Likewise.
6491 (grub_video_get_blit_format): Likewise.
6492 (grub_video_set_palette): Likewise.
6493 (grub_video_get_palette): Likewise.
6494 (grub_video_set_viewport): Likewise.
6495 (grub_video_get_viewport): Likewise.
6496 (grub_video_map_color): Likewise.
6497 (grub_video_map_rgb): Likewise.
6498 (grub_video_map_rgba): Likewise.
6499 (grub_video_fill_rect): Likewise.
6500 (grub_video_blit_glyph): Likewise.
6501 (grub_video_blit_bitmap): Likewise.
6502 (grub_video_blit_render_target): Likewise.
6503 (grub_video_scroll): Likewise.
6504 (grub_video_swap_buffers): Likewise.
6505 (grub_video_create_render_target): Likewise.
6506 (grub_video_delete_render_target): Likewise.
6507 (grub_video_set_active_render_target): Likewise.
6509 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
6511 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
6513 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
6514 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6515 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6516 instead of $(srcdir)/genkernsyms.sh.
6518 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
6519 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6520 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6521 instead of $(srcdir)/genkernsyms.sh.
6523 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
6524 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6525 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6526 instead of $(srcdir)/genkernsyms.sh.
6528 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
6529 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6530 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6531 instead of $(srcdir)/genkernsyms.sh.
6533 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
6536 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
6538 (gensymlist.sh): New target.
6539 (genkernsyms.sh): Likewise.
6541 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
6542 genkernsyms.sh.in and gensymlist.sh.in.
6544 * genkernsyms.sh: Removed.
6545 * gensymlist.sh: Likewise.
6547 * genkernsyms.sh.in: New file.
6548 * gensymlist.sh.in: Likewise.
6550 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6552 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
6553 clobber "prefix", since we may have already set it manually.
6555 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6557 * kern/misc.c (abort): New alias for grub_abort.
6559 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
6561 A new machine-specific function "grub_machine_set_prefix" is
6562 defined. This is called after loading modules, so that a prefix
6563 initialization can use modules. Also, this change adds an
6564 intensive debugging feature for the memory manager via the
6565 configure option "--enable-mm-debug".
6567 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
6570 * kern/sparc64/ieee1275/init.c (abort): Removed.
6571 (grub_stop): Likewise.
6572 (grub_exit): New function.
6573 (grub_set_prefix): Renamed to ...
6574 (grub_machine_set_prefix): ... this.
6575 (grub_machine_init): Do not call grub_set_prefix.
6577 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
6578 (grub_machine_set_prefix): ... this.
6579 (grub_machine_init): Do not call grub_set_prefix.
6581 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
6582 (grub_machine_init): Do not set the prefix here.
6584 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
6586 * kern/efi/init.c: Include grub/mm.h.
6587 (grub_efi_set_prefix): New function.
6589 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
6590 (grub_efi_get_filename): New function.
6591 (grub_print_device_path): Renamed to ...
6592 (grub_efi_print_device_path): ... this.
6594 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
6595 [MM_DEBUG] (grub_realloc): Likewise.
6596 [MM_DEBUG] (grub_free): Likewise.
6597 [MM_DEBUG] (grub_memalign): Likewise.
6598 [MM_DEBUG] (grub_mm_debug): New variable.
6599 [MM_DEBUG] (grub_debug_malloc): New function.
6600 [MM_DEBUG] (grub_debug_free): New function.
6601 [MM_DEBUG] (grub_debug_realloc): New function.
6602 [MM_DEBUG] (grub_debug_memalign): New function.
6604 * kern/misc.c (grub_abort): Print a newline to distinguish
6607 * kern/main.c (grub_main): Call grub_machine_set_prefix and
6608 grub_set_root_dev after loading modules. This is necessary when
6609 setting a prefix depends on modules.
6611 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
6612 (grub_efi_print_device_path): ... this.
6613 (grub_efi_get_filename): New prototype.
6614 (grub_efi_set_prefix): Likewise.
6616 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
6618 (grub_efidisk_get_device_handle): New prototype.
6619 (grub_efidisk_get_device_name): Likewise.
6621 * include/grub/mm.h: Include config.h.
6622 (MM_DEBUG): Removed.
6623 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
6624 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
6625 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
6626 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
6627 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
6628 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
6629 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
6630 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
6631 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
6633 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
6635 * disk/efi/efidisk.c: Include grub/partition.h.
6636 (iterate_child_devices): New function.
6637 (add_device): First, compare only last device path nodes, so that
6638 devices are sorted by the types.
6639 (grub_efidisk_get_device_handle): New function.
6640 (grub_efidisk_get_device_name): Likewise.
6642 * configure.ac (--enable-mm-debug): New option to enable the
6643 memory manager debugging feature. This makes the binary much
6644 bigger, so is disabled by default.
6646 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
6648 Use grub_abort instead of grub_stop, and grub_exit must be
6649 define in each architecture now. Also, this change adds support
6652 * util/i386/pc/grub-probefs.c: Include grub/term.h.
6653 (grub_getkey): New function.
6654 (grub_term_get_current): Likewise.
6656 * util/i386/pc/grub-setup.c: Include grub/term.h.
6657 (grub_getkey): New function.
6658 (grub_term_get_current): Likewise.
6660 * util/misc.c (grub_stop): Renamed to ...
6661 (grub_exit): ... this.
6663 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
6664 (grub_exit): ... this.
6665 (grub_machine_init): Use grub_abort instead of abort.
6666 (grub_stop): Removed.
6668 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
6671 * kern/i386/pc/startup.S (grub_exit): New function.
6672 (cold_reboot): New label.
6674 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
6675 (grub_efi_init): Call grub_efidisk_init.
6676 (grub_efi_fini): Call grub_efidisk_fini.
6678 * kern/efi/efi.c: Include grub/mm.h.
6679 (grub_efi_console_control_guid): Renamed to ...
6680 (console_control_guid): ... this.
6681 (grub_efi_loaded_image_guid): Renamed to ...
6682 (loaded_image_guid): ... this.
6683 (grub_efi_locate_handle): New function.
6684 (grub_efi_open_protocol): Likewise.
6685 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
6686 GRUB_EFI_CONSOLE_CONTROL_GUID.
6687 (grub_efi_exit): Removed.
6688 (grub_stop): Likewise.
6689 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
6690 (grub_exit): New function.
6691 (grub_print_device_path): Likewise.
6693 * kern/rescue.c (grub_rescue_cmd_exit): New function.
6694 (grub_enter_rescue_mode): Register "exit".
6696 * kern/misc.c (grub_real_dprintf): A cosmetic change.
6697 (grub_abort): New function.
6699 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
6701 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
6703 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
6705 * include/grub/efi/efi.h (grub_efi_exit): Removed.
6706 (grub_print_device_path): New prototype.
6707 (grub_efi_locate_handle): Likewise.
6708 (grub_efi_open_protocol): Likewise.
6710 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
6711 * disk/efi/efidisk.c: Likewise.
6713 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
6715 * include/grub/efi/console_control.h
6716 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
6718 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
6719 last 8 bytes as an array.
6720 (GRUB_EFI_DISK_IO_GUID): New macro.
6721 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
6722 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
6723 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
6725 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
6726 (struct grub_efi_device_path): Rename the member "sub_type" to
6728 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
6729 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
6730 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
6731 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
6732 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
6733 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
6734 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
6735 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
6736 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
6737 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
6738 (struct grub_efi_pci_device_path): New structure.
6739 (grub_efi_pci_device_path_t): New type.
6740 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
6741 (struct grub_efi_pccard_device_path): New structure.
6742 (grub_efi_pccard_device_path_t): New type.
6743 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
6744 (struct grub_efi_memory_mapped_device_path): New structure.
6745 (grub_efi_memory_mapped_device_path_t): New type.
6746 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
6747 (struct grub_efi_vendor_device_path): New structure.
6748 (grub_efi_vendor_device_path_t): New type.
6749 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
6750 (struct grub_efi_controller_device_path): New structure.
6751 (grub_efi_controller_device_path_t): New type.
6752 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
6753 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
6754 (struct grub_efi_acpi_device_path): New structure.
6755 (grub_efi_acpi_device_path_t): New type.
6756 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
6757 (struct grub_efi_expanded_acpi_device_path): New structure.
6758 (grub_efi_expanded_acpi_device_path_t): New type.
6759 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
6760 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
6761 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
6762 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
6763 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
6764 (struct grub_efi_atapi_device_path): New structure.
6765 (grub_efi_atapi_device_path_t): New type.
6766 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
6767 (struct grub_efi_fibre_channel_device_path): New structure.
6768 (grub_efi_fibre_channel_device_path_t): New type.
6769 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
6770 (struct grub_efi_1394_device_path): New structure.
6771 (grub_efi_1394_device_path_t): New type.
6772 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
6773 (struct grub_efi_usb_device_path): New structure.
6774 (grub_efi_usb_device_path_t): New type.
6775 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
6776 (struct grub_efi_usb_class_device_path): New structure.
6777 (grub_efi_usb_class_device_path_t): New type.
6778 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
6779 (struct grub_efi_i2o_device_path): New structure.
6780 (grub_efi_i2o_device_path_t): New type.
6781 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
6782 (struct grub_efi_mac_address_device_path): New structure.
6783 (grub_efi_mac_address_device_path_t): New type.
6784 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
6785 (struct grub_efi_ipv4_device_path): New structure.
6786 (grub_efi_ipv4_device_path_t): New type.
6787 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
6788 (struct grub_efi_ipv6_device_path): New structure.
6789 (grub_efi_ipv6_device_path_t): New type.
6790 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
6791 (struct grub_efi_infiniband_device_path): New structure.
6792 (grub_efi_infiniband_device_path_t): New type.
6793 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
6794 (struct grub_efi_uart_device_path): New structure.
6795 (grub_efi_uart_device_path_t): New type.
6796 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
6797 (struct grub_efi_vendor_messaging_device_path): New structure.
6798 (grub_efi_vendor_messaging_device_path_t): New type.
6799 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
6800 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
6801 (struct grub_efi_hard_drive_device_path): New structure.
6802 (grub_efi_hard_drive_device_path_t): New type.
6803 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
6804 (struct grub_efi_cdrom_device_path): New structure.
6805 (grub_efi_cdrom_device_path_t): New type.
6806 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
6807 (struct grub_efi_vendor_media_device_path): New structure.
6808 (grub_efi_vendor_media_device_path_t): New type.
6809 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
6810 (struct grub_efi_file_path_device_path): New structure.
6811 (grub_efi_file_path_device_path_t): New type.
6812 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
6813 (struct grub_efi_protocol_device_path): New structure.
6814 (grub_efi_protocol_device_path_t): New type.
6815 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
6816 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
6817 (struct grub_efi_bios_device_path): New structure.
6818 (grub_efi_bios_device_path_t): New type.
6819 (struct grub_efi_disk_io): New structure.
6820 (grub_efi_disk_io_t): New type.
6821 (struct grub_efi_block_io_media): New structure.
6822 (grub_efi_block_io_media_t): New type.
6823 (struct grub_efi_block_io): New structure.
6824 (grub_efi_block_io_t): New type.
6826 * include/grub/misc.h (grub_stop): Removed.
6827 (grub_exit): New prototype.
6828 (grub_abort): Likewise.
6830 * include/grub/disk.h (enum grub_disk_dev_id): Added
6831 GRUB_DISK_DEVICE_EFIDISK_ID.
6833 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
6835 (kernel_syms.lst): Remove the target if an error occurs.
6837 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
6839 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
6840 as it was simply too buggy.
6842 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
6844 * kern/misc.c (grub_lltoa): New function.
6845 (grub_vsprintf): Added support for the long long suffix,
6848 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
6850 * Makefile.in (LDFLAGS): Add variable.
6851 (LD): Remove variable.
6852 * configure.ac: Add -m32 to LDFLAGS.
6853 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
6854 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
6855 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
6856 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
6857 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
6859 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
6860 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
6861 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
6863 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
6865 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
6866 length for unknown glyph.
6868 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6870 Add support for pre-loaded modules into the EFI port.
6872 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
6873 completely. Accept one more argument DIR. The caller has changed.
6875 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
6877 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
6878 (grub_efi_loaded_image_guid): New variable.
6879 (grub_efi_get_loaded_image): New function.
6880 (grub_arch_modules_addr): Likewise.
6882 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
6885 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
6886 (struct grub_efi_loaded_image): New structure.
6887 (grub_efi_loaded_image_t): New type.
6889 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6891 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
6892 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
6893 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
6895 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
6897 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
6899 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
6901 * DISTLIST: Added include/grub/efi/console.h,
6902 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
6903 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6905 * include/grub/efi/console.h: New file.
6906 * include/grub/efi/time.h: Likewise.
6907 * include/grub/i386/efi/kernel.h: Likewise.
6908 * kern/efi/init.c: Likewise.
6909 * kern/efi/mm.c: Likewise.
6910 * term/efi/console.c: Likewise.
6912 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
6913 (grub_stop): Removed.
6914 (grub_get_rtc): Likewise.
6915 (grub_machine_init): Simply call grub_efi_init.
6916 (grub_machine_fini): Call grub_efi_fini.
6918 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
6919 (grub_efi_output_string): Removed.
6920 (grub_efi_stall): New function.
6921 (grub_stop): Likewise.
6922 (grub_get_rtc): Likewise.
6924 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
6925 (grub_efi_stall): New prototype.
6926 (grub_efi_allocate_pages): Likewise.
6927 (grub_efi_free_pages): Likewise.
6928 (grub_efi_get_memory_map): Likewise.
6929 (grub_efi_mm_init): Likewise.
6930 (grub_efi_mm_fini): Likewise.
6931 (grub_efi_init): Likewise.
6932 (grub_efi_fini): Likewise.
6934 * include/grub/i386/efi/time.h: Do not include
6935 grub/symbol.h. Include grub/efi/time.h.
6936 (GRUB_TICKS_PER_SECOND): Removed.
6937 (grub_get_rtc): Likewise.
6939 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
6940 Added padding. The EFI spec is buggy.
6941 (GRUB_EFI_BLACK): New macro.
6942 (GRUB_EFI_BLUE): Likewise.
6943 (GRUB_EFI_GREEN): Likewise.
6944 (GRUB_EFI_CYAN): Likewise.
6945 (GRUB_EFI_RED): Likewise.
6946 (GRUB_EFI_MAGENTA): Likewise.
6947 (GRUB_EFI_BROWN): Likewise.
6948 (GRUB_EFI_LIGHTGRAY): Likewise.
6949 (GRUB_EFI_BRIGHT): Likewise.
6950 (GRUB_EFI_DARKGRAY): Likewise.
6951 (GRUB_EFI_LIGHTBLUE): Likewise.
6952 (GRUB_EFI_LIGHTGREEN): Likewise.
6953 (GRUB_EFI_LIGHTCYAN): Likewise.
6954 (GRUB_EFI_LIGHTRED): Likewise.
6955 (GRUB_EFI_LIGHTMAGENTA): Likewise.
6956 (GRUB_EFI_YELLOW): Likewise.
6957 (GRUB_EFI_WHITE): Likewise.
6958 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
6959 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
6960 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
6961 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
6962 (GRUB_EFI_BACKGROUND_RED): Likewise.
6963 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
6964 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
6965 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
6966 (GRUB_EFI_TEXT_ATTR): Likewise.
6968 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
6969 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
6970 (kernel_mod_HEADERS): Added efi/time.h.
6972 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
6974 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
6975 include/grub/efi/api.h, include/grub/efi/console_control.h,
6976 include/grub/efi/efi.h, include/grub/efi/pe32.h,
6977 include/grub/i386/efi/time.h, kern/efi/efi.c,
6978 kern/i386/efi/init.c, kern/i386/efi/startup.S,
6979 and util/i386/efi/grub-mkimage.c.
6981 * Makefile.in (RMKFILES): Added i386-efi.rmk.
6983 * genmk.rb (PModule#rule): Do not export symbols if
6984 #{prefix}_EXPORTS is set to "no".
6986 * conf/i386-efi.mk: New file.
6987 * conf/i386-efi.rmk: Likewise.
6988 * include/grub/efi/api.h: Likewise.
6989 * include/grub/efi/console_control.h: Likewise.
6990 * include/grub/efi/efi.h: Likewise.
6991 * include/grub/efi/pe32.h: Likewise.
6992 * include/grub/i386/efi/time.h: Likewise.
6993 * kern/efi/efi.c: Likewise.
6994 * kern/i386/efi/init.c: Likewise.
6995 * kern/i386/efi/startup.S: Likewise.
6996 * util/i386/efi/grub-mkimage.c: Likewise.
6998 2006-04-17 Marco Gerards <marco@gnu.org>
7000 * include/grub/script.h: Include <grub/parser.h> and
7001 "grub_script.tab.h".
7002 (struct grub_lexer_param): New struct.
7003 (struct grub_parser_param): Likewise.
7004 (grub_script_create_arglist): Pass the state in an argument.
7005 (grub_script_add_arglist): Likewise.
7006 (grub_script_create_cmdline): Likewise.
7007 (grub_script_create_cmdblock): Likewise.
7008 (grub_script_create_cmdif): Likewise.
7009 (grub_script_create_cmdmenu): Likewise.
7010 (grub_script_add_cmd): Likewise.
7011 (grub_script_arg_add): Likewise.
7012 (grub_script_lexer_ref): Likewise.
7013 (grub_script_lexer_deref): Likewise.
7014 (grub_script_lexer_record_start): Likewise.
7015 (grub_script_lexer_record_stop): Likewise.
7016 (grub_script_mem_record): Likewise.
7017 (grub_script_mem_record_stop): Likewise.
7018 (grub_script_malloc): Likewise.
7019 (grub_script_yylex): Likewise.
7020 (grub_script_yyparse): Likewise.
7021 (grub_script_yyerror): Likewise.
7022 (grub_script_yylex): Likewise.
7023 (grub_script_lexer_init): Return the state.
7025 * normal/lexer.c (grub_script_lexer_state): Removed variable.
7026 (grub_script_lexer_done): Likewise.
7027 (grub_script_lexer_getline): Likewise.
7028 (grub_script_lexer_refs): Likewise.
7030 (newscript): Likewise.
7032 (recording): Likewise.
7033 (recordpos): Likewise.
7034 (recordlen): Likewise.
7035 (grub_script_lexer_init): Return the state instead of setting
7037 (grub_script_lexer_ref): Use the newly added argument for state
7039 (grub_script_lexer_deref): Likewise.
7040 (grub_script_lexer_record_start): Likewise.
7041 (grub_script_lexer_record_stop): Likewise.
7042 (recordchar): Likewise.
7043 (nextchar): Likewise.
7044 (grub_script_yylex2): Likewise.
7045 (grub_script_yylex): Likewise.
7046 (grub_script_yyerror): Likewise.
7048 * normal/parser.y (func_mem): Removed variable.
7049 (menu_entry): Likewise.
7051 (%lex-param): New parser option.
7052 (%parse-param): Likewise.
7053 (script): Always return the AST.
7054 (argument): Pass the state around.
7055 (arguments): Likewise.
7056 (grubcmd): Likewise.
7057 (commands): Likewise.
7058 (function): Likewise.
7059 (menuentry): Likewise.
7060 (if_statement): Likewise.
7063 * normal/script.c (grub_script_memused): Removed variable.
7064 (grub_script_parsed): Likewise.
7065 (grub_script_malloc): Added a state argument. Use that instead of
7067 (grub_script_mem_record): Likewise.
7068 (grub_script_mem_record_stop): Likewise.
7069 (grub_script_arg_add): Likewise.
7070 (grub_script_add_arglist): Likewise.
7071 (grub_script_create_cmdline): Likewise.
7072 (grub_script_create_cmdif): Likewise.
7073 (grub_script_create_cmdmenu): Likewise.
7074 (grub_script_add_cmd): Likewise.
7075 (grub_script_parse): Setup the state before calling the parser.
7077 2006-04-16 Marco Gerards <marco@gnu.org>
7079 * normal/command.c (grub_command_init): Remove the title command.
7081 * normal/lexer.c (grub_script_yylex): Renamed from this...
7082 (grub_script_yylex2): ... to this.
7083 (grub_script_yylex): New function. Temporary
7084 introduced to filter some tokens.
7085 (grub_script_yyerror): Print a newline.
7087 * normal/main.c (read_config_file): Output information about the
7088 lines that contain errors. Wait for a key after all lines have
7089 been processed. Don't return an empty menu.
7091 * normal/parser.y (func_mem): Don't initialize.
7092 (menu_entry): Likewise.
7093 (err): New variable.
7094 (script): Don't return anything when an error was encountered.
7095 (ws, returns): Removed rules.
7096 (argument): Disabled concatenated variable support.
7097 (arguments): Remove explicit separators.
7098 (grubcmd): Likewise.
7099 (function): Likewise.
7100 (menuentry): Likewise.
7102 (commands): Likewise. Add error handling.
7104 * normal/script.c (grub_script_create_cmdline): If
7105 `grub_script_parsed' is 0, assume the parser encountered an error.
7107 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
7109 * configure.ac: Add support for EFI. Fix the typo
7110 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7112 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7114 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
7115 foreign multibyte characters should be shown correctly.
7117 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7119 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7121 (read_config_file): Made it to close file before returning.
7123 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
7125 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7126 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7127 video/i386/pc/vbefill.c.
7129 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7130 video/i386/pc/vbefill.c.
7132 * include/grub/video.h (grub_video_blit_format): New enum.
7133 (grub_video_mode_info): Added new member blit_format.
7134 (grub_video_get_blit_format): New function prototype.
7136 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7138 (grub_video_vbe_map_rgb): Likewise.
7139 (grub_video_vbe_unmap_color): Likewise.
7141 * include/grub/i386/pc/vbeblit.h: New file.
7143 * include/grub/i386/pc/vbefill.h: New file.
7145 * video/video.c (grub_video_get_blit_format): New function.
7146 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7147 (grub_video_vbe_map_rgb): Likewise.
7148 (grub_video_vbe_unmap_color): Likewise.
7150 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7152 (grub_video_vbe_blit_render_target): Changed to use more optimized
7154 (grub_video_vbe_setup): Added detection for optimized settings.
7155 (grub_video_vbe_create_render_target): Likewise.
7157 * video/i386/pc/vbeblit.c: New file.
7159 * video/i386/pc/vbefill.c: New file.
7161 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
7163 * font/manager.c (grub_font_get_glyph): Removed font fixup from
7166 * util/unifont2pff.rb: ... and moved it to here. Improved argument
7167 parsing to support both hex and dec ranges. If filename was missing
7168 show usage information.
7170 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
7172 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7173 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
7175 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7176 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
7177 (video_mod_SOURCES): Added.
7178 (video_mod_CFLAGS): Likewise.
7179 (video_mod_LDFLAGS): Likewise.
7180 (gfxterm_mod_SOURCES): Likewise.
7181 (gfxterm_mod_CFLAGS): Likewise.
7182 (gfxterm_mod_LDFLAGS): Likewise.
7183 (videotest_mod_SOURCES): Likewise.
7184 (videotest_mod_CFLAGS): Likewise.
7185 (videotest_mod_LDFLAGS): Likewise.
7186 (vesafb_mod_SOURCES): Removed.
7187 (vesafb_mod_CFLAGS): Likewise.
7188 (vesafb_mod_LDFLAGS): Likewise.
7189 (vga_mod_SOURCES): Likewise.
7190 (vga_mod_CFLAGS): Likewise.
7191 (vga_mod_LDFLAGS): Likewise.
7193 * commands/videotest.c: New file.
7195 * font/manager.c (fill_with_default_glyph): Modified to use
7197 (grub_font_get_glyph): Likewise.
7198 (fontmanager): Renamed from this...
7199 (font_manager): ... to this.
7201 * include/grub/font.h (grub_font_glyph): Added new structure.
7202 (grub_font_get_glyph): Modified to use grub_font_glyph.
7204 * include/grub/misc.h (grub_abs): Added as inline function.
7206 * include/grub/video.h: New file.
7208 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
7209 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
7210 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
7211 (grub_vbe_get_controller_info): Renamed from this...
7212 (grub_vbe_bios_get_controller_info): ... to this.
7213 (grub_vbe_get_mode_info): Renamed from this...
7214 (grub_vbe_bios_get_mode_info): ... to this.
7215 (grub_vbe_set_mode): Renamed from this...
7216 (grub_vbe_bios_set_mode): ... to this.
7217 (grub_vbe_get_mode): Renamed from this...
7218 (grub_vbe_bios_get_mode): ... to this.
7219 (grub_vbe_set_memory_window): Renamed from this...
7220 (grub_vbe_bios_set_memory_window): ... to this.
7221 (grub_vbe_get_memory_window): Renamed from this...
7222 (grub_vbe_bios_get_memory_window): ... to this.
7223 (grub_vbe_set_scanline_length): Renamed from this...
7224 (grub_vbe_set_scanline_length): ... to this.
7225 (grub_vbe_get_scanline_length): Renamed from this...
7226 (grub_vbe_bios_get_scanline_length): ... to this.
7227 (grub_vbe_set_display_start): Renamed from this...
7228 (grub_vbe_bios_set_display_start): ... to this.
7229 (grub_vbe_get_display_start): Renamed from this...
7230 (grub_vbe_bios_get_display_start): ... to this.
7231 (grub_vbe_set_palette_data): Renamed from this...
7232 (grub_vbe_bios_set_palette_data): ... to this.
7233 (grub_vbe_set_pixel_rgb): Removed.
7234 (grub_vbe_set_pixel_index): Likewise.
7236 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
7238 (grub_vbe_bios_get_controller_info): ... to this.
7239 (grub_vbe_get_mode_info): Renamed from this...
7240 (grub_vbe_bios_get_mode_info): ... to this.
7241 (grub_vbe_set_mode): Renamed from this...
7242 (grub_vbe_bios_set_mode): ... to this.
7243 (grub_vbe_get_mode): Renamed from this...
7244 (grub_vbe_bios_get_mode): ... to this.
7245 (grub_vbe_set_memory_window): Renamed from this...
7246 (grub_vbe_bios_set_memory_window): ... to this.
7247 (grub_vbe_get_memory_window): Renamed from this...
7248 (grub_vbe_bios_get_memory_window): ... to this.
7249 (grub_vbe_set_scanline_length): Renamed from this...
7250 (grub_vbe_set_scanline_length): ... to this.
7251 (grub_vbe_get_scanline_length): Renamed from this...
7252 (grub_vbe_bios_get_scanline_length): ... to this.
7253 (grub_vbe_set_display_start): Renamed from this...
7254 (grub_vbe_bios_set_display_start): ... to this.
7255 (grub_vbe_get_display_start): Renamed from this...
7256 (grub_vbe_bios_get_display_start): ... to this.
7257 (grub_vbe_set_palette_data): Renamed from this...
7258 (grub_vbe_bios_set_palette_data): ... to this.
7259 (grub_vbe_bios_get_controller_info): Fixed problem with registers
7260 getting corrupted after calling it. Added more pushes and pops.
7261 (grub_vbe_bios_set_mode): Likewise.
7262 (grub_vbe_bios_get_mode): Likewise.
7263 (grub_vbe_bios_get_memory_window): Likewise.
7264 (grub_vbe_bios_set_scanline_length): Likewise.
7265 (grub_vbe_bios_get_scanline_length): Likewise.
7266 (grub_vbe_bios_get_display_start): Likewise.
7267 (grub_vbe_bios_set_palette_data): Likewise.
7269 * normal/cmdline.c (cl_set_pos): Refresh the screen.
7270 (cl_insert): Likewise.
7271 (cl_delete): Likewise.
7273 * term/gfxterm.c: New file.
7275 * term/i386/pc/vesafb.c: Removed file.
7277 * video/video.c: New file.
7279 * video/i386/pc/vbe.c (real2pm): Added new function.
7280 (grub_video_vbe_draw_pixel): Likewise.
7281 (grub_video_vbe_get_video_ptr): Likewise.
7282 (grub_video_vbe_get_pixel): Likewise
7283 (grub_video_vbe_init): Likewise.
7284 (grub_video_vbe_fini): Likewise.
7285 (grub_video_vbe_setup): Likewise.
7286 (grub_video_vbe_get_info): Likewise.
7287 (grub_video_vbe_set_palette): Likewise.
7288 (grub_video_vbe_get_palette): Likewise.
7289 (grub_video_vbe_set_viewport): Likewise.
7290 (grub_video_vbe_get_viewport): Likewise.
7291 (grub_video_vbe_map_color): Likewise.
7292 (grub_video_vbe_map_rgb): Likewise.
7293 (grub_video_vbe_map_rgba): Likewise.
7294 (grub_video_vbe_unmap_color): Likewise.
7295 (grub_video_vbe_fill_rect): Likewise.
7296 (grub_video_vbe_blit_glyph): Likewise.
7297 (grub_video_vbe_blit_bitmap): Likewise.
7298 (grub_video_vbe_blit_render_target): Likewise.
7299 (grub_video_vbe_scroll): Likewise.
7300 (grub_video_vbe_swap_buffers): Likewise.
7301 (grub_video_vbe_create_render_target): Likewise.
7302 (grub_video_vbe_delete_render_target): Likewise.
7303 (grub_video_vbe_set_active_render_target): Likewise.
7304 (grub_vbe_set_pixel_rgb): Remove function.
7305 (grub_vbe_set_pixel_index): Likewise.
7306 (index_color_mode): Remove static variable.
7307 (active_mode): Likewise.
7308 (framebuffer): Likewise.
7309 (bytes_per_scan_line): Likewise.
7310 (grub_video_vbe_adapter): Added new static variable.
7311 (framebuffer): Likewise.
7312 (render_target): Likewise.
7313 (initial_mode): Likewise.
7314 (mode_in_use): Likewise.
7315 (mode_list): Likewise.
7317 2006-03-10 Marco Gerards <marco@gnu.org>
7319 * configure.ac (AC_INIT): Bumped to 1.93.
7321 * DISTLIST: Added `include/grub/hfs.h'.
7323 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
7325 * boot/i386/pc/boot.S (general_error): Before looping, try INT
7326 18H, which might help the BIOS falling back to next boot media.
7328 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
7330 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
7331 Poe Chen <poe.poechen@gmail.com>.
7333 2006-01-17 Marco Gerards <marco@gnu.org>
7335 * include/grub/normal.h: Include <grub/script.h>.
7336 (grub_command_list): Removed struct.
7337 (grub_command_list_t): Removed type.
7338 (grub_menu_entry): Remove members `num' and `command_list'. Add
7339 members `commands' and `sourcecode'.
7340 * include/grub/script.h: Add inclusion guards.
7341 (grub_script_cmd_menuentry): New struct.
7342 (grub_script_execute_menuentry): New prototype.
7343 (grub_script_lexer_record_start): Likewise.
7344 (grub_script_lexer_record_stop): Likewise.
7345 * normal/execute.c (grub_script_execute_menuentry): New function.
7346 * normal/lexer.c (record, recording, recordpos, recordlen): New
7348 (grub_script_lexer_record_start): New function.
7349 (grub_script_lexer_record_stop): Likewise.
7350 (recordchar): Likewise.
7351 (nextchar): Likewise.
7352 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
7353 2048 as the buffer size. Add the tokens `menuentry' and `@'.
7354 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
7355 (current_menu): New variable.
7356 (free_menu): Mainly rewritten.
7357 (grub_normal_menu_addentry): New function.
7358 (read_config_file): Rewritten.
7359 * normal/menu.c (run_menu_entry): Mainly rewritten.
7360 * normal/menu_entry.c (make_screen): Rewritten the code to insert
7362 (run): Mainly rewritten.
7363 * normal/parser.y (menu_entry): New variable.
7364 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
7365 (menuentry): New rule.
7366 (command): Add `menuentry'.
7367 (if_statement): Allow additional returns before `fi'.
7368 * normal/script.c (grub_script_create_cmdmenu): New function.
7370 2006-01-03 Marco Gerards <marco@gnu.org>
7372 * INSTALL: GNU Bison is required.
7373 * configure.ac: Rewritten the test to detect Bison.
7374 * Makefile.in (YACC): New variable. Reported by Xun Sun
7375 <xun.sun.cn@gmail.com>.
7377 2006-01-03 Marco Gerards <marco@gnu.org>
7379 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
7380 the HFS+ filesystem to filesystem blocks.
7381 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
7382 GCC warning is silenced.
7384 2006-01-03 Marco Gerards <marco@gnu.org>
7386 * partmap/apple.c (apple_partition_map_iterate): Convert the data
7387 read from disk from big endian to host byte order.
7389 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
7391 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
7393 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
7394 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
7395 embedded HFS+ filesystem.
7396 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
7397 (grub_hfs_sblock): Move from here...
7398 * include/grub/hfs.h: To here... New file.
7399 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
7401 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
7403 (grub_hfsplus_volheader): Change type of member `magic' to
7405 (grub_hfsplus_data): Add new member `embedded_offset'.
7406 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
7408 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
7409 Calculate the offset.
7411 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7413 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
7415 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
7417 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7419 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
7420 ENV->NAME is NULL after allocating ENV->VALUE.
7422 2005-12-25 Marco Gerards <marco@gnu.org>
7424 * kern/env.c (grub_env_set): Rewritten the error handling code.
7426 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7428 * geninit.sh: Made more robust, and more portable.
7430 2005-12-25 Marco Gerards <marco@gnu.org>
7432 Add support for Apple HFS+ filesystems.
7434 * fs/hfsplus.c: New file.
7436 * DISTLIST: Added `fs/hfsplus.c'.
7438 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
7439 (hfsplus_mod_SOURCES): New variable.
7440 (hfsplus_mod_CFLAGS): Likewise.
7441 (hfsplus_mod_LDFLAGS): Likewise.
7442 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
7443 (grub_setup_SOURCES): Likewise.
7444 (grub_mkdevicemap_SOURCES): Likewise.
7445 (grub_emu_SOURCES): Likewise.
7446 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7448 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
7450 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
7452 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7454 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
7455 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
7456 include/grub/parser.h, include/grub/script.h, kern/parser.c,
7457 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
7458 normal/lexer.c, normal/parser.y, normal/script.c, and
7460 Removed kern/sparc64/cache.c.
7462 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
7463 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
7466 * configure.ac (AC_INIT): Bumped to 1.92.
7468 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
7470 * kern/err.c (grub_error_push): Added new function to support error
7472 (grub_error_pop): Likewise.
7473 (grub_error_stack_items): New local variable to support error stacks.
7474 (grub_error_stack_pos): Likewise.
7475 (grub_error_stack_assert): Likewise.
7476 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
7478 (grub_print_error): Added support to print errors from error stack.
7480 * include/grub/err.h (grub_error_push): Added function prototype.
7481 (grub_error_pop): Likewise.
7483 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
7485 * configure.ac: Accept `powerpc64' as host_cpu.
7486 (amd64): Rename to `biarch32'.
7488 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
7489 non-cacheline-aligned addresses.
7491 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
7492 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
7493 if `size' is non-zero.
7495 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
7497 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
7498 and `cd' to make sure the filename is not prefixed with a
7500 (pkgdata_MODULES): Add `gpt.mod'.
7501 (gpt_mod_SOURCES): New variable.
7502 (gpt_mod_CFLAGS): Likewise.
7503 (gpt_mod_LDFLAGS): Likewise.
7505 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
7507 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
7510 * partmap/gpt.c: New file.
7512 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
7513 GPT partition map is detected.
7515 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
7517 * commands/i386/pc/play.c: New file.
7518 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
7519 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
7522 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
7524 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
7525 ((unused))' to silence gcc warning.
7527 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
7529 * configure.ac: Correct `AC_PROG_YACC' test.
7531 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7533 * util/powerpc/ieee1275/grub-install.in: Run the mount point
7534 check before installing files.
7536 2005-11-22 Mike Small <smallm@panix.com>
7538 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
7539 number regex so multidigit numbers are recognized correctly.
7541 2005-11-22 Mike Small <smallm@panix.com>
7543 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
7544 debugging message before attempting to claim memory.
7545 (grub_rescue_cmd_initrd): Add a claim debugging message and try
7546 multiple addresses in case of failure.
7548 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7550 * term/tparm.c (get_space): Remove empty `if' statement.
7552 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
7554 * kern/parser.c (check_varstate): Rename `state' to 's'.
7556 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7558 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
7559 variable definitions to the beginning of each function. Sort stack
7561 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
7562 `buf' argument to `char *'.
7564 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7566 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
7567 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
7568 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
7569 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7570 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7571 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7572 configfile.mod, search.mod, gzio.mod and test.mod.
7573 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7574 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7575 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7576 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7577 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7578 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7579 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7580 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7581 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7582 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7583 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7584 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7585 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7586 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7587 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7588 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7589 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7590 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7591 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7592 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7593 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7594 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7595 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
7597 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
7599 (pkgdata_MODULES): Add test.mod.
7601 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7603 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
7604 appending to variables with "+=".
7605 (PModule): Use full pathname to generate *.lst filenames.
7607 * Makefile.in: Fixed list rules moved from genmk.rb.
7608 (.DELETE_ON_ERROR): New special target.
7609 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
7611 * conf/i386-pc.rmk: Include conf/common.mk.
7612 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
7613 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
7614 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7615 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7616 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7617 configfile.mod, search.mod, gzio.mod and test.mod.
7618 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7619 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7620 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7621 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7622 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7623 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7624 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7625 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7626 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7627 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7628 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7629 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7630 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7631 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7632 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7633 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7634 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7635 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7636 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7637 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7638 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7639 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7640 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
7642 * conf/common.rmk: ... to here. New file.
7644 * conf/common.mk: New file.
7646 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
7648 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
7649 (grub_script.tab.c): ... here.
7651 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
7652 (grub_script.tab.c): ... here.
7654 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
7655 (grub_script.tab.c): ... here.
7657 * normal/command.c (grub_command_find): Fixed a memory leak of
7658 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
7660 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7662 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
7663 "@" which marks the start of a comment on ARM.
7664 (VARIABLE): Likewise.
7666 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7668 Add support for Linux/ADFS partition tables.
7670 * partmap/acorn.c: New file.
7672 * include/grub/acorn_filecore.h: Likewise.
7674 * DISTLIST: Added `partmap/acorn.c' and
7675 `include/grub/acorn_filecore.h'.
7677 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7679 (pkgdata_MODULES): Add `acorn.mod'.
7680 (acorn_mod_SOURCES): New variable.
7681 (acorn_mod_CFLAGS): Likewise.
7683 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7685 (pkgdata_MODULES): Add `acorn.mod'.
7686 (acorn_mod_SOURCES): New variable.
7687 (acorn_mod_CFLAGS): Likewise.
7689 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
7690 (pkgdata_MODULES): Add `acorn.mod'.
7691 (acorn_mod_SOURCES): New variable.
7692 (acorn_mod_CFLAGS): Likewise.
7693 (acorn_mod_LDFLAGS): Likewise.
7695 * include/types.h (grub_disk_addr_t): New typedef.
7697 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
7699 * geninit.sh: New file.
7701 * geninitheader.sh: Likewise.
7703 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
7704 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
7705 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
7706 * commands/configfile.c (grub_configfile_init)
7707 (grub_configfile_fini): Likewise.
7708 * commands/default.c (grub_default_init, grub_default_fini):
7710 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
7711 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
7712 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
7713 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
7715 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
7716 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
7718 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
7719 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
7721 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
7723 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
7725 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
7726 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
7727 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
7728 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
7729 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
7730 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
7731 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
7732 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
7733 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
7734 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
7735 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
7736 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
7737 * partmap/amiga.c (grub_amiga_partition_map_init)
7738 (grub_amiga_partition_map_fini): Likewise.
7739 * partmap/apple.c (grub_apple_partition_map_init)
7740 (grub_apple_partition_map_fini): Likewise.
7741 * partmap/pc.c (grub_pc_partition_map_init)
7742 (grub_pc_partition_map_fini): Likewise.
7743 * partmap/sun.c (grub_sun_partition_map_init,
7744 grub_sun_partition_map_fini): Likewise.
7745 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
7748 * util/grub-emu.c: Include <grub_modules_init.h>.
7749 (main): Don't initialize and de-initialize any modules directly,
7750 use `grub_init_all' and `grub_fini_all' instead.
7752 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
7753 `grub_vesafb_mod_init'.
7754 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
7756 * term/i386/pc/vga.c (grub_vga_init): Renamed to
7757 `grub_vga_mod_init'. Updated all users.
7758 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
7760 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
7761 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
7764 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
7765 Generate a function to initialize the module in utilities.
7766 Updated all callers.
7767 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
7768 initialize the module in utilities. Updated all callers.
7770 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
7772 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
7773 escape sequence and a literal ^L to clear the screen.
7775 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
7776 when returning from Open Firmware.
7778 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
7780 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
7781 (grub_ofconsole_height): Likewise.
7782 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
7783 manually insert a '\n'.
7784 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
7785 `grub_ofconsole_height'. Return early if these are already set.
7787 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
7789 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7790 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
7791 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
7792 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
7793 and `normal/script.c'.
7794 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7795 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7796 (test_mod_SOURCES): New variable.
7797 (test_mod_CFLAGS): Likewise.
7798 (test_mod_LDFLAGS): Likewise.
7799 (pkgdata_MODULES): Add `test.mod'.
7800 (grub_script.tab.c): New rule.
7801 (grub_script.tab.h): Likewise.
7803 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
7805 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7806 `commands/test.c', `normal/execute.c', `normal/lexer.c',
7807 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7808 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7809 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7810 (test_mod_SOURCES): New variable.
7811 (test_mod_CFLAGS): Likewise.
7812 (pkgdata_MODULES): Add `test.mod'.
7813 (grub_script.tab.c): New rule.
7814 (grub_script.tab.h): Likewise.
7816 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
7818 Add initial scripting support.
7820 * commands/test.c: New file.
7821 * include/grub/script.h: Likewise.
7822 * normal/execute.c: Likewise.
7823 * normal/function.c: Likewise.
7824 * normal/lexer.c: Likewise.
7825 * normal/parser.y: Likewise.
7826 * normal/script.c: Likewise.
7828 * configure.ac: Add `AC_PROG_YACC' test.
7830 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
7831 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
7832 `normal/function.c' and `normal/script.c'.
7833 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7834 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7835 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
7837 (pkgdata_MODULES): Add `test.mod'.
7838 (grub_script.tab.c): New rule.
7839 (grub_script.tab.h): Likewise.
7841 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
7843 * include/grub/normal.h (grub_test_init): New prototype.
7844 (grub_test_fini): Likewise.
7846 * normal/command.c: Include <grub/script.h>.
7847 (grub_command_execute): Rewritten.
7849 * util/grub-emu.c (main): Call `grub_test_init' and
7852 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7854 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
7856 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
7857 there are no pending characters.
7859 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7861 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
7862 `grub_strndup' to drop device arguments. Replace unnecessary
7863 `grub_strndup' with `grub_strdup'.
7865 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7867 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
7868 `debug' environment variable has been set.
7870 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
7872 * Makefile.in (install-local): Use $(DATA).
7873 (uninstall): Likewise.
7874 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
7875 (sbin_UTILITIES): ... to here.
7876 (sbin_SCRIPTS): New variable.
7877 (grub_install_SOURCES): New variable.
7878 * util/powerpc/ieee1275/grub-install.in: New file.
7879 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
7881 (add_segments): Call `grub_util_get_path'.
7883 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
7885 From Timothy Baldwin:
7886 * commands/ls.c (grub_ls_list_files): Close FILE with
7888 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
7890 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
7892 * include/grub/parser.h: New file.
7894 * kern/parser.c: Likewise.
7896 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
7897 (grub_setup_SOURCES): Likewise.
7898 (grub_probefs_SOURCES): Likewise.
7899 (grub_emu_SOURCES): Likewise.
7900 (kernel_img_HEADERS): Add `parser.h'.
7902 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7903 (grub_emu_SOURCES): Add `kern/parser.c'.
7904 (grubof_SOURCES): Likewise.
7906 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
7907 (grubof_SOURCES): Add `kern/parser.c'.
7909 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
7911 * kern/misc.c (grub_split_cmdline): Removed function.
7913 * kern/rescue.c: Include <grub/parser.h>.
7914 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
7915 of `grub_split_cmdline'.
7917 * normal/command.c: Include <grub/parser.h>.
7918 (grub_command_execute): Use `grub_parser_split_cmdline' instead
7919 of `grub_split_cmdline'.
7921 * normal/completion.c: Include <grub/parser.h>.
7922 (cmdline_state): New variable.
7923 (iterate_dir): End the filename with a quote depending on the
7925 (get_state): new function.
7926 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
7927 split the arguments and determine the current argument. When the
7928 argument string is not quoted, escape all spaces.
7930 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7932 * normal/sparc64/setjmp.S: New file.
7934 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7936 * include/grub/sparc64/libgcc.h: New file.
7937 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
7938 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
7939 normal/sparc64/setjmp.c.
7941 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
7943 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
7944 * kern/sparc64/cache.S: New file.
7945 * kern/sparc64/cache.c: Removed.
7946 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
7947 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
7949 (COMMON_LDFLAGS): Add -melf64_sparc.
7950 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
7951 (grubof_SOURCES): Use cache.S instead of cache.c.
7952 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
7953 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
7954 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
7956 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
7957 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
7958 (linux_mod_CFLAGS): Commented out.
7959 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
7960 out because module isn't built.
7961 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
7962 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
7963 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
7964 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
7965 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
7966 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
7967 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
7968 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
7969 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
7970 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
7971 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7972 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7973 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
7974 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
7976 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
7978 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
7979 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
7980 longer, because HFS should not be used on PC.
7982 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7984 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
7985 consistently within the loop.
7987 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
7989 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
7990 directory can not be read.
7992 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
7994 * configure.ac (AC_INIT): Increase the version number to 1.91.
7996 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
7997 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
7998 term/i386/pc/serial.c.
8000 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8002 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8003 file size must be permitted.
8005 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8006 between %ah and %al.
8008 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8010 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8012 Call the hook with a NUL-terminated filename.
8013 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8016 * kern/term.c (cursor_state): New variable.
8017 (grub_term_set_current): Reset the cursor state on a new
8019 (grub_setcursor): Rewritten to use CURSOR_STATE.
8020 (grub_getcursor): New function.
8022 * include/grub/term.h (grub_getcursor): New prototype.
8024 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8025 integers on ARM. Reported by Timothy Baldwin
8026 <T.E.Baldwin99@members.leeds.ac.uk>.
8028 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
8030 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8032 (grub_sfs_dir): Likewise.
8034 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
8036 Add support for the SFS filesystem.
8038 * fs/sfs.c: New file.
8040 * DISTLIST: Added `fs/sfs.c'.
8042 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8043 (grub_probefs_SOURCES): Likewise.
8044 (grub_emu_SOURCES): Likewise.
8045 (pkgdata_MODULES): Add `sfs.mod'.
8046 (sfs_mod_SOURCES): New variable.
8047 (sfs_mod_CFLAGS): Likewise.
8048 (sfs_mod_LDFLAGS): Likewise.
8050 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8051 (pkgdata_MODULES): Add `sfs.mod'.
8052 (sfs_mod_SOURCES): New variable.
8053 (sfs_mod_CFLAGS): Likewise.
8055 * util/grub-emu.c (main): Call `grub_sfs_init' and
8058 * include/grub/fs.h (grub_sfs_init): New prototype.
8059 (grub_sfs_fini): Likewise.
8061 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
8063 Add support for the AFFS filesystem.
8065 * fs/affs.c: New file.
8067 * DISTLIST: Added `fs/affs.c'.
8069 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8070 (grub_probefs_SOURCES): Likewise.
8071 (grub_emu_SOURCES): Likewise.
8072 (pkgdata_MODULES): Add `affs.mod'.
8073 (affs_mod_SOURCES): New variable.
8074 (affs_mod_CFLAGS): Likewise.
8075 (affs_mod_LDFLAGS): Likewise.
8077 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8078 (pkgdata_MODULES): Add `affs.mod'.
8079 (affs_mod_SOURCES): New variable.
8080 (affs_mod_CFLAGS): Likewise.
8082 * util/grub-emu.c (main): Call `grub_affs_init' and
8085 * include/grub/fs.h (grub_affs_init): New prototype.
8086 (grub_affs_fini): Likewise.
8088 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8090 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8092 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
8094 * configure.ac: Accept `x86_64' as host_cpu. In that case add
8097 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8100 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8101 (COMMON_LDFLAGS): New variable.
8102 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8103 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8104 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8105 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8106 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8107 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8108 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8109 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8110 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8111 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8112 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8113 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8114 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8115 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8116 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8118 (normal_mod_ASFLAGS): Add `-m32'.
8120 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8121 (grub_host_size_t, grub_host_ssize_t): New types.
8122 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
8123 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
8124 `GRUB_HOST_SIZEOF_VOID_P'.
8126 * include/grub/kernel.h (struct grub_module_header): Type of
8127 member offset changed to `grub_host_off_t'. Type of member size
8128 changed to `grub_host_size_t'.
8129 (struct grub_module_info): Type of member offset changed to
8130 `grub_host_off_t'. Type of member size changed to
8133 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
8135 Make GRUB's kernel compliant to Multiboot Specification.
8137 * kern/i386/pc/startup.S (multiboot_header): New label.
8138 (multiboot_entry): Likewise.
8139 (multiboot_trampoline): Likewise.
8141 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8144 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8145 put parentheses after a question mark.
8146 [!GRUB_UTIL] (my_mod): New variable.
8148 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8150 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
8152 Adds support for the XFS filesystem. Btrees are not supported
8155 * fs/xfs.c: New file.
8157 * DISTLIST: Added `fs/xfs.c'.
8159 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8160 (grub_probefs_SOURCES): Likewise.
8161 (grub_emu_SOURCES): Likewise.
8162 (pkgdata_MODULES): Add `xfs.mod'.
8163 (xfs_mod_SOURCES): New variable.
8164 (xfs_mod_CFLAGS): Likewise.
8166 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8167 (pkgdata_MODULES): Add `xfs.mod'.
8168 (xfs_mod_SOURCES): New variable.
8169 (xfs_mod_CFLAGS): Likewise.
8171 * util/grub-emu.c (main): Call `grub_xfs_init' and
8174 * include/grub/fs.h (grub_xfs_init): New prototype.
8175 (grub_xfs_fini): Likewise.
8178 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
8180 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8181 color modes, allow greater than 16 colors to be configured as
8184 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8186 * normal/completion.c (complete_arguments): Add the qualifier
8189 From Omniflux <omniflux+lists@omniflux.com>:
8190 * include/grub/terminfo.h: New file.
8191 * include/grub/tparm.h: Likewise.
8192 * include/grub/i386/pc/serial.h: Likewise.
8193 * term/terminfo.c: Likewise.
8194 * term/tparm.c: Likewise.
8195 * term/i386/pc/serial.c: Likewise.
8196 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
8198 (terminfo_mod_SOURCES): New variable.
8199 (terminfo_mod_CFLAGS): Likewise.
8200 (serial_mod_SOURCES): Likewise.
8201 (serial_mod_CFLAGS): Likewise.
8203 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
8205 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
8206 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
8207 and kern/powerpc/ieee1275/cmain.c, respectively.
8209 * boot/powerpc/ieee1275/crt0.S: Moved to ...
8210 * kern/powerpc/ieee1275/crt0.S: ... here.
8212 * boot/powerpc/ieee1275/cmain.c: Moved to ...
8213 * kern/powerpc/ieee1275/cmain.c: ... here.
8215 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
8216 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
8217 instead of boot/powerpc/ieee1275/crt0.S and
8218 boot/powerpc/ieee1275/cmain.c, respectively.
8220 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
8221 sectors. It was not used anyway.
8223 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8225 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
8226 `unused parameter' warning.
8228 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8230 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
8232 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
8235 2005-08-28 Marco Gerards <metgerards@student.han.nl>
8237 * include/grub/normal.h (enum grub_completion_type): Added
8238 `GRUB_COMPLETION_TYPE_ARGUMENT'.
8240 * normal/cmdline.c (print_completion): Handle
8241 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
8242 * normal/menu_entry.c (store_completion): Likewise.
8244 * normal/completion.c (complete_arguments): New function.
8245 (grub_normal_do_completion): Call `complete_arguments' when the
8246 current words start with a dash.
8248 2005-08-27 Marco Gerards <metgerards@student.han.nl>
8250 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
8251 `gzio.mod' instead of `io.mod').
8253 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
8255 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
8256 (DISTDIRS): Added io and video.
8257 Rewrite the search routine to make an output consistently.
8259 * DISTLIST: Added conf/sparc64-ieee1275.mk,
8260 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
8261 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
8262 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
8263 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
8264 util/powerpc/ieee1275/misc.c.
8266 * include/grub/gzio.h: New file.
8267 * io/gzio.c: Likewise.
8269 * kern/file.c (grub_file_close): Call grub_device_close only if
8270 FILE->DEVICE is not NULL.
8272 * include/grub/mm.h [!NULL] (NULL): New macro.
8274 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
8276 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
8277 (pkgdata_MODULES): Added gzio.mod.
8278 (gzio_mod_SOURCES): New variable.
8279 (gzio_mod_CFLAGS): Likewise.
8281 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
8282 (pkgdata_MODULES): Added gzio.mod.
8283 (gzio_mod_SOURCES): New variable.
8284 (gzio_mod_CFLAGS): Likewise.
8286 * commands/cat.c: Include grub/gzio.h.
8287 (grub_cmd_cat): Use grub_gzfile_open instead of
8290 * commands/cmp.c: Include grub/gzio.h.
8291 (grub_cmd_cmp): Use grub_gzfile_open instead of
8294 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
8295 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
8297 (grub_rescue_cmd_module): Likewise.
8299 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8301 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
8302 kern/sparc64/ieee1275/init.c because it contains _start.
8303 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
8305 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8307 * configure.ac: Add support for sparc64 host with ieee1275
8309 * configure: Generated from configure.ac.
8310 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
8312 (grub_ofdisk_read): Likewise.
8313 (grub_ofdisk_open): Use %p to print pointer values, and cast the
8314 pointers as (void *) to remove a warning.
8315 (grub_ofdisk_close): Likewise.
8316 (grub_ofdisk_read): Likewise.
8317 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
8318 returns, so make it return void to remove a warning.
8319 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
8320 Corresponding prototype change.
8321 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
8322 values, and cast the pointers as (void *) to remove a warning.
8323 (grub_mm_dump): Likewise.
8324 * conf/sparc64-ieee1275.mk: New file.
8325 * conf/sparc64-ieee1275.rmk: Likewise.
8326 * include/grub/sparc64/setjmp.h: Likewise.
8327 * include/grub/sparc64/types.h: Likewise.
8328 * include/grub/sparc64/ieee1275/console.h: Likewise.
8329 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8330 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8331 * include/grub/sparc64/ieee1275/time.h: Likewise.
8332 * kern/sparc64/cache.c: Likewise.
8333 * kern/sparc64/dl.c: Likewise.
8334 * kern/sparc64/ieee1275/init.c: Likewise.
8335 * kern/sparc64/ieee1275/openfw.c: Likewise.
8337 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8339 * util/console.c (grub_ncurses_putchar): If C is greater than
8340 0x7f, set C to a question mark.
8341 (grub_ncurses_getcharwidth): New function.
8342 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
8345 * normal/menu.c (print_entry): Made aware of Unicode. First,
8346 convert TITLE to UCS-4, and predict the cursor position by
8349 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
8351 * kern/misc.c (grub_utf16_to_utf8): Likewise.
8353 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8355 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
8356 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8359 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
8360 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8361 grub_strcpy and grub_strlen. Take it into account that a space
8362 character is inserted as a delimiter.
8364 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8366 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
8367 invalid magic in the error.
8369 * commands/search.c: New file.
8371 * util/grub-emu.c (main): Call grub_search_init and
8374 * kern/rescue.c (grub_rescue_print_disks): Removed.
8375 (grub_rescue_print_devices): New function.
8376 (grub_rescue_cmd_ls): Use grub_device_iterate with
8377 grub_rescue_print_devices instead of grub_disk_dev_iterate with
8378 grub_rescue_print_disks.
8380 * kern/partition.c (grub_partition_iterate): Return the result of
8381 PARTMAP->ITERATE instead of GRUB_ERRNO.
8383 * kern/device.c: Include grub/partition.h.
8384 (grub_device_iterate): New function.
8386 * include/grub/partition.h (grub_partition_iterate): Return int
8387 instead of grub_err_t.
8389 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
8391 [GRUB_UTIL] (grub_search_fini): Likewise.
8393 * include/grub/device.h (grub_device_iterate): New prototype.
8395 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8397 (pkgdata_MODULES): Added search.mod.
8398 (search_mod_SOURCES): New variable.
8399 (search_mod_CFLAGS): Likewise.
8401 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
8402 (pkgdata_MODULES): Added search.mod.
8403 (search_mod_SOURCES): New variable.
8404 (search_mod_CFLAGS): Likewise.
8406 * commands/ls.c (grub_ls_list_disks): Renamed to ...
8407 (grub_ls_list_devices): ... this, and use grub_device_iterate.
8408 All callers changed.
8410 * DISTLIST: Added commands/search.c.
8412 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8414 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
8416 (grub_getcharwidth): New function.
8418 * kern/misc.c (grub_utf8_to_ucs4): New function.
8420 * include/grub/term.h (struct grub_term): Added a new member
8422 (grub_getcharwidth): New prototype.
8424 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
8426 * term/i386/pc/console.c (map_char): New function. Segregated from
8427 grub_console_putchar.
8428 (grub_console_putchar): Use map_char.
8429 (grub_console_getcharwidth): New function.
8430 (grub_console_term): Specified grub_console_getcharwidth as
8433 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
8434 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
8436 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
8438 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
8439 on grub_strtoul completely.
8440 (write_char): Declare local variables in the beginning of the
8442 (grub_vesafb_getcharwidth): New function.
8443 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
8446 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
8448 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
8449 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
8450 commands/i386/pc/vbetest.c.
8452 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
8453 call grub_vbe_get_controller_info again, because the returned
8454 information is volatile.
8455 (grub_vbe_set_video_mode): Mostly rewritten.
8456 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
8457 grub_vbe_status_t correctly.
8458 (grub_vbe_get_video_mode_info): Likewise.
8459 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
8460 several if statements.
8462 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
8463 * commands/i386/pc/vbeinfo.c: ... this.
8465 * commands/i386/pc/vbe_test.c: Renamed to ...
8466 * commands/i386/pc/vbetest.c: ... this.
8468 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
8470 (grub_cmd_vbeinfo): ... this. Save video modes before
8471 iterating. Skip a video mode, if it is not available, not enough
8472 information is given or it is monochrome. Show the memory
8473 model. Leave the interpretation of MODEVAR to grub_strtoul
8475 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
8476 (GRUB_MOD_FINI): Likewise.
8478 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
8479 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
8480 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
8481 duplicated grub_env_get. Leave the interpretation of MODEVAR to
8482 grub_strtoul completely.
8484 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
8485 (GRUB_MOD_FINI): Likewise.
8487 * normal/misc.c: Include grub/mm.h.
8489 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
8490 vbe_list_modes with vbetest.mod and vbeinfo.mod.
8491 (vbe_list_modes_mod_SOURCES): Removed.
8492 (vbe_list_modes_mod_CFLAGS): Likewise.
8493 (vbe_test_mod_SOURCES): Likewise.
8494 (vbe_test_mod_CFLAGS): Likewise.
8495 (vbeinfo_mod_SOURCES): New variable.
8496 (vbeinfo_mod_CFLAGS): Likewise.
8497 (vbetest_mod_SOURCES): Likewise.
8498 (vbetest_mod_CFLAGS): Likewise.
8500 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
8502 * normal/misc.c: New file.
8504 * DISTLIST: Added normal/misc.c.
8506 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
8507 DISK to HOOK. Call HOOK with DISK.
8508 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8509 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8510 * partmap/sun.c (sun_partition_map_iterate): Likewise.
8512 * normal/menu_entry.c (struct screen): Added a new member
8514 (completion_buffer): New global variable.
8515 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
8516 (store_completion): New function.
8517 (complete): Likewise.
8518 (clear_completions): Likewise.
8519 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
8520 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
8521 a tab, call complete.
8523 * normal/completion.c (disk_dev): Removed.
8524 (print_simple_completion): Likewise.
8525 (print_partition_completion): Likewise.
8526 (print_func): New global variable.
8527 (add_completion): Do not take the arguments WHAT or PRINT any
8528 longer. Added a new argument TYPE. Instead of printing directly,
8529 call PRINT_FUNC if not NULL.
8530 All callers changed.
8531 (complete_device): Use a local variable DEV instead of
8532 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
8533 (grub_normal_do_completion): Take a new argument HOOK. Do not
8534 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
8535 empty string, return NULL instead.
8536 All callers changed.
8538 * normal/cmdline.c (print_completion): New function.
8540 * kern/partition.c (grub_partition_iterate): Add an argument DISK
8542 All callers changed.
8544 * kern/disk.c (grub_print_partinfo): Removed.
8546 * include/grub/partition.h (struct grub_partition_map): Add a new
8547 argument DISK into HOOK of ITERATE.
8548 (grub_partition_iterate): Add a new argument DISK to HOOK.
8550 * include/grub/normal.h (enum grub_completion_type): New enum.
8551 (grub_completion_type_t): New type.
8552 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
8553 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
8554 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
8555 (GRUB_COMPLETION_TYPE_FILE): Likewise.
8556 (grub_normal_do_completion): Added a new argument HOOK.
8557 (grub_normal_print_device_info): New prototype.
8559 * include/grub/disk.h (grub_print_partinfo): Removed.
8561 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
8562 (normal_mod_SOURCES): Likewise.
8563 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8564 (normal_mod_SOURCES): Likewise.
8566 * commands/ls.c (grub_ls_list_disks): Use
8567 grub_normal_print_device_info instead of grub_print_partinfo. Free
8569 (grub_ls_list_files): Use grub_normal_print_device_info instead of
8570 duplicating the code.
8572 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8574 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
8575 follow GCS more precisely.
8576 * commands/i386/pc/vbe_test.c: Likewise.
8577 * include/grub/i386/pc/vbe.h: Likewise.
8578 * term/i386/pc/vesafb.c: Likewise.
8579 * video/i386/pc/vbe.c: Likewise.
8581 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8583 * DISTLIST: Added term/i386/pc/vesafb.c
8584 DISTLIST: Added video/i386/pc/vbe.c
8585 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
8586 DISTLIST: Added commands/i386/pc/vbe_test.c.
8587 * commands/i386/pc/vbe_list_modes.c: New file.
8588 * commands/i386/pc/vbe_test.c: Likewise.
8589 * term/i386/pc/vesafb.c: Likewise.
8590 * video/i386/pc/vbe.c: Likewise.
8591 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
8592 (grub_vbe_probe) Added prototype.
8593 (grub_vbe_set_video_mode) Likewise.
8594 (grub_vbe_get_video_mode) Likewise.
8595 (grub_vbe_get_video_mode_info) Likewise.
8596 (grub_vbe_set_pixel_rgb) Likewise.
8597 (grub_vbe_set_pixel_index) Likewise.
8598 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
8599 (pkgdata_MODULES): Added vesafb.mod.
8600 (pkgdata_MODULES): Added vbe_list_modes.mod.
8601 (pkgdata_MODULES): Added vbe_test.mod.
8602 (vbe_mod_SOURCES): Added.
8603 (vbe_mod_CFLAGS): Likewise.
8604 (vesafb_mod_SOURCES): Likewise.
8605 (vesafb_mod_CFLAGS): Likewise.
8606 (vbe_list_modes_mod_SOURCES): Likewise.
8607 (vbe_list_modes_mod_CFLAGS): Likewise.
8608 (vbe_test_mod_SOURCES): Likewise.
8609 (vbe_test_mod_CFLAGS): Likewise.
8611 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
8613 * normal/command.c (grub_command_execute): If INTERACTIVE is
8614 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
8615 CMDLINE. Disable the pager if INTERACTIVE is true.
8616 All callers are changed.
8618 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
8619 before reading a config file.
8620 * normal/main.c (read_config_file): Even if a command is not
8621 found, register it if it is within an entry.
8623 * util/grub-emu.c: Include sys/types.h and unistd.h.
8624 (options): Added --hold.
8625 (struct arguments): Added a new member "hold".
8626 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
8628 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
8629 cleared by a debugger, if it is not zero.
8631 * include/grub/normal.h (grub_command_execute): Add an argument
8634 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
8636 * DISTLIST: Added include/grub/i386/pc/vbe.h.
8638 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
8640 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
8641 program with another one, because the old one didn't detect a bug
8642 in gcc-3.4. Always use regparm 2, because the new test is still
8643 not enough for gcc-4.0. Someone must investigate a simple test
8644 case which detects a bug in gcc-4.0.
8646 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
8648 * DISTLIST: Added normal/completion.c.
8650 * normal/completion.c: New file.
8652 * term/i386/pc/console.c (grub_console_getwh): New function.
8653 (grub_console_term): Assign grub_console_getwh to getwh.
8655 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
8656 function is defined in normal/completion.c as
8657 grub_normal_do_completion.
8658 (grub_cmdline_get): Use grub_normal_do_completion instead of
8661 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
8662 returns non-zero, otherwise return 0.
8663 (grub_partition_iterate): First, probe the partition map. Then,
8664 call ITERATE only for this partition map.
8666 * kern/misc.c (grub_strncmp): Rewritten.
8668 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
8669 returns non-zero. Otherwise return 0.
8671 * include/grub/partition.h (grub_partition_map_iterate): Return
8672 int instead of void.
8674 * include/grub/normal.h (grub_normal_do_completion): New prototype.
8676 * include/grub/misc.h (grub_strncmp): Change the type of N to
8679 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
8682 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
8683 unsigned explicitly before comparing it with I.
8685 * kern/main.c (grub_env_write_root): Add the attribute unused into
8688 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8689 normal/completion.c.
8690 (normal_mod_SOURCES): Likewise.
8691 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8692 (normal_mod_SOURCES): Likewise.
8694 * normal/command.c (grub_iterate_commands): If ITERATE returns
8695 non-zero, return one immediately.
8697 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
8699 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
8700 * kern/i386/pc/startup.S: Updated Global Descriptor table's
8702 (grub_vbe_get_controller_info): New function.
8703 (grub_vbe_get_mode_info): Likewise.
8704 (grub_vbe_set_mode): Likewise.
8705 (grub_vbe_get_mode): Likewise.
8706 (grub_vbe_set_memory_window): Likewise.
8707 (grub_vbe_get_memory_window): Likewise.
8708 (grub_vbe_set_scanline_length): Likewise.
8709 (grub_vbe_get_scanline_length): Likewise.
8710 (grub_vbe_set_display_start): Likewise.
8711 (grub_vbe_get_display_start): Likewise.
8712 (grub_vbe_set_palette_data): Likewise.
8713 * include/grub/i386/pc/vbe.h: New file.
8715 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8717 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8718 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
8719 * DISTLIST: Likewise.
8720 * kern/ieee1275/of.c: Moved to ...
8721 * kern/ieee1275/ieee1275.c: ... here.
8723 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8725 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
8726 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
8727 Pass 0 as `end' parameter to grub_strtoul().
8729 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8731 * include/grub/powerpc/ieee1275/console.h: Do not include
8732 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
8734 (grub_console_cur_color): Remove i386-specific prototype.
8735 (grub_console_real_putchar): Likewise.
8736 (grub_console_checkkey): Likewise.
8737 (grub_console_getkey): Likewise.
8738 (grub_console_getxy): Likewise.
8739 (grub_console_gotoxy): Likewise.
8740 (grub_console_cls): Likewise.
8741 (grub_console_setcursor): Likewise.
8742 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
8743 Include <grub/machine/console.h>.
8744 * term/ieee1275/ofconsole.c: Likewise.
8746 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
8748 * Makefile.in (LIBLZO): New variable.
8750 * configure.ac: Check for LZO version 2.
8752 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
8753 lzo/lzo1x.h instead of lzo1x.h.
8755 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
8758 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
8759 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
8761 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
8762 copying the data from PARTITION to P.
8764 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8766 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
8767 negative, unload the module.
8769 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
8770 map is "pc_partition_map" but not "pc".
8771 (usage): Fix the description. The options are --boot-image and
8772 --core-image but not --boot-file or --core-file.
8773 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
8774 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
8777 * util/i386/pc/grub-install.in: Do not specify --boot-file or
8778 --core-file. Specify INSTALL_DEVICE as an argument.
8780 * util/console.c: Include config.h.
8781 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
8782 [HAVE_NCURSES_H]: Include ncurses.h.
8783 [HAVE_CURSES_H]: Include curses.h.
8784 [!A_NORMAL] (A_NORMAL): Defined as zero.
8785 [!A_STANDOUT] (A_STANDOUT): Likewise.
8787 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
8789 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
8791 * configure.ac: Check for curses libraries and headers.
8793 * Makefile.in (LIBCURSES): New variable.
8795 * genmk.rb (Script::rule): Set the executable bits.
8797 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
8798 name of the PC partition map is "pc_partition_map" but not "pc".
8800 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8802 * util/i386/pc/grub-install.in (grub_probefs): New variable.
8803 (modules): Likewise.
8804 (usage): Added descriptions for --modules and --grub-probefs.
8805 Handle --modules and --grub-probefs. Save the arguments in MODULES
8806 and GRUB_PROBEFS, respectively.
8807 Auto-detect a filesystem module against GRUBDIR. If the result is
8808 empty and modules are not specified explicitly, abort the
8809 installation. Add the result to MODULES.
8811 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
8812 disk/powerpc/ieee1275/ofdisk.c,
8813 include/grub/powerpc/ieee1275/init.h and
8814 term/powerpc/ieee1275/ofconsole.c.
8815 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
8816 term/ieee1275/ofconsole.c.
8818 * include/grub/powerpc/ieee1275/console.h: Resurrected.
8820 * COPYING: Upgraded to the latest version. Only the address of the
8821 FSF office has changed.
8823 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8825 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8826 kern/ieee1275.c with kern/ieee1275/of.c.
8828 * kern/ieee1275.c: Moved to ...
8829 * kern/ieee1275/of.c: ... here.
8831 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
8833 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
8836 * config.guess: Updated to the latest version from gnulib.
8837 * config.sub: Likewise.
8838 * install.sh: Likewise.
8839 * mkinstalldirs: Likewise.
8841 * include/grub/console.h: Removed. This file is arch-specific. Do
8842 not put this in include/grub.
8844 * include/grub/i386/pc/console.h: Resurrected.
8846 * util/console.c: Include grub/machine/console.h instead of
8848 * util/grub-emu.c: Likewise.
8850 2005-08-04 Marco Gerards <metgerards@student.han.nl>
8852 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
8855 From Vincent Pelletier <subdino2004@yahoo.fr>
8856 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
8857 Redefined to use grub_getwh.
8858 (grub_term): New member named getwh.
8859 (grub_getwh): New prototype.
8860 * kern/term.c (grub_getwh): New function.
8861 * term/i386/pc/console.c (grub_console_getwh): New function.
8862 (grub_console_term): New member `getwh'.
8863 * term/i386/pc/vga.c (grub_vga_getwh): New function.
8864 (grub_vga_term): New member `getwh'.
8865 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
8867 (grub_ofconsole_getw): New function.
8868 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
8869 (grub_ofconsole_term): New field named getwh and new initial
8872 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
8874 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
8875 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
8876 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
8877 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
8878 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
8879 of <grub/machine/ieee1275.h>.
8880 * commands/ieee1275/reboot.c: Likewise.
8881 * boot/powerpc/ieee1275/ieee1275.c: Move ...
8882 * kern/ieee1275.c: ... to here. All users updated. Change all
8883 parameter structs to use new type `grub_ieee1275_cell_t'.
8884 * term/powerpc/ieee1275/ofconsole.c: Move ...
8885 * term/ieee1275/ofconsole.c: ... to here. All users updated.
8886 * disk/powerpc/ieee1275/ofdisk.c: Move ...
8887 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
8888 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
8890 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
8891 Remove unused prototypes. All users updated.
8892 * include/grub/powerpc/ieee1275/console.h: Removed.
8893 * include/grub/powerpc/ieee1275/ieee1275.h: Define
8894 `grub_ieee1275_cell_t'.
8895 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
8896 Cast comparisons with -1 to the correct type.
8897 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
8898 type to match `grub_ieee1275_entry_fn'.
8900 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
8902 * DISTLIST: Added util/i386/pc/grub-probefs.c.
8904 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
8905 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
8907 (grub_probefs_SOURCES): New variable.
8909 * util/i386/pc/grub-probefs.c: New file.
8911 * util/i386/pc/grub-setup.c (main): Call
8912 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
8913 grub_hfs_init and grub_jfs_init to initialize the system. Call
8914 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
8915 grub_pc_partition_map_fini to finish the system.
8917 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
8919 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
8921 (grub_multiboot_load_elf32): Likewise.
8922 (grub_multiboot_is_elf64): Likewise.
8923 (grub_multiboot_load_elf64): Likewise.
8924 (grub_multiboot_load_elf): Likewise.
8925 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
8926 an ELF32 or ELF64 file.
8927 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
8929 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
8930 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
8931 NULL before calling FS->LABEL.
8932 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
8933 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
8934 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
8935 before calling FS->LABEL.
8937 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
8939 * util/i386/pc/grub-install.in (datadir): New variable.
8941 (pkgdatadir): New variable.
8942 (pkglibdir): Removed.
8944 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
8946 * DISTLIST: Added util/i386/pc/grub-install.in.
8948 * util/i386/pc/grub-install.in: New file.
8950 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
8951 (grub_install_SOURCES): Likewise.
8953 * genmk.rb: Added support for scripts.
8954 (Script): New class.
8955 (scripts): New variable.
8957 * Makefile.in (install-local): Install sbin_SCRIPTS by
8959 (uninstall): Remove sbin_SCRIPTS.
8961 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
8962 device, try to get a GRUB device by
8963 grub_util_biosdisk_get_grub_dev.
8966 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
8967 description for --device-map.
8969 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
8971 Change the semantics of variable hooks. They now return strings
8972 instead of error values.
8974 * util/i386/pc/grub-setup.c: Include grub/env.h.
8975 (setup): Use grub_device_set_root instead of grub_env_set.
8977 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
8978 grub_env_get instead of grub_device_set_root and
8979 grub_device_get_root, respectively.
8981 * kern/main.c (grub_env_write_root): New function.
8982 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
8983 grub_env_set instead of grub_device_set_root.
8985 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
8987 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
8988 rather than calling ENV->WRITE_HOOK afterwards.
8989 (grub_env_get): Return the result of ENV->READ_HOOK rather than
8990 passing a pointer of a pointer.
8991 (grub_register_variable_hook): Change the types of "read_hook" and
8992 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
8994 Allocate the default empty string on the heap, because this string
8997 * kern/device.c: Include grub/env.h.
8998 (grub_device_set_root): Removed.
8999 (grub_device_get_root): Likewise.
9000 (grub_device_open): Use grub_env_get instead of
9001 grub_device_get_root.
9003 * include/grub/env.h (grub_env_read_hook_t): New type.
9004 (grub_env_write_hook_t): Likewise.
9005 (grub_env_var): Change the types of "read_hook" and "write_hook"
9006 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9007 (grub_register_variable_hook): Likewise.
9009 * include/grub/device.h (grub_device_set_root): Removed.
9010 (grub_device_set_root): Likewise.
9012 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9013 make sure that DIRNAME terminates with '/', so that
9014 grub_fat_find_dir will fail if PATH is not a directory.
9016 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9018 Use the qualifier auto for print_files and print_files_long.
9019 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9021 Put a newline only if there is no error.
9022 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9025 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9027 * kern/partition.c (grub_partition_probe): Initialize PART to
9028 NULL. Otherwise, when no partition map is registered, this returns
9031 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
9033 * partmap/apple.c (apple_partition_map_iterate): Check if POS
9034 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9037 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
9039 * commands/ls.c (grub_ls_list_disks): Print the filesystem
9040 information on each device, if it does not have partitions. Print
9041 "Device" instead of "Disk", because this function is not specific
9044 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9045 static to ensure that it is put on the memory rather than a
9048 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9050 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9051 (grub_cat_init): Likewise.
9052 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9053 (options): Likewise.
9054 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9055 (grub_configfile_init): Likewise.
9056 * font/manager.c (GRUB_MOD_INIT): Likewise.
9057 * commands/help.c (GRUB_MOD_INIT): Likewise.
9058 (grub_help_init): Likewise.
9059 * normal/command.c (grub_command_init): Likewise.
9060 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9061 * disk/loopback.c (grub_loop_init): Likewise.
9062 (GRUB_MOD_INIT): Likewise.
9063 * commands/ls.c (grub_ls_init): Likewise.
9064 (GRUB_MOD_INIT): Likewise.
9065 (options): Likewise.
9066 * commands/boot.c (grub_boot_init): Likewise.
9067 (GRUB_MOD_INIT): Likewise.
9068 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9069 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9070 (GRUB_MOD_INIT): Likewise.
9071 * commands/cmp.c (grub_cmp_init): Likewise.
9072 (GRUB_MOD_INIT): Likewise.
9074 * normal/arg.c: Use <> instead of "" to include header files.
9075 (SHORT_ARG_HELP): New macro.
9076 (SHORT_ARG_USAGE): Likewise.
9077 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9078 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9080 (find_short): Check if C is 'h' or 'u' explicitly.
9081 (grub_arg_show_help): Use space characters instead of tabs. Treat
9082 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9083 are shown with --help and --usage only if they are not used for
9085 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9088 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9089 const into "longarg". Change the type of "shortarg" to int.
9091 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9093 * boot/i386/pc/boot.S (boot_drive_check): New label.
9095 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9098 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9099 which do not pass a boot drive correctly. Copied from GRUB Legacy.
9101 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9103 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9104 When turning off Gate A20, skip the check and return immediately,
9105 because this is not fatal usually.
9107 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
9109 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9110 be 0x7C00 instead of 0x8000.
9112 * boot/i386/pc/pxeboot.S: Rewritten.
9114 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9116 (gate_a20_check_state): Read a byte from 0x108000. Invert the
9119 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
9121 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9122 robustness. This routine now supports a BIOS call and System
9123 Control Port A to modify the gate A20.
9125 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9128 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
9130 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9131 device path and resulting ihandle.
9132 (grub_ofdisk_close): dprintf the ihandle being closed.
9133 (grub_ofdisk_read): dprintf function parameters.
9134 * kern/mm.c (grub_mm_init_region): Likewise.
9135 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9136 (grub_linux_boot): dprintf the Linux entry point, initrd address and
9137 size, and boot arguments.
9138 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9139 before loading into memory.
9140 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9141 before loading into memory.
9143 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
9145 * kern/mm.c: Added much documentation.
9146 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9147 8, set to 5 instead of 8.
9149 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9151 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9153 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9154 (grub_mkdevicemap_SOURCES): New variable.
9156 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9157 lib/device.c of GRUB Legacy.
9159 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
9161 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9162 instead of PATH is NULL.
9164 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
9166 * commands/cmp.c (BUFFER_SIZE): New macro.
9167 (grub_cmd_cmp): Close the right file at the right time. Compare
9168 only data just read. Don't report files of different size as
9169 identical. Dynamically allocate buffers. Move variable
9170 declarations at the beginning of function.
9172 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
9174 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9177 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
9179 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9180 when backspace is pressed at beginning of line.
9182 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
9184 * DISTLIST: Added genfslist.sh.
9186 * normal/main.c (fs_module_list): New variable.
9187 (autoload_fs_module): New function.
9188 (read_fs_list): Likewise.
9189 (grub_normal_execute): Call read_fs_list.
9191 * kern/fs.c (grub_fs_autoload_hook): New variable.
9192 (grub_fs_probe): Added support for auto-loading.
9194 * include/grub/normal.h (struct grub_fs_module_list): New struct.
9195 (grub_fs_module_list_t): New type.
9197 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
9198 (grub_fs_autoload_hook): New prototype.
9200 * genfslist.sh: New file.
9202 * genmk.rb: Added a rule to generate a filesystem list.
9204 2005-06-30 Marco Gerards <metgerards@student.han.nl>
9206 * configure.ac: Fix the test for cross-compiling.
9208 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
9209 define GRUB_UTIL anymore.
9211 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9212 so this function works on other systems than just big endian.
9213 (load_modules): Likewise.
9214 (add_segments): Likewise.
9216 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
9218 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
9219 contains `l' modifier, get a long from va_arg().
9221 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
9223 * kern/mm.c (grub_free): If the next free block which is being
9224 merged is the first free block, set the first block to the block
9226 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
9228 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9230 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
9231 `grub_ieee1275_chosen'.
9233 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9235 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
9236 (grub_ieee1275_chosen): New variable.
9237 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
9239 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
9240 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9241 Rename first argument to `phandle' for consistency.
9242 (grub_ieee1275_get_property_length): Likewise.
9243 (grub_ieee1275_next_property): Likewise. Change type of first argument
9244 to grub_ieee1275_phandle_t.
9245 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
9246 Move export next to declaration.
9247 (grub_ieee1275_chosen): New variable.
9248 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
9249 Correct cosmetic typo.
9250 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
9251 `grub_ieee1275_chosen'.
9252 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
9253 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
9254 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
9255 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
9256 `grub_ieee1275_chosen'.
9258 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
9260 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
9262 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
9263 /chosen/bootargs as "variable=value" pairs.
9265 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
9267 * include/grub/misc.h (grub_dprintf): New macro.
9268 (grub_real_dprintf): New prototype.
9269 (grub_strword): Likewise.
9270 (grub_iswordseparator): Likewise.
9271 * kern/misc.c (grub_real_dprintf): New function.
9272 (grub_strword): Likewise.
9273 (grub_iswordseparator): Likewise.
9275 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
9277 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
9278 (roundup): Remove macro.
9279 (grub_ieee1275_flags): Make static.
9280 (grub_ieee1275_realmode): Remove.
9281 (grub_ieee1275_test_flag): New function.
9282 (grub_ieee1275_set_flag): Likewise.
9283 (find_options): Rename to `grub_ieee1275_find_options'; update
9284 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
9285 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
9286 (cmain): New prototype.
9287 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
9288 `grub_ieee1275_flags' directly.
9289 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
9291 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
9292 Don't include grub/machine/init.h.
9293 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
9294 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9296 (grub_ieee1275_realmode): Likewise.
9297 (grub_ieee1275_flag): New enum.
9298 (grub_ieee1275_test_flag): New prototype.
9299 (grub_ieee1275_set_flag): New prototype.
9300 * include/grub/powerpc/ieee1275/init.h: Remove file.
9301 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
9302 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
9303 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
9304 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
9306 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
9307 `grub_ieee1275_test_flag'.
9308 (grub_ieee1275_encode_devname): Likewise.
9310 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
9312 * include/grub/powerpc/ieee1275/ieee1275.h
9313 (grub_ieee1275_encode_devname): New prototype.
9314 (grub_ieee1275_get_filename): Likewise.
9315 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
9317 (grub_set_prefix): Likewise.
9318 (grub_machine_init): Call grub_set_prefix.
9319 * kern/powerpc/ieee1275/openfw.c: Fix typos.
9320 (grub_parse_type): New enum.
9321 (grub_ieee1275_get_devargs): New function.
9322 (grub_ieee1275_get_devname): Likewise.
9323 (grub_ieee1275_parse_args): Likewise.
9324 (grub_ieee1275_get_filename): Likewise.
9325 (grub_ieee1275_encode_devname): Likewise.
9327 2005-03-30 Marco Gerards <metgerards@student.han.nl>
9329 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
9330 `grub_loader_unset'.
9332 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
9334 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
9335 instead of grub_ieee1275_interpret.
9336 (grub_halt_init): New function.
9337 (grub_halt_fini): Likewise.
9338 (GRUB_MOD_INIT): Correct message grammar.
9339 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
9340 instead of grub_ieee1275_interpret.
9341 (grub_reboot_init): New function.
9342 (grub_reboot_fini): Likewise.
9343 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
9344 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
9345 util/i386/pc/misc.c with commands/ieee1275/halt.c,
9346 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
9347 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
9349 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
9351 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
9353 (grub_halt): Likewise.
9354 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
9355 (cmain): Remove __attribute__((unused)).
9356 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
9357 (grub_heap_len): Likewise.
9358 (grub_machine_fini): New function.
9359 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
9360 (grub_halt): Likewise.
9361 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
9363 * util/powerpc/ieee1275/misc.c: New file.
9365 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9367 * DISTLIST: New file.
9368 * gendistlist.sh: Likewise.
9370 * Makefile.in (COMMON_DISTFILES): Removed.
9371 (BOOT_DISTFILES): Likewise.
9372 (CONF_DISTFILES): Likewise.
9373 (DISK_DISTFILES): Likewise.
9374 (FS_DISTFILES): Likewise.
9375 (INCLUDE_DISTFILES): Likewise.
9376 (KERN_DISTFILES): Likewise.
9377 (LOADER_DISTFILES): Likewise.
9378 (TERM_DISTFILES): Likewise.
9379 (UTIL_DISTFILES): Likewise.
9380 (DISTFILES): Likewise.
9381 (uninstall): Uninstall files in $(pkgdata_DATA).
9382 (DISTLIST): New target.
9383 (distdir): Use the contents of the file DISTLIST to get a list of
9386 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9388 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
9389 descriptor. This is ported from GRUB Legacy.
9391 * gencmdlist.sh: Added an extra semicolon to make it work with
9392 old sed versions. Reported by Robert Bihlmeyer
9393 <robbe@orcus.priv.at>.
9395 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
9397 Automatic loading of commands is supported.
9399 * normal/main.c (read_command_list): New function.
9400 (grub_normal_execute): Call read_command_list.
9402 * normal/command.c (grub_register_command): Return zero or CMD.
9403 Allocate CMD->NAME from the heap.
9404 Initialize CMD->MODULE_NAME to zero.
9405 Find the same name as well. If the same command is found and it is
9406 a dummy command, overwrite members. If it is not a dummy command,
9408 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
9409 (grub_command_find): If a dummy command is found, load a module
9410 and retry to find a command only once.
9412 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
9413 make sure that each command is loaded.
9415 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
9417 (struct grub_command): Remove const from the member `name'.
9418 Add a new member `module_name'.
9419 (grub_register_command): Return grub_command_t.
9421 * commands/help.c (grub_cmd_help): Call grub_command_find to make
9422 sure that each command is loaded.
9424 * genmk.rb (PModule::rule): Specify a module name without the
9425 suffix ".mod" to gencmdlist.sh.
9427 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9429 * gencmdlist.sh: New file.
9431 * genmk.rb (PModule::rule): Generate a rule for a command list.
9433 Generate command.lst from $(COMMANDFILES).
9435 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
9436 (DATA): Added $(pkgdata_DATA).
9437 (install-local): Install files in $(pkgdata_DATA).
9439 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9441 * term/i386/pc/vga.c (debug_command): Removed.
9442 (GRUB_MOD_INIT): Do not register the command "debug".
9444 From Hollis Blanchard:
9445 * commands/configfile.c: New file.
9446 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9447 commands/configfile.c.
9448 (pkgdata_MODULES): Added configfile.mod.
9449 (configfile_mod_SOURCES): New variable.
9450 (configfile_mod_CFLAGS): Likewise.
9451 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9452 commands/configfile.c.
9453 (pkgdata_MODULES): Added configfile.mod.
9454 (configfile_mod_SOURCES): New variable.
9455 (configfile_mod_CFLAGS): Likewise.
9456 * util/grub-emu.c (main): Call grub_configfile_init and
9457 grub_configfile_fini.
9458 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
9460 [GRUB_UTIL] (grub_configfile_fini): Likewise.
9462 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9464 * normal/arg.c (grub_arg_show_help): Do not show the bug report
9467 * commands/help.c (grub_cmd_help): Do not print newlines after
9468 the last command in print_command_help.
9470 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9472 * commands/default.h: New file.
9473 * commands/timeout.h: Likewise.
9474 * normal/context.c: Likewise.
9476 * util/misc.c: Do not include sys/times.h.
9477 Include sys/time.h and grub/machine/time.h.
9478 (grub_get_rtc): Rewritten with gettimeofday.
9480 * util/grub-emu.c (main): Call grub_default_init and
9481 grub_timeout_init before grub_normal_init, and call
9482 grub_timeout_fini and grub_default_fini after grub_main.
9484 * util/console.c (grub_ncurses_checkkey): Return the read
9487 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
9490 * normal/main.c (read_config_file): Push MENU. If this fails,
9491 print an error and wait for a user input.
9492 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
9493 If a menu is empty or an error occurs, pop MENU.
9494 (grub_normal_execute): Pop and free MENU after grub_menu_run
9497 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
9499 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
9501 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9503 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
9505 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9508 * include/grub/normal.h (struct grub_menu_list): New struct.
9509 (grub_menu_list_t): New type.
9510 (struct grub_context): New struct.
9511 (grub_context_t): New type.
9512 (grub_register_command): Got rid of EXPORT_FUNC.
9513 (grub_unregister_command): Likewise.
9514 (grub_context_get): New prototype.
9515 (grub_context_get_current_menu): Likewise.
9516 (grub_context_push_menu): Likewise.
9517 (grub_context_pop_menu): Likewise.
9518 [GRUB_UTIL] (grub_default_init): Likewise.
9519 [GRUB_UTIL] (grub_default_fini): Likewise.
9520 [GRUB_UTIL] (grub_timeout_init): Likewise.
9521 [GRUB_UTIL] (grub_timeout_fini): Likewise.
9523 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
9524 commands/timeout.c and normal/context.c.
9525 (pkgdata_MODULES): Added default.mod and timeout.mod.
9526 (normal_mod_SOURCES): Added normal/context.c.
9527 (default_mod_SOURCES): New variable.
9528 (default_mod_CFLAGS): Likewise.
9529 (timeout_mod_SOURCES): Likewise.
9530 (timeout_mod_CFLAGS): Likewise.
9531 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
9533 (pkgdata_MODULES): Added default.mod and timeout.mod.
9534 (normal_mod_SOURCES): Added normal/context.c.
9535 (default_mod_SOURCES): New variable.
9536 (default_mod_CFLAGS): Likewise.
9537 (timeout_mod_SOURCES): Likewise.
9538 (timeout_mod_CFLAGS): Likewise.
9540 * Makefile.in (all-local): Added $(MKFILES).
9542 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
9544 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
9545 (grub_emu_SOURCES): Likewise.
9546 (pkgdata_MODULES): Add `sun.mod'.
9547 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9550 (pkgdata_MODULES): Add `sun.mod'.
9551 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9552 * include/grub/partition.h (grub_sun_partition_map_init): New
9554 (grub_sun_partition_map_fini): Likewise.
9555 * partmap/sun.c: New file.
9556 * util/grub-emu.c (main): Initialize and de-initialize the sun
9557 partitionmap support.
9559 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
9561 This implements an Emacs-like menu entry editor.
9563 * normal/menu_entry.c: New file.
9565 * util/console.c (grub_ncurses_putchar): Translate some Unicode
9566 characters to ASCII.
9567 (saved_char): New variable.
9568 (grub_ncurses_checkkey): Rewritten completely.
9569 (grub_ncurses_getkey): Likewise.
9570 (grub_ncurses_init): Call raw instead of cbreak.
9572 * normal/menu.c (print_entry): Do not put a space.
9573 (init_page): Renamed to ...
9574 (grub_menu_init_page): ... this. All callers changed.
9575 (edit_menu_entry): Removed.
9576 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
9578 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
9580 * kern/misc.c (grub_vprintf): Call grub_refresh.
9582 * normal/menu.c (DISP_LEFT): Renamed to ...
9583 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
9584 * normal/menu.c (DISP_UP): Renamed to ...
9585 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
9586 * normal/menu.c (DISP_RIGHT): Renamed to ...
9587 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
9588 * normal/menu.c (DISP_DOWN): Renamed to ...
9589 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
9590 * normal/menu.c (DISP_HLINE): Renamed to ...
9591 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
9592 * normal/menu.c (DISP_VLINE): Renamed to ...
9593 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
9594 * normal/menu.c (DISP_UL): Renamed to ...
9595 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
9596 * normal/menu.c (DISP_UR): Renamed to ...
9597 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
9598 * normal/menu.c (DISP_LL): Renamed to ...
9599 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
9600 * normal/menu.c (DISP_LR): Renamed to ...
9601 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
9602 * normal/menu.c (TERM_WIDTH): Renamed to ...
9603 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
9604 * normal/menu.c (TERM_HEIGHT): Renamed to ...
9605 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
9606 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
9607 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
9608 * normal/menu.c (TERM_MARGIN): Renamed to ...
9609 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
9610 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
9611 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
9612 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
9613 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
9614 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
9615 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
9616 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
9617 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
9618 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
9619 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
9620 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
9621 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
9622 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
9623 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
9624 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
9625 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
9626 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
9627 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
9628 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
9629 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
9630 All callers changed.
9632 * include/grub/normal.h: New prototype.
9634 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9635 normal/menu_entry.c.
9636 (normal_mod_SOURCES): Likewise.
9637 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9638 (normal_mod_SOURCES): Likewise.
9640 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
9642 * include/grub/normal.h (grub_halt_init): New prototype.
9643 (grub_halt_fini): Likewise.
9644 (grub_reboot_init): Likewise.
9645 (grub_reboot_fini): Likewise.
9647 * util/grub-emu.c: Include signal.h.
9648 (main_env): New global variable.
9649 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
9651 (grub_machine_fini): New function.
9652 (main): Call grub_halt_init and grub_reboot_init before
9653 grub_main, and grub_reboot_fini and grub_halt_fini after it.
9654 Call setjmp with MAIN_ENV to go back afterwards.
9655 Call grub_machine_fini right before return.
9657 * include/grub/util/misc.h: Include setjmp.h.
9658 (main_env): New prototype.
9660 * include/grub/kernel.h (grub_machine_fini): New prototype.
9661 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
9662 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
9664 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
9665 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
9666 * term/i386/pc/console.c (grub_console_fini): Likewise.
9668 * util/i386/pc/misc.c: New file.
9670 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9671 util/i386/pc/misc.c, commands/i386/pc/halt.c and
9672 commands/i386/pc/reboot.c.
9674 2005-02-14 Guillem Jover <guillem@hadrons.org>
9676 * include/grub/dl.h (grub_dl_check_header): New prototype.
9677 (grub_arch_dl_check_header): Change return type to grub_err_t,
9678 remove size parameter and export function. Update all callers.
9679 * kern/dl.c (grub_dl_check_header): New function.
9680 (grub_dl_load_core): Use `grub_dl_check_header' instead of
9681 `grub_arch_dl_check_header'. Check ELF type. Check if sections
9682 are inside the core.
9683 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
9684 independent ELF header checks.
9685 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9686 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
9687 `grub_dl_check_header' instead of explicit checks. Check for the
9689 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
9690 `grub_dl_check_header' instead of explicit checks. Remove arch
9691 specific ELF header checks.
9693 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
9696 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
9698 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
9699 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
9701 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
9703 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
9704 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
9705 (part_map_iterate): Clear `grub_errno' and return 0 if
9706 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
9707 * partmap/amiga.c (amiga_partition_map_iterate): Return
9708 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
9709 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9711 2005-02-01 Guillem Jover <guillem@hadrons.org>
9713 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
9716 2005-01-31 Marco Gerards <metgerards@student.han.nl>
9718 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
9720 (grub_rescue_cmd_linux): New prototype.
9721 (grub_rescue_cmd_initrd): Likewise.
9722 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
9724 (grub_linux_release_mem): Release the memory for the initrd.
9725 (grub_load_linux): Renamed from this...
9726 (grub_rescue_cmd_linux): ...To this. Changed all callers.
9727 Changed `entry' not to be static. Loop over memory regions to
9728 find another one when the default fails.
9729 (grub_rescue_cmd_initrd): New function.
9730 (grub_linux_init): Remove function.
9731 (grub_linux_fini): Likewise.
9732 (GRUB_MOD_INIT): Register `initrd'.
9733 (GRUB_MOD_FINI): Unregister `initrd'.
9734 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
9736 (grub_linux_normal_fini): Likewise.
9737 (GRUB_MOD_INIT): Register `initrd'.
9738 (GRUB_MOD_FINI): Unregister `initrd'.
9740 2005-01-31 Marco Gerards <metgerards@student.han.nl>
9742 * commands/help.c: New file.
9743 * normal/arg.c (show_help): Renamed to...
9744 (grub_arg_show_help): ... this.
9745 * commands/i386/pc/halt.c: New file.
9746 * commands/i386/pc/reboot.c: Likewise.
9747 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
9748 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
9749 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
9750 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
9752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9754 (pkgdata_MODULES): Add `help.mod'.
9755 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
9756 * grub/i386/pc/init.h (grub_reboot): New prototype.
9757 (grub_halt): Likewise.
9758 * include/grub/normal.h (grub_arg_show_help): New prototype.
9759 (grub_help_init): Likewise.
9760 (grub_help_fini): Likewise.
9761 * util/grub-emu.c (main): Initialize and deinitialize the help
9764 * normal/cmdline.c (grub_cmdline_get): Doc fix.
9766 * normal/command.c (grub_command_init): Fixed the description of
9767 the `set' and `unset' commands.
9769 2005-01-31 Marco Gerards <metgerards@student.han.nl>
9771 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
9773 * commands/ieee1275/halt.c: New file.
9774 * commands/ieee1275/reboot.c: Likewise.
9775 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
9776 `__attribute__ ((unused))'. Some GCS related fixed.
9777 (grub_suspend_init) [GRUB_UTIL]: Function removed.
9778 (grub_suspend_fini): Likewise.
9779 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
9781 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
9782 (halt_mod_CFLAGS): New variables.
9783 * include/grub/powerpc/ieee1275/ieee1275.h
9784 (grub_ieee1275_interpret): New prototype.
9786 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
9788 * include/grub/misc.h (memmove): New prototype.
9791 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
9793 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
9794 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
9796 2005-01-22 Marco Gerards <metgerards@student.han.nl>
9798 * kern/misc.c (grub_strndup): Function rewritten.
9800 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
9802 * normal/menu.c (TERM_WIDTH): Macro redefined.
9803 (TERM_TOP_BORDER_Y): Likewise.
9804 (draw_border): Replaced while-loop by a for-loop. Make the number
9805 of lines consistent with the number of lines displayed in
9806 print_entries. Added a margin below the rectangle.
9807 (print_entry): Make the entry fit in the rectangle.
9808 (print_entries): Display the scroll arrows next to the right
9811 2005-01-21 Marco Gerards <metgerards@student.han.nl>
9813 * fs/minix.c (grub_minix_find_file): Reserve more space for
9814 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
9815 `grub_strncpy' to copy `path' into it.
9817 2005-01-21 Marco Gerards <metgerards@student.han.nl>
9819 Add the loopback device, a device via which files can be accessed
9822 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
9823 (pkgdata_MODULES): Add loopback.mod.
9824 (loopback_mod_SOURCES): New variable.
9825 (loopback_mod_CFLAGS): Likewise.
9826 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9828 (pkgdata_MODULES): Add loopback.mod.
9829 (loopback_mod_SOURCES): New variable.
9830 (loopback_mod_CFLAGS): Likewise.
9831 * disk/loopback.c: new file.
9832 * include/grub/normal.h (grub_loop_init): New prototype.
9833 (grub_loop_fini): New prototype.
9834 * util/grub-emu.c (main): Initialize and de-initialize loopback
9836 * include/grub/disk.h (grub_disk_dev_id): Add
9837 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
9839 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
9841 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
9843 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
9844 (suspend_mod_SOURCES): New variable.
9845 (suspend_mod_CFLAGS): Likewise.
9846 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
9848 * commands/ieee1275/suspend.c: New file.
9850 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9852 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
9853 ((unused))' to `__attribute__ ((used))'.
9854 (GRUB_MOD_FINI): Likewise.
9855 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
9856 * genmk.rb (PModule): Assign space to common symbols when linking
9859 2005-01-20 Marco Gerards <metgerards@student.han.nl>
9861 * include/grub/mm.h (grub_mm_init_region): Change the type of the
9862 `unsigned' arguments to `grub_size_t'.
9863 (grub_malloc): Likewise.
9864 (grub_realloc): Likewise.
9865 (grub_memalign): Likewise.
9866 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
9867 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9868 * util/misc.c (grub_malloc): Likewise.
9869 (grub_realloc): Likewise.
9870 * kern/mm.c (get_header_from_pointer): Change the casts to
9871 `unsigned' into a cast to `grub_size_t'.
9873 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
9874 point to `currnode' when `currnode' is changed.
9876 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
9877 Schottelius <nico-linux@schottelius.org>.
9879 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
9881 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
9882 (note_path): Remove variable.
9883 (GRUB_IEEE1275_NOTE_NAME): New macro.
9884 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
9885 (grub_ieee1275_note_hdr): New structure.
9886 (grub_ieee1275_note_desc): Likewise.
9887 (grub_ieee1275_note): Likewise.
9888 (load_note): Remove `dir' argument. All callers updated. Remove
9889 `note_img' and `path'. Do not load a file from `note_path'.
9890 Initialize a struct grub_ieee1275_note and write that to `out'.
9891 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
9893 2005-01-05 Marco Gerards <metgerards@student.han.nl>
9895 * util/misc.c (grub_util_read_image): Revert last change. It
9896 called `grub_util_read_at', which seeks from the beginning of the
9899 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
9901 * TODO: Add note about endianness in grub-mkimage.
9902 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
9904 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
9905 (grub_mkimage_SOURCES): New target.
9906 * include/grub/kernel.h (grub_start_addr): Remove variable.
9907 (grub_end_addr): Likewise.
9908 (grub_total_module_size): Likewise.
9909 (grub_kernel_image_size): Likewise.
9910 (GRUB_MODULE_MAGIC): New constant.
9911 (grub_module_info): New structure.
9912 (grub_arch_modules_addr): New prototype.
9913 (grub_get_end_addr): Remove prototype.
9914 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
9915 * include/grub/powerpc/ieee1275/kernel.h: New file.
9916 * include/grub/util/misc.h (grub_util_get_fp_size): New
9918 (grub_util_read_at): Likewise.
9919 (grub_util_write_image_at): Likewise.
9920 * kern/main.c (grub_get_end_addr): Remove function.
9921 (grub_load_modules): Call grub_arch_modules_addr instead of using
9922 grub_end_addr. Look for a grub_module_info struct in memory. Use
9923 the grub_module_info fields instead of calling grub_get_end_addr
9924 as loop conditions. Move grub_add_unused_region code here.
9925 (grub_add_unused_region): Remove function.
9926 * kern/i386/pc/init.c: Include grub/cache.h.
9927 (grub_machine_init): Remove call to grub_get_end_addr. Remove
9928 one call to add_mem_region.
9929 (grub_arch_modules_addr): New function.
9930 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
9931 (grub_total_module_size): Likewise.
9932 Include grub/machine/kernel.h.
9933 (grub_arch_modules_addr): New function.
9934 * util/grub-emu.c (grub_end_addr): Remove variable.
9935 (grub_total_module_size): Likewise.
9936 (grub_arch_modules_addr): New function.
9937 * util/misc.c: Include unistd.h.
9938 (grub_util_get_fp_size): New function.
9939 (grub_util_read_at): Likewise.
9940 (grub_util_write_image_at): Likewise.
9941 (grub_util_read_image): Call grub_util_read_at.
9942 (grub_util_write_image): Call grub_util_write_image_at.
9943 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
9944 additional memory in kernel_img for a struct grub_module_info.
9945 Fill in that grub_module_info.
9946 * util/powerpc/ieee1275/grub-mkimage.c: New file.
9948 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9950 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
9952 * include/grub/powerpc/ieee1275/ieee1275.h
9953 (grub_ieee1275_milliseconds): New prototype.
9954 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
9956 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
9957 grub_ieee1275_milliseconds.
9959 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
9961 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
9963 (find_options): New function.
9964 (cmain): Call find_options.
9965 * include/grub/powerpc/ieee1275/ieee1275.h
9966 (grub_ieee1275_realmode): New extern variable.
9967 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
9968 grub_map if grub_ieee1275_realmode is false.
9970 2004-12-29 Marco Gerards <metgerards@student.han.nl>
9972 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
9973 lines are inserted and make it work like readline. Reported by
9974 Vincent Pelletier <subdino2004@yahoo.fr>.
9976 2004-12-28 Marco Gerards <metgerards@student.han.nl>
9978 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
9980 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
9981 `kern/powerpc/cache.S'.
9983 2004-12-27 Marco Gerards <metgerards@student.han.nl>
9985 * genmk.rb: Handle the `Program' class in the main loop. Written
9986 by Johan Rydberg <jrydberg@gnu.org>.
9987 (Program): New class.
9988 (programs): New variable.
9989 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
9990 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
9991 instead of "grub/kernel.h". Include <grub/machine/init.h>.
9992 (help_arch): Function removed.
9993 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
9994 `powerpc/libgcc.h' and `loader.h'.
9995 (pkgdata_PROGRAMS): New variable.
9996 (sbin_UTILITIES): Variable removed.
9997 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
9998 (grubof_SOURCES): Variable re-defined so it only includes the
10000 (grubof_CFLAGS): Remove `-DGRUBOF'.
10001 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10002 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10003 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10004 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10005 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10006 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10007 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10008 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10009 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10010 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10011 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10012 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10013 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10014 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10015 (pc_mod_CFLAGS): New variables.
10016 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10017 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10018 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10019 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10021 * include/grub/i386/pc/init.h (grub_os_area_addr)
10022 (rub_os_area_size): ... to here.
10023 * include/grub/powerpc/ieee1275/ieee1275.h
10024 (grub_ieee1275_entry_fn): Export symbol.
10025 * include/grub/powerpc/ieee1275/init.h: New file.
10026 * include/grub/powerpc/libgcc.h: Likewise.
10027 * include/grub/cache.h: Likewise.
10028 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
10029 <hollis@penguinppc.org>.
10030 * kern/dl.c: Include <grub/cache.h>.
10031 (grub_dl_flush_cache): New function.
10032 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10034 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10035 (grub_console_init): Removed prototypes.
10036 (grub_machine_init): Don't initialize the modules anymore.
10037 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10039 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10040 Macro undef removed.
10041 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10042 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10043 relocation `R_PPC_REL32'. Return an error when the relocation is
10045 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10046 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10047 * util/misc.c (grub_arch_sync_caches): Likewise.
10049 2004-12-19 Marco Gerards <metgerards@student.han.nl>
10051 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10052 `symlist.c', add `grubof_symlist.c'.
10053 (symlist.c): Variable removed.
10054 (grubof_HEADERS): Variable added.
10055 (grubof_symlist.c): New target.
10056 (kernel_syms.lst): Use `grubof_HEADERS' instead of
10057 `kernel_img_HEADERS'.
10058 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10059 * kern/powerpc/dl.c: New file.
10060 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10062 (grub_arch_dl_relocate_symbols): Likewise.
10063 (grub_register_exported_symbols): Likewise.
10065 2004-12-13 Marco Gerards <metgerards@student.han.nl>
10067 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10068 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
10069 to fail instead. Reported by Vincent Pelletier
10070 <subdino2004@yahoo.fr>.
10072 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10073 it is not allocated. Reported by Vincent Pelletier
10074 <subdino2004@yahoo.fr>.
10076 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10077 output so the output looks better.
10079 2004-12-04 Marco Gerards <metgerards@student.han.nl>
10081 Modulize the partition map support and add support for the amiga
10084 * commands/ls.c: Include <grub/partition.h> instead of
10085 <grub/machine/partition.h>.
10086 * kern/disk.c: Likewise.
10087 * kern/rescue.c: Likewise.
10088 * loader/i386/pc/chainloader.c: Likewise.
10089 * normal/cmdline.c: Likewise.
10090 * kern/powerpc/ieee1275/init.c: Likewise.
10091 (grub_machine_init): Call `grub_pc_partition_map_init',
10092 `grub_amiga_partition_map_init' and
10093 `grub_apple_partition_map_init'.
10094 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10095 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
10096 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
10097 `partition.h' and `pc_partition.h'.
10098 (grub_setup_SOURCES): Remove
10099 `disk/i386/pc/partition.c'. Add `kern/partition.c',
10100 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10101 (grub_emu_SOURCES): Likewise.
10102 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10103 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10104 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10106 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
10107 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10108 (grubof_SOURCES): Likewise.
10109 * disk/i386/pc/partition.c: File removed.
10110 * disk/powerpc/ieee1275/partition.c: Likewise.
10111 * include/grub/powerpc/ieee1275/partition.h: Likewise.
10112 * include/grub/i386/pc/partition.h: Likewise.
10113 * kern/partition.c: New file.
10114 * partmap/amiga.c: Likewise.
10115 * partmap/apple.c: Likewise.
10116 * partmap/pc.c: Likewise.
10117 * include/grub/partition.h: Likewise..
10118 * include/grub/pc_partition.h: Likewise.
10119 * util/grub-emu.c: Include <grub/partition.h> instead of
10120 <grub/machine/partition.h>.
10121 (main): Call `grub_pc_partition_map_init',
10122 `grub_amiga_partition_map_init' and
10123 `grub_apple_partition_map_init' and deinitialize afterwards.
10124 * util/i386/pc/biosdisk.c: Include `#include
10125 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10126 `<grub/machine/partition.h>'.
10127 * util/i386/pc/grub-setup.c: Likewise.
10128 * util/i386/pc/biosdisk.c: Likewise.
10129 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10130 partition information in case of a PC partition.
10131 * util/i386/pc/grub-setup.c: Include `#include
10132 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10133 `<grub/machine/partition.h>'.
10134 (setup): Only access the PC specific partition information in case
10137 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
10139 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10140 (grub_longjmp): Likewise.
10141 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10143 * normal/powerpc/setjmp.S: New file.
10144 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10145 `normal/powerpc/setjmp.S'.
10146 (grubof_CFLAGS): Add `-DGRUBOF'.
10147 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10148 [GRUB_UTIL && !GRUBOF].
10150 2004-11-16 Marco Gerards <metgerards@student.han.nl>
10152 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10153 property named `name'. Correctly handle the error returned by
10154 `grub_ieee1275_finddevice' if a device can not be opened.
10156 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
10158 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10159 `actual' for negativity.
10160 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10163 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10165 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10166 (PAGE_OFFSET): New macro.
10167 (CRTC_ADDR_PORT): Likewise.
10168 (CRTC_DATA_PORT): Likewise.
10169 (START_ADDR_HIGH_REGISTER): Likewise.
10170 (START_ADDR_LOW_REGISTER): Likewise.
10171 (GRAPHICS_ADDR_PORT): Likewise.
10172 (GRAPHICS_DATA_PORT): Likewise.
10173 (READ_MAP_REGISTER): Likewise.
10174 (INPUT_STATUS1_REGISTER): Likewise.
10175 (INPUT_STATUS1_VERTR_BIT): Likewise.
10176 (page): New variable.
10177 (wait_vretrace): New function.
10178 (set_read_map): Likewise.
10179 (set_start_address): Likewise.
10180 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
10182 (check_vga_mem): Take the page into account.
10183 (write_char): Likewise.
10184 (write_cursor): Likewise.
10185 (scroll_up): Likewise. Copy the page to the page that is not
10186 shown and switch between both pages.
10187 (grub_vga_putchar): Fix off by one error.
10188 (grub_vga_cls): Wait for the vertical retrace. Take the page into
10191 2004-11-01 Marco Gerards <metgerards@student.han.nl>
10193 Add support for iso9660 (including rockridge).
10195 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10196 (iso9660_mod_SOURCES): New variable.
10197 (iso9660_mod_CFLAGS): Likewise.
10198 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10199 * include/grub/fs.h (grub_iso9660_init): New prototype.
10200 * util/grub-emu.c (main): Call `grub_iso9660_init'.
10201 * fs/iso9660.c: New file.
10203 * include/grub/misc.h (grub_strncat): New prototype.
10204 * kern/misc.c (grub_strncat): New function.
10206 * fs/hfs.c (grub_hfs_mount): Translate the error
10207 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
10208 * fs/jfs.c (grub_jfs_mount): Likewise.
10209 * fs/ufs.c (grub_ufs_mount): Likewise.
10211 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
10213 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
10214 which initialized BAT registers.
10215 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
10216 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10218 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
10219 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10221 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
10222 (grub_mapclaim): Likewise.
10223 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
10224 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
10227 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
10229 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
10230 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
10231 -ffreestanding and -msoft-float.
10233 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
10235 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
10236 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
10237 set in grub_ieee1275_flags.
10239 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
10241 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
10243 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
10244 grub_console_init first.
10245 Change the memory range used for grub_ieee1275_claim and
10246 grub_mm_init_region.
10247 Print an error message if the claim fails.
10248 Include <grub/misc.h>.
10250 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
10252 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
10253 Call grub_children_iterate for device nodes of type `scsi',
10255 (grub_ofdisk_open): Remove manual device alias resolution.
10256 Fix memory leak when device cannot be opened.
10257 * include/grub/powerpc/ieee1275/ieee1275.h
10258 (grub_children_iterate): New prototype.
10259 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
10261 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10262 Return -1 if args.size was -1.
10264 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10266 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
10267 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
10268 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
10269 Open Firmware's memory for it; claim memory from _start to _end.
10270 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
10271 (_end): New extern.
10272 (_start): Zero BSS from __bss_start to _end.
10273 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10275 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
10277 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10279 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
10280 -1 if args.base was -1.
10282 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
10284 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
10285 escape sequence instead of a literal ^L. Also call
10286 grub_ofconsole_gotoxy.
10288 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
10290 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
10291 void * arguments to grub_addr_t. All callers updated. Also make
10292 the `result' argument optional.
10293 (grub_ieee1275_release): change void * arguments to grub_addr_t.
10294 All callers updated.
10296 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
10298 * commands/ls.c (grub_ls_list_files): Use the string following the
10299 initial ')', if present, as the filesystem path.
10300 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
10302 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
10304 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
10306 Make the source code of the menu interface more readable.
10308 * normal/menu.c: Include grub/mm.h.
10309 (TERM_WIDTH): New macro.
10310 (TERM_HEIGHT): Likewise.
10311 (TERM_INFO_HEIGHT): Likewise.
10312 (TERM_MARGIN): Likewise.
10313 (TERM_SCROLL_WIDTH): Likewise.
10314 (TERM_TOP_BORDER_Y): Likewise.
10315 (TERM_LEFT_BORDER_X): Likewise.
10316 (TERM_BORDER_WIDTH): Likewise.
10317 (TERM_MESSAGE_HEIGHT): Likewise.
10318 (TERM_BORDER_HEIGHT): Likewise.
10319 (TERM_NUM_ENTRIES): Likewise.
10320 (TERM_FIRST_ENTRY_Y): Likewise.
10321 (TERM_ENTRY_WIDTH): Likewise.
10322 (TERM_CURSOR_X): Likewise.
10323 (draw_border): Use macros instead of magic numbers.
10324 (print_entry): Likewise.
10325 (print_entries): Likewise.
10326 (run_menu): Likewise. Also, handle the key 'e'.
10327 (run_menu_entry): Ignore empty command lines.
10328 (print_message): Added a new argument EDIT. If EDIT is true,
10329 print a different message.
10330 (init_page): Likewise.
10331 (edit_menu_entry): New function. Not implemented yet.
10333 2004-09-17 Marco Gerards <metgerards@student.han.nl>
10335 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
10336 can be loaded from normal mode.
10338 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
10340 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
10341 (multiboot_mod_CFLAGS): New variables.
10342 * loader/i386/pc/linux_normal.c: New file.
10343 * loader/i386/pc/multiboot_normal.c: Likewise.
10345 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
10346 attribute `unused'.
10348 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
10349 `fdiro' to read the mode information from instead of `diro'.
10351 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
10352 looking up a symlink.
10354 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
10356 * normal/command.c (grub_command_execute): Don't parse the
10357 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
10358 flags of the command.
10360 * normal/menu.c (grub_menu_run): Fix typo.
10362 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
10364 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
10366 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
10367 `y + 1' instead of `y - 1'.
10369 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
10371 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
10373 From Hollis Blanchard <hollis@penguinppc.org>:
10374 * kern/misc.c (memmove): New alias for grub_memmove.
10375 (memcmp): New alias for grub_memcmp.
10376 (memset): New alias for grub_memset.
10377 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10378 Change "int handle" to "grub_ieee1275_phandle_t handle".
10379 * include/grub/powerpc/ieee1275/ieee1275.h
10380 (grub_ieee1275_get_property): Likewise.
10382 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
10384 Added normal mode command `chainloader' as module chain.mod, which
10385 depends on normal.mod and _chain.mod.
10387 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
10388 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
10389 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
10391 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
10392 but arguments parsing moved to ...
10393 (grub_chainloader_cmd): ... here. New function.
10394 * include/grub/i386/pc/chainloader.h: New file.
10395 * loader/i386/pc/chainloader_normal.c: Likewise.
10397 2004-09-11 Marco Gerards <metgerards@student.han.nl>
10399 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
10400 (grub_mkimage_LDFLAGS): Likewise.
10401 (grub_emu_SOURCES): Likewise.
10402 (kernel_img_HEADERS): Added fshelp.h.
10403 * fs/ext2.c: Include <grub/fshelp.h>.
10404 (FILETYPE_REG): New macro.
10405 (FILETYPE_INO_REG): Likewise.
10406 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
10408 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
10410 (grub_fshelp_node): New struct.
10411 (grub_ext2_data): Added member `diropen'. Changed member `inode'
10413 (grub_ext2_get_file_block): Removed function.
10414 (grub_ext2_read_block): New function.
10415 (grub_ext2_read_file): Replaced parameter `data' by `node'.
10416 This function was written.
10417 (grub_ext2_mount): Read the root inode. Create a diropen struct.
10418 (grub_ext2_find_file): Removed function.
10419 (grub_ext2_read_symlink): New function.
10420 (grub_ext2_iterate_dir): Likewise.
10421 (grub_ext2_open): Rewritten.
10422 (grub_ext2_dir): Rewritten.
10423 * include/grub/fshelp.h: New file.
10424 * fs/fshelp.c: Likewise.
10426 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
10428 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
10429 (print_message): Add a missing newline.
10430 (run_menu): Added timeout support.
10431 (run_menu_entry): New local function.
10432 (grub_menu_run): Added support for booting.
10434 * kern/loader.c (grub_loader_is_loaded): New function.
10436 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
10437 (grub_get_rtc): Exported.
10439 * include/grub/i386/pc/time.h: Include grub/symbol.h.
10440 (grub_get_rtc): Exported.
10442 * include/grub/normal.h (struct grub_command_list): Remove
10443 constant from the member `command'.
10445 * include/grub/loader.h (grub_loader_is_loaded): Declared.
10447 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
10449 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
10451 2004-08-28 Marco Gerards <metgerards@student.han.nl>
10453 Add support for the JFS filesystem.
10455 * fs/jfs.c: New file.
10456 * include/grub/fs.h (grub_jfs_init): New prototype.
10457 (grub_jfs_fini): New prototype.
10458 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
10459 (grub_emu_SOURCES): Likewise.
10460 (pkgdata_MODULES): Add jfs.mod.
10461 (jfs_mod_SOURCES): New variable.
10462 (jfs_mod_CFLAGS): Likewise.
10463 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
10464 (grubof_SOURCES): Likewise.
10465 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
10467 * fs/fat.c (grub_fat_find_dir): Convert the filename little
10468 endian to the host endian.
10469 (grub_fat_utf16_to_utf8): Move function from there...
10470 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
10471 the endianness of the source string anymore.
10472 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
10474 2004-08-24 Marco Gerards <metgerards@student.han.nl>
10476 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
10477 (grub_boot_fini) [GRUB_UTIL]: Likewise.
10478 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
10479 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
10481 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
10482 (grub_hfs_iterate_dir): Make the function static. Add prototypes
10483 for `node_found' and `it_dir'.
10484 (grub_hfs_dir): Add prototype for `dir_hook'.
10486 * fs/minix.c (grub_minix_get_file_block): Add prototype for
10487 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
10488 and `indir32' to silence a gcc warning.
10490 * include/grub/fs.h (grub_hfs_init): New prototype.
10491 (grub_hfs_fini): Likewise.
10494 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10496 Each disk device has its own id now. This is useful to make use
10497 of multiple disk devices.
10499 * include/grub/disk.h (grub_disk_dev_id): New enum.
10500 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
10501 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
10503 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
10504 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10506 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
10507 GRUB_DISK_DEVICE_OFDISK_ID as an id.
10509 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
10510 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10512 * include/grub/disk.h (struct grub_disk_dev): Added a new member
10513 "id" which is used by the cache manager.
10515 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
10518 2004-08-18 Marco Gerards <metgerards@student.han.nl>
10520 * fs/hfs.c: New file.
10521 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
10522 (grub_emu_SOURCES): Likewise.
10523 (pkgdata_MODULES): Add hfs.mod.
10524 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
10525 (grubof_SOURCES): Likewise.
10526 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
10528 * include/grub/misc.h (grub_strncasecmp): Add prototype.
10529 * kern/misc.c (grub_strncasecmp): Add function.
10531 2004-08-14 Marco Gerards <metgerards@student.han.nl>
10533 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
10536 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
10537 (grub_ext2_dir): In case the directory entry type is unknown, read
10540 2004-08-02 Peter Bruin <pjbruin@dds.nl>
10542 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
10543 grub_load_linux instead of grub_rescue_cmd_linux as second
10544 argument of grub_rescue_register_command.
10546 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
10548 2004-07-27 Marco Gerards <metgerards@student.han.nl>
10550 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
10552 * commands/boot.c: Remove the check for `GRUB_UTIL'.
10553 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10554 `loader/powerpc/ieee1275/linux.c',
10555 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
10556 * include/grub/powerpc/ieee1275/ieee1275.h
10557 (grub_ieee1275_release): New prototype.
10558 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
10559 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
10560 normal, boot, linux and linux_normal.
10561 * loader/powerpc/ieee1275/linux.c: New file.
10562 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10564 2004-07-12 Marco Gerards <metgerards@student.han.nl>
10566 * normal/arg.c (grub_arg_parse): Correct error handling after
10567 reallocating the argumentlist (check if `argl' is not null instead
10568 of checking if `args' is not null).
10569 * kern/mm.c (grub_realloc): Return the same pointer when using the
10570 same region, instead of returning the header address.
10572 2004-07-11 Marco Gerards <metgerards@student.han.nl>
10574 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
10575 one block instead of two when looking for the initial partition.
10576 (grub_partition_probe): Initialize the local variable `p' with 0.
10577 Use base 10 for the grub_strtoul call.
10578 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
10579 need for one local variable.
10580 (grub_strtoul): Don't add the new value to `num', instead of that
10583 2004-07-11 Marco Gerards <metgerards@student.han.nl>
10585 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
10586 (pxeboot_img_SOURCES): New variable.
10587 (pxeboot_img_ASFLAGS): Likewise.
10588 (pxeboot_img_LDFLAGS): Likewise.
10589 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
10590 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
10591 <lode_leroy@hotmail.com>.
10593 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10595 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
10596 there was no input.
10598 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10600 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
10601 the history buffer logic.
10603 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10605 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
10606 (FILETYPE_INO_SYMLINK): New macros.
10607 (grub_ext2_find_file): Check if the node is a directory using the
10608 inode stat information instead of using the filetype in the
10609 dirent. Exclude the first character of an absolute symlink.
10610 (grub_ext2_dir): Mask out the filetype part of the mode member of
10613 2004-05-24 Marco Gerards <metgerards@student.han.nl>
10615 Add support for UFS version 1 and 2. Add support for the minix
10616 filesystem version 1 and 2, both the variants with 14 and 30 long
10619 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
10621 (grub_emu_SOURCES): Likewise.
10622 (pkgdata_MODULES): Add ufs.mod and minix.mod.
10623 (ufs_mod_SOURCES): New variable.
10624 (ufs_mod_CFLAGS): Likewise.
10625 (minix_mod_SOURCES): Likewise.
10626 (minix_mod_CFLAGS): Likewise.
10627 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
10629 (grubof_SOURCES): Likewise.
10630 * fs/ufs.c: New file.
10631 * fs/minix.c: New file.
10632 * include/grub/fs.h (grub_ufs_init): New prototype.
10633 (grub_ufs_fini): Likewise.
10634 (grub_minix_init): Likewise.
10635 (grub_minix_fini): Likewise.
10636 * util/grub-emu.c (main): Initialize and deinitialize UFS and
10639 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
10641 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
10642 commands/ls.c, commands/terminal.c, commands/boot.c,
10643 commands/cmp.c and commands/cat.c.
10644 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
10646 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
10649 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10651 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
10652 and grub_, respectively. Because the conversion is trivial and
10653 mechanical, I omit the details here. Please refer to the CVS
10654 if you need more information.
10656 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10658 * include/pupa: Renamed to ...
10659 * include/grub: ... this.
10660 * util/i386/pc/pupa-mkimage.c: Renamed to ...
10661 * util/i386/pc/grub-mkimage.c: ... this.
10662 * util/i386/pc/pupa-setup.c: Renamed to ...
10663 * util/i386/pc/grub-setup.c: ... this.
10664 * util/pupa-emu.c: Renamed to ...
10665 * util/grub-emu.c: ... this.
10667 2004-03-29 Marco Gerards <metgerards@student.han.nl>
10669 Add support for the newworld apple macintosh (PPC). This has been
10670 tested on the powerbook 2000 only. It only adds support for
10671 generic ieee1275 functions, console and disk support. This should
10672 be easy to port to other architectures with support for Open
10675 * configure.ac: Accept the powerpc as host_cpu. In the case of
10676 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
10677 specific tests are only executed while building for the i386.
10678 Inverse test for crosscompile.
10679 * genmk.rb (Utility): Allow assembler files.
10680 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
10681 * conf/powerpc-ieee1275.rmk: New file.
10682 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
10683 * disk/powerpc/ieee1275/partition.c: Likewise.
10684 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
10685 * include/pupa/powerpc/ieee1275/console.h: Likewise.
10686 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
10687 * include/pupa/powerpc/ieee1275/time.h: Likewise.
10688 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
10689 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
10690 * include/pupa/powerpc/ieee1275/loader.h
10691 * include/pupa/powerpc/setjmp.h: Likewise.
10692 * include/pupa/powerpc/types.h: Likewise.
10693 * kern/powerpc/ieee1275/init.c: Likewise.
10694 * kern/powerpc/ieee1275/openfw.c: Likewise.
10695 * term/powerpc/ieee1275/ofconsole.c: Likewise.
10697 These files were written by Johan Rydberg
10698 (jrydberg@night.trouble.net) and I only modified them slightly.
10700 * boot/powerpc/ieee1275/cmain.c: New file.
10701 * boot/powerpc/ieee1275/crt0.S: Likewise.
10702 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
10703 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
10705 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
10707 * Makefile.in: Update copyright.
10708 * genmodsrc.sh: Likewise.
10709 * gensymlist.sh: Likewise.
10710 * term/i386/pc/vga.c: Indent correctly.
10712 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
10713 bugreporting address.
10714 * util/i386/pc/pupa-setup.c (usage): Likewise,
10715 (main): Call pupa_ext2_init and pupa_ext2_fini.
10717 * fs/fat.c (log2): Renamed to ...
10718 (fat_log2): ... this.
10719 All callers changed.
10720 * kern/misc.c (memcpy): Alias to pupa_memmove.
10721 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
10723 * util/console.c (pupa_ncurses_fini): Return 0.
10725 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
10726 Move fail label here.
10727 [__GNU__]: Don't warn when using stat.
10728 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
10729 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
10730 long int. Use strtol instead of strtoul.
10732 2004-03-14 Marco Gerards <metgerards@student.han.nl>
10734 * commands/boot.c: New file.
10735 * commands/cat.c: Likewise.
10736 * commands/cmp.c: Likewise.
10737 * commands/ls.c: Likewise.
10738 * commands/terminal.c: Likewise.
10739 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
10740 (pupa_register_command): Changed interface to match the new
10742 (pupa_command_execute): Changed (almost rewritten) so it uses
10743 pupa_split_command. Added support for setting variables using the
10745 (rescue_command): Changed to work with the new argument parser.
10746 (terminal_command): Moved from here to commands/terminal.c.
10747 (set_command): New function.
10748 (unset_command): New function.
10749 (insmod_command): New function.
10750 (rmmod_command): New function.
10751 (lsmod_command): New function.
10752 (pupa_command_init): Don't initialize the command terminal
10753 anymore. Initialize the commands set, unset, insmod, rmmod and
10755 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
10756 (kernel_img_HEADERS): Add arg.h and env.h.
10757 (pupa_mkimage_LDFLAGS): Add kern/env.c.
10758 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
10759 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
10761 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
10763 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
10764 (boot_mod_SOURCES): New variable.
10765 (terminal_mod_SOURCES): Likewise.
10766 (ls_mod_SOURCES): Likewise.
10767 (cmp_mod_SOURCES): Likewise.
10768 (cat_mod_SOURCES): Likewise.
10770 * normal/arg.c: New file.
10771 * kern/env.c: Likewise.
10772 * include/pupa/arg.h: Likewise.
10773 * include/pupa/env.h: Likewise.
10774 * font/manager.c (font_command): Changed to match argument parsing
10776 (PUPA_MOD_INIT): Likewise.
10777 * hello/hello.c (pupa_cmd_hello): Likewise.
10778 (PUPA_MOD_INIT): Likewise.
10779 * include/pupa/disk.h: Include <pupa/device.h>.
10780 (pupa_print_partinfo): New prototype.
10781 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
10782 (pupa_dl_get_prefix): Likewise.
10783 * include/pupa/misc.h: Include <pupa/err.h>.
10784 (pupa_isgraph): New prototype.
10785 (pupa_isdigit): Likewise.
10786 (pupa_split_cmdline): Likewise.
10787 * include/pupa/normal.h: Include <pupa/arg.h>.
10788 (pupa_command): Changed the prototype of the member `func' to
10789 match the argument parsing interface. Added member `options'.
10790 (pupa_register_command): Updated to match function.
10791 (pupa_arg_parse): New prototype.
10792 (pupa_hello_init) [PUPA_UTIL]: New prototype.
10793 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
10794 (pupa_ls_init) [PUPA_UTIL]: Likewise.
10795 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
10796 (pupa_cat_init) [PUPA_UTIL]: Likewise.
10797 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
10798 (pupa_boot_init) [PUPA_UTIL]: Likewise.
10799 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
10800 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
10801 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
10802 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
10803 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
10804 * kern/disk.c: Include <pupa/file.h>.
10805 (pupa_print_partinfo): New function.
10806 * kern/dl.c: Include <pupa/env.h>.
10807 (pupa_dl_dir): Variable removed.
10808 (pupa_dl_load): Use the environment variable `prefix' instead of
10809 the variable pupa_dl_dir.
10810 (pupa_dl_set_prefix): Function removed.
10811 (pupa_dl_get_prefix): Likewise.
10812 * kern/i386/pc/init.c: Include <pupa/env.h>.
10813 (pupa_machine_init): Use the environment variable `prefix' instead of
10814 using pupa_dl_set_prefix to set the prefix.
10815 * kern/main.c: Include <pupa/env.h>.
10816 (pupa_set_root_dev): Use the environment variable `prefix' instead of
10817 using pupa_dl_get_prefix to get the prefix.
10818 * kern/misc.c: Include <pupa/env.h>.
10819 (pupa_isdigit): New function.
10820 (pupa_isgraph): Likewise.
10821 (pupa_ftoa): Likewise.
10822 (pupa_vsprintf): Added support for printing values of the type
10823 `double'. Make it possible to format variable output when using
10824 formatting like `%1.2%f'.
10825 (pupa_split_cmdline): New function.
10826 * kern/rescue.c: Include <pupa/env.h>.
10827 (next_word): Removed function.
10828 (pupa_rescue_cmd_prefix): Likewise.
10829 (pupa_rescue_cmd_set): New function.
10830 (pupa_rescue_cmd_unset): New function.
10831 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
10832 split the command line instead of splitting it here. Added
10833 support for setting variables using the syntax `foo=bar'. Don't
10834 initialize the prefix command anymore. Initialized the set and
10836 * normal/cmdline.c: Include <pupa/env.h>.
10837 (pupa_tab_complete): Added prototypes for print_simple_completion,
10838 print_partition_completion, add_completion, iterate_commands,
10839 iterate_dev, iterate_part and iterate_dir. Moved code to print
10840 partition information from here to kern/disk.c.
10841 (pupa_cmdline_run): Don't check if the function exists anymore.
10842 * normal/main.c: Include <pupa/env.h>.
10843 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
10844 instead of using pupa_dl_get_prefix to get the prefix.
10845 * term/i386/pc/vga.c: Include <pupa/arg.h>.
10846 (check_vga_mem): Cast pointers to `void *' to silence a gcc
10848 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
10849 (pupa_vga_setcolor): Declare unused variables with `__attribute__
10850 ((unused))' to silence a gcc warning.
10851 (pupa_vga_setcolor): Likewise.
10852 (debug_command): Changed to match argument parsing
10854 * util/pupa-emu.c: Include <pupa/env.h>.
10855 (options): Added 0's for unused fields to silence a gcc warning.
10857 (main): Use the environment variable `prefix' instead of using
10858 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
10859 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
10862 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
10863 * util/misc.c: Include <malloc.h>.
10864 (pupa_malloc): Rewritten so errors are correctly reported.
10865 (pupa_realloc): Likewise.
10866 (pupa_memalign): Likewise.
10867 (pupa_mm_init_region): Declare unused variables with
10868 `__attribute__ ((unused))' to silence a gcc warning.
10869 * normal/i386/setjmp.S: Remove tab at the end of the file to
10870 silence a gcc warning.
10871 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
10872 variables with `__attribute__ ((unused))' to silence a gcc
10874 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
10875 local variable i unsigned to silence a gcc warning.
10877 * kern/term.c: Include <pupa/misc.h>.
10878 (pupa_more_lines): New variable.
10879 (pupa_more): Likewise.
10880 (pupa_putcode): When the pager is active pause at the end of every
10882 (pupa_set_more): New function.
10883 * include/pupa/term.h (pupa_set_more): New prototype.
10886 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
10888 Now this project is GRUB 2 rather than PUPA. The location of
10889 the CVS repository was moved to GRUB's.
10891 * configure.ac: Use bug-grub as the reporting address.
10892 Use GRUB instead of PUPA.
10893 Change the version number to 1.90.
10895 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
10897 * genkernsyms.sh: Updated copyright information.
10898 * genmk.rb: Likewise.
10899 * genmodsrc.sh: Likewise.
10900 * gensymlist.sh: Likewise.
10901 * boot/i386/pc/boot.S: Likewise.
10902 * boot/i386/pc/diskboot.S: Likewise.
10903 * disk/i386/pc/biosdisk.c: Likewise.
10904 * disk/i386/pc/partition.c: Likewise.
10905 * font/manager.c: Likewise.
10906 * fs/ext2.c: Likewise.
10907 * fs/fat.c: Likewise.
10908 * include/pupa/boot.h: Likewise.
10909 * include/pupa/device.h: Likewise.
10910 * include/pupa/disk.h: Likewise.
10911 * include/pupa/dl.h: Likewise.
10912 * include/pupa/elf.h: Likewise.
10913 * include/pupa/err.h: Likewise.
10914 * include/pupa/file.h: Likewise.
10915 * include/pupa/font.h: Likewise.
10916 * include/pupa/fs.h: Likewise.
10917 * include/pupa/kernel.h: Likewise.
10918 * include/pupa/loader.h: Likewise.
10919 * include/pupa/misc.h: Likewise.
10920 * include/pupa/mm.h: Likewise.
10921 * include/pupa/net.h: Likewise.
10922 * include/pupa/normal.h: Likewise.
10923 * include/pupa/rescue.h: Likewise.
10924 * include/pupa/setjmp.h: Likewise.
10925 * include/pupa/symbol.h: Likewise.
10926 * include/pupa/term.h: Likewise.
10927 * include/pupa/types.h: Likewise.
10928 * include/pupa/i386/setjmp.h: Likewise.
10929 * include/pupa/i386/types.h: Likewise.
10930 * include/pupa/i386/pc/biosdisk.h: Likewise.
10931 * include/pupa/i386/pc/boot.h: Likewise.
10932 * include/pupa/i386/pc/console.h: Likewise.
10933 * include/pupa/i386/pc/init.h: Likewise.
10934 * include/pupa/i386/pc/kernel.h: Likewise.
10935 * include/pupa/i386/pc/linux.h: Likewise.
10936 * include/pupa/i386/pc/loader.h: Likewise.
10937 * include/pupa/i386/pc/memory.h: Likewise.
10938 * include/pupa/i386/pc/multiboot.h: Likewise.
10939 * include/pupa/i386/pc/partition.h: Likewise.
10940 * include/pupa/i386/pc/time.h: Likewise.
10941 * include/pupa/i386/pc/vga.h: Likewise.
10942 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
10943 * include/pupa/util/getroot.h: Likewise.
10944 * include/pupa/util/misc.h: Likewise.
10945 * include/pupa/util/resolve.h: Likewise.
10946 * kern/device.c: Likewise.
10947 * kern/disk.c: Likewise.
10948 * kern/dl.c: Likewise.
10949 * kern/err.c: Likewise.
10950 * kern/file.c: Likewise.
10951 * kern/fs.c: Likewise.
10952 * kern/loader.c: Likewise.
10953 * kern/main.c: Likewise.
10954 * kern/misc.c: Likewise.
10955 * kern/mm.c: Likewise.
10956 * kern/rescue.c: Likewise.
10957 * kern/term.c: Likewise.
10958 * kern/i386/dl.c: Likewise.
10959 * kern/i386/pc/init.c: Likewise.
10960 * kern/i386/pc/lzo1x.S: Likewise.
10961 * kern/i386/pc/startup.S: Likewise.
10962 * loader/i386/pc/chainloader.c: Likewise.
10963 * loader/i386/pc/linux.c: Likewise.
10964 * loader/i386/pc/multiboot.c: Likewise.
10965 * normal/cmdline.c: Likewise.
10966 * normal/command.c: Likewise.
10967 * normal/main.c: Likewise.
10968 * normal/menu.c: Likewise.
10969 * normal/i386/setjmp.S: Likewise.
10970 * term/i386/pc/console.c: Likewise.
10971 * term/i386/pc/vga.c: Likewise.
10972 * util/console.c: Likewise.
10973 * util/genmoddep.c: Likewise.
10974 * util/misc.c: Likewise.
10975 * util/pupa-emu.c: Likewise.
10976 * util/resolve.c: Likewise.
10977 * util/unifont2pff.rb: Likewise.
10978 * util/i386/pc/biosdisk.c: Likewise.
10979 * util/i386/pc/getroot.c: Likewise.
10980 * util/i386/pc/pupa-mkimage.c: Likewise.
10981 * util/i386/pc/pupa-setup.c: Likewise.
10983 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
10985 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
10986 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
10987 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
10988 reading and reset it after reading.
10989 (pupa_ext2_close): Return PUPA_ERR_NONE.
10991 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
10993 (struct linux_kernel_header): Add kernel_version and
10995 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
10996 pupa_file_read succeeds.
10997 (pupa_rescue_cmd_initrd): Implement.
10999 2003-12-03 Marco Gerards <metgerards@student.han.nl>
11001 * fs/ext2.c (pupa_ext2_label): New function.
11002 (pupa_ext2_fs): Added label.
11003 * fs/fat.c (pupa_fat_label): New function.
11004 (pupa_fat_fs): Added label.
11005 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11007 * kern/misc.c (pupa_strndup): New function.
11008 * include/pupa/misc.h (pupa_strndup): New prototype.
11010 * include/pupa/normal.h: Include <pupa/err.h>.
11011 (pupa_set_history): New prototype.
11012 (pupa_iterate_commands): New prototype.
11013 * normal/cmdline.c: Include <pupa/machine/partition.h>,
11014 <pupa/disk.h>, <pupa/file.h>.
11015 (hist_size): New variable.
11016 (hist_lines): Likewise.
11017 (hist_end): Likewise.
11018 (hist_used): Likewise.
11019 (pupa_set_history): New function.
11020 (pupa_history_get): Likewise.
11021 (pupa_history_add): Likewise.
11022 (pupa_history_replace): Likewise.
11023 (pupa_tab_complete): Likewise.
11024 (pupa_cmdline_run): Added tab completion and history buffer. Tab
11025 completion shows partitionnames while completing partitions, this
11026 feature was suggested by Jeff Bailey.
11027 * normal/command.c (pupa_iterate_commands): New function.
11028 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11029 (pupa_normal_init): Initialize history buffer.
11030 (PUPA_MOD_INIT): Likewise.
11031 (pupa_normal_fini): Free the history buffer.
11032 (PUPA_MOD_FINI): Likewise.
11034 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11037 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11038 * configure.ac [i386]: Check for regparam bug.
11039 (NESTED_FUNC_ATTR) [! i386]: Defined.
11041 2003-11-17 Marco Gerards <metgerards@student.han.nl>
11043 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11044 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11045 (pupa_emu_SOURCES): New variable.
11046 (pupa_emu_LDFLAGS): Likewise.
11047 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11048 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11049 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11050 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11051 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11052 (pupa_jmp_buf): New typedef.
11053 (pupa_setjmp) [PUPA_UTIL]: New macro.
11054 (pupa_longjmp) [PUPA_UTIL]: Likewise.
11055 * include/pupa/term.h (struct pupa_term): New member `refresh'.
11056 (pupa_refresh): New prototype.
11057 * include/pupa/util/getroot.h: New file.
11058 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11060 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11061 (pupa_rescue_cmd_cat): Likewise.
11062 (pupa_rescue_cmd_ls): Likewise.
11063 (pupa_rescue_cmd_testload): Likewise.
11064 (pupa_rescue_cmd_lsmod): Likewise.
11065 * normal/cmdline.c (pupa_cmdline_get): Likewise.
11066 * normal/menu.c (run_menu): Likewise.
11067 * kern/term.c (pupa_cls): Likewise.
11068 (pupa_refresh): New function.
11069 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11070 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11071 * util/console.c: New file.
11073 * util/i386/pc/getroot.c: New file.
11074 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11075 (pupa_putchar): New function.
11076 (pupa_refresh): Likewise.
11077 (xgetcwd): Function moved to ...
11078 (strip_extra_slashes): Likewise.
11079 (get_prefix): Likewise.
11080 * util/i386/pc/getroot.c: ... here.
11081 (find_root_device): Function moved and renamed to...
11082 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11083 Changed all callers.
11084 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11086 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11087 Changed all callers.
11088 * util/misc.c (pupa_memalign): New function.
11089 (pupa_mm_init_region): Likewise.
11090 (pupa_register_exported_symbols): Likewise.
11091 (pupa_putchar): Function removed.
11092 * util/pupa-emu.c: New file.
11094 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
11096 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11097 (_multiboot_mod_SOURCES): New variable.
11098 (_multiboot_mod_CFLAGS): Likewise.
11099 * loader/i386/pc/multiboot.c: New file.
11100 * include/pupa/i386/pc/multiboot.h: Likewise.
11101 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11102 (pupa_multiboot_real_boot): New function.
11103 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11104 (pupa_multiboot_real_boot): New prototype.
11105 (pupa_rescue_cmd_multiboot): Likewise
11106 (pupa_rescue_cmd_module): Likewise.
11108 * kern/loader.c (pupa_loader_set): Continue when
11109 pupa_loader_unload_func() fails.
11110 (pupa_loader_unset): New function.
11111 * include/pupa/loader.h (pupa_loader_unset): New prototype.
11113 * kern/misc.c (pupa_stpcpy): New function.
11114 * include/pupa/misc.h (pupa_stpcpy): New prototype.
11116 2003-11-12 Marco Gerards <metgerards@student.han.nl>
11118 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11119 for available extensions.
11121 * include/pupa/i386/pc/time.h: New file.
11122 * kern/disk.c: Include <pupa/machine/time.h>.
11123 (PUPA_CACHE_TIMEOUT): New macro.
11124 (pupa_last_time): New variable.
11125 (pupa_disk_open): Flush the cache when there was a timeout.
11126 (pupa_disk_close): Reset the timer.
11127 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11129 * util/misc.c: Include <sys/times.h>
11130 (pupa_get_rtc): New function.
11132 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11134 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11136 (pupa_ext2_get_file_block): Use blocks member.
11138 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11139 first block. Return -1 instead of pupa_errno on error.
11141 2003-10-27 Marco Gerards <metgerards@student.han.nl>
11143 * README: In the pupa-mkimage example use _chain instead of chain
11144 and ext2 instead of fat.
11145 * TODO: Replace ext2fs with jfs as an example. Add an item for
11146 adding journal playback for ext2fs.
11147 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11148 (pkgdata_MODULES): Added ext2.mod.
11149 (ext2_mod_SOURCES): New variable.
11150 (ext2_mod_CFLAGS): Likewise.
11151 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11152 * include/pupa/misc.h (pupa_strncpy): New prototype.
11153 (pupa_strcat): Likewise.
11154 (pupa_strncmp): Likewise.
11155 * kern/misc.c (pupa_strcat): Enable function.
11156 (pupa_strncpy): New function.
11157 (pupa_strncmp): Likewise.
11158 * fs/ext2.c: New file.
11160 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11161 when the read failed before retrying.
11162 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11163 (_FILE_OFFSET_BITS): Likewise.
11164 * configure.ac: Added AC_SYS_LARGEFILE.
11166 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11168 * genmk.rb (PModule#rule): Make sure to get only symbol names
11169 from the output of nm.
11170 Reported by Robert Millan <zeratul2@wanadoo.es>.
11172 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11174 I forgot to check in these changes for a long time. This adds
11175 incomplete support for VGA console, and this is still very
11176 buggy. Also, a lot of consideration is required for I18N,
11177 UNICODE, and VGA font issues. Therefore, assume that this is
11178 such that "better than nothing".
11180 * font/manager.c: New file.
11181 * include/pupa/font.h: Likewise.
11182 * include/pupa/i386/pc/vga.h: Likewise.
11183 * term/i386/pc/vga.c: Likewise.
11184 * util/unifont2pff.rb: Likewise.
11186 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11187 (pkgdata_MODULES): Added vga.mod and font.mod.
11188 (vga_mod_SOURCES): New variables.
11189 (vga_mod_CFLAGS): Likewise.
11190 (font_mod_SOURCES): Likewise.
11191 (font_mod_CFLAGS): Likewise.
11193 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
11195 * include/pupa/term.h: Include pupa/err.h.
11196 (struct pupa_term): Added init and fini.
11197 Changed the argument of putchar to pupa_uint32_t.
11199 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
11200 (pupa_console_real_putchar): New prototype.
11201 (pupa_console_putchar): Removed.
11202 (pupa_console_checkkey): Exported.
11203 (pupa_console_getkey): Likewise.
11205 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
11208 * kern/term.c (pupa_term_set_current): Rewritten.
11209 (pupa_putchar): Likewise.
11210 (pupa_putcode): New function.
11212 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
11213 (pupa_console_real_putchar): ... this.
11214 (pupa_vga_set_mode): New function.
11215 (pupa_vga_get_font): Likewise.
11217 * normal/command.c: Include pupa/term.h.
11218 (terminal_command): New function.
11219 (pupa_command_init): Register the command "terminal".
11221 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
11222 (DISP_UP): Likewise.
11223 (DISP_RIGHT): Likewise.
11224 (DISP_DOWN): Likewise.
11225 (DISP_HLINE): Likewise.
11226 (DISP_VLINE): Likewise.
11227 (DISP_UL): Likewise.
11228 (DISP_UR): Likewise.
11229 (DISP_LL): Likewise.
11230 (DISP_LR): Likewise.
11232 * term/i386/pc/console.c (pupa_console_putchar): New function.
11234 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
11236 * util/resolve.c (pupa_util_resolve_dependencies): BUG
11237 FIX. Reverse the path_list.
11239 * include/pupa/normal.h: Export pupa_register_command and
11240 pupa_unregister_command.
11242 * hello/hello.c (pupa_cmd_hello): New module.
11243 * conf/i386-pc.rmk: Added hello.mod.
11245 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
11247 * kern/i386/pc/lzo1x.S: New file.
11249 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
11250 (compress_kernel): New variable.
11251 (generate_image): Heavily modified to support compressing a
11252 large part of the core image.
11254 * util/misc.c (pupa_util_read_image): Fix a file descriptor
11256 (pupa_util_load_image): New function.
11258 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
11259 (pupa_compressed_size): New variable.
11260 (codestart): Enable Gate A20 here.
11261 Decompress the compressed part of the core image.
11262 Rearrange the code to put functions and variables which are
11263 required for initialization in the non-compressed part.
11266 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
11269 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
11271 * include/pupa/i386/pc/kernel.h
11272 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
11273 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
11274 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11275 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11276 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
11278 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
11280 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
11281 (Utility#rule): Likewise.
11283 * configure.ac: Check if LZO is available.
11285 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
11287 * include/pupa/normal.h: New file.
11288 * include/pupa/setjmp.h: Likewise.
11289 * include/pupa/i386/setjmp.h: Likewise.
11290 * normal/cmdline.c: Likewise.
11291 * normal/command.c: Likewise.
11292 * normal/main.c: Likewise.
11293 * normal/menu.c: Likewise.
11294 * normal/i386/setjmp.S: Likewise.
11296 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
11297 (pupa_rescue_cmd_initrd): Likewise.
11299 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
11302 * kern/i386/pc/startup.S (translation_table): New variable.
11303 (translate_keycode): New function.
11304 (pupa_console_getkey): Call translate_keycode.
11306 * kern/rescue.c (attempt_normal_mode): New function.
11307 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
11308 it failed, print a message.
11310 * kern/mm.c (pupa_real_malloc): Print more information when a
11311 free magic is broken.
11312 (pupa_free): If the first free header is not free actually, set
11315 * kern/main.c (pupa_load_normal_mode): Just load the module
11317 (pupa_main): Don't print the message
11318 "Entering into rescue mode..." here.
11320 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
11322 (pupa_rescue_cmd_initrd): Likewise.
11323 (pupa_rescue_cmd_initrd): Likewise.
11325 * include/pupa/symbol.h (FUNCTION): Specify the type.
11326 (VARIABLE): Likewise.
11328 * include/pupa/err.h (pupa_err_t): Added
11329 PUPA_ERR_UNKNOWN_COMMAND.
11331 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
11332 (pupa_dl_get_prefix): Likewise.
11334 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
11335 Added _chain.mod and _linux.mod instead of chain.mod and
11337 (chain_mod_SOURCES): Renamed to ...
11338 (_chain_mod_SOURCES): ... this.
11339 (chain_mod_CFLAGS): Renamed to ...
11340 (_chain_mod_CFLAGS): ... this.
11341 (linux_mod_SOURCES): Renamed to ...
11342 (_linux_mod_SOURCES): ... this.
11343 (linux_mod_CFLAGS): Renamed to ...
11344 (_linux_mod_CFLAGS): ... this.
11345 (normal_mod_SOURCES): New variable.
11346 (normal_mod_CFLAGS): Likewise.
11347 (normal_mod_ASFLAGS): Likewise.
11349 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
11351 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
11354 * kern/dl.c (pupa_dl_ref): Refer depending modules
11356 (pupa_dl_unref): Unrefer depending modules recursively.
11357 Don't call pupa_dl_unload implicitly, because PUPA can crash if
11358 a module is unloaded before one depending on that module is
11360 (pupa_dl_unload): Unload depending modules explicitly,
11363 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
11365 * include/pupa/i386/pc/linux.h: New file.
11366 * loader/i386/pc/linux.c: Likewise.
11368 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
11370 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
11371 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
11372 of PUPA_CHAINLOADER_BOOT_SECTOR.
11374 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
11375 (pupa_linux_prot_size): New variable.
11376 (pupa_linux_tmp_addr): Likewise.
11377 (pupa_linux_real_addr): Likewise.
11378 (pupa_linux_boot_zimage): New function.
11379 (pupa_linux_boot_bzimage): Likewise.
11381 * kern/i386/pc/init.c (struct mem_region): New structure.
11382 (MAX_REGIONS): New macro.
11383 (mem_regions): New variable.
11384 (num_regions): Likewise.
11385 (pupa_os_area_addr): Likewise.
11386 (pupa_os_area_size): Likewise.
11387 (pupa_lower_mem): Likewise.
11388 (pupa_upper_mem): Likewise.
11389 (add_mem_region): New function.
11390 (compact_mem_regions): Likewise.
11391 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
11392 the size of the conventional memory and that of so-called upper
11393 memory (before the first memory hole).
11394 Instead of adding each found region to free memory, use
11395 add_mem_region and add them after removing overlaps.
11396 Also, add only 1/4 of the upper memory to free memory. The rest
11397 is used for loading OS images. Maybe this is ad hoc, but this
11398 makes it much easier to relocate OS images when booting.
11400 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
11401 (pupa_enter_rescue_mode): Don't register initrd and module.
11403 * kern/mm.c: Include pupa/dl.h.
11405 * kern/main.c: Include pupa/file.h and pupa/device.h.
11407 * kern/loader.c (pupa_loader_load_module_func): Removed.
11408 (pupa_loader_load_module): Likewise.
11410 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
11413 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
11414 (pupa_linux_tmp_addr): Likewise.
11415 (pupa_linux_real_addr): Likewise.
11416 (pupa_linux_boot_zimage): Likewise.
11417 (pupa_linux_boot_bzimage): Likewise.
11419 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
11420 (pupa_upper_mem): Likewise.
11421 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
11422 module is too dangerous.
11424 * include/pupa/loader.h (pupa_os_area_addr): Declared.
11425 (pupa_os_area_size): Likewise.
11426 (pupa_loader_set): Remove the first argument. Loader doesn't
11427 manage modules or initrd any longer.
11428 (pupa_loader_load_module): Removed.
11430 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
11431 (linux_mod_SOURCES): New variable.
11432 (linux_mod_CFLAGS): Likewise.
11434 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
11436 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
11437 the length of a blocklist correctly.
11439 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
11440 Use ioctl only if the OS file is a block device.
11441 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
11442 not very useful for normal files.
11444 * kern/main.c (pupa_set_root_dev): New function.
11445 (pupa_load_normal_mode): Likewise.
11446 (pupa_main): Call those above.
11448 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
11451 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
11453 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11455 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
11456 (setup): Configure the installed partition information and the
11459 * loader/i386/pc/chainloader.c (my_mod): New variable.
11460 (pupa_chainloader_unload): New function.
11461 (pupa_rescue_cmd_chainloader): Refer itself.
11462 (PUPA_MOD_INIT): Save its own module in MY_MOD.
11464 * kern/i386/pc/startup.S (install_partition): Removed.
11465 (version_string): Likewise.
11466 (config_file): Likewise.
11467 (pupa_install_dos_part): New variable.
11468 (pupa_install_bsd_part): Likewise.
11469 (pupa_prefix): Likewise.
11470 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
11472 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
11474 (make_install_device): New function.
11475 (pupa_machine_init): Set the dl prefix.
11477 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
11478 (buf): Renamed to ...
11479 (linebuf): ... this.
11480 (pupa_rescue_cmd_prefix): New function.
11481 (pupa_rescue_cmd_insmod): Likewise.
11482 (pupa_rescue_cmd_rmmod): Likewise.
11483 (pupa_rescue_cmd_lsmod): Likewise.
11484 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
11487 * kern/mm.c (pupa_memalign): If failed even after invalidating
11488 disk caches, unload unneeded modules and retry.
11490 * kern/misc.c (pupa_memmove): New function.
11491 (pupa_memcpy): Removed.
11492 (pupa_strcpy): New function.
11493 (pupa_itoa): Made static.
11495 * kern/dl.c (pupa_dl_iterate): New function.
11496 (pupa_dl_ref): Likewise.
11497 (pupa_dl_unref): Likewise.
11498 (pupa_dl_unload): Return if succeeded or not.
11499 (pupa_dl_unload_unneeded): New function.
11500 (pupa_dl_unload_all): Likewise.
11501 (pupa_dl_init): Renamed to ...
11502 (pupa_dl_set_prefix): ... this.
11503 (pupa_dl_get_prefix): New function.
11505 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
11506 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
11507 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11508 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11509 (pupa_install_dos_part): Declared.
11510 (pupa_install_bsd_part): Likewise.
11511 (pupa_prefix): Likewise.
11512 (pupa_boot_drive): Likewise.
11514 * include/pupa/types.h: Fix a typo.
11516 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
11518 (pupa_memmove): Declared.
11519 (pupa_strcpy): Likewise.
11521 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
11522 pupa_mod_init takes one argument, its own module.
11523 (pupa_dl_unload_unneeded): Declared.
11524 (pupa_dl_unload_all): Likewise.
11525 (pupa_dl_ref): Likewise.
11526 (pupa_dl_unref): Likewise.
11527 (pupa_dl_iterate): Likewise.
11528 (pupa_dl_init): Renamed to ...
11529 (pupa_dl_set_prefix): ... this.
11530 (pupa_dl_get_prefix): Declared.
11532 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
11533 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
11535 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
11536 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
11538 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
11539 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
11541 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11543 * util/i386/pc/pupa-setup.c (setup): Define the internal
11544 function find_first_partition_start at the top level, because GCC
11545 3.0.x cannot compile internal functions in deeper scopes
11547 (find_root_device): Use lstat instead of stat.
11548 Don't follow symbolic links.
11549 Fix the path-constructing code.
11551 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
11552 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
11553 by a BLKGETSIZE ioctl first, because block devices don't fill
11554 the member st_mode of the structure stat on Linux.
11555 [__linux__] (linux_find_partition): Use a temporary buffer
11556 REAL_DEV for the working space. Copy it to DEV before returning.
11557 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
11558 buffer cache consistent.
11559 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
11560 strncmp. The previous value was merely wrong.
11561 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
11563 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
11564 FAT size is 12. The previous value was merely wrong.
11566 * kern/main.c (pupa_main): Don't split the starting message from
11569 * kern/term.c (pupa_putchar): Put CR after LF instead of before
11570 LF, because BIOS goes crazy about character attributes in this
11573 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11575 * include/i386/pc/util/biosdisk.h: New file.
11576 * util/i386/pc/biosdisk.c: Likewise.
11577 * util/i386/pc/pupa-setup.c: Likewise.
11579 * Makefile.in (INCLUDE_DISTFILES): Added
11580 include/pupa/i386/pc/util/biosdisk.h.
11581 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
11582 directory util/i386/pc.
11583 (install-local): Added a rule for sbin_UTILITIES.
11584 (uninstall): Likewise.
11586 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
11588 * util/misc.c (xrealloc): New function.
11589 (pupa_malloc): Likewise.
11590 (pupa_free): Likewise.
11591 (pupa_realloc): Likewise.
11592 (pupa_stop): Likewise.
11593 (pupa_putchar): Likewise.
11595 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
11597 * include/pupa/util/misc.h (xrealloc): Declared.
11599 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
11601 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
11602 (PUPA_BOOT_MACHINE_BPB_END): ... this.
11604 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
11605 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11607 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
11608 way should be implemented.
11609 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11611 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
11612 the size of NAME for safety.
11613 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
11616 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
11617 (pupa_setup_SOURCES): Likewise.
11619 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
11621 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11623 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
11624 bunch of pushl's from pusha, because this destroys the return
11627 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11629 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
11630 This means that any missing prototypes could be fatal. Also, you
11631 must take care when writing assembly code. See the comments at
11632 the beginning of startup.S, for more details.
11634 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
11635 compilation mechanism.
11636 (pupa_chainloader_real_boot): Likewise.
11637 (pupa_biosdisk_rw_int13_extensions): Likewise.
11638 (pupa_biosdisk_rw_standard): Likewise.
11639 (pupa_biosdisk_check_int13_extensions): Likewise.
11640 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
11641 (pupa_biosdisk_get_diskinfo_standard): Likewise.
11642 (pupa_get_memsize): Likewise.
11643 (pupa_get_mmap_entry): Likewise.
11644 (pupa_console_putchar): Likewise.
11645 (pupa_console_setcursor): Likewise.
11646 (pupa_getrtsecs): Use pushl instead of push.
11648 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
11649 memory instead of the stack for a mmap entry, because some
11650 BIOSes may ignore the maximum size and overflow.
11652 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
11654 * genmk.rb (PModule#rule): Compile automatically generated
11655 sources with module-specific CFLAGS as well as other sources.
11657 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11659 * configure.ac: Check ld.
11660 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
11661 respectively, before checking endianness and sizes.
11663 * Makefile.in (LD): New variable.
11665 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11667 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
11669 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11671 * Changelog: New file.