]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-07-30 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
14f41dd1 12008-07-30 Robert Millan <rmh@aybabtu.com>
2
3 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4
4ca049a3 52008-07-30 Robert Millan <rmh@aybabtu.com>
6
7 * term/i386/pc/vga_text.c (grub_console_cls): Use
8 grub_console_gotoxy() to go back to beginning of the screen.
9 Found by Patrick Georgi <patrick.georgi@coresystems.de>
10
2921d337 112008-07-29 Christian Franke <franke@computer.org>
12
13 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
14 Add conversion of emulated mount points on Cygwin.
15
b609876d 162008-07-29 Christian Franke <franke@computer.org>
17
18 * util/update-grub.in: Add a check for admin
19 group on Cygwin.
20 Remove old `grub.cfg.new' before creation.
21 Add `-f' to `mv' to handle the different filesystem
22 semantics of Windows.
23
e93e4679 242008-07-29 Bean <bean123ch@gmail.com>
25
26 * normal/main.c (get_line): Fix buffer overflow bug.
27
41694fd0 282008-07-28 Robert Millan <rmh@aybabtu.com>
29
30 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
31 (struct grub_apple_header): New struct. Describes the layout of
32 the partmap header.
33 (apple_partition_map_iterate): Check the header magic as well as the
34 partition magic (which was already being checked).
35
cfd0b4e6 362008-07-28 Pavel Roskin <proski@gnu.org>
37
38 * genmk.rb: Add a warning to the beginning of the output that
39 it's a generated file and should not be edited.
40
93cce016 412008-07-28 Robert Millan <rmh@aybabtu.com>
42
43 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
44 with the same number are found, just use issue a warning with
45 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 46
cd1df915 472008-07-27 Robert Millan <rmh@aybabtu.com>
48
49 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
50 information.
51
b70a8427 522008-07-27 Bean <bean123ch@gmail.com>
53
54 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
55 (grub_fat_find_dir): Ignore case when comparing filename.
56
8f5e379f 572008-07-27 Bean <bean123ch@gmail.com>
58
59 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
60 smallino, as it's more descriptive, and i8count can be confused with
61 the other field count.
62 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
63 inode type.
64
a85cd5a0 652008-07-27 Bean <bean123ch@gmail.com>
66
67 * commands/crc.c: New file.
68
69 * lib/crc.c: Likewise.
70
71 * include/grub/lib/crc.h: Likewise.
72
73 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
74
75 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
76 (hexdump): Move this function to ...
77
78 * lib/hexdump.c: ... here.
79
80 * include/grub/hexdump.h: Renamed to ...
81
82 * include/grub/lib/hexdump.h: ... this.
83
84 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
85
86 * util/grub-editenv.c: Likewise.
87
88 * include/envblk.h: Renamed to ...
89
90 * include/lib/envblk.h: ... this.
91
92 * util/envblk.c: Renamed to ...
93
94 * lib/envblk.c: ... this.
95
96 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
97 lib/hexdump.c.
98 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
99 (pkglib_MODULES): Add crc.mod.
100 (hexdump_mod_SOURCES): Add lib/hexdump.c.
101 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
102 (crc_mod_SOURCES): New macro.
103 (crc_mod_CFLAGS): Likewise.
104 (crc_mod_LDFLAGS): Likewise.
105
106 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
107
108 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
109
110 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
111
112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
113
114 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
115
c298def0 1162008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 117
118 * commands/help.c: Include <grub/term.h>.
119 (TERM_WIDTH): Removed. Updated all users.
120
cc349fb3 1212008-07-27 Pavel Roskin <proski@gnu.org>
122
123 * util/getroot.c (find_root_device): Rephrase a comment to avoid
124 spurious warnings about a comment within a comment.
125
9051607e 1262008-07-25 Robert Millan <rmh@aybabtu.com>
127
128 * util/getroot.c (find_root_device): Skip devices that match
129 /dev/dm-[0-9]. This lets the real device be found for any type of
130 abstraction (LVM, EVMS, RAID..).
131 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
132 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
133 device is found first, find_root_device() will now skip it.
134
01453bfc 1352008-07-24 Pavel Roskin <proski@gnu.org>
136
137 * include/grub/types.h: Use __builtin_bswap32() and
138 __builtin_bswap64() with gcc 4.3 and newer.
139
6af9849f 1402008-07-24 Christian Franke <franke@computer.org>
141
3a0fa256 142 * util/i386/pc/grub-install.in: If `--debug' is specified,
143 pass `--verbose' to grub-setup.
144 Abort script if make_system_path_relative_to_its_root() fails.
145
7810e747 1462008-07-24 Bean <bean123ch@gmail.com>
147
148 * configure.ac: Fixed a bug caused by the previous cygwin patch,
149 variable `target_platform' should be `platform'.
150
42290e17 1512008-07-24 Bean <bean123ch@gmail.com>
152
51cc5193 153 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 154 (grub_png_init_fixed_block): New function.
155 (grub_png_decode_image_data): Handle fixed huffman code compression.
156
2a8a80e4 1572008-07-24 Bean <bean123ch@gmail.com>
158
159 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
160 (grub_pe2elf_SOURCES): New macro.
161 (CLEANFILES): Add grub-pe2elf.
162
163 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
164 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
165 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
166 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
167 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
168 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
169 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
170 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
171 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
172 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
173 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
174 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
175 (GRUB_PE32_DT_FUNCTION): Likewise.
176 (GRUB_PE32_REL_I386_DIR32): Likewise.
177 (GRUB_PE32_REL_I386_REL32): Likewise.
178 (grub_pe32_symbol): New structure.
179 (grub_pe32_reloc): Likewise.
180
181 * util/grub-pe2elf.c: New file.
182
183 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
184 start symbol in non pc platform.
185
186 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
187
188 The following patches are from Christian Franke.
189
190 * include/grub/dl.h: Remove .previous, gas supports this only
191 for ELF format.
192
193 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
194 Remove .type, gas supports this only for ELF format.
195
196 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
197 nullbytes in symbol table. This fixes an infinite loop if table is
198 zero filled.
199
200 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
201 TARGET_IMG_LDFLAGS and EXEEXT.
202
203 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
204 TARGET_IMG_LDFLAGS_AC.
205 (grub_CHECK_STACK_ARG_PROBE): New function.
206
207 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
208
209 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
210
211 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
212 to set TARGET_IMG_LD* accordingly.
213 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
214 Add call to grub_CHECK_STACK_ARG_PROBE.
215 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
216
217 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
218
219 * genmk.rb: Add EXEEXT to CLEANFILES.
220
12ccdb75 2212008-07-23 Robert Millan <rmh@aybabtu.com>
222
223 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
224 define the codes for arrows and lines used for the menu).
225 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
226 as well.
227
228 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
229 fonts, because the latter are too slow.
230
18eeaf04 2312008-07-21 Bean <bean123ch@gmail.com>
232
233 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
234 a20. Run keyboard test last, as it will cause macbook to halt.
235
b095e2ad 2362008-07-18 Pavel Roskin <proski@gnu.org>
237
238 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
239 load foreign architecture modules correctly anyway. Keep
240 support for loading host architecture modules, whether we
241 compile them or not.
242
737feb35 2432008-07-17 Pavel Roskin <proski@gnu.org>
244
3f4ce737 245 * configure.ac: Use -m32 or -m64 regardless of whether we had to
246 change target_cpu. The compiler default can mismatch target_cpu
247 in any case.
248
4ad2d049 249 * disk/efi/efidisk.c: Fix format warnings on x86_64.
250 * kern/efi/efi.c: Likewise.
251
f6130a12 252 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
253 target compiler is functional.
254 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
255 are set up.
256
58393a2d 257 * configure.ac: Default to efi platform for x86_64-apple. Allow
258 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
259 adjustments from the rest, only do them if target is not
260 explicitly given. Merge other adjustments with the final sanity
261 check. Remove an extraneous check for supported CPU. Be
262 specific which CPU and which platform is not supported.
263
737feb35 264 * configure.ac: Default to pc platform for x86_64.
265
546f966a 2662008-07-17 Robert Millan <rmh@aybabtu.com>
267
268 Partial LinuxBIOS -> Coreboot rename.
269
270 * conf/i386-linuxbios.rmk: Renamed to ...
271 * conf/i386-coreboot.rmk: ... this.
272 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
273 * configure.ac: Accept "coreboot" as input platform (but maintain
274 compatibility with "linuxbios").
275 * include/grub/i386/linuxbios: Renamed to ...
276 * include/grub/i386/coreboot: ... this.
277
20011694 2782008-07-17 Bean <bean123ch@gmail.com>
279
280 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 281 (appleldr_mod_SOURCE): New variable.
20011694 282 (appleldr_mod_CFLAGS): Likewise.
283 (appleldr_mod_LDFLAGS): Likewise.
284 (pci_mod_SOURCES): Likewise.
285 (pci_mod_CFLAGS): Likewise.
286 (pci_mod_LDFLAGS): Likewise.
287 (lspci_mod_SOURCES): Likewise.
288 (lspci_mod_CFLAGS): Likewise.
289 (lspci_mod_LDFLAGS): Likewise.
290
291 * conf/x86_64-efi.rmk: New file.
292
293 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
294 macro.
295 (grub_efidisk_write): Likewise.
296
297 * include/efi/api.h (efi_call_0): New macro.
298 (efi_call_1): Likewise.
299 (efi_call_2): Likewise.
300 (efi_call_3): Likewise.
301 (efi_call_4): Likewise.
302 (efi_call_5): Likewise.
303 (efi_call_6): Likewise.
304
305 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
306 grub_rescue_cmd_chainloader.
307
308 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
309 (grub_pe32_optional_header): Change some fields based on i386 or
310 x86_64 platform.
311 (GRUB_PE32_PE32_MAGIC): Likewise.
312
313 * include/grub/efi/uga_draw.h: New file.
314
315 * include/grub/elf.h (STN_ABS): New constant.
316 (R_X86_64_NONE): Relocation constant for x86_64.
317 (R_X86_64_64): Likewise.
318 (R_X86_64_PC32): Likewise.
319 (R_X86_64_GOT32): Likewise.
320 (R_X86_64_PLT32): Likewise.
321 (R_X86_64_COPY): Likewise.
322 (R_X86_64_GLOB_DAT): Likewise.
323 (R_X86_64_JUMP_SLOT): Likewise.
324 (R_X86_64_RELATIVE): Likewise.
325 (R_X86_64_GOTPCREL): Likewise.
326 (R_X86_64_32): Likewise.
327 (R_X86_64_32S): Likewise.
328 (R_X86_64_16): Likewise.
329 (R_X86_64_PC16): Likewise.
330 (R_X86_64_8): Likewise.
331 (R_X86_64_PC8): Likewise.
332
333 * include/grub/i386/efi/pci.h: New file.
334
335 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
336 Change it value based on platform.
337 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
338 (GRUB_E820_RAM): Likewise.
339 (GRUB_E820_RESERVED): Likewise.
340 (GRUB_E820_ACPI): Likewise.
341 (GRUB_E820_NVS): Likewise.
342 (GRUB_E820_EXEC_CODE): Likewise.
343 (GRUB_E820_MAX_ENTRY): Likewise.
344 (grub_e820_mmap): New structure.
345 (linux_kernel_header): Change the efi field according to different
346 kernel version, also field from linux_kernel_header.
347
348 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
349
350 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
351 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
352 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
353 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
354 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
355 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
356 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
357 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
358 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
359 (GRUB_PCI_ADDR_IO_MASK): Likewise.
360
361 * include/grub/x86_64/efi/kernel.h: New file.
362
363 * include/grub/x86_64/efi/loader.h: Likewise.
364
365 * include/grub/x86_64/efi/machine.h: Likewise.
366
367 * include/grub/x86_64/efi/pci.h: Likewise.
368
369 * include/grub/x86_64/efi/time.h: Likewise.
370
371 * include/grub/x86_64/linux.h: Likewise.
372
373 * include/grub/x86_64/setjmp.h: Likewise.
374
375 * include/grub/x86_64/time.h: Likewise.
376
377 * include/grub/x86_64/types.h: Likewise.
378
379 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
380 GRUB_TARGET_SIZEOF_VOID_P.
381
382 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
383 (grub_efi_locate_handle): Likewise.
384 (grub_efi_open_protocol): Likewise.
385 (grub_efi_set_text_mode): Likewise.
386 (grub_efi_stall): Likewise.
387 (grub_exit): Likewise.
388 (grub_reboot): Likewise.
389 (grub_halt): Likewise.
390 (grub_efi_exit_boot_services): Likewise.
391 (grub_get_rtc): Likewise.
392
393 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
394 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
395 (grub_efi_allocate_pages): Wrap efi calls.
396 (grub_efi_free_pages): Wrap efi calls.
397 (grub_efi_get_memory_map): Wrap efi calls.
398
399 * kern/x86_64/dl.c: New file.
400
401 * kern/x86_64/efi/callwrap.S: Likewise.
402
403 * kern/x86_64/efi/startup.S: Likewise.
404
405 * loader/efi/appleloader.c: Likewise.
406
407 * loader/efi/chainloader.c (cmdline): New variable.
408 (grub_chainloader_unload): Wrap efi calls.
409 (grub_chainloader_boot): Likewise.
410 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
411 command line.
412
413 * loader/efi/chainloader_normal.c (chainloader_command):
414 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
415 command line.
416
417 * loader/i386/efi/linux.c (allocate_pages): Change allocation
418 method.
419 (grub_e820_add_region): New function.
420 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
421 booting.
422 (grub_find_video_card): New function.
423 (grub_linux_setup_video): New function.
424 (grub_rescue_cmd_linux): Probe for video information.
425
426 * normal/x86_64/setjmp.S: New file.
427
428 * term/efi/console.c (map_char): New function.
429 (grub_console_putchar): Map unicode char.
430 (grub_console_checkkey): Wrap efi calls.
431 (grub_console_getkey): Likewise.
432 (grub_console_getwh): Likewise.
433 (grub_console_gotoxy): Likewise.
434 (grub_console_cls): Likewise.
435 (grub_console_setcolorstate): Likewise.
436 (grub_console_setcursor): Likewise.
437
438 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
439
59652a20 4402008-07-16 Pavel Roskin <proski@gnu.org>
441
ef294055 442 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
443 format strings.
444
59652a20 445 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
446 pointer, not an integer. This fixes a warning and prevents
447 precision loss on 64-bit systems.
448 (relocate_addresses): Remove unneeded cast.
449
afc3b5d7 4502008-07-15 Pavel Roskin <proski@gnu.org>
451
506b2b3e 452 * kern/i386/ieee1275/init.c: Include grub/cache.h.
453
62ead89c 454 * term/ieee1275/ofconsole.c: Disable code unused on i386.
455
c4cd51d7 456 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
457 Fix comparison between signed and unsigned.
458
0d3d8f28 459 * include/grub/i386/ieee1275/console.h: Declare
460 grub_console_init() and grub_console_fini().
461
8804b286 462 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
463 It's empty and unused.
464
ee01cf35 465 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
466 beginning to avoid warnings with some compilers.
467
afc3b5d7 468 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
469 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
470
e4e8eaa5 4712008-07-14 Pavel Roskin <proski@gnu.org>
472
407aceb4 473 * kern/env.c (grub_register_variable_hook): Don't copy empty
474 string, it leaks memory. Pass "" to grub_env_set(), it should
475 handle constant strings.
476
e4e8eaa5 477 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
478 * commands/cmp.c (grub_cmd_cmp): Likewise.
479 * kern/dl.c (grub_dl_flush_cache): Likewise.
480 (grub_dl_load_core): Likewise.
481 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
482 (grub_elf64_load_phdrs): Likewise.
483
d4e2dad3 4842008-07-13 Pavel Roskin <proski@gnu.org>
485
486 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
487 between signed and unsigned.
488 (LzmaEnc_Finish): Fix warning about an unused parameter.
489
aa24b516 4902008-07-13 Bean <bean123ch@gmail.com>
491
492 * Makefile.in (enable_lzo): New rule.
493
494 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
495
496 * configure.ac (ENABLE_LZO): New option --enable-lzo.
497
498 * boot/i386/pc/lnxboot.S: #include <config.h>.
499
500 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 501 its value according to the compression algorithm used, lzo or lzma.
aa24b516 502
503 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
504 compression algorithm according to configure macro.
505
506 * kern/i386/pc/startup.S (codestart): Likewise.
507
508 * kern/i386/pc/lzma_decode.S: New file.
509
510 * include/grub/lib/LzFind.h: Likewise.
511
512 * include/grub/lib/LzHash.h: Likewise.
513
514 * include/grub/lib/LzmaDec.h: Likewise.
515
516 * include/grub/lib/LzmaEnc.h: Likewise.
517
518 * include/grub/lib/LzmaTypes.h: Likewise.
519
520 * lib/LzFind.c: Likewise.
521
522 * lib/LzmaDec.c: Likewise.
523
524 * lib/LzmaEnc.c: Likewise.
525
4ae821ac 5262008-07-13 Bean <bean123ch@gmail.com>
527
528 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
529 (grub_ext4_extent_header): New structure.
530 (grub_ext4_extent): Likewise.
531 (grub_ext4_extent_idx): Likewise.
532 (grub_ext4_find_leaf): New function.
533 (grub_ext2_read_block): Handle extents.
534
9a745147 5352008-07-12 Robert Millan <rmh@aybabtu.com>
536
537 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
538
d49a4cf6 5392008-07-11 Robert Millan <rmh@aybabtu.com>
540
541 * util/grub.d/40_custom.in: New file. Example on how to add custom
542 entries to /etc/grub.d.
543 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
544 40_custom (implicitly, by merging all the grub.d rules).
545
947414b4 5462008-07-11 Pavel Roskin <proski@gnu.org>
547
0059cf6f 548 * commands/read.c (grub_getline): Fix invalid memory access.
549 Don't add newline to the variable value.
550
947414b4 551 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
552 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
553 (serial_hw_get_port): Check validity of the port number.
554 (grub_cmd_serial): Check return value of serial_hw_get_port().
555
62a02d00 5562008-07-07 Pavel Roskin <proski@gnu.org>
557
558 * boot/i386/pc/diskboot.S (notification_string): Replace
559 "Loading kernel" with just "loading". This is shorter, less
560 confusing and saves a few bytes for possible future changes.
561
3e5581b0 5622008-07-05 Pavel Roskin <proski@gnu.org>
563
ea387a48 564 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
565 size for ATAPI devices, they are undefined. Output sector
566 number in decimal form.
567
3e5581b0 568 * disk/ata.c: Use named constants for status bits.
569
fdecb8fd 5702008-07-04 Pavel Roskin <proski@gnu.org>
571
bcd35b90 572 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
573 grub_addr_t before casting it to the void pointer to fix a
574 warning. Non-addressable regions are discarded earlier.
575 (grub_arch_modules_addr): Cast _end to grub_addr_t.
576 * kern/i386/linuxbios/table.c: Include grub/misc.h.
577 (check_signature): Don't shadow table_header.
578 (grub_linuxbios_table_iterate): Cast numeric constants to
579 grub_linuxbios_table_header_t.
580 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
581 grub_stop().
582
af58ab3d 583 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
584 prevent warnings.
585
1759aa57 586 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
587 pointer, which can cause warnings. Support 64-bit addresses.
588
fdecb8fd 589 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
590 of sizeof(long). This fixes PowerPC image generation on x86_64.
591
8516d2a8 5922008-07-04 Robert Millan <rmh@aybabtu.com>
593
594 This fixes a performance issue when pc & gpt partmap iterators
595 didn't abort iteration even after our hook found what it was
fe987087 596 looking for (often causing expensive probes of non-existent drives).
8516d2a8 597
598 Some callers relied on previous buggy behaviour, since they would
599 rise an error when their own hooks caused early abortion of its
600 iteration.
601
602 * kern/device.c (grub_device_open): Improve error message.
603 * disk/lvm.c (grub_lvm_open): Likewise.
604 * disk/raid.c (grub_raid_open): Likewise.
605
606 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
607 when hook requests it, independently of grub_errno.
608 (pc_partition_map_probe): Do not fail when find_func() caused
609 early abortion of pc_partition_map_iterate().
610
611 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
612 when hook requests it, independently of grub_errno.
613 (gpt_partition_map_probe): Do not fail when find_func() caused
614 early abortion of gpt_partition_map_iterate().
615
616 * kern/partition.c (grub_partition_iterate): Abort parent iteration
617 when hook requests it, independently of grub_errno. Do not fail when
618 part_map_iterate_hook() caused early abortion of p->iterate().
619
620 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
621 when grub_partition_iterate() returned with non-zero.
622
277d0de9 6232008-07-03 Pavel Roskin <proski@gnu.org>
624
625 * disk/ata.c (grub_ata_pio_write): Check status before writing,
626 like we do in grub_ata_pio_read().
627 (grub_ata_readwrite): Always write individual sectors. Fix the
628 sector count for the remainder.
629 (grub_ata_write): Enable writing to ATA devices. Correctly
630 report error for ATAPI devices.
631
d4c9b428 6322008-07-02 Pavel Roskin <proski@gnu.org>
633
e43fc690 634 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
635 warning.
636
f707af42 637 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
638 for every read sector, we already increment it for the whole
639 batch. This fixes reading more than 256 sectors at once.
640
11e16b15 641 * util/grub-editenv.c (cmd_info): Cast argument to long
642 explicitly. ptrdiff_t reduces to int on i386.
643
cbabfdd4 644 * util/grub-editenv.c (main): Be specific which parameter is
645 missing.
646
b8fbce0a 647 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
648 (memdisk): Make memdisk_orig_addr a pointer.
649
c9c8e606 650 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
651 for file offsets, use grub_off_t instead. Fix printf format
652 warnings.
653
ca62e598 654 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
655 there. Real unexpected warnings should not drown in the noise
656 about known problems.
657
ce8d1766 658 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
659 grub_disk_addr_t for memory addresses.
660
00c7a56a 661 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
662 explicitly to fix a warning.
663
08d3ef09 664 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
665
cb71ba20 666 * Makefile.in (MODULE_LDFLAGS): New variable.
667 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
668 the linker accepts --build-id=none.
669 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
670 MODULE_LDFLAGS.
671 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
672
d4c9b428 673 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
674 those in Linux XFS code. Provide a way to access 64-bit parent
675 inode.
676 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
677 the end of struct grub_xfs_dir_header.
678
d4156eee 6792008-07-02 Bean <bean123ch@gmail.com>
680
681 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
682 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
683 and GRUB_IEEE1275_FLAG_NO_ANSI.
684
685 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
686 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
687 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
688
689 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
690 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
691
692 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
693 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
694
695 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
696 esc sequence on non ANSI terminal.
697 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
698
699 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
700 beginning of file.
701
2270f77b 7022008-07-02 Bean <bean123ch@gmail.com>
703
704 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
705 (grub_editenv_SOURCES): New variable.
706 (pkglib_MODULES): Add loadenv.mod.
707 (loadenv_mod_SOURCES): New variable.
708 (loadenv_mod_CFLAGS): Likewise.
709 (loadenv_mod_LDFLAGS): Likewise.
710
711 * include/grub/envblk.h: New file.
712
713 * util/envblk.c: New file.
714
715 * util/grub-editenv.c: New file.
716
717 * commands/loadenv.c: New file.
718
0e9e51ec 7192008-07-01 Pavel Roskin <proski@gnu.org>
720
d89b7634 721 * include/multiboot2.h (struct multiboot_tag_module): Use char,
722 not unsigned char. This fixes warnings and is consistent with
723 other tags.
724
bf1835b1 725 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
726
8222a04b 727 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
728
6a42d99d 729 * term/tparm.c (analyze): Always set *popcount.
730
10b159d1 731 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
732 cast to fix a warning.
733
b8789f6c 734 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
735 cast to suppress a warning.
736
29d7e38a 737 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
738 grub_fshelp_read_file() expects.
739
f341f669 740 * fs/fat.c: Fix UUID calculation on big-endian systems. We
741 write uuid as a 32-bit value in CPU byte order, so declare and
742 use it as such.
743
0e9e51ec 744 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
745 long if the format specifier expects it.
746 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
747 * partmap/pc.c (pc_partition_map_iterate): Likewise.
748 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
749 long to fix a warning.
750 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
751 grub_dprintf() arguments to fix warnings.
752
3aefa857 7532008-06-30 Pavel Roskin <proski@gnu.org>
754
56c7668b 755 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
756 install_bsd_part immediately before core.img is embedded or
757 modified on disk. This fixes core.img verification if core.img
758 cannot be embedded.
759
3aefa857 760 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
761 core_path to calculate the blocklist.
762 Patch from Javier Martín <lordhabbit@gmail.com>
763
5444088d 7642008-06-29 Robert Millan <rmh@aybabtu.com>
765
766 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
767 block to disk block.
768 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
769 Patch from Niels Böhm <bitbucket@arcor.de>
770
674835c8 7712008-06-29 Robert Millan <rmh@aybabtu.com>
772
773 * util/update-grub_lib.in (font_path): Search for fonts in
774 /boot/grub first, which is more likely to be readable (we aren't
775 deciding where fonts live, just looking for them).
776
f527dbc8 7772008-06-26 Pavel Roskin <proski@gnu.org>
778
6c2d8df6 779 * util/biosdisk.c (read_device_map): Don't leave dead map
780 entries for devices failing stat() check.
781
f527dbc8 782 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
783 core_path_dev for the core.img path on the target device.
784
aebe3d13 7852008-06-26 Robert Millan <rmh@aybabtu.com>
786
787 * disk/fs_uuid.c: New file.
788 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
789 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
790 (fs_uuid_mod_LDFLAGS): New variables.
791 * include/grub/disk.h (grub_disk_dev_id): Add
792 `GRUB_DISK_DEVICE_UUID_ID'.
793 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
794 implement iterate().
795
37aaf354 7962008-06-26 Robert Millan <rmh@aybabtu.com>
797
798 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
799 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
800 Linux image includes no initrd.
801
25ff262a 8022008-06-21 Javier Martín <lordhabbit@gmail.com>
803
804 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
805 call to resolve the core image location that effectively appended the
806 name twice.
807
76a2bd44 8082008-06-21 Robert Millan <rmh@aybabtu.com>
809
810 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
811 call from here ...
812
813 * util/grub.d/10_hurd.in: ... to here ...
814 * util/grub.d/10_linux.in: ... and here.
815
650e1c79 8162008-06-19 Robert Millan <rmh@aybabtu.com>
817
fe987087 818 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 819 after it has been set by grub_machine_set_prefix().
820
6ce63911 8212008-06-19 Robert Millan <rmh@aybabtu.com>
822
823 * commands/search.c (search_label, search_fs_uuid, search_file): Print
824 search result when not saving to variable, not the other way around.
825 When saving to variable, abort iteration as soon as a match is found.
826
73940cec 8272008-06-19 Robert Millan <rmh@aybabtu.com>
828
829 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
830 check for partition that provides /boot/grub. Its logic is flawed,
831 as it prevents prepare_grub_to_access_device() from being called
832 multiple times.
833
3c62a39d 8342008-06-19 Robert Millan <rmh@aybabtu.com>
835
836 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
837 "insmod" command directly when abstraction modules are needed,
fe987087 838 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 839 since it had already been processed).
840
47395a42 8412008-06-19 Pavel Roskin <proski@gnu.org>
842
843 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
844 changed. This is needed in case GRUB_LIBDIR changes.
845 * conf/i386-ieee1275.rmk: Likewise.
846 * conf/i386-linuxbios.rmk: Likewise.
847 * conf/i386-pc.rmk: Likewise.
848 * conf/powerpc-ieee1275.rmk: Likewise.
849
a145ac2d 8502008-06-18 Pavel Roskin <proski@gnu.org>
851
852 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
853 kernel_elf_symlist.c to symlist.c for consistency with other
854 architectures. Update all users.
855 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
856
7847c51e 8572008-06-18 Robert Millan <rmh@aybabtu.com>
858
859 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
860 it in prefix.
861
862 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
863 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
864 a RAID device, run setup() for all members independently on whether
865 LVM abstraction is being used.
866 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
867 If grub-mkimage has set `*install_dos_part == -2', don't override this
868 value.
869 Perform *install_dos_part adjustments independently on whether
870 we're embedding or not.
871 Clarify error message when image is too big for embedding.
872 Remove duplicate *install_dos_part stanza.
873
b23e5644 8742008-06-17 Robert Millan <rmh@aybabtu.com>
875
876 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
877 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
878 variables.
879 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
880 values in grub_ofconsole_normal_color and
881 grub_ofconsole_highlight_color (they're not directly related to
882 background and foreground).
883 (grub_ofconsole_setcolorstate): Extract background and foreground
884 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
885
0aac2f79 8862008-06-17 Robert Millan <rmh@aybabtu.com>
887
888 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
889 /boot/grub for the check in last commit, not /boot (they could be
890 different partitions).
891
3cca7ef3 8922008-06-16 Robert Millan <rmh@aybabtu.com>
893
894 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
895 asked to setup access for the same partition that provides /boot,
896 don't bother using UUIDs since our root already has the value we
897 want.
898
347396d8 8992008-06-16 Robert Millan <rmh@aybabtu.com>
900
901 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
902 I2O devices.
903 Patch from Sven Mueller <sven@debian.org>.
904
991477f8 9052008-06-16 Robert Millan <rmh@aybabtu.com>
906
907 * util/update-grub.in: Check for $EUID instead of $UID.
908 Reported by Vincent Zweije.
909
d31a32a1 9102008-06-16 Bean <bean123ch@gmail.com>
911
fe987087 912 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 913 (grub_ext2_read_block): Likewise.
914 (grub_ext2_read_inode): Likewise.
915 (grub_ext2_mount): Likewise.
916 (grub_ext2_close): Likewise.
917 (grub_ext3_get_journal): Removed.
918
fe987087 919 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 920 (grub_reiserfs_read_symlink): Likewise.
921 (grub_reiserfs_mount): Likewise.
922 (grub_reiserfs_open): Likewise.
923 (grub_reiserfs_read): Likewise.
924 (grub_reiserfs_close): Likewise.
925 (grub_reiserfs_get_journal): Removed.
926
927 * fs/fshelp.c (grub_fshelp_read): Removed.
928 (grub_fshelp_map_block): Likewise.
929
930 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
931 (grub_fshelp_journal): Likewise.
932 (grub_fshelp_read): Likewise.
933 (grub_fshelp_map_block): Likewise.
934
3540a760 9352008-06-16 Pavel Roskin <proski@gnu.org>
936
937 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
938 floating point anymore.
939 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
940
95614c84 9412008-06-15 Pavel Roskin <proski@gnu.org>
942
943 * commands/ls.c (grub_ls_list_files): Use integer calculations
944 for human readable format, avoid floating point use.
945 * kern/misc.c (grub_ftoa): Remove.
946 (grub_vsprintf): Remove floating point support.
947
50465dd6 9482008-06-15 Robert Millan <rmh@aybabtu.com>
949
fe6b695a 950 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 951 devices.
952 Reported by Max Vozeler.
953
a9207284 9542008-06-15 Robert Millan <rmh@aybabtu.com>
955
956 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
957 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
958 skipped later.
959 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
960 the beginning of the prefix.
961
962 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
963 It is assumed that if we have a memdisk, grub-mkimage has set
964 grub_prefix to include the "(memdisk)" drive in it.
965
a7cbd45a 9662008-06-15 Robert Millan <rmh@aybabtu.com>
967
968 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
969 Initialize keyboard controller after registering the terminal, so that
970 grub_printf() can be called from grub_keyboard_controller_init().
971
21cf716a 9722008-06-15 Robert Millan <rmh@aybabtu.com>
973
974 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
975 extent-btree which is written as big endian on disk.
976 Reported by Alain Greppin <al@chilibi.org>.
977
23a64d8e 9782008-06-14 Robert Millan <rmh@aybabtu.com>
979
980 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
981 * util/i386/pc/grub-install.in (modules): Likewise.
982
d687651c 9832008-06-13 Pavel Roskin <proski@gnu.org>
984
985 * commands/ls.c (grub_ls_list_files): Fix format warnings.
986
dfe9ddd4 9872008-06-13 Bean <bean123ch@gmail.com>
988
989 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
990
991 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
992
993 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
994 to indicate sparse block.
995
16ae7781 9962008-06-12 Pavel Roskin <proski@gnu.org>
997
e6d1a308 998 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
999 number, grub_fshelp_read() does it for us.
1000
16ae7781 1001 * fs/fshelp.c (grub_fshelp_read): New function. Implement
1002 linear disk read with journal translation.
1003 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
1004 * include/grub/fshelp.h: Declare grub_fshelp_read().
1005
40fd3a2b 10062008-06-09 Pavel Roskin <proski@gnu.org>
1007
1008 * fs/minix.c (grub_minix_mount): Handle error reading
1009 superblock.
1010
f5679726 10112008-06-08 Robert Millan <rmh@aybabtu.com>
1012
1013 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
1014 don't append the RAID prefix afterwards.
1015 Reported by Clint Adams.
1016
ce525529 10172008-06-08 Robert Millan <rmh@aybabtu.com>
1018
1019 Based on description from Pavel:
1020 * kern/disk.c (grub_disk_check_range): Rename to ...
1021 (grub_disk_adjust_range): ... this. Add a comment explaining the
1022 tasks performed by this function.
1023
ad4936a0 10242008-06-08 Robert Millan <rmh@aybabtu.com>
1025
1026 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
1027 `num_serial' (for consistency with other variables).
1028 (struct grub_ntfs_data): Add `uuid' member.
1029 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
1030 (grub_ntfs_uuid): New function.
1031 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
1032
dc20b0f9 10332008-06-07 Pavel Roskin <proski@gnu.org>
1034
1035 * util/biosdisk.c (open_device): Revert last change to the
1036 function, it broke installation. The sector needs to be
1037 different dependent on which device is opened.
1038
c5e3cfba 10392008-06-06 Robert Millan <rmh@aybabtu.com>
1040
1041 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
1042 rest of GRUB, and breakage doesn't happen if its value were modified.
1043
1044 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1045 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
1046 a constant (same value).
1047 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
1048 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
1049
26a1f8c4 10502008-06-06 Robert Millan <rmh@aybabtu.com>
1051
1052 * util/biosdisk.c (open_device): Do not modify sector offset when
1053 accessing a partition. kern/disk.c already handles this for us.
1054
25d6b327 10552008-06-06 Robert Millan <rmh@aybabtu.com>
1056
1057 * util/grub-emu.c (grub_machine_init): Move code in this function from
1058 here ...
1059 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
1060 segfault in case grub_printf() is called).
1061
1062 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
1063 grub_probe. Update all users not to explicitly add it again.
1064 (grub_device): New variable; contains corresponding device for grubdir.
1065 (fs_module, partmap_module, devabstraction_module): Pass
1066 `--device ${grub_device}' to grub_probe to avoid traversing /dev
1067 every time.
1068
9ece62fb 10692008-06-05 Robert Millan <rmh@aybabtu.com>
1070
1071 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
1072 is found, print it (same layout as with labels).
1073
1ad36d37 10742008-06-04 Robert Millan <rmh@aybabtu.com>
1075
1076 * util/biosdisk.c (get_drive): Rename to ...
1077 (find_grub_drive): ... this. Update all users.
1078
1079 (get_os_disk): Rename to ...
1080 (convert_system_partition_to_system_disk): ... this. Update all users.
1081
1082 (find_drive): Rename to ...
1083 (find_system_device): ... this. Update all users.
1084
e6a30859 10852008-06-04 Robert Millan <rmh@aybabtu.com>
1086
1087 * util/biosdisk.c (get_os_disk): Handle IDA devices.
1088 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1089 (make_device_map): Likewise.
1090
00c108a4 10912008-06-01 Robert Millan <rmh@aybabtu.com>
1092
1093 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
1094 before dereferencing it.
1095
1096 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
1097 union with fat12/fat16-specific ones. Add some new fields, including
1098 `num_serial' for both versions.
1099 (struct grub_fat_data): Add `uuid' member.
1100 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
1101 names. Initialize `data->uuid' using `num_serial'.
1102 (grub_fat_uuid): New function.
1103 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
1104
1105 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
1106 (grub_reiserfs_uuid): New function.
1107 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
1108 member.
1109
1110 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
1111 (grub_xfs_uuid): New function.
1112 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
1113
1385c5bb 11142008-06-01 Robert Millan <rmh@aybabtu.com>
1115
1116 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
1117 code that is backward compatible with pre-uuid search command.
1118
c682dfd7 11192008-05-31 Robert Millan <rmh@aybabtu.com>
1120
1121 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1122 floppies after everything else, to ensure floppy drive isn't accessed
1123 unnecessarily (patch from Bean).
1124
b7db5d47 11252008-05-31 Robert Millan <rmh@aybabtu.com>
1126
1127 * commands/search.c (search_label, search_fs_uuid, search_file): Do
1128 not print device names when we were asked to set a variable.
1129
6e037aa9 11302008-05-31 Robert Millan <rmh@aybabtu.com>
1131
1132 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1133 using "cursor-on" and "cursor-off" commands (understood at least by
1134 the Open Firmware flavour on OLPC).
1135
41305bc8 11362008-05-31 Michael Gorven <michael@gorven.za.net>
1137
1138 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1139 on and off sequences.
1140
69ba137e 11412008-05-31 Robert Millan <rmh@aybabtu.com>
1142
1143 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1144 * util/update-grub.in: Likewise.
1145
520ae21b 11462008-05-30 Pavel Roskin <proski@gnu.org>
1147
1148 * util/biosdisk.c (linux_find_partition): Simplify logic and
1149 make the code more universal. Keep special processing for
1150 devfs, but use a simple rule for all other devices. If the
1151 device ends with a number, append 'p' and the partition number.
1152 Otherwise, append only the partition number.
1153
5786569b 11542008-05-30 Robert Millan <rmh@aybabtu.com>
1155
1156 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1157 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1158 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1159 the `root' parameter to Linux.
1160
51500452 11612008-05-30 Robert Millan <rmh@aybabtu.com>
1162
1163 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1164 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1165 --fs_uuid with --fs-uuid.
1166 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1167 all filesystems support them).
1168
811d3878 11692008-05-30 Robert Millan <rmh@aybabtu.com>
1170
1171 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 1172 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 1173
cab63c95 11742008-05-30 Robert Millan <rmh@aybabtu.com>
1175
1176 * util/grub.d/00_header.in: Remove obsolete comment referencing
1177 convert_system_path_to_grub_path().
1178 * util/update-grub.in: Likewise.
1179 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1180 (convert_system_path_to_grub_path): Add a warning message explaining
1181 that this function is deprecated. Rely on is_path_readable_by_grub()
1182 for the readability checks.
1183 (font_path): Use is_path_readable_by_grub() for the readability
1184 check rather than convert_system_path_to_grub_path().
1185
972e2f7a 11862008-05-30 Robert Millan <rmh@aybabtu.com>
1187
1188 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1189 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1190 converting it first.
1191 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1192 grub.cfg for access to font file, and afterwards call it again to set
1193 the root device.
1194
62191274 11952008-05-30 Robert Millan <rmh@aybabtu.com>
1196
1197 * commands/search.c (options): Add --fs_uuid option.
1198 (search_fs_uuid): New function.
1199 (grub_cmd_search): Fix --set argument passing.
1200 Use search_fs_uuid() when requested via --fs_uuid.
1201 (grub_search_init): Update help message.
1202 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1203 and redeclare it as an array of 16-bit words.
1204 (grub_ext2_uuid): New function.
1205 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1206 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1207 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1208 (GRUB_DEVICE_BOOT_UUID): New variables.
1209 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1210 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1211 whenever possible.
1212 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
1213 just assume `root' variable has the right value.
1214 * util/grub.d/10_linux.in: Likewise.
1215 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1216 via PRINT_FS_UUID.
1217 (main): Recognise `-t fs_uuid' argument.
1218
01b73ec8 12192008-05-30 Robert Millan <rmh@aybabtu.com>
1220
1221 * util/biosdisk.c (map): Redefine structure to hold information
1222 about GRUB drive name.
fe6b695a 1223 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 1224 drive names.
1225 (call_hook): Remove.
1226 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1227 member. Assume drive has partitions.
1228 (grub_util_biosdisk_open): Access device names via `.device' struct
1229 member.
1230 (open_device): Likewise.
1231 (find_drive): Likewise.
1232 (read_device_map): Adjust map[] usage to match the new struct
1233 definition. Don't check for duplicates (still possible, but not cheap
1234 anymore).
1235 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1236 (make_device_name): Remove assumption of BIOS-like drive names.
1237
22f16596 12382008-05-30 Pavel Roskin <proski@gnu.org>
1239
1240 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1241 compiling execute.c doesn't need grub_script.tab.h anymore.
1242 (normal/command.c_DEPENDENCIES): Likewise.
1243 (normal/function.c_DEPENDENCIES): Likewise.
1244 * conf/i386-ieee1275.rmk: Likewise.
1245 * conf/i386-linuxbios.rmk: Likewise.
1246 * conf/i386-pc.rmk: Likewise.
1247 * conf/powerpc-ieee1275.rmk: Likewise.
1248 * conf/sparc64-ieee1275.rmk: Likewise.
1249
528ad8f2 12502008-05-29 Pavel Roskin <proski@gnu.org>
1251
d1dff95d 1252 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1253 when scanning metadata for volume group name.
1254
528ad8f2 1255 * include/grub/script.h: Don't include grub_script.tab.h. It's
1256 a generated file, which may only be included from the files with
1257 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
1258 use union YYSTYPE, as the later allows forward declaration.
1259 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1260
47248e08 12612008-05-29 Robert Millan <rmh@aybabtu.com>
1262
1263 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1264 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1265 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1266 (grub_console_checkkey): Add grub_dprintf() call to report unknown
1267 scan codes.
1268
ee632529 12692008-05-29 Robert Millan <rmh@aybabtu.com>
1270
1271 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1272 control key combinations.
1273
eee96e08 12742008-05-29 Robert Millan <rmh@aybabtu.com>
1275
1276 * util/powerpc/ieee1275/grub-install.in: Move from here ...
1277 * util/ieee1275/grub-install.in: ... to here.
1278 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1279 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1280 (grub_install_SOURCES): Likewise.
1281
da9a6a94 12822008-05-29 Robert Millan <rmh@aybabtu.com>
1283
1284 * fs/affs.c: Update copyright year.
1285 * fs/ext2.c: Likewise.
1286 * fs/fshelp.c: Likewise.
1287 * fs/hfsplus.c: Likewise.
1288 * fs/ntfs.c: Likewise.
1289 * fs/xfs.c: Likewise.
1290 * include/grub/fshelp.h: Likewise.
1291 * util/grub-mkdevicemap.c: Likewise.
1292
12e65f3a 12932008-05-28 Robert Millan <rmh@aybabtu.com>
1294
1295 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1296 might need to be fatfs to support some firmware implementations
1297 (e.g. OFW or EFI).
1298
23023641 12992008-05-28 Robert Millan <rmh@aybabtu.com>
1300
1301 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1302 devices.
1303 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1304 (make_device_map): Likewise.
1305
887d2619 13062008-05-20 Bean <bean123ch@gmail.com>
1307
1308 * fs/fshelp.c (grub_fshelp_map_block): New function.
1309 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1310 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1311
1312 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1313 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
1314 (grub_fshelp_journal): New structure.
1315 (grub_fshelp_map_block): New function prototype.
1316 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
1317 (grub_fshelp_map_block): Likewise.
1318
1319 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
1320 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
1321 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
1322 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
1323 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
1324 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
1325 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
1326 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
1327 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
1328 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
1329 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
1330 (grub_ext2_sblock): New members for journal support.
1331 (grub_ext3_journal_header): New structure.
1332 (grub_ext3_journal_revoke_header): Likewise.
1333 (grub_ext3_journal_block_tag): Likewise.
1334 (grub_ext3_journal_sblock): Likewise.
1335 (grub_fshelp_node): New members logfile and journal.
1336 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
1337 grub_fshelp_map_block to get real block number.
1338 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
1339 number.
1340 (grub_ext2_read_inode): Likewise.
1341 (grub_ext3_get_journal): New function.
1342 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
1343 (grub_ext2_close): Release memory used by journal.
1344
1345 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
1346 (REISERFS_MAGIC_DESC_BLOCK): New macro.
1347 (grub_reiserfs_transaction_header): Renamed to
1348 grub_reiserfs_description_block, replace field data with real_blocks.
1349 (grub_reiserfs_commit_block): New structure.
1350 (grub_reiserfs_data): New member journal.
1351 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
1352 number.
1353 (grub_reiserfs_read_symlink): Likewise.
1354 (grub_reiserfs_iterate_dir): Likewise.
1355 (grub_reiserfs_open): Likewise.
1356 (grub_reiserfs_read): Likewise.
1357 (grub_reiserfs_get_journal): New function.
1358 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
1359 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
1360 using grub_reiserfs_get_journal.
1361 (grub_reiserfs_close): Release memory used by journal.
1362
1363 * fs/affs.c (grub_affs_read_block): Change block type to
1364 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
1365
1366 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
1367
1368 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
1369
1370 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
1371
1372 * fs/udf.c (grub_udf_read_block): Change block type to
1373 grub_disk_addr_t. Use type cast to avoid warning.
1374
1375 * fs/xfs.c (grub_xfs_read_block): Likewise.
1376
b7c6bed5 13772008-05-16 Christian Franke <franke@computer.org>
1378
1379 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
1380 to ensure that break with ESC will always work.
1381 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
1382 Remove ESC from keyboard queue.
1383
eedf167f 13842008-05-16 Christian Franke <franke@computer.org>
1385
1386 * util/biosdisk.c: [__CYGWIN__] Add includes.
1387 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
1388 (get_os_disk): Move variable declarations to OS specific
1389 parts to avoid warning.
1390 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
1391 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
1392 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
1393 Cygwin.
1394 * util/getroot.c: [__CYGWIN__] Add includes.
1395 (strip_extra_slashes): Fix "/" case.
1396 [__CYGWIN__] (get_win32_path): New function.
1397 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
1398 [__CYGWIN__] (find_root_device): Disable.
1399 [__CYGWIN__] (get_bootsec_serial): New function.
1400 [__CYGWIN__] (find_cygwin_root_device): Likewise.
1401 [__linux__] (grub_guess_root_device): Add early returns to simplify
1402 structure.
1403 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
1404 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
1405 check for Linux only.
1406
a079699e 14072008-05-15 Bean <bean123ch@gmail.com>
1408
1409 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
1410 keyboard hang problem in apple's intel mac.
1411
1cf4059a 14122008-05-09 Robert Millan <rmh@aybabtu.com>
1413
1414 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
1415 devices.
1416 * util/grub-mkdevicemap.c (get_virtio_disk_name)
1417 (make_device_map): Likewise.
1418 Reported by Aurelien Jarno <aurel32@debian.org>
1419
ed759390 14202008-05-07 Ian Campbell <ijc@hellion.org.uk>
1421
1422 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
1423 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
1424 (make_device_map): Output entries for xvd type disks.
1425
b56c4eaa 14262008-05-07 Robert Millan <rmh@aybabtu.com>
1427
1428 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
1429 devices.
1430 * util/grub-mkdevicemap.c (get_cciss_disk_name)
1431 (make_device_map): Likewise.
1432 Reported by Roland Dreier <rdreier@cisco.com>
1433
7f8866ed 14342008-05-07 Robert Millan <rmh@aybabtu.com>
1435
1436 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
1437 grub_strstr() call. Correct a few mistakes in failure path handling.
1438
b0346e0f 14392008-05-06 Robert Millan <rmh@aybabtu.com>
1440
1441 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1442 Do not print a trailing slash (therefore, the root directory is an
1443 empty string).
1444 (convert_system_path_to_grub_path): Do not remove trailing slash
1445 from make_system_path_relative_to_its_root() output.
1446
1447 * util/i386/pc/grub-install.in: Add trailing slash to output from
1448 make_system_path_relative_to_its_root().
1449
6cf12cbd 14502008-05-06 Robert Millan <rmh@aybabtu.com>
1451
1452 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
1453 ensures that output lines aren't intermangled with those sent to
1454 stderr (via grub_util_info()).
1455 * util/grub-probe.c (grub_refresh): Likewise.
1456 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
1457
0fbb3117 14582008-05-05 Christian Franke <franke@computer.org>
1459
1460 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
1461 Add Cygwin device names.
1462 (get_ide_disk_name) [__CYGWIN__]: Likewise.
1463 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
1464 (check_device): Return error instead of success on empty name.
1465 (make_device_map): Move label inside linux specific code to
1466 prevent compiler warning.
1467
8124cdb7 14682008-04-30 Robert Millan <rmh@aybabtu.com>
1469
1470 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
1471 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
1472 first boot option.
1473 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
1474
094c01d0 14752008-04-29 Robert Millan <rmh@aybabtu.com>
1476
1477 * docs/grub.cfg: New file (example GRUB configuration).
1478
f4b1fc02 14792008-04-26 Robert Millan <rmh@aybabtu.com>
1480
329ce2a5 1481 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
1482 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
1483 and `disk/ieee1275/nand.c'.
f4b1fc02 1484
25f16ec1 14852008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 1486
25f16ec1 1487 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
1488 i386-linuxbios.
1489
1490 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
1491 change the buffer size to 4096 for cdrom device.
1492
1493 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
1494 and nand.mod.
1495 (_linux_mod_SOURCES): New variable.
1496 (_linux_mod_CFLAGS): Likewise.
1497 (_linux_mod_LDFLAGS): Likewise.
1498 (linux_mod_SOURCES): Likewise.
1499 (linux_mod_CFLAGS): Likewise.
1500 (linux_mod_LDFLAGS): Likewise.
1501 (nand_mod_SOURCES): Likewise.
1502 (nand_mod_CFLAGS): Likewise.
1503 (nand_mod_LDFLAGS): Likewise.
1504
1505 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
1506 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
1507 type property. (nand device in olpc don't have this property)
1508
1509 * include/grub/disk.h (grub_disk_dev_id): New macro
1510 GRUB_DISK_DEVICE_NAND_ID.
1511
1512 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
1513 function prototype.
1514 (grub_rescue_cmd_initrd): Likewise.
1515
1516 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
1517 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
1518 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 1519
25f16ec1 1520 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
1521 GRUB_MACHINE_IEEE1275 is defined.
1522
1523 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
1524 Use NESTED_FUNC_ATTR attribute on the hook parameter.
1525
1526 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
1527 on nested function heap_init.
1528 (grub_upper_mem): New variable for i386-ieee1275.
1529 (grub_get_extended_memory): New function for i386-ieee1275.
1530 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
1531
1532 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
1533 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
1534 property.
f19dbdb7 1535
25f16ec1 1536 * loader/i386/ieee1275/linux.c: New file.
1537
1538 * loader/i386/ieee1275/linux_normal.c: New file.
1539
1540 * disk/ieee1275/nand.c: New file.
1541
e89d61e9 15422008-04-18 Thomas Schwinge <tschwinge@gnu.org>
1543
1544 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
1545 value.
1546 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
1547
602566f6 15482008-04-18 Robert Millan <rmh@aybabtu.com>
1549
1550 Restructures early code path on ieee1275 to unify grub_main() as
1551 the first C function that is executed in every platform.
1552
1553 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
1554 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
1555 cmain().
1556 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
1557 * kern/ieee1275/cmain.c (cmain): Rename to ...
1558 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
1559 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
1560 at the beginning.
1561
57490c2b 15622008-04-18 Robert Millan <rmh@aybabtu.com>
1563
1564 * util/update-grub.in: Fix syntax error when setting
1565 `GRUB_PRELOAD_MODULES'.
1566 Reported by Stephane Chazelas <stephane@artesyncp.com>
1567
1977517d 15682008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
1569
1570 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
1571 section into account, newer toolchains generate unique build ids
1572 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 1573 we want build ids to be preserved
1977517d 1574 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
1575 far from other sections don't cause the raw binary images grow
1576 size
1577
bfb1f1a2 15782008-04-15 Robert Millan <rmh@aybabtu.com>
1579
1580 * disk/lvm.c: Update copyright year.
1581 * kern/misc.c: Likewise.
1582
01979850 15832008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1584
1585 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 1586 there is no memory left for physical volume name.
01979850 1587
0a1150e2 15882008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1589
1590 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
1591 volume name mapping to support bigger than 9 character names properly.
1592
82ead3fe 15932008-04-13 Robert Millan <rmh@aybabtu.com>
1594
1595 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
1596 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
1597
e54a72f5 15982008-04-13 Christian Franke <franke@computer.org>
1599
1600 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
1601 to create a floppy emulation boot CD when non emulation mode
1602 does not work.
1603 Enable Joliet CD filesystem extension.
1604
9fe86034 16052008-04-13 Robert Millan <rmh@aybabtu.com>
1606
1607 * kern/misc.c (grub_strncat): Fix off-by-one error.
1608 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
1609
1610 * kern/env.c (grub_env_context_close): Clear current context, not
1611 previous one.
1612 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
1613
1614 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
1615
7ceeee39 16162008-04-13 Robert Millan <rmh@aybabtu.com>
1617
1618 Improve robustness when handling LVM.
1619
1620 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 1621 (and leave `*p' unmodified).
7ceeee39 1622 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
1623 through it.
1624 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
1625 iterating through it.
1626 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
1627 through it.
fe6b695a 1628 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 1629 when due) on each grub_lvm_getvalue() or grub_strstr() call.
1630 Don't assume `vg->pvs != NULL' when iterating through it.
1631
58cd3d85 16322008-04-13 Robert Millan <rmh@aybabtu.com>
1633
1634 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
1635 * genmk.rb (partmap): New variable.
1636 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
1637 (#{partmap}): New target rule.
1638 * genpartmaplist.sh: New file.
1639 * Makefile.in (pkglib_DATA): Add partmap.lst.
1640 (partmap.lst): New target rule.
1641 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
1642 modules (including all partition maps), instead of preloading them.
1643
78b51059 16442007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
1645
1646 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
1647 `linux-boot-prober' (if installed) to detect other operating
1648 systems which are installed on the computer and add them to
1649 the boot menu.
1650 * conf/common.rmk: Build and install 30_os-prober.
1651
a91627b4 16522008-04-12 Robert Millan <rmh@aybabtu.com>
1653
1654 * kern/powerpc/ieee1275/init.c: Move from here ...
1655 * kern/ieee1275/init.c: ... to here. Update all users.
1656
1657 * kern/powerpc/ieee1275/cmain.c: Move from here ...
1658 * kern/ieee1275/cmain.c: ... to here. Update all users.
1659
1660 * kern/powerpc/ieee1275/openfw.c: Move from here ...
1661 * kern/ieee1275/openfw.c: ... to here. Update all users.
1662
1663 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
1664 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
1665
322562ea 16662008-04-10 Pavel Roskin <proski@gnu.org>
1667
1668 * configure.ac: Always use "_cv_" in cache variables for
1669 compatibility with Autoconf 2.62.
1670
a02a73c5 16712008-04-07 Robert Millan <rmh@aybabtu.com>
1672
1673 Revert grub/machine/init.h addition by Pavel (since it breaks on
1674 i386-ieee1275 and others):
1675 * util/i386/pc/misc.c: Remove grub/machine/init.h.
1676 * util/powerpc/ieee1275/misc.c: Likewise.
1677
25c024b1 16782008-04-07 Robert Millan <rmh@aybabtu.com>
1679
1680 * util/grub-probe.c (probe): Improve error message.
1681
3cbd2f98 16822008-04-07 Robert Millan <rmh@aybabtu.com>
1683
1684 * util/biosdisk.c (read_device_map): Skip devices that don't exist
1685 (this prevents the presence of a bogus entry from ruining the whole
1686 thing).
1687
87a297bf 16882008-04-06 Pavel Roskin <proski@gnu.org>
1689
36747a62 1690 * util/biosdisk.c: Include grub/util/biosdisk.h.
1691 * util/grub-fstest.c (execute_command): Make static.
1692 * util/grub-mkdevicemap.c (check_device): Likewise.
1693 * util/i386/pc/misc.c: Include grub/machine/init.h.
1694 * util/powerpc/ieee1275/misc.c: Likewise.
1695 * util/lvm.c: Include grub/util/lvm.h.
1696 * util/misc.c: Include grub/kernel.h, grub/misc.h and
1697 grub/cache.h.
1698 * util/raid.c: Include grub/util/raid.h.
1699 (grub_util_getdiskname): Make static.
1700
87a297bf 1701 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
1702 grub_hostfs_fini(), as they are called from grub_init_all() and
1703 grub_fini_all() respectively. This fixes an infinite loop in
1704 grub-fstest due to double registration of hostfs.
1705 Reported by Christian Franke <Christian.Franke@t-online.de>
1706
f6ce7629 17072008-04-05 Pavel Roskin <proski@gnu.org>
1708
1709 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
1710 all 8 functions. Otherwise, probe function 0 only.
1711
070e49e4 17122008-04-04 Pavel Roskin <proski@gnu.org>
1713
8b088a4c 1714 * commands/lspci.c (grub_lspci_iter): Print the bus number
1715 correctly.
1716
4f657021 1717 * commands/lspci.c (grub_pci_classes): Fix typos.
1718 (grub_lspci_iter): Don't print func twice. Print vendor ID
1719 before device ID, as it's normally done.
1720
070e49e4 1721 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
1722 Fix signedness warnings.
1723 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
1724 Likewise.
1725 * util/ieee1275/get_disk_name.c: Include config.h so that
1726 _GNU_SOURCE is defined and getline() is declared. Mark an
1727 unused argument as such. Fix a signedness warning.
1728
ba7328dc 17292008-04-02 Pavel Roskin <proski@gnu.org>
1730
26887f22 1731 * genkernsyms.sh.in: Use more robust assignments for CC and
1732 srcdir. Quote srcdir.
1733 * gensymlist.sh.in: Likewise. Assert at the compile time that
1734 the symbol table is not empty.
1735
ba7328dc 1736 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
1737 * fs/cpio.c (grub_cpio_read): Likewise.
1738
0f582c6b 17392008-04-01 Pavel Roskin <proski@gnu.org>
1740
4b6e1995 1741 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
1742 * disk/host.c (grub_host_open): Likewise.
1743 * disk/loopback.c (grub_loopback_open): Likewise.
1744 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
1745 disk->id as in disk/host.c, not a multi-character constant.
1746
828a2768 1747 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
1748 later is obsolete, potentially dangerous and sets a bad example.
1749 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
1750 * util/misc.c (grub_util_get_image_size): Likewise.
1751
2bb4fb47 1752 * disk/loopback.c (options): Improve help for "--partitions".
1753
0f582c6b 1754 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
1755 options to align them with the short options, e.g. "echo -e".
1756
a33224e0 17572008-03-31 Bean <bean123ch@gmail.com>
1758
1759 * video/reader/png.c (grub_png_data): New member is_16bit and
1760 image_data.
1761 (grub_png_decode_image_header): Detect 16 bit png image.
1762 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
1763 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
1764 (grub_video_reader_png): Release memory occupied by image_data.
1765
1766 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
1767 4096 bytes.
1768 (grub_nfs_mount): Skip the test for sector per cluster.
1769
1770 * include/grub/ntfs.h (MAX_SPC): Removed.
1771
86cb4f54 17722008-03-31 Bean <bean123ch@gmail.com>
1773
1774 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
1775 (grub_probe_SOURCES): Add fs/afs.c.
1776 (grub_fstest_SOURCES): Likewise.
1777 (afs_mod_SOURCES): New variable.
1778 (afs_mod_CFLAGS): Likewise.
1779 (afs_mod_LDFLAGS): Likewise.
1780
1781 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
1782 (grub_emu_SOURCES): Likewise.
1783
1784 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1785
1786 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1787
1788 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1789
1790 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1791
1792 * fs/afs.c: New file.
1793
17c74c21 17942008-03-30 Pavel Roskin <proski@gnu.org>
1795
4cb68e89 1796 * disk/host.c: Include grub/misc.h to fix a warning.
1797 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
1798 warnings about implicit declarations.
1799
8790bb04 1800 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
1801 variable.
1802 * include/grub/i386/loader.h: Change declaration of
1803 grub_linux_boot() to match what grub_loader_set() expects.
1804 * util/getroot.c (grub_guess_root_device): Return const char* to
1805 fix a warning.
1806 * util/grub-probe.c (probe): Fix a warning about uninitialized
1807 abstraction_name variable.
1808 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
1809 second argument as unused to fix a warning.
1810
9a3f3296 1811 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
1812 missing grub_error() call.
1813
0ecef90d 1814 * util/update-grub_lib.in: Define datarootdir, since Autoconf
1815 2.60 and newer uses it to define datadir.
1816
0bf6d401 1817 * commands/sleep.c: Fix warning about implicit declaration.
1818 * disk/memdisk.c: Likewise.
1819 * loader/aout.c: Likewise.
1820 * loader/i386/bsd_normal.c: Likewise.
1821 * util/grub-probe.c: Likewise.
1822
7cdacf97 1823 * commands/i386/cpuid.c (has_longmode): Make static.
1824 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
1825 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
1826
17c74c21 1827 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
1828 GDT. This is more robust, as %ds can change.
1829 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
1830 calling real_to_prot().
1831 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
1832
80a3e68b 18332008-03-28 Pavel Roskin <proski@gnu.org>
1834
1835 * kern/i386/pc/startup.S: Assert that uncompressed functions
1836 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
1837 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
1838 code, as they push parts of the code (error handlers) beyond
1839 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
1840 code as correctness and size.
1841
77bcd272 18422008-03-28 Pavel Roskin <proski@gnu.org>
1843
1844 * kern/i386/pc/startup.S
1845 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
1846 data block address to the real mode, keep offset minimal. This
1847 works around a bug in AWARD BIOS on old Athlon systems, which
1848 makes CD detection hang.
1849
c5dfd43b 18502008-03-26 Pavel Roskin <proski@gnu.org>
1851
1852 * normal/color.c (grub_parse_color_name_pair): Make `name' a
1853 const.
1854 * include/grub/normal.h: Add grub_parse_color_name_pair()
1855 declaration.
1856
bf962df2 18572008-03-24 Bean <bean123ch@gmail.com>
1858
1859 * disk/i386/pc/biosdisk.c (cd_start): Removed.
1860 (cd_count): Removed.
1861 (cd_drive): New variable.
1862 (grub_biosdisk_get_drive): Don't check for (cdN) device.
1863 (grub_biosdisk_call_hook): Likewise.
1864 (grub_biosdisk_iterate): Change cdrom detection method.
1865 (grub_biosdisk_open): Replace cd_start with cd_drive.
1866 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
1867 detect cdrom device.
1868
1869 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
1870 Removed.
1871 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
1872 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
1873 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
1874 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
1875 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
1876 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
1877 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
1878 (grub_biosdisk_cdrp): New structure.
1879 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
1880
1881 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
1882
1883 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
1884 device.
1885
1886 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
1887 New function.
1888
68e7fc7a 18892008-03-20 Robert Millan <rmh@aybabtu.com>
1890
1891 Remove 2 TiB limit in ata.mod.
1892 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
1893 (grub_ata_dumpinfo): Print sector count with 0x%llx.
1894 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
1895 grub_uint64_t instead of grub_uint32_t.
1896
38ad2cf5 18972008-03-05 Bean <bean123ch@gmail.com>
1898
1899 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
1900 (grub_multiboot): Set boot device.
1901
1902 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
1903
2b89344e 19042008-03-02 Bean <bean123ch@gmail.com>
1905
1906 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
1907 symlink_buffer.
1908
87a95d1f 19092008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
1910
1911 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
1912 texinfo.tex.
1913
1914 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
1915 modified.
1916
1917 * docs/fdl.texi: New file.
f19dbdb7 1918
87a95d1f 1919 * docs/mdate-sh: New file. Copied from gnulib.
1920 * docs/texinfo.tex: Likewise.
1921
1922 * config.guess: Updated from gnulib.
1923 * install-sh: Likewise.
1924
7dc15d8e 19252008-02-28 Robert Millan <rmh@aybabtu.com>
1926
1927 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
1928 (aout_mod_SOURCES): New variable.
1929 (aout_mod_CFLAGS): Likewise.
1930 (aout_mod_LDFLAGS): Likewise.
1931
1932 * conf/i386-ieee1275.rmk: Likewise.
1933
b00ab696 19342008-02-28 Robert Millan <rmh@aybabtu.com>
1935
1936 * util/update-grub.in: Reorganise terminal validity check. Accept
1937 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
1938 Based on suggestion by Franklin PIAT.
1939
79ca2d78 19402008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
1941
1942 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
1943 function.
1944 * util/getroot.c (grub_util_check_block_device): New function that
1945 returns the given argument if it is a block device and returns NULL else.
1946 * util/grub-probe.c (argument_is_device): New variable.
1947 (probe): Promote device_name from a variable to an argument. Receive
1948 device_name from grub_util_check_block_device() if path is NULL and from
1949 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 1950 (options): Introduce new parameter '-d, --device'.
79ca2d78 1951 (main): Add description of the new parameter to the help screen.
1952 Rename path variable to argument. Set argument_is_device if the '-d'
1953 option is given. Pass argument to probe() depending on
1954 argument_is_device.
1955
0d16e571 19562008-02-24 Bean <bean123ch@gmail.com>
1957
1958 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
1959 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
1960 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
1961 (GRUB_ISO9660_VOLDESC_PART): Likewise.
1962 (GRUB_ISO9660_VOLDESC_END): Likewise.
1963 (grub_iso9660_primary_voldesc): New member escape.
1964 (grub_iso9660_data): New member joliet.
1965 (grub_iso9660_convert_string): New function.
1966 (grub_iso9660_mount): Detect joliet extension.
1967 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
1968 (grub_iso9660_iso9660_label): Likewise.
1969
1970 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
1971 (grub_setup_SOURCES): Add fs/udf.c.
1972 (grub_fstest_SOURCES): Likewise.
1973 (udf_mod_SOURCES): New variable.
1974 (udf_mod_CFLAGS): Likewise.
1975 (udf_mod_LDFLAGS): Likewise.
1976
1977 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
1978 (grub_emu_SOURCES): Likewise.
1979
1980 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1981
1982 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1983
1984 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1985
1986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1987
1988 * fs/udf.c: New file.
1989
8a594a17 19902008-02-24 Robert Millan <rmh@aybabtu.com>
1991
1992 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
1993 (normal/lexer.c_DEPENDENCIES): New variables.
1994 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
1995 (normal/lexer.c_DEPENDENCIES): Likewise.
1996 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
1997 (normal/lexer.c_DEPENDENCIES): Likewise.
1998 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
1999 (normal/lexer.c_DEPENDENCIES): Likewise.
2000 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2001 (normal/lexer.c_DEPENDENCIES): Likewise.
2002 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2003 (normal/lexer.c_DEPENDENCIES): Likewise.
2004
2dc33c03 20052008-02-23 Robert Millan <rmh@aybabtu.com>
2006
2007 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
2008 since they were intended to be in hex. This didn't break previously
2009 because of a bug in gpt_partition_map_iterate() (see below).
2010
2011 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
2012 when checking the validity of GPT header.
2013 Remove `partno', since it always provides the same information as `i'.
2014
f6f4cfb0 20152008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
2016
2017 * include/grub/efi/time.h: Fix a wrong comment.
2018
79ff665f 20192008-02-19 Pavel Roskin <proski@gnu.org>
2020
2021 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
2022 message.
2023
d38e24c2 20242008-02-19 Bean <bean123ch@gmail.com>
2025
2026 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
2027 (aout_mod_SOURCES): New variable.
2028 (aout_mod_CFLAGS): Likewise.
2029 (aout_mod_LDFLAGS): Likewise.
2030 (_bsd_mod_SOURCES): New variable.
2031 (_bsd_mod_CFLAGS): Likewise.
2032 (_bsd_mod_LDFLAGS): Likewise.
2033 (bsd_mod_SOURCES): New variable.
2034 (bsd_mod_CFLAGS): Likewise.
2035 (bsd_mod_LDFLAGS): Likewise.
2036
2037 * include/grub/aout.h: New file.
2038
2039 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
2040
2041 * include/grub/i386/bsd.h: New file.
2042
2043 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
2044 to make it public.
2045
2046 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
2047 function is called, so that it's possible to change it inside the hook.
2048 (grub_elf64_load): Likewise.
2049 (grub_elf_file): Don't close the file if elf header is not found.
2050 (grub_elf_close): Close the file if grub_elf_file fails (The new
2051 grub_elf_file won't close it).
2052 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
2053 (grub_elf64_size): Likewise.
2054
2055 * kern/i386/loader.S (grub_unix_real_boot): New function.
2056
2057 * loader/aout.c: New file.
2058
2059 * loader/i386/bsd.c: New file.
2060
2061 * loader/i386/bsd_normal.c: New file.
2062
2063 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
2064
2065 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 2066 can test other formats.
d38e24c2 2067
b93bdb0f 20682008-02-19 Robert Millan <rmh@aybabtu.com>
2069
2070 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
2071 (grub_gpt_partition_type_empty): Redefine with macro from
2072 `<grub/gpt_partition.h>'.
2073 (gpt_partition_map_iterate): Adjust partition type comparison.
2074
2075 Export `entry' as partmap-specific `part.data' struct.
2076 (grub_gpt_header, grub_gpt_partentry): Move from here ...
2077
2078 * include/grub/gpt_partition.h (grub_gpt_header)
2079 (grub_gpt_partentry): ... to here (new file).
2080
2081 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
2082
2083 (grub_gpt_partition_type_bios_boot): New const variable, defined
2084 with macro from `<grub/gpt_partition.h>'.
2085
2086 (setup): Replace `first_start' with `embed_region', which keeps
2087 track of the embed region (and is partmap-agnostic).
2088
2089 Replace find_first_partition_start() with find_usable_region(),
2090 which finds a usable region for embedding using partmap-specific
2091 knowledge (supports PC/MSDOS and GPT).
2092
2093 Fix all assumptions that the embed region start at sector 1, using
2094 `embed_region.start' from now on. Similarly, use `embed_region.end'
2095 rather than `first_start' to calculate available size.
2096
2097 In grub_util_info() message, replace "into after the MBR" with an
2098 indication of the specific sector our embed region starts at.
2099
66cb40f6 21002008-02-19 Robert Millan <rmh@aybabtu.com>
2101
2102 * DISTLIST: Replace `commands/ieee1275/halt.c' and
2103 `commands/ieee1275/reboot.c' with `commands/halt.c' and
2104 `commands/reboot.c'.
2105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2106 (halt_mod_SOURCES): Likewise.
2107 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2108 (halt_mod_SOURCES): Likewise.
2109
b7202015 21102008-02-17 Christian Franke <franke@computer.org>
2111
2112 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
2113
32b0fc49 21142008-02-17 Robert Millan <rmh@aybabtu.com>
2115
2116 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2117 set `first_start' to 0 for non-PC/MSDOS partition maps.
2118
aca63502 21192008-02-16 Robert Millan <rmh@aybabtu.com>
2120
2121 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2122 do not assume partition map is PC/MSDOS before performing checks that
2123 are specific to that layout.
2124
0de8be86 21252008-02-13 Robert Millan <rmh@aybabtu.com>
2126
2127 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2128 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2129 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2130
c3db8364 21312008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
2132
2133 * configure.ac: Only a cosmetic change on the handling of
2134 -fno-stack-protector.
2135
f714229e 21362008-02-12 Alexandre Boeglin <alex@boeglin.org>
2137
c3db8364 2138 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2139 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2140 reboot.c.
f714229e 2141 (grub_install_SOURCES): Add halt.mod and reboot.mod.
2142 (halt_mod_SOURCES): New variable.
2143 (halt_mod_CFLAGS): Likewise.
2144 (halt_mod_LDFLAGS): Likewise.
2145 (reboot_mod_SOURCES): Likewise.
2146 (reboot_mod_CFLAGS): Likewise.
2147 (reboot_mod_LDFLAGS): Likewise.
2148
c3db8364 2149 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2150 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2151 reboot.c.
f714229e 2152 (halt_mod_SOURCES): Likewise.
2153 (reboot_mod_SOURCES): Likewise.
2154
c3db8364 2155 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2156 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 2157 (reboot_mod_SOURCES): Likewise.
2158
2159 * commands/i386/pc/reboot.c: merge this file ...
2160
2161 * commands/ieee1275/reboot.c: ... and this file ...
2162
2163 * commands/reboot.c: ... to this file.
c3db8364 2164 Add some precompiler directive to include the correct header for
2165 each machine.
f714229e 2166
2167 * commands/ieee1275/halt.c: move this file ...
2168
2169 * commands/halt.c: ... to here.
c3db8364 2170 Add some precompiler directive to include the correct header for
2171 each machine.
f714229e 2172
2173 * include/grub/efi/efi.h (grub_reboot): New function declaration.
2174 (grub_halt): Likewise.
2175
2176 * kern/efi/efi.c (grub_reboot): New function.
2177 (grub_halt): Likewise.
2178
c74493e0 21792008-02-12 Robert Millan <rmh@aybabtu.com>
2180
2181 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2182 /dev (like it is done for /dev/mapper). This doesn't provide support
2183 for EVMS, but at least it is now easy to identify the problem when it
2184 arises.
2185
d0db4b04 21862008-02-11 Robert Millan <rmh@aybabtu.com>
2187
2188 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2189 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2190 comparing it with -1, not 0.
2191
bf748642 21922008-02-10 Robert Millan <rmh@aybabtu.com>
2193
2194 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2195 `disk/lvm.c'.
2196 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2197 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2198
2199 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2200 `disk/lvm.c' to the end of the list.
2201 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2202 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2203
b5db202a 22042008-02-10 Robert Millan <rmh@aybabtu.com>
2205
2206 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
2207 grub_print_error() instead. This will let user know why we're entering
2208 rescue mode.
2209 Based on suggestions from Sam Morris.
2210
83abee31 22112008-02-10 Alexandre Boeglin <alex@boeglin.org>
2212
2213 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2214 on remaining N args, instead of "--" arg N times.
2215
78d5a08b 22162008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
2217
2218 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2219 (fill_with_default_glyph): Changed to use unknown_glyph for fill
2220 pattern for unknown glyphs.
2221
68807e5f 22222008-02-09 Robert Millan <rmh@aybabtu.com>
2223
2224 * configure.ac: Probe for `help2man'.
2225 * Makefile.in (builddir): New variable.
2226 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
2227 or otherwise add a few flags/options to it.
2228 (install-local): For every executable utility or script that is
2229 installed, invoke $(HELP2MAN) to install a manpage based on --help
2230 output.
2231
2232 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2233 that it doesn't prevent --help from working in build tree.
2234
2235 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2236 with `bug-grub@gnu.org'.
2237 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2238 * util/update-grub.in (usage): New function.
2239 Implement proper argument check, with support for --help and --version
2240 (as well as existing -y).
2241
22422008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 2243
2244 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2245 avoid overwriting previous output.
2246 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2247
c1962162 22482008-02-09 Robert Millan <rmh@aybabtu.com>
2249
2250 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2251 drawing the menu.
2252
3dac2e3f 22532008-02-09 Robert Millan <rmh@aybabtu.com>
2254
2255 * commands/sleep.c: New file.
2256 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2257 (sleep_mod_SOURCES): New variable.
2258 (sleep_mod_CFLAGS): Likewise.
2259 (sleep_mod_LDFLAGS): Likewise.
2260
7a634e08 22612008-02-09 Robert Millan <rmh@aybabtu.com>
2262
2263 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2264 situations in which we can deduce the RAID size and the superblock
2265 doesn't match it.
2266
b92f0c18 22672008-02-09 Robert Millan <rmh@aybabtu.com>
2268
2269 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
2270 and return a grub_diskmemberlist_t composed of LVM physical volumes.
2271 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2272
2273 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
2274 and return a grub_diskmemberlist_t composed of physical array members.
2275 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2276
2277 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2278 prototype.
2279 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2280 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2281 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2282
2283 * util/grub-probe.c (probe): Move partmap probing code from here ...
2284 (probe_partmap): ... to here.
2285 (probe): Use probe_partmap() once for the disk we're probing, and
2286 additionally, when such disk contains a memberlist() struct member,
2287 once for each disk that is contained in the structure returned by
2288 memberlist().
2289
91a4bf68 22902008-02-09 Robert Millan <rmh@aybabtu.com>
2291
2292 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2293 environment variable to 'all' in order to obtain debug output from
2294 non-util/ code.
2295 * util/i386/pc/grub-setup.c (main): Likewise.
2296
a96f9caa 22972008-02-08 Robert Millan <rmh@aybabtu.com>
2298
2299 * disk/raid.c (grub_raid_scan_device): Check for
2300 `array->device[sb.this_disk.number]' rather than for
2301 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 2302 guaranteed to be accessible.
a96f9caa 2303
b37a9222 23042008-02-08 Robert Millan <rmh@aybabtu.com>
2305
2306 * disk/raid.c: Update copyright.
2307 * fs/cpio.c: Likewise.
2308 * include/grub/raid.h: Likewise.
2309 * loader/i386/pc/multiboot.c: Likewise.
2310 * util/hostfs.c: Likewise.
2311
5626aee1 23122008-02-08 Robert Millan <rmh@aybabtu.com>
2313
2314 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
2315 to a grub_disk_t array.
2316 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
2317 `device[x]'.
2318 (grub_raid_scan_device): Replace `device[x].name' accesses with
2319 `device[x]->name'. Simplify initialization of `array->device[x]'.
2320
554f0187 23212008-02-08 Robert Millan <rmh@aybabtu.com>
2322
2323 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
2324 grub_dprintf() calls.
2325 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
2326 error message.
2327
1ec8425d 23282008-02-07 Christian Franke <franke@computer.org>
2329
2330 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
2331 instead of fseek and ftell to support large files.
2332 (grub_hostfs_read): Likewise.
2333
f2156fda 23342008-02-07 Robert Millan <rmh@aybabtu.com>
2335
2336 Patch from Jeroen Dekkers.
2337 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 2338 failure, since successfully reading all array members might not be
f2156fda 2339 required.
2340
9216e0e7 23412008-02-06 Robert Millan <rmh@aybabtu.com>
2342
2343 * util/grub-probe.c (probe): Simplify partmap probing (with the
2344 assumption that the first word up to the underscore equals to
2345 the module name).
2346
b0dfd29a 23472008-02-06 Christian Franke <franke@computer.org>
2348
2349 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
2350 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
2351 last block of a cpio or tar stream.
2352 Check for "TRAILER!!!" instead of any empty data
2353 block to detect last block of a cpio stream.
2354 (grub_cpio_dir): Fix constness of variable np.
2355 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
2356 cpio or tar trailer is detected. This fixes a crash
2357 on open of a non existing file.
2358
c32865bf 23592008-02-05 Bean <bean123ch@gmail.com>
2360
2361 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
2362 address of entry.
2363 (grub_multiboot_load_elf64): Likewise.
2364 (grub_multiboot): Initialize mbi structure.
2365
2366 * util/grub-fstest.c: Don't include unused header file script.h.
2367
fe6b695a 2368 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 2369 of file.
2370 (grub_fstest_SOURCES): Likewise.
2371
409480b7 23722008-02-05 Robert Millan <rmh@aybabtu.com>
2373
2374 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
2375 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
2376 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
2377 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
2378
2379 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
2380 (translation_table): Replace hardcoded values with macros
2381 provided by `<grub/term.h>'.
2382
2383 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
2384 (keyboard_map): Correct/add a few values, with macros provided
2385 by `<grub/term.h>'.
2386 (keyboard_map_shift): Zero values that don't differ from their
2387 `keyboard_map' equivalents.
2388 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
2389 Discard the second scan code that is always sent by Caps lock.
2390 Only use `keyboard_map_shift' when it provides a non-zero value,
2391 otherwise fallback to `keyboard_map'.
2392
99fadbaa 23932008-02-04 Bean <bean123ch@gmail.com>
2394
2395 * Makefile.in (enable_grub_fstest): New variable.
2396
2397 * conf/common.rmk (grub_fstest_init.lst): New rule.
2398 (grub_fstest_init.h): Likewise.
2399 (grub_fstest_init.c): Likewise.
2400 (util/grub-fstest.c_DEPENDENCIES): New variable.
2401 (grub_fstest_SOURCES): Likewise.
2402
2403 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
2404
2405 * util/grub-fstest.c: New file.
2406
bf567c50 24072008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2408
2409 Make grub-setup handle a separate root device.
f19dbdb7 2410
bf567c50 2411 * util/i386/pc/grub-setup.c (setup): Always open the root device,
2412 so that the root device can be compared with the destination
2413 device.
2414 When embedding the core image, if the root and destination devices
2415 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
2416 0xFF.
2417 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 2418
9be6b98b 24192008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2420
2421 Add support for having a grub directory in a different drive. This
2422 is still only the data handling part.
f19dbdb7 2423
9be6b98b 2424 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
2425 (codestart): Save %dh in GRUB_ROOT_DRIVE.
2426 (grub_root_drive): New variable.
2427
2428 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
2429 instead of GRUB_BOOT_DRIVE to construct a device name. Set
2430 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
2431 as it was.
2432
2433 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
2434
2435 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
2436 macro.
2437 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
2438
2439 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
2440 is bogus, because PXE booting does not specify any drive
2441 correctly.
2442
2443 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
2444 am not sure if this is really correct.
2445
2446 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
2447 is always identical to the boot drive when booting from a CD.
2448
2449 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
2450 longer.
2451 (root_drive): New variable.
2452 (real_start): Unconditionally set %dh to ROOT_DRIVE.
2453 (setup_sectors): Push %dx right after popping it, because %dh will
2454 be modified later.
2455 (copy_buffer): Restore %dx.
2456
e0ca0677 24572008-02-03 Robert Millan <rmh@aybabtu.com>
2458
2459 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
2460 use `cdboot.img' for cdrom images.
2461
3b3f6629 24622008-02-03 Robert Millan <rmh@aybabtu.com>
2463
2464 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
2465 only setup gfxterm when `font' command has succeeded.
2466
d42b3672 24672008-02-03 Robert Millan <rmh@aybabtu.com>
2468
2469 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
2470 (grub_rescue_cmd_multiboot_loader)
2471 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
2472
fa370ea6 24732008-02-03 Pavel Roskin <proski@gnu.org>
2474
e0c5dacb 2475 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 2476 %edx and %esi from stack only after grub_gate_a20() is called.
2477 grub_gate_a20() clobbers %edx.
2478
f2a76e1d 24792008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2480
2481 * configure.ac (AC_INIT): Bumped to 1.96.
2482
2483 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
2484 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
2485 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
2486 video/readers/png.c.
2487
90fd32d1 24882008-02-03 Bean <bean123ch@gmail.com>
9be665dd 2489
2490 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
2491 (cdboot_img_SOURCES): New variable.
2492 (cdboot_img_ASFLAGS): New variable.
2493 (cdboot_img_LDFLAGS): New variable.
2494
2495 * boot/i386/pc/cdboot.S: New file.
2496
2497 * disk/i386/pc/biosdisk.c (cd_start): New variable.
2498 (cd_count): Likewise.
2499 (grub_biosdisk_get_drive): Add support for cd device.
2500 (grub_biosdisk_call_hook): Likewise.
2501 (grub_biosdisk_iterate): Likewise.
2502 (grub_biosdisk_open): Likewise.
2503 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
2504 (grub_biosdisk_rw): Support reading from cd device.
2505 (GRUB_MOD_INIT): Iterate cd devices.
2506
2507 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
2508 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
2509 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
2510
2511 * kern/i386/pc/init.c (make_install_device): Check for cd device.
2512
4020aa53 25132008-02-02 Robert Millan <rmh@aybabtu.com>
2514
2515 * commands/read.c: New file.
2516 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
2517 (read_mod_SOURCES): New variable.
2518 (read_mod_CFLAGS): Likewise.
2519 (read_mod_LDFLAGS): Likewise.
2520
e03a1132 25212008-02-02 Robert Millan <rmh@aybabtu.com>
2522
2523 * normal/main.c (grub_normal_execute): Check for `menu->size' when
2524 determining whether menu has to be displayed.
2525
58c69220 25262008-02-02 Marco Gerards <marco@gnu.org>
2527
2528 * bus/pci.c: New file.
2529
2530 * include/grub/pci.h: Likewise.
2531
2532 * include/grub/i386/pc/pci.h: Likewise.
2533
2534 * commands/lspci.c: Likewise.
2535
2536 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
2537 `lspci.mod'.
2538 (pci_mod_SOURCES): New variable.
2539 (pci_mod_CFLAGS): Likewise.
2540 (pci_mod_LDFLAGS): Likewise.
2541 (lspci_mod_SOURCES): Likewise.
2542 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 2543 (lspci_mod_LDFLAGS): Likewise.
58c69220 2544
c004e1b4 25452008-02-02 Bean <bean123ch@gmail.com>
2546
2547 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
2548 (grub_ufs_get_file_block): Fix indirect block calculation problem.
2549
2550 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
2551 (grub_xfs_btree_node): New structure.
2552 (grub_xfs_btree_root): New structure.
2553 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
2554 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
2555 (GRUB_XFS_EXTENT_BLOCK): Likewise.
2556 (GRUB_XFS_EXTENT_SIZE): Likewise.
2557 (grub_xfs_read_block): Support btree format type.
2558 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
2559 Use directory block as basic unit.
2560
2561 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
2562
2563 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
2564 __attribute__ ((__regparm__ (1))).
2565
f95562bf 25662008-02-01 Robert Millan <rmh@aybabtu.com>
2567
2568 Correct a mistake in previous commit.
2569
2570 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
2571 top.
2572 (normal/command.c_DEPENDENCIES): New variable.
2573
7d31f41f 25742008-02-01 Robert Millan <rmh@aybabtu.com>
2575
2576 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
2577 top.
2578 (normal/command.c_DEPENDENCIES): New variable.
2579 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
2580 * conf/i386-ieee1275.rmk: Likewise.
2581 * conf/i386-linuxbios.rmk: Likewise.
2582 * conf/i386-pc.rmk: Likewise.
2583 * conf/sparc64-ieee1275.rmk: Likewise.
2584 * conf/powerpc-ieee1275.rmk: Likewise.
2585 (grub_emu_SOURCES): Add `fs/fshelp.c'.
2586
2587 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2588
60b6be74 25892008-02-01 Robert Millan <rmh@aybabtu.com>
2590
2591 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
2592 call at beginning of function.
2593
078522ab 25942008-01-31 Pavel Roskin <proski@gnu.org>
2595
2596 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 2597 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
2598 (grub_mkrescue_SOURCES): Likewise.
078522ab 2599 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
2600
ccaa8a5f 26012008-01-30 Robert Millan <rmh@aybabtu.com>
2602
2603 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
2604 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
2605 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
2606 (grub_probe_SOURCES): ... to here.
2607
2608 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
2609 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
2610 * conf/i386-ieee1275.rmk: Likewise.
2611 * conf/i386-linuxbios.rmk: Likewise.
2612 * conf/powerpc-ieee1275.rmk: Likewise.
2613
ae5a9cd7 26142008-01-30 Tristan Gingold <gingold@free.fr>
2615
2616 * kern/rescue.c: Silently accept empty lines.
2617
70bc2ef2 26182008-01-29 Bean <bean123ch@gmail.com>
2619
2620 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
2621 (real_code_2): Code cleanup and change comment style.
2622 (move_memory): Avoid using 32-bit address mode.
2623
6a4d50ea 26242008-01-29 Bean <bean123ch@gmail.com>
2625
2626 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
2627 (png_mod_SOURCES): New variable.
2628 (png_mod_CFLAGS): Likewise.
2629 (png_mod_LDFLAGS): Likewise.
2630
2631 * video/readers/png.c: New file.
2632
11cc30ac 26332008-01-28 Robert Millan <rmh@aybabtu.com>
2634
2635 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
2636 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
2637 `ifndef GRUB_MOD_GAP' hack.
2638 * util/elf/grub-mkimage.c (add_segments): Likewise.
2639
3abc589f 26402008-01-27 Robert Millan <rmh@aybabtu.com>
2641
2642 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
2643 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 2644 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 2645
e1907778 26462008-01-27 Robert Millan <rmh@aybabtu.com>
2647
2648 Get grub-emu to build again (including parallel builds).
2649
2650 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
2651 Split into ...
2652 (util/grub-emu.c_DEPENDENCIES): ... this, ...
2653 (normal/execute.c_DEPENDENCIES): ... this, ...
2654 (grub-emu_DEPENDENCIES): ... and this.
2655
2656 * conf/i386-efi.rmk: Likewise.
2657 * conf/i386-linuxbios.rmk: Likewise.
2658 * conf/i386-ieee1275.rmk: Likewise.
2659 * conf/powerpc-ieee1275.rmk: Likewise.
2660 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
2661
2216b101 26622008-01-27 Robert Millan <rmh@aybabtu.com>
2663
2664 * NEWS: Add a few items.
2665
f75172d9 26662008-01-27 Robert Millan <rmh@aybabtu.com>
2667
2668 Fix parallel builds with grub-emu. Based on earlier commit for
2669 grub-probe and grub-setup.
2670
2671 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2672 (util/grub-emu.c_DEPENDENCIES): ... this.
2673 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2674 (util/grub-emu.c_DEPENDENCIES): ... this.
2675 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2676 (util/grub-emu.c_DEPENDENCIES): ... this.
2677 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2678 (util/grub-emu.c_DEPENDENCIES): ... this.
2679 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2680 (util/grub-emu.c_DEPENDENCIES): ... this.
2681
3f51de77 26822008-01-27 Pavel Roskin <proski@gnu.org>
2683
2684 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
2685 to create a gap between _end and the modules added to the image
2686 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
2687 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
2688 * util/elf/grub-mkimage.c (add_segments): Likewise.
2689
2033f53e 26902008-01-26 Pavel Roskin <proski@gnu.org>
2691
2692 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
2693 just return an error.
2694
22da1f6f 26952008-01-26 Bean <bean123ch@gmail.com>
2696
2697 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
2698 (grub_reiserfs_get_item): Save offset of the next item.
2699 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
2700
2a9525e6 27012008-01-25 Robert Millan <rmh@aybabtu.com>
2702
2703 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
2704 make all filesystem sources appear together (possibly fixing omissions
2705 while at it).
2706 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2707 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2708 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2709 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2710
2711 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
2712 add `kern/file.c'.
2713 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
2714 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2715 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
2716 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2717
2718 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
2719 (probe): Add a sanity check to make sure of our ability to read
2720 requested files when probing for filesystem type.
2721
2722 * genmk.rb: Update copyright year (2007).
2723
2724 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
2725 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
2726 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
2727 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
2728 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
2729 : Remove function prototypes.
2730
b95f71b5 27312008-01-25 Robert Millan <rmh@aybabtu.com>
2732
2733 Revert my previous commits (based on wrong assumption of how grub_errno
2734 works).
2735
fe6b695a 2736 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 2737 * kern/file.c (grub_file_open): Likewise.
2738
d08bbb49 27392008-01-24 Pavel Roskin <proski@gnu.org>
2740
2741 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
2742 that hang if GRUB tries to setup colors.
2743 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
2744 colors for firmwares that don't support it.
2745 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
2746 Recognize Open Hack'Ware, set flags to work around its
2747 limitations.
2748
605e36ed 27492008-01-24 Robert Millan <rmh@aybabtu.com>
2750
2751 * kern/file.c (grub_file_open): Do not account previous failures of
2752 unrelated functions when grub_errno is checked for.
2753 Reported by Oleg Strikov.
2754
bac332a1 27552008-01-24 Bean <bean123ch@gmail.com>
2756
2757 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
2758 (grub_ufs_sblock): New member volume name.
2759 (grub_ufs_find_file): Fix string copy bug.
2760 (grub_ufs_label): Implement this function properly.
2761
2762 * fs/hfs.c (grub_hfs_cnid_type): New enum.
2763 (grub_hfs_iterate_records): Use the correct file number for extents
2764 and catalog file. Fix problem in next index calculation.
2765 (grub_hfs_find_node): Replace recursive function call with loop.
2766 (grub_hfs_iterate_dir): Replace recursive function call with loop.
2767
15c80c09 27682008-01-23 Robert Millan <rmh@aybabtu.com>
2769
2770 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
2771 `<grub/symbol.h>' and `<grub/multiboot.h>'.
2772 (grub_multiboot2_real_boot): New function prototype.
2773
2774 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
2775 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
2776
2777 * kern/i386/ieee1275/init.c (grub_os_area_addr)
2778 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
2779
305338fd 27802008-01-23 Robert Millan <rmh@aybabtu.com>
2781
2782 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
2783 #ifdef'ed out grub_printf().
2784
3ea52685 27852008-01-23 Robert Millan <rmh@aybabtu.com>
2786
2787 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
2788 grub_dprintf calls, since they make "debug=all" mode unusable.
2789 (grub_console_checkkey): Likewise.
2790
5882ae4b 27912008-01-23 Robert Millan <rmh@aybabtu.com>
2792
2793 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2794 `term/i386/pc/at_keyboard.c'.
2795 (pkglib_MODULES): Add `serial.mod'.
2796 (serial_mod_SOURCES): New variable.
2797 (serial_mod_CFLAGS): Likewise.
2798 (serial_mod_LDFLAGS): Likewise.
2799
2800 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
2801 `<grub/powerpc/ieee1275/console.h>'.
2802 (grub_keyboard_controller_init): New function prototype.
2803 (grub_console_checkkey): Likewise.
2804 (grub_console_getkey): Likewise.
2805
2806 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
2807 keyboard on i386.
2808
2809 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
2810 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
2811
06ab5303 28122008-01-23 Robert Millan <rmh@aybabtu.com>
2813
2814 * kern/i386/pc/init.c (make_install_device): When memdisk image is
2815 present, "(memdisk)/boot/grub" becomes the default prefix.
2816
2817 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
2818 a memdisk tarball with all the modules. Add --overlay=DIR option that
2819 allows users to overlay additional files into the image.
2820
dbb475a4 28212008-01-23 Robert Millan <rmh@aybabtu.com>
2822
2823 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
2824 and `machine/memory.h'.
2825 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
2826 (_multiboot_mod_SOURCES): New variable.
2827 (_multiboot_mod_CFLAGS): Likewise.
2828 (_multiboot_mod_LDFLAGS): Likewise.
2829 (multiboot_mod_SOURCES): Likewise.
2830 (multiboot_mod_CFLAGS): Likewise.
2831 (multiboot_mod_LDFLAGS): Likewise.
2832
2833 * include/grub/i386/ieee1275/loader.h: New file.
2834
2835 * include/grub/i386/ieee1275/machine.h: Likewise.
2836
2837 * include/grub/i386/ieee1275/memory.h: Likewise.
2838
2839 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
2840 variable declaration.
2841 (grub_os_area_size): Likewise.
2842
2843 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
2844 (grub_lower_mem, grub_upper_mem): New variables.
2845 (grub_stop_floppy): New function (just to make
2846 grub_multiboot2_real_boot() happy).
2847
2848 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
2849 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
2850 (grub_stop): New function.
2851 Include `"../realmode.S"' and `"../loader.S"'.
2852
2853 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
2854 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
2855
2856 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
2857 rely on grub_multiboot2_real_boot() for final boot.
2858
25638629 28592008-01-22 Robert Millan <rmh@aybabtu.com>
2860
2861 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
2862 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
2863 device that doesn't look like an SD card.
2864 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2865 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
2866 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
2867 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
2868 found.
2869
9dad816d 28702008-01-22 Robert Millan <rmh@aybabtu.com>
2871
2872 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
2873 avoid claiming over our own code.
2874
34842f2d 28752008-01-22 Bean <bean123ch@gmail.com>
2876
2877 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
2878 (jpeg_mod_SOURCES): New variable.
2879 (jpeg_mod_CFLAGS): Likewise.
2880 (jpeg_mod_LDFLAGS): Likewise.
2881
2882 * video/readers/jpeg.c : New file.
2883
44023a28 28842008-01-22 Bean <bean123ch@gmail.com>
2885
2886 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
2887 there are no more items.
2888
bc2d8ac6 28892008-01-21 Robert Millan <rmh@aybabtu.com>
2890
2891 * kern/mm.c (grub_mm_init_region): Improve debug message.
2892
261bd4bc 28932008-01-21 Robert Millan <rmh@aybabtu.com>
2894
2895 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
2896 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
2897 address.
2898 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
2899 a C macro.
2900 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
2901 Indicates start of upper memory.
2902 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
2903 (generate_image): Abort when image size is big enough to corrupt
2904 upper memory.
2905
2906 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
2907 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
2908 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2909 instead of hardcoding 0xA0000.
2910 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
2911 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
2912 instead of hardcoding 0xA0000.
2913
f970b55e 29142008-01-21 Robert Millan <rmh@aybabtu.com>
2915
2916 * disk/memdisk.c (memdisk_size): New variable.
2917 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
2918 `memdisk_size'.
2919 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
2920 image to dynamic memory.
2921 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
2922 `memdisk_size'. Free memdisk block.
2923
1a8b0526 29242008-01-21 Robert Millan <rmh@aybabtu.com>
2925
2926 Fix detection of very small filesystems (like tar).
2927
2928 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
2929 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
2930 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
2931 a problem with this disk).
2932
6e9b4aab 29332008-01-21 Robert Millan <rmh@aybabtu.com>
2934
2935 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
2936 on grub_biosdisk_rw_standard() error.
2937
0d8837b2 29382008-01-21 Robert Millan <rmh@aybabtu.com>
2939
2940 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
2941 recent changes.
2942 * kern/elf.c: Likewise.
2943 * kern/ieee1275/ieee1275.c: Likewise.
2944 * kern/powerpc/ieee1275/openfw.c: Likewise.
2945 * term/ieee1275/ofconsole.c: Likewise.
2946
ffd36e34 29472008-01-21 Robert Millan <rmh@aybabtu.com>
2948
2949 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
2950
3f0093d0 2951 * include/grub/kernel.h (grub_arch_memdisk_addr)
2952 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 2953
3f0093d0 2954 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
2955 (grub_arch_memdisk_size): ... to here.
ffd36e34 2956
6c391b21 29572008-01-21 Robert Millan <rmh@aybabtu.com>
2958
2959 Mostly based on bugfix from Bean.
2960
2961 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
2962 attribute with hook() parameter.
2963 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
2964 declaration.
2965 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
2966 attribute with hook() parameter.
2967 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
2968 declaration.
2969
55a581dc 29702008-01-21 Robert Millan <rmh@aybabtu.com>
2971
2972 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
2973 (pkglib_MODULES): Add `memdisk.mod'.
2974 (memdisk_mod_SOURCES): New variable.
2975 (memdisk_mod_CFLAGS): Likewise.
2976 (memdisk_mod_LDFLAGS): Likewise.
2977
2978 * disk/memdisk.c: New file.
2979
2980 * include/grub/disk.h (grub_disk_dev_id): Add
2981 `GRUB_DISK_DEVICE_MEMDISK_ID'.
2982
2983 * include/grub/i386/pc/kernel.h
2984 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
2985 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
2986 (grub_kernel_image_size): New variable declaration.
2987 (grub_total_module_size): Likewise.
2988 (grub_memdisk_image_size): Likewise.
2989
2990 * include/grub/i386/pc/memory.h
2991 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
2992
2993 * include/grub/kernel.h: Include `<grub/symbol.h>'.
2994 (grub_arch_memdisk_addr): New variable declaration.
2995 (grub_arch_memdisk_size): Likewise.
2996
2997 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
2998 (grub_arch_memdisk_size): Likewise.
2999
3000 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
3001 (codestart): Replace hardcoded `0x100000' with
3002 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
3003
3004 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
3005 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
3006 not NULL, append the contents of the file it refers to, at the end of
3007 the compressed kernel image. Initialize `grub_memdisk_image_size'
3008 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
3009 (options): Add "memdisk"|'m' option.
3010 (main): Parse --memdisk|-m option, and pass user-provided path as
3011 parameter to generate_image().
3012
3d7f54c9 30132008-01-20 Robert Millan <rmh@aybabtu.com>
3014
3015 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
3016 grub_dprintf() calls from here ...
3017 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
3018
0bf74728 30192008-01-20 Robert Millan <rmh@aybabtu.com>
3020
3021 Fix detection of "real mode" when /options/real-mode? doesn't exist.
3022
3023 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
3024 declaration.
3025 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
3026 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
3027 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 3028 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 3029 property).
3030 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
3031 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
3032
33bf70a7 30332008-01-19 Robert Millan <rmh@aybabtu.com>
3034
fe6b695a 3035 Get rid of confusing function (superseded by
33bf70a7 3036 `grub_ieee1275_get_integer_property')
3037 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
3038 prototype.
3039 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
3040 function.
3041 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
3042 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 3043 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 3044
e2da7d26 30452008-01-19 Robert Millan <rmh@aybabtu.com>
3046
3047 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
3048 command after "shut-down", since implementations differ on which
3049 the command for halt is.
3050
59f1fd8d 30512008-01-19 Robert Millan <rmh@aybabtu.com>
3052
3053 * include/grub/i386/linuxbios/console.h: Add header protection.
3054 (grub_keyboard_controller_init): New function prototype.
3055 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
3056 (KEYBOARD_COMMAND_READ): Likewise.
3057 (KEYBOARD_COMMAND_WRITE): Likewise.
3058 (KEYBOARD_SCANCODE_SET1): Likewise.
3059 (grub_keyboard_controller_write): New function.
3060 (grub_keyboard_controller_read): Likewise.
3061 (grub_keyboard_controller_init): Likewise.
3062
3063 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
3064 (grub_console_init): On coreboot/LinuxBIOS, call
3065 grub_keyboard_controller_init().
3066
5f5a7c15 30672008-01-19 Robert Millan <rmh@aybabtu.com>
3068
3069 PowerPC changes provided by Pavel Roskin.
3070
3071 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
3072 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
3073 don't rely on cmain() doing it.
3074 * kern/i386/ieee1275/startup.S (_start): Store %eax in
3075 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
3076
1210e168 30772008-01-16 Robert Millan <rmh@aybabtu.com>
3078
3079 * include/grub/i386/linuxbios/memory.h
3080 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
3081 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
3082 receive `table_header' as argument. Instead, probe for it in the
3083 known memory ranges where it can be present.
3084 (grub_available_iterate): Do not pass a fixed `table_header' address
3085 to grub_linuxbios_table_iterate().
3086
3d04eab8 30872008-01-15 Robert Millan <rmh@aybabtu.com>
3088
3089 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
3090 * conf/i386-ieee1275.rmk: New file.
3091 * include/grub/i386/ieee1275/console.h: Likewise.
3092 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
3093 * include/grub/i386/ieee1275/kernel.h: Likewise.
3094 * include/grub/i386/ieee1275/time.h: Likewise.
3095 * kern/i386/ieee1275/init.c: Likewise.
3096 * kern/i386/ieee1275/startup.S: Likewise.
3097
d1bc1b73 30982008-01-15 Robert Millan <rmh@aybabtu.com>
3099
3100 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
3101 when pointers are 32-bit (but still do set it to one when they are
3102 64-bit).
3103
66a65807 31042008-01-15 Robert Millan <rmh@aybabtu.com>
3105
3106 * include/grub/ieee1275/ieee1275.h
3107 (grub_ieee1275_get_integer_property): New function prototype.
3108
3109 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
3110 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 3111 grub_ieee1275_get_property() to handle endianness.
66a65807 3112
3113 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
3114 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 3115 where appropriate.
66a65807 3116 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
3117 (grub_map): Likewise.
3118 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3119
a83ccafd 31202008-01-15 Bean <bean123ch@gmail.com>
3121
3122 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3123 (grub_script_execute_cmdline): Reset grub_errno.
3124
3125 * normal/main.c (read_config_file): Reset grub_errno.
3126
3127 * normal/parse.y (script_init): New.
3128 (script): Move function and menuentry here.
3129 (delimiter): New.
3130 (command): Add delimiter at the end of command.
3131 (commands): Adjust to match the new command.
3132 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 3133 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 3134 (if): Use the new commands.
3135
3136 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3137
df6ecfc6 31382008-01-15 Robert Millan <rmh@aybabtu.com>
3139
3140 * normal/menu.c (run_menu): Move timeout message from here ...
3141 (print_timeout): ... to here.
3142 (run_menu): Use print_timeout() once during initial draw to print
3143 the whole message, and again in every clock tick to update only
3144 the number of seconds.
3145
87ae25eb 31462008-01-15 Robert Millan <rmh@aybabtu.com>
3147
3148 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3149 actual size of `available' from grub_ieee1275_get_property(), and
3150 restrict parsing to that bound.
3151
47bf09a4 31522008-01-15 Christian Franke <franke@computer.org>
3153
3154 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3155 (argp_program_version): Remove variable.
3156 (argp_program_bug_address): Likewise.
3157 (options): Convert from struct argp_option to struct option.
3158 (struct arguments): Remove.
3159 (parse_opt): Remove.
3160 (usage): New function.
3161 (main): Replace struct args members by simple variables.
3162 Replace argp_parse() by getopt_long().
3163 Add switch to evaluate options.
3164 Add missing "(...)" around root_dev in prefix string.
3165
c86f1469 31662008-01-14 Robert Millan <rmh@aybabtu.com>
3167
3168 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3169 for grub_ieee1275_exit(), in order to improve portability.
3170
e622c559 31712008-01-14 Robert Millan <rmh@aybabtu.com>
3172
3173 * util/grub.d/10_linux.in (prefix): Define.
3174 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
3175
44cb1ec8 31762008-01-13 Pavel Roskin <proski@gnu.org>
3177
3178 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3179 grub_errno if no errors have been detected.
3180
1eb8c802 31812008-01-12 Robert Millan <rmh@aybabtu.com>
3182
3183 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3184 (grub_util_get_dev_abstraction): New function prototype.
3185
3186 * util/getroot.c: Include `<grub/util/getroot.h>'
3187 (grub_util_get_grub_dev): Move detection of abstraction type to ...
3188 (grub_util_get_dev_abstraction): ... here (new function).
3189
3190 * util/grub-probe.c: Convert PRINT_* to an enum. Add
3191 `PRINT_ABSTRACTION'.
3192 (probe): Probe for abstraction type when requested.
3193 (main): Understand `--target=abstraction'.
3194
3195 * util/i386/efi/grub-install.in: Add abstraction module to core
3196 image when it is found to be necessary.
3197 * util/i386/pc/grub-install.in: Likewise.
3198 * util/powerpc/ieee1275/grub-install.in: Likewise.
3199
3200 * util/update-grub_lib.in (font_path): Return system path without
3201 converting to GRUB path.
3202 * util/update-grub.in: Convert system path returned by font_path()
3203 to a GRUB path. Use `grub-probe -t abstraction' to determine what
3204 abstraction module is needed for loading fonts (if any). Export
3205 that as `GRUB_PRELOAD_MODULES'.
3206 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3207 insmod commands).
3208
52bd3de9 32092008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
3210
3211 Remove some unused code from reiserfs.
f19dbdb7 3212
52bd3de9 3213 * fs/reiserfs.c (struct grub_reiserfs_key)
3214 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3215 (struct grub_reiserfs_node_body): Removed.
3216 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3217 Likewise.
3218 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3219 Likewise.
3220 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3221 Likewise.
3222 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3223 Likewise.
3224 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3225 Likewise.
3226 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3227 Likewise.
3228 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3229 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3230 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3231
2f80039d 32322008-01-10 Robert Millan <rmh@aybabtu.com>
3233
3234 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3235 Determines if a file is garbage left by packaging systems, etc.
3236 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3237 for processing /etc/grub.d scripts.
3238 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3239 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
3240 as a condition for processing Linux images.
3241
87888032 32422008-01-10 Pavel Roskin <proski@gnu.org>
3243
3244 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
3245 to compile reiserfs.c on PowerPC.
3246
7e54fced 32472008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 3248
3249 * kern/device.c (grub_device_iterate): Do not abort device iteration
3250 when one of the devices cannot be opened.
3251 * kern/disk.c (grub_disk_open): Do not account previous failures of
3252 unrelated functions when grub_errno is checked for.
3253
5aa541e6 32542008-01-08 Robert Millan <rmh@aybabtu.com>
3255
3256 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3257 `! grub_linux_is_bzimage', change order of address comparison to make
3258 it more intuitive, and improve "too big zImage" error message.
3259
7076340d 32602008-01-08 Robert Millan <rmh@aybabtu.com>
3261
3262 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3263 `$(update-grub_DATA)'.
3264 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3265 targets.
3266
9ca70333 32672008-01-07 Robert Millan <rmh@aybabtu.com>
3268
3269 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3270 which instruction is modified by grub-setup during installation
3271 (since it wasn't obvious by only looking at this file).
3272
38ccf575 32732008-01-07 Robert Millan <rmh@aybabtu.com>
3274
3275 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
3276 listing actual TODO items.
3277
f5db4291 32782008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3279
868967cf 3280 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3281 correctly.
3282 (grub_reiserfs_get_key_offset): Likewise.
3283 (grub_reiserfs_set_key_offset): Likewise.
3284 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 3285 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 3286
3287 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3288 better to remove the bitfield version completely.
f19dbdb7 3289
868967cf 32902008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 3291
f5db4291 3292 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3293 allocated from the heap, due to the fshelp implementation.
3294 (grub_reiserfs_dir): Free NODE, due to the same reason.
3295
492e6d9d 32962008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3297
3298 Mostly from Vincent Pelletier:
f19dbdb7 3299
492e6d9d 3300 * fs/reiserfs.c: New file.
f19dbdb7 3301
492e6d9d 3302 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3303 (reiserfs_mod_SOURCES): New variable.
3304 (reiserfs_mod_CFLAGS): Likewise.
3305 (reiserfs_mod_LDFLAGS): Likewise.
3306
3307 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3308 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3309 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3310 normal/color.c.
3311
9ce3e7c1 33122008-01-06 Robert Millan <rmh@aybabtu.com>
3313
3314 * normal/color.c: Remove `<grub/env.h>'.
3315
f3b58148 33162008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
3317
3318 * include/grub/normal.h: Include <grub/env.h>.
3319
7ac3bcfa 33202008-01-05 Robert Millan <rmh@aybabtu.com>
3321
3322 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
3323 usage example with `(hd0,1)'.
fb358190 3324 Reported by Samuel Thibault.
7ac3bcfa 3325
c8ee99d7 33262008-01-05 Robert Millan <rmh@aybabtu.com>
3327
3328 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
3329 (grub_linux_boot_zimage): Rename to ...
3330 (grub_linux_boot): ... this.
3331 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
3332 (grub_linux_boot_zimage): Conditionalize zImage copy.
3333
3334 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
3335 (grub_linux_boot_bzimage): Remove prototype.
3336 (grub_linux_boot_zimage): Rename to ...
3337 (grub_linux_boot): ... this.
3338
3339 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
3340 (grub_linux_boot): Remove function.
3341
0ece25b1 33422008-01-05 Robert Millan <rmh@aybabtu.com>
3343
3344 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
3345 (grub_env_write_color_highlight): Likewise.
3346 (grub_wait_after_message): Likewise.
3347
3348 * normal/color.c: New file.
3349
3350 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3351 (normal_mod_DEPENDENCIES): Likewise.
3352
3353 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3354 (normal_mod_DEPENDENCIES): Likewise.
3355
3356 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3357 (normal_mod_DEPENDENCIES): Likewise.
3358
3359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3360 (normal_mod_DEPENDENCIES): Likewise.
3361
3362 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
3363 for waiting after a message is printed.
3364 * normal/main.c (read_config_file): Likewise.
3365 (grub_normal_init): Register grub_env_write_color_normal() and
3366 grub_env_write_color_highlight() hooks. Mark `color_normal' and
3367 `color_highlight' variables as global.
3368
3369 * normal/menu.c (grub_wait_after_message): New function.
3370 (grub_color_menu_normal): New variable. Replaces ...
3371 (GRUB_COLOR_MENU_NORMAL): ... this macro.
3372 (grub_color_menu_highlight): New variable. Replaces ...
3373 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
3374 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
3375 `GRUB_TERM_COLOR_STANDARD'.
3376 (print_message): Use `grub_setcolorstate' to reload colors. Rename
3377 `normal_code' and `highlight_code' to `old_color_normal' and
3378 `old_color_highlight', respectively.
3379 (grub_menu_init_page): Update colors when drawing the menu, based on
3380 `menu_color_normal' and `menu_color_highlight' variables.
3381 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
3382 a message is printed.
3383
182dd4e5 33842008-01-05 Robert Millan <rmh@aybabtu.com>
3385
3386 * kern/env.c (grub_env_context_open): Propagate hooks for global
3387 variables to new context.
3388
3389 * kern/main.c (grub_set_root_dev): Export `root' variable.
3390
ddf8f6ad 33912008-01-05 Robert Millan <rmh@aybabtu.com>
3392
3393 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 3394 discs unconditionally, since udev and others have options to provide
ddf8f6ad 3395 them.
3396
d8b43d9b 33972008-01-05 Robert Millan <rmh@aybabtu.com>
3398
3399 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
3400
2bff2de3 34012008-01-04 Christian Franke <franke@computer.org>
3402
3403 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
3404 of eisa_mmap.
3405
97eab917 34062008-01-03 Pavel Roskin <proski@gnu.org>
3407
3408 * kern/i386/linuxbios/init.c: Put "void" to all function
3409 declarations with no arguments.
3410 * kern/powerpc/ieee1275/init.c: Likewise.
3411 * term/i386/pc/at_keyboard.c: Likewise.
3412 * term/i386/pc/vga_text.c: Likewise.
3413 * util/grub-mkdevicemap.c: Likewise.
3414
b9416d00 34152008-01-02 Robert Millan <rmh@aybabtu.com>
3416
3417 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
3418 message when loaded image is out of bounds.
3419 (grub_multiboot_load_elf64): Likewise.
3420
92695df9 34212008-01-02 Pavel Roskin <proski@gnu.org>
3422
3423 * util/grub.d/10_linux.in: Try version without ".old" when
3424 looking for initrd. It's better to use initrd from the newer
3425 kernel of the same version than no initrd at all.
3426
d98d9cad 34272008-01-01 Robert Millan <rmh@aybabtu.com>
3428
3429 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
3430
dbfdce36 34312008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
3432
f19dbdb7 3433 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 3434 grub_video_get_active_render_target.
3435 (grub_video_adapter): Added unmap_color and get_active_render_target.
3436
f19dbdb7 3437 * video/video.c: Added grub_video_unmap_color and
dbfdce36 3438 grub_video_get_active_render_target.
3439 (grub_video_get_info): Changed method to accept NULL pointer as an
3440 argument to allow detection of active video adapter.
3441
3442 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
3443 grub_video_vbe_unmap_color_int.
3444 Added grub_video_vbe_unmap_color and
3445 grub_video_vbe_get_active_render_target.
3446 (grub_video_vbe_adapter): Added unmap_color and
3447 get_active_render_target.
3448
f19dbdb7 3449 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 3450 with grub_video_vbe_unmap_color_int.
3451
3452 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
3453 (DEFAULT_NORMAL_COLOR): Likewise.
3454 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
3455 (DEFAULT_FG_COLOR): Removed.
3456 (DEFAULT_BG_COLOR): Likewise.
3457 (DEFAULT_CURSOR_COLOR): Changed value.
3458 (grub_virtual_screen): Added standard_color_setting,
3459 normal_color_setting, highlight_color_setting and term_color.
3460 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
3461 (bitmap_width): Added.
3462 (bitmap_height): Likewise.
3463 (bitmap): Likewise.
3464 (set_term_color): Likewise.
3465 (grub_virtual_screen_setup): Changed to use new terminal coloring
3466 settings.
3467 (grub_gfxterm_init): Added init for bitmap.
3468 (grub_gfxterm_fini): Added destroy for bitmap.
3469 (redraw_screen_rect): Updated to use background bitmap and new
3470 terminal coloring.
3471 (scroll_up): Added optimization for case when there is no bitmap.
3472 (grub_gfxterm_cls): Fixed to use correct background color.
3473 (grub_virtual_screen_setcolorstate): Changed to use new terminal
3474 coloring.
3475 (grub_virtual_screen_setcolor): Likewise.
3476 (grub_virtual_screen_getcolor): Added.
3477 (grub_gfxterm_background_image_cmd): Likewise.
3478 (grub_video_term): Added setcolor and getcolor.
3479 (MOD_INIT): Added registration of background_image command.
3480 (MOD_TERM): Added unregistration for background_image command.
3481
c3c20931 34822007-12-30 Pavel Roskin <proski@gnu.org>
3483
3484 * loader/multiboot_loader.c: Fix multiboot command
3485 unregistration. Fix all typos in the word "multiboot".
3486
df266716 34872007-12-29 Pavel Roskin <proski@gnu.org>
94239199 3488
3489 * util/grub.d/10_linux.in: Refactor search for initrd. Add
3490 support for initrd names used in Fedora.
3491
fc6e896c 34922007-12-26 Bean <bean123ch@gmail.com>
3493
3494 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
3495 (cpio_mod_SOURCES): New variable.
3496 (cpio_mod_CFLAGS): Likewise.
3497 (cpio_mod_LDFLAGS): Likewise.
3498
3499 * fs/cpio.c: New file.
3500
3501 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
3502
3503 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3504
3505 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3506
3507 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3508
533110ad 35092007-12-25 Robert Millan <rmh@aybabtu.com>
3510
3511 * include/grub/term.h (struct grub_term): Add `getcolor' function.
3512 (grub_getcolor): New function.
3513
3514 * kern/term.c (grub_getcolor): New function.
3515 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
3516 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
3517 (print_entry): Set normal and highlight colors to
3518 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
3519 respectively, before printing and restore them to old
3520 values afterwards.
3521 (grub_menu_init_page): Likewise. Fill an additional colored space
3522 that would otherwise be left blank.
3523
3524 * term/efi/console.c (grub_console_getcolor): New function.
3525 (struct grub_console_term.getcolor): New variable.
3526 * term/i386/pc/console.c (grub_console_getcolor): New function.
3527 (struct grub_console_term.getcolor): New variable.
3528 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
3529 (struct grub_console_term.getcolor): New variable.
3530
3531 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
3532 (struct grub_console_term.setcolor): Remove variable.
3533 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
3534 (struct grub_console_term.setcolor): Remove variable.
3535 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
3536 (struct grub_console_term.setcolor): Remove variable.
3537 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
3538 (struct grub_console_term.setcolor): Remove variable.
3539
4931827f 35402007-12-25 Robert Millan <rmh@aybabtu.com>
3541
3542 * configure.ac: Search for possible unifont.hex locations, and
3543 define UNIFONT_HEX if found.
3544
3545 * Makefile.in (UNIFONT_HEX): Define variable.
3546 (DATA): Rename to ...
3547 (PKGLIB): ... this. Update all users.
3548 (PKGDATA): New variable.
3549 (pkgdata_IMAGES): Rename to ...
3550 (pkglib_IMAGES): ... this. Update all users.
3551 (pkgdata_MODULES): Rename to ...
3552 (pkglib_MODULES): ... this. Update all users.
3553 (pkgdata_PROGRAMS): Rename to ...
3554 (pkglib_PROGRAMS): ... this. Update all users.
3555 (pkgdata_DATA): Rename to ...
3556 (pkglib_DATA): ... this. Update all users.
3557 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
3558 (unicode.pff, ascii.pff): New rules.
3559 (all-local): Add `$(PKGDATA)' dependency.
3560 (install-local): Process `$(PKGDATA)'.
3561
3562 * util/update-grub_lib.in (font_path): Search for *.pff files in
3563 a few more locations, including `${pkgdata}'.
3564
57e57e31 35652007-12-23 Robert Millan <rmh@aybabtu.com>
3566
3567 Patch from Bean <bean123ch@gmail.com>:
3568 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
3569 `size'.
3570
4bc72aa9 35712007-12-21 Bean <bean123ch@gmail.com>
3572
3573 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
3574 (ntfscomp_mod_SOURCES): New variable.
3575 (ntfscomp_mod_CFLAGS): Likewise.
3576 (ntfscomp_mod_LDFLAGS): Likewise.
3577
3578 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
3579 (grub_probe_SOURCES): Likewise.
3580 (grub_emu_SOURCES): Likewise.
3581
3582 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3583 (grub_emu_SOURCES): Likewise.
3584
3585 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3586 (grub_emu_SOURCES): Likewise.
3587
3588 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3589 (grub_emu_SOURCES): Likewise.
3590
3591 * fs/ntfs.c (grub_ntfscomp_func): New variable.
3592 (read_run_list): Renamed to grub_ntfs_read_run_list.
3593 (decomp_nextvcn): Moved to ntfscomp.c.
3594 (decomp_getch): Likewise.
3595 (decomp_get16): Likewise.
3596 (decomp_block): Likewise.
3597 (read_block): Likewise.
3598 (read_data): Partially moved to ntfscomp.c.
3599 (fixup): Change unsigned to grub_uint16_t.
3600 (read_mft): Change unsigned long to grub_uint32_t.
3601 (read_attr): Likewise.
3602 (read_data): Likewise.
3603 (read_run_data): Likewise.
3604 (read_run_list): Likewise.
3605 (read_mft): Likewise.
3606
3607 * fs/ntfscomp.c: New file.
3608
3609 * include/grub/ntfs.h: New file.
3610
af680a87 36112007-12-16 Robert Millan <rmh@aybabtu.com>
3612
3613 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
3614 IDE disk check, since Linux is known to support 20 IDE disks.
3615 Reported by Colin Watson.
3616
84be7599 36172007-12-15 Bean <bean123ch@gmail.com>
3618
3619 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
3620 (lnxboot_img_SOURCES): New variable.
3621 (lnxboot_img_ASFLAGS): Likewise.
3622 (lnxboot_img_LDFLAGS): Likewise.
3623
3624 * boot/i386/pc/lnxboot.S: New file.
3625
6af9db01 36262007-11-24 Pavel Roskin <proski@gnu.org>
3627
3628 * configure.ac: Test if '--build-id=none' is supported by the
3629 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
3630 objcopy to generate incorrect binary files (binutils
3631 2.17.50.0.18-1 as shipped by Fedora 8).
3632 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
3633 linking, so that build ID doesn't break the test.
3634
7361cfe6 36352007-11-24 Pavel Roskin <proski@gnu.org>
3636
3637 * include/grub/i386/time.h: use "void" in the argument list
3638 of grub_cpu_idle().
3639 * include/grub/powerpc/time.h: Likewise.
3640 * include/grub/sparc64/time.h: Likewise.
3641
1593e10c 36422007-11-18 Christian Franke <franke@computer.org>
3643
3644 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
3645 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
3646 This fixes the problem that function keys did not work in grub-emu.
3647
3b8db1a8 36482007-11-18 Christian Franke <franke@computer.org>
3649
3650 * disk/host.c (grub_host_open): Remove attribute unused from
3651 name parameter. Add check for "host". This fixes the problem
3652 that grub-emu does not find partitions.
3653
2e29408d 36542007-11-18 Christian Franke <franke@computer.org>
3655
3656 * util/hostfs.c (is_dir): New function.
3657 (grub_hostfs_dir): Handle missing dirent.d_type case.
3658 (grub_hostfs_read): Add missing fseek().
3659 (grub_hostfs_label): Clear label pointer. This fixes a crash
3660 of grub-emu on "ls (host)".
3661
398cd047 36622007-11-18 Christian Franke <franke@computer.org>
3663
3664 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
3665 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
3666 to 64 bit boundary by default.
3667
c405c391 36682007-11-18 Bean <bean123ch@gmail.com>
3669
3670 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
3671 (hexdump_mod_SOURCES): New variable.
3672 (hexdump_mod_CFLAGS): Likewise.
3673 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 3674
c405c391 3675 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3676
3677 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3678
3679 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3680
3681 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3682
3683 * include/grub/hexdump.h: New file.
3684
3685 * commands/hexdump.c: New file.
3686
5cced7fd 36872007-11-10 Robert Millan <rmh@aybabtu.com>
3688
3689 * commands/i386/pc/play.c (beep_off): Switch order of arguments
3690 in grub_outb() calls.
3691 (beep_on): Likewise.
3692
8b714eb0 36932007-11-10 Christian Franke <franke@computer.org>
3694
3695 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
3696 (grub_menu_run): Likewise.
3697
ce0f1839 36982007-11-10 Robert Millan <rmh@aybabtu.com>
3699
3700 * include/grub/i386/efi/machine.h: New file.
3701 * include/grub/i386/linuxbios/machine.h: Likewise.
3702 * include/grub/i386/pc/machine.h: Likewise.
3703 * include/grub/powerpc/ieee1275/machine.h: Likewise.
3704 * include/grub/sparc64/ieee1275/machine.h: Likewise.
3705
3706 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
3707 (serial_hw_io_addr): New variable.
3708 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
3709 instead of `(unsigned short *) 0x400'.
3710
270c237d 37112007-11-10 Bean <bean123ch@gmail.com>
3712
3713 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
3714
a87783bf 37152007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3716
3717 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
3718 (vga_mod_SOURCES): Added.
3719 (vga_mod_CFLAGS): Likewise.
3720 (vga_mod_LDFLAGS): Likewise.
3721
3722 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
3723 grub_outb() calls.
3724 (set_map_mask): Likewise.
3725 (set_read_map): Likewise.
3726 (set_read_address): Likewise.
3727 (vga_font): Removed variable.
3728 (get_vga_glyph): Removed function.
3729 (invalidate_char): Likewise.
3730 (write_char): Changed to use grub_font_get_glyph() for font
3731 information.
3732 (grub_vga_putchar): Likewise.
3733 (grub_vga_getcharwidth): Likewise.
3734
6433b448 37352007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3736
3737 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
3738 flags.
3739 (pxeboot_img_LDFLAGS): Likewise.
3740 (diskboot_img_LDFLAGS): Likewise.
3741 (kernel_img_LDFLAGS): Likewise.
3742
49178511 37432007-11-06 Robert Millan <rmh@aybabtu.com>
3744
3745 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
3746 in grub_outb() calls.
3747 (serial_hw_init): Likewise.
3748
53b052de 37492007-11-05 Robert Millan <rmh@aybabtu.com>
3750
3751 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
3752 spaces. Skip non-regular files.
3753
5ab33bba 37542007-11-05 Robert Millan <rmh@aybabtu.com>
3755
3756 * kern/disk.c (grub_disk_firmware_fini)
3757 (grub_disk_firmware_is_tainted): New variables.
3758
3759 * include/grub/disk.h (grub_disk_firmware_fini)
3760 (grub_disk_firmware_is_tainted): Likewise.
3761
3762 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
3763 (grub_disk_biosdisk_fini): ... to here.
3764 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
3765 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
3766 is set. Register grub_disk_biosdisk_fini() in
3767 `grub_disk_firmware_fini'.
3768
3769 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
3770 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
3771 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
3772 to finish existing firmware disk interface.
3773
3774 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
3775 (ata_mod_SOURCES): New variable.
3776 (ata_mod_CFLAGS): Likewise.
3777 (ata_mod_LDFLAGS): Likewise.
3778
0149ab7c 37792007-11-05 Robert Millan <rmh@aybabtu.com>
3780
3781 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
3782 (grub_ata_wait): Reimplement using grub_millisleep().
3783
3784 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
3785 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
3786
be7ac41e 37872007-11-03 Marco Gerards <marco@gnu.org>
3788
3789 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
3790 (CRTC_ADDR_PORT): New macro.
3791 (CRTC_DATA_PORT): Likewise.
3792 (CRTC_CURSOR): Likewise.
3793 (CRTC_CURSOR_ADDR_HIGH): Likewise.
3794 (CRTC_CURSOR_ADDR_LOW): Likewise.
3795 (update_cursor): New function.
3796 (grub_console_real_putchar): Call `update_cursor'.
3797 (grub_console_gotoxy): Likewise.
3798 (grub_console_cls): Set the default color when clearing the
3799 screen.
3800 (grub_console_setcursor): Implemented.
3801
bb06ab2e 38022007-11-03 Marco Gerards <marco@gnu.org>
3803
3804 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
3805 become activate.
3806 (grub_ata_pio_write): Likewise.
3807
3808 (grub_atapi_identify): Wait after issuing an ATA command.
3809 (grub_atapi_packet): Likewise.
3810 (grub_ata_identify): Likewise.
3811 (grub_ata_readwrite): Likewise.
3812
cf8f780b 38132007-11-03 Marco Gerards <marco@gnu.org>
3814
3815 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
3816 (grub_ata_pio_write): Likewise.
3817 (grub_ata_readwrite): Use `grub_error', instead of
3818 returning `grub_errno'.
3819
ed649e54 38202007-11-03 Marco Gerards <marco@gnu.org>
3821
3822 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
3823 grub_ata_pio_write once for every single sector, instead of for
3824 multiple sectors.
3825
ca25d8f0 38262007-10-31 Robert Millan <rmh@aybabtu.com>
3827
3828 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
3829
3830 * conf/i386-linuxbios.rmk: New file.
3831
3832 * kern/i386/pc/hardware.c: Likewise.
3833 * term/i386/pc/at_keyboard.c: Likewise.
3834 * term/i386/pc/vga_text.c: Likewise.
3835
3836 * include/grub/i386/linuxbios/boot.h: Likewise.
3837 * include/grub/i386/linuxbios/console.h: Likewise.
3838 * include/grub/i386/linuxbios/init.h: Likewise.
3839 * include/grub/i386/linuxbios/kernel.h: Likewise.
3840 * include/grub/i386/linuxbios/loader.h: Likewise.
3841 * include/grub/i386/linuxbios/memory.h: Likewise.
3842 * include/grub/i386/linuxbios/serial.h: Likewise.
3843 * include/grub/i386/linuxbios/time.h: Likewise.
3844
3845 * kern/i386/linuxbios/init.c: Likewise.
3846 * kern/i386/linuxbios/startup.S: Likewise.
3847 * kern/i386/linuxbios/table.c: Likewise.
3848
e911ecc1 38492007-10-31 Marco Gerards <marco@gnu.org>
3850
3851 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
3852 (ata_mod_SOURCES): New variable.
3853 (ata_mod_CFLAGS): Likewise.
3854 (ata_mod_LDFLAGS): Likewise.
3855
3856 * disk/ata.c: New file.
3857
3858 * include/grub/disk.h (grub_disk_dev_id): Add
3859 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 3860
7f66d0e0 38612007-10-31 Robert Millan <rmh@aybabtu.com>
3862
3863 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
3864 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
3865
3866 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
3867 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
3868
3869 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
3870 `<grub/types.h>'.
3871
3872 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
3873
5cd7dd46 38742007-10-27 Robert Millan <rmh@aybabtu.com>
3875
3236ca65 3876 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 3877
2ebfc90f 38782007-10-22 Robert Millan <rmh@aybabtu.com>
3879
3880 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
3881 `"../realmode.S"'.
3882 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
3883
73fcb0f3 38842007-10-22 Robert Millan <rmh@aybabtu.com>
3885
3886 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
3887 (pkgdata_MODULES): Add `biosdisk.mod'.
3888 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
3889 variables.
3890
3891 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
3892 (grub_biosdisk_init): Replace with ...
3893 (GRUB_MOD_INIT(biosdisk)): ... this.
3894 (grub_biosdisk_fini): Replace with ...
3895 (GRUB_MOD_FINI(biosdisk)): ... this.
3896
3897 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
3898 (grub_machine_init): Remove call to grub_biosdisk_init().
3899 (grub_machine_fini): Remove call to grub_machine_fini().
3900
3901 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
3902
3381d274 39032007-10-22 Robert Millan <rmh@aybabtu.com>
3904
3905 * include/grub/time.h: New file.
3906 * include/grub/i386/time.h: Likewise.
3907 * include/grub/powerpc/time.h: Likewise.
3908 * include/grub/sparc64/time.h: Likewise.
3909
3910 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
3911 instances to ...
3912 (KERNEL_MACHINE_TIME_HEADER): ... this.
3913 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3914 instances to ...
3915 (KERNEL_MACHINE_TIME_HEADER): ... this.
3916 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
3917 instances to ...
3918 (KERNEL_MACHINE_TIME_HEADER): ... this.
3919
3920 * kern/i386/efi/init.c: Include `<grub/time.h>'.
3921 (grub_millisleep): New function.
3922 * kern/i386/pc/init.c: Include `<grub/time.h>'.
3923 (grub_millisleep): New function.
3924 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
3925 Remove `grub/machine/time.h' include.
3926 (grub_millisleep): New function.
3927 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
3928 Remove `grub/machine/time.h' include.
3929 (grub_millisleep): New function.
3930
3931 * include/grub/misc.h (grub_div_roundup): New function.
3932
3933 * kern/misc.c: Include `<grub/time.h>'.
3934 (grub_millisleep_generic): New function.
3935
3936 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
3937 Add `time.h'.
3938 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
3939 Add `time.h'.
3940 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
3941 `machine/time.h'. Add `time.h'.
3942 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3943
a39a0312 39442007-10-21 Robert Millan <rmh@aybabtu.com>
3945
3946 * include/grub/misc.h (grub_max): New function.
3947
2aad70e2 39482007-10-21 Robert Millan <rmh@aybabtu.com>
3949
3950 * util/misc.c (grub_util_info): Call fflush() before returning.
3951
54b71c4b 39522007-10-20 Robert Millan <rmh@aybabtu.com>
3953
3954 * genmk.rb (Image): Copy `extra_flags' from here ...
3955 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
3956
3957 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
3958 to `argc' and `args' arguments.
3959
a979f513 39602007-10-17 Robert Millan <rmh@aybabtu.com>
3961
3962 * kern/i386/loader.S: New file.
3963
3964 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
3965 * kern/i386/loader.S (grub_linux_prot_size)... to here.
3966 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
3967 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
3968 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
3969 * kern/i386/loader.S (grub_linux_real_addr)... to here.
3970 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
3971 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
3972 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
3973 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
3974 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
3975 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
3976 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
3977 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
3978
3979 * kern/i386/realmode.S: New file.
3980
3981 * kern/i386/pc/startup.S (protstack): Moved from here ...
3982 * kern/i386/realmode.S (protstack)... to here.
3983 * kern/i386/pc/startup.S (gdt): Moved from here ...
3984 * kern/i386/realmode.S (gdt)... to here.
3985 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
3986 * kern/i386/realmode.S (prot_to_real)... to here.
3987
3988 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
3989 `kern/i386/realmode.S'.
3990
825fc8fd 39912007-10-17 Robert Millan <rmh@aybabtu.com>
3992
3993 * include/grub/i386/loader.h: New file.
3994
3995 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
3996 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
3997 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
3998 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
3999 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
4000 * include/grub/i386/loader.h (grub_linux_prot_size)
4001 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4002 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4003 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4004 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
4005
4006 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
4007
e179b2f4 40082007-10-15 Robert Millan <rmh@aybabtu.com>
4009
4010 * normal/misc.c (grub_normal_print_device_info): Do not probe for
4011 filesystem when dev->disk is unset.
4012 Do probe for filesystem even when dev->disk->has_partitions is set.
4013 In case a filesystem is found, always report it.
4014 In case it isn't, if dev->disk->has_partitions is set, report that
4015 a partition table was found instead of reporting that no filesystem
4016 could be identified.
4017
5db82af6 40182007-10-12 Robert Millan <rmh@aybabtu.com>
4019
4020 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
4021 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
4022
68f6ac74 4023 * include/grub/types.h (grub_host_to_target16): New macro.
4024 (grub_host_to_target32): Likewise.
4025 (grub_host_to_target64): Likewise.
4026 (grub_target_to_host16): Likewise.
4027 (grub_target_to_host32): Likewise.
4028 (grub_target_to_host64): Likewise.
5db82af6 4029
4030 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4031 Renamed from to ...
4032 (GRUB_MOD_ALIGN): ...this. Update all users.
4033
68f6ac74 4034 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
4035 grub_host_to_target32.
4036 Replace grub_be_to_cpu32 with grub_target_to_host32.
4037 (load_modules): Likewise.
4038 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
4039 Replace grub_be_to_cpu32 with grub_target_to_host32.
4040 Replace grub_cpu_to_be16 with grub_host_to_target16.
4041 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 4042
3cf497cc 40432007-10-12 Robert Millan <rmh@aybabtu.com>
4044
4045 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
4046 * util/elf/grub-mkimage.c: ... here.
4047
4048 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
4049 `util/powerpc/ieee1275/grub-mkimage.c'.
4050
c8cc3692 40512007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 4052
c8cc3692 4053 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
4054 and make it easier to figure out.
4055 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
4056 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
4057 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
4058 leave us with less than HEAP_MIN_SIZE total heap.
4059 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 4060
5c58b791 40612007-10-03 Robert Millan <rmh@aybabtu.com>
4062
4063 * include/grub/i386/io.h: New file.
4064 * commands/i386/pc/play.c (inb): Removed.
4065 (outb): Removed.
4066 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4067 with grub_outb().
afcd2ef8 4068 * term/i386/pc/serial.c (inb): Removed.
4069 (outb): Removed.
4070 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4071 with grub_outb().
4072 * term/i386/pc/vga.c (inb): Removed.
4073 (outb): Removed.
4074 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4075 with grub_outb().
5c58b791 4076
1a477ed6 40772007-10-02 Robert Millan <rmh@aybabtu.com>
4078
4079 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
4080 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4081 Reported by Marcin Kurek.
4082
6b5d80fa 40832007-09-07 Robert Millan <rmh@aybabtu.com>
4084
4085 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
4086 SmartFirmware version updates (as released by Sven Luther), and avoid
4087 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
4088 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
4089 known broken.
4090
5618afbf 40912007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4092
4093 From Hitoshi Ozeki:
4094 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
4095 when merging two regions.
4096
6139dcd9 40972007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4098
508e39ee 4099 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
4100 * normal/completion.c (grub_normal_do_completion): Likewise.
4101 Reported by Hitoshi Ozeki.
4102
41032007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 4104
6139dcd9 4105 Do not use devices at boot in chainloading.
f19dbdb7 4106
6139dcd9 4107 * loader/i386/pc/chainloader.c (boot_drive): New variable.
4108 (boot_part_addr): Likewise.
4109 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
4110 with BOOT_DRIVE and BOOT_PART_ADDR.
4111 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
4112 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
4113
38da6516 41142007-08-29 Robert Millan <rmh@aybabtu.com>
4115
4116 Patch from Simon Peter <dn.tlp@gmx.net>:
4117 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
4118 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
4119 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
4120 util/i386/pc/grub-setup.c_DEPENDENCIES.
4121 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4122 util/grub-probe.c_DEPENDENCIES.
4123 * conf/powerpc-ieee1275.rmk: Likewise.
4124
29d0928c 41252007-08-28 Robert Millan <rmh@aybabtu.com>
4126
4127 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
4128 to tell grub-mkdevicemap how to name devices.
4129 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4130 feature).
4131
4132 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4133 util/i386/get_disk_name.c.
4134 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4135 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4136 util/ieee1275/get_disk_name.c.
4137
4138 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4139
4140 * DISTLIST: Add util/i386/get_disk_name.c and
4141 util/ieee1275/get_disk_name.c.
4142
4143 * util/grub-mkdevicemap.c: Replace device naming logic with
4144 grub_util_get_disk_name() calls.
4145
5a0d3cca 41462007-08-20 Robert Millan <rmh@aybabtu.com>
4147
4148 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4149 (so that it works for both plural and singular quantities).
4150
8b72db2f 41512007-08-05 Robert Millan <rmh@aybabtu.com>
4152
4153 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4154 so that [xz] isn't taken into account when determining order.
4155
352466bf 41562007-08-02 Marco Gerards <marco@gnu.org>
4157
4158 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4159 `include/multiboot2.h', `include/grub/elfload.h',
4160 `include/multiboot.h', `include/grub/multiboot.h',
4161 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4162 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4163 `kern/elf.c', `loader/multiboot_loader.c',
4164 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4165 `loader/i386/pc/multiboot2.c',
4166 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4167 `util/i386/pc/grub-mkrescue.in'. Remove
4168 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4169 `include/grub/i386/pc/util/biosdisk.h' and
4170 `include/grub/powerpc/ieee1275/multiboot.h'.
4171
8f096014 41722007-08-02 Bean <bean123ch@gmail.com>
4173
4174 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4175 (ntfs_mod_SOURCES): New variable.
4176 (ntfs_mod_CFLAGS): Likewise.
4177 (ntfs_mod_LDFLAGS): Likewise.
4178
4179 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4180 (grub_probe_SOURCES): Likewise.
4181 (grub_emu_SOURCES): Likewise.
4182
4183 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4184 (grub_emu_SOURCES): Likewise.
4185
4186 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4187 (grub_emu_SOURCES): Likewise.
f19dbdb7 4188
8f096014 4189 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4190
4191 * fs/ntfs.c: New file.
4192
9959f7db 41932007-08-02 Bean <bean123ch@gmail.com>
4194
4195 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4196
4197 * file.h (grub_file): Likewise.
4198
4199 * fshelp.h (grub_fshelp_read_file): Likewise.
4200
4201 * util/i386/pc/grub-setup.c (setup): Likewise.
4202 (save_first_sector): Likewise.
4203 (save_blocklists): Likewise.
f19dbdb7 4204
9959f7db 4205 * fs/affs.c (grub_affs_read_file): Likewise.
4206
4207 * fs/ext2.c (grub_ext2_read_file): Likewise.
4208
4209 * fs/fat.c (grub_fat_read_data): Likewise.
4210
4211 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4212
4213 * fs/hfs.c (grub_hfs_read_file): Likewise.
4214
4215 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4216
4217 * fs/jfs.c (grub_jfs_read_file): Likewise.
4218
4219 * fs/minix.c (grub_minix_read_file): Likewise.
4220
4221 * fs/sfs.c (grub_sfs_read_file): Likewise.
4222
4223 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 4224
9959f7db 4225 * fs/xfs.c (grub_xfs_read_file): Likewise.
4226
4227 * command/blocklist.c (read_blocklist): Likewise.
4228 (print_blocklist): Likewise.
4229
0a203f83 42302007-08-02 Marco Gerards <marco@gnu.org>
4231
4232 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4233 `util/hostfs.c'.
4234
4235 * disk/host.c: New file.
4236
4237 * util/hostfs.c: Likewise.
4238
4239 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4240 return `GRUB_ERR_BAD_FS'.
4241 * fs/sfs.c (grub_sfs_mount): Likewise.
4242 * fs/xfs.c (grub_xfs_mount): Likewise.
4243
4244 * include/grub/disk.h (enum grub_disk_dev_id): Add
4245 `GRUB_DISK_DEVICE_HOST_ID'.
4246
4247 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4248
e5dfe777 42492007-07-24 Jerone Young <jerone@gmail.com>
4250
f19dbdb7 4251 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 4252 modules for compilation.
4253 * conf/powerpc-ieee1275.rmk: Likewise.
4254
4255 * include/multiboot.h: Move multiboot definitions to one file. Rename
4256 many definitions to not get grub specific.
4257 * include/multiboot2.h: Create header with multiboot 2 definitions.
4258 * include/grub/multiboot.h: Header for grub specific function
4259 prototypes and definitions.
4260 * include/grub/multiboot2.h: Likewise.
4261 * include/grub/multiboot_loader.h: Likewise.
4262 * include/grub/i386/pc/multiboot.h: Removed.
4263 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4264
4265 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4266 and 2 to allow for one multiboot and module commands.
4267 * loader/multiboot2.c: Add multiboot2 functionality.
4268 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4269 and definition names.
4270 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4271 2 functions.
4272 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4273 ieee1275 specific multiboot2 code.
4274
4275 * kern/i386/pc/startup.S: Change headers and definition names for
4276 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4277
daf0f0ba 42782007-07-22 Robert Millan <rmh@aybabtu.com>
4279
4280 * geninitheader.sh: Process file specified in first parameter rather
4281 than hardcoding grub_modules_init.lst.
fe6b695a 4282 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 4283 than hardcoding grub_modules_init.h.
4284
4285 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4286 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
4287 grub_probe_init.[ch] and grub_setup_init.[ch].
4288
4289 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4290 grub_modules_init.h with grub_emu_init.h.
4291 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4292 grub_probe_init.[ch] files.
4293 * conf/i386-efi.rmk: Likewise.
4294 * conf/i386-pc.rmk: Likewise.
4295 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4296 grub_setup_init.[ch] files.
4297
4298 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4299 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
4300 to initialize modules rather than a list of hardcoded functions.
4301 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
4302 grub_init_all() to initialize modules rather than a list of hardcoded
4303 functions.
4304
54cdc1cc 43052007-07-22 Robert Millan <rmh@aybabtu.com>
4306
4307 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4308 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4309
ad0686cc 43102007-07-22 Robert Millan <rmh@aybabtu.com>
4311
4312 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4313 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
4314 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
4315 flag when running on SmartFirmware.
4316 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
4317 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
4318 was set.
4319
4320 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4321 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
4322 rather than decreasing it.
4323
4324 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
4325 there's not enough space to do it, fail in the same way as when it
4326 can't be done because there are no partitions.
4327
4328 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
4329 when nvsetenv failed.
4330
969c02ec 43312007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4332
4333 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
4334 because this rule is automatically generated.
4335 (grub-mkrescue): Removed for the same reason as above.
4336
5a79f472 43372007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4338
4339 Migrate to GNU General Public License Version 3.
f19dbdb7 4340
5a79f472 4341 * COPYING: Replaced with the plain text version of GPLv3.
4342
4343 * config.guess: Updated from gnulib.
4344 * config.sub: Likewise.
4345
4346 * geninit.sh: Output a GPLv3 copyright notice.
4347 * geninitheader.sh: Likewise.
4348 * genmodsrc.sh: Likewise.
4349 * gensymlist.sh.in: Likewise.
4350
4351 * boot/i386/pc/boot.S: Upgraded to GPLv3.
4352 * boot/i386/pc/diskboot.S: Likewise.
4353 * boot/i386/pc/pxeboot.S: Likewise.
4354 * commands/blocklist.c: Likewise.
4355 * commands/boot.c: Likewise.
4356 * commands/cat.c: Likewise.
4357 * commands/cmp.c: Likewise.
4358 * commands/configfile.c: Likewise.
4359 * commands/echo.c: Likewise.
4360 * commands/help.c: Likewise.
4361 * commands/ls.c: Likewise.
4362 * commands/search.c: Likewise.
4363 * commands/terminal.c: Likewise.
4364 * commands/test.c: Likewise.
4365 * commands/videotest.c: Likewise.
4366 * commands/i386/cpuid.c: Likewise.
4367 * commands/i386/pc/halt.c: Likewise.
4368 * commands/i386/pc/play.c: Likewise.
4369 * commands/i386/pc/reboot.c: Likewise.
4370 * commands/i386/pc/vbeinfo.c: Likewise.
4371 * commands/i386/pc/vbetest.c: Likewise.
4372 * commands/ieee1275/halt.c: Likewise.
4373 * commands/ieee1275/reboot.c: Likewise.
4374 * commands/ieee1275/suspend.c: Likewise.
4375 * disk/loopback.c: Likewise.
4376 * disk/lvm.c: Likewise.
4377 * disk/raid.c: Likewise.
4378 * disk/efi/efidisk.c: Likewise.
4379 * disk/i386/pc/biosdisk.c: Likewise.
4380 * disk/ieee1275/ofdisk.c: Likewise.
4381 * font/manager.c: Likewise.
4382 * fs/affs.c: Likewise.
4383 * fs/ext2.c: Likewise.
4384 * fs/fat.c: Likewise.
4385 * fs/fshelp.c: Likewise.
4386 * fs/hfs.c: Likewise.
4387 * fs/hfsplus.c: Likewise.
4388 * fs/iso9660.c: Likewise.
4389 * fs/jfs.c: Likewise.
4390 * fs/minix.c: Likewise.
4391 * fs/sfs.c: Likewise.
4392 * fs/ufs.c: Likewise.
4393 * fs/xfs.c: Likewise.
4394 * hello/hello.c: Likewise.
4395 * include/grub/acorn_filecore.h: Likewise.
4396 * include/grub/arg.h: Likewise.
4397 * include/grub/bitmap.h: Likewise.
4398 * include/grub/boot.h: Likewise.
4399 * include/grub/cache.h: Likewise.
4400 * include/grub/device.h: Likewise.
4401 * include/grub/disk.h: Likewise.
4402 * include/grub/dl.h: Likewise.
4403 * include/grub/elfload.h: Likewise.
4404 * include/grub/env.h: Likewise.
4405 * include/grub/err.h: Likewise.
4406 * include/grub/file.h: Likewise.
4407 * include/grub/font.h: Likewise.
4408 * include/grub/fs.h: Likewise.
4409 * include/grub/fshelp.h: Likewise.
4410 * include/grub/gzio.h: Likewise.
4411 * include/grub/hfs.h: Likewise.
4412 * include/grub/kernel.h: Likewise.
4413 * include/grub/loader.h: Likewise.
4414 * include/grub/lvm.h: Likewise.
4415 * include/grub/misc.h: Likewise.
4416 * include/grub/mm.h: Likewise.
4417 * include/grub/net.h: Likewise.
4418 * include/grub/normal.h: Likewise.
4419 * include/grub/parser.h: Likewise.
4420 * include/grub/partition.h: Likewise.
4421 * include/grub/pc_partition.h: Likewise.
4422 * include/grub/raid.h: Likewise.
4423 * include/grub/rescue.h: Likewise.
4424 * include/grub/script.h: Likewise.
4425 * include/grub/setjmp.h: Likewise.
4426 * include/grub/symbol.h: Likewise.
4427 * include/grub/term.h: Likewise.
4428 * include/grub/terminfo.h: Likewise.
4429 * include/grub/tparm.h: Likewise.
4430 * include/grub/types.h: Likewise.
4431 * include/grub/video.h: Likewise.
4432 * include/grub/efi/api.h: Likewise.
4433 * include/grub/efi/chainloader.h: Likewise.
4434 * include/grub/efi/console.h: Likewise.
4435 * include/grub/efi/console_control.h: Likewise.
4436 * include/grub/efi/disk.h: Likewise.
4437 * include/grub/efi/efi.h: Likewise.
4438 * include/grub/efi/pe32.h: Likewise.
4439 * include/grub/efi/time.h: Likewise.
4440 * include/grub/i386/linux.h: Likewise.
4441 * include/grub/i386/setjmp.h: Likewise.
4442 * include/grub/i386/types.h: Likewise.
4443 * include/grub/i386/efi/kernel.h: Likewise.
4444 * include/grub/i386/efi/loader.h: Likewise.
4445 * include/grub/i386/efi/time.h: Likewise.
4446 * include/grub/i386/pc/biosdisk.h: Likewise.
4447 * include/grub/i386/pc/boot.h: Likewise.
4448 * include/grub/i386/pc/chainloader.h: Likewise.
4449 * include/grub/i386/pc/console.h: Likewise.
4450 * include/grub/i386/pc/init.h: Likewise.
4451 * include/grub/i386/pc/kernel.h: Likewise.
4452 * include/grub/i386/pc/loader.h: Likewise.
4453 * include/grub/i386/pc/memory.h: Likewise.
4454 * include/grub/i386/pc/multiboot.h: Likewise.
4455 * include/grub/i386/pc/serial.h: Likewise.
4456 * include/grub/i386/pc/time.h: Likewise.
4457 * include/grub/i386/pc/vbe.h: Likewise.
4458 * include/grub/i386/pc/vbeblit.h: Likewise.
4459 * include/grub/i386/pc/vbefill.h: Likewise.
4460 * include/grub/i386/pc/vbeutil.h: Likewise.
4461 * include/grub/i386/pc/vga.h: Likewise.
4462 * include/grub/ieee1275/ieee1275.h: Likewise.
4463 * include/grub/ieee1275/ofdisk.h: Likewise.
4464 * include/grub/powerpc/libgcc.h: Likewise.
4465 * include/grub/powerpc/setjmp.h: Likewise.
4466 * include/grub/powerpc/types.h: Likewise.
4467 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
4468 * include/grub/powerpc/ieee1275/console.h: Likewise.
4469 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
4470 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
4471 * include/grub/powerpc/ieee1275/loader.h: Likewise.
4472 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
4473 * include/grub/powerpc/ieee1275/time.h: Likewise.
4474 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
4475 * include/grub/sparc64/libgcc.h: Likewise.
4476 * include/grub/sparc64/setjmp.h: Likewise.
4477 * include/grub/sparc64/types.h: Likewise.
4478 * include/grub/sparc64/ieee1275/console.h: Likewise.
4479 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4480 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4481 * include/grub/sparc64/ieee1275/time.h: Likewise.
4482 * include/grub/util/biosdisk.h: Likewise.
4483 * include/grub/util/getroot.h: Likewise.
4484 * include/grub/util/lvm.h: Likewise.
4485 * include/grub/util/misc.h: Likewise.
4486 * include/grub/util/raid.h: Likewise.
4487 * include/grub/util/resolve.h: Likewise.
4488 * io/gzio.c: Likewise.
4489 * kern/device.c: Likewise.
4490 * kern/disk.c: Likewise.
4491 * kern/dl.c: Likewise.
4492 * kern/elf.c: Likewise.
4493 * kern/env.c: Likewise.
4494 * kern/err.c: Likewise.
4495 * kern/file.c: Likewise.
4496 * kern/fs.c: Likewise.
4497 * kern/loader.c: Likewise.
4498 * kern/main.c: Likewise.
4499 * kern/misc.c: Likewise.
4500 * kern/mm.c: Likewise.
4501 * kern/parser.c: Likewise.
4502 * kern/partition.c: Likewise.
4503 * kern/rescue.c: Likewise.
4504 * kern/term.c: Likewise.
4505 * kern/efi/efi.c: Likewise.
4506 * kern/efi/init.c: Likewise.
4507 * kern/efi/mm.c: Likewise.
4508 * kern/i386/dl.c: Likewise.
4509 * kern/i386/efi/init.c: Likewise.
4510 * kern/i386/efi/startup.S: Likewise.
4511 * kern/i386/pc/init.c: Likewise.
4512 * kern/i386/pc/lzo1x.S: Likewise.
4513 * kern/i386/pc/startup.S: Likewise.
4514 * kern/ieee1275/ieee1275.c: Likewise.
4515 * kern/powerpc/cache.S: Likewise.
4516 * kern/powerpc/dl.c: Likewise.
4517 * kern/powerpc/ieee1275/cmain.c: Likewise.
4518 * kern/powerpc/ieee1275/crt0.S: Likewise.
4519 * kern/powerpc/ieee1275/init.c: Likewise.
4520 * kern/powerpc/ieee1275/openfw.c: Likewise.
4521 * kern/sparc64/cache.S: Likewise.
4522 * kern/sparc64/dl.c: Likewise.
4523 * kern/sparc64/ieee1275/init.c: Likewise.
4524 * kern/sparc64/ieee1275/openfw.c: Likewise.
4525 * loader/efi/chainloader.c: Likewise.
4526 * loader/efi/chainloader_normal.c: Likewise.
4527 * loader/i386/efi/linux.c: Likewise.
4528 * loader/i386/efi/linux_normal.c: Likewise.
4529 * loader/i386/pc/chainloader.c: Likewise.
4530 * loader/i386/pc/chainloader_normal.c: Likewise.
4531 * loader/i386/pc/linux.c: Likewise.
4532 * loader/i386/pc/linux_normal.c: Likewise.
4533 * loader/i386/pc/multiboot.c: Likewise.
4534 * loader/i386/pc/multiboot_normal.c: Likewise.
4535 * loader/powerpc/ieee1275/linux.c: Likewise.
4536 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4537 * normal/arg.c: Likewise.
4538 * normal/cmdline.c: Likewise.
4539 * normal/command.c: Likewise.
4540 * normal/completion.c: Likewise.
4541 * normal/execute.c: Likewise.
4542 * normal/function.c: Likewise.
4543 * normal/lexer.c: Likewise.
4544 * normal/main.c: Likewise.
4545 * normal/menu.c: Likewise.
4546 * normal/menu_entry.c: Likewise.
4547 * normal/misc.c: Likewise.
4548 * normal/parser.y: Likewise.
4549 * normal/script.c: Likewise.
4550 * normal/i386/setjmp.S: Likewise.
4551 * normal/powerpc/setjmp.S: Likewise.
4552 * normal/sparc64/setjmp.S: Likewise.
4553 * partmap/acorn.c: Likewise.
4554 * partmap/amiga.c: Likewise.
4555 * partmap/apple.c: Likewise.
4556 * partmap/gpt.c: Likewise.
4557 * partmap/pc.c: Likewise.
4558 * partmap/sun.c: Likewise.
4559 * term/gfxterm.c: Likewise.
4560 * term/terminfo.c: Likewise.
4561 * term/efi/console.c: Likewise.
4562 * term/i386/pc/console.c: Likewise.
4563 * term/i386/pc/serial.c: Likewise.
4564 * term/i386/pc/vesafb.c: Likewise.
4565 * term/i386/pc/vga.c: Likewise.
4566 * term/ieee1275/ofconsole.c: Likewise.
4567 * util/biosdisk.c: Likewise.
4568 * util/console.c: Likewise.
4569 * util/genmoddep.c: Likewise.
4570 * util/getroot.c: Likewise.
4571 * util/grub-emu.c: Likewise.
4572 * util/grub-mkdevicemap.c: Likewise.
4573 * util/grub-probe.c: Likewise.
4574 * util/lvm.c: Likewise.
4575 * util/misc.c: Likewise.
4576 * util/raid.c: Likewise.
4577 * util/resolve.c: Likewise.
4578 * util/update-grub.in: Likewise.
4579 * util/update-grub_lib.in: Likewise.
4580 * util/grub.d/00_header.in: Likewise.
4581 * util/grub.d/10_hurd.in: Likewise.
4582 * util/grub.d/10_linux.in: Likewise.
4583 * util/i386/efi/grub-install.in: Likewise.
4584 * util/i386/efi/grub-mkimage.c: Likewise.
4585 * util/i386/pc/grub-install.in: Likewise.
4586 * util/i386/pc/grub-mkimage.c: Likewise.
4587 * util/i386/pc/grub-mkrescue.in: Likewise.
4588 * util/i386/pc/grub-setup.c: Likewise.
4589 * util/i386/pc/misc.c: Likewise.
4590 * util/powerpc/ieee1275/grub-install.in: Likewise.
4591 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
4592 * util/powerpc/ieee1275/misc.c: Likewise.
4593 * video/bitmap.c: Likewise.
4594 * video/video.c: Likewise.
4595 * video/i386/pc/vbe.c: Likewise.
4596 * video/i386/pc/vbeblit.c: Likewise.
4597 * video/i386/pc/vbefill.c: Likewise.
4598 * video/i386/pc/vbeutil.c: Likewise.
4599 * video/readers/tga.c: Likewise.
4600
3572d015 46012007-07-02 Robert Millan <rmh@aybabtu.com>
4602
4603 * conf/i386-efi.rmk: Replace obsolete reference to
4604 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
4605 with util/getroot.c.
4606 * conf/powerpc-ieee1275.rmk: Likewise.
4607 * conf/sparc64-ieee1275.rmk: Likewise.
4608
4609 * util/grub-emu.c (main): Fix unchecked pointer handling.
4610
2c2a681b 46112007-07-02 Robert Millan <rmh@aybabtu.com>
4612
4613 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
4614 invocation to fail, in order to support partition-less media.
4615
4616 * util/i386/pc/grub-install.in: Likewise.
4617
4618 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
4619 which fs or partmap modules are needed (akin to its sister scripts).
4620
4621 Also use grub-probe to get rid of unportable /proc/mounts check.
4622
4623 Print the same informational message that the other scripts do, before
fe6b695a 4624 exiting.
2c2a681b 4625
6193defe 46262007-06-23 Robert Millan <rmh@aybabtu.com>
4627
fe6b695a 4628 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 4629 a font file can be found and, if so, echo the GRUB path to it.
4630
4631 * util/update-grub.in: Handle multiple terminals depending on user
4632 input, platform availability and font file presence. Propagate
4633 variables of our findings to /etc/grub.d/ children.
4634
4635 * util/grub.d/00_header.in: Handle multiple terminals, based on
4636 environment setup by update-grub.
4637
eface1dc 46382007-06-23 Robert Millan <rmh@aybabtu.com>
4639
ba50d28f 4640 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 4641
bf697e28 46422007-06-21 Robert Millan <rmh@aybabtu.com>
4643
4644 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
4645 indicate end of data section in kernel image.
4646 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
4647 GRUB_KERNEL_MACHINE_DATA_END.
4648
4649 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
4650 space for it.
4651 * kern/i386/efi/startup.S: Likewise.
4652
4653 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
4654 during image generation. Implement --prefix option to override this
4655 patch.
4656 * util/i386/efi/grub-mkimage.c: Likewise.
4657
4658 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
4659 code to make path relative to its root into a separate function.
4660
4661 * util/i386/pc/grub-install.in: Use newly provided
4662 make_system_path_relative_to_its_root() to convert ${grubdir}, then
4663 pass the result to grub-install --prefix.
4664
baa574b4 46652007-06-13 Robert Millan <rmh@aybabtu.com>
4666
4667 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
4668 DEFAULT_DEVICE_MAP.
4669 * util/grub-emu.c: Use above definitions from misc.h instead of
4670 defining them.
4671 * util/grub-mkdevicemap.c: Likewise.
4672 * util/i386/pc/grub-setup.c: Likewise.
4673 * util/grub-probe.c: Likewise.
4674 (probe): Abort with grub_util_error() when either
4675 grub_guess_root_device or grub_util_get_grub_dev fails.
4676
0215dcbf 46772007-06-12 Robert Millan <rmh@aybabtu.com>
4678
4679 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
4680 "pager" assignment.
4681 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
4682 "pcdata".
4683 * util/grub-probe.c (probe): Likewise for "drive_name".
4684
8af2ab7b 46852007-06-11 Robert Millan <rmh@aybabtu.com>
4686
4687 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
4688 not just the cdrom one.
4689
59d31694 46902007-06-11 Robert Millan <rmh@aybabtu.com>
4691
4692 * util/i386/pc/grub-mkrescue.in: Add "set -e".
4693 Add --pkglibdir=DIR option to override pkglibdir.
4694 Mention --image-type=TYPE in help output.
4695 Fix --grub-mkimage (it was a no-op).
fe6b695a 4696 Abort gracefully when no parameter is given.
59d31694 4697
7ee367e4 46982007-06-11 Robert Millan <rmh@aybabtu.com>
4699
4700 * util/i386/pc/grub-mkrescue.in: New file.
4701 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
4702 * Makefile.in: Handle bin_SCRIPTS.
4703
29b0ed46 47042007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
4705
4706 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
4707 list of video modes.
4708
c0f90770 47092007-06-06 Robert Millan <rmh@aybabtu.com>
4710
4711 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
4712 file doesn't exist, or if it is in a filesystem grub can't read.
4713
4714 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
4715 not abort if GRUB_DRIVE could not be defined. Rearrange generated
4716 header comment to fit in 80 columns when the variables are resolved.
4717
4718 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
4719 could be identified by update-grub. Remove redundant check for
fe6b695a 4720 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 4721 handles that).
4722
fb36dc26 47232007-06-04 Robert Millan <rmh@aybabtu.com>
4724
4725 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
4726
4727 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
4728
4729 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
4730
0c68c93e 47312007-06-04 Robert Millan <rmh@aybabtu.com>
4732
4733 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
4734
4735 * include/grub/partition.h: Declare grub_apple_partition_map_init and
4736 grub_apple_partition_map_fini.
4737
4738 * util/biosdisk.c
4739 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
4740 to access >2 TiB disks).
4741
4742 Print disk->total_sectors with %llu instead of %lu, since this
4743 variable is always 64-bit (prevents wrong disk size from being displayed
4744 on either >2 TiB disk or big-endian CPU).
4745
4746 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
4747 into a generic case that supports all (sane) partition maps.
4748
4749 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
4750 breaks big-endian.
4751
4752 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
4753 and grub_apple_partition_map_fini() after that.
4754
0f23eb74 47552007-06-01 Robert Millan <rmh@aybabtu.com>
4756
4757 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
4758
4759 * util/grub.d/00_header.in: Only enable gfxterm when
4760 convert_system_path_to_grub_path() succeeds.
4761
42c71976 47622007-05-20 Robert Millan <rmh@aybabtu.com>
4763
4764 * util/update-grub_lib.in: New file.
4765 * DISTLIST: Add update-grub_lib.in.
4766 * conf/common.rmk: Generate update-grub_lib and install it in
4767 $(lib_DATA).
4768 * Makefile.in: Add install routine for $(lib_DATA).
4769
4770 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
4771 function provided by update-grub_lib to support arbitrary paths of
4772 unifont.pff.
4773 * util/update-grub.in: Use convert_system_path_to_grub_path() to
4774 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
4775
5beb2291 47762007-05-19 Robert Millan <rmh@aybabtu.com>
4777
4778 * commands/i386/cpuid.c: New module.
4779 * DISTLIST: Add it.
4780 * conf/i386-efi.rmk: Enable cpuid.mod.
4781 * conf/i386-pc.rmk: Likewise.
4782
7262eca1 47832007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4784
4785 * kern/disk.c (grub_disk_read): Check return value of
4786 grub_realloc().
4787
260ba823 47882007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4789
4790 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
4791 arrays.
4792 * disk/raid.c (grub_raid_open): Likewise.
4793
1ecb6cf2 47942007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4795
4796 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
4797 stack instead of on the heap.
4798
4799 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
4800 before doing a read on it.
4801
4802 * configure.ac: Only use -fno-stack-protector for the target
4803 environment.
f19dbdb7 4804
21c8cbb1 48052007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4806
4807 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
4808 __attribute_ ((unused)) to mode_type argument.
4809
4810 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 4811
21c8cbb1 4812 * kern/misc.c (memcmp): Fix prototype.
4813
4814 * include/grub/partition.h [GRUB_UTIL]
4815 (grub_gpt_partition_map_init): Add prototype.
4816 (grub_gpt_partition_map_fini): Likewise.
4817
4818 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
4819 at the right place.
4820
4821 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
4822 (grub_fat_read_data): Likewise.
4823 (grub_fat_find_dir): Likewise.
4824
4825 * font/manager.c (find_glyph): Make table a const.
4826 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 4827
849d55d3 48282007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
4829
4830 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
4831 code, first search for device in /dev/mapper, then in /dev.
4832 (grub_util_get_grub_dev): New function.
4833 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
4834 prototype.
4835 * util/grub-probe.c (probe): Remove check for RAID, call
4836 grub_util_get_grub_dev() instead of
4837 grub_util_biosdisk_get_grub_dev().
4838 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
4839 grub_util_biosdisk_get_grub_dev().
4840 * util/i386/pc/grub-setup.c (main): Likewise.
4841
8fff7c2f 48422007-05-16 Robert Millan <rmh@aybabtu.com>
4843
4844 * DISTLIST: Update for the latest changes.
4845 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
4846 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
4847 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
4848 grub/util/biosdisk.h.
4849 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
4850 grub/util/biosdisk.h.
4851
48e12b52 48522007-05-16 Robert Millan <rmh@aybabtu.com>
4853
4854 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
4855
46b9d128 48562007-05-16 Robert Millan <rmh@aybabtu.com>
4857
4858 * util/i386/efi/grub-install.in: New.
4859 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
4860 newly added grub-install.
4861 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
4862 include.
4863 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
4864 grub/util/biosdisk.h.
4865 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
4866 grub/util/biosdisk.h.
4867
2d1a40a9 48682007-05-16 Robert Millan <rmh@aybabtu.com>
4869
4870 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
4871 * include/grub/util/biosdisk.h: ... here.
4872 * util/i386/pc/biosdisk.c: Moved to ...
4873 * util/biosdisk.c: ... here.
4874 * util/i386/pc/getroot.c: Moved to ...
4875 * util/getroot.c: ... here.
4876 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
4877 * util/grub-mkdevicemap.c: ... here.
4878 * util/i386/pc/grub-probe.c: Moved to ...
4879 * util/grub-probe.c: ... here.
4880
9e26e3bc 48812007-05-15 Robert Millan <rmh@aybabtu.com>
4882
4883 * util/update-grub.in: Remove duplicated line in grub.cfg header
4884 message.
4885
57f96397 48862007-05-13 Robert Millan <rmh@aybabtu.com>
4887
4888 * util/update-grub.in: Fix a few assumptions about the devices holding
4889 /, /boot and /boot/grub being the same.
4890 * util/grub.d/00_header.in: Likewise.
4891 * util/grub.d/10_hurd.in: Likewise.
4892 * util/grub.d/10_linux.in: Likewise.
4893
4894 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
4895 patterns. Use that to define the `.old' suffix as older than `'.
4896
4897 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
4898
4899 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
4900 the grub.cfg header message.
4901
2e610d62 49022007-05-11 Robert Millan <rmh@aybabtu.com>
4903
4904 * util/update-grub.in: Create device.map if it doesn't already exist,
4905 before attempting to run grub-probe.
4906 Check for grub-probe and grub-mkdevicemap with the same code
4907 grub-install is using.
4908 Remove test mode.
4909
3f6a10ef 49102007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
4911
4912 * Makefile.in: Add the datarootdir autoconf variable.
4913
02e7b75e 49142007-05-09 Robert Millan <rmh@aybabtu.com>
4915
4916 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 4917 fail gracefully if dev->disk->partition == NULL.
02e7b75e 4918
75f396cc 49192007-05-07 Robert Millan <rmh@aybabtu.com>
4920
4921 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
4922 determine partition map module.
4923 * util/i386/pc/grub-install.in: Use this feature to decide which
4924 partition module to load, instead of hardcoding pc and gpt.
4925
da65cb36 49262007-05-07 Robert Millan <rmh@aybabtu.com>
4927
4928 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
4929 source directory differs from build directory.
4930
b57d6a91 49312007-05-05 Robert Millan <rmh@aybabtu.com>
4932
4933 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
4934 initialisation.
4935
509d00f1 49362007-05-05 Robert Millan <rmh@aybabtu.com>
4937
4938 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
4939
c48f23ef 49402007-05-05 Robert Millan <rmh@aybabtu.com>
4941
4942 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
4943 command-line arguments via ${GRUB_CMDLINE_LINUX}.
4944
20b97658 49452007-05-05 Robert Millan <rmh@aybabtu.com>
4946
4947 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
4948 (grub_probe_SOURCES): Likewise.
4949 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
4950 GPT and initialize dos_part and bsd_part accordingly.
4951 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
4952 install_bsd_part.
4953 (main): Activate gpt module for use during partition identification,
4954 and deactivate it afterwards.
4955 * util/i386/pc/grub-install.in: Add gpt module to core.img.
4956 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
4957 partition identification, and deactivate it afterwards.
4958
99123174 49592007-05-05 Robert Millan <rmh@aybabtu.com>
4960
4961 * term/i386/pc/console.c (grub_console_fini): Call
4962 grub_term_set_current() before grub_term_unregister().
4963
ebd97f6e 49642007-05-04 Robert Millan <rmh@aybabtu.com>
4965
4966 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
4967 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
4968 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
4969 and update-grub_DATA.
4970 * conf/common.rmk: Build and install update-grub components.
4971 * conf/common.mk: Regenerate.
4972 * util/update-grub.in: New. Core of update-grub.
4973 * util/grub.d/00_header.in: New. Generates grub.cfg header.
4974 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
4975 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
4976 * util/grub.d/README: New. Document grub.d directory layout.
4977
b06a264d 49782007-05-01 Robert Millan <rmh@aybabtu.com>
4979
4980 * util/grub-emu.c: Move initialization functions
4981 grub_util_biosdisk_init() and grub_init_all() before
4982 grub_util_biosdisk_get_grub_dev(), which relies on them.
4983
41f0050e 49842007-04-19 Robert Millan <rmh@aybabtu.com>
4985
4986 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
4987 it is used later.
4988
04582bb3 49892007-04-18 Jerone Young <jerone@gmail.com>
4990
f19dbdb7 4991 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 4992 stanza.
4993
08db4632 49942007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 4995
08db4632 4996 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
4997 continue on and look for device node with real device name.
4998
801b76be 49992007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 5000
fe6b695a 5001 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 5002 ability.
5003 * Makefile.in: Add autoconf package transformation code.
5004 * util/i386/pc/grub-install.in: Likewise.
5005 * util/powerpc/ieee1275/grub-install.in: Likewise.
5006
6795c4e1 50072007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
5008
5009 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
5010 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
5011 (EXT2_REVISION): Likewise.
5012 (EXT2_INODE_SIZE): Likewise.
5013 (struct grub_ext2_block_group): Added a missing member
5014 "used_dirs".
5015 (grub_ext2_read_inode): Divide by the inode size in a superblock
5016 instead of 128 to obtain INODES_PER_BLOCK.
5017 Use the macro EXT2_INODE_SIZE instead of directly using
5018 SBLOCK->INODE_SIZE.
5019
d70af616 50202007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
5021
5022 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
5023 superblock instead of the structure size to compute an
5024 offset. This fixes the problem that GRUB could not read a
5025 filesystem when inode size is different from 128-byte.
5026
3b801603 50272007-03-05 Marco Gerards <marco@gnu.org>
5028
5029 * normal/main.c (read_config_file): When "menu" is not set, create
5030 an initial context.
5031
4785bfe4 50322007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5033
5034 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
5035 (HEAP_LIMIT): New macro.
5036 (grub_claim_heap): Claim memory up to `heaplimit'.
5037
a0cbb023 50382007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5039
5040 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
5041 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
5042 (_start): Likewise.
5043 (grub_arch_modules_addr): Return address after `_end'.
5044 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
5045 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
5046 (add_segments): Calculate `_end' from phdr size and location.
5047 (ALIGN_UP): Moved to ...
5048 * include/grub/misc.h: here.
5049 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5050 New macro.
5051 (GRUB_IEEE1275_MODULE_BASE): Removed.
5052
fd7d8eba 50532007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5054
5055 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
5056 loop boundary.
5057
9b09e6fc 50582007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5059
5060 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
5061 All users updated.
5062 (grub_elf64_load_hook_t): Likewise.
5063 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
5064 debug output.
5065
3ce27299 50662007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5067
5068 * kern/mm.c: Update copyright.
5069 (grub_mm_debug): Correct syntax error.
5070 (grub_mm_dump_free): New function.
5071 (grub_debug_free): Call `grub_free'.
5072 * include/grub/mm.h: Update copyright.
5073 (grub_mm_dump_free): Add declaration.
5074
077d5fee 50752007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5076
5077 * include/grub/ieee1275/ieee1275.h: Update copyright.
5078 * kern/powerpc/ieee1275/init.c: Likewise.
5079 * kern/powerpc/ieee1275/openfw.c: Likewise.
5080
5081 * loader/powerpc/ieee1275/linux.c: Likewise.
5082 * include/grub/elfload.h: Likewise.
5083 * kern/elf.c: Likewise.
5084 (grub_elf32_load): Pass `base' and `size' parameters. Update all
5085 callers.
5086 (grub_elf64_load): Likewise.
5087 (grub_elf32_load_segment): Move to a nested function.
5088 (grub_elf64_load_segment): Likewise.
5089
dc946850 50902007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5091
5092 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
5093 prototype.
5094 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
5095 (grub_heap_len): Likewise.
5096 (HEAP_SIZE): New macro.
5097 (grub_claim_heap): New function.
5098 (grub_machine_init): Don't claim heap directly. Call
5099 `grub_claim_heap'.
5100 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
5101 (grub_available_iterate): New function.
5102
baa2a121 51032007-02-03 Thomas Schwinge <tschwinge@gnu.org>
5104
5105 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
5106 * configure.ac: Use it for testing the HOST and TARGET compilers.
5107
4fe9862e 51082006-12-13 Thomas Schwinge <tschwinge@gnu.org>
5109
5110 * Makefile.in (enable_grub_emu): New variable.
5111 * configure.ac (--enable-grub-emu): New option.
5112 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
5113 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
5114 * conf/i386-pc.rmk: Likewise.
5115 * conf/powerpc-ieee1275.rmk: Likewise.
5116 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
5117
a8aa5762 51182006-12-12 Marco Gerards <marco@gnu.org>
5119
5120 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5121
5122 * kern/env.c (grub_env_unset): Don't free the member `value' when
5123 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5124 pointer.
5125
5126 * normal/main.c (current_menu): Removed.
5127 (free_menu): Unset the `menu' environment variable.
5128 (grub_normal_menu_addentry): Make use of the environment variable
5129 `menu', instead of using the global `current_menu'. Allocate
5130 memory for the sourcecode of this entry.
5131 (read_config_file): New argument `nested', changed all callers.
5132 Only in the case of a new context, initialize a new menu. Set the
5133 `menu' environment variable.
5134 (grub_normal_execute): Don't set and unset the environment
5135 variable `menu' here anymore. Only free the menu when leaving the
5136 context.
5137
5138 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5139 leak.
5140
957b3a3e 51412006-12-11 Marco Gerards <marco@gnu.org>
5142
5143 * normal/menu_entry.c (run): Fix off by one bug so the last line
5144 is executed. Move the loader check to outside the loop.
5145
ef875714 51462006-12-08 Hollis Blanchard <hollis@penguinppc.org>
5147
5148 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5149
4e739985 51502006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
5151
5152 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5153 the number of sectors. Reported by Andrey Shuvikov
5154 <mr_hyro@yahoo.com>.
f19dbdb7 5155
790707f2 51562006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
5157
5158 * kern/disk.c (grub_disk_read): When there is a read error, always
5159 try to read only the necessary data.
f19dbdb7 5160
790707f2 5161 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5162 disk/raid.c.
5163 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5164 prototype.
5165 [GRUB_UTIL] (grub_raid_fini): Likewise.
5166 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 5167 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 5168 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5169 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5170 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5171 and grub_raid_fini().
f19dbdb7 5172
03e58196 51732006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5174
5175 * include/grub/types.h (__unused): Rename to UNUSED.
5176 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5177 (grub_elf64_size): Likewise.
f19dbdb7 5178
ae4f23bf 51792006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5180
5181 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5182 grub_error_push and grub_error_pop in the error-handling path.
5183 (grub_elf32_load_segment): Only call grub_file_read with non-zero
5184 length.
5185
2166cc83 51862006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5187
5188 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5189 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5190 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5191 (kernel_elf_SOURCES): Likewise.
5192 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5193 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5194 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5195 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5196 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5197 (elf_mod_SOURCES): New variable.
5198 (elf_mod_CFLAGS): Likewise.
5199 (elf_mod_LDFLAGS): Likewise.
5200 * include/grub/types.h (__unused): New macro.
5201 * include/grub/elfload.h: New file.
5202 * kern/elf.c: Likewise.
5203 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5204 (ELF32_LOADMASK): New macro.
5205 (ELF64_LOADMASK): Likewise.
5206 (vmlinux): Removed.
5207 (grub_linux_load32): New function.
5208 (grub_linux_load64): Likewise.
5209 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5210 Use grub_elf_t instead of grub_file_t.
5211
a09d5aa5 52122006-11-02 Hollis Blanchard <hollis@penguinppc.org>
5213
5214 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5215 `catch_result' to struct set_color_args.
5216
d976fc51 52172006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5218
5219 * normal/menu.c: Include grub/script.h.
5220 * normal/menu_entry.c: Likewise.
5221 * include/grub/normal.h: Do not include grub/script.h.
5222
67507549 52232006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5224
5225 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5226
69203a99 52272006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5228
5229 * kern/disk.c (grub_disk_open): Print debug messages when opening a
5230 disk.
5231 (grub_disk_close): Print debug messages when closing a disk.
5232 (grub_disk_read): Print debug messages when disk read fails.
5233 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5234 filesystem type.
5235 * kern/partition.c: Include misc.h.
5236 (grub_partition_iterate): Print debug messages when detecting
5237 partition type.
5238
e2b8278c 52392006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5240
5241 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5242 is negative.
5243 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5244
97b2f2ff 52452006-10-26 Hollis Blanchard <hollis@penguinppc.org>
5246
5247 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5248 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5249
6555d655 52502006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
5251
5252 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5253 instead of sizeof(lv). Patch by Michael Guntsche.
5254
4d42b77f 52552006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
5256
5257 * disk/lvm.c: Rename VGS to VG_LIST.
5258 (grub_lvm_iterate): Change VGS->LV to VG-LV.
5259 (grub_lvm_open): Likewise.
5260 Thanks to Michael Guntsche for finding this bug.
5261
5d74d927 52622006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5263
5264 * configure.ac (AC_INIT): Bumped to 1.95.
5265
a1bb27e4 52662006-10-14 Robert Millan <rmh@aybabtu.com>
5267
5268 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5269 with "/dev/.static/dev/md".
5270
e0994b8b 52712006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5272
5273 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5274 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5275 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5276 DRIVE_NAME are always freed.
5277
5278 * util/i386/pc/biosdisk.c (make_device_name): Add one into
5279 DOS_PART, as a DOS partition is counted from one instead of zero
5280 now. Reported by Robert Millan.
5281
ddd5cee9 52822006-10-14 Robert Millan <rmh@aybabtu.com>
5283
5284 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5285 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5286 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5287 string returned by grub_guess_root_device.
5288 * util/i386/pc/grub-setup.c: Likewise.
5289 * util/i386/pc/grub-probefs.c: Likewise.
5290
5291 * util/i386/pc/grub-probefs.c: Rename to ...
5292 * util/i386/pc/grub-probe.c: ... this.
5293 * DISTLIST: Remove grub-probefs, add grub-probe.
5294 * conf/i386-efi.rmk: Likewise.
5295 * conf/i386-pc.rmk: Likewise.
5296 * util/i386/pc/grub-install.in: Likewise.
5297
5298 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5299 choose which information we want to print.
5300
2b002173 53012006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5302
5303 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5304 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5305 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5306 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5307 video/readers/tga.c and video/i386/pc/vbeutil.c.
5308
53092006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
5310
5311 Added support for RAID and LVM.
f19dbdb7 5312
2b002173 5313 * disk/lvm.c: New file.
5314 * disk/raid.c: Likewise.
5315 * include/grub/lvm.h: Likewise.
f19dbdb7 5316 * include/grub/raid.h: Likewise.
2b002173 5317 * include/grub/util/lvm.h: Likewise.
5318 * include/grub/util/raid.h: Likewise.
5319 * util/lvm.c: Likewise.
5320 * util/raid.c: Likewise.
5321
5322 * include/grub/disk.h (grub_disk_dev_id): Add
5323 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
5324 (grub_disk_get_size): New prototype.
5325 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
5326 returns a partition.
5327 (grub_disk_get_size): New function.
f19dbdb7 5328
2b002173 5329 * kern/i386/pc/init.c (make_install_device): Copy the prefix
5330 verbatim if grub_install_dos_part is -2.
5331
5332 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
5333 and LVM devices.
5334
5335 * util/i386/pc/grub-setup.c (setup): New argument
5336 MUST_EMBED. Force embedding of GRUB when the argument is
5337 true. Close FILE before returning.
5338 (main): Add support for RAID and LVM.
f19dbdb7 5339
2b002173 5340 * conf/common.rmk: Add RAID and LVM modules.
5341 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
5342 util/lvm.c.
5343 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
5344
5345 * kern/misc.c (grub_strstr): New function.
5346 * include/grub/misc.h (grub_strstr): New prototype.
5347
050548d0 53482006-10-10 Tristan Gingold <tristan.gingold@bull.net>
5349
5350 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
5351
da849d2d 53522006-10-05 Tristan Gingold <tristan.gingold@bull.net>
5353
5354 * kern/misc.c (grub_strtoull): Guess the base only if not
5355 specified.
5356
97b2f2ff 53572006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 5358
5359 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
5360 PowerMac support.
5361
97b2f2ff 53622006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 5363
5364 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
5365
5366 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
5367 Remove `flags' argument. All callers changed.
5368 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
5369 (IEEE1275_IHANDLE_INVALID): New variable.
5370 (IEEE1275_CELL_INVALID): New variable.
5371 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5372 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
5373 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
5374 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
5375 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
5376 codes from Open Firmware. All callers updated.
5377 (grub_ieee1275_next_property): Directly return Open Firmware return
5378 code.
5379 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5380 Standardize error checking from `grub_ieee1275_get_property'.
5381 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
5382 `devalias' to `aliases'. Correct comments. Consolidate error paths.
5383
97b2f2ff 53842006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 5385
5386 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
5387 `instance_to_package_args' to `instance_to_path_args'.
5388
5389 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
5390 `grub_ieee1275_chosen'.
5391
5392 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
5393 `grub_ieee1275_interpret'.
5394
97b2f2ff 53952006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 5396
5397 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
5398
97b2f2ff 53992006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 5400
5401 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
5402 (__cmpdi): Likewise.
5403
5404 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
5405 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
5406 `grub_ssize_t'.
5407
02bb8acc 5408 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 5409
5410 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
5411 to type `grub_ssize_t'.
5412 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
5413
7f9a8531 54142006-09-22 Marco Gerards <marco@gnu.org>
5415
5416 * normal/script.c (grub_script_create_cmdmenu): Skip leading
5417 newlines.
5418
b5ef1102 54192006-09-22 Marco Gerards <marco@gnu.org>
5420
5421 * commands/echo.c: New file.
5422
5423 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
5424
5425 * conf/common.rmk (echo_mod_SOURCES): New variable.
5426 (echo_mod_CFLAGS): Likewise.
5427 (echo_mod_LDFLAGS): Likewise.
5428
2cff3677 54292006-09-22 Marco Gerards <marco@gnu.org>
5430
5431 * normal/main.c (get_line): Malloc memory instead of using
5432 preallocated memory. Removed the arguments `cmdline' and
5433 `max_len'. Updated all callers.
5434
6ba4688b 54352006-09-22 Marco Gerards <marco@gnu.org>
5436
5437 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
5438 (normal_mod_DEPENDENCIES): Likewise.
5439
5440 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
5441 (normal_mod_DEPENDENCIES): Likewise.
5442
5443 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
5444
e02ac02c 54452006-09-22 Johan Rydberg <jrydberg@gnu.org>
5446
5447 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
5448 programs.
5449 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
5450 (normal_mod_DEPENDENCIES): Likewise.
5451 * conf/i386-pc.mk: Regenerate.
5452 * conf/i386-efi.mk: Likewise
5453 * conf/common.mk: Likewise.
5454 * conf/powerpc-ieee1275.mk: Likewise.
5455 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 5456
8d252e44 54572006-09-22 Robert Millan <rmh@aybabtu.com>
5458
5459 Sync with i386 version.
5460 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
5461 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
5462
209bf7ac 54632006-09-21 Robert Millan <rmh@aybabtu.com>
5464
5465 Import from GRUB Legacy (lib/device.c):
5466 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
5467 (init_device_map) [__linux__]: Add support for I2O devices.
5468
6b146090 54692006-09-14 Marco Gerards <marco@gnu.org>
5470
5471 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
5472 `-melf_i386'.
5473
e38600a8 54742006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 5475
5476 * util/i386/pc/grub-install.in: Skip menu.lst when removing
5477 /boot/grub/*.lst.
78fa1790 5478
2952da5d 5479 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 5480
2952da5d 5481 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
5482 before adding it to device.map.
5483
01b82a64 54842006-08-15 Johan Rydberg <jrydberg@gnu.org>
5485
fe6b695a 5486 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 5487 compiles a file; using the -MD option.
5488 * conf/common.mk: Regenerate.
5489 * conf/i386-pc.mk: Likewise.
5490 * conf/i386-efi.mk: Likewise.
5491 * conf/powerpc-ieee1275.mk: Likewise.
5492 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 5493
1064790d 54942006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
5495
5496 Move the prototypes of grub_setjmp and grub_longjmp to
5497 cpu/setjmp.h, so that each architecture may specify different
5498 attributes.
f19dbdb7 5499
1064790d 5500 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
5501 (grub_longjmp): Likewise.
5502 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
5503 (grub_longjmp): Likewise.
5504 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
5505 (grub_longjmp): Likewise.
5506
5507 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
5508 [!GRUB_UTIL] (grub_longjmp): Removed.
5509
29dda3ed 55102006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
5511
5512 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
5513 "color!" method does not return any value.
5514
ad2a06ed 55152006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5516
5517 * include/grub/bitmap.h: New file.
5518
5519 * include/grub/i386/pc/vbeutil.h: Likewise.
5520
5521 * video/bitmap.c: Likewise.
5522
5523 * video/readers/tga.c: Likewise.
5524
5525 * video/i386/pc/vbeutil.c: Likewise.
5526
5527 * commands/videotest.c: Code cleanup and updated to reflect to new
5528 video API.
5529
5530 * term/gfxterm.c: Likewise.
5531
5532 * video/video.c: Likewise.
5533
5534 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
5535 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
5536 (bitmap_mod_SOURCES): New entry.
5537 (bitmap_mod_CFLAGS): Likewise.
5538 (bitmap_mod_LDFLAGS): Likewise.
5539 (tga_mod_SOURCES): Likewise.
5540 (tga_mod_CFLAGS): Likewise.
5541 (tga_mod_LDFLAGS): Likewise.
5542
5543 * include/grub/video.h (grub_video_blit_operators): New enum type.
5544 (grub_video_render_target): Changed as forward declaration and moved
5545 actual definition to be video driver specific.
5546 (grub_video_adapter.blit_bitmap): Added blitting operator.
5547 (grub_video_adapter.blit_render_target): Likewise.
5548 (grub_video_blit_bitmap): Likewise.
5549 (grub_video_blit_render_target): Likewise.
5550
5551 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
5552 driver specific render target definition.
5553 (grub_video_vbe_map_rgba): Added driver internal helper.
5554 (grub_video_vbe_unmap_color): Updated to use
5555 grub_video_i386_vbeblit_info.
5556 (grub_video_vbe_get_video_ptr): Likewise.
5557
5558 * include/grub/i386/pc/vbeblit.h
5559 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
5560 grub_video_i386_vbeblit_info.
5561 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5562 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5563 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5564 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5565 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5566 (grub_video_i386_vbeblit_index_index): Likewise.
5567 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
5568 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5569 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5570 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
5571 operator.
5572 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
5573 operator.
5574
5575 * video/i386/pc/vbeblit.c: Updated to reflect changes on
5576 include/grub/i386/pc/vbeblit.h.
5577
5578 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
5579 Updated to use grub_video_i386_vbeblit_info.
5580 (grub_video_i386_vbefill_R8G8B8): Likewise.
5581 (grub_video_i386_vbefill_index): Likewise.
5582 (grub_video_i386_vbefill): Added generic filler.
5583
5584 * video/i386/pc/vbefill.c: Updated to reflect changes on
5585 include/grub/i386/pc/vbefill.h.
5586
5587 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
5588 grub_video_i386_vbeblit_info.
5589 (grub_video_vbe_unmap_color): Likewise.
5590 (grub_video_vbe_blit_glyph): Likewise.
5591 (grub_video_vbe_scroll): Likewise.
5592 (grub_video_vbe_draw_pixel): Removed function.
5593 (grub_video_vbe_get_pixel): Likewise.
5594 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
5595 updated code to use it.
5596 (common_blitter): Added common blitter for render target and bitmap.
5597 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
5598 (grub_video_vbe_blit_render_target): Likewise.
5599
bc8c036d 56002006-07-30 Johan Rydberg <jrydberg@gnu.org>
5601
5602 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
5603 is in text mode if there is no console control protocol instance
5604 available.
5605
684a8eff 56062006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5607
5608 * include/grub/video.h: Code cleanup.
5609
5610 * include/grub/i386/pc/vbe.h: Likewise.
5611
5612 * video/i386/pc/vbe.c: Likewise.
5613
5614 * video/i386/pc/vbeblit.c: Likewise.
5615
5616 * video/i386/pc/vbefill.c: Likewise.
5617
5618 * video/video.c: Likewise. Also added more comments.
5619
5915059b 56202006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5621
5622 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
5623 (struct grub_biosdisk_dap): Likewise.
5624
5625 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
5626 linkage settings for all functions.
5627
90ce5d56 56282006-07-12 Marco Gerards <marco@gnu.org>
5629
5630 * configure.ac (--enable-mm-debug): Fix typo.
5631
5632 * genkernsyms.sh.in: Use proper quoting for `CC'.
5633
43e7f879 56342006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
5635
5636 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
5637 (normal_mod_ASFLAGS): Remove "-m32".
5638
4889bdec 56392006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
5640
5641 * util/misc.c: Include config.h.
5642 [!HAVE_MEMALIGN]: Do not include malloc.h.
5643 (grub_memalign): Use posix_memalign, if present. Then, use
5644 memalign, if present. Otherwise, emit an error.
5645
5646 * util/grub-emu.c: Do not include malloc.h.
5647
5648 * include/grub/util/misc.h: Include unistd.h. This is required for
5649 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
5650 D. Eades III <hde@foobar-qux.org>.
5651
5652 * configure.ac (AC_GNU_SOURCE): Added.
5653 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
5654 type.
5655
fd39d4da 56562006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
5657
5658 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
5659 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
5660
b786f3b5 56612006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
5662
5663 * include/grub/types.h (grub_host_addr_t): Rename to
5664 grub_target_addr_t.
5665 (grub_host_off_t): Rename to grub_target_off_t.
5666 (grub_host_size_t): Rename to grub_target_size_t.
5667 (grub_host_ssize_t): Rename to grub_target_ssize_t.
5668 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
5669
5670 * include/grub/kernel.h (struct grub_module_header): Change type
5671 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
5672 (grub_module_info): Likewise.
f19dbdb7 5673
051988bb 56742006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5675
5676 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
5677 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
5678 Velazquez <jesus.velazquez@gmail.com>.
5679
deae281b 56802006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5681
5682 Count partitions from 1 instead of 0 in the string representation
5683 of partitions. Still use 0-based internally.
f19dbdb7 5684
deae281b 5685 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
5686 (sun_partition_map_iterate): Use grub_partition_t instead of
5687 struct grub_partition *. Cast DESC->START_CYLINDER to
5688 grub_uint64_t after converting the endian.
5689 (sun_partition_map_probe): Subtract 1 for PARTNUM.
5690 (sun_partition_map_get_name): Add 1 to P->INDEX.
5691
5692 * partmap/pc.c (grub_partition_parse): Subtract 1 for
5693 PCDATA->DOS_PART.
5694 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
5695
5696 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
5697 zero instead of one.
5698 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
5699 (gpt_partition_map_get_name): Add 1 into P->INDEX.
5700
5701 * partmap/apple.c (apple_partition_map_iterate): Change the type
5702 of POS to unsigned.
5703 (apple_partition_map_probe): Subtract 1 for PARTNUM.
5704 (apple_partition_map_get_name): Add 1 into P->INDEX.
5705
5706 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
5707 of POS to unsigned.
5708 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
5709 calculate the offset of a partition.
5710 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
5711 (amiga_partition_map_get_name): Add 1 into P->INDEX.
5712
5713 * partmap/acorn.c (acorn_partition_map_find): Change the type of
5714 SECTOR to grub_disk_addr_t.
5715 (acorn_partition_map_iterate): Likewise.
5716 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
5717 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
5718 top.
5719 (acorn_partition_map_get_name): Add 1 into P->INDEX.
5720
5721 * kern/i386/pc/init.c (make_install_device): Add 1 into
5722 GRUB_INSTALL_DOS_PART.
5723
5724 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
5725 conditional.
5726
524a1e6a 57272006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5728
5729 Clean up the code to support 64-bit addressing in disks and
5730 files. This change is not enough for filesystems yet.
f19dbdb7 5731
524a1e6a 5732 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
5733 type of "start" to grub_uint64_t.
5734 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
5735 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
5736 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
5737 convert addresses.
5738
5739 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
5740 to grub_disk_addr_t.
5741
5742 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
5743 string.
5744
5745 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5746
5747 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
5748 to char *.
5749
5750 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
5751
5752 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
5753
5754 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
5755
5756 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
5757 to grub_off_t, to detect an error from grub_file_seek.
5758 (grub_multiboot_load_elf32): Likewise.
5759
5760 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
5761 maximum unsigned long value when an overflow is detected.
5762 (grub_strtoull): New function.
5763 (grub_divmod64): Likewise.
5764 (grub_lltoa): use grub_divmod64.
5765
5766 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
5767 grub_disk_addr_t.
5768 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
5769 the pointer to next character. Use grub_strtoull instead of
5770 grub_strtoul.
5771 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
5772 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
5773 respectively.
5774
fe6b695a 5775 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 5776 return value is signed.
5777 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
5778 test if OFFSET is less than zero, as OFFSET is unsigned now.
5779
5780 * kern/disk.c (struct grub_disk_cache): Change the type of
5781 "sector" to grub_disk_addr_t.
5782 (grub_disk_cache_get_index): Change the type of SECTOR to
5783 grub_disk_addr_t. Calculate the hash with SECTOR casted to
5784 unsigned after shifting.
5785 (grub_disk_cache_invalidate): Change the type of SECTOR to
5786 grub_disk_addr_t.
5787 (grub_disk_cache_unlock): Likewise.
5788 (grub_disk_cache_store): Likewise.
5789 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
5790 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
5791 grub_disk_addr_t and grub_uint64_t, respectively.
5792 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
5793 body, as the value of OFFSET is tweaked by
5794 grub_disk_check_range. Change the types of START_SECTOR, LEN and
5795 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
5796 respectively.
5797 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
5798 body, as the value of OFFSET is tweaked by
5799 grub_disk_check_range. Change the types of LEN and N to
5800 grub_size_t.
5801
5802 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
5803 and "saved_offset" to grub_off_t.
5804 (test_header): Cast BUF to char *.
5805 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
5806 to char *.
5807 (grub_gzio_read): Change the types of OFFSET and SIZE to
5808 grub_off_t and grub_size_t, respectively.
5809
5810 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
5811 Removed.
5812 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
5813 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
5814 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
5815 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
5816 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
5817
5818 * include/grub/types.h (grub_off_t): Unconditionally set to
5819 grub_uint64_t.
5820 (grub_disk_addr_t): Changed to grub_uint64_t.
5821
5822 * include/grub/partition.h (struct grub_partition): Change the
5823 types of "start", "len" and "offset" to grub_disk_addr_t,
5824 grub_uint64_t and grub_disk_addr_t, respectively.
5825 (grub_partition_get_start): Return grub_disk_addr_t.
5826 (grub_partition_get_len): Return grub_uint64_t.
5827
5828 * include/grub/misc.h (grub_strtoull): New prototype.
5829 (grub_divmod64): Likewise.
5830
5831 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
5832 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
5833 grub_off_t, respectively.
5834 All callers and references changed.
5835
5836 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
5837 grub_size_t in "read".
5838 All callers and references changed.
5839
5840 * include/grub/file.h (struct grub_file): Change the types of
5841 "offset" and "size" to grub_off_t and grub_off_t,
5842 respectively. Change the type of SECTOR to grub_disk_addr_t in
5843 "read_hook".
5844 (grub_file_read): Change the type of LEN to grub_size_t.
5845 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
5846 grub_off_t.
5847 (grub_file_size): Return grub_off_t.
5848 (grub_file_tell): Likewise.
5849 All callers and references changed.
5850
5851 * include/grub/disk.h (struct grub_disk_dev): Change the types of
5852 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
5853 "write".
5854 (struct grub_disk): Change the type of "total_sectors" to
5855 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 5856 "read_hook".
524a1e6a 5857 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
5858 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
5859 (grub_disk_write): Likewise.
5860 All callers and references changed.
5861
5862 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
5863 char * for grub_strncmp to silence gcc.
5864 (grub_iso9660_mount): Likewise.
5865 (grub_iso9660_mount): Likewise.
5866 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
5867 return statement.
5868 (grub_iso9660_iterate_dir): Likewise.
5869 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
5870
5871 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
5872 LEN to grub_disk_addr_t and grub_size_t, respectively.
5873
5874 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5875
5876 * fs/jfs.c (grub_jfs_read_file): Likewise.
5877
5878 * fs/minix.c (grub_jfs_read_file): Likewise.
5879
5880 * fs/sfs.c (grub_jfs_read_file): Likewise.
5881
5882 * fs/ufs.c (grub_jfs_read_file): Likewise.
5883
5884 * fs/xfs.c (grub_jfs_read_file): Likewise.
5885
5886 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
5887 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
5888 respectively.
5889
5890 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
5891 BLKNR to -1 instead of returning GRUB_ERRNO.
5892 (grub_ext2_read_file): Change the types of SECTOR and
5893 LEN to grub_disk_addr_t and grub_size_t, respectively.
5894
5895 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
5896 LEN to grub_disk_addr_t and grub_size_t, respectively.
5897
5898 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
5899 grub_file_read.
5900
5901 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
5902 string. Do not cast SECTOR explicitly.
5903
5904 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
5905 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
5906 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
5907 grub_disk_addr_t and grub_size_t, respectively. If the sector is
5908 over 2TB and LBA mode is not supported, raise an error.
5909 (get_safe_sectors): New function.
5910 (grub_biosdisk_read): Use get_safe_sectors.
5911 (grub_biosdisk_write): Likewise.
5912
5913 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
5914 (grub_efidisk_write): Likewise.
5915
5916 * disk/loopback.c (delete_loopback): Cosmetic changes.
5917 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
5918 correctly.
5919 (grub_loopback_open): Likewise.
5920 (grub_loopback_read): Likewise. Also, change the type of POS to
5921 grub_off_t, and fix the usage of grub_memset.
5922
5923 * commands/i386/pc/play.c: Include grub/machine/time.h.
5924
5925 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
5926 print FILE->SIZE.
5927
5928 * commands/configfile.c: Include grub/env.h.
5929
5930 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
5931 GRUB_ERRNO directly instead. Change the type of POS to
5932 grub_off_t. Follow the coding standard.
5933
5934 * commands/blocklist.c: Include grub/partition.h.
5935 (grub_cmd_blocklist): Return an error if the underlying device is
5936 not a disk. Take the starting sector of a partition into account,
5937 if a partition is used.
5938
5939 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
5940 a length field.
5941 (lba_mode): Support 64-bit addresses.
5942 (chs_mode): Likewise.
5943 (copy_buffer): Adapted to the new offsets of a length field and a
5944 segment field.
5945 (blocklist_default_start): Allocate 64-bit space.
5946
5947 * boot/i386/pc/boot.S (force_lba): Removed.
5948 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 5949 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 5950 space.
5951 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
5952 is useless.
5953 (lba_mode): Refactored to support a 64-bit address. More size
5954 optimization.
5955 (setup_sectors): Likewise.
5956
53af98ad 59572006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5958
5959 * DISTLIST: Added include/grub/i386/linux.h. Removed
5960 include/grub/i386/pc/linux.h
5961
5962 * configure.ac (AC_INIT): Bumped to 1.94.
5963
5964 * config.guess: Updated from gnulib.
5965 * config.sub: Likewise.
5966 * install-sh: Likewise.
5967 * mkinstalldirs: Likewise.
5968
b4c1940a 59692006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5970
5971 * conf/common.rmk (grub_modules_init.lst): Depended on
5972 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
5973 MODSRCFILES.
5974
5975 * genmk.rb (PModule::rule): Reverted the previous change.
5976
cfca1cfd 59772006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
5978
5979 * conf/common.rmk (grub_modules_init.lst): Depends on
5980 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
5981 that the target does not exist before producing.
5982 (grub_modules_init.h): Remove the target before generating.
5983 (grub_emu_init.c): Likewise.
5984
5985 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
5986
aa6d7826 59872006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
5988
5989 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
5990 for the target-specific tests. Make sure that we also have the
5991 up-to-date target variables for those tests.
5992
26c607b9 59932006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5994
5995 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
5996 (PModule::rule): Likewise.
5997
0162321a 59982006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
5999
6000 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
6001 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
6002 target-specific flags should be prefixed.
6003 (PModule::rule): Likewise.
6004
6c826348 60052006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
6006
6007 * configure.ac (CMP): Check if cmp is available explicitly.
6008
b977bf01 60092006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
6010
6011 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
6012 (target_cpu): New variable.
6013 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 6014
b977bf01 6015 * util/i386/pc/grub-install.in (host_cpu): Removed.
6016 (target_cpu): New variable.
6017 (pkglibdir): Use target_cpu instead of host_cpu.
6018
6019 * util/genmoddep.c: Removed.
f19dbdb7 6020
b977bf01 6021 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
6022 instead of GRUB_HOST_SIZEOF_VOID_P.
6023 * kern/dl.c: Likewise.
6024
6025 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
6026 ...
6027 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6028 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6029 (GRUB_TARGET_SIZEOF_LONG): ... this.
6030 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6031 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6032 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6033 to ...
6034 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6035 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6036 (GRUB_TARGET_SIZEOF_LONG): ... this.
6037 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6038 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6039 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6040 to ...
6041 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6042 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6043 (GRUB_TARGET_SIZEOF_LONG): ... this.
6044 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6045 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6046
6047 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
6048 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
6049 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
6050 instead of GRUB_HOST_SIZEOF_LONG.
6051 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
6052 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
6053 GRUB_CPU_WORDS_BIGENDIAN.
6054 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
6055 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
6056 grub_host_ssize_t.
6057
6058 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
6059 (genmoddep_SOURCES): Likewise.
6060 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
6061 (genmoddep_SOURCES): Likewise.
6062 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
6063 (genmoddep_SOURCES): Likewise.
6064 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
6065 Likewise.
6066 (genmoddep_SOURCES): Likewise.
6067
6068 * genmoddep.awk: New file.
6069
6070 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
6071 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
6072 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
6073 (PModule::rule): Likewise.
6074 (Program::rule): Likewise.
6075 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
6076 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
6077 respectively.
6078
6079 * configure.ac: Rewritten intensively to use host and target
6080 instead of build and host, respectively.
6081
6082 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
6083 (host_cpu): Removed.
6084 (target_cpu): New variable.
6085 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
6086 (BUILD_CC): Removed.
6087 (BUILD_CFLAGS): Likewise.
6088 (BUILD_CPPFLAGS): Likewise.
6089 (TARGET_CC): New variable.
6090 (TARGET_CFLAGS): Likewise.
6091 (TARGET_CPPFLAGS): Likewise.
6092 (TARGET_LDFLAGS): Likewise.
6093 (AWK): Likewise.
6094 (include): Use target_cpu instead of host_cpu.
6095 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 6096
b977bf01 6097 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
6098
f09771a1 60992006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
6100
6101 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
6102 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
6103 field 'false' to 'exec_on_false'.
6104 (grub_script_create_cmdif): Renamed argument names to reflect above
6105 changes.
6106
6107 * normal/execute.c (grub_script_execute_cmdif): Likewise.
6108
6109 * normal/script.c (grub_script_create_cmdif): Likewise.
6110
118f4fb3 61112006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
6112
6113 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
6114 top.
6115 (grub_hfsplus_btree_recptr): Likewise.
6116 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
6117 FILEBLOCK both to pass a block number and store next block
6118 number.
6119 (grub_hfsplus_read_block): Rewritten heavily to support an extent
6120 overflow file correctly. Specify errors appropriately, because
6121 fshelp expects that GRUB_ERRNO is set when fails. Reuse
6122 grub_hfsplus_btree_recptr to get the pointer to a found key.
6123 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6124 is found.
6125
6126 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6127 linux.mod.
6128 (_linux_mod_SOURCES): New variable.
6129 (_linux_mod_CFLAGS): Likewise.
6130 (_linux_mod_LDFLAGS): Likewise.
6131 (linux_mod_SOURCES): Likewise.
6132 (linux_mod_CFLAGS): Likewise.
6133 (linux_mod_LDFLAGS): Likewise.
6134
6135 * DISTLIST: Added loader/i386/efi/linux.c,
6136 loader/i386/efi/linux_normal.c and
6137 include/grub/i386/efi/loader.h.
6138
6139 * loader/i386/efi/linux.c: New file.
6140 * loader/i386/efi/linux_normal.c: Likewise.
6141 * include/grub/i386/efi/loader.h: Likewise.
6142
89a7d726 61432006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
6144
6145 * commands/blocklist.c: New file.
6146
6147 * DISTLIST: Added commands/blocklist.c.
6148
6149 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 6150 color for the background, and a darker color for the foreground.
89a7d726 6151 (grub_console_checkkey): Return READ_KEY.
6152 (grub_console_cls): Set the background to
6153 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6154
6155 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6156
6157 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6158 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6159
6160 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6161 prototype.
6162
6163 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6164 BG. The spec is wrong again.
6165
6166 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6167 prototype.
6168 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6169
6170 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6171 commands/blocklist.c.
6172 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 6173
89a7d726 6174 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6175 (blocklist_mod_SOURCES): New variable.
6176 (blocklist_mod_CFLAGS): Likewise.
6177 (blocklist_mod_LDFLAGS): Likewise.
6178
75c8f258 61792006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
6180
6181 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6182 duplication.
6183 (lba_mode): Use %eax more intensively to reduce the code size.
6184
da2eb181 61852006-05-20 Marco Gerards <marco@gnu.org>
6186
6187 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6188
6189 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
6190 for `menuentry'.
6191 (script): Accept leading newlines.
6192 (newlines): New rule to describe 0 or more newlines.
6193 (commands): Accept `command' with trailing newline. Fixed the
6194 order in which arguments were passed to `grub_script_add_cmd'.
6195 Accept commands separated by newlines.
6196 (function): Changed to accept newlines.
6197 (menuentry) Rewritten.
6198
6199 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6200 front of the list, instead of to the end.
6201
577b4050 62022006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
6203
6204 * util/i386/pc/grub-install.in (bindir): New variable.
6205 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6206 Shaver <lbgwjl@gmail.com>.
6207
0d6e1189 62082006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
6209
6210 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6211 grub/machine/linux.h
6212 * loader/i386/pc/linux.c: Likewise.
6213
6214 * include/grub/i386/pc/linux.h: Moved to ...
6215 * include/grub/i386/linux.h: ... here.
6216
6217 * include/grub/i386/linux.h (struct linux_kernel_params): New
6218 struct.
f19dbdb7 6219
31b86e9f 62202006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
6221
6222 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6223 checking.
6224 (grub_video_vbe_blit_glyph): Likewise.
6225 (grub_video_vbe_blit_bitmap): Likewise.
6226 (grub_video_vbe_blit_render_target): Likewise.
6227
83b984de 62282006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
6229
6230 * configure.ac (--with-platform): Properly quote the square
6231 brackets.
6232
5f0413bd 62332006-05-08 Marco Gerards <marco@gnu.org>
6234
6235 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6236 this...
6237 (kernel_elf_HEADERS): ...to this. Updated all users.
6238 (grubof_symlist.c): Renamed from this...
6239 (kernel_elf_symlist.c): ...to this. Updated all users.
6240 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6241 (grubof_SOURCES): Renamed from this...
6242 (kernel_elf_SOURCES): ...to this.
6243 (grubof_HEADERS): Renamed from this...
6244 (kernel_elf_HEADERS): ...to this.
6245 (grubof_CFLAGS): Renamed from this...
6246 (kernel_elf_CFLAGS): ...to this.
6247 (grubof_ASFLAGS): Renamed from this...
6248 (kernel_elf_ASFLAGS): ...to this.
6249 (grubof_LDFLAGS): Renamed from this...
6250 (kernel_elf_LDFLAGS): ...to this.
6251
6252 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6253 this...
6254 (kernel_elf_HEADERS): ...to this. Updated all users.
6255 (grubof_symlist.c): Renamed from this...
6256 (kernel_elf_symlist.c): ...to this. Updated all users.
6257 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6258 (grubof_SOURCES): Renamed from this...
6259 (kernel_elf_SOURCES): ...to this.
6260 (grubof_HEADERS): Renamed from this...
6261 (kernel_elf_HEADERS): ...to this.
6262 (grubof_CFLAGS): Renamed from this...
6263 (kernel_elf_CFLAGS): ...to this.
6264 (grubof_ASFLAGS): Renamed from this...
6265 (kernel_elf_ASFLAGS): ...to this.
6266 (grubof_LDFLAGS): Renamed from this...
6267 (kernel_elf_LDFLAGS): ...to this.
6268
6269 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6270 `kernel.elf' instead of `grubof'.
6271
05568c2e 62722006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
6273
6274 Add --with-platform to configure. Use pkglibdir instead of
6275 pkgdatadir. This is reported by Roger Leigh.
6276
6277 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6278 (host_vendor): Likewise.
6279 (host_os): Likewise.
6280 (pkgdatadir): Likewise.
6281 (platform): New variable.
6282 (pkglibdir): Likewise.
6283 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 6284
05568c2e 6285 * util/i386/pc/grub-install.in (datadir): Removed.
6286 (host_vendor): Likewise.
6287 (host_os): Likewise.
6288 (pkgdatadir): Likewise.
6289 (platform): New variable.
6290 (pkglibdir): Likewise.
6291 Use PKGLIBDIR instead of PKGDATADIR.
6292
6293 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6294 instead of GRUB_DATADIR.
6295 (main): Likewise.
6296 * util/i386/pc/grub-mkimage.c (usage): Likewise.
6297 (main): Likewise.
6298 * util/i386/efi/grub-mkimage.c (usage): Likewise.
6299 (main): Likewise.
6300
6301 * configure.ac (--with-platform): New option.
6302 Use PLATFORM instead of HOST_VENDOR to specify a platform.
6303
6304 * Makefile.in: Include a makefile based on PLATFORM instead of
6305 HOST_VENDOR.
6306 (pkgdatadir): Not appended by the machine type.
6307 (pkglibdir): Appended by the machine type.
6308 (host_vendor): Removed.
6309 (platform): New variable.
6310 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6311 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6312 (uninstall): Likewise.
6313
4e93851c 63142006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
6315
6316 Use the environment context in the menu. Remove the commands
6317 "default" and "timeout", and use variables instead.
f19dbdb7 6318
4e93851c 6319 * normal/menu.c: Include grub/env.h.
6320 (print_entry): Cast TITLE to silence gcc.
6321 (get_timeout): New function.
6322 (set_timeout): Likewise.
6323 (get_entry_number): Likewise.
6324 (run_menu): Use a default entry, a fallback entry and a timeout
6325 in the environment variables "default", "fallback" and
6326 "timeout". Also, tweak the default entry if it is not within the
6327 current menu entries.
6328 (grub_menu_run): Use a fallback entry in the environment variable
6329 "fallback".
6330
6331 * normal/main.c (read_config_file): Do not initialize
6332 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
6333 NEWMENU->TIMEOUT.
6334 (grub_normal_execute): Use a data slot to store the menu.
6335
6336 * include/grub/normal.h (struct grub_menu): Removed default_entry,
6337 fallback_entry and timeout.
6338 (struct grub_menu_list): Removed.
6339 (grub_menu_list_t): Likewise.
6340 (struct grub_context): Likewise.
6341 (grub_context_t): Likewise.
6342 (grub_context_get): Likewise.
6343 (grub_context_get_current_menu): Likewise.
6344 (grub_context_push_menu): Likewise.
6345 (grub_context_pop_menu): Likewise.
6346 (grub_default_init): Likewise.
6347 (grub_default_fini): Likewise.
6348 (grub_timeout_init): Likewise.
6349 (grub_timeout_fini): Likewise.
6350
6351 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
6352 and timeout.mod.
6353 (normal_mod_SOURCES): Removed normal/context.c.
6354
6355 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
6356 commands/default.c, commands/timeout.c and normal/context.c.
6357 (normal_mod_SOURCES): Removed normal/context.c.
6358
6359 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
6360 commands/timeout.c and normal/context.c.
6361 (normal_mod_SOURCES): Removed normal/context.c.
6362
6363 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
6364 commands/default.c, commands/timeout.c and normal/context.c.
6365 (normal_mod_SOURCES): Removed normal/context.c.
6366
6367 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
6368 timeout.mod.
6369 (default_mod_SOURCES): Removed.
6370 (default_mod_CFLAGS): Likewise.
6371 (default_mod_LDFLAGS): Likewise.
6372 (timeout_mod_SOURCES): Removed.
6373 (timeout_mod_CFLAGS): Likewise.
6374 (timeout_mod_LDFLAGS): Likewise.
6375
6376 * DISTLIST: Removed commands/default.c, commands/timeout.c and
6377 normal/context.c.
6378
6379 * commands/default.c: Removed.
6380 * commands/timeout.c: Likewise.
6381 * normal/context.c: Likewise.
6382
1eb9cc1d 63832006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
6384
6385 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
6386
385bd9c1 63872006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
6388
6389 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
6390 "next" to "prev" for readability.
6391 (struct grub_env_sorted_var): New struct.
6392 (grub_env_context): Renamed to ...
6393 (initial_context): ... this.
6394 (grub_env_var_context): Renamed to ...
6395 (current_context): ... this.
6396 (grub_env_find): Look only at CURRENT_CONTEXT.
6397 (grub_env_context_open): Rewritten to copy exported variables from
6398 previous context.
6399 (grub_env_context_close): Rewritten according to the new
6400 scheme. Also, add an assertion to prevent the initial context from
6401 removed.
6402 (grub_env_insert): Removed the code for the sorted list.
6403 (grub_env_remove): Likewise.
6404 (grub_env_export): Simply mark the variable with
6405 GRUB_ENV_VAR_GLOBAL.
6406 (grub_env_set): A cosmetic change for naming consistency.
6407 (grub_env_get): Likewise.
6408 (grub_env_unset): Likewise.
6409 (grub_env_iterate): Rewritten to sort variables within this
6410 function.
6411 (grub_register_variable_hook): Fixed for naming consistency. Call
6412 grub_env_find again, only if NAME is not found at the first time.
6413 (mangle_data_slot_name): New function.
6414 (grub_env_set_data_slot): Likewise.
6415 (grub_env_get_data_slot): Likewise.
6416 (grub_env_unset_data_slot): Likewise.
6417
6418 * include/grub/env.h (grub_env_var_type): New enum.
6419 (GRUB_ENV_VAR_LOCAL): New constant.
6420 (GRUB_ENV_VAR_GLOBAL): Likewise.
6421 (GRUB_ENV_VAR_DATA): Likewise.
6422 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
6423 "type".
6424 (grub_env_set): Replace VAR with NAME for consistency.
6425 (grub_register_variable_hook): Likewise.
6426 (grub_env_export): Specify the name of the argument.
6427 (grub_env_set_data_slot): New prototype.
6428 (grub_env_get_data_slot): Likewise.
6429 (grub_env_unset_data_slot): Likewise.
6430
7f362539 64312006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6432
6433 Extend the loader so that GRUB can accept a loader which comes
6434 back to GRUB when a loaded image exits. Also, this change adds
6435 support for a chainloader on EFI.
f19dbdb7 6436
7f362539 6437 * term/efi/console.c: Include grub/misc.h.
6438 (grub_console_checkkey): Display a scan code on the top for
6439 debugging. This will be removed once the EFI port gets stable.
6440 Correct the scan code mapping.
6441
6442 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
6443 allocate memory from larger regions, in order to reduce the number
6444 of allocated regions. Otherwise, the MacOSX loader panics.
6445 (filter_memory_map): Avoid less than 1MB for compatibility with
6446 other loaders.
6447 (add_memory_regions): Allocate from the tail of a region, if
6448 possible, to avoid allocating a region near to 1MB, for the MacOSX
6449 loader.
6450
6451 * kern/efi/init.c (grub_efi_set_prefix): Specify
6452 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
6453
6454 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
6455 argument IMAGE_HANDLE and specify it to get a loaded image.
6456 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
6457 grub_efi_get_loaded_image.
fe6b695a 6458 (grub_efi_get_filename): Divide the length by the size of
7f362539 6459 grub_efi_char16_t.
6460 (grub_efi_get_device_path): New function.
6461 (grub_efi_print_device_path): Print End Device Path nodes. Divide
6462 the length by the size of grub_efi_char16_t for a file path device
6463 path node.
6464
6465 * kern/loader.c (grub_loader_noreturn): New variable.
6466 (grub_loader_set): Accept a new argument NORETURN. Set
6467 GRUB_LOADER_NORETURN to NORETURN.
6468 All callers changed.
6469 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
6470 grub_machine_fini.
6471
6472 * include/grub/efi/efi.h (grub_efi_get_device_path): New
6473 prototype.
6474 (grub_efi_get_loaded_image): Take an argument to specify an image
6475 handle.
6476
6477 * include/grub/loader.h (grub_loader_set): Added one more argument
6478 NORETURN.
6479
6480 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
6481 instead of grub_efi_open_protocol.
6482 (grub_efidisk_get_device_name): Likewise.
6483 (grub_efidisk_close): Print a newline.
6484 (grub_efidisk_get_device_handle): Fixed to use
6485 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
6486 GRUB_EFI_DEVICE_PATH_TYPE.
6487
6488 * disk/efi/efidisk.c (device_path_guid): Moved to ...
6489 * kern/efi/efi.c (device_path_guid): ... here.
6490
6491 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
6492 chain.mod.
6493 (kernel_mod_HEADERS): Added efi/disk.h.
6494 (_chain_mod_SOURCES): New variable.
6495 (_chain_mod_CFLAGS): Likewise.
6496 (_chain_mod_LDFLAGS): Likewise.
6497 (chain_mod_SOURCES): Likewise.
6498 (chain_mod_CFLAGS): Likewise.
6499 (chain_mod_LDFLAGS): Likewise.
6500
6501 * DISTLIST: Added include/grub/efi/chainloader.h,
6502 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
6503
6504 * include/grub/efi/chainloader.h: New file.
6505 * loader/efi/chainloader.c: Likewise.
6506 * loader/efi/chainloader_normal.c: Likewise.
6507
c0111d6e 65082006-04-30 Marco Gerards <marco@gnu.org>
6509
6510 * commands/configfile.c (grub_cmd_source): New function.
6511 (GRUB_MOD_INIT): Register the commands `source' and `.'.
6512 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
6513
df5341da 65142006-04-30 Marco Gerards <marco@gnu.org>
6515
6516 * normal/execute.c (grub_script_execute_cmd): Change the return
6517 type to `grub_err_t'. Correctly return the error.
6518 (grub_script_execute_cmdline): In case a command line is not a
6519 command or a function, try to interpret it as an assignment.
6520
f85934bd 65212006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6522
6523 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
6524 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
6525 skip a node whose name is obviously invalid as UTF-16,
6526 i.e. contains a NUL character. Stop the iteration when the last
6527 directory entry is found. Instead of using the return value of
6528 grub_hfsplus_btree_iterate_node, store the value in RET and use
6529 it, because the iterator can be stopped by the last directory
6530 entry.
6531
8f8a2cf8 65322006-04-30 Marco Gerards <marco@gnu.org>
6533
6534 * include/grub/env.h (grub_env_export): New prototype. Reported
6535 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
6536
a27e84ce 65372006-04-30 Marco Gerards <marco@gnu.org>
6538
6539 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
6540 size of the extents in a catalog file record.
6541
eaef0553 65422006-04-29 Marco Gerards <marco@gnu.org>
6543
6544 * commands/configfile.c (grub_cmd_configfile): Execute the
6545 configfile within its own context.
6546
6547 * include/grub/env.h (grub_env_context_open): New prototype.
6548 (grub_env_context_close): Likewise.
6549
6550 * kern/env.c (grub_env): Removed.
6551 (grub_env_sorted): Likewise.
6552 (grub_env_context): New variable.
6553 (grub_env_var_context): Likewise.
6554 (grub_env_find): Search both the active context and the global
6555 context.
6556 (grub_env_context_open): New function.
6557 (grub_env_context_close): Likewise.
6558 (grub_env_insert): Likewise.
6559 (grub_env_remove): Likewise.
6560 (grub_env_export): Likewise.
6561 (grub_env_set): Changed to use helper functions to avoid code
6562 duplication.
6563 (grub_env_iterate): Rewritten so both the current context and the
6564 global context are being used.
6565
6566 * normal/command.c (export_command): New function.
6567 (grub_command_init): Register the `export' function.
6568
7b455f4d 65692006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
6570
6571 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
6572 explicitly to suppress gcc's warnings.
6573 * fs/fat.c (grub_fat_find_dir): Likewise.
6574 (grub_fat_label): Likewise.
6575 * fs/xfs.c (grub_xfs_read_inode): Likewise.
6576 (grub_xfs_mount): Likewise.
6577 (grub_xfs_label): Likewise.
6578 * fs/affs.c (grub_affs_mount): Likewise.
6579 (grub_affs_label): Likewise.
6580 (grub_affs_iterate_dir): Likewise.
6581 * fs/sfs.c (grub_sfs_mount): Likewise.
6582 (grub_sfs_iterate_dir): Likewise.
6583 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
6584 * fs/hfs.c (grub_hfs_mount): Likewise.
6585 (grub_hfs_cmp_catkeys): Likewise.
6586 (grub_hfs_find_dir): Likewise.
6587 (grub_hfs_dir): Likewise.
6588 (grub_hfs_label): Likewise.
6589 * fs/jfs.c (grub_jfs_mount): Likewise.
6590 (grub_jfs_opendir): Likewise.
6591 (grub_jfs_getent): Likewise.
6592 (grub_jfs_lookup_symlink): Likewise.
6593 (grub_jfs_label): Likewise.
6594 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
6595 (grub_hfsplus_iterate_dir): Likewise.
6596 (grub_hfsplus_btree_iterate_node): Made static.
6597
6598 * util/grub-emu.c (prefix): New variable.
6599 (grub_machine_set_prefix): New function.
6600 (main): Do not set the environment variable "prefix" here. Only
6601 set PREFIX, which is used later by grub_machine_set_prefix.
6602
6603 * include/grub/video.h: Do not include grub/symbol.h.
6604 (grub_video_register): Not exported. This symbol is not defined in
6605 the kernel.
6606 (grub_video_unregister): Likewise.
6607 (grub_video_iterate): Likewise.
6608 (grub_video_setup): Likewise.
6609 (grub_video_restore): Likewise.
6610 (grub_video_get_info): Likewise.
6611 (grub_video_get_blit_format): Likewise.
6612 (grub_video_set_palette): Likewise.
6613 (grub_video_get_palette): Likewise.
6614 (grub_video_set_viewport): Likewise.
6615 (grub_video_get_viewport): Likewise.
6616 (grub_video_map_color): Likewise.
6617 (grub_video_map_rgb): Likewise.
6618 (grub_video_map_rgba): Likewise.
6619 (grub_video_fill_rect): Likewise.
6620 (grub_video_blit_glyph): Likewise.
6621 (grub_video_blit_bitmap): Likewise.
6622 (grub_video_blit_render_target): Likewise.
6623 (grub_video_scroll): Likewise.
6624 (grub_video_swap_buffers): Likewise.
6625 (grub_video_create_render_target): Likewise.
6626 (grub_video_delete_render_target): Likewise.
6627 (grub_video_set_active_render_target): Likewise.
6628
6629 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
6630 Undefined.
6631 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
6632
6633 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
6634 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6635 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6636 instead of $(srcdir)/genkernsyms.sh.
6637
6638 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
6639 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6640 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6641 instead of $(srcdir)/genkernsyms.sh.
6642
6643 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
6644 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6645 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6646 instead of $(srcdir)/genkernsyms.sh.
6647
6648 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
6649 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6650 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6651 instead of $(srcdir)/genkernsyms.sh.
6652
6653 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
6654 genkernsyms.sh.
6655
6656 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
6657 genkernsyms.sh.
6658 (gensymlist.sh): New target.
6659 (genkernsyms.sh): Likewise.
6660
6661 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
6662 genkernsyms.sh.in and gensymlist.sh.in.
6663
6664 * genkernsyms.sh: Removed.
6665 * gensymlist.sh: Likewise.
f19dbdb7 6666
7b455f4d 6667 * genkernsyms.sh.in: New file.
6668 * gensymlist.sh.in: Likewise.
6669
1885bb27 66702006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6671
6672 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
6673 clobber "prefix", since we may have already set it manually.
6674
71538dff 66752006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6676
6677 * kern/misc.c (abort): New alias for grub_abort.
6678
2965c7cc 66792006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
6680
6681 A new machine-specific function "grub_machine_set_prefix" is
6682 defined. This is called after loading modules, so that a prefix
6683 initialization can use modules. Also, this change adds an
6684 intensive debugging feature for the memory manager via the
6685 configure option "--enable-mm-debug".
f19dbdb7 6686
2965c7cc 6687 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
6688 PART.LEN.
6689
6690 * kern/sparc64/ieee1275/init.c (abort): Removed.
6691 (grub_stop): Likewise.
6692 (grub_exit): New function.
6693 (grub_set_prefix): Renamed to ...
6694 (grub_machine_set_prefix): ... this.
6695 (grub_machine_init): Do not call grub_set_prefix.
6696
6697 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
6698 (grub_machine_set_prefix): ... this.
6699 (grub_machine_init): Do not call grub_set_prefix.
6700
6701 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
6702 (grub_machine_init): Do not set the prefix here.
6703
6704 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
6705
6706 * kern/efi/init.c: Include grub/mm.h.
6707 (grub_efi_set_prefix): New function.
6708
6709 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
6710 (grub_efi_get_filename): New function.
6711 (grub_print_device_path): Renamed to ...
6712 (grub_efi_print_device_path): ... this.
6713
6714 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
6715 [MM_DEBUG] (grub_realloc): Likewise.
6716 [MM_DEBUG] (grub_free): Likewise.
6717 [MM_DEBUG] (grub_memalign): Likewise.
6718 [MM_DEBUG] (grub_mm_debug): New variable.
6719 [MM_DEBUG] (grub_debug_malloc): New function.
6720 [MM_DEBUG] (grub_debug_free): New function.
6721 [MM_DEBUG] (grub_debug_realloc): New function.
6722 [MM_DEBUG] (grub_debug_memalign): New function.
6723
6724 * kern/misc.c (grub_abort): Print a newline to distinguish
6725 the message.
6726
6727 * kern/main.c (grub_main): Call grub_machine_set_prefix and
6728 grub_set_root_dev after loading modules. This is necessary when
6729 setting a prefix depends on modules.
6730
6731 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
6732 (grub_efi_print_device_path): ... this.
6733 (grub_efi_get_filename): New prototype.
6734 (grub_efi_set_prefix): Likewise.
6735
6736 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
6737 and grub/disk.h.
6738 (grub_efidisk_get_device_handle): New prototype.
6739 (grub_efidisk_get_device_name): Likewise.
6740
6741 * include/grub/mm.h: Include config.h.
6742 (MM_DEBUG): Removed.
6743 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
6744 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
6745 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
6746 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
6747 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
6748 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
6749 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
6750 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
6751 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
6752
6753 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
6754
6755 * disk/efi/efidisk.c: Include grub/partition.h.
6756 (iterate_child_devices): New function.
6757 (add_device): First, compare only last device path nodes, so that
6758 devices are sorted by the types.
6759 (grub_efidisk_get_device_handle): New function.
6760 (grub_efidisk_get_device_name): Likewise.
6761
6762 * configure.ac (--enable-mm-debug): New option to enable the
6763 memory manager debugging feature. This makes the binary much
6764 bigger, so is disabled by default.
6765
9cacaa17 67662006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
6767
6768 Use grub_abort instead of grub_stop, and grub_exit must be
6769 define in each architecture now. Also, this change adds support
6770 for EFI disks.
f19dbdb7 6771
9cacaa17 6772 * util/i386/pc/grub-probefs.c: Include grub/term.h.
6773 (grub_getkey): New function.
6774 (grub_term_get_current): Likewise.
6775
6776 * util/i386/pc/grub-setup.c: Include grub/term.h.
6777 (grub_getkey): New function.
6778 (grub_term_get_current): Likewise.
6779
6780 * util/misc.c (grub_stop): Renamed to ...
6781 (grub_exit): ... this.
6782
6783 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
6784 (grub_exit): ... this.
6785 (grub_machine_init): Use grub_abort instead of abort.
6786 (grub_stop): Removed.
6787
6788 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
6789 abort.
6790
6791 * kern/i386/pc/startup.S (grub_exit): New function.
6792 (cold_reboot): New label.
6793
6794 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
6795 (grub_efi_init): Call grub_efidisk_init.
6796 (grub_efi_fini): Call grub_efidisk_fini.
6797
6798 * kern/efi/efi.c: Include grub/mm.h.
6799 (grub_efi_console_control_guid): Renamed to ...
6800 (console_control_guid): ... this.
6801 (grub_efi_loaded_image_guid): Renamed to ...
6802 (loaded_image_guid): ... this.
6803 (grub_efi_locate_handle): New function.
6804 (grub_efi_open_protocol): Likewise.
6805 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
6806 GRUB_EFI_CONSOLE_CONTROL_GUID.
6807 (grub_efi_exit): Removed.
6808 (grub_stop): Likewise.
6809 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
6810 (grub_exit): New function.
6811 (grub_print_device_path): Likewise.
6812
6813 * kern/rescue.c (grub_rescue_cmd_exit): New function.
6814 (grub_enter_rescue_mode): Register "exit".
6815
6816 * kern/misc.c (grub_real_dprintf): A cosmetic change.
6817 (grub_abort): New function.
6818
6819 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
6820
6821 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
6822
6823 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
6824
6825 * include/grub/efi/efi.h (grub_efi_exit): Removed.
6826 (grub_print_device_path): New prototype.
6827 (grub_efi_locate_handle): Likewise.
6828 (grub_efi_open_protocol): Likewise.
6829
6830 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
6831 * disk/efi/efidisk.c: Likewise.
6832
6833 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
6834
6835 * include/grub/efi/console_control.h
6836 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
6837
6838 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
6839 last 8 bytes as an array.
6840 (GRUB_EFI_DISK_IO_GUID): New macro.
6841 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
6842 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
6843 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
6844 grub_uint8_t.
6845 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
6846 (struct grub_efi_device_path): Rename the member "sub_type" to
6847 "subtype".
6848 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
6849 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
6850 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
6851 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
6852 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
6853 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
6854 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
6855 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
6856 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
6857 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
6858 (struct grub_efi_pci_device_path): New structure.
6859 (grub_efi_pci_device_path_t): New type.
6860 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
6861 (struct grub_efi_pccard_device_path): New structure.
6862 (grub_efi_pccard_device_path_t): New type.
6863 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
6864 (struct grub_efi_memory_mapped_device_path): New structure.
6865 (grub_efi_memory_mapped_device_path_t): New type.
6866 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
6867 (struct grub_efi_vendor_device_path): New structure.
6868 (grub_efi_vendor_device_path_t): New type.
6869 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
6870 (struct grub_efi_controller_device_path): New structure.
6871 (grub_efi_controller_device_path_t): New type.
6872 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
6873 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
6874 (struct grub_efi_acpi_device_path): New structure.
6875 (grub_efi_acpi_device_path_t): New type.
6876 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
6877 (struct grub_efi_expanded_acpi_device_path): New structure.
6878 (grub_efi_expanded_acpi_device_path_t): New type.
6879 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
6880 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
6881 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
6882 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
6883 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
6884 (struct grub_efi_atapi_device_path): New structure.
6885 (grub_efi_atapi_device_path_t): New type.
6886 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
6887 (struct grub_efi_fibre_channel_device_path): New structure.
6888 (grub_efi_fibre_channel_device_path_t): New type.
6889 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
6890 (struct grub_efi_1394_device_path): New structure.
6891 (grub_efi_1394_device_path_t): New type.
6892 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
6893 (struct grub_efi_usb_device_path): New structure.
6894 (grub_efi_usb_device_path_t): New type.
6895 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
6896 (struct grub_efi_usb_class_device_path): New structure.
6897 (grub_efi_usb_class_device_path_t): New type.
6898 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
6899 (struct grub_efi_i2o_device_path): New structure.
6900 (grub_efi_i2o_device_path_t): New type.
6901 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
6902 (struct grub_efi_mac_address_device_path): New structure.
6903 (grub_efi_mac_address_device_path_t): New type.
6904 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
6905 (struct grub_efi_ipv4_device_path): New structure.
6906 (grub_efi_ipv4_device_path_t): New type.
6907 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
6908 (struct grub_efi_ipv6_device_path): New structure.
6909 (grub_efi_ipv6_device_path_t): New type.
6910 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
6911 (struct grub_efi_infiniband_device_path): New structure.
6912 (grub_efi_infiniband_device_path_t): New type.
6913 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
6914 (struct grub_efi_uart_device_path): New structure.
6915 (grub_efi_uart_device_path_t): New type.
6916 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
6917 (struct grub_efi_vendor_messaging_device_path): New structure.
6918 (grub_efi_vendor_messaging_device_path_t): New type.
6919 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
6920 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
6921 (struct grub_efi_hard_drive_device_path): New structure.
6922 (grub_efi_hard_drive_device_path_t): New type.
6923 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
6924 (struct grub_efi_cdrom_device_path): New structure.
6925 (grub_efi_cdrom_device_path_t): New type.
6926 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
6927 (struct grub_efi_vendor_media_device_path): New structure.
6928 (grub_efi_vendor_media_device_path_t): New type.
6929 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
6930 (struct grub_efi_file_path_device_path): New structure.
6931 (grub_efi_file_path_device_path_t): New type.
6932 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
6933 (struct grub_efi_protocol_device_path): New structure.
6934 (grub_efi_protocol_device_path_t): New type.
6935 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
6936 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
6937 (struct grub_efi_bios_device_path): New structure.
6938 (grub_efi_bios_device_path_t): New type.
6939 (struct grub_efi_disk_io): New structure.
6940 (grub_efi_disk_io_t): New type.
6941 (struct grub_efi_block_io_media): New structure.
6942 (grub_efi_block_io_media_t): New type.
6943 (struct grub_efi_block_io): New structure.
6944 (grub_efi_block_io_t): New type.
6945
6946 * include/grub/misc.h (grub_stop): Removed.
6947 (grub_exit): New prototype.
6948 (grub_abort): Likewise.
6949
6950 * include/grub/disk.h (enum grub_disk_dev_id): Added
6951 GRUB_DISK_DEVICE_EFIDISK_ID.
6952
6953 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
6954 disk/efi/efidisk.c.
6955 (kernel_syms.lst): Remove the target if an error occurs.
6956
49986a9f 69572006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
6958
6959 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
6960 as it was simply too buggy.
6961
970d3b8a 69622006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
6963
6964 * kern/misc.c (grub_lltoa): New function.
6965 (grub_vsprintf): Added support for the long long suffix,
6966 i.e. "ll".
6967
ff04ec24 69682006-04-20 Hollis Blanchard <hollis@penguinppc.org>
6969
6970 * Makefile.in (LDFLAGS): Add variable.
6971 (LD): Remove variable.
6972 * configure.ac: Add -m32 to LDFLAGS.
6973 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
6974 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
6975 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
6976 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
6977 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
6978 variables.
6979 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
6980 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
6981 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
6982
37e5e1a4 69832006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
6984
6985 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
6986 length for unknown glyph.
6987
c352d8dd 69882006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
6989
2eab1c0d 6990 Add support for pre-loaded modules into the EFI port.
f19dbdb7 6991
2eab1c0d 6992 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
6993 completely. Accept one more argument DIR. The caller has changed.
6994
6995 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
6996
6997 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
6998 (grub_efi_loaded_image_guid): New variable.
6999 (grub_efi_get_loaded_image): New function.
7000 (grub_arch_modules_addr): Likewise.
7001
7002 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
7003 prototype.
7004
7005 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
7006 (struct grub_efi_loaded_image): New structure.
7007 (grub_efi_loaded_image_t): New type.
7008
70092006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7010
c352d8dd 7011 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
7012 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
7013 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
7014
6d01d6b4 70152006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
7016
7017 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
7018
976a4ea0 70192006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
7020
7021 * DISTLIST: Added include/grub/efi/console.h,
7022 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
7023 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7024
7025 * include/grub/efi/console.h: New file.
7026 * include/grub/efi/time.h: Likewise.
7027 * include/grub/i386/efi/kernel.h: Likewise.
7028 * kern/efi/init.c: Likewise.
7029 * kern/efi/mm.c: Likewise.
7030 * term/efi/console.c: Likewise.
f19dbdb7 7031
976a4ea0 7032 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
7033 (grub_stop): Removed.
7034 (grub_get_rtc): Likewise.
7035 (grub_machine_init): Simply call grub_efi_init.
7036 (grub_machine_fini): Call grub_efi_fini.
7037
7038 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
7039 (grub_efi_output_string): Removed.
7040 (grub_efi_stall): New function.
7041 (grub_stop): Likewise.
7042 (grub_get_rtc): Likewise.
7043
7044 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
7045 (grub_efi_stall): New prototype.
7046 (grub_efi_allocate_pages): Likewise.
7047 (grub_efi_free_pages): Likewise.
7048 (grub_efi_get_memory_map): Likewise.
7049 (grub_efi_mm_init): Likewise.
7050 (grub_efi_mm_fini): Likewise.
7051 (grub_efi_init): Likewise.
7052 (grub_efi_fini): Likewise.
7053
7054 * include/grub/i386/efi/time.h: Do not include
7055 grub/symbol.h. Include grub/efi/time.h.
7056 (GRUB_TICKS_PER_SECOND): Removed.
7057 (grub_get_rtc): Likewise.
7058
7059 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
7060 Added padding. The EFI spec is buggy.
7061 (GRUB_EFI_BLACK): New macro.
7062 (GRUB_EFI_BLUE): Likewise.
7063 (GRUB_EFI_GREEN): Likewise.
7064 (GRUB_EFI_CYAN): Likewise.
7065 (GRUB_EFI_RED): Likewise.
7066 (GRUB_EFI_MAGENTA): Likewise.
7067 (GRUB_EFI_BROWN): Likewise.
7068 (GRUB_EFI_LIGHTGRAY): Likewise.
7069 (GRUB_EFI_BRIGHT): Likewise.
7070 (GRUB_EFI_DARKGRAY): Likewise.
7071 (GRUB_EFI_LIGHTBLUE): Likewise.
7072 (GRUB_EFI_LIGHTGREEN): Likewise.
7073 (GRUB_EFI_LIGHTCYAN): Likewise.
7074 (GRUB_EFI_LIGHTRED): Likewise.
7075 (GRUB_EFI_LIGHTMAGENTA): Likewise.
7076 (GRUB_EFI_YELLOW): Likewise.
7077 (GRUB_EFI_WHITE): Likewise.
7078 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
7079 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
7080 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
7081 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
7082 (GRUB_EFI_BACKGROUND_RED): Likewise.
7083 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
7084 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
7085 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
7086 (GRUB_EFI_TEXT_ATTR): Likewise.
7087
7088 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
7089 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7090 (kernel_mod_HEADERS): Added efi/time.h.
7091
83709125 70922006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
7093
7094 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
7095 include/grub/efi/api.h, include/grub/efi/console_control.h,
7096 include/grub/efi/efi.h, include/grub/efi/pe32.h,
7097 include/grub/i386/efi/time.h, kern/efi/efi.c,
7098 kern/i386/efi/init.c, kern/i386/efi/startup.S,
7099 and util/i386/efi/grub-mkimage.c.
7100
7101 * Makefile.in (RMKFILES): Added i386-efi.rmk.
7102
7103 * genmk.rb (PModule#rule): Do not export symbols if
7104 #{prefix}_EXPORTS is set to "no".
7105
7106 * conf/i386-efi.mk: New file.
7107 * conf/i386-efi.rmk: Likewise.
7108 * include/grub/efi/api.h: Likewise.
7109 * include/grub/efi/console_control.h: Likewise.
7110 * include/grub/efi/efi.h: Likewise.
7111 * include/grub/efi/pe32.h: Likewise.
7112 * include/grub/i386/efi/time.h: Likewise.
7113 * kern/efi/efi.c: Likewise.
7114 * kern/i386/efi/init.c: Likewise.
7115 * kern/i386/efi/startup.S: Likewise.
7116 * util/i386/efi/grub-mkimage.c: Likewise.
7117
71182006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 7119
7120 * include/grub/script.h: Include <grub/parser.h> and
7121 "grub_script.tab.h".
7122 (struct grub_lexer_param): New struct.
7123 (struct grub_parser_param): Likewise.
7124 (grub_script_create_arglist): Pass the state in an argument.
7125 (grub_script_add_arglist): Likewise.
7126 (grub_script_create_cmdline): Likewise.
7127 (grub_script_create_cmdblock): Likewise.
7128 (grub_script_create_cmdif): Likewise.
7129 (grub_script_create_cmdmenu): Likewise.
7130 (grub_script_add_cmd): Likewise.
7131 (grub_script_arg_add): Likewise.
7132 (grub_script_lexer_ref): Likewise.
7133 (grub_script_lexer_deref): Likewise.
7134 (grub_script_lexer_record_start): Likewise.
7135 (grub_script_lexer_record_stop): Likewise.
7136 (grub_script_mem_record): Likewise.
7137 (grub_script_mem_record_stop): Likewise.
7138 (grub_script_malloc): Likewise.
7139 (grub_script_yylex): Likewise.
7140 (grub_script_yyparse): Likewise.
7141 (grub_script_yyerror): Likewise.
7142 (grub_script_yylex): Likewise.
7143 (grub_script_lexer_init): Return the state.
7144
7145 * normal/lexer.c (grub_script_lexer_state): Removed variable.
7146 (grub_script_lexer_done): Likewise.
7147 (grub_script_lexer_getline): Likewise.
7148 (grub_script_lexer_refs): Likewise.
7149 (script): Likewise.
7150 (newscript): Likewise.
7151 (record): Likewise.
7152 (recording): Likewise.
7153 (recordpos): Likewise.
7154 (recordlen): Likewise.
7155 (grub_script_lexer_init): Return the state instead of setting
7156 global variables.
7157 (grub_script_lexer_ref): Use the newly added argument for state
7158 instead of globals.
7159 (grub_script_lexer_deref): Likewise.
7160 (grub_script_lexer_record_start): Likewise.
7161 (grub_script_lexer_record_stop): Likewise.
7162 (recordchar): Likewise.
7163 (nextchar): Likewise.
7164 (grub_script_yylex2): Likewise.
7165 (grub_script_yylex): Likewise.
7166 (grub_script_yyerror): Likewise.
7167
7168 * normal/parser.y (func_mem): Removed variable.
7169 (menu_entry): Likewise.
7170 (err): Likewise.
7171 (%lex-param): New parser option.
7172 (%parse-param): Likewise.
7173 (script): Always return the AST.
7174 (argument): Pass the state around.
7175 (arguments): Likewise.
7176 (grubcmd): Likewise.
7177 (commands): Likewise.
7178 (function): Likewise.
7179 (menuentry): Likewise.
7180 (if_statement): Likewise.
7181 (if): Likewise.
7182
7183 * normal/script.c (grub_script_memused): Removed variable.
7184 (grub_script_parsed): Likewise.
7185 (grub_script_malloc): Added a state argument. Use that instead of
7186 global variables.
7187 (grub_script_mem_record): Likewise.
7188 (grub_script_mem_record_stop): Likewise.
7189 (grub_script_arg_add): Likewise.
7190 (grub_script_add_arglist): Likewise.
7191 (grub_script_create_cmdline): Likewise.
7192 (grub_script_create_cmdif): Likewise.
7193 (grub_script_create_cmdmenu): Likewise.
7194 (grub_script_add_cmd): Likewise.
7195 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 7196
e2a8c904 71972006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 7198
7199 * normal/command.c (grub_command_init): Remove the title command.
7200
7201 * normal/lexer.c (grub_script_yylex): Renamed from this...
7202 (grub_script_yylex2): ... to this.
7203 (grub_script_yylex): New function. Temporary
7204 introduced to filter some tokens.
7205 (grub_script_yyerror): Print a newline.
7206
7207 * normal/main.c (read_config_file): Output information about the
7208 lines that contain errors. Wait for a key after all lines have
7209 been processed. Don't return an empty menu.
7210
7211 * normal/parser.y (func_mem): Don't initialize.
7212 (menu_entry): Likewise.
7213 (err): New variable.
7214 (script): Don't return anything when an error was encountered.
7215 (ws, returns): Removed rules.
7216 (argument): Disabled concatenated variable support.
7217 (arguments): Remove explicit separators.
7218 (grubcmd): Likewise.
7219 (function): Likewise.
7220 (menuentry): Likewise.
7221 (if): Likewise.
7222 (commands): Likewise. Add error handling.
7223
7224 * normal/script.c (grub_script_create_cmdline): If
7225 `grub_script_parsed' is 0, assume the parser encountered an error.
7226
c9a86192 72272006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
7228
7229 * configure.ac: Add support for EFI. Fix the typo
7230 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7231
70f3b243 72322006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7233
7234 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
7235 foreign multibyte characters should be shown correctly.
7236
65f201ad 72372006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7238
7239 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7240 calculation.
7241 (read_config_file): Made it to close file before returning.
7242
b4b93674 72432006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
7244
7245 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7246 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7247 video/i386/pc/vbefill.c.
7248
7249 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7250 video/i386/pc/vbefill.c.
7251
7252 * include/grub/video.h (grub_video_blit_format): New enum.
7253 (grub_video_mode_info): Added new member blit_format.
7254 (grub_video_get_blit_format): New function prototype.
7255
7256 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7257 function prototype.
7258 (grub_video_vbe_map_rgb): Likewise.
7259 (grub_video_vbe_unmap_color): Likewise.
7260
7261 * include/grub/i386/pc/vbeblit.h: New file.
7262
7263 * include/grub/i386/pc/vbefill.h: New file.
7264
7265 * video/video.c (grub_video_get_blit_format): New function.
7266 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7267 (grub_video_vbe_map_rgb): Likewise.
7268 (grub_video_vbe_unmap_color): Likewise.
7269
7270 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7271 optimized fills.
7272 (grub_video_vbe_blit_render_target): Changed to use more optimized
7273 blits.
7274 (grub_video_vbe_setup): Added detection for optimized settings.
7275 (grub_video_vbe_create_render_target): Likewise.
7276
7277 * video/i386/pc/vbeblit.c: New file.
7278
7279 * video/i386/pc/vbefill.c: New file.
7280
c2379b9c 72812006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
7282
7283 * font/manager.c (grub_font_get_glyph): Removed font fixup from
7284 here...
7285
7286 * util/unifont2pff.rb: ... and moved it to here. Improved argument
7287 parsing to support both hex and dec ranges. If filename was missing
7288 show usage information.
7289
bd0d7896 72902006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
7291
7292 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7293 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
7294
7295 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7296 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
7297 (video_mod_SOURCES): Added.
7298 (video_mod_CFLAGS): Likewise.
7299 (video_mod_LDFLAGS): Likewise.
7300 (gfxterm_mod_SOURCES): Likewise.
7301 (gfxterm_mod_CFLAGS): Likewise.
7302 (gfxterm_mod_LDFLAGS): Likewise.
7303 (videotest_mod_SOURCES): Likewise.
7304 (videotest_mod_CFLAGS): Likewise.
7305 (videotest_mod_LDFLAGS): Likewise.
7306 (vesafb_mod_SOURCES): Removed.
7307 (vesafb_mod_CFLAGS): Likewise.
7308 (vesafb_mod_LDFLAGS): Likewise.
7309 (vga_mod_SOURCES): Likewise.
7310 (vga_mod_CFLAGS): Likewise.
7311 (vga_mod_LDFLAGS): Likewise.
7312
7313 * commands/videotest.c: New file.
7314
7315 * font/manager.c (fill_with_default_glyph): Modified to use
7316 grub_font_glyph.
7317 (grub_font_get_glyph): Likewise.
7318 (fontmanager): Renamed from this...
7319 (font_manager): ... to this.
7320
7321 * include/grub/font.h (grub_font_glyph): Added new structure.
7322 (grub_font_get_glyph): Modified to use grub_font_glyph.
7323
7324 * include/grub/misc.h (grub_abs): Added as inline function.
7325
7326 * include/grub/video.h: New file.
7327
7328 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
7329 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
7330 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
7331 (grub_vbe_get_controller_info): Renamed from this...
7332 (grub_vbe_bios_get_controller_info): ... to this.
7333 (grub_vbe_get_mode_info): Renamed from this...
7334 (grub_vbe_bios_get_mode_info): ... to this.
7335 (grub_vbe_set_mode): Renamed from this...
7336 (grub_vbe_bios_set_mode): ... to this.
7337 (grub_vbe_get_mode): Renamed from this...
7338 (grub_vbe_bios_get_mode): ... to this.
7339 (grub_vbe_set_memory_window): Renamed from this...
7340 (grub_vbe_bios_set_memory_window): ... to this.
7341 (grub_vbe_get_memory_window): Renamed from this...
7342 (grub_vbe_bios_get_memory_window): ... to this.
7343 (grub_vbe_set_scanline_length): Renamed from this...
7344 (grub_vbe_set_scanline_length): ... to this.
7345 (grub_vbe_get_scanline_length): Renamed from this...
7346 (grub_vbe_bios_get_scanline_length): ... to this.
7347 (grub_vbe_set_display_start): Renamed from this...
7348 (grub_vbe_bios_set_display_start): ... to this.
7349 (grub_vbe_get_display_start): Renamed from this...
7350 (grub_vbe_bios_get_display_start): ... to this.
7351 (grub_vbe_set_palette_data): Renamed from this...
7352 (grub_vbe_bios_set_palette_data): ... to this.
7353 (grub_vbe_set_pixel_rgb): Removed.
7354 (grub_vbe_set_pixel_index): Likewise.
7355
7356 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
7357 from this...
7358 (grub_vbe_bios_get_controller_info): ... to this.
7359 (grub_vbe_get_mode_info): Renamed from this...
7360 (grub_vbe_bios_get_mode_info): ... to this.
7361 (grub_vbe_set_mode): Renamed from this...
7362 (grub_vbe_bios_set_mode): ... to this.
7363 (grub_vbe_get_mode): Renamed from this...
7364 (grub_vbe_bios_get_mode): ... to this.
7365 (grub_vbe_set_memory_window): Renamed from this...
7366 (grub_vbe_bios_set_memory_window): ... to this.
7367 (grub_vbe_get_memory_window): Renamed from this...
7368 (grub_vbe_bios_get_memory_window): ... to this.
7369 (grub_vbe_set_scanline_length): Renamed from this...
7370 (grub_vbe_set_scanline_length): ... to this.
7371 (grub_vbe_get_scanline_length): Renamed from this...
7372 (grub_vbe_bios_get_scanline_length): ... to this.
7373 (grub_vbe_set_display_start): Renamed from this...
7374 (grub_vbe_bios_set_display_start): ... to this.
7375 (grub_vbe_get_display_start): Renamed from this...
7376 (grub_vbe_bios_get_display_start): ... to this.
7377 (grub_vbe_set_palette_data): Renamed from this...
7378 (grub_vbe_bios_set_palette_data): ... to this.
7379 (grub_vbe_bios_get_controller_info): Fixed problem with registers
7380 getting corrupted after calling it. Added more pushes and pops.
7381 (grub_vbe_bios_set_mode): Likewise.
7382 (grub_vbe_bios_get_mode): Likewise.
7383 (grub_vbe_bios_get_memory_window): Likewise.
7384 (grub_vbe_bios_set_scanline_length): Likewise.
7385 (grub_vbe_bios_get_scanline_length): Likewise.
7386 (grub_vbe_bios_get_display_start): Likewise.
7387 (grub_vbe_bios_set_palette_data): Likewise.
7388
7389 * normal/cmdline.c (cl_set_pos): Refresh the screen.
7390 (cl_insert): Likewise.
7391 (cl_delete): Likewise.
7392
7393 * term/gfxterm.c: New file.
7394
7395 * term/i386/pc/vesafb.c: Removed file.
7396
7397 * video/video.c: New file.
7398
7399 * video/i386/pc/vbe.c (real2pm): Added new function.
7400 (grub_video_vbe_draw_pixel): Likewise.
7401 (grub_video_vbe_get_video_ptr): Likewise.
7402 (grub_video_vbe_get_pixel): Likewise
7403 (grub_video_vbe_init): Likewise.
7404 (grub_video_vbe_fini): Likewise.
7405 (grub_video_vbe_setup): Likewise.
7406 (grub_video_vbe_get_info): Likewise.
7407 (grub_video_vbe_set_palette): Likewise.
7408 (grub_video_vbe_get_palette): Likewise.
7409 (grub_video_vbe_set_viewport): Likewise.
7410 (grub_video_vbe_get_viewport): Likewise.
7411 (grub_video_vbe_map_color): Likewise.
7412 (grub_video_vbe_map_rgb): Likewise.
7413 (grub_video_vbe_map_rgba): Likewise.
7414 (grub_video_vbe_unmap_color): Likewise.
7415 (grub_video_vbe_fill_rect): Likewise.
7416 (grub_video_vbe_blit_glyph): Likewise.
7417 (grub_video_vbe_blit_bitmap): Likewise.
7418 (grub_video_vbe_blit_render_target): Likewise.
7419 (grub_video_vbe_scroll): Likewise.
7420 (grub_video_vbe_swap_buffers): Likewise.
7421 (grub_video_vbe_create_render_target): Likewise.
7422 (grub_video_vbe_delete_render_target): Likewise.
7423 (grub_video_vbe_set_active_render_target): Likewise.
7424 (grub_vbe_set_pixel_rgb): Remove function.
7425 (grub_vbe_set_pixel_index): Likewise.
7426 (index_color_mode): Remove static variable.
7427 (active_mode): Likewise.
7428 (framebuffer): Likewise.
7429 (bytes_per_scan_line): Likewise.
7430 (grub_video_vbe_adapter): Added new static variable.
7431 (framebuffer): Likewise.
7432 (render_target): Likewise.
7433 (initial_mode): Likewise.
7434 (mode_in_use): Likewise.
7435 (mode_list): Likewise.
7436
5f97350b 74372006-03-10 Marco Gerards <marco@gnu.org>
7438
7439 * configure.ac (AC_INIT): Bumped to 1.93.
7440
7441 * DISTLIST: Added `include/grub/hfs.h'.
7442
a3c5c6f8 74432006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
7444
7445 * boot/i386/pc/boot.S (general_error): Before looping, try INT
7446 18H, which might help the BIOS falling back to next boot media.
7447
6de53d26 74482006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
7449
7450 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
7451 Poe Chen <poe.poechen@gmail.com>.
7452
77c4a393 74532006-01-17 Marco Gerards <marco@gnu.org>
7454
7455 * include/grub/normal.h: Include <grub/script.h>.
7456 (grub_command_list): Removed struct.
7457 (grub_command_list_t): Removed type.
7458 (grub_menu_entry): Remove members `num' and `command_list'. Add
7459 members `commands' and `sourcecode'.
7460 * include/grub/script.h: Add inclusion guards.
7461 (grub_script_cmd_menuentry): New struct.
7462 (grub_script_execute_menuentry): New prototype.
7463 (grub_script_lexer_record_start): Likewise.
7464 (grub_script_lexer_record_stop): Likewise.
7465 * normal/execute.c (grub_script_execute_menuentry): New function.
7466 * normal/lexer.c (record, recording, recordpos, recordlen): New
7467 variables.
7468 (grub_script_lexer_record_start): New function.
7469 (grub_script_lexer_record_stop): Likewise.
7470 (recordchar): Likewise.
7471 (nextchar): Likewise.
7472 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
7473 2048 as the buffer size. Add the tokens `menuentry' and `@'.
7474 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
7475 (current_menu): New variable.
7476 (free_menu): Mainly rewritten.
7477 (grub_normal_menu_addentry): New function.
7478 (read_config_file): Rewritten.
7479 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 7480 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 7481 the menu entry.
7482 (run): Mainly rewritten.
7483 * normal/parser.y (menu_entry): New variable.
7484 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
7485 (menuentry): New rule.
7486 (command): Add `menuentry'.
7487 (if_statement): Allow additional returns before `fi'.
7488 * normal/script.c (grub_script_create_cmdmenu): New function.
7489
144f1f98 74902006-01-03 Marco Gerards <marco@gnu.org>
7491
7492 * INSTALL: GNU Bison is required.
7493 * configure.ac: Rewritten the test to detect Bison.
7494 * Makefile.in (YACC): New variable. Reported by Xun Sun
7495 <xun.sun.cn@gmail.com>.
7496
af4b2d89 74972006-01-03 Marco Gerards <marco@gnu.org>
7498
7499 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
7500 the HFS+ filesystem to filesystem blocks.
7501 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
7502 GCC warning is silenced.
7503
15643b71 75042006-01-03 Marco Gerards <marco@gnu.org>
7505
7506 * partmap/apple.c (apple_partition_map_iterate): Convert the data
7507 read from disk from big endian to host byte order.
7508
00905879 75092006-01-03 Hollis Blanchard <hollis@penguinppc.org>
7510
7511 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
7512 documentation.
7513 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
7514 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
7515 embedded HFS+ filesystem.
7516 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
7517 (grub_hfs_sblock): Move from here...
7518 * include/grub/hfs.h: To here... New file.
7519 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
7520 documentation.
7521 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
7522 New macros.
7523 (grub_hfsplus_volheader): Change type of member `magic' to
7524 `grub_uint16_t'.
7525 (grub_hfsplus_data): Add new member `embedded_offset'.
7526 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
7527 returned block.
7528 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
7529 Calculate the offset.
7530
8899bc3e 75312005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7532
7533 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
7534 Removed.
7535 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
7536
ae8c0277 75372005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7538
7539 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
7540 ENV->NAME is NULL after allocating ENV->VALUE.
7541
07084456 75422005-12-25 Marco Gerards <marco@gnu.org>
7543
7544 * kern/env.c (grub_env_set): Rewritten the error handling code.
7545
4750f5f1 75462005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7547
7548 * geninit.sh: Made more robust, and more portable.
7549
50214199 75502005-12-25 Marco Gerards <marco@gnu.org>
7551
7552 Add support for Apple HFS+ filesystems.
f19dbdb7 7553
50214199 7554 * fs/hfsplus.c: New file.
7555
7556 * DISTLIST: Added `fs/hfsplus.c'.
7557
7558 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
7559 (hfsplus_mod_SOURCES): New variable.
7560 (hfsplus_mod_CFLAGS): Likewise.
7561 (hfsplus_mod_LDFLAGS): Likewise.
7562 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
7563 (grub_setup_SOURCES): Likewise.
7564 (grub_mkdevicemap_SOURCES): Likewise.
7565 (grub_emu_SOURCES): Likewise.
7566 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7567
7568 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
7569
7570 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
7571
befaed6c 75722005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7573
7574 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
7575 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
7576 include/grub/parser.h, include/grub/script.h, kern/parser.c,
7577 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
7578 normal/lexer.c, normal/parser.y, normal/script.c, and
7579 partmap/gpt.c.
7580 Removed kern/sparc64/cache.c.
7581
7582 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
7583 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
7584 grub_emu_init.c.
7585
7586 * configure.ac (AC_INIT): Bumped to 1.92.
7587
6a124103 75882005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
7589
7590 * kern/err.c (grub_error_push): Added new function to support error
7591 stacks.
7592 (grub_error_pop): Likewise.
7593 (grub_error_stack_items): New local variable to support error stacks.
7594 (grub_error_stack_pos): Likewise.
7595 (grub_error_stack_assert): Likewise.
7596 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
7597 stack depth.
7598 (grub_print_error): Added support to print errors from error stack.
7599
7600 * include/grub/err.h (grub_error_push): Added function prototype.
7601 (grub_error_pop): Likewise.
7602
be973c1b 76032005-12-09 Hollis Blanchard <hollis@penguinppc.org>
7604
7605 * configure.ac: Accept `powerpc64' as host_cpu.
7606 (amd64): Rename to `biarch32'.
7607
7608 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
7609 non-cacheline-aligned addresses.
7610
7611 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
7612 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
7613 if `size' is non-zero.
7614
b04216ab 76152005-12-03 Marco Gerards <mgerards@xs4all.nl>
7616
7617 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
7618 and `cd' to make sure the filename is not prefixed with a
7619 directory name.
7620 (pkgdata_MODULES): Add `gpt.mod'.
7621 (gpt_mod_SOURCES): New variable.
7622 (gpt_mod_CFLAGS): Likewise.
7623 (gpt_mod_LDFLAGS): Likewise.
7624
7625 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
7626
7627 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
7628 New macro.
7629
7630 * partmap/gpt.c: New file.
7631
7632 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
7633 GPT partition map is detected.
7634
41730ed9 76352005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
7636
7637 * commands/i386/pc/play.c: New file.
7638 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
7639 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
7640 macros.
f19dbdb7 7641
95dc3643 76422005-11-27 Marco Gerards <mgerards@xs4all.nl>
7643
7644 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
7645 ((unused))' to silence gcc warning.
7646
1569ec51 76472005-11-26 Hollis Blanchard <hollis@penguinppc.org>
7648
7649 * configure.ac: Correct `AC_PROG_YACC' test.
7650
9abde152 76512005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7652
7653 * util/powerpc/ieee1275/grub-install.in: Run the mount point
7654 check before installing files.
7655
44b83271 76562005-11-22 Mike Small <smallm@panix.com>
7657
7658 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
7659 number regex so multidigit numbers are recognized correctly.
7660
76612005-11-22 Mike Small <smallm@panix.com>
7662
7663 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
7664 debugging message before attempting to claim memory.
7665 (grub_rescue_cmd_initrd): Add a claim debugging message and try
7666 multiple addresses in case of failure.
7667
9c12956b 76682005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7669
7670 * term/tparm.c (get_space): Remove empty `if' statement.
7671
7672 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
7673
7674 * kern/parser.c (check_varstate): Rename `state' to 's'.
7675
aeaf81d9 76762005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7677
7678 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
7679 variable definitions to the beginning of each function. Sort stack
7680 variables by size.
7681 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
7682 `buf' argument to `char *'.
7683
79bbb63f 76842005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7685
7686 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
7687 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 7688 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 7689 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7690 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7691 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7692 configfile.mod, search.mod, gzio.mod and test.mod.
7693 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7694 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7695 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7696 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7697 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7698 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7699 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7700 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7701 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7702 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7703 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7704 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7705 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7706 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7707 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7708 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7709 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7710 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7711 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7712 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7713 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7714 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7715 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
7716
7717 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
7718 `grep --include'.
7719 (pkgdata_MODULES): Add test.mod.
7720
233b1628 77212005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7722
7723 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
7724 appending to variables with "+=".
7725 (PModule): Use full pathname to generate *.lst filenames.
7726
7727 * Makefile.in: Fixed list rules moved from genmk.rb.
7728 (.DELETE_ON_ERROR): New special target.
7729 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
7730
7731 * conf/i386-pc.rmk: Include conf/common.mk.
7732 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 7733 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 7734 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7735 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7736 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7737 configfile.mod, search.mod, gzio.mod and test.mod.
7738 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7739 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7740 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7741 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7742 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7743 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7744 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7745 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7746 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7747 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7748 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7749 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7750 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7751 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7752 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7753 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7754 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7755 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7756 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7757 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7758 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7759 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7760 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
7761 here...
7762 * conf/common.rmk: ... to here. New file.
7763
7764 * conf/common.mk: New file.
7765
16f820c8 77662005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
7767
7768 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
7769 (grub_script.tab.c): ... here.
7770
7771 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
7772 (grub_script.tab.c): ... here.
7773
7774 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
7775 (grub_script.tab.c): ... here.
7776
7777 * normal/command.c (grub_command_find): Fixed a memory leak of
7778 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
7779
63ba1554 77802005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7781
7782 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
7783 "@" which marks the start of a comment on ARM.
7784 (VARIABLE): Likewise.
7785
7f67dc13 77862005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7787
79bbb63f 7788 Add support for Linux/ADFS partition tables.
7f67dc13 7789
7790 * partmap/acorn.c: New file.
7791
7792 * include/grub/acorn_filecore.h: Likewise.
7793
7794 * DISTLIST: Added `partmap/acorn.c' and
7795 `include/grub/acorn_filecore.h'.
f19dbdb7 7796
7f67dc13 7797 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7798 `partmap/acorn.c'.
7799 (pkgdata_MODULES): Add `acorn.mod'.
7800 (acorn_mod_SOURCES): New variable.
7801 (acorn_mod_CFLAGS): Likewise.
7802
7803 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7804 `partmap/acorn.c'.
7805 (pkgdata_MODULES): Add `acorn.mod'.
7806 (acorn_mod_SOURCES): New variable.
7807 (acorn_mod_CFLAGS): Likewise.
7808
7809 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
7810 (pkgdata_MODULES): Add `acorn.mod'.
7811 (acorn_mod_SOURCES): New variable.
7812 (acorn_mod_CFLAGS): Likewise.
7813 (acorn_mod_LDFLAGS): Likewise.
7814
7815 * include/types.h (grub_disk_addr_t): New typedef.
7816
6d099807 78172005-11-13 Marco Gerards <mgerards@xs4all.nl>
7818
7819 * geninit.sh: New file.
7820
7821 * geninitheader.sh: Likewise.
7822
7823 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
7824 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
7825 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
7826 * commands/configfile.c (grub_configfile_init)
7827 (grub_configfile_fini): Likewise.
7828 * commands/default.c (grub_default_init, grub_default_fini):
7829 Likewise.
7830 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
7831 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
7832 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
7833 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
7834 Likewise.
7835 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
7836 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
7837 Likewise.
7838 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 7839 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 7840 Likewise.
7841 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
7842 Likewise.
fe6b695a 7843 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 7844 Likewise.
7845 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
7846 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
7847 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
7848 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
7849 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
7850 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
7851 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
7852 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
7853 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
7854 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
7855 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
7856 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
7857 * partmap/amiga.c (grub_amiga_partition_map_init)
7858 (grub_amiga_partition_map_fini): Likewise.
7859 * partmap/apple.c (grub_apple_partition_map_init)
7860 (grub_apple_partition_map_fini): Likewise.
7861 * partmap/pc.c (grub_pc_partition_map_init)
7862 (grub_pc_partition_map_fini): Likewise.
7863 * partmap/sun.c (grub_sun_partition_map_init,
7864 grub_sun_partition_map_fini): Likewise.
7865 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
7866 Likewise.
7867
7868 * util/grub-emu.c: Include <grub_modules_init.h>.
7869 (main): Don't initialize and de-initialize any modules directly,
7870 use `grub_init_all' and `grub_fini_all' instead.
7871
7872 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
7873 `grub_vesafb_mod_init'.
7874 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
7875 all users.
7876 * term/i386/pc/vga.c (grub_vga_init): Renamed to
7877 `grub_vga_mod_init'. Updated all users.
7878 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 7879
6d099807 7880 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
7881 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
7882 rules.
7883
7884 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
7885 Generate a function to initialize the module in utilities.
7886 Updated all callers.
7887 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
7888 initialize the module in utilities. Updated all callers.
7889
9046bcf0 78902005-11-09 Hollis Blanchard <hollis@penguinppc.org>
7891
7892 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
7893 escape sequence and a literal ^L to clear the screen.
7894
7895 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
7896 when returning from Open Firmware.
7897
d13ea639 78982005-11-09 Hollis Blanchard <hollis@penguinppc.org>
7899
7900 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
7901 (grub_ofconsole_height): Likewise.
7902 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
7903 manually insert a '\n'.
7904 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
7905 `grub_ofconsole_height'. Return early if these are already set.
7906
a8fcf206 79072005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
7908
7909 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7910 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
7911 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
7912 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
7913 and `normal/script.c'.
7914 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7915 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7916 (test_mod_SOURCES): New variable.
7917 (test_mod_CFLAGS): Likewise.
7918 (test_mod_LDFLAGS): Likewise.
7919 (pkgdata_MODULES): Add `test.mod'.
7920 (grub_script.tab.c): New rule.
7921 (grub_script.tab.h): Likewise.
7922
b6b32745 79232005-11-07 Marco Gerards <mgerards@xs4all.nl>
7924
7925 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7926 `commands/test.c', `normal/execute.c', `normal/lexer.c',
7927 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7928 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7929 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
7930 (test_mod_SOURCES): New variable.
7931 (test_mod_CFLAGS): Likewise.
7932 (pkgdata_MODULES): Add `test.mod'.
7933 (grub_script.tab.c): New rule.
7934 (grub_script.tab.h): Likewise.
7935
daac212a 79362005-11-06 Marco Gerards <mgerards@xs4all.nl>
7937
7938 Add initial scripting support.
7939
7940 * commands/test.c: New file.
7941 * include/grub/script.h: Likewise.
7942 * normal/execute.c: Likewise.
7943 * normal/function.c: Likewise.
7944 * normal/lexer.c: Likewise.
7945 * normal/parser.y: Likewise.
7946 * normal/script.c: Likewise.
7947
7948 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 7949
daac212a 7950 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
7951 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
7952 `normal/function.c' and `normal/script.c'.
7953 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
7954 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 7955 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
7956 variables.
daac212a 7957 (pkgdata_MODULES): Add `test.mod'.
7958 (grub_script.tab.c): New rule.
7959 (grub_script.tab.h): Likewise.
7960
7961 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
7962
7963 * include/grub/normal.h (grub_test_init): New prototype.
7964 (grub_test_fini): Likewise.
f19dbdb7 7965
daac212a 7966 * normal/command.c: Include <grub/script.h>.
7967 (grub_command_execute): Rewritten.
f19dbdb7 7968
daac212a 7969 * util/grub-emu.c (main): Call `grub_test_init' and
7970 `grub_test_fini'.
7971
77500b2b 79722005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7973
7974 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
7975 to 0.
7976 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
7977 there are no pending characters.
7978
e45deb9e 79792005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7980
7981 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
7982 `grub_strndup' to drop device arguments. Replace unnecessary
7983 `grub_strndup' with `grub_strdup'.
7984
4ce32619 79852005-11-03 Hollis Blanchard <hollis@penguinppc.org>
7986
7987 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
7988 `debug' environment variable has been set.
7989
79902005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 7991
4ce32619 7992 * Makefile.in (install-local): Use $(DATA).
7993 (uninstall): Likewise.
7994 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
7995 (sbin_UTILITIES): ... to here.
7996 (sbin_SCRIPTS): New variable.
7997 (grub_install_SOURCES): New variable.
7998 * util/powerpc/ieee1275/grub-install.in: New file.
7999 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
8000 variable.
8001 (add_segments): Call `grub_util_get_path'.
8002
25fe6f03 80032005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8004
8005 From Timothy Baldwin:
8006 * commands/ls.c (grub_ls_list_files): Close FILE with
8007 grub_file_close.
8008 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
8009
04ccf3ec 80102005-10-24 Marco Gerards <mgerards@xs4all.nl>
8011
8012 * include/grub/parser.h: New file.
8013
8014 * kern/parser.c: Likewise.
8015
8016 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
8017 (grub_setup_SOURCES): Likewise.
8018 (grub_probefs_SOURCES): Likewise.
8019 (grub_emu_SOURCES): Likewise.
8020 (kernel_img_HEADERS): Add `parser.h'.
8021
8022 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8023 (grub_emu_SOURCES): Add `kern/parser.c'.
8024 (grubof_SOURCES): Likewise.
8025
8026 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8027 (grubof_SOURCES): Add `kern/parser.c'.
8028
8029 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
8030
8031 * kern/misc.c (grub_split_cmdline): Removed function.
8032
8033 * kern/rescue.c: Include <grub/parser.h>.
8034 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
8035 of `grub_split_cmdline'.
8036
8037 * normal/command.c: Include <grub/parser.h>.
8038 (grub_command_execute): Use `grub_parser_split_cmdline' instead
8039 of `grub_split_cmdline'.
8040
8041 * normal/completion.c: Include <grub/parser.h>.
8042 (cmdline_state): New variable.
8043 (iterate_dir): End the filename with a quote depending on the
8044 command line state.
8045 (get_state): new function.
8046 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
8047 split the arguments and determine the current argument. When the
8048 argument string is not quoted, escape all spaces.
8049
6d8f4b0e 80502005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8051
8052 * normal/sparc64/setjmp.S: New file.
8053
15cf03ed 80542005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8055
8056 * include/grub/sparc64/libgcc.h: New file.
8057 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
8058 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
8059 normal/sparc64/setjmp.c.
8060
03e8661a 80612005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8062
8063 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
8064 * kern/sparc64/cache.S: New file.
8065 * kern/sparc64/cache.c: Removed.
8066 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
8067 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
8068 -mtune=ultrasparc.
8069 (COMMON_LDFLAGS): Add -melf64_sparc.
8070 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
8071 (grubof_SOURCES): Use cache.S instead of cache.c.
8072 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
8073 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
8074 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
8075 commented though.
8076 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
8077 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
8078 (linux_mod_CFLAGS): Commented out.
8079 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
8080 out because module isn't built.
8081 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
8082 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
8083 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
8084 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
8085 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
8086 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8087 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8088 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
8089 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
8090 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
8091 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8092 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8093 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
8094 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
8095
34eeec8a 80962005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
8097
8098 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
8099 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
8100 longer, because HFS should not be used on PC.
8101
708367a3 81022005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8103
8104 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
8105 consistently within the loop.
8106
6fa1251a 81072005-10-15 Marco Gerards <mgerards@xs4all.nl>
8108
8109 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
8110 directory can not be read.
8111
4801580b 81122005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8113
8114 * configure.ac (AC_INIT): Increase the version number to 1.91.
8115
8116 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
8117 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
8118 term/i386/pc/serial.c.
8119
219ad426 81202005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8121
8122 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8123 file size must be permitted.
8124
8125 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8126 between %ah and %al.
8127
688e5699 81282005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8129
8130 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8131 grub_uint64_t.
8132 Call the hook with a NUL-terminated filename.
8133 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8134 grub_cpu_to_be32.
8135
8136 * kern/term.c (cursor_state): New variable.
8137 (grub_term_set_current): Reset the cursor state on a new
8138 terminal.
8139 (grub_setcursor): Rewritten to use CURSOR_STATE.
8140 (grub_getcursor): New function.
8141
8142 * include/grub/term.h (grub_getcursor): New prototype.
8143
8144 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8145 integers on ARM. Reported by Timothy Baldwin
8146 <T.E.Baldwin99@members.leeds.ac.uk>.
8147
bb34586c 81482005-10-11 Marco Gerards <mgerards@xs4all.nl>
8149
8150 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8151 allocated.
8152 (grub_sfs_dir): Likewise.
8153
9a909877 81542005-10-09 Marco Gerards <mgerards@xs4all.nl>
8155
8156 Add support for the SFS filesystem.
8157
8158 * fs/sfs.c: New file.
8159
8160 * DISTLIST: Added `fs/sfs.c'.
8161
8162 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8163 (grub_probefs_SOURCES): Likewise.
8164 (grub_emu_SOURCES): Likewise.
8165 (pkgdata_MODULES): Add `sfs.mod'.
8166 (sfs_mod_SOURCES): New variable.
8167 (sfs_mod_CFLAGS): Likewise.
8168 (sfs_mod_LDFLAGS): Likewise.
8169
8170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8171 (pkgdata_MODULES): Add `sfs.mod'.
8172 (sfs_mod_SOURCES): New variable.
8173 (sfs_mod_CFLAGS): Likewise.
8174
8175 * util/grub-emu.c (main): Call `grub_sfs_init' and
8176 `grub_sfs_fini'.
8177
8178 * include/grub/fs.h (grub_sfs_init): New prototype.
8179 (grub_sfs_fini): Likewise.
8180
57bdbde3 81812005-10-07 Marco Gerards <mgerards@xs4all.nl>
8182
8183 Add support for the AFFS filesystem.
8184
8185 * fs/affs.c: New file.
8186
8187 * DISTLIST: Added `fs/affs.c'.
8188
8189 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8190 (grub_probefs_SOURCES): Likewise.
8191 (grub_emu_SOURCES): Likewise.
8192 (pkgdata_MODULES): Add `affs.mod'.
8193 (affs_mod_SOURCES): New variable.
8194 (affs_mod_CFLAGS): Likewise.
8195 (affs_mod_LDFLAGS): Likewise.
8196
8197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8198 (pkgdata_MODULES): Add `affs.mod'.
8199 (affs_mod_SOURCES): New variable.
8200 (affs_mod_CFLAGS): Likewise.
8201
8202 * util/grub-emu.c (main): Call `grub_affs_init' and
8203 `grub_affs_fini'.
8204
8205 * include/grub/fs.h (grub_affs_init): New prototype.
8206 (grub_affs_fini): Likewise.
8207
047b67e0 82082005-10-01 Marco Gerards <mgerards@xs4all.nl>
8209
8210 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8211
59b8208a 82122005-10-01 Marco Gerards <mgerards@xs4all.nl>
8213
8214 * configure.ac: Accept `x86_64' as host_cpu. In that case add
8215 `-m32' to CFLAGS.
8216
8217 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8218 linking.
f19dbdb7 8219
59b8208a 8220 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8221 (COMMON_LDFLAGS): New variable.
8222 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8223 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8224 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8225 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8226 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8227 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8228 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8229 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8230 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8231 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8232 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8233 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8234 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8235 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8236 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8237 variables.
8238 (normal_mod_ASFLAGS): Add `-m32'.
8239
8240 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8241 (grub_host_size_t, grub_host_ssize_t): New types.
8242 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 8243 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 8244 `GRUB_HOST_SIZEOF_VOID_P'.
8245
8246 * include/grub/kernel.h (struct grub_module_header): Type of
8247 member offset changed to `grub_host_off_t'. Type of member size
8248 changed to `grub_host_size_t'.
8249 (struct grub_module_info): Type of member offset changed to
8250 `grub_host_off_t'. Type of member size changed to
8251 `grub_host_size_t'.
8252
b4093103 82532005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
8254
8255 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 8256
b4093103 8257 * kern/i386/pc/startup.S (multiboot_header): New label.
8258 (multiboot_entry): Likewise.
8259 (multiboot_trampoline): Likewise.
8260
8261 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8262 Increased to 0x4A0.
8263
8264 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8265 put parentheses after a question mark.
8266 [!GRUB_UTIL] (my_mod): New variable.
8267
8268 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8269
b2499b29 82702005-09-28 Marco Gerards <mgerards@xs4all.nl>
8271
8272 Adds support for the XFS filesystem. Btrees are not supported
8273 yet.
8274
8275 * fs/xfs.c: New file.
8276
8277 * DISTLIST: Added `fs/xfs.c'.
8278
8279 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8280 (grub_probefs_SOURCES): Likewise.
8281 (grub_emu_SOURCES): Likewise.
8282 (pkgdata_MODULES): Add `xfs.mod'.
8283 (xfs_mod_SOURCES): New variable.
8284 (xfs_mod_CFLAGS): Likewise.
8285
8286 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8287 (pkgdata_MODULES): Add `xfs.mod'.
8288 (xfs_mod_SOURCES): New variable.
8289 (xfs_mod_CFLAGS): Likewise.
8290
8291 * util/grub-emu.c (main): Call `grub_xfs_init' and
8292 `grub_xfs_fini'.
8293
8294 * include/grub/fs.h (grub_xfs_init): New prototype.
8295 (grub_xfs_fini): Likewise.
8296
f19dbdb7 8297
83d37a62 82982005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
8299
8300 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8301 color modes, allow greater than 16 colors to be configured as
8302 a default palette.
8303
47d2d65e 83042005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8305
8306 * normal/completion.c (complete_arguments): Add the qualifier
8307 const into OPTIONS.
8308
8309 From Omniflux <omniflux+lists@omniflux.com>:
8310 * include/grub/terminfo.h: New file.
8311 * include/grub/tparm.h: Likewise.
8312 * include/grub/i386/pc/serial.h: Likewise.
8313 * term/terminfo.c: Likewise.
8314 * term/tparm.c: Likewise.
8315 * term/i386/pc/serial.c: Likewise.
8316 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
8317 serial.mod.
8318 (terminfo_mod_SOURCES): New variable.
8319 (terminfo_mod_CFLAGS): Likewise.
8320 (serial_mod_SOURCES): Likewise.
8321 (serial_mod_CFLAGS): Likewise.
8322
48b671ff 83232005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
8324
8325 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
8326 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
8327 and kern/powerpc/ieee1275/cmain.c, respectively.
8328
8329 * boot/powerpc/ieee1275/crt0.S: Moved to ...
8330 * kern/powerpc/ieee1275/crt0.S: ... here.
8331
8332 * boot/powerpc/ieee1275/cmain.c: Moved to ...
8333 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 8334
48b671ff 8335 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
8336 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
8337 instead of boot/powerpc/ieee1275/crt0.S and
8338 boot/powerpc/ieee1275/cmain.c, respectively.
8339
8340 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
8341 sectors. It was not used anyway.
8342
09fc77a7 83432005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8344
8345 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
8346 `unused parameter' warning.
8347
003789c7 83482005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8349
8350 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
8351 function.
8352 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
8353 getcharwidth.
8354
67f44c86 83552005-08-28 Marco Gerards <metgerards@student.han.nl>
8356
8357 * include/grub/normal.h (enum grub_completion_type): Added
8358 `GRUB_COMPLETION_TYPE_ARGUMENT'.
8359
8360 * normal/cmdline.c (print_completion): Handle
8361 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
8362 * normal/menu_entry.c (store_completion): Likewise.
8363
8364 * normal/completion.c (complete_arguments): New function.
8365 (grub_normal_do_completion): Call `complete_arguments' when the
8366 current words start with a dash.
8367
0b5abe02 83682005-08-27 Marco Gerards <metgerards@student.han.nl>
8369
8370 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
8371 `gzio.mod' instead of `io.mod').
8372
d9864ee1 83732005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
8374
8375 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
8376 (DISTDIRS): Added io and video.
8377 Rewrite the search routine to make an output consistently.
8378
8379 * DISTLIST: Added conf/sparc64-ieee1275.mk,
8380 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
8381 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
8382 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
8383 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
8384 util/powerpc/ieee1275/misc.c.
f19dbdb7 8385
d9864ee1 8386 * include/grub/gzio.h: New file.
8387 * io/gzio.c: Likewise.
f19dbdb7 8388
d9864ee1 8389 * kern/file.c (grub_file_close): Call grub_device_close only if
8390 FILE->DEVICE is not NULL.
8391
8392 * include/grub/mm.h [!NULL] (NULL): New macro.
8393
8394 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
8395
8396 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
8397 (pkgdata_MODULES): Added gzio.mod.
8398 (gzio_mod_SOURCES): New variable.
8399 (gzio_mod_CFLAGS): Likewise.
8400
8401 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
8402 (pkgdata_MODULES): Added gzio.mod.
8403 (gzio_mod_SOURCES): New variable.
8404 (gzio_mod_CFLAGS): Likewise.
8405
8406 * commands/cat.c: Include grub/gzio.h.
8407 (grub_cmd_cat): Use grub_gzfile_open instead of
8408 grub_file_open.
f19dbdb7 8409
d9864ee1 8410 * commands/cmp.c: Include grub/gzio.h.
8411 (grub_cmd_cmp): Use grub_gzfile_open instead of
8412 grub_file_open.
8413
8414 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
8415 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
8416 grub_file_open.
8417 (grub_rescue_cmd_module): Likewise.
8418
fa46f4b5 84192005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8420
8421 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
8422 kern/sparc64/ieee1275/init.c because it contains _start.
8423 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
8424
e9211b5d 84252005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8426
8427 * configure.ac: Add support for sparc64 host with ieee1275
8428 firmware.
8429 * configure: Generated from configure.ac.
8430 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
8431 instead of int.
8432 (grub_ofdisk_read): Likewise.
8433 (grub_ofdisk_open): Use %p to print pointer values, and cast the
8434 pointers as (void *) to remove a warning.
8435 (grub_ofdisk_close): Likewise.
8436 (grub_ofdisk_read): Likewise.
8437 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
8438 returns, so make it return void to remove a warning.
8439 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
8440 Corresponding prototype change.
8441 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
8442 values, and cast the pointers as (void *) to remove a warning.
8443 (grub_mm_dump): Likewise.
8444 * conf/sparc64-ieee1275.mk: New file.
8445 * conf/sparc64-ieee1275.rmk: Likewise.
8446 * include/grub/sparc64/setjmp.h: Likewise.
8447 * include/grub/sparc64/types.h: Likewise.
8448 * include/grub/sparc64/ieee1275/console.h: Likewise.
8449 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8450 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8451 * include/grub/sparc64/ieee1275/time.h: Likewise.
8452 * kern/sparc64/cache.c: Likewise.
8453 * kern/sparc64/dl.c: Likewise.
8454 * kern/sparc64/ieee1275/init.c: Likewise.
8455 * kern/sparc64/ieee1275/openfw.c: Likewise.
8456
385c6a92 84572005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8458
8459 * util/console.c (grub_ncurses_putchar): If C is greater than
8460 0x7f, set C to a question mark.
8461 (grub_ncurses_getcharwidth): New function.
8462 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
8463 getcharwidth.
8464
8465 * normal/menu.c (print_entry): Made aware of Unicode. First,
8466 convert TITLE to UCS-4, and predict the cursor position by
8467 grub_getcharwidth.
8468
8469 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
8470 const to SRC.
8471 * kern/misc.c (grub_utf16_to_utf8): Likewise.
8472
16ccb8b1 84732005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8474
8475 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
8476 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8477 grub_strcat.
8478
8479 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
8480 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8481 grub_strcpy and grub_strlen. Take it into account that a space
8482 character is inserted as a delimiter.
8483
6a85ce79 84842005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8485
8486 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 8487 invalid magic in the error.
6a85ce79 8488
8489 * commands/search.c: New file.
f19dbdb7 8490
6a85ce79 8491 * util/grub-emu.c (main): Call grub_search_init and
8492 grub_search_fini.
8493
8494 * kern/rescue.c (grub_rescue_print_disks): Removed.
8495 (grub_rescue_print_devices): New function.
8496 (grub_rescue_cmd_ls): Use grub_device_iterate with
8497 grub_rescue_print_devices instead of grub_disk_dev_iterate with
8498 grub_rescue_print_disks.
8499
8500 * kern/partition.c (grub_partition_iterate): Return the result of
8501 PARTMAP->ITERATE instead of GRUB_ERRNO.
8502
8503 * kern/device.c: Include grub/partition.h.
8504 (grub_device_iterate): New function.
8505
8506 * include/grub/partition.h (grub_partition_iterate): Return int
8507 instead of grub_err_t.
8508
8509 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
8510 prototype.
8511 [GRUB_UTIL] (grub_search_fini): Likewise.
8512
8513 * include/grub/device.h (grub_device_iterate): New prototype.
8514
8515 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8516 commands/search.c.
8517 (pkgdata_MODULES): Added search.mod.
8518 (search_mod_SOURCES): New variable.
8519 (search_mod_CFLAGS): Likewise.
8520
8521 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
8522 (pkgdata_MODULES): Added search.mod.
8523 (search_mod_SOURCES): New variable.
8524 (search_mod_CFLAGS): Likewise.
8525
8526 * commands/ls.c (grub_ls_list_disks): Renamed to ...
8527 (grub_ls_list_devices): ... this, and use grub_device_iterate.
8528 All callers changed.
8529
8530 * DISTLIST: Added commands/search.c.
8531
ef095434 85322005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8533
8534 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
8535 conversion.
8536 (grub_getcharwidth): New function.
8537
8538 * kern/misc.c (grub_utf8_to_ucs4): New function.
8539
8540 * include/grub/term.h (struct grub_term): Added a new member
8541 "getcharwidth".
8542 (grub_getcharwidth): New prototype.
8543
8544 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
8545
8546 * term/i386/pc/console.c (map_char): New function. Segregated from
8547 grub_console_putchar.
8548 (grub_console_putchar): Use map_char.
8549 (grub_console_getcharwidth): New function.
8550 (grub_console_term): Specified grub_console_getcharwidth as
8551 getcharwidth.
8552
8553 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
8554 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
8555
8556 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
8557 GRUB_ERRNO.
8558 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
8559 on grub_strtoul completely.
8560 (write_char): Declare local variables in the beginning of the
8561 function.
8562 (grub_vesafb_getcharwidth): New function.
8563 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
8564 getcharwidth.
8565
1f0a95e4 85662005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
8567
8568 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
8569 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
8570 commands/i386/pc/vbetest.c.
8571
8572 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
8573 call grub_vbe_get_controller_info again, because the returned
8574 information is volatile.
8575 (grub_vbe_set_video_mode): Mostly rewritten.
8576 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
8577 grub_vbe_status_t correctly.
8578 (grub_vbe_get_video_mode_info): Likewise.
8579 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
8580 several if statements.
8581
8582 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
8583 * commands/i386/pc/vbeinfo.c: ... this.
8584
8585 * commands/i386/pc/vbe_test.c: Renamed to ...
8586 * commands/i386/pc/vbetest.c: ... this.
8587
8588 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
8589 ...
8590 (grub_cmd_vbeinfo): ... this. Save video modes before
8591 iterating. Skip a video mode, if it is not available, not enough
8592 information is given or it is monochrome. Show the memory
8593 model. Leave the interpretation of MODEVAR to grub_strtoul
8594 completely.
8595 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
8596 (GRUB_MOD_FINI): Likewise.
8597
8598 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
8599 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
8600 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
8601 duplicated grub_env_get. Leave the interpretation of MODEVAR to
8602 grub_strtoul completely.
8603 (real2pm): Removed.
8604 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
8605 (GRUB_MOD_FINI): Likewise.
8606
8607 * normal/misc.c: Include grub/mm.h.
8608
8609 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
8610 vbe_list_modes with vbetest.mod and vbeinfo.mod.
8611 (vbe_list_modes_mod_SOURCES): Removed.
8612 (vbe_list_modes_mod_CFLAGS): Likewise.
8613 (vbe_test_mod_SOURCES): Likewise.
8614 (vbe_test_mod_CFLAGS): Likewise.
8615 (vbeinfo_mod_SOURCES): New variable.
8616 (vbeinfo_mod_CFLAGS): Likewise.
8617 (vbetest_mod_SOURCES): Likewise.
8618 (vbetest_mod_CFLAGS): Likewise.
8619
992ffbbe 86202005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
8621
8622 * normal/misc.c: New file.
8623
8624 * DISTLIST: Added normal/misc.c.
f19dbdb7 8625
992ffbbe 8626 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
8627 DISK to HOOK. Call HOOK with DISK.
8628 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8629 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8630 * partmap/sun.c (sun_partition_map_iterate): Likewise.
8631
8632 * normal/menu_entry.c (struct screen): Added a new member
8633 "completion_shown".
8634 (completion_buffer): New global variable.
8635 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
8636 (store_completion): New function.
8637 (complete): Likewise.
8638 (clear_completions): Likewise.
8639 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
8640 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
8641 a tab, call complete.
8642
8643 * normal/completion.c (disk_dev): Removed.
8644 (print_simple_completion): Likewise.
8645 (print_partition_completion): Likewise.
8646 (print_func): New global variable.
8647 (add_completion): Do not take the arguments WHAT or PRINT any
8648 longer. Added a new argument TYPE. Instead of printing directly,
8649 call PRINT_FUNC if not NULL.
8650 All callers changed.
8651 (complete_device): Use a local variable DEV instead of
8652 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
8653 (grub_normal_do_completion): Take a new argument HOOK. Do not
8654 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
8655 empty string, return NULL instead.
8656 All callers changed.
8657
8658 * normal/cmdline.c (print_completion): New function.
8659
8660 * kern/partition.c (grub_partition_iterate): Add an argument DISK
8661 to HOOK.
8662 All callers changed.
8663
8664 * kern/disk.c (grub_print_partinfo): Removed.
8665
8666 * include/grub/partition.h (struct grub_partition_map): Add a new
8667 argument DISK into HOOK of ITERATE.
8668 (grub_partition_iterate): Add a new argument DISK to HOOK.
8669
8670 * include/grub/normal.h (enum grub_completion_type): New enum.
8671 (grub_completion_type_t): New type.
8672 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
8673 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
8674 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
8675 (GRUB_COMPLETION_TYPE_FILE): Likewise.
8676 (grub_normal_do_completion): Added a new argument HOOK.
8677 (grub_normal_print_device_info): New prototype.
8678
8679 * include/grub/disk.h (grub_print_partinfo): Removed.
8680
8681 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
8682 (normal_mod_SOURCES): Likewise.
8683 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8684 (normal_mod_SOURCES): Likewise.
8685
8686 * commands/ls.c (grub_ls_list_disks): Use
8687 grub_normal_print_device_info instead of grub_print_partinfo. Free
8688 PNAME.
8689 (grub_ls_list_files): Use grub_normal_print_device_info instead of
8690 duplicating the code.
8691
0bd41162 86922005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8693
8694 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 8695 follow GCS more precisely.
8696 * commands/i386/pc/vbe_test.c: Likewise.
8697 * include/grub/i386/pc/vbe.h: Likewise.
8698 * term/i386/pc/vesafb.c: Likewise.
8699 * video/i386/pc/vbe.c: Likewise.
0bd41162 8700
6323696a 87012005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8702
8703 * DISTLIST: Added term/i386/pc/vesafb.c
8704 DISTLIST: Added video/i386/pc/vbe.c
8705 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
8706 DISTLIST: Added commands/i386/pc/vbe_test.c.
8707 * commands/i386/pc/vbe_list_modes.c: New file.
8708 * commands/i386/pc/vbe_test.c: Likewise.
8709 * term/i386/pc/vesafb.c: Likewise.
8710 * video/i386/pc/vbe.c: Likewise.
8711 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
8712 (grub_vbe_probe) Added prototype.
8713 (grub_vbe_set_video_mode) Likewise.
8714 (grub_vbe_get_video_mode) Likewise.
8715 (grub_vbe_get_video_mode_info) Likewise.
8716 (grub_vbe_set_pixel_rgb) Likewise.
8717 (grub_vbe_set_pixel_index) Likewise.
8718 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
8719 (pkgdata_MODULES): Added vesafb.mod.
8720 (pkgdata_MODULES): Added vbe_list_modes.mod.
8721 (pkgdata_MODULES): Added vbe_test.mod.
8722 (vbe_mod_SOURCES): Added.
8723 (vbe_mod_CFLAGS): Likewise.
8724 (vesafb_mod_SOURCES): Likewise.
8725 (vesafb_mod_CFLAGS): Likewise.
8726 (vbe_list_modes_mod_SOURCES): Likewise.
8727 (vbe_list_modes_mod_CFLAGS): Likewise.
8728 (vbe_test_mod_SOURCES): Likewise.
8729 (vbe_test_mod_CFLAGS): Likewise.
8730
0a74e62f 87312005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
8732
0a74e62f 8733 * normal/command.c (grub_command_execute): If INTERACTIVE is
8734 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
8735 CMDLINE. Disable the pager if INTERACTIVE is true.
8736 All callers are changed.
8737
8738 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
8739 before reading a config file.
8740 * normal/main.c (read_config_file): Even if a command is not
8741 found, register it if it is within an entry.
8742
8743 * util/grub-emu.c: Include sys/types.h and unistd.h.
8744 (options): Added --hold.
8745 (struct arguments): Added a new member "hold".
8746 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
8747 missing.
8748 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
8749 cleared by a debugger, if it is not zero.
8750
8751 * include/grub/normal.h (grub_command_execute): Add an argument
8752 INTERACTIVE.
8753
e51f85ae 87542005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
8755
8756 * DISTLIST: Added include/grub/i386/pc/vbe.h.
8757
e9c6f39b 87582005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
8759
8760 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
8761 program with another one, because the old one didn't detect a bug
8762 in gcc-3.4. Always use regparm 2, because the new test is still
8763 not enough for gcc-4.0. Someone must investigate a simple test
8764 case which detects a bug in gcc-4.0.
8765
8de3495c 87662005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
8767
8768 * DISTLIST: Added normal/completion.c.
8769
8770 * normal/completion.c: New file.
f19dbdb7 8771
8de3495c 8772 * term/i386/pc/console.c (grub_console_getwh): New function.
8773 (grub_console_term): Assign grub_console_getwh to getwh.
8774
8775 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
8776 function is defined in normal/completion.c as
8777 grub_normal_do_completion.
8778 (grub_cmdline_get): Use grub_normal_do_completion instead of
8779 grub_tab_complete.
8780
8781 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
8782 returns non-zero, otherwise return 0.
8783 (grub_partition_iterate): First, probe the partition map. Then,
8784 call ITERATE only for this partition map.
8785
8786 * kern/misc.c (grub_strncmp): Rewritten.
8787
8788 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
8789 returns non-zero. Otherwise return 0.
8790
8791 * include/grub/partition.h (grub_partition_map_iterate): Return
8792 int instead of void.
8793
8794 * include/grub/normal.h (grub_normal_do_completion): New prototype.
8795
8796 * include/grub/misc.h (grub_strncmp): Change the type of N to
8797 grub_size_t.
8798
8799 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
8800 of void.
8801
8802 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 8803 unsigned explicitly before comparing it with I.
8de3495c 8804
8805 * kern/main.c (grub_env_write_root): Add the attribute unused into
8806 VAR.
8807
8808 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8809 normal/completion.c.
8810 (normal_mod_SOURCES): Likewise.
8811 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8812 (normal_mod_SOURCES): Likewise.
8813
8814 * normal/command.c (grub_iterate_commands): If ITERATE returns
8815 non-zero, return one immediately.
8816
e85e144b 88172005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
8818
8819 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
8820 * kern/i386/pc/startup.S: Updated Global Descriptor table's
8821 descriptions.
8822 (grub_vbe_get_controller_info): New function.
8823 (grub_vbe_get_mode_info): Likewise.
8824 (grub_vbe_set_mode): Likewise.
8825 (grub_vbe_get_mode): Likewise.
8826 (grub_vbe_set_memory_window): Likewise.
8827 (grub_vbe_get_memory_window): Likewise.
8828 (grub_vbe_set_scanline_length): Likewise.
8829 (grub_vbe_get_scanline_length): Likewise.
8830 (grub_vbe_set_display_start): Likewise.
8831 (grub_vbe_get_display_start): Likewise.
8832 (grub_vbe_set_palette_data): Likewise.
8833 * include/grub/i386/pc/vbe.h: New file.
8834
c46153d2 88352005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8836
8837 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8838 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
8839 * DISTLIST: Likewise.
8840 * kern/ieee1275/of.c: Moved to ...
8841 * kern/ieee1275/ieee1275.c: ... here.
8842
0cb90c45 88432005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8844
8845 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
8846 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
8847 Pass 0 as `end' parameter to grub_strtoul().
8848
a19fb360 88492005-08-08 Hollis Blanchard <hollis@penguinppc.org>
8850
8851 * include/grub/powerpc/ieee1275/console.h: Do not include
8852 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
8853 ifdef.
8854 (grub_console_cur_color): Remove i386-specific prototype.
8855 (grub_console_real_putchar): Likewise.
8856 (grub_console_checkkey): Likewise.
8857 (grub_console_getkey): Likewise.
8858 (grub_console_getxy): Likewise.
8859 (grub_console_gotoxy): Likewise.
8860 (grub_console_cls): Likewise.
8861 (grub_console_setcursor): Likewise.
8862 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
8863 Include <grub/machine/console.h>.
8864 * term/ieee1275/ofconsole.c: Likewise.
8865
4ac9bd04 88662005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
8867
8868 * Makefile.in (LIBLZO): New variable.
8869
8870 * configure.ac: Check for LZO version 2.
8871
8872 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
8873 lzo/lzo1x.h instead of lzo1x.h.
8874
8875 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
8876 of -llzo.
8877
8878 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
8879 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
8880
8881 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
8882 copying the data from PARTITION to P.
8883
f4917dfd 88842005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8885
8886 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
8887 negative, unload the module.
8888
8889 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
8890 map is "pc_partition_map" but not "pc".
8891 (usage): Fix the description. The options are --boot-image and
8892 --core-image but not --boot-file or --core-file.
8893 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
8894 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
8895 DEFAULT_DIRECTORY.
8896
8897 * util/i386/pc/grub-install.in: Do not specify --boot-file or
8898 --core-file. Specify INSTALL_DEVICE as an argument.
8899
8900 * util/console.c: Include config.h.
8901 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
8902 [HAVE_NCURSES_H]: Include ncurses.h.
8903 [HAVE_CURSES_H]: Include curses.h.
8904 [!A_NORMAL] (A_NORMAL): Defined as zero.
8905 [!A_STANDOUT] (A_STANDOUT): Likewise.
8906
8907 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
8908 -lncurses.
8909 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
8910
8911 * configure.ac: Check for curses libraries and headers.
8912
8913 * Makefile.in (LIBCURSES): New variable.
8914
8915 * genmk.rb (Script::rule): Set the executable bits.
8916
8917 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
8918 name of the PC partition map is "pc_partition_map" but not "pc".
8919
0e143073 89202005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8921
8922 * util/i386/pc/grub-install.in (grub_probefs): New variable.
8923 (modules): Likewise.
8924 (usage): Added descriptions for --modules and --grub-probefs.
8925 Handle --modules and --grub-probefs. Save the arguments in MODULES
8926 and GRUB_PROBEFS, respectively.
8927 Auto-detect a filesystem module against GRUBDIR. If the result is
8928 empty and modules are not specified explicitly, abort the
8929 installation. Add the result to MODULES.
8930
8931 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
8932 disk/powerpc/ieee1275/ofdisk.c,
8933 include/grub/powerpc/ieee1275/init.h and
8934 term/powerpc/ieee1275/ofconsole.c.
8935 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
8936 term/ieee1275/ofconsole.c.
8937
8938 * include/grub/powerpc/ieee1275/console.h: Resurrected.
8939
8940 * COPYING: Upgraded to the latest version. Only the address of the
8941 FSF office has changed.
f19dbdb7 8942
efd6e6d5 89432005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
8944
8945 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
8946 kern/ieee1275.c with kern/ieee1275/of.c.
8947
8948 * kern/ieee1275.c: Moved to ...
8949 * kern/ieee1275/of.c: ... here.
8950
8ceafda2 89512005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
8952
8953 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 8954 readability.
8ceafda2 8955
8956 * config.guess: Updated to the latest version from gnulib.
8957 * config.sub: Likewise.
8958 * install.sh: Likewise.
8959 * mkinstalldirs: Likewise.
8960
8961 * include/grub/console.h: Removed. This file is arch-specific. Do
8962 not put this in include/grub.
8963
8964 * include/grub/i386/pc/console.h: Resurrected.
8965
8966 * util/console.c: Include grub/machine/console.h instead of
8967 grub/console.h.
8968 * util/grub-emu.c: Likewise.
8969
267f6cd9 89702005-08-04 Marco Gerards <metgerards@student.han.nl>
8971
8972 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
8973 hardcoded value.
f19dbdb7 8974
267f6cd9 8975 From Vincent Pelletier <subdino2004@yahoo.fr>
8976 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
8977 Redefined to use grub_getwh.
8978 (grub_term): New member named getwh.
8979 (grub_getwh): New prototype.
8980 * kern/term.c (grub_getwh): New function.
8981 * term/i386/pc/console.c (grub_console_getwh): New function.
8982 (grub_console_term): New member `getwh'.
8983 * term/i386/pc/vga.c (grub_vga_getwh): New function.
8984 (grub_vga_term): New member `getwh'.
0b5abe02 8985 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 8986 grub_ssize_t.
8987 (grub_ofconsole_getw): New function.
8988 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
8989 (grub_ofconsole_term): New field named getwh and new initial
8990 value.
8991
3be7266d 89922005-08-03 Hollis Blanchard <hollis@penguinppc.org>
8993
8994 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
8995 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
8996 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
8997 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
8998 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
8999 of <grub/machine/ieee1275.h>.
9000 * commands/ieee1275/reboot.c: Likewise.
9001 * boot/powerpc/ieee1275/ieee1275.c: Move ...
9002 * kern/ieee1275.c: ... to here. All users updated. Change all
9003 parameter structs to use new type `grub_ieee1275_cell_t'.
9004 * term/powerpc/ieee1275/ofconsole.c: Move ...
9005 * term/ieee1275/ofconsole.c: ... to here. All users updated.
9006 * disk/powerpc/ieee1275/ofdisk.c: Move ...
9007 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
9008 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
9009 to return int.
9010 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
9011 Remove unused prototypes. All users updated.
9012 * include/grub/powerpc/ieee1275/console.h: Removed.
9013 * include/grub/powerpc/ieee1275/ieee1275.h: Define
9014 `grub_ieee1275_cell_t'.
9015 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
9016 Cast comparisons with -1 to the correct type.
9017 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
9018 type to match `grub_ieee1275_entry_fn'.
9019
8b5f3938 90202005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
9021
9022 * DISTLIST: Added util/i386/pc/grub-probefs.c.
9023
9024 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
9025 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
9026 partmap/sun.c.
9027 (grub_probefs_SOURCES): New variable.
9028
9029 * util/i386/pc/grub-probefs.c: New file.
9030
9031 * util/i386/pc/grub-setup.c (main): Call
9032 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
9033 grub_hfs_init and grub_jfs_init to initialize the system. Call
9034 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
9035 grub_pc_partition_map_fini to finish the system.
9036
ea409713 90372005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
9038
9039 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
9040 function.
9041 (grub_multiboot_load_elf32): Likewise.
9042 (grub_multiboot_is_elf64): Likewise.
9043 (grub_multiboot_load_elf64): Likewise.
9044 (grub_multiboot_load_elf): Likewise.
9045 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
9046 an ELF32 or ELF64 file.
9047 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
9048
9049 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
9050 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
9051 NULL before calling FS->LABEL.
9052 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
9053 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
9054 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
9055 before calling FS->LABEL.
9056
141a288b 90572005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
9058
9059 * util/i386/pc/grub-install.in (datadir): New variable.
9060 (libdir): Removed.
9061 (pkgdatadir): New variable.
9062 (pkglibdir): Removed.
9063
0d5f8a54 90642005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
9065
9066 * DISTLIST: Added util/i386/pc/grub-install.in.
9067
9068 * util/i386/pc/grub-install.in: New file.
9069
9070 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
9071 (grub_install_SOURCES): Likewise.
9072
9073 * genmk.rb: Added support for scripts.
9074 (Script): New class.
9075 (scripts): New variable.
9076
9077 * Makefile.in (install-local): Install sbin_SCRIPTS by
9078 INSTALL_SCRIPT.
9079 (uninstall): Remove sbin_SCRIPTS.
9080
9081 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
9082 device, try to get a GRUB device by
9083 grub_util_biosdisk_get_grub_dev.
9084 Free DEST_DEV.
9085
9086 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
9087 description for --device-map.
9088
5f968e1e 90892005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9090
9091 Change the semantics of variable hooks. They now return strings
9092 instead of error values.
f19dbdb7 9093
5f968e1e 9094 * util/i386/pc/grub-setup.c: Include grub/env.h.
9095 (setup): Use grub_device_set_root instead of grub_env_set.
9096
9097 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
9098 grub_env_get instead of grub_device_set_root and
9099 grub_device_get_root, respectively.
9100
9101 * kern/main.c (grub_env_write_root): New function.
9102 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
9103 grub_env_set instead of grub_device_set_root.
9104
9105 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
9106 many variables.
9107 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
9108 rather than calling ENV->WRITE_HOOK afterwards.
9109 (grub_env_get): Return the result of ENV->READ_HOOK rather than
9110 passing a pointer of a pointer.
9111 (grub_register_variable_hook): Change the types of "read_hook" and
9112 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
9113 respectively.
9114 Allocate the default empty string on the heap, because this string
9115 may be freed later.
9116
9117 * kern/device.c: Include grub/env.h.
9118 (grub_device_set_root): Removed.
9119 (grub_device_get_root): Likewise.
9120 (grub_device_open): Use grub_env_get instead of
9121 grub_device_get_root.
9122
9123 * include/grub/env.h (grub_env_read_hook_t): New type.
9124 (grub_env_write_hook_t): Likewise.
9125 (grub_env_var): Change the types of "read_hook" and "write_hook"
9126 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9127 (grub_register_variable_hook): Likewise.
9128
9129 * include/grub/device.h (grub_device_set_root): Removed.
9130 (grub_device_set_root): Likewise.
9131
9132 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9133 make sure that DIRNAME terminates with '/', so that
9134 grub_fat_find_dir will fail if PATH is not a directory.
9135
9136 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9137 from DIRNAME.
9138 Use the qualifier auto for print_files and print_files_long.
9139 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9140 as a regular file.
9141 Put a newline only if there is no error.
9142 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9143 used.
9144
896f0afd 91452005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9146
9147 * kern/partition.c (grub_partition_probe): Initialize PART to
9148 NULL. Otherwise, when no partition map is registered, this returns
9149 a garbage.
9150
b28b81b2 91512005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
9152
9153 * partmap/apple.c (apple_partition_map_iterate): Check if POS
9154 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9155 valid.
9156
5f3607e0 91572005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
9158
9159 * commands/ls.c (grub_ls_list_disks): Print the filesystem
9160 information on each device, if it does not have partitions. Print
9161 "Device" instead of "Disk", because this function is not specific
9162 to disk devices.
9163
9164 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9165 static to ensure that it is put on the memory rather than a
9166 register.
9167
502c87e8 91682005-07-17 Yoshinori Okuji <okuji@enbug.org>
9169
9170 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9171 (grub_cat_init): Likewise.
9172 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9173 (options): Likewise.
9174 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9175 (grub_configfile_init): Likewise.
9176 * font/manager.c (GRUB_MOD_INIT): Likewise.
9177 * commands/help.c (GRUB_MOD_INIT): Likewise.
9178 (grub_help_init): Likewise.
9179 * normal/command.c (grub_command_init): Likewise.
9180 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9181 * disk/loopback.c (grub_loop_init): Likewise.
9182 (GRUB_MOD_INIT): Likewise.
9183 * commands/ls.c (grub_ls_init): Likewise.
9184 (GRUB_MOD_INIT): Likewise.
9185 (options): Likewise.
9186 * commands/boot.c (grub_boot_init): Likewise.
9187 (GRUB_MOD_INIT): Likewise.
9188 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9189 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9190 (GRUB_MOD_INIT): Likewise.
9191 * commands/cmp.c (grub_cmp_init): Likewise.
9192 (GRUB_MOD_INIT): Likewise.
9193
9194 * normal/arg.c: Use <> instead of "" to include header files.
9195 (SHORT_ARG_HELP): New macro.
9196 (SHORT_ARG_USAGE): Likewise.
9197 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9198 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9199 descriptions.
9200 (find_short): Check if C is 'h' or 'u' explicitly.
9201 (grub_arg_show_help): Use space characters instead of tabs. Treat
9202 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9203 are shown with --help and --usage only if they are not used for
9204 the command itself.
9205 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9206 'h' and 'u'.
9207
9208 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9209 const into "longarg". Change the type of "shortarg" to int.
9210
f806d18e 92112005-07-17 Yoshinori Okuji <okuji@enbug.org>
9212
9213 * boot/i386/pc/boot.S (boot_drive_check): New label.
9214
9215 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9216 macro.
9217
9218 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9219 which do not pass a boot drive correctly. Copied from GRUB Legacy.
9220
e293232b 92212005-07-17 Yoshinori Okuji <okuji@enbug.org>
9222
9223 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9224 When turning off Gate A20, skip the check and return immediately,
9225 because this is not fatal usually.
9226
ebedfd00 92272005-07-17 Yoshinori Okuji <okuji@enbug.org>
9228
9229 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9230 be 0x7C00 instead of 0x8000.
9231
9232 * boot/i386/pc/pxeboot.S: Rewritten.
9233
9234 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9235 EXT_C.
9236 (gate_a20_check_state): Read a byte from 0x108000. Invert the
9237 result.
9238
654fc59f 92392005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
9240
9241 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9242 robustness. This routine now supports a BIOS call and System
9243 Control Port A to modify the gate A20.
9244
9245 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9246 Increased to 0x440.
9247
09f9923f 92482005-07-12 Hollis Blanchard <hollis@penguinppc.org>
9249
9250 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9251 device path and resulting ihandle.
9252 (grub_ofdisk_close): dprintf the ihandle being closed.
9253 (grub_ofdisk_read): dprintf function parameters.
9254 * kern/mm.c (grub_mm_init_region): Likewise.
9255 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9256 (grub_linux_boot): dprintf the Linux entry point, initrd address and
9257 size, and boot arguments.
9258 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9259 before loading into memory.
9260 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9261 before loading into memory.
9262
7ef504d8 92632005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
9264
9265 * kern/mm.c: Added much documentation.
9266 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9267 8, set to 5 instead of 8.
9268
e0f050c2 92692005-07-10 Yoshinori Okuji <okuji@enbug.org>
9270
9271 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9272
9273 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9274 (grub_mkdevicemap_SOURCES): New variable.
9275
9276 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9277 lib/device.c of GRUB Legacy.
9278
7224189a 92792005-07-10 Yoshinori Okuji <okuji@enbug.org>
9280
9281 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9282 instead of PATH is NULL.
9283
68c864eb 92842005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
9285
9286 * commands/cmp.c (BUFFER_SIZE): New macro.
9287 (grub_cmd_cmp): Close the right file at the right time. Compare
9288 only data just read. Don't report files of different size as
9289 identical. Dynamically allocate buffers. Move variable
9290 declarations at the beginning of function.
9291
e6f3e614 92922005-07-09 Yoshinori Okuji <okuji@enbug.org>
9293
9294 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9295 reverse.
9296
f8f1559a 92972004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
9298
9299 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9300 when backspace is pressed at beginning of line.
9301
39c9d41d 93022005-07-03 Yoshinori Okuji <okuji@enbug.org>
9303
9304 * DISTLIST: Added genfslist.sh.
9305
9306 * normal/main.c (fs_module_list): New variable.
9307 (autoload_fs_module): New function.
9308 (read_fs_list): Likewise.
9309 (grub_normal_execute): Call read_fs_list.
9310
9311 * kern/fs.c (grub_fs_autoload_hook): New variable.
9312 (grub_fs_probe): Added support for auto-loading.
9313
9314 * include/grub/normal.h (struct grub_fs_module_list): New struct.
9315 (grub_fs_module_list_t): New type.
9316
9317 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
9318 (grub_fs_autoload_hook): New prototype.
9319
9320 * genfslist.sh: New file.
f19dbdb7 9321
39c9d41d 9322 * genmk.rb: Added a rule to generate a filesystem list.
9323
121c1d83 93242005-06-30 Marco Gerards <metgerards@student.han.nl>
9325
9326 * configure.ac: Fix the test for cross-compiling.
9327
9328 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
9329 define GRUB_UTIL anymore.
9330
9331 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9332 so this function works on other systems than just big endian.
9333 (load_modules): Likewise.
9334 (add_segments): Likewise.
9335
e75d76e1 93362005-06-23 Hollis Blanchard <hollis@penguinppc.org>
9337
9338 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
9339 contains `l' modifier, get a long from va_arg().
9340
50b5a0a7 93412005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
9342
9343 * kern/mm.c (grub_free): If the next free block which is being
9344 merged is the first free block, set the first block to the block
9345 being freed.
9346 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
9347
89371b20 93482005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9349
9350 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
9351 `grub_ieee1275_chosen'.
9352
168d6e58 93532005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9354
9355 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
9356 (grub_ieee1275_chosen): New variable.
9357 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
9358 `chosen'.
9359 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
9360 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9361 Rename first argument to `phandle' for consistency.
9362 (grub_ieee1275_get_property_length): Likewise.
9363 (grub_ieee1275_next_property): Likewise. Change type of first argument
9364 to grub_ieee1275_phandle_t.
9365 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
9366 Move export next to declaration.
9367 (grub_ieee1275_chosen): New variable.
9368 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
9369 Correct cosmetic typo.
9370 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
9371 `grub_ieee1275_chosen'.
9372 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
9373 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
9374 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
9375 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
9376 `grub_ieee1275_chosen'.
9377
ca5baa3f 93782005-05-10 Hollis Blanchard <hollis@penguinppc.org>
9379
9380 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
9381 /chosen/bootargs.
9382 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
9383 /chosen/bootargs as "variable=value" pairs.
9384
708b345f 93852005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
9386
9387 * include/grub/misc.h (grub_dprintf): New macro.
9388 (grub_real_dprintf): New prototype.
9389 (grub_strword): Likewise.
9390 (grub_iswordseparator): Likewise.
9391 * kern/misc.c (grub_real_dprintf): New function.
9392 (grub_strword): Likewise.
9393 (grub_iswordseparator): Likewise.
9394
f4c5e67c 93952005-04-30 Hollis Blanchard <hollis@penguinppc.org>
9396
9397 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
9398 (roundup): Remove macro.
9399 (grub_ieee1275_flags): Make static.
9400 (grub_ieee1275_realmode): Remove.
9401 (grub_ieee1275_test_flag): New function.
9402 (grub_ieee1275_set_flag): Likewise.
9403 (find_options): Rename to `grub_ieee1275_find_options'; update
9404 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
9405 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
9406 (cmain): New prototype.
9407 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
9408 `grub_ieee1275_flags' directly.
9409 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
9410 machine/biosdisk.h.
9411 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
9412 Don't include grub/machine/init.h.
9413 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
9414 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9415 Remove prototype.
9416 (grub_ieee1275_realmode): Likewise.
9417 (grub_ieee1275_flag): New enum.
9418 (grub_ieee1275_test_flag): New prototype.
9419 (grub_ieee1275_set_flag): New prototype.
9420 * include/grub/powerpc/ieee1275/init.h: Remove file.
9421 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
9422 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
9423 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
9424 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
9425 comment.
9426 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
9427 `grub_ieee1275_test_flag'.
9428 (grub_ieee1275_encode_devname): Likewise.
9429
ed16607e 94302005-04-21 Hollis Blanchard <hollis@penguinppc.org>
9431
9432 * include/grub/powerpc/ieee1275/ieee1275.h
9433 (grub_ieee1275_encode_devname): New prototype.
9434 (grub_ieee1275_get_filename): Likewise.
9435 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
9436 function.
9437 (grub_set_prefix): Likewise.
9438 (grub_machine_init): Call grub_set_prefix.
9439 * kern/powerpc/ieee1275/openfw.c: Fix typos.
9440 (grub_parse_type): New enum.
9441 (grub_ieee1275_get_devargs): New function.
9442 (grub_ieee1275_get_devname): Likewise.
9443 (grub_ieee1275_parse_args): Likewise.
9444 (grub_ieee1275_get_filename): Likewise.
9445 (grub_ieee1275_encode_devname): Likewise.
9446
be369920 94472005-03-30 Marco Gerards <metgerards@student.han.nl>
9448
9449 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
9450 `grub_loader_unset'.
9451
a5ce3a4a 94522005-03-26 Hollis Blanchard <hollis@penguinppc.org>
9453
9454 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
9455 instead of grub_ieee1275_interpret.
9456 (grub_halt_init): New function.
9457 (grub_halt_fini): Likewise.
9458 (GRUB_MOD_INIT): Correct message grammar.
9459 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
9460 instead of grub_ieee1275_interpret.
9461 (grub_reboot_init): New function.
9462 (grub_reboot_fini): Likewise.
9463 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
9464 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
9465 util/i386/pc/misc.c with commands/ieee1275/halt.c,
9466 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
9467 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
9468 function.
9469 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
9470 Add prototype.
9471 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
9472 prototype.
9473 (grub_halt): Likewise.
9474 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
9475 (cmain): Remove __attribute__((unused)).
9476 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
9477 (grub_heap_len): Likewise.
9478 (grub_machine_fini): New function.
9479 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
9480 (grub_halt): Likewise.
9481 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
9482 function.
9483 * util/powerpc/ieee1275/misc.c: New file.
9484
0058f771 94852005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9486
9487 * DISTLIST: New file.
9488 * gendistlist.sh: Likewise.
f19dbdb7 9489
0058f771 9490 * Makefile.in (COMMON_DISTFILES): Removed.
9491 (BOOT_DISTFILES): Likewise.
9492 (CONF_DISTFILES): Likewise.
9493 (DISK_DISTFILES): Likewise.
9494 (FS_DISTFILES): Likewise.
9495 (INCLUDE_DISTFILES): Likewise.
9496 (KERN_DISTFILES): Likewise.
9497 (LOADER_DISTFILES): Likewise.
9498 (TERM_DISTFILES): Likewise.
9499 (UTIL_DISTFILES): Likewise.
9500 (DISTFILES): Likewise.
9501 (uninstall): Uninstall files in $(pkgdata_DATA).
9502 (DISTLIST): New target.
9503 (distdir): Use the contents of the file DISTLIST to get a list of
9504 distributed files.
9505
46b3b8a5 95062005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9507
9508 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
9509 descriptor. This is ported from GRUB Legacy.
9510
9511 * gencmdlist.sh: Added an extra semicolon to make it work with
9512 old sed versions. Reported by Robert Bihlmeyer
9513 <robbe@orcus.priv.at>.
9514
5822ff87 95152005-03-08 Yoshinori Okuji <okuji@enbug.org>
9516
9517 Automatic loading of commands is supported.
f19dbdb7 9518
5822ff87 9519 * normal/main.c (read_command_list): New function.
9520 (grub_normal_execute): Call read_command_list.
9521
9522 * normal/command.c (grub_register_command): Return zero or CMD.
9523 Allocate CMD->NAME from the heap.
9524 Initialize CMD->MODULE_NAME to zero.
9525 Find the same name as well. If the same command is found and it is
9526 a dummy command, overwrite members. If it is not a dummy command,
9527 return zero.
9528 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
9529 (grub_command_find): If a dummy command is found, load a module
9530 and retry to find a command only once.
9531
9532 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
9533 make sure that each command is loaded.
9534
9535 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
9536 macro.
9537 (struct grub_command): Remove const from the member `name'.
9538 Add a new member `module_name'.
9539 (grub_register_command): Return grub_command_t.
9540
9541 * commands/help.c (grub_cmd_help): Call grub_command_find to make
9542 sure that each command is loaded.
9543
9544 * genmk.rb (PModule::rule): Specify a module name without the
9545 suffix ".mod" to gencmdlist.sh.
9546
7b1f4b57 95472005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9548
9549 * gencmdlist.sh: New file.
f19dbdb7 9550
7b1f4b57 9551 * genmk.rb (PModule::rule): Generate a rule for a command list.
9552 Clean command.lst.
9553 Generate command.lst from $(COMMANDFILES).
9554
9555 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
9556 (DATA): Added $(pkgdata_DATA).
9557 (install-local): Install files in $(pkgdata_DATA).
9558
062aaf39 95592005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9560
9561 * term/i386/pc/vga.c (debug_command): Removed.
9562 (GRUB_MOD_INIT): Do not register the command "debug".
9563
9564 From Hollis Blanchard:
9565 * commands/configfile.c: New file.
9566 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9567 commands/configfile.c.
9568 (pkgdata_MODULES): Added configfile.mod.
9569 (configfile_mod_SOURCES): New variable.
9570 (configfile_mod_CFLAGS): Likewise.
9571 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9572 commands/configfile.c.
9573 (pkgdata_MODULES): Added configfile.mod.
9574 (configfile_mod_SOURCES): New variable.
9575 (configfile_mod_CFLAGS): Likewise.
9576 * util/grub-emu.c (main): Call grub_configfile_init and
9577 grub_configfile_fini.
9578 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
9579 prototype.
9580 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 9581
cee01aa6 95822005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9583
9584 * normal/arg.c (grub_arg_show_help): Do not show the bug report
9585 address.
9586
9587 * commands/help.c (grub_cmd_help): Do not print newlines after
9588 the last command in print_command_help.
9589
93f3a1d8 95902005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9591
9592 * commands/default.h: New file.
9593 * commands/timeout.h: Likewise.
9594 * normal/context.c: Likewise.
f19dbdb7 9595
93f3a1d8 9596 * util/misc.c: Do not include sys/times.h.
9597 Include sys/time.h and grub/machine/time.h.
9598 (grub_get_rtc): Rewritten with gettimeofday.
9599
9600 * util/grub-emu.c (main): Call grub_default_init and
9601 grub_timeout_init before grub_normal_init, and call
9602 grub_timeout_fini and grub_default_fini after grub_main.
9603
9604 * util/console.c (grub_ncurses_checkkey): Return the read
9605 character or -1.
9606
9607 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
9608 timeouts.
9609
9610 * normal/main.c (read_config_file): Push MENU. If this fails,
9611 print an error and wait for a user input.
9612 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
9613 If a menu is empty or an error occurs, pop MENU.
9614 (grub_normal_execute): Pop and free MENU after grub_menu_run
9615 returns.
9616
9617 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
9618
9619 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
9620 include time.h.
9621 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9622 without GRUB_UTIL.
9623 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
9624 time.h.
9625 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9626 without GRUB_UTIL.
9627
9628 * include/grub/normal.h (struct grub_menu_list): New struct.
9629 (grub_menu_list_t): New type.
9630 (struct grub_context): New struct.
9631 (grub_context_t): New type.
9632 (grub_register_command): Got rid of EXPORT_FUNC.
9633 (grub_unregister_command): Likewise.
9634 (grub_context_get): New prototype.
9635 (grub_context_get_current_menu): Likewise.
9636 (grub_context_push_menu): Likewise.
9637 (grub_context_pop_menu): Likewise.
9638 [GRUB_UTIL] (grub_default_init): Likewise.
9639 [GRUB_UTIL] (grub_default_fini): Likewise.
9640 [GRUB_UTIL] (grub_timeout_init): Likewise.
9641 [GRUB_UTIL] (grub_timeout_fini): Likewise.
9642
9643 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
9644 commands/timeout.c and normal/context.c.
9645 (pkgdata_MODULES): Added default.mod and timeout.mod.
9646 (normal_mod_SOURCES): Added normal/context.c.
9647 (default_mod_SOURCES): New variable.
9648 (default_mod_CFLAGS): Likewise.
9649 (timeout_mod_SOURCES): Likewise.
9650 (timeout_mod_CFLAGS): Likewise.
9651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
9652 conf/i386-pc.rmk.
9653 (pkgdata_MODULES): Added default.mod and timeout.mod.
9654 (normal_mod_SOURCES): Added normal/context.c.
9655 (default_mod_SOURCES): New variable.
9656 (default_mod_CFLAGS): Likewise.
9657 (timeout_mod_SOURCES): Likewise.
9658 (timeout_mod_CFLAGS): Likewise.
9659
9660 * Makefile.in (all-local): Added $(MKFILES).
9661
4ed2e1dd 96622005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
9663
9664 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
9665 (grub_emu_SOURCES): Likewise.
9666 (pkgdata_MODULES): Add `sun.mod'.
9667 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9668 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9669 `partmap/sun.c'.
9670 (pkgdata_MODULES): Add `sun.mod'.
9671 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9672 * include/grub/partition.h (grub_sun_partition_map_init): New
9673 prototype.
9674 (grub_sun_partition_map_fini): Likewise.
9675 * partmap/sun.c: New file.
9676 * util/grub-emu.c (main): Initialize and de-initialize the sun
9677 partitionmap support.
9678
4d4e372e 96792005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
9680
9681 This implements an Emacs-like menu entry editor.
f19dbdb7 9682
4d4e372e 9683 * normal/menu_entry.c: New file.
f19dbdb7 9684
4d4e372e 9685 * util/console.c (grub_ncurses_putchar): Translate some Unicode
9686 characters to ASCII.
9687 (saved_char): New variable.
9688 (grub_ncurses_checkkey): Rewritten completely.
9689 (grub_ncurses_getkey): Likewise.
9690 (grub_ncurses_init): Call raw instead of cbreak.
9691
9692 * normal/menu.c (print_entry): Do not put a space.
9693 (init_page): Renamed to ...
9694 (grub_menu_init_page): ... this. All callers changed.
9695 (edit_menu_entry): Removed.
9696 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
9697
9698 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
9699
9700 * kern/misc.c (grub_vprintf): Call grub_refresh.
9701
9702 * normal/menu.c (DISP_LEFT): Renamed to ...
9703 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
9704 * normal/menu.c (DISP_UP): Renamed to ...
9705 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
9706 * normal/menu.c (DISP_RIGHT): Renamed to ...
9707 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
9708 * normal/menu.c (DISP_DOWN): Renamed to ...
9709 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
9710 * normal/menu.c (DISP_HLINE): Renamed to ...
9711 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
9712 * normal/menu.c (DISP_VLINE): Renamed to ...
9713 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
9714 * normal/menu.c (DISP_UL): Renamed to ...
9715 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
9716 * normal/menu.c (DISP_UR): Renamed to ...
9717 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
9718 * normal/menu.c (DISP_LL): Renamed to ...
9719 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
9720 * normal/menu.c (DISP_LR): Renamed to ...
9721 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
9722 * normal/menu.c (TERM_WIDTH): Renamed to ...
9723 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
9724 * normal/menu.c (TERM_HEIGHT): Renamed to ...
9725 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
9726 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
9727 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
9728 * normal/menu.c (TERM_MARGIN): Renamed to ...
9729 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
9730 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
9731 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
9732 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
9733 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
9734 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
9735 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
9736 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
9737 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
9738 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
9739 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
9740 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
9741 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
9742 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
9743 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
9744 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
9745 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
9746 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
9747 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
9748 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
9749 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
9750 All callers changed.
9751
9752 * include/grub/normal.h: New prototype.
9753
9754 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9755 normal/menu_entry.c.
9756 (normal_mod_SOURCES): Likewise.
9757 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9758 (normal_mod_SOURCES): Likewise.
9759
e6b92c8a 97602005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
9761
9762 * include/grub/normal.h (grub_halt_init): New prototype.
9763 (grub_halt_fini): Likewise.
9764 (grub_reboot_init): Likewise.
9765 (grub_reboot_fini): Likewise.
9766
9767 * util/grub-emu.c: Include signal.h.
9768 (main_env): New global variable.
9769 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
9770 catch C-c.
9771 (grub_machine_fini): New function.
9772 (main): Call grub_halt_init and grub_reboot_init before
9773 grub_main, and grub_reboot_fini and grub_halt_fini after it.
9774 Call setjmp with MAIN_ENV to go back afterwards.
9775 Call grub_machine_fini right before return.
9776
9777 * include/grub/util/misc.h: Include setjmp.h.
9778 (main_env): New prototype.
9779
9780 * include/grub/kernel.h (grub_machine_fini): New prototype.
9781 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
9782 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
9783
9784 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
9785 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
9786 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 9787
e6b92c8a 9788 * util/i386/pc/misc.c: New file.
f19dbdb7 9789
e6b92c8a 9790 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9791 util/i386/pc/misc.c, commands/i386/pc/halt.c and
9792 commands/i386/pc/reboot.c.
9793
c642636f 97942005-02-14 Guillem Jover <guillem@hadrons.org>
9795
9796 * include/grub/dl.h (grub_dl_check_header): New prototype.
9797 (grub_arch_dl_check_header): Change return type to grub_err_t,
9798 remove size parameter and export function. Update all callers.
9799 * kern/dl.c (grub_dl_check_header): New function.
9800 (grub_dl_load_core): Use `grub_dl_check_header' instead of
9801 `grub_arch_dl_check_header'. Check ELF type. Check if sections
9802 are inside the core.
9803 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
9804 independent ELF header checks.
9805 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9806 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
9807 `grub_dl_check_header' instead of explicit checks. Check for the
9808 ELF type.
9809 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
9810 `grub_dl_check_header' instead of explicit checks. Remove arch
9811 specific ELF header checks.
9812
e6b92c8a 9813 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
9814 argument SIZE.
9815
5eabe94b 98162005-02-13 Hollis Blanchard <hollis@penguinppc.org>
9817
9818 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
9819 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
9820
1b14a681 98212005-02-12 Hollis Blanchard <hollis@penguinppc.org>
9822
9823 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 9824 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 9825 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 9826 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 9827 * partmap/amiga.c (amiga_partition_map_iterate): Return
9828 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
9829 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9830
aca108aa 98312005-02-01 Guillem Jover <guillem@hadrons.org>
9832
9833 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
9834 help info.
9835
c9f9c556 98362005-01-31 Marco Gerards <metgerards@student.han.nl>
9837
9838 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
9839 Removed prototype.
9840 (grub_rescue_cmd_linux): New prototype.
9841 (grub_rescue_cmd_initrd): Likewise.
9842 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
9843 `bi_rec'.
9844 (grub_linux_release_mem): Release the memory for the initrd.
9845 (grub_load_linux): Renamed from this...
9846 (grub_rescue_cmd_linux): ...To this. Changed all callers.
9847 Changed `entry' not to be static. Loop over memory regions to
9848 find another one when the default fails.
9849 (grub_rescue_cmd_initrd): New function.
9850 (grub_linux_init): Remove function.
9851 (grub_linux_fini): Likewise.
9852 (GRUB_MOD_INIT): Register `initrd'.
9853 (GRUB_MOD_FINI): Unregister `initrd'.
9854 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
9855 Function removed.
9856 (grub_linux_normal_fini): Likewise.
9857 (GRUB_MOD_INIT): Register `initrd'.
9858 (GRUB_MOD_FINI): Unregister `initrd'.
9859
990cf3aa 98602005-01-31 Marco Gerards <metgerards@student.han.nl>
9861
9862 * commands/help.c: New file.
9863 * normal/arg.c (show_help): Renamed to...
9864 (grub_arg_show_help): ... this.
9865 * commands/i386/pc/halt.c: New file.
9866 * commands/i386/pc/reboot.c: Likewise.
9867 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
9868 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
9869 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
9870 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
9871 variables.
9872 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9873 `commands/help.c'.
9874 (pkgdata_MODULES): Add `help.mod'.
9875 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
9876 * grub/i386/pc/init.h (grub_reboot): New prototype.
9877 (grub_halt): Likewise.
9878 * include/grub/normal.h (grub_arg_show_help): New prototype.
9879 (grub_help_init): Likewise.
9880 (grub_help_fini): Likewise.
9881 * util/grub-emu.c (main): Initialize and deinitialize the help
9882 command.
9883
9884 * normal/cmdline.c (grub_cmdline_get): Doc fix.
9885
9886 * normal/command.c (grub_command_init): Fixed the description of
9887 the `set' and `unset' commands.
9888
98892005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 9890
9891 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
9892 function.
9893 * commands/ieee1275/halt.c: New file.
9894 * commands/ieee1275/reboot.c: Likewise.
9895 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
9896 `__attribute__ ((unused))'. Some GCS related fixed.
9897 (grub_suspend_init) [GRUB_UTIL]: Function removed.
9898 (grub_suspend_fini): Likewise.
9899 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
9900 and `halt.mod'.
9901 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
9902 (halt_mod_CFLAGS): New variables.
9903 * include/grub/powerpc/ieee1275/ieee1275.h
9904 (grub_ieee1275_interpret): New prototype.
9905
1ab09cc7 99062005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
9907
9908 * include/grub/misc.h (memmove): New prototype.
9909 (memcpy): Likewise.
9910
8b8cbdb2 99112005-01-22 Hollis Blanchard <hollis@penguinppc.org>
9912
9913 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
9914 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
9915
e3741a27 99162005-01-22 Marco Gerards <metgerards@student.han.nl>
9917
9918 * kern/misc.c (grub_strndup): Function rewritten.
9919
776bd780 99202005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
9921
9922 * normal/menu.c (TERM_WIDTH): Macro redefined.
9923 (TERM_TOP_BORDER_Y): Likewise.
9924 (draw_border): Replaced while-loop by a for-loop. Make the number
9925 of lines consistent with the number of lines displayed in
9926 print_entries. Added a margin below the rectangle.
9927 (print_entry): Make the entry fit in the rectangle.
9928 (print_entries): Display the scroll arrows next to the right
9929 border.
9930
78026bce 99312005-01-21 Marco Gerards <metgerards@student.han.nl>
9932
9933 * fs/minix.c (grub_minix_find_file): Reserve more space for
9934 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
9935 `grub_strncpy' to copy `path' into it.
9936
67bbaf0f 99372005-01-21 Marco Gerards <metgerards@student.han.nl>
9938
9939 Add the loopback device, a device via which files can be accessed
9940 as devices.
f19dbdb7 9941
67bbaf0f 9942 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
9943 (pkgdata_MODULES): Add loopback.mod.
9944 (loopback_mod_SOURCES): New variable.
9945 (loopback_mod_CFLAGS): Likewise.
9946 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9947 `disk/loopback.c'.
9948 (pkgdata_MODULES): Add loopback.mod.
9949 (loopback_mod_SOURCES): New variable.
9950 (loopback_mod_CFLAGS): Likewise.
9951 * disk/loopback.c: new file.
9952 * include/grub/normal.h (grub_loop_init): New prototype.
9953 (grub_loop_fini): New prototype.
9954 * util/grub-emu.c (main): Initialize and de-initialize loopback
9955 support.
9956 * include/grub/disk.h (grub_disk_dev_id): Add
9957 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
9958
6f1c18bd 99592005-01-20 Hollis Blanchard <hollis@penguinppc.org>
9960
9961 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
9962 function.
9963 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
9964 (suspend_mod_SOURCES): New variable.
9965 (suspend_mod_CFLAGS): Likewise.
9966 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
9967 New prototype.
9968 * commands/ieee1275/suspend.c: New file.
9969
b38551da 99702005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9971
9972 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 9973 ((unused))' to `__attribute__ ((used))'.
b38551da 9974 (GRUB_MOD_FINI): Likewise.
9975 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
9976 * genmk.rb (PModule): Assign space to common symbols when linking
9977 modules.
9978
777aff39 99792005-01-20 Marco Gerards <metgerards@student.han.nl>
9980
9981 * include/grub/mm.h (grub_mm_init_region): Change the type of the
9982 `unsigned' arguments to `grub_size_t'.
9983 (grub_malloc): Likewise.
9984 (grub_realloc): Likewise.
9985 (grub_memalign): Likewise.
9986 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
9987 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9988 * util/misc.c (grub_malloc): Likewise.
9989 (grub_realloc): Likewise.
9990 * kern/mm.c (get_header_from_pointer): Change the casts to
9991 `unsigned' into a cast to `grub_size_t'.
9992
9993 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
9994 point to `currnode' when `currnode' is changed.
9995
9996 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
9997 Schottelius <nico-linux@schottelius.org>.
9998
d0ff18e1 99992005-01-09 Hollis Blanchard <hollis@penguinppc.org>
10000
10001 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
10002 (note_path): Remove variable.
10003 (GRUB_IEEE1275_NOTE_NAME): New macro.
10004 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
10005 (grub_ieee1275_note_hdr): New structure.
10006 (grub_ieee1275_note_desc): Likewise.
10007 (grub_ieee1275_note): Likewise.
10008 (load_note): Remove `dir' argument. All callers updated. Remove
10009 `note_img' and `path'. Do not load a file from `note_path'.
10010 Initialize a struct grub_ieee1275_note and write that to `out'.
10011 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
10012
4ca7004c 100132005-01-05 Marco Gerards <metgerards@student.han.nl>
10014
10015 * util/misc.c (grub_util_read_image): Revert last change. It
10016 called `grub_util_read_at', which seeks from the beginning of the
10017 file.
10018
0b412211 100192005-01-04 Hollis Blanchard <hollis@penguinppc.org>
10020
10021 * TODO: Add note about endianness in grub-mkimage.
10022 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
10023 section.
10024 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
10025 (grub_mkimage_SOURCES): New target.
10026 * include/grub/kernel.h (grub_start_addr): Remove variable.
10027 (grub_end_addr): Likewise.
10028 (grub_total_module_size): Likewise.
10029 (grub_kernel_image_size): Likewise.
10030 (GRUB_MODULE_MAGIC): New constant.
10031 (grub_module_info): New structure.
10032 (grub_arch_modules_addr): New prototype.
10033 (grub_get_end_addr): Remove prototype.
10034 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
10035 * include/grub/powerpc/ieee1275/kernel.h: New file.
10036 * include/grub/util/misc.h (grub_util_get_fp_size): New
10037 prototype.
10038 (grub_util_read_at): Likewise.
10039 (grub_util_write_image_at): Likewise.
10040 * kern/main.c (grub_get_end_addr): Remove function.
10041 (grub_load_modules): Call grub_arch_modules_addr instead of using
10042 grub_end_addr. Look for a grub_module_info struct in memory. Use
10043 the grub_module_info fields instead of calling grub_get_end_addr
10044 as loop conditions. Move grub_add_unused_region code here.
10045 (grub_add_unused_region): Remove function.
10046 * kern/i386/pc/init.c: Include grub/cache.h.
10047 (grub_machine_init): Remove call to grub_get_end_addr. Remove
10048 one call to add_mem_region.
10049 (grub_arch_modules_addr): New function.
10050 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
10051 (grub_total_module_size): Likewise.
10052 Include grub/machine/kernel.h.
10053 (grub_arch_modules_addr): New function.
10054 * util/grub-emu.c (grub_end_addr): Remove variable.
10055 (grub_total_module_size): Likewise.
10056 (grub_arch_modules_addr): New function.
10057 * util/misc.c: Include unistd.h.
10058 (grub_util_get_fp_size): New function.
10059 (grub_util_read_at): Likewise.
10060 (grub_util_write_image_at): Likewise.
10061 (grub_util_read_image): Call grub_util_read_at.
10062 (grub_util_write_image): Call grub_util_write_image_at.
10063 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
10064 additional memory in kernel_img for a struct grub_module_info.
10065 Fill in that grub_module_info.
10066 * util/powerpc/ieee1275/grub-mkimage.c: New file.
10067
458786f8 100682005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10069
10070 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
10071 New function.
10072 * include/grub/powerpc/ieee1275/ieee1275.h
10073 (grub_ieee1275_milliseconds): New prototype.
10074 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
10075 Change to 1000.
10076 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
10077 grub_ieee1275_milliseconds.
10078
ac507d1b 100792005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10080
10081 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
10082 variable.
10083 (find_options): New function.
10084 (cmain): Call find_options.
10085 * include/grub/powerpc/ieee1275/ieee1275.h
10086 (grub_ieee1275_realmode): New extern variable.
10087 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
10088 grub_map if grub_ieee1275_realmode is false.
10089
6b8fd1c4 100902004-12-29 Marco Gerards <metgerards@student.han.nl>
10091
10092 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
10093 lines are inserted and make it work like readline. Reported by
10094 Vincent Pelletier <subdino2004@yahoo.fr>.
10095
8514a1e0 100962004-12-28 Marco Gerards <metgerards@student.han.nl>
10097
10098 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
10099
10100 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
10101 `kern/powerpc/cache.S'.
10102
924b6140 101032004-12-27 Marco Gerards <metgerards@student.han.nl>
10104
10105 * genmk.rb: Handle the `Program' class in the main loop. Written
10106 by Johan Rydberg <jrydberg@gnu.org>.
10107 (Program): New class.
10108 (programs): New variable.
10109 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
10110 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
10111 instead of "grub/kernel.h". Include <grub/machine/init.h>.
10112 (help_arch): Function removed.
10113 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
10114 `powerpc/libgcc.h' and `loader.h'.
10115 (pkgdata_PROGRAMS): New variable.
10116 (sbin_UTILITIES): Variable removed.
10117 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
10118 (grubof_SOURCES): Variable re-defined so it only includes the
10119 core functionality.
10120 (grubof_CFLAGS): Remove `-DGRUBOF'.
10121 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10122 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10123 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10124 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10125 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10126 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10127 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10128 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10129 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10130 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10131 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10132 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10133 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10134 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10135 (pc_mod_CFLAGS): New variables.
10136 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10137 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10138 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10139 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10140 Moved from here...
10141 * include/grub/i386/pc/init.h (grub_os_area_addr)
10142 (rub_os_area_size): ... to here.
10143 * include/grub/powerpc/ieee1275/ieee1275.h
10144 (grub_ieee1275_entry_fn): Export symbol.
10145 * include/grub/powerpc/ieee1275/init.h: New file.
10146 * include/grub/powerpc/libgcc.h: Likewise.
10147 * include/grub/cache.h: Likewise.
10148 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
10149 <hollis@penguinppc.org>.
10150 * kern/dl.c: Include <grub/cache.h>.
10151 (grub_dl_flush_cache): New function.
10152 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10153 for this module.
10154 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10155 (grub_console_init): Removed prototypes.
10156 (grub_machine_init): Don't initialize the modules anymore.
10157 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10158 static.
10159 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10160 Macro undef removed.
10161 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10162 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10163 relocation `R_PPC_REL32'. Return an error when the relocation is
10164 unknown.
10165 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10166 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10167 * util/misc.c (grub_arch_sync_caches): Likewise.
10168
e4b47e0c 101692004-12-19 Marco Gerards <metgerards@student.han.nl>
10170
10171 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10172 `symlist.c', add `grubof_symlist.c'.
10173 (symlist.c): Variable removed.
10174 (grubof_HEADERS): Variable added.
10175 (grubof_symlist.c): New target.
10176 (kernel_syms.lst): Use `grubof_HEADERS' instead of
10177 `kernel_img_HEADERS'.
10178 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10179 * kern/powerpc/dl.c: New file.
10180 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10181 Function removed.
10182 (grub_arch_dl_relocate_symbols): Likewise.
10183 (grub_register_exported_symbols): Likewise.
10184
4ceb3636 101852004-12-13 Marco Gerards <metgerards@student.han.nl>
10186
10187 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10188 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
10189 to fail instead. Reported by Vincent Pelletier
10190 <subdino2004@yahoo.fr>.
10191
10192 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10193 it is not allocated. Reported by Vincent Pelletier
10194 <subdino2004@yahoo.fr>.
10195
10196 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10197 output so the output looks better.
f19dbdb7 10198
3f1578fe 101992004-12-04 Marco Gerards <metgerards@student.han.nl>
10200
10201 Modulize the partition map support and add support for the amiga
10202 partition map.
f19dbdb7 10203
3f1578fe 10204 * commands/ls.c: Include <grub/partition.h> instead of
10205 <grub/machine/partition.h>.
10206 * kern/disk.c: Likewise.
10207 * kern/rescue.c: Likewise.
10208 * loader/i386/pc/chainloader.c: Likewise.
10209 * normal/cmdline.c: Likewise.
10210 * kern/powerpc/ieee1275/init.c: Likewise.
10211 (grub_machine_init): Call `grub_pc_partition_map_init',
10212 `grub_amiga_partition_map_init' and
10213 `grub_apple_partition_map_init'.
10214 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10215 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
10216 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
10217 `partition.h' and `pc_partition.h'.
10218 (grub_setup_SOURCES): Remove
10219 `disk/i386/pc/partition.c'. Add `kern/partition.c',
10220 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10221 (grub_emu_SOURCES): Likewise.
10222 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10223 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10224 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10225 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10226 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
10227 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10228 (grubof_SOURCES): Likewise.
10229 * disk/i386/pc/partition.c: File removed.
10230 * disk/powerpc/ieee1275/partition.c: Likewise.
10231 * include/grub/powerpc/ieee1275/partition.h: Likewise.
10232 * include/grub/i386/pc/partition.h: Likewise.
10233 * kern/partition.c: New file.
10234 * partmap/amiga.c: Likewise.
10235 * partmap/apple.c: Likewise.
10236 * partmap/pc.c: Likewise.
10237 * include/grub/partition.h: Likewise..
10238 * include/grub/pc_partition.h: Likewise.
10239 * util/grub-emu.c: Include <grub/partition.h> instead of
10240 <grub/machine/partition.h>.
10241 (main): Call `grub_pc_partition_map_init',
10242 `grub_amiga_partition_map_init' and
10243 `grub_apple_partition_map_init' and deinitialize afterwards.
10244 * util/i386/pc/biosdisk.c: Include `#include
10245 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10246 `<grub/machine/partition.h>'.
10247 * util/i386/pc/grub-setup.c: Likewise.
10248 * util/i386/pc/biosdisk.c: Likewise.
10249 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10250 partition information in case of a PC partition.
10251 * util/i386/pc/grub-setup.c: Include `#include
10252 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10253 `<grub/machine/partition.h>'.
10254 (setup): Only access the PC specific partition information in case
10255 of a PC partition.
10256
0ef4ced9 102572004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10258
0ef4ced9 10259 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10260 (grub_longjmp): Likewise.
10261 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10262 20.
10263 * normal/powerpc/setjmp.S: New file.
10264 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10265 `normal/powerpc/setjmp.S'.
10266 (grubof_CFLAGS): Add `-DGRUBOF'.
10267 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10268 [GRUB_UTIL && !GRUBOF].
f19dbdb7 10269
19950e29 102702004-11-16 Marco Gerards <metgerards@student.han.nl>
10271
10272 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10273 property named `name'. Correctly handle the error returned by
10274 `grub_ieee1275_finddevice' if a device can not be opened.
10275
a2fea427 102762004-11-02 Hollis Blanchard <hollis@penguinppc.org>
10277
10278 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10279 `actual' for negativity.
10280 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10281 kern/fshelp.c.
10282
41ea0ea3 102832004-11-01 Marco Gerards <metgerards@student.han.nl>
10284
10285 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10286 (PAGE_OFFSET): New macro.
10287 (CRTC_ADDR_PORT): Likewise.
10288 (CRTC_DATA_PORT): Likewise.
10289 (START_ADDR_HIGH_REGISTER): Likewise.
10290 (START_ADDR_LOW_REGISTER): Likewise.
10291 (GRAPHICS_ADDR_PORT): Likewise.
10292 (GRAPHICS_DATA_PORT): Likewise.
10293 (READ_MAP_REGISTER): Likewise.
10294 (INPUT_STATUS1_REGISTER): Likewise.
10295 (INPUT_STATUS1_VERTR_BIT): Likewise.
10296 (page): New variable.
10297 (wait_vretrace): New function.
10298 (set_read_map): Likewise.
10299 (set_start_address): Likewise.
10300 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
10301 the right page.
10302 (check_vga_mem): Take the page into account.
10303 (write_char): Likewise.
10304 (write_cursor): Likewise.
10305 (scroll_up): Likewise. Copy the page to the page that is not
10306 shown and switch between both pages.
10307 (grub_vga_putchar): Fix off by one error.
10308 (grub_vga_cls): Wait for the vertical retrace. Take the page into
10309 account.
10310
ad0bd20b 103112004-11-01 Marco Gerards <metgerards@student.han.nl>
10312
10313 Add support for iso9660 (including rockridge).
f19dbdb7 10314
ad0bd20b 10315 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10316 (iso9660_mod_SOURCES): New variable.
10317 (iso9660_mod_CFLAGS): Likewise.
10318 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10319 * include/grub/fs.h (grub_iso9660_init): New prototype.
10320 * util/grub-emu.c (main): Call `grub_iso9660_init'.
10321 * fs/iso9660.c: New file.
10322
10323 * include/grub/misc.h (grub_strncat): New prototype.
10324 * kern/misc.c (grub_strncat): New function.
f19dbdb7 10325
ad0bd20b 10326 * fs/hfs.c (grub_hfs_mount): Translate the error
10327 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
10328 * fs/jfs.c (grub_jfs_mount): Likewise.
10329 * fs/ufs.c (grub_ufs_mount): Likewise.
10330
a5477a59 103312004-10-28 Hollis Blanchard <hollis@penguinppc.org>
10332
10333 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
10334 which initialized BAT registers.
10335 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
10336 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10337 Move from here...
10338 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
10339 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10340 ... to here.
10341 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
10342 (grub_mapclaim): Likewise.
10343 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
10344 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
10345 hand.
10346
9304c1f8 103472004-10-19 Hollis Blanchard <hollis@penguinppc.org>
10348
10349 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
10350 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
10351 -ffreestanding and -msoft-float.
10352
86f4ae25 103532004-10-15 Hollis Blanchard <hollis@penguinppc.org>
10354
10355 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
10356 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
10357 set in grub_ieee1275_flags.
10358
38912228 103592004-10-14 Hollis Blanchard <hollis@penguinppc.org>
10360
10361 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
10362 prototype.
10363 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
10364 grub_console_init first.
10365 Change the memory range used for grub_ieee1275_claim and
10366 grub_mm_init_region.
10367 Print an error message if the claim fails.
10368 Include <grub/misc.h>.
10369
d1923dc8 103702004-10-13 Hollis Blanchard <hollis@penguinppc.org>
10371
10372 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
10373 Call grub_children_iterate for device nodes of type `scsi',
10374 `ide', or `ata'.
10375 (grub_ofdisk_open): Remove manual device alias resolution.
10376 Fix memory leak when device cannot be opened.
f19dbdb7 10377 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 10378 (grub_children_iterate): New prototype.
10379 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
10380 New function.
10381 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10382 Return -1 if args.size was -1.
10383
4512e4f3 103842004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10385
10386 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
10387 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
10388 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
10389 Open Firmware's memory for it; claim memory from _start to _end.
10390 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
10391 (_end): New extern.
10392 (_start): Zero BSS from __bss_start to _end.
10393 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10394 New extern.
10395 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
10396
4d61feb0 103972004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10398
ad0bd20b 10399 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
10400 -1 if args.base was -1.
4d61feb0 10401
026fa2f9 104022004-10-08 Hollis Blanchard <hollis@penguinppc.org>
10403
10404 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
10405 escape sequence instead of a literal ^L. Also call
10406 grub_ofconsole_gotoxy.
10407
9f2220ef 104082004-10-03 Hollis Blanchard <hollis@penguinppc.org>
10409
10410 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
10411 void * arguments to grub_addr_t. All callers updated. Also make
10412 the `result' argument optional.
10413 (grub_ieee1275_release): change void * arguments to grub_addr_t.
10414 All callers updated.
10415
8a572cd7 104162004-09-22 Hollis Blanchard <hollis@penguinppc.org>
10417
10418 * commands/ls.c (grub_ls_list_files): Use the string following the
10419 initial ')', if present, as the filesystem path.
10420 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
10421
10422 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
10423
18aa81f2 104242004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
10425
10426 Make the source code of the menu interface more readable.
f19dbdb7 10427
18aa81f2 10428 * normal/menu.c: Include grub/mm.h.
10429 (TERM_WIDTH): New macro.
10430 (TERM_HEIGHT): Likewise.
10431 (TERM_INFO_HEIGHT): Likewise.
10432 (TERM_MARGIN): Likewise.
10433 (TERM_SCROLL_WIDTH): Likewise.
10434 (TERM_TOP_BORDER_Y): Likewise.
10435 (TERM_LEFT_BORDER_X): Likewise.
10436 (TERM_BORDER_WIDTH): Likewise.
10437 (TERM_MESSAGE_HEIGHT): Likewise.
10438 (TERM_BORDER_HEIGHT): Likewise.
10439 (TERM_NUM_ENTRIES): Likewise.
10440 (TERM_FIRST_ENTRY_Y): Likewise.
10441 (TERM_ENTRY_WIDTH): Likewise.
10442 (TERM_CURSOR_X): Likewise.
10443 (draw_border): Use macros instead of magic numbers.
10444 (print_entry): Likewise.
10445 (print_entries): Likewise.
10446 (run_menu): Likewise. Also, handle the key 'e'.
10447 (run_menu_entry): Ignore empty command lines.
10448 (print_message): Added a new argument EDIT. If EDIT is true,
10449 print a different message.
10450 (init_page): Likewise.
10451 (edit_menu_entry): New function. Not implemented yet.
10452
b47efe30 104532004-09-17 Marco Gerards <metgerards@student.han.nl>
10454
10455 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
10456 can be loaded from normal mode.
f19dbdb7 10457
b47efe30 10458 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
10459 `multiboot.mod'.
10460 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
10461 (multiboot_mod_CFLAGS): New variables.
10462 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 10463 * loader/i386/pc/multiboot_normal.c: Likewise.
10464
b47efe30 10465 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
10466 attribute `unused'.
f19dbdb7 10467
b47efe30 10468 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
10469 `fdiro' to read the mode information from instead of `diro'.
10470
10471 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
10472 looking up a symlink.
10473
10474 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
10475 macro.
10476 * normal/command.c (grub_command_execute): Don't parse the
10477 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
10478 flags of the command.
10479
10480 * normal/menu.c (grub_menu_run): Fix typo.
10481
da75ac71 104822004-09-14 Hollis Blanchard <hollis@penguinppc.org>
10483
10484 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
10485
10486 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
10487 `y + 1' instead of `y - 1'.
10488
10489 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 10490
062b24c2 104912004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
10492
10493 From Hollis Blanchard <hollis@penguinppc.org>:
10494 * kern/misc.c (memmove): New alias for grub_memmove.
10495 (memcmp): New alias for grub_memcmp.
10496 (memset): New alias for grub_memset.
f19dbdb7 10497 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 10498 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 10499 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 10500 (grub_ieee1275_get_property): Likewise.
f19dbdb7 10501
8ddad845 105022004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
10503
10504 Added normal mode command `chainloader' as module chain.mod, which
10505 depends on normal.mod and _chain.mod.
f19dbdb7 10506
8ddad845 10507 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
10508 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
10509 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
10510 Deleted prototype.
10511 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
10512 but arguments parsing moved to ...
10513 (grub_chainloader_cmd): ... here. New function.
10514 * include/grub/i386/pc/chainloader.h: New file.
10515 * loader/i386/pc/chainloader_normal.c: Likewise.
10516
2c1f4ce3 105172004-09-11 Marco Gerards <metgerards@student.han.nl>
10518
10519 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
10520 (grub_mkimage_LDFLAGS): Likewise.
10521 (grub_emu_SOURCES): Likewise.
10522 (kernel_img_HEADERS): Added fshelp.h.
10523 * fs/ext2.c: Include <grub/fshelp.h>.
10524 (FILETYPE_REG): New macro.
10525 (FILETYPE_INO_REG): Likewise.
10526 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
10527 Changed all users.
10528 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
10529 all users.
10530 (grub_fshelp_node): New struct.
10531 (grub_ext2_data): Added member `diropen'. Changed member `inode'
10532 to a pointer.
10533 (grub_ext2_get_file_block): Removed function.
10534 (grub_ext2_read_block): New function.
10535 (grub_ext2_read_file): Replaced parameter `data' by `node'.
10536 This function was written.
10537 (grub_ext2_mount): Read the root inode. Create a diropen struct.
10538 (grub_ext2_find_file): Removed function.
10539 (grub_ext2_read_symlink): New function.
10540 (grub_ext2_iterate_dir): Likewise.
10541 (grub_ext2_open): Rewritten.
10542 (grub_ext2_dir): Rewritten.
10543 * include/grub/fshelp.h: New file.
10544 * fs/fshelp.c: Likewise.
10545
3c52136a 105462004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
10547
10548 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
10549 (print_message): Add a missing newline.
10550 (run_menu): Added timeout support.
10551 (run_menu_entry): New local function.
10552 (grub_menu_run): Added support for booting.
10553
10554 * kern/loader.c (grub_loader_is_loaded): New function.
10555
10556 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
10557 (grub_get_rtc): Exported.
10558
10559 * include/grub/i386/pc/time.h: Include grub/symbol.h.
10560 (grub_get_rtc): Exported.
10561
10562 * include/grub/normal.h (struct grub_command_list): Remove
10563 constant from the member `command'.
10564
10565 * include/grub/loader.h (grub_loader_is_loaded): Declared.
10566
10567 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
10568
10569 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
10570
aa033560 105712004-08-28 Marco Gerards <metgerards@student.han.nl>
10572
10573 Add support for the JFS filesystem.
10574
10575 * fs/jfs.c: New file.
10576 * include/grub/fs.h (grub_jfs_init): New prototype.
10577 (grub_jfs_fini): New prototype.
10578 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
10579 (grub_emu_SOURCES): Likewise.
10580 (pkgdata_MODULES): Add jfs.mod.
10581 (jfs_mod_SOURCES): New variable.
10582 (jfs_mod_CFLAGS): Likewise.
10583 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
10584 (grubof_SOURCES): Likewise.
10585 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
10586
10587 * fs/fat.c (grub_fat_find_dir): Convert the filename little
10588 endian to the host endian.
10589 (grub_fat_utf16_to_utf8): Move function from there...
10590 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 10591 the endianness of the source string anymore.
aa033560 10592 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
10593
94bc45af 105942004-08-24 Marco Gerards <metgerards@student.han.nl>
10595
10596 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
10597 (grub_boot_fini) [GRUB_UTIL]: Likewise.
10598 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
10599 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 10600
94bc45af 10601 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
10602 (grub_hfs_iterate_dir): Make the function static. Add prototypes
10603 for `node_found' and `it_dir'.
10604 (grub_hfs_dir): Add prototype for `dir_hook'.
10605
10606 * fs/minix.c (grub_minix_get_file_block): Add prototype for
10607 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
10608 and `indir32' to silence a gcc warning.
10609
10610 * include/grub/fs.h (grub_hfs_init): New prototype.
10611 (grub_hfs_fini): Likewise.
f19dbdb7 10612
10613
97543f08 106142004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10615
10616 Each disk device has its own id now. This is useful to make use
10617 of multiple disk devices.
f19dbdb7 10618
97543f08 10619 * include/grub/disk.h (grub_disk_dev_id): New enum.
10620 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
10621 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
10622
10623 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
10624 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10625
10626 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
10627 GRUB_DISK_DEVICE_OFDISK_ID as an id.
10628
10629 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
10630 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10631
10632 * include/grub/disk.h (struct grub_disk_dev): Added a new member
10633 "id" which is used by the cache manager.
10634
10635 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
10636 of just "GRUB".
10637
64372eb4 106382004-08-18 Marco Gerards <metgerards@student.han.nl>
10639
10640 * fs/hfs.c: New file.
10641 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
10642 (grub_emu_SOURCES): Likewise.
10643 (pkgdata_MODULES): Add hfs.mod.
10644 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
10645 (grubof_SOURCES): Likewise.
10646 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
10647
10648 * include/grub/misc.h (grub_strncasecmp): Add prototype.
10649 * kern/misc.c (grub_strncasecmp): Add function.
10650
cc61b58f 106512004-08-14 Marco Gerards <metgerards@student.han.nl>
10652
10653 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
10654 with parentheses.
10655
10656 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
10657 (grub_ext2_dir): In case the directory entry type is unknown, read
10658 it from the inode.
10659
0ef123f6 106602004-08-02 Peter Bruin <pjbruin@dds.nl>
10661
10662 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
10663 grub_load_linux instead of grub_rescue_cmd_linux as second
10664 argument of grub_rescue_register_command.
10665
10666 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
10667
a447c5df 106682004-07-27 Marco Gerards <metgerards@student.han.nl>
10669
10670 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
10671 function.
10672 * commands/boot.c: Remove the check for `GRUB_UTIL'.
10673 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10674 `loader/powerpc/ieee1275/linux.c',
10675 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
10676 * include/grub/powerpc/ieee1275/ieee1275.h
10677 (grub_ieee1275_release): New prototype.
10678 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
10679 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
10680 normal, boot, linux and linux_normal.
10681 * loader/powerpc/ieee1275/linux.c: New file.
10682 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10683
5a9e3546 106842004-07-12 Marco Gerards <metgerards@student.han.nl>
10685
10686 * normal/arg.c (grub_arg_parse): Correct error handling after
10687 reallocating the argumentlist (check if `argl' is not null instead
10688 of checking if `args' is not null).
10689 * kern/mm.c (grub_realloc): Return the same pointer when using the
10690 same region, instead of returning the header address.
10691
e15199cb 106922004-07-11 Marco Gerards <metgerards@student.han.nl>
10693
10694 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
10695 one block instead of two when looking for the initial partition.
10696 (grub_partition_probe): Initialize the local variable `p' with 0.
10697 Use base 10 for the grub_strtoul call.
10698 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
10699 need for one local variable.
10700 (grub_strtoul): Don't add the new value to `num', instead of that
10701 just assign it.
10702
020616c2 107032004-07-11 Marco Gerards <metgerards@student.han.nl>
10704
10705 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
10706 (pxeboot_img_SOURCES): New variable.
10707 (pxeboot_img_ASFLAGS): Likewise.
10708 (pxeboot_img_LDFLAGS): Likewise.
10709 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
10710 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
10711 <lode_leroy@hotmail.com>.
10712
6c51eb64 107132004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10714
10715 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
10716 there was no input.
10717
cfb12aff 107182004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10719
10720 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
10721 the history buffer logic.
10722
6eabba74 107232004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10724
10725 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
10726 (FILETYPE_INO_SYMLINK): New macros.
10727 (grub_ext2_find_file): Check if the node is a directory using the
10728 inode stat information instead of using the filetype in the
10729 dirent. Exclude the first character of an absolute symlink.
10730 (grub_ext2_dir): Mask out the filetype part of the mode member of
10731 the inode.
10732
66e19ef8 107332004-05-24 Marco Gerards <metgerards@student.han.nl>
10734
10735 Add support for UFS version 1 and 2. Add support for the minix
10736 filesystem version 1 and 2, both the variants with 14 and 30 long
10737 filenames.
f19dbdb7 10738
66e19ef8 10739 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
10740 fs/minix.c.
10741 (grub_emu_SOURCES): Likewise.
10742 (pkgdata_MODULES): Add ufs.mod and minix.mod.
10743 (ufs_mod_SOURCES): New variable.
10744 (ufs_mod_CFLAGS): Likewise.
10745 (minix_mod_SOURCES): Likewise.
10746 (minix_mod_CFLAGS): Likewise.
10747 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
10748 fs/minix.c.
10749 (grubof_SOURCES): Likewise.
10750 * fs/ufs.c: New file.
10751 * fs/minix.c: New file.
10752 * include/grub/fs.h (grub_ufs_init): New prototype.
10753 (grub_ufs_fini): Likewise.
10754 (grub_minix_init): Likewise.
10755 (grub_minix_fini): Likewise.
10756 * util/grub-emu.c (main): Initialize and deinitialize UFS and
10757 minix fs.
10758
cc2e748a 107592004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
10760
10761 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
10762 commands/ls.c, commands/terminal.c, commands/boot.c,
10763 commands/cmp.c and commands/cat.c.
10764 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
10765
10766 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
10767 "env.h"
10768
4b13b216 107692004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10770
10771 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
10772 and grub_, respectively. Because the conversion is trivial and
10773 mechanical, I omit the details here. Please refer to the CVS
10774 if you need more information.
10775
6a142551 107762004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10777
10778 * include/pupa: Renamed to ...
10779 * include/grub: ... this.
10780 * util/i386/pc/pupa-mkimage.c: Renamed to ...
10781 * util/i386/pc/grub-mkimage.c: ... this.
10782 * util/i386/pc/pupa-setup.c: Renamed to ...
10783 * util/i386/pc/grub-setup.c: ... this.
10784 * util/pupa-emu.c: Renamed to ...
10785 * util/grub-emu.c: ... this.
10786
e56cdf21 107872004-03-29 Marco Gerards <metgerards@student.han.nl>
10788
10789 Add support for the newworld apple macintosh (PPC). This has been
10790 tested on the powerbook 2000 only. It only adds support for
10791 generic ieee1275 functions, console and disk support. This should
10792 be easy to port to other architectures with support for Open
10793 Firmware.
f19dbdb7 10794
e56cdf21 10795 * configure.ac: Accept the powerpc as host_cpu. In the case of
10796 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
10797 specific tests are only executed while building for the i386.
10798 Inverse test for crosscompile.
10799 * genmk.rb (Utility): Allow assembler files.
10800 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
10801 * conf/powerpc-ieee1275.rmk: New file.
10802 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
10803 * disk/powerpc/ieee1275/partition.c: Likewise.
10804 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
10805 * include/pupa/powerpc/ieee1275/console.h: Likewise.
10806 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
10807 * include/pupa/powerpc/ieee1275/time.h: Likewise.
10808 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
10809 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
10810 * include/pupa/powerpc/ieee1275/loader.h
10811 * include/pupa/powerpc/setjmp.h: Likewise.
10812 * include/pupa/powerpc/types.h: Likewise.
10813 * kern/powerpc/ieee1275/init.c: Likewise.
10814 * kern/powerpc/ieee1275/openfw.c: Likewise.
10815 * term/powerpc/ieee1275/ofconsole.c: Likewise.
10816
10817 These files were written by Johan Rydberg
10818 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 10819
e56cdf21 10820 * boot/powerpc/ieee1275/cmain.c: New file.
10821 * boot/powerpc/ieee1275/crt0.S: Likewise.
10822 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
10823 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
10824
8c8cc205 108252004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
10826
10827 * Makefile.in: Update copyright.
10828 * genmodsrc.sh: Likewise.
10829 * gensymlist.sh: Likewise.
10830 * term/i386/pc/vga.c: Indent correctly.
10831
10832 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
10833 bugreporting address.
10834 * util/i386/pc/pupa-setup.c (usage): Likewise,
10835 (main): Call pupa_ext2_init and pupa_ext2_fini.
10836
f19dbdb7 10837 * fs/fat.c (log2): Renamed to ...
8c8cc205 10838 (fat_log2): ... this.
10839 All callers changed.
10840 * kern/misc.c (memcpy): Alias to pupa_memmove.
10841 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
10842 lvalue cast.
10843 * util/console.c (pupa_ncurses_fini): Return 0.
10844
10845 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
10846 Move fail label here.
10847 [__GNU__]: Don't warn when using stat.
10848 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
10849 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
10850 long int. Use strtol instead of strtoul.
f19dbdb7 10851
db1771cf 108522004-03-14 Marco Gerards <metgerards@student.han.nl>
10853
10854 * commands/boot.c: New file.
10855 * commands/cat.c: Likewise.
10856 * commands/cmp.c: Likewise.
10857 * commands/ls.c: Likewise.
10858 * commands/terminal.c: Likewise.
10859 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
10860 (pupa_register_command): Changed interface to match the new
10861 argument parser.
10862 (pupa_command_execute): Changed (almost rewritten) so it uses
10863 pupa_split_command. Added support for setting variables using the
10864 syntax `foo=bar'.
10865 (rescue_command): Changed to work with the new argument parser.
10866 (terminal_command): Moved from here to commands/terminal.c.
10867 (set_command): New function.
10868 (unset_command): New function.
10869 (insmod_command): New function.
10870 (rmmod_command): New function.
10871 (lsmod_command): New function.
10872 (pupa_command_init): Don't initialize the command terminal
10873 anymore. Initialize the commands set, unset, insmod, rmmod and
10874 lsmod.
10875 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
10876 (kernel_img_HEADERS): Add arg.h and env.h.
10877 (pupa_mkimage_LDFLAGS): Add kern/env.c.
10878 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
10879 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
10880 normal/arg.c.
10881 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
10882 terminal.mod.
10883 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
10884 (boot_mod_SOURCES): New variable.
10885 (terminal_mod_SOURCES): Likewise.
10886 (ls_mod_SOURCES): Likewise.
10887 (cmp_mod_SOURCES): Likewise.
10888 (cat_mod_SOURCES): Likewise.
10889
10890 * normal/arg.c: New file.
10891 * kern/env.c: Likewise.
10892 * include/pupa/arg.h: Likewise.
10893 * include/pupa/env.h: Likewise.
10894 * font/manager.c (font_command): Changed to match argument parsing
10895 interface changes.
10896 (PUPA_MOD_INIT): Likewise.
10897 * hello/hello.c (pupa_cmd_hello): Likewise.
10898 (PUPA_MOD_INIT): Likewise.
10899 * include/pupa/disk.h: Include <pupa/device.h>.
10900 (pupa_print_partinfo): New prototype.
10901 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
10902 (pupa_dl_get_prefix): Likewise.
10903 * include/pupa/misc.h: Include <pupa/err.h>.
10904 (pupa_isgraph): New prototype.
10905 (pupa_isdigit): Likewise.
10906 (pupa_split_cmdline): Likewise.
10907 * include/pupa/normal.h: Include <pupa/arg.h>.
10908 (pupa_command): Changed the prototype of the member `func' to
10909 match the argument parsing interface. Added member `options'.
10910 (pupa_register_command): Updated to match function.
10911 (pupa_arg_parse): New prototype.
10912 (pupa_hello_init) [PUPA_UTIL]: New prototype.
10913 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
10914 (pupa_ls_init) [PUPA_UTIL]: Likewise.
10915 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
10916 (pupa_cat_init) [PUPA_UTIL]: Likewise.
10917 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
10918 (pupa_boot_init) [PUPA_UTIL]: Likewise.
10919 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
10920 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
10921 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
10922 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
10923 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
10924 * kern/disk.c: Include <pupa/file.h>.
10925 (pupa_print_partinfo): New function.
10926 * kern/dl.c: Include <pupa/env.h>.
10927 (pupa_dl_dir): Variable removed.
10928 (pupa_dl_load): Use the environment variable `prefix' instead of
10929 the variable pupa_dl_dir.
10930 (pupa_dl_set_prefix): Function removed.
10931 (pupa_dl_get_prefix): Likewise.
10932 * kern/i386/pc/init.c: Include <pupa/env.h>.
10933 (pupa_machine_init): Use the environment variable `prefix' instead of
10934 using pupa_dl_set_prefix to set the prefix.
10935 * kern/main.c: Include <pupa/env.h>.
10936 (pupa_set_root_dev): Use the environment variable `prefix' instead of
10937 using pupa_dl_get_prefix to get the prefix.
10938 * kern/misc.c: Include <pupa/env.h>.
10939 (pupa_isdigit): New function.
10940 (pupa_isgraph): Likewise.
10941 (pupa_ftoa): Likewise.
10942 (pupa_vsprintf): Added support for printing values of the type
10943 `double'. Make it possible to format variable output when using
10944 formatting like `%1.2%f'.
10945 (pupa_split_cmdline): New function.
10946 * kern/rescue.c: Include <pupa/env.h>.
10947 (next_word): Removed function.
10948 (pupa_rescue_cmd_prefix): Likewise.
10949 (pupa_rescue_cmd_set): New function.
10950 (pupa_rescue_cmd_unset): New function.
10951 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
10952 split the command line instead of splitting it here. Added
10953 support for setting variables using the syntax `foo=bar'. Don't
10954 initialize the prefix command anymore. Initialized the set and
10955 unset commands.
10956 * normal/cmdline.c: Include <pupa/env.h>.
10957 (pupa_tab_complete): Added prototypes for print_simple_completion,
10958 print_partition_completion, add_completion, iterate_commands,
10959 iterate_dev, iterate_part and iterate_dir. Moved code to print
10960 partition information from here to kern/disk.c.
fe6b695a 10961 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 10962 * normal/main.c: Include <pupa/env.h>.
10963 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
10964 instead of using pupa_dl_get_prefix to get the prefix.
10965 * term/i386/pc/vga.c: Include <pupa/arg.h>.
10966 (check_vga_mem): Cast pointers to `void *' to silence a gcc
10967 warning.
10968 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
10969 (pupa_vga_setcolor): Declare unused variables with `__attribute__
10970 ((unused))' to silence a gcc warning.
10971 (pupa_vga_setcolor): Likewise.
10972 (debug_command): Changed to match argument parsing
10973 interface changes.
10974 * util/pupa-emu.c: Include <pupa/env.h>.
10975 (options): Added 0's for unused fields to silence a gcc warning.
10976 (argp): Likewise.
10977 (main): Use the environment variable `prefix' instead of using
10978 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
10979 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
10980 and terminal.
10981
10982 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
10983 * util/misc.c: Include <malloc.h>.
10984 (pupa_malloc): Rewritten so errors are correctly reported.
10985 (pupa_realloc): Likewise.
10986 (pupa_memalign): Likewise.
10987 (pupa_mm_init_region): Declare unused variables with
10988 `__attribute__ ((unused))' to silence a gcc warning.
10989 * normal/i386/setjmp.S: Remove tab at the end of the file to
10990 silence a gcc warning.
10991 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
10992 variables with `__attribute__ ((unused))' to silence a gcc
10993 warning.
10994 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
10995 local variable i unsigned to silence a gcc warning.
10996
10997 * kern/term.c: Include <pupa/misc.h>.
10998 (pupa_more_lines): New variable.
10999 (pupa_more): Likewise.
11000 (pupa_putcode): When the pager is active pause at the end of every
11001 screen.
11002 (pupa_set_more): New function.
11003 * include/pupa/term.h (pupa_set_more): New prototype.
11004
11005
3b1139cb 110062004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
11007
11008 Now this project is GRUB 2 rather than PUPA. The location of
11009 the CVS repository was moved to GRUB's.
f19dbdb7 11010
3b1139cb 11011 * configure.ac: Use bug-grub as the reporting address.
11012 Use GRUB instead of PUPA.
11013 Change the version number to 1.90.
11014
8367695c 110152004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
11016
11017 * genkernsyms.sh: Updated copyright information.
11018 * genmk.rb: Likewise.
11019 * genmodsrc.sh: Likewise.
11020 * gensymlist.sh: Likewise.
11021 * boot/i386/pc/boot.S: Likewise.
11022 * boot/i386/pc/diskboot.S: Likewise.
11023 * disk/i386/pc/biosdisk.c: Likewise.
11024 * disk/i386/pc/partition.c: Likewise.
11025 * font/manager.c: Likewise.
11026 * fs/ext2.c: Likewise.
11027 * fs/fat.c: Likewise.
11028 * include/pupa/boot.h: Likewise.
11029 * include/pupa/device.h: Likewise.
11030 * include/pupa/disk.h: Likewise.
11031 * include/pupa/dl.h: Likewise.
11032 * include/pupa/elf.h: Likewise.
11033 * include/pupa/err.h: Likewise.
11034 * include/pupa/file.h: Likewise.
11035 * include/pupa/font.h: Likewise.
11036 * include/pupa/fs.h: Likewise.
11037 * include/pupa/kernel.h: Likewise.
11038 * include/pupa/loader.h: Likewise.
11039 * include/pupa/misc.h: Likewise.
11040 * include/pupa/mm.h: Likewise.
11041 * include/pupa/net.h: Likewise.
11042 * include/pupa/normal.h: Likewise.
11043 * include/pupa/rescue.h: Likewise.
11044 * include/pupa/setjmp.h: Likewise.
11045 * include/pupa/symbol.h: Likewise.
11046 * include/pupa/term.h: Likewise.
11047 * include/pupa/types.h: Likewise.
11048 * include/pupa/i386/setjmp.h: Likewise.
11049 * include/pupa/i386/types.h: Likewise.
11050 * include/pupa/i386/pc/biosdisk.h: Likewise.
11051 * include/pupa/i386/pc/boot.h: Likewise.
11052 * include/pupa/i386/pc/console.h: Likewise.
11053 * include/pupa/i386/pc/init.h: Likewise.
11054 * include/pupa/i386/pc/kernel.h: Likewise.
11055 * include/pupa/i386/pc/linux.h: Likewise.
11056 * include/pupa/i386/pc/loader.h: Likewise.
11057 * include/pupa/i386/pc/memory.h: Likewise.
11058 * include/pupa/i386/pc/multiboot.h: Likewise.
11059 * include/pupa/i386/pc/partition.h: Likewise.
11060 * include/pupa/i386/pc/time.h: Likewise.
11061 * include/pupa/i386/pc/vga.h: Likewise.
11062 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
11063 * include/pupa/util/getroot.h: Likewise.
11064 * include/pupa/util/misc.h: Likewise.
11065 * include/pupa/util/resolve.h: Likewise.
11066 * kern/device.c: Likewise.
11067 * kern/disk.c: Likewise.
11068 * kern/dl.c: Likewise.
11069 * kern/err.c: Likewise.
11070 * kern/file.c: Likewise.
11071 * kern/fs.c: Likewise.
11072 * kern/loader.c: Likewise.
11073 * kern/main.c: Likewise.
11074 * kern/misc.c: Likewise.
11075 * kern/mm.c: Likewise.
11076 * kern/rescue.c: Likewise.
11077 * kern/term.c: Likewise.
11078 * kern/i386/dl.c: Likewise.
11079 * kern/i386/pc/init.c: Likewise.
11080 * kern/i386/pc/lzo1x.S: Likewise.
11081 * kern/i386/pc/startup.S: Likewise.
11082 * loader/i386/pc/chainloader.c: Likewise.
11083 * loader/i386/pc/linux.c: Likewise.
11084 * loader/i386/pc/multiboot.c: Likewise.
11085 * normal/cmdline.c: Likewise.
11086 * normal/command.c: Likewise.
11087 * normal/main.c: Likewise.
11088 * normal/menu.c: Likewise.
11089 * normal/i386/setjmp.S: Likewise.
11090 * term/i386/pc/console.c: Likewise.
11091 * term/i386/pc/vga.c: Likewise.
11092 * util/console.c: Likewise.
11093 * util/genmoddep.c: Likewise.
11094 * util/misc.c: Likewise.
11095 * util/pupa-emu.c: Likewise.
11096 * util/resolve.c: Likewise.
11097 * util/unifont2pff.rb: Likewise.
11098 * util/i386/pc/biosdisk.c: Likewise.
11099 * util/i386/pc/getroot.c: Likewise.
11100 * util/i386/pc/pupa-mkimage.c: Likewise.
11101 * util/i386/pc/pupa-setup.c: Likewise.
11102
e6eced71 111032004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
11104
11105 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
11106 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
11107 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
11108 reading and reset it after reading.
11109 (pupa_ext2_close): Return PUPA_ERR_NONE.
11110
11111 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
11112 Correct value.
11113 (struct linux_kernel_header): Add kernel_version and
11114 initrd_addr_max.
11115 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
11116 pupa_file_read succeeds.
11117 (pupa_rescue_cmd_initrd): Implement.
11118
5aded270 111192003-12-03 Marco Gerards <metgerards@student.han.nl>
11120
11121 * fs/ext2.c (pupa_ext2_label): New function.
11122 (pupa_ext2_fs): Added label.
11123 * fs/fat.c (pupa_fat_label): New function.
11124 (pupa_fat_fs): Added label.
11125 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11126
11127 * kern/misc.c (pupa_strndup): New function.
11128 * include/pupa/misc.h (pupa_strndup): New prototype.
11129
11130 * include/pupa/normal.h: Include <pupa/err.h>.
11131 (pupa_set_history): New prototype.
11132 (pupa_iterate_commands): New prototype.
11133 * normal/cmdline.c: Include <pupa/machine/partition.h>,
11134 <pupa/disk.h>, <pupa/file.h>.
11135 (hist_size): New variable.
11136 (hist_lines): Likewise.
11137 (hist_end): Likewise.
11138 (hist_used): Likewise.
11139 (pupa_set_history): New function.
11140 (pupa_history_get): Likewise.
11141 (pupa_history_add): Likewise.
11142 (pupa_history_replace): Likewise.
11143 (pupa_tab_complete): Likewise.
11144 (pupa_cmdline_run): Added tab completion and history buffer. Tab
11145 completion shows partitionnames while completing partitions, this
11146 feature was suggested by Jeff Bailey.
11147 * normal/command.c (pupa_iterate_commands): New function.
11148 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11149 (pupa_normal_init): Initialize history buffer.
11150 (PUPA_MOD_INIT): Likewise.
11151 (pupa_normal_fini): Free the history buffer.
11152 (PUPA_MOD_FINI): Likewise.
11153
11154 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11155 key.
11156
11157 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11158 * configure.ac [i386]: Check for regparam bug.
11159 (NESTED_FUNC_ATTR) [! i386]: Defined.
11160
1f7315a3 111612003-11-17 Marco Gerards <metgerards@student.han.nl>
11162
11163 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11164 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11165 (pupa_emu_SOURCES): New variable.
11166 (pupa_emu_LDFLAGS): Likewise.
11167 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11168 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11169 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11170 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11171 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11172 (pupa_jmp_buf): New typedef.
11173 (pupa_setjmp) [PUPA_UTIL]: New macro.
11174 (pupa_longjmp) [PUPA_UTIL]: Likewise.
11175 * include/pupa/term.h (struct pupa_term): New member `refresh'.
11176 (pupa_refresh): New prototype.
11177 * include/pupa/util/getroot.h: New file.
11178 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11179 it.
11180 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11181 (pupa_rescue_cmd_cat): Likewise.
11182 (pupa_rescue_cmd_ls): Likewise.
11183 (pupa_rescue_cmd_testload): Likewise.
11184 (pupa_rescue_cmd_lsmod): Likewise.
11185 * normal/cmdline.c (pupa_cmdline_get): Likewise.
11186 * normal/menu.c (run_menu): Likewise.
11187 * kern/term.c (pupa_cls): Likewise.
11188 (pupa_refresh): New function.
11189 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11190 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11191 * util/console.c: New file.
f19dbdb7 11192
1f7315a3 11193 * util/i386/pc/getroot.c: New file.
11194 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11195 (pupa_putchar): New function.
11196 (pupa_refresh): Likewise.
11197 (xgetcwd): Function moved to ...
11198 (strip_extra_slashes): Likewise.
11199 (get_prefix): Likewise.
f19dbdb7 11200 * util/i386/pc/getroot.c: ... here.
1f7315a3 11201 (find_root_device): Function moved and renamed to...
11202 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11203 Changed all callers.
11204 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11205 and renamed to...
11206 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11207 Changed all callers.
11208 * util/misc.c (pupa_memalign): New function.
11209 (pupa_mm_init_region): Likewise.
11210 (pupa_register_exported_symbols): Likewise.
11211 (pupa_putchar): Function removed.
11212 * util/pupa-emu.c: New file.
11213
9a5c1ade 112142003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
11215
11216 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11217 (_multiboot_mod_SOURCES): New variable.
11218 (_multiboot_mod_CFLAGS): Likewise.
11219 * loader/i386/pc/multiboot.c: New file.
11220 * include/pupa/i386/pc/multiboot.h: Likewise.
11221 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11222 (pupa_multiboot_real_boot): New function.
11223 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11224 (pupa_multiboot_real_boot): New prototype.
11225 (pupa_rescue_cmd_multiboot): Likewise
11226 (pupa_rescue_cmd_module): Likewise.
11227
11228 * kern/loader.c (pupa_loader_set): Continue when
11229 pupa_loader_unload_func() fails.
11230 (pupa_loader_unset): New function.
11231 * include/pupa/loader.h (pupa_loader_unset): New prototype.
11232
11233 * kern/misc.c (pupa_stpcpy): New function.
11234 * include/pupa/misc.h (pupa_stpcpy): New prototype.
11235
8e72a9c0 112362003-11-12 Marco Gerards <metgerards@student.han.nl>
11237
11238 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11239 for available extensions.
11240
11241 * include/pupa/i386/pc/time.h: New file.
11242 * kern/disk.c: Include <pupa/machine/time.h>.
11243 (PUPA_CACHE_TIMEOUT): New macro.
11244 (pupa_last_time): New variable.
11245 (pupa_disk_open): Flush the cache when there was a timeout.
11246 (pupa_disk_close): Reset the timer.
11247 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11248 pupa_currticks.
11249 * util/misc.c: Include <sys/times.h>
11250 (pupa_get_rtc): New function.
11251
c4adbd32 112522003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11253
11254 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11255 as blocks.
11256 (pupa_ext2_get_file_block): Use blocks member.
11257
11258 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11259 first block. Return -1 instead of pupa_errno on error.
11260
bfd30f06 112612003-10-27 Marco Gerards <metgerards@student.han.nl>
11262
11263 * README: In the pupa-mkimage example use _chain instead of chain
11264 and ext2 instead of fat.
11265 * TODO: Replace ext2fs with jfs as an example. Add an item for
11266 adding journal playback for ext2fs.
11267 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11268 (pkgdata_MODULES): Added ext2.mod.
11269 (ext2_mod_SOURCES): New variable.
11270 (ext2_mod_CFLAGS): Likewise.
11271 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11272 * include/pupa/misc.h (pupa_strncpy): New prototype.
11273 (pupa_strcat): Likewise.
11274 (pupa_strncmp): Likewise.
11275 * kern/misc.c (pupa_strcat): Enable function.
11276 (pupa_strncpy): New function.
11277 (pupa_strncmp): Likewise.
11278 * fs/ext2.c: New file.
f19dbdb7 11279
bfd30f06 11280 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11281 when the read failed before retrying.
11282 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11283 (_FILE_OFFSET_BITS): Likewise.
11284 * configure.ac: Added AC_SYS_LARGEFILE.
11285
98d15063 112862003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11287
11288 * genmk.rb (PModule#rule): Make sure to get only symbol names
11289 from the output of nm.
11290 Reported by Robert Millan <zeratul2@wanadoo.es>.
11291
18d9c7cd 112922003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11293
11294 I forgot to check in these changes for a long time. This adds
11295 incomplete support for VGA console, and this is still very
11296 buggy. Also, a lot of consideration is required for I18N,
11297 UNICODE, and VGA font issues. Therefore, assume that this is
11298 such that "better than nothing".
f19dbdb7 11299
18d9c7cd 11300 * font/manager.c: New file.
11301 * include/pupa/font.h: Likewise.
11302 * include/pupa/i386/pc/vga.h: Likewise.
11303 * term/i386/pc/vga.c: Likewise.
11304 * util/unifont2pff.rb: Likewise.
11305
11306 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11307 (pkgdata_MODULES): Added vga.mod and font.mod.
11308 (vga_mod_SOURCES): New variables.
11309 (vga_mod_CFLAGS): Likewise.
11310 (font_mod_SOURCES): Likewise.
11311 (font_mod_CFLAGS): Likewise.
11312
11313 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
11314
11315 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 11316 (struct pupa_term): Added init and fini.
18d9c7cd 11317 Changed the argument of putchar to pupa_uint32_t.
11318
11319 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
11320 (pupa_console_real_putchar): New prototype.
11321 (pupa_console_putchar): Removed.
11322 (pupa_console_checkkey): Exported.
11323 (pupa_console_getkey): Likewise.
11324
11325 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
11326 characters.
11327
11328 * kern/term.c (pupa_term_set_current): Rewritten.
11329 (pupa_putchar): Likewise.
11330 (pupa_putcode): New function.
11331
11332 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
11333 (pupa_console_real_putchar): ... this.
11334 (pupa_vga_set_mode): New function.
11335 (pupa_vga_get_font): Likewise.
11336
11337 * normal/command.c: Include pupa/term.h.
11338 (terminal_command): New function.
11339 (pupa_command_init): Register the command "terminal".
11340
11341 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
11342 (DISP_UP): Likewise.
11343 (DISP_RIGHT): Likewise.
11344 (DISP_DOWN): Likewise.
11345 (DISP_HLINE): Likewise.
11346 (DISP_VLINE): Likewise.
11347 (DISP_UL): Likewise.
11348 (DISP_UR): Likewise.
11349 (DISP_LL): Likewise.
11350 (DISP_LR): Likewise.
11351
11352 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 11353
977329f5 113542003-02-08 NIIBE Yutaka <gniibe@m17n.org>
11355
11356 * util/resolve.c (pupa_util_resolve_dependencies): BUG
11357 FIX. Reverse the path_list.
11358
11359 * include/pupa/normal.h: Export pupa_register_command and
11360 pupa_unregister_command.
11361
11362 * hello/hello.c (pupa_cmd_hello): New module.
11363 * conf/i386-pc.rmk: Added hello.mod.
11364
1f5ab428 113652003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
11366
11367 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 11368
1f5ab428 11369 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
11370 (compress_kernel): New variable.
11371 (generate_image): Heavily modified to support compressing a
11372 large part of the core image.
11373
11374 * util/misc.c (pupa_util_read_image): Fix a file descriptor
11375 leak.
11376 (pupa_util_load_image): New function.
11377
11378 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
11379 (pupa_compressed_size): New variable.
11380 (codestart): Enable Gate A20 here.
11381 Decompress the compressed part of the core image.
11382 Rearrange the code to put functions and variables which are
11383 required for initialization in the non-compressed part.
11384 Include lzo1x.S.
11385
11386 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
11387 here.
11388
11389 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
11390
f19dbdb7 11391 * include/pupa/i386/pc/kernel.h
1f5ab428 11392 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
11393 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
11394 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11395 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11396 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
11397
11398 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
11399
11400 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
11401 (Utility#rule): Likewise.
11402
11403 * configure.ac: Check if LZO is available.
11404
ce5bf700 114052003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
11406
11407 * include/pupa/normal.h: New file.
11408 * include/pupa/setjmp.h: Likewise.
11409 * include/pupa/i386/setjmp.h: Likewise.
11410 * normal/cmdline.c: Likewise.
11411 * normal/command.c: Likewise.
11412 * normal/main.c: Likewise.
11413 * normal/menu.c: Likewise.
11414 * normal/i386/setjmp.S: Likewise.
f19dbdb7 11415
ce5bf700 11416 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
11417 (pupa_rescue_cmd_initrd): Likewise.
11418
11419 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
11420 Likewise.
11421
11422 * kern/i386/pc/startup.S (translation_table): New variable.
11423 (translate_keycode): New function.
11424 (pupa_console_getkey): Call translate_keycode.
11425
11426 * kern/rescue.c (attempt_normal_mode): New function.
11427 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
11428 it failed, print a message.
11429
11430 * kern/mm.c (pupa_real_malloc): Print more information when a
11431 free magic is broken.
11432 (pupa_free): If the first free header is not free actually, set
11433 it to P.
11434
11435 * kern/main.c (pupa_load_normal_mode): Just load the module
11436 "normal".
11437 (pupa_main): Don't print the message
11438 "Entering into rescue mode..." here.
11439
11440 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
11441 Declared.
11442 (pupa_rescue_cmd_initrd): Likewise.
11443 (pupa_rescue_cmd_initrd): Likewise.
11444
11445 * include/pupa/symbol.h (FUNCTION): Specify the type.
11446 (VARIABLE): Likewise.
11447
11448 * include/pupa/err.h (pupa_err_t): Added
11449 PUPA_ERR_UNKNOWN_COMMAND.
11450
11451 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
11452 (pupa_dl_get_prefix): Likewise.
11453
11454 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
11455 Added _chain.mod and _linux.mod instead of chain.mod and
11456 linux.mod.
11457 (chain_mod_SOURCES): Renamed to ...
11458 (_chain_mod_SOURCES): ... this.
11459 (chain_mod_CFLAGS): Renamed to ...
11460 (_chain_mod_CFLAGS): ... this.
11461 (linux_mod_SOURCES): Renamed to ...
11462 (_linux_mod_SOURCES): ... this.
11463 (linux_mod_CFLAGS): Renamed to ...
11464 (_linux_mod_CFLAGS): ... this.
11465 (normal_mod_SOURCES): New variable.
11466 (normal_mod_CFLAGS): Likewise.
11467 (normal_mod_ASFLAGS): Likewise.
11468
114692003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
11470
11471 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
11472 possible.
11473
fe6b695a 11474 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 11475 recursively.
11476 (pupa_dl_unref): Unrefer depending modules recursively.
11477 Don't call pupa_dl_unload implicitly, because PUPA can crash if
11478 a module is unloaded before one depending on that module is
11479 unloaded.
11480 (pupa_dl_unload): Unload depending modules explicitly,
11481 if possible.
11482
c04da074 114832003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
11484
11485 * include/pupa/i386/pc/linux.h: New file.
11486 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 11487
c04da074 11488 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
11489 Removed.
11490 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
11491 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
11492 of PUPA_CHAINLOADER_BOOT_SECTOR.
11493
11494 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
11495 (pupa_linux_prot_size): New variable.
11496 (pupa_linux_tmp_addr): Likewise.
11497 (pupa_linux_real_addr): Likewise.
11498 (pupa_linux_boot_zimage): New function.
11499 (pupa_linux_boot_bzimage): Likewise.
11500
11501 * kern/i386/pc/init.c (struct mem_region): New structure.
11502 (MAX_REGIONS): New macro.
11503 (mem_regions): New variable.
11504 (num_regions): Likewise.
11505 (pupa_os_area_addr): Likewise.
11506 (pupa_os_area_size): Likewise.
11507 (pupa_lower_mem): Likewise.
11508 (pupa_upper_mem): Likewise.
11509 (add_mem_region): New function.
11510 (compact_mem_regions): Likewise.
11511 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
11512 the size of the conventional memory and that of so-called upper
11513 memory (before the first memory hole).
11514 Instead of adding each found region to free memory, use
11515 add_mem_region and add them after removing overlaps.
11516 Also, add only 1/4 of the upper memory to free memory. The rest
11517 is used for loading OS images. Maybe this is ad hoc, but this
11518 makes it much easier to relocate OS images when booting.
11519
11520 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
11521 (pupa_enter_rescue_mode): Don't register initrd and module.
11522
11523 * kern/mm.c: Include pupa/dl.h.
11524
11525 * kern/main.c: Include pupa/file.h and pupa/device.h.
11526
11527 * kern/loader.c (pupa_loader_load_module_func): Removed.
11528 (pupa_loader_load_module): Likewise.
11529
11530 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
11531 ``.o''.
11532
11533 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
11534 (pupa_linux_tmp_addr): Likewise.
11535 (pupa_linux_real_addr): Likewise.
11536 (pupa_linux_boot_zimage): Likewise.
11537 (pupa_linux_boot_bzimage): Likewise.
11538
11539 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
11540 (pupa_upper_mem): Likewise.
11541 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
11542 module is too dangerous.
11543
11544 * include/pupa/loader.h (pupa_os_area_addr): Declared.
11545 (pupa_os_area_size): Likewise.
11546 (pupa_loader_set): Remove the first argument. Loader doesn't
11547 manage modules or initrd any longer.
11548 (pupa_loader_load_module): Removed.
11549
11550 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
11551 (linux_mod_SOURCES): New variable.
11552 (linux_mod_CFLAGS): Likewise.
11553
a13f9237 115542003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
11555
11556 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
11557 the length of a blocklist correctly.
11558
11559 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
11560 Use ioctl only if the OS file is a block device.
11561 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
11562 not very useful for normal files.
11563
11564 * kern/main.c (pupa_set_root_dev): New function.
11565 (pupa_load_normal_mode): Likewise.
11566 (pupa_main): Call those above.
11567
11568 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
11569 pupa_uint16_t.
11570
11571 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
11572
a5ffe966 115732003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11574
11575 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
11576 (setup): Configure the installed partition information and the
11577 dl prefix.
11578
11579 * loader/i386/pc/chainloader.c (my_mod): New variable.
11580 (pupa_chainloader_unload): New function.
11581 (pupa_rescue_cmd_chainloader): Refer itself.
11582 (PUPA_MOD_INIT): Save its own module in MY_MOD.
11583
11584 * kern/i386/pc/startup.S (install_partition): Removed.
11585 (version_string): Likewise.
11586 (config_file): Likewise.
11587 (pupa_install_dos_part): New variable.
11588 (pupa_install_bsd_part): Likewise.
11589 (pupa_prefix): Likewise.
11590 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
11591
11592 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
11593 and pupa/misc.h.
11594 (make_install_device): New function.
11595 (pupa_machine_init): Set the dl prefix.
11596
11597 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
11598 (buf): Renamed to ...
11599 (linebuf): ... this.
11600 (pupa_rescue_cmd_prefix): New function.
11601 (pupa_rescue_cmd_insmod): Likewise.
11602 (pupa_rescue_cmd_rmmod): Likewise.
11603 (pupa_rescue_cmd_lsmod): Likewise.
11604 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
11605 rmmod and lsmod.
11606
11607 * kern/mm.c (pupa_memalign): If failed even after invalidating
11608 disk caches, unload unneeded modules and retry.
11609
11610 * kern/misc.c (pupa_memmove): New function.
11611 (pupa_memcpy): Removed.
11612 (pupa_strcpy): New function.
11613 (pupa_itoa): Made static.
11614
11615 * kern/dl.c (pupa_dl_iterate): New function.
11616 (pupa_dl_ref): Likewise.
11617 (pupa_dl_unref): Likewise.
11618 (pupa_dl_unload): Return if succeeded or not.
11619 (pupa_dl_unload_unneeded): New function.
11620 (pupa_dl_unload_all): Likewise.
11621 (pupa_dl_init): Renamed to ...
11622 (pupa_dl_set_prefix): ... this.
11623 (pupa_dl_get_prefix): New function.
11624
11625 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
11626 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
11627 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11628 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11629 (pupa_install_dos_part): Declared.
11630 (pupa_install_bsd_part): Likewise.
11631 (pupa_prefix): Likewise.
11632 (pupa_boot_drive): Likewise.
11633
11634 * include/pupa/types.h: Fix a typo.
11635
11636 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
11637 pupa_memmove.
11638 (pupa_memmove): Declared.
11639 (pupa_strcpy): Likewise.
11640
11641 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
11642 pupa_mod_init takes one argument, its own module.
11643 (pupa_dl_unload_unneeded): Declared.
11644 (pupa_dl_unload_all): Likewise.
11645 (pupa_dl_ref): Likewise.
11646 (pupa_dl_unref): Likewise.
11647 (pupa_dl_iterate): Likewise.
11648 (pupa_dl_init): Renamed to ...
11649 (pupa_dl_set_prefix): ... this.
11650 (pupa_dl_get_prefix): Declared.
11651
11652 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 11653 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 11654 unloaded.
11655 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
11656 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
11657
11658 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
11659 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
11660
012d7999 116612003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11662
11663 * util/i386/pc/pupa-setup.c (setup): Define the internal
11664 function find_first_partition_start at the top level, because GCC
11665 3.0.x cannot compile internal functions in deeper scopes
11666 correctly.
11667 (find_root_device): Use lstat instead of stat.
11668 Don't follow symbolic links.
11669 Fix the path-constructing code.
11670
11671 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
11672 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
11673 by a BLKGETSIZE ioctl first, because block devices don't fill
11674 the member st_mode of the structure stat on Linux.
11675 [__linux__] (linux_find_partition): Use a temporary buffer
11676 REAL_DEV for the working space. Copy it to DEV before returning.
11677 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
11678 buffer cache consistent.
11679 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
11680 strncmp. The previous value was merely wrong.
11681 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
11682
11683 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
11684 FAT size is 12. The previous value was merely wrong.
11685
11686 * kern/main.c (pupa_main): Don't split the starting message from
11687 newlines.
11688
11689 * kern/term.c (pupa_putchar): Put CR after LF instead of before
11690 LF, because BIOS goes crazy about character attributes in this
11691 case.
11692
1cc73a62 116932003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11694
11695 * include/i386/pc/util/biosdisk.h: New file.
11696 * util/i386/pc/biosdisk.c: Likewise.
11697 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 11698
1cc73a62 11699 * Makefile.in (INCLUDE_DISTFILES): Added
11700 include/pupa/i386/pc/util/biosdisk.h.
11701 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
11702 directory util/i386/pc.
11703 (install-local): Added a rule for sbin_UTILITIES.
11704 (uninstall): Likewise.
11705
11706 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
11707
11708 * util/misc.c (xrealloc): New function.
11709 (pupa_malloc): Likewise.
11710 (pupa_free): Likewise.
11711 (pupa_realloc): Likewise.
11712 (pupa_stop): Likewise.
11713 (pupa_putchar): Likewise.
11714
11715 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
11716
11717 * include/pupa/util/misc.h (xrealloc): Declared.
11718
11719 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
11720 macro.
11721 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
11722 (PUPA_BOOT_MACHINE_BPB_END): ... this.
11723
11724 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
11725 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11726
11727 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
11728 way should be implemented.
11729 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11730
11731 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
11732 the size of NAME for safety.
11733 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
11734 0x88.
11735
11736 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
11737 (pupa_setup_SOURCES): Likewise.
11738
11739 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
11740
08b70fe8 117412002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11742
11743 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
11744 bunch of pushl's from pusha, because this destroys the return
11745 value.
11746
62ddcc8f 117472002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11748
11749 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
11750 This means that any missing prototypes could be fatal. Also, you
11751 must take care when writing assembly code. See the comments at
11752 the beginning of startup.S, for more details.
f19dbdb7 11753
62ddcc8f 11754 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
11755 compilation mechanism.
11756 (pupa_chainloader_real_boot): Likewise.
11757 (pupa_biosdisk_rw_int13_extensions): Likewise.
11758 (pupa_biosdisk_rw_standard): Likewise.
11759 (pupa_biosdisk_check_int13_extensions): Likewise.
11760 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
11761 (pupa_biosdisk_get_diskinfo_standard): Likewise.
11762 (pupa_get_memsize): Likewise.
11763 (pupa_get_mmap_entry): Likewise.
11764 (pupa_console_putchar): Likewise.
11765 (pupa_console_setcursor): Likewise.
11766 (pupa_getrtsecs): Use pushl instead of push.
11767
11768 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
11769 memory instead of the stack for a mmap entry, because some
11770 BIOSes may ignore the maximum size and overflow.
11771
11772 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
11773
11774 * genmk.rb (PModule#rule): Compile automatically generated
11775 sources with module-specific CFLAGS as well as other sources.
11776
9962ed99 117772002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11778
11779 * configure.ac: Check ld.
11780 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
11781 respectively, before checking endianness and sizes.
11782
11783 * Makefile.in (LD): New variable.
f19dbdb7 11784
abdfc3c5 117852002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11786
11787 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
11788
6a161fa9 117892002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11790
11791 * Changelog: New file.
11792