]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-08-03 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
e14a6184 12008-08-03 Robert Millan <rmh@aybabtu.com>
2
3 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4 (grub_console_setcursor): Make it possible to set cursor off.
5
52768e37 62008-08-03 Robert Millan <rmh@aybabtu.com>
7
8 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
9 of modules instead of assuming which platform provides what.
10 * util/update-grub.in: Likewise.
11
2d52f57f 122008-08-03 Robert Millan <rmh@aybabtu.com>
13
14 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
15 instead of `grub_install_dos_part' to determine whether a drive needs
16 to be prepended to prefix (`grub_install_dos_part' is not reliable,
17 because it can be overriden when loading GRUB via Multiboot).
18
2a5cd121 192008-08-02 Robert Millan <rmh@aybabtu.com>
20
21 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
22
93808428 232008-08-02 Robert Millan <rmh@aybabtu.com>
24
25 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
26 of informational grub_dprintf() calls.
27
3bd0a12a 282008-08-02 Robert Millan <rmh@aybabtu.com>
29
30 * disk/memdisk.c (memdisk_size): Don't initialize.
31 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
32
33 * include/grub/i386/pc/kernel.h
34 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
35 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
36 (grub_memdisk_image_size, grub_arch_memdisk_addr)
37 (grub_arch_memdisk_size): Remove.
38
39 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
40 field (was only used to transfer a constant). Add `type' field to
41 support multiple module types.
42 (grub_module_iterate): New function.
43
44 * kern/device.c (grub_device_open): Do not hide error messages
45 when grub_disk_open() fails. Use grub_print_error() instead.
46
47 * kern/i386/pc/init.c (grub_arch_modules_addr)
48 (grub_arch_memdisk_size): Remove functions.
49 (grub_arch_modules_addr): Return the module address in high memory
50 (now that it isn't copied anymore).
51
52 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
53 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
54 decompression routine (grub_total_module_size already includes that
55 now). Don't copy modules back to low memory.
56
57 * kern/main.c: Include `<grub/mm.h>'.
58 (grub_load_modules): Split out (and use) ...
59 (grub_module_iterate): ... this function, which iterates through
60 module objects and runs a hook.
61 Comment out grub_mm_init_region() call, as it would cause non-ELF
62 modules to be overwritten.
63
64 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
65 the memdisk image in its own region, make it part of the module list.
66 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
67 (main): Parse --memdisk|-m option, and pass user-provided path as
68 parameter to generate_image().
69 (add_segments): Pass `memdisk_path' down to load_modules().
70 (load_modules): Embed memdisk image in module section when requested.
71 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
72 `header.type' instead of `header.offset'.
73
74 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
75 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
76 (memdisk_mod_LDFLAGS): New variables.
77 * conf/i386-coreboot.rmk: Likewise.
78 * conf/i386-ieee1275.rmk: Likewise.
79
a927cc73 802008-08-02 Robert Millan <rmh@aybabtu.com>
81
82 * loader/i386/pc/multiboot.c (playground, forward_relocator)
83 (backward_relocator): New variables. Used to allocate and relocate
84 the payload, respectively.
85 (grub_multiboot_load_elf32): Load into heap instead of requested
86 address, install the appropiate relocator code in each bound of
87 the payload, and set the entry point such that
88 grub_multiboot_real_boot() will jump to one of them.
89
90 * kern/i386/loader.S (grub_multiboot_payload_size)
91 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
92 (grub_multiboot_payload_entry_offset): New variables.
93 (grub_multiboot_real_boot): Set cpu context to what the relocator
94 expects, and jump to the relocator instead of the payload.
95
96 * include/grub/i386/loader.h (grub_multiboot_payload_size)
97 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
98 (grub_multiboot_payload_entry_offset): Export.
99
b15d8a0c 1002008-08-01 Bean <bean123ch@gmail.com>
101
102 * normal/menu_entry.c (editor_getline): Don't return the original
103 string as result, as it will be released by lexer once it has done
104 using it.
105
cdfb3d22 1062008-08-01 Robert Millan <rmh@aybabtu.com>
107
108 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
109 within menuentries, not before them.
110 util/grub.d/10_hurd.in: Likewise.
111
9175e93d 1122008-08-01 Bean <bean123ch@gmail.com>
113
114 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
115 (bufio_mod_SOURCES): New macro.
116 (bufio_mod_CFLAGS): Likewise.
117 (bufio_mod_LDFLAGS): Likewise.
118
119 * include/grub/bufio.h: New file.
120
121 * io/bufio.c: Likewise.
122
123 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
124 (grub_video_reader_png): Use grub_buffile_open to open file.
125
126 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
127 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
128
129 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
130 (grub_video_reader_tga): Use grub_buffile_open to open file.
131
132 * font/manager.c: Include <grub/bufio.h>.
133 (add_font): Use grub_buffile_open to open file.
134
3d8383e7 1352008-07-31 Robert Millan <rmh@aybabtu.com>
136
137 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
138 ELF segments, use a macro for arbitrarily accessing any of them instead
139 of preparing a pointer that allows access to one at a time.
140 (grub_multiboot_load_elf64): Likewise.
141
16e641b6 1422008-07-31 Bean <bean123ch@gmail.com>
143
144 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
145 GRUB_KERNEL_MACHINE_DATA_END.
146
59198b72 1472008-07-30 Robert Millan <rmh@aybabtu.com>
148
149 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
150 Increase from 0x50 to 0x60.
151 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
152 use UUIDs to identify the root drive for them. If that's not
153 possible, abort.
154 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
155 check, for cross-disk installs.
156
ae88bca3 1572008-07-30 Robert Millan <rmh@aybabtu.com>
158
159 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
160 is non-empty, use it to set the `prefix' environment variable instead
161 of the usual approach.
162 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
163 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
164 environment variable instead of dummy make_install_device().
165
166 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
167 (start): Insert a data section, with `grub_prefix' variable.
168 * kern/i386/linuxbios/startup.S: Likewise.
169
170 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
171 New variable reference.
172 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
173 New macro. Defines offset of `grub_prefix' within startup.S (relative
174 to `start').
175 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
176 section within startup.S (relative to `start').
177 * include/grub/i386/coreboot/kernel.h: Likewise.
178
179 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
180 Overwrite grub_prefix with its contents, at the beginning of the
181 first segment.
182 (main): Understand -p|--prefix.
183
14f41dd1 1842008-07-30 Robert Millan <rmh@aybabtu.com>
185
186 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
187
4ca049a3 1882008-07-30 Robert Millan <rmh@aybabtu.com>
189
190 * term/i386/pc/vga_text.c (grub_console_cls): Use
191 grub_console_gotoxy() to go back to beginning of the screen.
192 Found by Patrick Georgi <patrick.georgi@coresystems.de>
193
2921d337 1942008-07-29 Christian Franke <franke@computer.org>
195
196 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
197 Add conversion of emulated mount points on Cygwin.
198
b609876d 1992008-07-29 Christian Franke <franke@computer.org>
200
201 * util/update-grub.in: Add a check for admin
202 group on Cygwin.
203 Remove old `grub.cfg.new' before creation.
204 Add `-f' to `mv' to handle the different filesystem
205 semantics of Windows.
206
e93e4679 2072008-07-29 Bean <bean123ch@gmail.com>
208
209 * normal/main.c (get_line): Fix buffer overflow bug.
210
41694fd0 2112008-07-28 Robert Millan <rmh@aybabtu.com>
212
213 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
214 (struct grub_apple_header): New struct. Describes the layout of
215 the partmap header.
216 (apple_partition_map_iterate): Check the header magic as well as the
217 partition magic (which was already being checked).
218
cfd0b4e6 2192008-07-28 Pavel Roskin <proski@gnu.org>
220
221 * genmk.rb: Add a warning to the beginning of the output that
222 it's a generated file and should not be edited.
223
93cce016 2242008-07-28 Robert Millan <rmh@aybabtu.com>
225
226 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
227 with the same number are found, just use issue a warning with
228 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 229
cd1df915 2302008-07-27 Robert Millan <rmh@aybabtu.com>
231
232 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
233 information.
234
b70a8427 2352008-07-27 Bean <bean123ch@gmail.com>
236
237 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
238 (grub_fat_find_dir): Ignore case when comparing filename.
239
8f5e379f 2402008-07-27 Bean <bean123ch@gmail.com>
241
242 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
243 smallino, as it's more descriptive, and i8count can be confused with
244 the other field count.
245 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
246 inode type.
247
a85cd5a0 2482008-07-27 Bean <bean123ch@gmail.com>
249
250 * commands/crc.c: New file.
251
252 * lib/crc.c: Likewise.
253
254 * include/grub/lib/crc.h: Likewise.
255
256 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
257
258 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
259 (hexdump): Move this function to ...
260
261 * lib/hexdump.c: ... here.
262
263 * include/grub/hexdump.h: Renamed to ...
264
265 * include/grub/lib/hexdump.h: ... this.
266
267 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
268
269 * util/grub-editenv.c: Likewise.
270
271 * include/envblk.h: Renamed to ...
272
273 * include/lib/envblk.h: ... this.
274
275 * util/envblk.c: Renamed to ...
276
277 * lib/envblk.c: ... this.
278
279 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
280 lib/hexdump.c.
281 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
282 (pkglib_MODULES): Add crc.mod.
283 (hexdump_mod_SOURCES): Add lib/hexdump.c.
284 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
285 (crc_mod_SOURCES): New macro.
286 (crc_mod_CFLAGS): Likewise.
287 (crc_mod_LDFLAGS): Likewise.
288
289 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
290
291 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
292
293 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
294
295 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
296
297 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
298
c298def0 2992008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 300
301 * commands/help.c: Include <grub/term.h>.
302 (TERM_WIDTH): Removed. Updated all users.
303
cc349fb3 3042008-07-27 Pavel Roskin <proski@gnu.org>
305
306 * util/getroot.c (find_root_device): Rephrase a comment to avoid
307 spurious warnings about a comment within a comment.
308
9051607e 3092008-07-25 Robert Millan <rmh@aybabtu.com>
310
311 * util/getroot.c (find_root_device): Skip devices that match
312 /dev/dm-[0-9]. This lets the real device be found for any type of
313 abstraction (LVM, EVMS, RAID..).
314 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
315 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
316 device is found first, find_root_device() will now skip it.
317
01453bfc 3182008-07-24 Pavel Roskin <proski@gnu.org>
319
320 * include/grub/types.h: Use __builtin_bswap32() and
321 __builtin_bswap64() with gcc 4.3 and newer.
322
6af9849f 3232008-07-24 Christian Franke <franke@computer.org>
324
3a0fa256 325 * util/i386/pc/grub-install.in: If `--debug' is specified,
326 pass `--verbose' to grub-setup.
327 Abort script if make_system_path_relative_to_its_root() fails.
328
7810e747 3292008-07-24 Bean <bean123ch@gmail.com>
330
331 * configure.ac: Fixed a bug caused by the previous cygwin patch,
332 variable `target_platform' should be `platform'.
333
42290e17 3342008-07-24 Bean <bean123ch@gmail.com>
335
51cc5193 336 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 337 (grub_png_init_fixed_block): New function.
338 (grub_png_decode_image_data): Handle fixed huffman code compression.
339
2a8a80e4 3402008-07-24 Bean <bean123ch@gmail.com>
341
342 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
343 (grub_pe2elf_SOURCES): New macro.
344 (CLEANFILES): Add grub-pe2elf.
345
346 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
347 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
348 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
349 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
350 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
351 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
352 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
353 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
354 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
355 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
356 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
357 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
358 (GRUB_PE32_DT_FUNCTION): Likewise.
359 (GRUB_PE32_REL_I386_DIR32): Likewise.
360 (GRUB_PE32_REL_I386_REL32): Likewise.
361 (grub_pe32_symbol): New structure.
362 (grub_pe32_reloc): Likewise.
363
364 * util/grub-pe2elf.c: New file.
365
366 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
367 start symbol in non pc platform.
368
369 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
370
371 The following patches are from Christian Franke.
372
373 * include/grub/dl.h: Remove .previous, gas supports this only
374 for ELF format.
375
376 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
377 Remove .type, gas supports this only for ELF format.
378
379 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
380 nullbytes in symbol table. This fixes an infinite loop if table is
381 zero filled.
382
383 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
384 TARGET_IMG_LDFLAGS and EXEEXT.
385
386 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
387 TARGET_IMG_LDFLAGS_AC.
388 (grub_CHECK_STACK_ARG_PROBE): New function.
389
390 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
391
392 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
393
394 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
395 to set TARGET_IMG_LD* accordingly.
396 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
397 Add call to grub_CHECK_STACK_ARG_PROBE.
398 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
399
400 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
401
402 * genmk.rb: Add EXEEXT to CLEANFILES.
403
12ccdb75 4042008-07-23 Robert Millan <rmh@aybabtu.com>
405
406 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
407 define the codes for arrows and lines used for the menu).
408 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
409 as well.
410
411 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
412 fonts, because the latter are too slow.
413
18eeaf04 4142008-07-21 Bean <bean123ch@gmail.com>
415
416 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
417 a20. Run keyboard test last, as it will cause macbook to halt.
418
b095e2ad 4192008-07-18 Pavel Roskin <proski@gnu.org>
420
421 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
422 load foreign architecture modules correctly anyway. Keep
423 support for loading host architecture modules, whether we
424 compile them or not.
425
737feb35 4262008-07-17 Pavel Roskin <proski@gnu.org>
427
3f4ce737 428 * configure.ac: Use -m32 or -m64 regardless of whether we had to
429 change target_cpu. The compiler default can mismatch target_cpu
430 in any case.
431
4ad2d049 432 * disk/efi/efidisk.c: Fix format warnings on x86_64.
433 * kern/efi/efi.c: Likewise.
434
f6130a12 435 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
436 target compiler is functional.
437 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
438 are set up.
439
58393a2d 440 * configure.ac: Default to efi platform for x86_64-apple. Allow
441 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
442 adjustments from the rest, only do them if target is not
443 explicitly given. Merge other adjustments with the final sanity
444 check. Remove an extraneous check for supported CPU. Be
445 specific which CPU and which platform is not supported.
446
737feb35 447 * configure.ac: Default to pc platform for x86_64.
448
546f966a 4492008-07-17 Robert Millan <rmh@aybabtu.com>
450
451 Partial LinuxBIOS -> Coreboot rename.
452
453 * conf/i386-linuxbios.rmk: Renamed to ...
454 * conf/i386-coreboot.rmk: ... this.
455 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
456 * configure.ac: Accept "coreboot" as input platform (but maintain
457 compatibility with "linuxbios").
458 * include/grub/i386/linuxbios: Renamed to ...
459 * include/grub/i386/coreboot: ... this.
460
20011694 4612008-07-17 Bean <bean123ch@gmail.com>
462
463 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 464 (appleldr_mod_SOURCE): New variable.
20011694 465 (appleldr_mod_CFLAGS): Likewise.
466 (appleldr_mod_LDFLAGS): Likewise.
467 (pci_mod_SOURCES): Likewise.
468 (pci_mod_CFLAGS): Likewise.
469 (pci_mod_LDFLAGS): Likewise.
470 (lspci_mod_SOURCES): Likewise.
471 (lspci_mod_CFLAGS): Likewise.
472 (lspci_mod_LDFLAGS): Likewise.
473
474 * conf/x86_64-efi.rmk: New file.
475
476 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
477 macro.
478 (grub_efidisk_write): Likewise.
479
480 * include/efi/api.h (efi_call_0): New macro.
481 (efi_call_1): Likewise.
482 (efi_call_2): Likewise.
483 (efi_call_3): Likewise.
484 (efi_call_4): Likewise.
485 (efi_call_5): Likewise.
486 (efi_call_6): Likewise.
487
488 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
489 grub_rescue_cmd_chainloader.
490
491 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
492 (grub_pe32_optional_header): Change some fields based on i386 or
493 x86_64 platform.
494 (GRUB_PE32_PE32_MAGIC): Likewise.
495
496 * include/grub/efi/uga_draw.h: New file.
497
498 * include/grub/elf.h (STN_ABS): New constant.
499 (R_X86_64_NONE): Relocation constant for x86_64.
500 (R_X86_64_64): Likewise.
501 (R_X86_64_PC32): Likewise.
502 (R_X86_64_GOT32): Likewise.
503 (R_X86_64_PLT32): Likewise.
504 (R_X86_64_COPY): Likewise.
505 (R_X86_64_GLOB_DAT): Likewise.
506 (R_X86_64_JUMP_SLOT): Likewise.
507 (R_X86_64_RELATIVE): Likewise.
508 (R_X86_64_GOTPCREL): Likewise.
509 (R_X86_64_32): Likewise.
510 (R_X86_64_32S): Likewise.
511 (R_X86_64_16): Likewise.
512 (R_X86_64_PC16): Likewise.
513 (R_X86_64_8): Likewise.
514 (R_X86_64_PC8): Likewise.
515
516 * include/grub/i386/efi/pci.h: New file.
517
518 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
519 Change it value based on platform.
520 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
521 (GRUB_E820_RAM): Likewise.
522 (GRUB_E820_RESERVED): Likewise.
523 (GRUB_E820_ACPI): Likewise.
524 (GRUB_E820_NVS): Likewise.
525 (GRUB_E820_EXEC_CODE): Likewise.
526 (GRUB_E820_MAX_ENTRY): Likewise.
527 (grub_e820_mmap): New structure.
528 (linux_kernel_header): Change the efi field according to different
529 kernel version, also field from linux_kernel_header.
530
531 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
532
533 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
534 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
535 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
536 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
537 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
538 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
539 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
540 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
541 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
542 (GRUB_PCI_ADDR_IO_MASK): Likewise.
543
544 * include/grub/x86_64/efi/kernel.h: New file.
545
546 * include/grub/x86_64/efi/loader.h: Likewise.
547
548 * include/grub/x86_64/efi/machine.h: Likewise.
549
550 * include/grub/x86_64/efi/pci.h: Likewise.
551
552 * include/grub/x86_64/efi/time.h: Likewise.
553
554 * include/grub/x86_64/linux.h: Likewise.
555
556 * include/grub/x86_64/setjmp.h: Likewise.
557
558 * include/grub/x86_64/time.h: Likewise.
559
560 * include/grub/x86_64/types.h: Likewise.
561
562 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
563 GRUB_TARGET_SIZEOF_VOID_P.
564
565 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
566 (grub_efi_locate_handle): Likewise.
567 (grub_efi_open_protocol): Likewise.
568 (grub_efi_set_text_mode): Likewise.
569 (grub_efi_stall): Likewise.
570 (grub_exit): Likewise.
571 (grub_reboot): Likewise.
572 (grub_halt): Likewise.
573 (grub_efi_exit_boot_services): Likewise.
574 (grub_get_rtc): Likewise.
575
576 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
577 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
578 (grub_efi_allocate_pages): Wrap efi calls.
579 (grub_efi_free_pages): Wrap efi calls.
580 (grub_efi_get_memory_map): Wrap efi calls.
581
582 * kern/x86_64/dl.c: New file.
583
584 * kern/x86_64/efi/callwrap.S: Likewise.
585
586 * kern/x86_64/efi/startup.S: Likewise.
587
588 * loader/efi/appleloader.c: Likewise.
589
590 * loader/efi/chainloader.c (cmdline): New variable.
591 (grub_chainloader_unload): Wrap efi calls.
592 (grub_chainloader_boot): Likewise.
593 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
594 command line.
595
596 * loader/efi/chainloader_normal.c (chainloader_command):
597 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
598 command line.
599
600 * loader/i386/efi/linux.c (allocate_pages): Change allocation
601 method.
602 (grub_e820_add_region): New function.
603 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
604 booting.
605 (grub_find_video_card): New function.
606 (grub_linux_setup_video): New function.
607 (grub_rescue_cmd_linux): Probe for video information.
608
609 * normal/x86_64/setjmp.S: New file.
610
611 * term/efi/console.c (map_char): New function.
612 (grub_console_putchar): Map unicode char.
613 (grub_console_checkkey): Wrap efi calls.
614 (grub_console_getkey): Likewise.
615 (grub_console_getwh): Likewise.
616 (grub_console_gotoxy): Likewise.
617 (grub_console_cls): Likewise.
618 (grub_console_setcolorstate): Likewise.
619 (grub_console_setcursor): Likewise.
620
621 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
622
59652a20 6232008-07-16 Pavel Roskin <proski@gnu.org>
624
ef294055 625 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
626 format strings.
627
59652a20 628 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
629 pointer, not an integer. This fixes a warning and prevents
630 precision loss on 64-bit systems.
631 (relocate_addresses): Remove unneeded cast.
632
afc3b5d7 6332008-07-15 Pavel Roskin <proski@gnu.org>
634
506b2b3e 635 * kern/i386/ieee1275/init.c: Include grub/cache.h.
636
62ead89c 637 * term/ieee1275/ofconsole.c: Disable code unused on i386.
638
c4cd51d7 639 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
640 Fix comparison between signed and unsigned.
641
0d3d8f28 642 * include/grub/i386/ieee1275/console.h: Declare
643 grub_console_init() and grub_console_fini().
644
8804b286 645 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
646 It's empty and unused.
647
ee01cf35 648 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
649 beginning to avoid warnings with some compilers.
650
afc3b5d7 651 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
652 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
653
e4e8eaa5 6542008-07-14 Pavel Roskin <proski@gnu.org>
655
407aceb4 656 * kern/env.c (grub_register_variable_hook): Don't copy empty
657 string, it leaks memory. Pass "" to grub_env_set(), it should
658 handle constant strings.
659
e4e8eaa5 660 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
661 * commands/cmp.c (grub_cmd_cmp): Likewise.
662 * kern/dl.c (grub_dl_flush_cache): Likewise.
663 (grub_dl_load_core): Likewise.
664 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
665 (grub_elf64_load_phdrs): Likewise.
666
d4e2dad3 6672008-07-13 Pavel Roskin <proski@gnu.org>
668
669 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
670 between signed and unsigned.
671 (LzmaEnc_Finish): Fix warning about an unused parameter.
672
aa24b516 6732008-07-13 Bean <bean123ch@gmail.com>
674
675 * Makefile.in (enable_lzo): New rule.
676
677 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
678
679 * configure.ac (ENABLE_LZO): New option --enable-lzo.
680
681 * boot/i386/pc/lnxboot.S: #include <config.h>.
682
683 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 684 its value according to the compression algorithm used, lzo or lzma.
aa24b516 685
686 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
687 compression algorithm according to configure macro.
688
689 * kern/i386/pc/startup.S (codestart): Likewise.
690
691 * kern/i386/pc/lzma_decode.S: New file.
692
693 * include/grub/lib/LzFind.h: Likewise.
694
695 * include/grub/lib/LzHash.h: Likewise.
696
697 * include/grub/lib/LzmaDec.h: Likewise.
698
699 * include/grub/lib/LzmaEnc.h: Likewise.
700
701 * include/grub/lib/LzmaTypes.h: Likewise.
702
703 * lib/LzFind.c: Likewise.
704
705 * lib/LzmaDec.c: Likewise.
706
707 * lib/LzmaEnc.c: Likewise.
708
4ae821ac 7092008-07-13 Bean <bean123ch@gmail.com>
710
711 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
712 (grub_ext4_extent_header): New structure.
713 (grub_ext4_extent): Likewise.
714 (grub_ext4_extent_idx): Likewise.
715 (grub_ext4_find_leaf): New function.
716 (grub_ext2_read_block): Handle extents.
717
9a745147 7182008-07-12 Robert Millan <rmh@aybabtu.com>
719
720 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
721
d49a4cf6 7222008-07-11 Robert Millan <rmh@aybabtu.com>
723
724 * util/grub.d/40_custom.in: New file. Example on how to add custom
725 entries to /etc/grub.d.
726 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
727 40_custom (implicitly, by merging all the grub.d rules).
728
947414b4 7292008-07-11 Pavel Roskin <proski@gnu.org>
730
0059cf6f 731 * commands/read.c (grub_getline): Fix invalid memory access.
732 Don't add newline to the variable value.
733
947414b4 734 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
735 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
736 (serial_hw_get_port): Check validity of the port number.
737 (grub_cmd_serial): Check return value of serial_hw_get_port().
738
62a02d00 7392008-07-07 Pavel Roskin <proski@gnu.org>
740
741 * boot/i386/pc/diskboot.S (notification_string): Replace
742 "Loading kernel" with just "loading". This is shorter, less
743 confusing and saves a few bytes for possible future changes.
744
3e5581b0 7452008-07-05 Pavel Roskin <proski@gnu.org>
746
ea387a48 747 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
748 size for ATAPI devices, they are undefined. Output sector
749 number in decimal form.
750
3e5581b0 751 * disk/ata.c: Use named constants for status bits.
752
fdecb8fd 7532008-07-04 Pavel Roskin <proski@gnu.org>
754
bcd35b90 755 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
756 grub_addr_t before casting it to the void pointer to fix a
757 warning. Non-addressable regions are discarded earlier.
758 (grub_arch_modules_addr): Cast _end to grub_addr_t.
759 * kern/i386/linuxbios/table.c: Include grub/misc.h.
760 (check_signature): Don't shadow table_header.
761 (grub_linuxbios_table_iterate): Cast numeric constants to
762 grub_linuxbios_table_header_t.
763 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
764 grub_stop().
765
af58ab3d 766 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
767 prevent warnings.
768
1759aa57 769 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
770 pointer, which can cause warnings. Support 64-bit addresses.
771
fdecb8fd 772 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
773 of sizeof(long). This fixes PowerPC image generation on x86_64.
774
8516d2a8 7752008-07-04 Robert Millan <rmh@aybabtu.com>
776
777 This fixes a performance issue when pc & gpt partmap iterators
778 didn't abort iteration even after our hook found what it was
fe987087 779 looking for (often causing expensive probes of non-existent drives).
8516d2a8 780
781 Some callers relied on previous buggy behaviour, since they would
782 rise an error when their own hooks caused early abortion of its
783 iteration.
784
785 * kern/device.c (grub_device_open): Improve error message.
786 * disk/lvm.c (grub_lvm_open): Likewise.
787 * disk/raid.c (grub_raid_open): Likewise.
788
789 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
790 when hook requests it, independently of grub_errno.
791 (pc_partition_map_probe): Do not fail when find_func() caused
792 early abortion of pc_partition_map_iterate().
793
794 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
795 when hook requests it, independently of grub_errno.
796 (gpt_partition_map_probe): Do not fail when find_func() caused
797 early abortion of gpt_partition_map_iterate().
798
799 * kern/partition.c (grub_partition_iterate): Abort parent iteration
800 when hook requests it, independently of grub_errno. Do not fail when
801 part_map_iterate_hook() caused early abortion of p->iterate().
802
803 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
804 when grub_partition_iterate() returned with non-zero.
805
277d0de9 8062008-07-03 Pavel Roskin <proski@gnu.org>
807
808 * disk/ata.c (grub_ata_pio_write): Check status before writing,
809 like we do in grub_ata_pio_read().
810 (grub_ata_readwrite): Always write individual sectors. Fix the
811 sector count for the remainder.
812 (grub_ata_write): Enable writing to ATA devices. Correctly
813 report error for ATAPI devices.
814
d4c9b428 8152008-07-02 Pavel Roskin <proski@gnu.org>
816
e43fc690 817 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
818 warning.
819
f707af42 820 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
821 for every read sector, we already increment it for the whole
822 batch. This fixes reading more than 256 sectors at once.
823
11e16b15 824 * util/grub-editenv.c (cmd_info): Cast argument to long
825 explicitly. ptrdiff_t reduces to int on i386.
826
cbabfdd4 827 * util/grub-editenv.c (main): Be specific which parameter is
828 missing.
829
b8fbce0a 830 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
831 (memdisk): Make memdisk_orig_addr a pointer.
832
c9c8e606 833 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
834 for file offsets, use grub_off_t instead. Fix printf format
835 warnings.
836
ca62e598 837 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
838 there. Real unexpected warnings should not drown in the noise
839 about known problems.
840
ce8d1766 841 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
842 grub_disk_addr_t for memory addresses.
843
00c7a56a 844 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
845 explicitly to fix a warning.
846
08d3ef09 847 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
848
cb71ba20 849 * Makefile.in (MODULE_LDFLAGS): New variable.
850 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
851 the linker accepts --build-id=none.
852 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
853 MODULE_LDFLAGS.
854 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
855
d4c9b428 856 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
857 those in Linux XFS code. Provide a way to access 64-bit parent
858 inode.
859 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
860 the end of struct grub_xfs_dir_header.
861
d4156eee 8622008-07-02 Bean <bean123ch@gmail.com>
863
864 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
865 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
866 and GRUB_IEEE1275_FLAG_NO_ANSI.
867
868 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
869 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
870 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
871
872 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
873 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
874
875 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
876 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
877
878 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
879 esc sequence on non ANSI terminal.
880 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
881
882 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
883 beginning of file.
884
2270f77b 8852008-07-02 Bean <bean123ch@gmail.com>
886
887 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
888 (grub_editenv_SOURCES): New variable.
889 (pkglib_MODULES): Add loadenv.mod.
890 (loadenv_mod_SOURCES): New variable.
891 (loadenv_mod_CFLAGS): Likewise.
892 (loadenv_mod_LDFLAGS): Likewise.
893
894 * include/grub/envblk.h: New file.
895
896 * util/envblk.c: New file.
897
898 * util/grub-editenv.c: New file.
899
900 * commands/loadenv.c: New file.
901
0e9e51ec 9022008-07-01 Pavel Roskin <proski@gnu.org>
903
d89b7634 904 * include/multiboot2.h (struct multiboot_tag_module): Use char,
905 not unsigned char. This fixes warnings and is consistent with
906 other tags.
907
bf1835b1 908 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
909
8222a04b 910 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
911
6a42d99d 912 * term/tparm.c (analyze): Always set *popcount.
913
10b159d1 914 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
915 cast to fix a warning.
916
b8789f6c 917 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
918 cast to suppress a warning.
919
29d7e38a 920 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
921 grub_fshelp_read_file() expects.
922
f341f669 923 * fs/fat.c: Fix UUID calculation on big-endian systems. We
924 write uuid as a 32-bit value in CPU byte order, so declare and
925 use it as such.
926
0e9e51ec 927 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
928 long if the format specifier expects it.
929 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
930 * partmap/pc.c (pc_partition_map_iterate): Likewise.
931 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
932 long to fix a warning.
933 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
934 grub_dprintf() arguments to fix warnings.
935
3aefa857 9362008-06-30 Pavel Roskin <proski@gnu.org>
937
56c7668b 938 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
939 install_bsd_part immediately before core.img is embedded or
940 modified on disk. This fixes core.img verification if core.img
941 cannot be embedded.
942
3aefa857 943 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
944 core_path to calculate the blocklist.
945 Patch from Javier Martín <lordhabbit@gmail.com>
946
5444088d 9472008-06-29 Robert Millan <rmh@aybabtu.com>
948
949 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
950 block to disk block.
951 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
952 Patch from Niels Böhm <bitbucket@arcor.de>
953
674835c8 9542008-06-29 Robert Millan <rmh@aybabtu.com>
955
956 * util/update-grub_lib.in (font_path): Search for fonts in
957 /boot/grub first, which is more likely to be readable (we aren't
958 deciding where fonts live, just looking for them).
959
f527dbc8 9602008-06-26 Pavel Roskin <proski@gnu.org>
961
6c2d8df6 962 * util/biosdisk.c (read_device_map): Don't leave dead map
963 entries for devices failing stat() check.
964
f527dbc8 965 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
966 core_path_dev for the core.img path on the target device.
967
aebe3d13 9682008-06-26 Robert Millan <rmh@aybabtu.com>
969
970 * disk/fs_uuid.c: New file.
971 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
972 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
973 (fs_uuid_mod_LDFLAGS): New variables.
974 * include/grub/disk.h (grub_disk_dev_id): Add
975 `GRUB_DISK_DEVICE_UUID_ID'.
976 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
977 implement iterate().
978
37aaf354 9792008-06-26 Robert Millan <rmh@aybabtu.com>
980
981 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
982 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
983 Linux image includes no initrd.
984
25ff262a 9852008-06-21 Javier Martín <lordhabbit@gmail.com>
986
987 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
988 call to resolve the core image location that effectively appended the
989 name twice.
990
76a2bd44 9912008-06-21 Robert Millan <rmh@aybabtu.com>
992
993 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
994 call from here ...
995
996 * util/grub.d/10_hurd.in: ... to here ...
997 * util/grub.d/10_linux.in: ... and here.
998
650e1c79 9992008-06-19 Robert Millan <rmh@aybabtu.com>
1000
fe987087 1001 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 1002 after it has been set by grub_machine_set_prefix().
1003
6ce63911 10042008-06-19 Robert Millan <rmh@aybabtu.com>
1005
1006 * commands/search.c (search_label, search_fs_uuid, search_file): Print
1007 search result when not saving to variable, not the other way around.
1008 When saving to variable, abort iteration as soon as a match is found.
1009
73940cec 10102008-06-19 Robert Millan <rmh@aybabtu.com>
1011
1012 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
1013 check for partition that provides /boot/grub. Its logic is flawed,
1014 as it prevents prepare_grub_to_access_device() from being called
1015 multiple times.
1016
3c62a39d 10172008-06-19 Robert Millan <rmh@aybabtu.com>
1018
1019 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
1020 "insmod" command directly when abstraction modules are needed,
fe987087 1021 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 1022 since it had already been processed).
1023
47395a42 10242008-06-19 Pavel Roskin <proski@gnu.org>
1025
1026 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
1027 changed. This is needed in case GRUB_LIBDIR changes.
1028 * conf/i386-ieee1275.rmk: Likewise.
1029 * conf/i386-linuxbios.rmk: Likewise.
1030 * conf/i386-pc.rmk: Likewise.
1031 * conf/powerpc-ieee1275.rmk: Likewise.
1032
a145ac2d 10332008-06-18 Pavel Roskin <proski@gnu.org>
1034
1035 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
1036 kernel_elf_symlist.c to symlist.c for consistency with other
1037 architectures. Update all users.
1038 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1039
7847c51e 10402008-06-18 Robert Millan <rmh@aybabtu.com>
1041
1042 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
1043 it in prefix.
1044
1045 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
1046 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
1047 a RAID device, run setup() for all members independently on whether
1048 LVM abstraction is being used.
1049 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
1050 If grub-mkimage has set `*install_dos_part == -2', don't override this
1051 value.
1052 Perform *install_dos_part adjustments independently on whether
1053 we're embedding or not.
1054 Clarify error message when image is too big for embedding.
1055 Remove duplicate *install_dos_part stanza.
1056
b23e5644 10572008-06-17 Robert Millan <rmh@aybabtu.com>
1058
1059 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
1060 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
1061 variables.
1062 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
1063 values in grub_ofconsole_normal_color and
1064 grub_ofconsole_highlight_color (they're not directly related to
1065 background and foreground).
1066 (grub_ofconsole_setcolorstate): Extract background and foreground
1067 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
1068
0aac2f79 10692008-06-17 Robert Millan <rmh@aybabtu.com>
1070
1071 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
1072 /boot/grub for the check in last commit, not /boot (they could be
1073 different partitions).
1074
3cca7ef3 10752008-06-16 Robert Millan <rmh@aybabtu.com>
1076
1077 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
1078 asked to setup access for the same partition that provides /boot,
1079 don't bother using UUIDs since our root already has the value we
1080 want.
1081
347396d8 10822008-06-16 Robert Millan <rmh@aybabtu.com>
1083
1084 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
1085 I2O devices.
1086 Patch from Sven Mueller <sven@debian.org>.
1087
991477f8 10882008-06-16 Robert Millan <rmh@aybabtu.com>
1089
1090 * util/update-grub.in: Check for $EUID instead of $UID.
1091 Reported by Vincent Zweije.
1092
d31a32a1 10932008-06-16 Bean <bean123ch@gmail.com>
1094
fe987087 1095 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 1096 (grub_ext2_read_block): Likewise.
1097 (grub_ext2_read_inode): Likewise.
1098 (grub_ext2_mount): Likewise.
1099 (grub_ext2_close): Likewise.
1100 (grub_ext3_get_journal): Removed.
1101
fe987087 1102 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 1103 (grub_reiserfs_read_symlink): Likewise.
1104 (grub_reiserfs_mount): Likewise.
1105 (grub_reiserfs_open): Likewise.
1106 (grub_reiserfs_read): Likewise.
1107 (grub_reiserfs_close): Likewise.
1108 (grub_reiserfs_get_journal): Removed.
1109
1110 * fs/fshelp.c (grub_fshelp_read): Removed.
1111 (grub_fshelp_map_block): Likewise.
1112
1113 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
1114 (grub_fshelp_journal): Likewise.
1115 (grub_fshelp_read): Likewise.
1116 (grub_fshelp_map_block): Likewise.
1117
3540a760 11182008-06-16 Pavel Roskin <proski@gnu.org>
1119
1120 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
1121 floating point anymore.
1122 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
1123
95614c84 11242008-06-15 Pavel Roskin <proski@gnu.org>
1125
1126 * commands/ls.c (grub_ls_list_files): Use integer calculations
1127 for human readable format, avoid floating point use.
1128 * kern/misc.c (grub_ftoa): Remove.
1129 (grub_vsprintf): Remove floating point support.
1130
50465dd6 11312008-06-15 Robert Millan <rmh@aybabtu.com>
1132
fe6b695a 1133 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 1134 devices.
1135 Reported by Max Vozeler.
1136
a9207284 11372008-06-15 Robert Millan <rmh@aybabtu.com>
1138
1139 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
1140 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
1141 skipped later.
1142 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
1143 the beginning of the prefix.
1144
1145 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
1146 It is assumed that if we have a memdisk, grub-mkimage has set
1147 grub_prefix to include the "(memdisk)" drive in it.
1148
a7cbd45a 11492008-06-15 Robert Millan <rmh@aybabtu.com>
1150
1151 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
1152 Initialize keyboard controller after registering the terminal, so that
1153 grub_printf() can be called from grub_keyboard_controller_init().
1154
21cf716a 11552008-06-15 Robert Millan <rmh@aybabtu.com>
1156
1157 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
1158 extent-btree which is written as big endian on disk.
1159 Reported by Alain Greppin <al@chilibi.org>.
1160
23a64d8e 11612008-06-14 Robert Millan <rmh@aybabtu.com>
1162
1163 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
1164 * util/i386/pc/grub-install.in (modules): Likewise.
1165
d687651c 11662008-06-13 Pavel Roskin <proski@gnu.org>
1167
1168 * commands/ls.c (grub_ls_list_files): Fix format warnings.
1169
dfe9ddd4 11702008-06-13 Bean <bean123ch@gmail.com>
1171
1172 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
1173
1174 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
1175
1176 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
1177 to indicate sparse block.
1178
16ae7781 11792008-06-12 Pavel Roskin <proski@gnu.org>
1180
e6d1a308 1181 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
1182 number, grub_fshelp_read() does it for us.
1183
16ae7781 1184 * fs/fshelp.c (grub_fshelp_read): New function. Implement
1185 linear disk read with journal translation.
1186 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
1187 * include/grub/fshelp.h: Declare grub_fshelp_read().
1188
40fd3a2b 11892008-06-09 Pavel Roskin <proski@gnu.org>
1190
1191 * fs/minix.c (grub_minix_mount): Handle error reading
1192 superblock.
1193
f5679726 11942008-06-08 Robert Millan <rmh@aybabtu.com>
1195
1196 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
1197 don't append the RAID prefix afterwards.
1198 Reported by Clint Adams.
1199
ce525529 12002008-06-08 Robert Millan <rmh@aybabtu.com>
1201
1202 Based on description from Pavel:
1203 * kern/disk.c (grub_disk_check_range): Rename to ...
1204 (grub_disk_adjust_range): ... this. Add a comment explaining the
1205 tasks performed by this function.
1206
ad4936a0 12072008-06-08 Robert Millan <rmh@aybabtu.com>
1208
1209 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
1210 `num_serial' (for consistency with other variables).
1211 (struct grub_ntfs_data): Add `uuid' member.
1212 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
1213 (grub_ntfs_uuid): New function.
1214 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
1215
dc20b0f9 12162008-06-07 Pavel Roskin <proski@gnu.org>
1217
1218 * util/biosdisk.c (open_device): Revert last change to the
1219 function, it broke installation. The sector needs to be
1220 different dependent on which device is opened.
1221
c5e3cfba 12222008-06-06 Robert Millan <rmh@aybabtu.com>
1223
1224 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
1225 rest of GRUB, and breakage doesn't happen if its value were modified.
1226
1227 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1228 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
1229 a constant (same value).
1230 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
1231 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
1232
26a1f8c4 12332008-06-06 Robert Millan <rmh@aybabtu.com>
1234
1235 * util/biosdisk.c (open_device): Do not modify sector offset when
1236 accessing a partition. kern/disk.c already handles this for us.
1237
25d6b327 12382008-06-06 Robert Millan <rmh@aybabtu.com>
1239
1240 * util/grub-emu.c (grub_machine_init): Move code in this function from
1241 here ...
1242 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
1243 segfault in case grub_printf() is called).
1244
1245 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
1246 grub_probe. Update all users not to explicitly add it again.
1247 (grub_device): New variable; contains corresponding device for grubdir.
1248 (fs_module, partmap_module, devabstraction_module): Pass
1249 `--device ${grub_device}' to grub_probe to avoid traversing /dev
1250 every time.
1251
9ece62fb 12522008-06-05 Robert Millan <rmh@aybabtu.com>
1253
1254 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
1255 is found, print it (same layout as with labels).
1256
1ad36d37 12572008-06-04 Robert Millan <rmh@aybabtu.com>
1258
1259 * util/biosdisk.c (get_drive): Rename to ...
1260 (find_grub_drive): ... this. Update all users.
1261
1262 (get_os_disk): Rename to ...
1263 (convert_system_partition_to_system_disk): ... this. Update all users.
1264
1265 (find_drive): Rename to ...
1266 (find_system_device): ... this. Update all users.
1267
e6a30859 12682008-06-04 Robert Millan <rmh@aybabtu.com>
1269
1270 * util/biosdisk.c (get_os_disk): Handle IDA devices.
1271 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1272 (make_device_map): Likewise.
1273
00c108a4 12742008-06-01 Robert Millan <rmh@aybabtu.com>
1275
1276 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
1277 before dereferencing it.
1278
1279 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
1280 union with fat12/fat16-specific ones. Add some new fields, including
1281 `num_serial' for both versions.
1282 (struct grub_fat_data): Add `uuid' member.
1283 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
1284 names. Initialize `data->uuid' using `num_serial'.
1285 (grub_fat_uuid): New function.
1286 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
1287
1288 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
1289 (grub_reiserfs_uuid): New function.
1290 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
1291 member.
1292
1293 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
1294 (grub_xfs_uuid): New function.
1295 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
1296
1385c5bb 12972008-06-01 Robert Millan <rmh@aybabtu.com>
1298
1299 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
1300 code that is backward compatible with pre-uuid search command.
1301
c682dfd7 13022008-05-31 Robert Millan <rmh@aybabtu.com>
1303
1304 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
1305 floppies after everything else, to ensure floppy drive isn't accessed
1306 unnecessarily (patch from Bean).
1307
b7db5d47 13082008-05-31 Robert Millan <rmh@aybabtu.com>
1309
1310 * commands/search.c (search_label, search_fs_uuid, search_file): Do
1311 not print device names when we were asked to set a variable.
1312
6e037aa9 13132008-05-31 Robert Millan <rmh@aybabtu.com>
1314
1315 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
1316 using "cursor-on" and "cursor-off" commands (understood at least by
1317 the Open Firmware flavour on OLPC).
1318
41305bc8 13192008-05-31 Michael Gorven <michael@gorven.za.net>
1320
1321 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
1322 on and off sequences.
1323
69ba137e 13242008-05-31 Robert Millan <rmh@aybabtu.com>
1325
1326 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
1327 * util/update-grub.in: Likewise.
1328
520ae21b 13292008-05-30 Pavel Roskin <proski@gnu.org>
1330
1331 * util/biosdisk.c (linux_find_partition): Simplify logic and
1332 make the code more universal. Keep special processing for
1333 devfs, but use a simple rule for all other devices. If the
1334 device ends with a number, append 'p' and the partition number.
1335 Otherwise, append only the partition number.
1336
5786569b 13372008-05-30 Robert Millan <rmh@aybabtu.com>
1338
1339 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
1340 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
1341 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
1342 the `root' parameter to Linux.
1343
51500452 13442008-05-30 Robert Millan <rmh@aybabtu.com>
1345
1346 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
1347 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
1348 --fs_uuid with --fs-uuid.
1349 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
1350 all filesystems support them).
1351
811d3878 13522008-05-30 Robert Millan <rmh@aybabtu.com>
1353
1354 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 1355 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 1356
cab63c95 13572008-05-30 Robert Millan <rmh@aybabtu.com>
1358
1359 * util/grub.d/00_header.in: Remove obsolete comment referencing
1360 convert_system_path_to_grub_path().
1361 * util/update-grub.in: Likewise.
1362 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
1363 (convert_system_path_to_grub_path): Add a warning message explaining
1364 that this function is deprecated. Rely on is_path_readable_by_grub()
1365 for the readability checks.
1366 (font_path): Use is_path_readable_by_grub() for the readability
1367 check rather than convert_system_path_to_grub_path().
1368
972e2f7a 13692008-05-30 Robert Millan <rmh@aybabtu.com>
1370
1371 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
1372 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
1373 converting it first.
1374 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
1375 grub.cfg for access to font file, and afterwards call it again to set
1376 the root device.
1377
62191274 13782008-05-30 Robert Millan <rmh@aybabtu.com>
1379
1380 * commands/search.c (options): Add --fs_uuid option.
1381 (search_fs_uuid): New function.
1382 (grub_cmd_search): Fix --set argument passing.
1383 Use search_fs_uuid() when requested via --fs_uuid.
1384 (grub_search_init): Update help message.
1385 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
1386 and redeclare it as an array of 16-bit words.
1387 (grub_ext2_uuid): New function.
1388 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
1389 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
1390 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
1391 (GRUB_DEVICE_BOOT_UUID): New variables.
1392 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
1393 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
1394 whenever possible.
1395 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
1396 just assume `root' variable has the right value.
1397 * util/grub.d/10_linux.in: Likewise.
1398 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
1399 via PRINT_FS_UUID.
1400 (main): Recognise `-t fs_uuid' argument.
1401
01b73ec8 14022008-05-30 Robert Millan <rmh@aybabtu.com>
1403
1404 * util/biosdisk.c (map): Redefine structure to hold information
1405 about GRUB drive name.
fe6b695a 1406 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 1407 drive names.
1408 (call_hook): Remove.
1409 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
1410 member. Assume drive has partitions.
1411 (grub_util_biosdisk_open): Access device names via `.device' struct
1412 member.
1413 (open_device): Likewise.
1414 (find_drive): Likewise.
1415 (read_device_map): Adjust map[] usage to match the new struct
1416 definition. Don't check for duplicates (still possible, but not cheap
1417 anymore).
1418 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
1419 (make_device_name): Remove assumption of BIOS-like drive names.
1420
22f16596 14212008-05-30 Pavel Roskin <proski@gnu.org>
1422
1423 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
1424 compiling execute.c doesn't need grub_script.tab.h anymore.
1425 (normal/command.c_DEPENDENCIES): Likewise.
1426 (normal/function.c_DEPENDENCIES): Likewise.
1427 * conf/i386-ieee1275.rmk: Likewise.
1428 * conf/i386-linuxbios.rmk: Likewise.
1429 * conf/i386-pc.rmk: Likewise.
1430 * conf/powerpc-ieee1275.rmk: Likewise.
1431 * conf/sparc64-ieee1275.rmk: Likewise.
1432
528ad8f2 14332008-05-29 Pavel Roskin <proski@gnu.org>
1434
d1dff95d 1435 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
1436 when scanning metadata for volume group name.
1437
528ad8f2 1438 * include/grub/script.h: Don't include grub_script.tab.h. It's
1439 a generated file, which may only be included from the files with
1440 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
1441 use union YYSTYPE, as the later allows forward declaration.
1442 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
1443
47248e08 14442008-05-29 Robert Millan <rmh@aybabtu.com>
1445
1446 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
1447 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
1448 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
1449 (grub_console_checkkey): Add grub_dprintf() call to report unknown
1450 scan codes.
1451
ee632529 14522008-05-29 Robert Millan <rmh@aybabtu.com>
1453
1454 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
1455 control key combinations.
1456
eee96e08 14572008-05-29 Robert Millan <rmh@aybabtu.com>
1458
1459 * util/powerpc/ieee1275/grub-install.in: Move from here ...
1460 * util/ieee1275/grub-install.in: ... to here.
1461 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
1462 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
1463 (grub_install_SOURCES): Likewise.
1464
da9a6a94 14652008-05-29 Robert Millan <rmh@aybabtu.com>
1466
1467 * fs/affs.c: Update copyright year.
1468 * fs/ext2.c: Likewise.
1469 * fs/fshelp.c: Likewise.
1470 * fs/hfsplus.c: Likewise.
1471 * fs/ntfs.c: Likewise.
1472 * fs/xfs.c: Likewise.
1473 * include/grub/fshelp.h: Likewise.
1474 * util/grub-mkdevicemap.c: Likewise.
1475
12e65f3a 14762008-05-28 Robert Millan <rmh@aybabtu.com>
1477
1478 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
1479 might need to be fatfs to support some firmware implementations
1480 (e.g. OFW or EFI).
1481
23023641 14822008-05-28 Robert Millan <rmh@aybabtu.com>
1483
1484 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
1485 devices.
1486 * util/grub-mkdevicemap.c (get_mmc_disk_name)
1487 (make_device_map): Likewise.
1488
887d2619 14892008-05-20 Bean <bean123ch@gmail.com>
1490
1491 * fs/fshelp.c (grub_fshelp_map_block): New function.
1492 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
1493 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
1494
1495 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
1496 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
1497 (grub_fshelp_journal): New structure.
1498 (grub_fshelp_map_block): New function prototype.
1499 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
1500 (grub_fshelp_map_block): Likewise.
1501
1502 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
1503 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
1504 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
1505 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
1506 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
1507 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
1508 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
1509 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
1510 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
1511 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
1512 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
1513 (grub_ext2_sblock): New members for journal support.
1514 (grub_ext3_journal_header): New structure.
1515 (grub_ext3_journal_revoke_header): Likewise.
1516 (grub_ext3_journal_block_tag): Likewise.
1517 (grub_ext3_journal_sblock): Likewise.
1518 (grub_fshelp_node): New members logfile and journal.
1519 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
1520 grub_fshelp_map_block to get real block number.
1521 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
1522 number.
1523 (grub_ext2_read_inode): Likewise.
1524 (grub_ext3_get_journal): New function.
1525 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
1526 (grub_ext2_close): Release memory used by journal.
1527
1528 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
1529 (REISERFS_MAGIC_DESC_BLOCK): New macro.
1530 (grub_reiserfs_transaction_header): Renamed to
1531 grub_reiserfs_description_block, replace field data with real_blocks.
1532 (grub_reiserfs_commit_block): New structure.
1533 (grub_reiserfs_data): New member journal.
1534 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
1535 number.
1536 (grub_reiserfs_read_symlink): Likewise.
1537 (grub_reiserfs_iterate_dir): Likewise.
1538 (grub_reiserfs_open): Likewise.
1539 (grub_reiserfs_read): Likewise.
1540 (grub_reiserfs_get_journal): New function.
1541 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
1542 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
1543 using grub_reiserfs_get_journal.
1544 (grub_reiserfs_close): Release memory used by journal.
1545
1546 * fs/affs.c (grub_affs_read_block): Change block type to
1547 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
1548
1549 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
1550
1551 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
1552
1553 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
1554
1555 * fs/udf.c (grub_udf_read_block): Change block type to
1556 grub_disk_addr_t. Use type cast to avoid warning.
1557
1558 * fs/xfs.c (grub_xfs_read_block): Likewise.
1559
b7c6bed5 15602008-05-16 Christian Franke <franke@computer.org>
1561
1562 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
1563 to ensure that break with ESC will always work.
1564 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
1565 Remove ESC from keyboard queue.
1566
eedf167f 15672008-05-16 Christian Franke <franke@computer.org>
1568
1569 * util/biosdisk.c: [__CYGWIN__] Add includes.
1570 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
1571 (get_os_disk): Move variable declarations to OS specific
1572 parts to avoid warning.
1573 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
1574 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
1575 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
1576 Cygwin.
1577 * util/getroot.c: [__CYGWIN__] Add includes.
1578 (strip_extra_slashes): Fix "/" case.
1579 [__CYGWIN__] (get_win32_path): New function.
1580 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
1581 [__CYGWIN__] (find_root_device): Disable.
1582 [__CYGWIN__] (get_bootsec_serial): New function.
1583 [__CYGWIN__] (find_cygwin_root_device): Likewise.
1584 [__linux__] (grub_guess_root_device): Add early returns to simplify
1585 structure.
1586 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
1587 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
1588 check for Linux only.
1589
a079699e 15902008-05-15 Bean <bean123ch@gmail.com>
1591
1592 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
1593 keyboard hang problem in apple's intel mac.
1594
1cf4059a 15952008-05-09 Robert Millan <rmh@aybabtu.com>
1596
1597 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
1598 devices.
1599 * util/grub-mkdevicemap.c (get_virtio_disk_name)
1600 (make_device_map): Likewise.
1601 Reported by Aurelien Jarno <aurel32@debian.org>
1602
ed759390 16032008-05-07 Ian Campbell <ijc@hellion.org.uk>
1604
1605 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
1606 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
1607 (make_device_map): Output entries for xvd type disks.
1608
b56c4eaa 16092008-05-07 Robert Millan <rmh@aybabtu.com>
1610
1611 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
1612 devices.
1613 * util/grub-mkdevicemap.c (get_cciss_disk_name)
1614 (make_device_map): Likewise.
1615 Reported by Roland Dreier <rdreier@cisco.com>
1616
7f8866ed 16172008-05-07 Robert Millan <rmh@aybabtu.com>
1618
1619 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
1620 grub_strstr() call. Correct a few mistakes in failure path handling.
1621
b0346e0f 16222008-05-06 Robert Millan <rmh@aybabtu.com>
1623
1624 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1625 Do not print a trailing slash (therefore, the root directory is an
1626 empty string).
1627 (convert_system_path_to_grub_path): Do not remove trailing slash
1628 from make_system_path_relative_to_its_root() output.
1629
1630 * util/i386/pc/grub-install.in: Add trailing slash to output from
1631 make_system_path_relative_to_its_root().
1632
6cf12cbd 16332008-05-06 Robert Millan <rmh@aybabtu.com>
1634
1635 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
1636 ensures that output lines aren't intermangled with those sent to
1637 stderr (via grub_util_info()).
1638 * util/grub-probe.c (grub_refresh): Likewise.
1639 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
1640
0fbb3117 16412008-05-05 Christian Franke <franke@computer.org>
1642
1643 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
1644 Add Cygwin device names.
1645 (get_ide_disk_name) [__CYGWIN__]: Likewise.
1646 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
1647 (check_device): Return error instead of success on empty name.
1648 (make_device_map): Move label inside linux specific code to
1649 prevent compiler warning.
1650
8124cdb7 16512008-04-30 Robert Millan <rmh@aybabtu.com>
1652
1653 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
1654 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
1655 first boot option.
1656 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
1657
094c01d0 16582008-04-29 Robert Millan <rmh@aybabtu.com>
1659
1660 * docs/grub.cfg: New file (example GRUB configuration).
1661
f4b1fc02 16622008-04-26 Robert Millan <rmh@aybabtu.com>
1663
329ce2a5 1664 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
1665 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
1666 and `disk/ieee1275/nand.c'.
f4b1fc02 1667
25f16ec1 16682008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 1669
25f16ec1 1670 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
1671 i386-linuxbios.
1672
1673 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
1674 change the buffer size to 4096 for cdrom device.
1675
1676 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
1677 and nand.mod.
1678 (_linux_mod_SOURCES): New variable.
1679 (_linux_mod_CFLAGS): Likewise.
1680 (_linux_mod_LDFLAGS): Likewise.
1681 (linux_mod_SOURCES): Likewise.
1682 (linux_mod_CFLAGS): Likewise.
1683 (linux_mod_LDFLAGS): Likewise.
1684 (nand_mod_SOURCES): Likewise.
1685 (nand_mod_CFLAGS): Likewise.
1686 (nand_mod_LDFLAGS): Likewise.
1687
1688 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
1689 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
1690 type property. (nand device in olpc don't have this property)
1691
1692 * include/grub/disk.h (grub_disk_dev_id): New macro
1693 GRUB_DISK_DEVICE_NAND_ID.
1694
1695 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
1696 function prototype.
1697 (grub_rescue_cmd_initrd): Likewise.
1698
1699 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
1700 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
1701 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 1702
25f16ec1 1703 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
1704 GRUB_MACHINE_IEEE1275 is defined.
1705
1706 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
1707 Use NESTED_FUNC_ATTR attribute on the hook parameter.
1708
1709 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
1710 on nested function heap_init.
1711 (grub_upper_mem): New variable for i386-ieee1275.
1712 (grub_get_extended_memory): New function for i386-ieee1275.
1713 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
1714
1715 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
1716 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
1717 property.
f19dbdb7 1718
25f16ec1 1719 * loader/i386/ieee1275/linux.c: New file.
1720
1721 * loader/i386/ieee1275/linux_normal.c: New file.
1722
1723 * disk/ieee1275/nand.c: New file.
1724
e89d61e9 17252008-04-18 Thomas Schwinge <tschwinge@gnu.org>
1726
1727 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
1728 value.
1729 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
1730
602566f6 17312008-04-18 Robert Millan <rmh@aybabtu.com>
1732
1733 Restructures early code path on ieee1275 to unify grub_main() as
1734 the first C function that is executed in every platform.
1735
1736 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
1737 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
1738 cmain().
1739 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
1740 * kern/ieee1275/cmain.c (cmain): Rename to ...
1741 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
1742 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
1743 at the beginning.
1744
57490c2b 17452008-04-18 Robert Millan <rmh@aybabtu.com>
1746
1747 * util/update-grub.in: Fix syntax error when setting
1748 `GRUB_PRELOAD_MODULES'.
1749 Reported by Stephane Chazelas <stephane@artesyncp.com>
1750
1977517d 17512008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
1752
1753 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
1754 section into account, newer toolchains generate unique build ids
1755 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 1756 we want build ids to be preserved
1977517d 1757 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
1758 far from other sections don't cause the raw binary images grow
1759 size
1760
bfb1f1a2 17612008-04-15 Robert Millan <rmh@aybabtu.com>
1762
1763 * disk/lvm.c: Update copyright year.
1764 * kern/misc.c: Likewise.
1765
01979850 17662008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1767
1768 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 1769 there is no memory left for physical volume name.
01979850 1770
0a1150e2 17712008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
1772
1773 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
1774 volume name mapping to support bigger than 9 character names properly.
1775
82ead3fe 17762008-04-13 Robert Millan <rmh@aybabtu.com>
1777
1778 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
1779 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
1780
e54a72f5 17812008-04-13 Christian Franke <franke@computer.org>
1782
1783 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
1784 to create a floppy emulation boot CD when non emulation mode
1785 does not work.
1786 Enable Joliet CD filesystem extension.
1787
9fe86034 17882008-04-13 Robert Millan <rmh@aybabtu.com>
1789
1790 * kern/misc.c (grub_strncat): Fix off-by-one error.
1791 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
1792
1793 * kern/env.c (grub_env_context_close): Clear current context, not
1794 previous one.
1795 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
1796
1797 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
1798
7ceeee39 17992008-04-13 Robert Millan <rmh@aybabtu.com>
1800
1801 Improve robustness when handling LVM.
1802
1803 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 1804 (and leave `*p' unmodified).
7ceeee39 1805 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
1806 through it.
1807 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
1808 iterating through it.
1809 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
1810 through it.
fe6b695a 1811 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 1812 when due) on each grub_lvm_getvalue() or grub_strstr() call.
1813 Don't assume `vg->pvs != NULL' when iterating through it.
1814
58cd3d85 18152008-04-13 Robert Millan <rmh@aybabtu.com>
1816
1817 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
1818 * genmk.rb (partmap): New variable.
1819 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
1820 (#{partmap}): New target rule.
1821 * genpartmaplist.sh: New file.
1822 * Makefile.in (pkglib_DATA): Add partmap.lst.
1823 (partmap.lst): New target rule.
1824 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
1825 modules (including all partition maps), instead of preloading them.
1826
78b51059 18272007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
1828
1829 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
1830 `linux-boot-prober' (if installed) to detect other operating
1831 systems which are installed on the computer and add them to
1832 the boot menu.
1833 * conf/common.rmk: Build and install 30_os-prober.
1834
a91627b4 18352008-04-12 Robert Millan <rmh@aybabtu.com>
1836
1837 * kern/powerpc/ieee1275/init.c: Move from here ...
1838 * kern/ieee1275/init.c: ... to here. Update all users.
1839
1840 * kern/powerpc/ieee1275/cmain.c: Move from here ...
1841 * kern/ieee1275/cmain.c: ... to here. Update all users.
1842
1843 * kern/powerpc/ieee1275/openfw.c: Move from here ...
1844 * kern/ieee1275/openfw.c: ... to here. Update all users.
1845
1846 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
1847 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
1848
322562ea 18492008-04-10 Pavel Roskin <proski@gnu.org>
1850
1851 * configure.ac: Always use "_cv_" in cache variables for
1852 compatibility with Autoconf 2.62.
1853
a02a73c5 18542008-04-07 Robert Millan <rmh@aybabtu.com>
1855
1856 Revert grub/machine/init.h addition by Pavel (since it breaks on
1857 i386-ieee1275 and others):
1858 * util/i386/pc/misc.c: Remove grub/machine/init.h.
1859 * util/powerpc/ieee1275/misc.c: Likewise.
1860
25c024b1 18612008-04-07 Robert Millan <rmh@aybabtu.com>
1862
1863 * util/grub-probe.c (probe): Improve error message.
1864
3cbd2f98 18652008-04-07 Robert Millan <rmh@aybabtu.com>
1866
1867 * util/biosdisk.c (read_device_map): Skip devices that don't exist
1868 (this prevents the presence of a bogus entry from ruining the whole
1869 thing).
1870
87a297bf 18712008-04-06 Pavel Roskin <proski@gnu.org>
1872
36747a62 1873 * util/biosdisk.c: Include grub/util/biosdisk.h.
1874 * util/grub-fstest.c (execute_command): Make static.
1875 * util/grub-mkdevicemap.c (check_device): Likewise.
1876 * util/i386/pc/misc.c: Include grub/machine/init.h.
1877 * util/powerpc/ieee1275/misc.c: Likewise.
1878 * util/lvm.c: Include grub/util/lvm.h.
1879 * util/misc.c: Include grub/kernel.h, grub/misc.h and
1880 grub/cache.h.
1881 * util/raid.c: Include grub/util/raid.h.
1882 (grub_util_getdiskname): Make static.
1883
87a297bf 1884 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
1885 grub_hostfs_fini(), as they are called from grub_init_all() and
1886 grub_fini_all() respectively. This fixes an infinite loop in
1887 grub-fstest due to double registration of hostfs.
1888 Reported by Christian Franke <Christian.Franke@t-online.de>
1889
f6ce7629 18902008-04-05 Pavel Roskin <proski@gnu.org>
1891
1892 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
1893 all 8 functions. Otherwise, probe function 0 only.
1894
070e49e4 18952008-04-04 Pavel Roskin <proski@gnu.org>
1896
8b088a4c 1897 * commands/lspci.c (grub_lspci_iter): Print the bus number
1898 correctly.
1899
4f657021 1900 * commands/lspci.c (grub_pci_classes): Fix typos.
1901 (grub_lspci_iter): Don't print func twice. Print vendor ID
1902 before device ID, as it's normally done.
1903
070e49e4 1904 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
1905 Fix signedness warnings.
1906 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
1907 Likewise.
1908 * util/ieee1275/get_disk_name.c: Include config.h so that
1909 _GNU_SOURCE is defined and getline() is declared. Mark an
1910 unused argument as such. Fix a signedness warning.
1911
ba7328dc 19122008-04-02 Pavel Roskin <proski@gnu.org>
1913
26887f22 1914 * genkernsyms.sh.in: Use more robust assignments for CC and
1915 srcdir. Quote srcdir.
1916 * gensymlist.sh.in: Likewise. Assert at the compile time that
1917 the symbol table is not empty.
1918
ba7328dc 1919 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
1920 * fs/cpio.c (grub_cpio_read): Likewise.
1921
0f582c6b 19222008-04-01 Pavel Roskin <proski@gnu.org>
1923
4b6e1995 1924 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
1925 * disk/host.c (grub_host_open): Likewise.
1926 * disk/loopback.c (grub_loopback_open): Likewise.
1927 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
1928 disk->id as in disk/host.c, not a multi-character constant.
1929
828a2768 1930 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
1931 later is obsolete, potentially dangerous and sets a bad example.
1932 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
1933 * util/misc.c (grub_util_get_image_size): Likewise.
1934
2bb4fb47 1935 * disk/loopback.c (options): Improve help for "--partitions".
1936
0f582c6b 1937 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
1938 options to align them with the short options, e.g. "echo -e".
1939
a33224e0 19402008-03-31 Bean <bean123ch@gmail.com>
1941
1942 * video/reader/png.c (grub_png_data): New member is_16bit and
1943 image_data.
1944 (grub_png_decode_image_header): Detect 16 bit png image.
1945 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
1946 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
1947 (grub_video_reader_png): Release memory occupied by image_data.
1948
1949 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
1950 4096 bytes.
1951 (grub_nfs_mount): Skip the test for sector per cluster.
1952
1953 * include/grub/ntfs.h (MAX_SPC): Removed.
1954
86cb4f54 19552008-03-31 Bean <bean123ch@gmail.com>
1956
1957 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
1958 (grub_probe_SOURCES): Add fs/afs.c.
1959 (grub_fstest_SOURCES): Likewise.
1960 (afs_mod_SOURCES): New variable.
1961 (afs_mod_CFLAGS): Likewise.
1962 (afs_mod_LDFLAGS): Likewise.
1963
1964 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
1965 (grub_emu_SOURCES): Likewise.
1966
1967 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1968
1969 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1970
1971 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1972
1973 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1974
1975 * fs/afs.c: New file.
1976
17c74c21 19772008-03-30 Pavel Roskin <proski@gnu.org>
1978
4cb68e89 1979 * disk/host.c: Include grub/misc.h to fix a warning.
1980 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
1981 warnings about implicit declarations.
1982
8790bb04 1983 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
1984 variable.
1985 * include/grub/i386/loader.h: Change declaration of
1986 grub_linux_boot() to match what grub_loader_set() expects.
1987 * util/getroot.c (grub_guess_root_device): Return const char* to
1988 fix a warning.
1989 * util/grub-probe.c (probe): Fix a warning about uninitialized
1990 abstraction_name variable.
1991 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
1992 second argument as unused to fix a warning.
1993
9a3f3296 1994 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
1995 missing grub_error() call.
1996
0ecef90d 1997 * util/update-grub_lib.in: Define datarootdir, since Autoconf
1998 2.60 and newer uses it to define datadir.
1999
0bf6d401 2000 * commands/sleep.c: Fix warning about implicit declaration.
2001 * disk/memdisk.c: Likewise.
2002 * loader/aout.c: Likewise.
2003 * loader/i386/bsd_normal.c: Likewise.
2004 * util/grub-probe.c: Likewise.
2005
7cdacf97 2006 * commands/i386/cpuid.c (has_longmode): Make static.
2007 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
2008 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
2009
17c74c21 2010 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
2011 GDT. This is more robust, as %ds can change.
2012 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
2013 calling real_to_prot().
2014 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
2015
80a3e68b 20162008-03-28 Pavel Roskin <proski@gnu.org>
2017
2018 * kern/i386/pc/startup.S: Assert that uncompressed functions
2019 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
2020 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
2021 code, as they push parts of the code (error handlers) beyond
2022 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
2023 code as correctness and size.
2024
77bcd272 20252008-03-28 Pavel Roskin <proski@gnu.org>
2026
2027 * kern/i386/pc/startup.S
2028 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
2029 data block address to the real mode, keep offset minimal. This
2030 works around a bug in AWARD BIOS on old Athlon systems, which
2031 makes CD detection hang.
2032
c5dfd43b 20332008-03-26 Pavel Roskin <proski@gnu.org>
2034
2035 * normal/color.c (grub_parse_color_name_pair): Make `name' a
2036 const.
2037 * include/grub/normal.h: Add grub_parse_color_name_pair()
2038 declaration.
2039
bf962df2 20402008-03-24 Bean <bean123ch@gmail.com>
2041
2042 * disk/i386/pc/biosdisk.c (cd_start): Removed.
2043 (cd_count): Removed.
2044 (cd_drive): New variable.
2045 (grub_biosdisk_get_drive): Don't check for (cdN) device.
2046 (grub_biosdisk_call_hook): Likewise.
2047 (grub_biosdisk_iterate): Change cdrom detection method.
2048 (grub_biosdisk_open): Replace cd_start with cd_drive.
2049 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
2050 detect cdrom device.
2051
2052 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
2053 Removed.
2054 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
2055 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
2056 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
2057 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
2058 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
2059 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
2060 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
2061 (grub_biosdisk_cdrp): New structure.
2062 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
2063
2064 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
2065
2066 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
2067 device.
2068
2069 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
2070 New function.
2071
68e7fc7a 20722008-03-20 Robert Millan <rmh@aybabtu.com>
2073
2074 Remove 2 TiB limit in ata.mod.
2075 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
2076 (grub_ata_dumpinfo): Print sector count with 0x%llx.
2077 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
2078 grub_uint64_t instead of grub_uint32_t.
2079
38ad2cf5 20802008-03-05 Bean <bean123ch@gmail.com>
2081
2082 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
2083 (grub_multiboot): Set boot device.
2084
2085 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
2086
2b89344e 20872008-03-02 Bean <bean123ch@gmail.com>
2088
2089 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
2090 symlink_buffer.
2091
87a95d1f 20922008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
2093
2094 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
2095 texinfo.tex.
2096
2097 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
2098 modified.
2099
2100 * docs/fdl.texi: New file.
f19dbdb7 2101
87a95d1f 2102 * docs/mdate-sh: New file. Copied from gnulib.
2103 * docs/texinfo.tex: Likewise.
2104
2105 * config.guess: Updated from gnulib.
2106 * install-sh: Likewise.
2107
7dc15d8e 21082008-02-28 Robert Millan <rmh@aybabtu.com>
2109
2110 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
2111 (aout_mod_SOURCES): New variable.
2112 (aout_mod_CFLAGS): Likewise.
2113 (aout_mod_LDFLAGS): Likewise.
2114
2115 * conf/i386-ieee1275.rmk: Likewise.
2116
b00ab696 21172008-02-28 Robert Millan <rmh@aybabtu.com>
2118
2119 * util/update-grub.in: Reorganise terminal validity check. Accept
2120 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
2121 Based on suggestion by Franklin PIAT.
2122
79ca2d78 21232008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
2124
2125 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
2126 function.
2127 * util/getroot.c (grub_util_check_block_device): New function that
2128 returns the given argument if it is a block device and returns NULL else.
2129 * util/grub-probe.c (argument_is_device): New variable.
2130 (probe): Promote device_name from a variable to an argument. Receive
2131 device_name from grub_util_check_block_device() if path is NULL and from
2132 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 2133 (options): Introduce new parameter '-d, --device'.
79ca2d78 2134 (main): Add description of the new parameter to the help screen.
2135 Rename path variable to argument. Set argument_is_device if the '-d'
2136 option is given. Pass argument to probe() depending on
2137 argument_is_device.
2138
0d16e571 21392008-02-24 Bean <bean123ch@gmail.com>
2140
2141 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
2142 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
2143 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
2144 (GRUB_ISO9660_VOLDESC_PART): Likewise.
2145 (GRUB_ISO9660_VOLDESC_END): Likewise.
2146 (grub_iso9660_primary_voldesc): New member escape.
2147 (grub_iso9660_data): New member joliet.
2148 (grub_iso9660_convert_string): New function.
2149 (grub_iso9660_mount): Detect joliet extension.
2150 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
2151 (grub_iso9660_iso9660_label): Likewise.
2152
2153 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
2154 (grub_setup_SOURCES): Add fs/udf.c.
2155 (grub_fstest_SOURCES): Likewise.
2156 (udf_mod_SOURCES): New variable.
2157 (udf_mod_CFLAGS): Likewise.
2158 (udf_mod_LDFLAGS): Likewise.
2159
2160 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
2161 (grub_emu_SOURCES): Likewise.
2162
2163 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2164
2165 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2166
2167 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2168
2169 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2170
2171 * fs/udf.c: New file.
2172
8a594a17 21732008-02-24 Robert Millan <rmh@aybabtu.com>
2174
2175 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
2176 (normal/lexer.c_DEPENDENCIES): New variables.
2177 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2178 (normal/lexer.c_DEPENDENCIES): Likewise.
2179 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
2180 (normal/lexer.c_DEPENDENCIES): Likewise.
2181 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
2182 (normal/lexer.c_DEPENDENCIES): Likewise.
2183 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2184 (normal/lexer.c_DEPENDENCIES): Likewise.
2185 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
2186 (normal/lexer.c_DEPENDENCIES): Likewise.
2187
2dc33c03 21882008-02-23 Robert Millan <rmh@aybabtu.com>
2189
2190 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
2191 since they were intended to be in hex. This didn't break previously
2192 because of a bug in gpt_partition_map_iterate() (see below).
2193
2194 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
2195 when checking the validity of GPT header.
2196 Remove `partno', since it always provides the same information as `i'.
2197
f6f4cfb0 21982008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
2199
2200 * include/grub/efi/time.h: Fix a wrong comment.
2201
79ff665f 22022008-02-19 Pavel Roskin <proski@gnu.org>
2203
2204 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
2205 message.
2206
d38e24c2 22072008-02-19 Bean <bean123ch@gmail.com>
2208
2209 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
2210 (aout_mod_SOURCES): New variable.
2211 (aout_mod_CFLAGS): Likewise.
2212 (aout_mod_LDFLAGS): Likewise.
2213 (_bsd_mod_SOURCES): New variable.
2214 (_bsd_mod_CFLAGS): Likewise.
2215 (_bsd_mod_LDFLAGS): Likewise.
2216 (bsd_mod_SOURCES): New variable.
2217 (bsd_mod_CFLAGS): Likewise.
2218 (bsd_mod_LDFLAGS): Likewise.
2219
2220 * include/grub/aout.h: New file.
2221
2222 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
2223
2224 * include/grub/i386/bsd.h: New file.
2225
2226 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
2227 to make it public.
2228
2229 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
2230 function is called, so that it's possible to change it inside the hook.
2231 (grub_elf64_load): Likewise.
2232 (grub_elf_file): Don't close the file if elf header is not found.
2233 (grub_elf_close): Close the file if grub_elf_file fails (The new
2234 grub_elf_file won't close it).
2235 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
2236 (grub_elf64_size): Likewise.
2237
2238 * kern/i386/loader.S (grub_unix_real_boot): New function.
2239
2240 * loader/aout.c: New file.
2241
2242 * loader/i386/bsd.c: New file.
2243
2244 * loader/i386/bsd_normal.c: New file.
2245
2246 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
2247
2248 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 2249 can test other formats.
d38e24c2 2250
b93bdb0f 22512008-02-19 Robert Millan <rmh@aybabtu.com>
2252
2253 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
2254 (grub_gpt_partition_type_empty): Redefine with macro from
2255 `<grub/gpt_partition.h>'.
2256 (gpt_partition_map_iterate): Adjust partition type comparison.
2257
2258 Export `entry' as partmap-specific `part.data' struct.
2259 (grub_gpt_header, grub_gpt_partentry): Move from here ...
2260
2261 * include/grub/gpt_partition.h (grub_gpt_header)
2262 (grub_gpt_partentry): ... to here (new file).
2263
2264 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
2265
2266 (grub_gpt_partition_type_bios_boot): New const variable, defined
2267 with macro from `<grub/gpt_partition.h>'.
2268
2269 (setup): Replace `first_start' with `embed_region', which keeps
2270 track of the embed region (and is partmap-agnostic).
2271
2272 Replace find_first_partition_start() with find_usable_region(),
2273 which finds a usable region for embedding using partmap-specific
2274 knowledge (supports PC/MSDOS and GPT).
2275
2276 Fix all assumptions that the embed region start at sector 1, using
2277 `embed_region.start' from now on. Similarly, use `embed_region.end'
2278 rather than `first_start' to calculate available size.
2279
2280 In grub_util_info() message, replace "into after the MBR" with an
2281 indication of the specific sector our embed region starts at.
2282
66cb40f6 22832008-02-19 Robert Millan <rmh@aybabtu.com>
2284
2285 * DISTLIST: Replace `commands/ieee1275/halt.c' and
2286 `commands/ieee1275/reboot.c' with `commands/halt.c' and
2287 `commands/reboot.c'.
2288 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2289 (halt_mod_SOURCES): Likewise.
2290 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
2291 (halt_mod_SOURCES): Likewise.
2292
b7202015 22932008-02-17 Christian Franke <franke@computer.org>
2294
2295 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
2296
32b0fc49 22972008-02-17 Robert Millan <rmh@aybabtu.com>
2298
2299 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2300 set `first_start' to 0 for non-PC/MSDOS partition maps.
2301
aca63502 23022008-02-16 Robert Millan <rmh@aybabtu.com>
2303
2304 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
2305 do not assume partition map is PC/MSDOS before performing checks that
2306 are specific to that layout.
2307
0de8be86 23082008-02-13 Robert Millan <rmh@aybabtu.com>
2309
2310 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
2311 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
2312 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
2313
c3db8364 23142008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
2315
2316 * configure.ac: Only a cosmetic change on the handling of
2317 -fno-stack-protector.
2318
f714229e 23192008-02-12 Alexandre Boeglin <alex@boeglin.org>
2320
c3db8364 2321 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
2322 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
2323 reboot.c.
f714229e 2324 (grub_install_SOURCES): Add halt.mod and reboot.mod.
2325 (halt_mod_SOURCES): New variable.
2326 (halt_mod_CFLAGS): Likewise.
2327 (halt_mod_LDFLAGS): Likewise.
2328 (reboot_mod_SOURCES): Likewise.
2329 (reboot_mod_CFLAGS): Likewise.
2330 (reboot_mod_LDFLAGS): Likewise.
2331
c3db8364 2332 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
2333 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
2334 reboot.c.
f714229e 2335 (halt_mod_SOURCES): Likewise.
2336 (reboot_mod_SOURCES): Likewise.
2337
c3db8364 2338 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
2339 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 2340 (reboot_mod_SOURCES): Likewise.
2341
2342 * commands/i386/pc/reboot.c: merge this file ...
2343
2344 * commands/ieee1275/reboot.c: ... and this file ...
2345
2346 * commands/reboot.c: ... to this file.
c3db8364 2347 Add some precompiler directive to include the correct header for
2348 each machine.
f714229e 2349
2350 * commands/ieee1275/halt.c: move this file ...
2351
2352 * commands/halt.c: ... to here.
c3db8364 2353 Add some precompiler directive to include the correct header for
2354 each machine.
f714229e 2355
2356 * include/grub/efi/efi.h (grub_reboot): New function declaration.
2357 (grub_halt): Likewise.
2358
2359 * kern/efi/efi.c (grub_reboot): New function.
2360 (grub_halt): Likewise.
2361
c74493e0 23622008-02-12 Robert Millan <rmh@aybabtu.com>
2363
2364 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
2365 /dev (like it is done for /dev/mapper). This doesn't provide support
2366 for EVMS, but at least it is now easy to identify the problem when it
2367 arises.
2368
d0db4b04 23692008-02-11 Robert Millan <rmh@aybabtu.com>
2370
2371 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
2372 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
2373 comparing it with -1, not 0.
2374
bf748642 23752008-02-10 Robert Millan <rmh@aybabtu.com>
2376
2377 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
2378 `disk/lvm.c'.
2379 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2380 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
2381
2382 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
2383 `disk/lvm.c' to the end of the list.
2384 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2385 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2386
b5db202a 23872008-02-10 Robert Millan <rmh@aybabtu.com>
2388
2389 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
2390 grub_print_error() instead. This will let user know why we're entering
2391 rescue mode.
2392 Based on suggestions from Sam Morris.
2393
83abee31 23942008-02-10 Alexandre Boeglin <alex@boeglin.org>
2395
2396 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
2397 on remaining N args, instead of "--" arg N times.
2398
78d5a08b 23992008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
2400
2401 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
2402 (fill_with_default_glyph): Changed to use unknown_glyph for fill
2403 pattern for unknown glyphs.
2404
68807e5f 24052008-02-09 Robert Millan <rmh@aybabtu.com>
2406
2407 * configure.ac: Probe for `help2man'.
2408 * Makefile.in (builddir): New variable.
2409 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
2410 or otherwise add a few flags/options to it.
2411 (install-local): For every executable utility or script that is
2412 installed, invoke $(HELP2MAN) to install a manpage based on --help
2413 output.
2414
2415 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
2416 that it doesn't prevent --help from working in build tree.
2417
2418 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
2419 with `bug-grub@gnu.org'.
2420 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
2421 * util/update-grub.in (usage): New function.
2422 Implement proper argument check, with support for --help and --version
2423 (as well as existing -y).
2424
24252008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 2426
2427 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
2428 avoid overwriting previous output.
2429 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
2430
c1962162 24312008-02-09 Robert Millan <rmh@aybabtu.com>
2432
2433 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
2434 drawing the menu.
2435
3dac2e3f 24362008-02-09 Robert Millan <rmh@aybabtu.com>
2437
2438 * commands/sleep.c: New file.
2439 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
2440 (sleep_mod_SOURCES): New variable.
2441 (sleep_mod_CFLAGS): Likewise.
2442 (sleep_mod_LDFLAGS): Likewise.
2443
7a634e08 24442008-02-09 Robert Millan <rmh@aybabtu.com>
2445
2446 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
2447 situations in which we can deduce the RAID size and the superblock
2448 doesn't match it.
2449
b92f0c18 24502008-02-09 Robert Millan <rmh@aybabtu.com>
2451
2452 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
2453 and return a grub_diskmemberlist_t composed of LVM physical volumes.
2454 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
2455
2456 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
2457 and return a grub_diskmemberlist_t composed of physical array members.
2458 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
2459
2460 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
2461 prototype.
2462 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
2463 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
2464 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
2465
2466 * util/grub-probe.c (probe): Move partmap probing code from here ...
2467 (probe_partmap): ... to here.
2468 (probe): Use probe_partmap() once for the disk we're probing, and
2469 additionally, when such disk contains a memberlist() struct member,
2470 once for each disk that is contained in the structure returned by
2471 memberlist().
2472
91a4bf68 24732008-02-09 Robert Millan <rmh@aybabtu.com>
2474
2475 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
2476 environment variable to 'all' in order to obtain debug output from
2477 non-util/ code.
2478 * util/i386/pc/grub-setup.c (main): Likewise.
2479
a96f9caa 24802008-02-08 Robert Millan <rmh@aybabtu.com>
2481
2482 * disk/raid.c (grub_raid_scan_device): Check for
2483 `array->device[sb.this_disk.number]' rather than for
2484 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 2485 guaranteed to be accessible.
a96f9caa 2486
b37a9222 24872008-02-08 Robert Millan <rmh@aybabtu.com>
2488
2489 * disk/raid.c: Update copyright.
2490 * fs/cpio.c: Likewise.
2491 * include/grub/raid.h: Likewise.
2492 * loader/i386/pc/multiboot.c: Likewise.
2493 * util/hostfs.c: Likewise.
2494
5626aee1 24952008-02-08 Robert Millan <rmh@aybabtu.com>
2496
2497 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
2498 to a grub_disk_t array.
2499 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
2500 `device[x]'.
2501 (grub_raid_scan_device): Replace `device[x].name' accesses with
2502 `device[x]->name'. Simplify initialization of `array->device[x]'.
2503
554f0187 25042008-02-08 Robert Millan <rmh@aybabtu.com>
2505
2506 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
2507 grub_dprintf() calls.
2508 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
2509 error message.
2510
1ec8425d 25112008-02-07 Christian Franke <franke@computer.org>
2512
2513 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
2514 instead of fseek and ftell to support large files.
2515 (grub_hostfs_read): Likewise.
2516
f2156fda 25172008-02-07 Robert Millan <rmh@aybabtu.com>
2518
2519 Patch from Jeroen Dekkers.
2520 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 2521 failure, since successfully reading all array members might not be
f2156fda 2522 required.
2523
9216e0e7 25242008-02-06 Robert Millan <rmh@aybabtu.com>
2525
2526 * util/grub-probe.c (probe): Simplify partmap probing (with the
2527 assumption that the first word up to the underscore equals to
2528 the module name).
2529
b0dfd29a 25302008-02-06 Christian Franke <franke@computer.org>
2531
2532 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
2533 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
2534 last block of a cpio or tar stream.
2535 Check for "TRAILER!!!" instead of any empty data
2536 block to detect last block of a cpio stream.
2537 (grub_cpio_dir): Fix constness of variable np.
2538 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
2539 cpio or tar trailer is detected. This fixes a crash
2540 on open of a non existing file.
2541
c32865bf 25422008-02-05 Bean <bean123ch@gmail.com>
2543
2544 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
2545 address of entry.
2546 (grub_multiboot_load_elf64): Likewise.
2547 (grub_multiboot): Initialize mbi structure.
2548
2549 * util/grub-fstest.c: Don't include unused header file script.h.
2550
fe6b695a 2551 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 2552 of file.
2553 (grub_fstest_SOURCES): Likewise.
2554
409480b7 25552008-02-05 Robert Millan <rmh@aybabtu.com>
2556
2557 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
2558 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
2559 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
2560 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
2561
2562 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
2563 (translation_table): Replace hardcoded values with macros
2564 provided by `<grub/term.h>'.
2565
2566 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
2567 (keyboard_map): Correct/add a few values, with macros provided
2568 by `<grub/term.h>'.
2569 (keyboard_map_shift): Zero values that don't differ from their
2570 `keyboard_map' equivalents.
2571 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
2572 Discard the second scan code that is always sent by Caps lock.
2573 Only use `keyboard_map_shift' when it provides a non-zero value,
2574 otherwise fallback to `keyboard_map'.
2575
99fadbaa 25762008-02-04 Bean <bean123ch@gmail.com>
2577
2578 * Makefile.in (enable_grub_fstest): New variable.
2579
2580 * conf/common.rmk (grub_fstest_init.lst): New rule.
2581 (grub_fstest_init.h): Likewise.
2582 (grub_fstest_init.c): Likewise.
2583 (util/grub-fstest.c_DEPENDENCIES): New variable.
2584 (grub_fstest_SOURCES): Likewise.
2585
2586 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
2587
2588 * util/grub-fstest.c: New file.
2589
bf567c50 25902008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2591
2592 Make grub-setup handle a separate root device.
f19dbdb7 2593
bf567c50 2594 * util/i386/pc/grub-setup.c (setup): Always open the root device,
2595 so that the root device can be compared with the destination
2596 device.
2597 When embedding the core image, if the root and destination devices
2598 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
2599 0xFF.
2600 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 2601
9be6b98b 26022008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2603
2604 Add support for having a grub directory in a different drive. This
2605 is still only the data handling part.
f19dbdb7 2606
9be6b98b 2607 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
2608 (codestart): Save %dh in GRUB_ROOT_DRIVE.
2609 (grub_root_drive): New variable.
2610
2611 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
2612 instead of GRUB_BOOT_DRIVE to construct a device name. Set
2613 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
2614 as it was.
2615
2616 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
2617
2618 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
2619 macro.
2620 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
2621
2622 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
2623 is bogus, because PXE booting does not specify any drive
2624 correctly.
2625
2626 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
2627 am not sure if this is really correct.
2628
2629 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
2630 is always identical to the boot drive when booting from a CD.
2631
2632 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
2633 longer.
2634 (root_drive): New variable.
2635 (real_start): Unconditionally set %dh to ROOT_DRIVE.
2636 (setup_sectors): Push %dx right after popping it, because %dh will
2637 be modified later.
2638 (copy_buffer): Restore %dx.
2639
e0ca0677 26402008-02-03 Robert Millan <rmh@aybabtu.com>
2641
2642 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
2643 use `cdboot.img' for cdrom images.
2644
3b3f6629 26452008-02-03 Robert Millan <rmh@aybabtu.com>
2646
2647 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
2648 only setup gfxterm when `font' command has succeeded.
2649
d42b3672 26502008-02-03 Robert Millan <rmh@aybabtu.com>
2651
2652 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
2653 (grub_rescue_cmd_multiboot_loader)
2654 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
2655
fa370ea6 26562008-02-03 Pavel Roskin <proski@gnu.org>
2657
e0c5dacb 2658 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 2659 %edx and %esi from stack only after grub_gate_a20() is called.
2660 grub_gate_a20() clobbers %edx.
2661
f2a76e1d 26622008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
2663
2664 * configure.ac (AC_INIT): Bumped to 1.96.
2665
2666 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
2667 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
2668 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
2669 video/readers/png.c.
2670
90fd32d1 26712008-02-03 Bean <bean123ch@gmail.com>
9be665dd 2672
2673 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
2674 (cdboot_img_SOURCES): New variable.
2675 (cdboot_img_ASFLAGS): New variable.
2676 (cdboot_img_LDFLAGS): New variable.
2677
2678 * boot/i386/pc/cdboot.S: New file.
2679
2680 * disk/i386/pc/biosdisk.c (cd_start): New variable.
2681 (cd_count): Likewise.
2682 (grub_biosdisk_get_drive): Add support for cd device.
2683 (grub_biosdisk_call_hook): Likewise.
2684 (grub_biosdisk_iterate): Likewise.
2685 (grub_biosdisk_open): Likewise.
2686 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
2687 (grub_biosdisk_rw): Support reading from cd device.
2688 (GRUB_MOD_INIT): Iterate cd devices.
2689
2690 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
2691 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
2692 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
2693
2694 * kern/i386/pc/init.c (make_install_device): Check for cd device.
2695
4020aa53 26962008-02-02 Robert Millan <rmh@aybabtu.com>
2697
2698 * commands/read.c: New file.
2699 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
2700 (read_mod_SOURCES): New variable.
2701 (read_mod_CFLAGS): Likewise.
2702 (read_mod_LDFLAGS): Likewise.
2703
e03a1132 27042008-02-02 Robert Millan <rmh@aybabtu.com>
2705
2706 * normal/main.c (grub_normal_execute): Check for `menu->size' when
2707 determining whether menu has to be displayed.
2708
58c69220 27092008-02-02 Marco Gerards <marco@gnu.org>
2710
2711 * bus/pci.c: New file.
2712
2713 * include/grub/pci.h: Likewise.
2714
2715 * include/grub/i386/pc/pci.h: Likewise.
2716
2717 * commands/lspci.c: Likewise.
2718
2719 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
2720 `lspci.mod'.
2721 (pci_mod_SOURCES): New variable.
2722 (pci_mod_CFLAGS): Likewise.
2723 (pci_mod_LDFLAGS): Likewise.
2724 (lspci_mod_SOURCES): Likewise.
2725 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 2726 (lspci_mod_LDFLAGS): Likewise.
58c69220 2727
c004e1b4 27282008-02-02 Bean <bean123ch@gmail.com>
2729
2730 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
2731 (grub_ufs_get_file_block): Fix indirect block calculation problem.
2732
2733 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
2734 (grub_xfs_btree_node): New structure.
2735 (grub_xfs_btree_root): New structure.
2736 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
2737 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
2738 (GRUB_XFS_EXTENT_BLOCK): Likewise.
2739 (GRUB_XFS_EXTENT_SIZE): Likewise.
2740 (grub_xfs_read_block): Support btree format type.
2741 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
2742 Use directory block as basic unit.
2743
2744 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
2745
2746 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
2747 __attribute__ ((__regparm__ (1))).
2748
f95562bf 27492008-02-01 Robert Millan <rmh@aybabtu.com>
2750
2751 Correct a mistake in previous commit.
2752
2753 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
2754 top.
2755 (normal/command.c_DEPENDENCIES): New variable.
2756
7d31f41f 27572008-02-01 Robert Millan <rmh@aybabtu.com>
2758
2759 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
2760 top.
2761 (normal/command.c_DEPENDENCIES): New variable.
2762 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
2763 * conf/i386-ieee1275.rmk: Likewise.
2764 * conf/i386-linuxbios.rmk: Likewise.
2765 * conf/i386-pc.rmk: Likewise.
2766 * conf/sparc64-ieee1275.rmk: Likewise.
2767 * conf/powerpc-ieee1275.rmk: Likewise.
2768 (grub_emu_SOURCES): Add `fs/fshelp.c'.
2769
2770 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
2771
60b6be74 27722008-02-01 Robert Millan <rmh@aybabtu.com>
2773
2774 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
2775 call at beginning of function.
2776
078522ab 27772008-01-31 Pavel Roskin <proski@gnu.org>
2778
2779 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 2780 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
2781 (grub_mkrescue_SOURCES): Likewise.
078522ab 2782 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
2783
ccaa8a5f 27842008-01-30 Robert Millan <rmh@aybabtu.com>
2785
2786 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
2787 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
2788 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
2789 (grub_probe_SOURCES): ... to here.
2790
2791 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
2792 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
2793 * conf/i386-ieee1275.rmk: Likewise.
2794 * conf/i386-linuxbios.rmk: Likewise.
2795 * conf/powerpc-ieee1275.rmk: Likewise.
2796
ae5a9cd7 27972008-01-30 Tristan Gingold <gingold@free.fr>
2798
2799 * kern/rescue.c: Silently accept empty lines.
2800
70bc2ef2 28012008-01-29 Bean <bean123ch@gmail.com>
2802
2803 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
2804 (real_code_2): Code cleanup and change comment style.
2805 (move_memory): Avoid using 32-bit address mode.
2806
6a4d50ea 28072008-01-29 Bean <bean123ch@gmail.com>
2808
2809 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
2810 (png_mod_SOURCES): New variable.
2811 (png_mod_CFLAGS): Likewise.
2812 (png_mod_LDFLAGS): Likewise.
2813
2814 * video/readers/png.c: New file.
2815
11cc30ac 28162008-01-28 Robert Millan <rmh@aybabtu.com>
2817
2818 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
2819 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
2820 `ifndef GRUB_MOD_GAP' hack.
2821 * util/elf/grub-mkimage.c (add_segments): Likewise.
2822
3abc589f 28232008-01-27 Robert Millan <rmh@aybabtu.com>
2824
2825 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
2826 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 2827 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 2828
e1907778 28292008-01-27 Robert Millan <rmh@aybabtu.com>
2830
2831 Get grub-emu to build again (including parallel builds).
2832
2833 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
2834 Split into ...
2835 (util/grub-emu.c_DEPENDENCIES): ... this, ...
2836 (normal/execute.c_DEPENDENCIES): ... this, ...
2837 (grub-emu_DEPENDENCIES): ... and this.
2838
2839 * conf/i386-efi.rmk: Likewise.
2840 * conf/i386-linuxbios.rmk: Likewise.
2841 * conf/i386-ieee1275.rmk: Likewise.
2842 * conf/powerpc-ieee1275.rmk: Likewise.
2843 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
2844
2216b101 28452008-01-27 Robert Millan <rmh@aybabtu.com>
2846
2847 * NEWS: Add a few items.
2848
f75172d9 28492008-01-27 Robert Millan <rmh@aybabtu.com>
2850
2851 Fix parallel builds with grub-emu. Based on earlier commit for
2852 grub-probe and grub-setup.
2853
2854 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2855 (util/grub-emu.c_DEPENDENCIES): ... this.
2856 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2857 (util/grub-emu.c_DEPENDENCIES): ... this.
2858 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2859 (util/grub-emu.c_DEPENDENCIES): ... this.
2860 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2861 (util/grub-emu.c_DEPENDENCIES): ... this.
2862 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
2863 (util/grub-emu.c_DEPENDENCIES): ... this.
2864
3f51de77 28652008-01-27 Pavel Roskin <proski@gnu.org>
2866
2867 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
2868 to create a gap between _end and the modules added to the image
2869 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
2870 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
2871 * util/elf/grub-mkimage.c (add_segments): Likewise.
2872
2033f53e 28732008-01-26 Pavel Roskin <proski@gnu.org>
2874
2875 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
2876 just return an error.
2877
22da1f6f 28782008-01-26 Bean <bean123ch@gmail.com>
2879
2880 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
2881 (grub_reiserfs_get_item): Save offset of the next item.
2882 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
2883
2a9525e6 28842008-01-25 Robert Millan <rmh@aybabtu.com>
2885
2886 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
2887 make all filesystem sources appear together (possibly fixing omissions
2888 while at it).
2889 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2890 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2891 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2892 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2893
2894 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
2895 add `kern/file.c'.
2896 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
2897 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2898 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
2899 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
2900
2901 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
2902 (probe): Add a sanity check to make sure of our ability to read
2903 requested files when probing for filesystem type.
2904
2905 * genmk.rb: Update copyright year (2007).
2906
2907 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
2908 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
2909 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
2910 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
2911 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
2912 : Remove function prototypes.
2913
b95f71b5 29142008-01-25 Robert Millan <rmh@aybabtu.com>
2915
2916 Revert my previous commits (based on wrong assumption of how grub_errno
2917 works).
2918
fe6b695a 2919 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 2920 * kern/file.c (grub_file_open): Likewise.
2921
d08bbb49 29222008-01-24 Pavel Roskin <proski@gnu.org>
2923
2924 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
2925 that hang if GRUB tries to setup colors.
2926 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
2927 colors for firmwares that don't support it.
2928 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
2929 Recognize Open Hack'Ware, set flags to work around its
2930 limitations.
2931
605e36ed 29322008-01-24 Robert Millan <rmh@aybabtu.com>
2933
2934 * kern/file.c (grub_file_open): Do not account previous failures of
2935 unrelated functions when grub_errno is checked for.
2936 Reported by Oleg Strikov.
2937
bac332a1 29382008-01-24 Bean <bean123ch@gmail.com>
2939
2940 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
2941 (grub_ufs_sblock): New member volume name.
2942 (grub_ufs_find_file): Fix string copy bug.
2943 (grub_ufs_label): Implement this function properly.
2944
2945 * fs/hfs.c (grub_hfs_cnid_type): New enum.
2946 (grub_hfs_iterate_records): Use the correct file number for extents
2947 and catalog file. Fix problem in next index calculation.
2948 (grub_hfs_find_node): Replace recursive function call with loop.
2949 (grub_hfs_iterate_dir): Replace recursive function call with loop.
2950
15c80c09 29512008-01-23 Robert Millan <rmh@aybabtu.com>
2952
2953 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
2954 `<grub/symbol.h>' and `<grub/multiboot.h>'.
2955 (grub_multiboot2_real_boot): New function prototype.
2956
2957 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
2958 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
2959
2960 * kern/i386/ieee1275/init.c (grub_os_area_addr)
2961 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
2962
305338fd 29632008-01-23 Robert Millan <rmh@aybabtu.com>
2964
2965 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
2966 #ifdef'ed out grub_printf().
2967
3ea52685 29682008-01-23 Robert Millan <rmh@aybabtu.com>
2969
2970 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
2971 grub_dprintf calls, since they make "debug=all" mode unusable.
2972 (grub_console_checkkey): Likewise.
2973
5882ae4b 29742008-01-23 Robert Millan <rmh@aybabtu.com>
2975
2976 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2977 `term/i386/pc/at_keyboard.c'.
2978 (pkglib_MODULES): Add `serial.mod'.
2979 (serial_mod_SOURCES): New variable.
2980 (serial_mod_CFLAGS): Likewise.
2981 (serial_mod_LDFLAGS): Likewise.
2982
2983 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
2984 `<grub/powerpc/ieee1275/console.h>'.
2985 (grub_keyboard_controller_init): New function prototype.
2986 (grub_console_checkkey): Likewise.
2987 (grub_console_getkey): Likewise.
2988
2989 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
2990 keyboard on i386.
2991
2992 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
2993 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
2994
06ab5303 29952008-01-23 Robert Millan <rmh@aybabtu.com>
2996
2997 * kern/i386/pc/init.c (make_install_device): When memdisk image is
2998 present, "(memdisk)/boot/grub" becomes the default prefix.
2999
3000 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
3001 a memdisk tarball with all the modules. Add --overlay=DIR option that
3002 allows users to overlay additional files into the image.
3003
dbb475a4 30042008-01-23 Robert Millan <rmh@aybabtu.com>
3005
3006 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
3007 and `machine/memory.h'.
3008 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
3009 (_multiboot_mod_SOURCES): New variable.
3010 (_multiboot_mod_CFLAGS): Likewise.
3011 (_multiboot_mod_LDFLAGS): Likewise.
3012 (multiboot_mod_SOURCES): Likewise.
3013 (multiboot_mod_CFLAGS): Likewise.
3014 (multiboot_mod_LDFLAGS): Likewise.
3015
3016 * include/grub/i386/ieee1275/loader.h: New file.
3017
3018 * include/grub/i386/ieee1275/machine.h: Likewise.
3019
3020 * include/grub/i386/ieee1275/memory.h: Likewise.
3021
3022 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
3023 variable declaration.
3024 (grub_os_area_size): Likewise.
3025
3026 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
3027 (grub_lower_mem, grub_upper_mem): New variables.
3028 (grub_stop_floppy): New function (just to make
3029 grub_multiboot2_real_boot() happy).
3030
3031 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
3032 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
3033 (grub_stop): New function.
3034 Include `"../realmode.S"' and `"../loader.S"'.
3035
3036 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
3037 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
3038
3039 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
3040 rely on grub_multiboot2_real_boot() for final boot.
3041
25638629 30422008-01-22 Robert Millan <rmh@aybabtu.com>
3043
3044 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
3045 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
3046 device that doesn't look like an SD card.
3047 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3048 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
3049 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
3050 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
3051 found.
3052
9dad816d 30532008-01-22 Robert Millan <rmh@aybabtu.com>
3054
3055 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
3056 avoid claiming over our own code.
3057
34842f2d 30582008-01-22 Bean <bean123ch@gmail.com>
3059
3060 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
3061 (jpeg_mod_SOURCES): New variable.
3062 (jpeg_mod_CFLAGS): Likewise.
3063 (jpeg_mod_LDFLAGS): Likewise.
3064
3065 * video/readers/jpeg.c : New file.
3066
44023a28 30672008-01-22 Bean <bean123ch@gmail.com>
3068
3069 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
3070 there are no more items.
3071
bc2d8ac6 30722008-01-21 Robert Millan <rmh@aybabtu.com>
3073
3074 * kern/mm.c (grub_mm_init_region): Improve debug message.
3075
261bd4bc 30762008-01-21 Robert Millan <rmh@aybabtu.com>
3077
3078 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
3079 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
3080 address.
3081 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
3082 a C macro.
3083 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
3084 Indicates start of upper memory.
3085 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
3086 (generate_image): Abort when image size is big enough to corrupt
3087 upper memory.
3088
3089 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
3090 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
3091 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3092 instead of hardcoding 0xA0000.
3093 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
3094 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3095 instead of hardcoding 0xA0000.
3096
f970b55e 30972008-01-21 Robert Millan <rmh@aybabtu.com>
3098
3099 * disk/memdisk.c (memdisk_size): New variable.
3100 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
3101 `memdisk_size'.
3102 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
3103 image to dynamic memory.
3104 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
3105 `memdisk_size'. Free memdisk block.
3106
1a8b0526 31072008-01-21 Robert Millan <rmh@aybabtu.com>
3108
3109 Fix detection of very small filesystems (like tar).
3110
3111 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
3112 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
3113 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
3114 a problem with this disk).
3115
6e9b4aab 31162008-01-21 Robert Millan <rmh@aybabtu.com>
3117
3118 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
3119 on grub_biosdisk_rw_standard() error.
3120
0d8837b2 31212008-01-21 Robert Millan <rmh@aybabtu.com>
3122
3123 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
3124 recent changes.
3125 * kern/elf.c: Likewise.
3126 * kern/ieee1275/ieee1275.c: Likewise.
3127 * kern/powerpc/ieee1275/openfw.c: Likewise.
3128 * term/ieee1275/ofconsole.c: Likewise.
3129
ffd36e34 31302008-01-21 Robert Millan <rmh@aybabtu.com>
3131
3132 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
3133
3f0093d0 3134 * include/grub/kernel.h (grub_arch_memdisk_addr)
3135 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 3136
3f0093d0 3137 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
3138 (grub_arch_memdisk_size): ... to here.
ffd36e34 3139
6c391b21 31402008-01-21 Robert Millan <rmh@aybabtu.com>
3141
3142 Mostly based on bugfix from Bean.
3143
3144 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
3145 attribute with hook() parameter.
3146 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
3147 declaration.
3148 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
3149 attribute with hook() parameter.
3150 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
3151 declaration.
3152
55a581dc 31532008-01-21 Robert Millan <rmh@aybabtu.com>
3154
3155 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
3156 (pkglib_MODULES): Add `memdisk.mod'.
3157 (memdisk_mod_SOURCES): New variable.
3158 (memdisk_mod_CFLAGS): Likewise.
3159 (memdisk_mod_LDFLAGS): Likewise.
3160
3161 * disk/memdisk.c: New file.
3162
3163 * include/grub/disk.h (grub_disk_dev_id): Add
3164 `GRUB_DISK_DEVICE_MEMDISK_ID'.
3165
3166 * include/grub/i386/pc/kernel.h
3167 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
3168 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
3169 (grub_kernel_image_size): New variable declaration.
3170 (grub_total_module_size): Likewise.
3171 (grub_memdisk_image_size): Likewise.
3172
3173 * include/grub/i386/pc/memory.h
3174 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
3175
3176 * include/grub/kernel.h: Include `<grub/symbol.h>'.
3177 (grub_arch_memdisk_addr): New variable declaration.
3178 (grub_arch_memdisk_size): Likewise.
3179
3180 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
3181 (grub_arch_memdisk_size): Likewise.
3182
3183 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
3184 (codestart): Replace hardcoded `0x100000' with
3185 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
3186
3187 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
3188 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
3189 not NULL, append the contents of the file it refers to, at the end of
3190 the compressed kernel image. Initialize `grub_memdisk_image_size'
3191 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
3192 (options): Add "memdisk"|'m' option.
3193 (main): Parse --memdisk|-m option, and pass user-provided path as
3194 parameter to generate_image().
3195
3d7f54c9 31962008-01-20 Robert Millan <rmh@aybabtu.com>
3197
3198 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
3199 grub_dprintf() calls from here ...
3200 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
3201
0bf74728 32022008-01-20 Robert Millan <rmh@aybabtu.com>
3203
3204 Fix detection of "real mode" when /options/real-mode? doesn't exist.
3205
3206 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
3207 declaration.
3208 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
3209 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
3210 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 3211 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 3212 property).
3213 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
3214 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
3215
33bf70a7 32162008-01-19 Robert Millan <rmh@aybabtu.com>
3217
fe6b695a 3218 Get rid of confusing function (superseded by
33bf70a7 3219 `grub_ieee1275_get_integer_property')
3220 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
3221 prototype.
3222 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
3223 function.
3224 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
3225 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 3226 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 3227
e2da7d26 32282008-01-19 Robert Millan <rmh@aybabtu.com>
3229
3230 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
3231 command after "shut-down", since implementations differ on which
3232 the command for halt is.
3233
59f1fd8d 32342008-01-19 Robert Millan <rmh@aybabtu.com>
3235
3236 * include/grub/i386/linuxbios/console.h: Add header protection.
3237 (grub_keyboard_controller_init): New function prototype.
3238 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
3239 (KEYBOARD_COMMAND_READ): Likewise.
3240 (KEYBOARD_COMMAND_WRITE): Likewise.
3241 (KEYBOARD_SCANCODE_SET1): Likewise.
3242 (grub_keyboard_controller_write): New function.
3243 (grub_keyboard_controller_read): Likewise.
3244 (grub_keyboard_controller_init): Likewise.
3245
3246 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
3247 (grub_console_init): On coreboot/LinuxBIOS, call
3248 grub_keyboard_controller_init().
3249
5f5a7c15 32502008-01-19 Robert Millan <rmh@aybabtu.com>
3251
3252 PowerPC changes provided by Pavel Roskin.
3253
3254 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
3255 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
3256 don't rely on cmain() doing it.
3257 * kern/i386/ieee1275/startup.S (_start): Store %eax in
3258 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
3259
1210e168 32602008-01-16 Robert Millan <rmh@aybabtu.com>
3261
3262 * include/grub/i386/linuxbios/memory.h
3263 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
3264 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
3265 receive `table_header' as argument. Instead, probe for it in the
3266 known memory ranges where it can be present.
3267 (grub_available_iterate): Do not pass a fixed `table_header' address
3268 to grub_linuxbios_table_iterate().
3269
3d04eab8 32702008-01-15 Robert Millan <rmh@aybabtu.com>
3271
3272 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
3273 * conf/i386-ieee1275.rmk: New file.
3274 * include/grub/i386/ieee1275/console.h: Likewise.
3275 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
3276 * include/grub/i386/ieee1275/kernel.h: Likewise.
3277 * include/grub/i386/ieee1275/time.h: Likewise.
3278 * kern/i386/ieee1275/init.c: Likewise.
3279 * kern/i386/ieee1275/startup.S: Likewise.
3280
d1bc1b73 32812008-01-15 Robert Millan <rmh@aybabtu.com>
3282
3283 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
3284 when pointers are 32-bit (but still do set it to one when they are
3285 64-bit).
3286
66a65807 32872008-01-15 Robert Millan <rmh@aybabtu.com>
3288
3289 * include/grub/ieee1275/ieee1275.h
3290 (grub_ieee1275_get_integer_property): New function prototype.
3291
3292 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
3293 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 3294 grub_ieee1275_get_property() to handle endianness.
66a65807 3295
3296 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
3297 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 3298 where appropriate.
66a65807 3299 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
3300 (grub_map): Likewise.
3301 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
3302
a83ccafd 33032008-01-15 Bean <bean123ch@gmail.com>
3304
3305 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
3306 (grub_script_execute_cmdline): Reset grub_errno.
3307
3308 * normal/main.c (read_config_file): Reset grub_errno.
3309
3310 * normal/parse.y (script_init): New.
3311 (script): Move function and menuentry here.
3312 (delimiter): New.
3313 (command): Add delimiter at the end of command.
3314 (commands): Adjust to match the new command.
3315 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 3316 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 3317 (if): Use the new commands.
3318
3319 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
3320
df6ecfc6 33212008-01-15 Robert Millan <rmh@aybabtu.com>
3322
3323 * normal/menu.c (run_menu): Move timeout message from here ...
3324 (print_timeout): ... to here.
3325 (run_menu): Use print_timeout() once during initial draw to print
3326 the whole message, and again in every clock tick to update only
3327 the number of seconds.
3328
87ae25eb 33292008-01-15 Robert Millan <rmh@aybabtu.com>
3330
3331 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
3332 actual size of `available' from grub_ieee1275_get_property(), and
3333 restrict parsing to that bound.
3334
47bf09a4 33352008-01-15 Christian Franke <franke@computer.org>
3336
3337 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
3338 (argp_program_version): Remove variable.
3339 (argp_program_bug_address): Likewise.
3340 (options): Convert from struct argp_option to struct option.
3341 (struct arguments): Remove.
3342 (parse_opt): Remove.
3343 (usage): New function.
3344 (main): Replace struct args members by simple variables.
3345 Replace argp_parse() by getopt_long().
3346 Add switch to evaluate options.
3347 Add missing "(...)" around root_dev in prefix string.
3348
c86f1469 33492008-01-14 Robert Millan <rmh@aybabtu.com>
3350
3351 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
3352 for grub_ieee1275_exit(), in order to improve portability.
3353
e622c559 33542008-01-14 Robert Millan <rmh@aybabtu.com>
3355
3356 * util/grub.d/10_linux.in (prefix): Define.
3357 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
3358
44cb1ec8 33592008-01-13 Pavel Roskin <proski@gnu.org>
3360
3361 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
3362 grub_errno if no errors have been detected.
3363
1eb8c802 33642008-01-12 Robert Millan <rmh@aybabtu.com>
3365
3366 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
3367 (grub_util_get_dev_abstraction): New function prototype.
3368
3369 * util/getroot.c: Include `<grub/util/getroot.h>'
3370 (grub_util_get_grub_dev): Move detection of abstraction type to ...
3371 (grub_util_get_dev_abstraction): ... here (new function).
3372
3373 * util/grub-probe.c: Convert PRINT_* to an enum. Add
3374 `PRINT_ABSTRACTION'.
3375 (probe): Probe for abstraction type when requested.
3376 (main): Understand `--target=abstraction'.
3377
3378 * util/i386/efi/grub-install.in: Add abstraction module to core
3379 image when it is found to be necessary.
3380 * util/i386/pc/grub-install.in: Likewise.
3381 * util/powerpc/ieee1275/grub-install.in: Likewise.
3382
3383 * util/update-grub_lib.in (font_path): Return system path without
3384 converting to GRUB path.
3385 * util/update-grub.in: Convert system path returned by font_path()
3386 to a GRUB path. Use `grub-probe -t abstraction' to determine what
3387 abstraction module is needed for loading fonts (if any). Export
3388 that as `GRUB_PRELOAD_MODULES'.
3389 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
3390 insmod commands).
3391
52bd3de9 33922008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
3393
3394 Remove some unused code from reiserfs.
f19dbdb7 3395
52bd3de9 3396 * fs/reiserfs.c (struct grub_reiserfs_key)
3397 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
3398 (struct grub_reiserfs_node_body): Removed.
3399 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3400 Likewise.
3401 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3402 Likewise.
3403 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3404 Likewise.
3405 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
3406 Likewise.
3407 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
3408 Likewise.
3409 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
3410 Likewise.
3411 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3412 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3413 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
3414
2f80039d 34152008-01-10 Robert Millan <rmh@aybabtu.com>
3416
3417 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
3418 Determines if a file is garbage left by packaging systems, etc.
3419 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
3420 for processing /etc/grub.d scripts.
3421 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
3422 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
3423 as a condition for processing Linux images.
3424
87888032 34252008-01-10 Pavel Roskin <proski@gnu.org>
3426
3427 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
3428 to compile reiserfs.c on PowerPC.
3429
7e54fced 34302008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 3431
3432 * kern/device.c (grub_device_iterate): Do not abort device iteration
3433 when one of the devices cannot be opened.
3434 * kern/disk.c (grub_disk_open): Do not account previous failures of
3435 unrelated functions when grub_errno is checked for.
3436
5aa541e6 34372008-01-08 Robert Millan <rmh@aybabtu.com>
3438
3439 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
3440 `! grub_linux_is_bzimage', change order of address comparison to make
3441 it more intuitive, and improve "too big zImage" error message.
3442
7076340d 34432008-01-08 Robert Millan <rmh@aybabtu.com>
3444
3445 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
3446 `$(update-grub_DATA)'.
3447 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
3448 targets.
3449
9ca70333 34502008-01-07 Robert Millan <rmh@aybabtu.com>
3451
3452 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
3453 which instruction is modified by grub-setup during installation
3454 (since it wasn't obvious by only looking at this file).
3455
38ccf575 34562008-01-07 Robert Millan <rmh@aybabtu.com>
3457
3458 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
3459 listing actual TODO items.
3460
f5db4291 34612008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3462
868967cf 3463 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
3464 correctly.
3465 (grub_reiserfs_get_key_offset): Likewise.
3466 (grub_reiserfs_set_key_offset): Likewise.
3467 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 3468 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 3469
3470 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
3471 better to remove the bitfield version completely.
f19dbdb7 3472
868967cf 34732008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 3474
f5db4291 3475 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
3476 allocated from the heap, due to the fshelp implementation.
3477 (grub_reiserfs_dir): Free NODE, due to the same reason.
3478
492e6d9d 34792008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3480
3481 Mostly from Vincent Pelletier:
f19dbdb7 3482
492e6d9d 3483 * fs/reiserfs.c: New file.
f19dbdb7 3484
492e6d9d 3485 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
3486 (reiserfs_mod_SOURCES): New variable.
3487 (reiserfs_mod_CFLAGS): Likewise.
3488 (reiserfs_mod_LDFLAGS): Likewise.
3489
3490 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
3491 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
3492 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
3493 normal/color.c.
3494
9ce3e7c1 34952008-01-06 Robert Millan <rmh@aybabtu.com>
3496
3497 * normal/color.c: Remove `<grub/env.h>'.
3498
f3b58148 34992008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
3500
3501 * include/grub/normal.h: Include <grub/env.h>.
3502
7ac3bcfa 35032008-01-05 Robert Millan <rmh@aybabtu.com>
3504
3505 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
3506 usage example with `(hd0,1)'.
fb358190 3507 Reported by Samuel Thibault.
7ac3bcfa 3508
c8ee99d7 35092008-01-05 Robert Millan <rmh@aybabtu.com>
3510
3511 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
3512 (grub_linux_boot_zimage): Rename to ...
3513 (grub_linux_boot): ... this.
3514 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
3515 (grub_linux_boot_zimage): Conditionalize zImage copy.
3516
3517 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
3518 (grub_linux_boot_bzimage): Remove prototype.
3519 (grub_linux_boot_zimage): Rename to ...
3520 (grub_linux_boot): ... this.
3521
3522 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
3523 (grub_linux_boot): Remove function.
3524
0ece25b1 35252008-01-05 Robert Millan <rmh@aybabtu.com>
3526
3527 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
3528 (grub_env_write_color_highlight): Likewise.
3529 (grub_wait_after_message): Likewise.
3530
3531 * normal/color.c: New file.
3532
3533 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3534 (normal_mod_DEPENDENCIES): Likewise.
3535
3536 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3537 (normal_mod_DEPENDENCIES): Likewise.
3538
3539 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3540 (normal_mod_DEPENDENCIES): Likewise.
3541
3542 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
3543 (normal_mod_DEPENDENCIES): Likewise.
3544
3545 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
3546 for waiting after a message is printed.
3547 * normal/main.c (read_config_file): Likewise.
3548 (grub_normal_init): Register grub_env_write_color_normal() and
3549 grub_env_write_color_highlight() hooks. Mark `color_normal' and
3550 `color_highlight' variables as global.
3551
3552 * normal/menu.c (grub_wait_after_message): New function.
3553 (grub_color_menu_normal): New variable. Replaces ...
3554 (GRUB_COLOR_MENU_NORMAL): ... this macro.
3555 (grub_color_menu_highlight): New variable. Replaces ...
3556 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
3557 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
3558 `GRUB_TERM_COLOR_STANDARD'.
3559 (print_message): Use `grub_setcolorstate' to reload colors. Rename
3560 `normal_code' and `highlight_code' to `old_color_normal' and
3561 `old_color_highlight', respectively.
3562 (grub_menu_init_page): Update colors when drawing the menu, based on
3563 `menu_color_normal' and `menu_color_highlight' variables.
3564 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
3565 a message is printed.
3566
182dd4e5 35672008-01-05 Robert Millan <rmh@aybabtu.com>
3568
3569 * kern/env.c (grub_env_context_open): Propagate hooks for global
3570 variables to new context.
3571
3572 * kern/main.c (grub_set_root_dev): Export `root' variable.
3573
ddf8f6ad 35742008-01-05 Robert Millan <rmh@aybabtu.com>
3575
3576 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 3577 discs unconditionally, since udev and others have options to provide
ddf8f6ad 3578 them.
3579
d8b43d9b 35802008-01-05 Robert Millan <rmh@aybabtu.com>
3581
3582 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
3583
2bff2de3 35842008-01-04 Christian Franke <franke@computer.org>
3585
3586 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
3587 of eisa_mmap.
3588
97eab917 35892008-01-03 Pavel Roskin <proski@gnu.org>
3590
3591 * kern/i386/linuxbios/init.c: Put "void" to all function
3592 declarations with no arguments.
3593 * kern/powerpc/ieee1275/init.c: Likewise.
3594 * term/i386/pc/at_keyboard.c: Likewise.
3595 * term/i386/pc/vga_text.c: Likewise.
3596 * util/grub-mkdevicemap.c: Likewise.
3597
b9416d00 35982008-01-02 Robert Millan <rmh@aybabtu.com>
3599
3600 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
3601 message when loaded image is out of bounds.
3602 (grub_multiboot_load_elf64): Likewise.
3603
92695df9 36042008-01-02 Pavel Roskin <proski@gnu.org>
3605
3606 * util/grub.d/10_linux.in: Try version without ".old" when
3607 looking for initrd. It's better to use initrd from the newer
3608 kernel of the same version than no initrd at all.
3609
d98d9cad 36102008-01-01 Robert Millan <rmh@aybabtu.com>
3611
3612 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
3613
dbfdce36 36142008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
3615
f19dbdb7 3616 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 3617 grub_video_get_active_render_target.
3618 (grub_video_adapter): Added unmap_color and get_active_render_target.
3619
f19dbdb7 3620 * video/video.c: Added grub_video_unmap_color and
dbfdce36 3621 grub_video_get_active_render_target.
3622 (grub_video_get_info): Changed method to accept NULL pointer as an
3623 argument to allow detection of active video adapter.
3624
3625 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
3626 grub_video_vbe_unmap_color_int.
3627 Added grub_video_vbe_unmap_color and
3628 grub_video_vbe_get_active_render_target.
3629 (grub_video_vbe_adapter): Added unmap_color and
3630 get_active_render_target.
3631
f19dbdb7 3632 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 3633 with grub_video_vbe_unmap_color_int.
3634
3635 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
3636 (DEFAULT_NORMAL_COLOR): Likewise.
3637 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
3638 (DEFAULT_FG_COLOR): Removed.
3639 (DEFAULT_BG_COLOR): Likewise.
3640 (DEFAULT_CURSOR_COLOR): Changed value.
3641 (grub_virtual_screen): Added standard_color_setting,
3642 normal_color_setting, highlight_color_setting and term_color.
3643 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
3644 (bitmap_width): Added.
3645 (bitmap_height): Likewise.
3646 (bitmap): Likewise.
3647 (set_term_color): Likewise.
3648 (grub_virtual_screen_setup): Changed to use new terminal coloring
3649 settings.
3650 (grub_gfxterm_init): Added init for bitmap.
3651 (grub_gfxterm_fini): Added destroy for bitmap.
3652 (redraw_screen_rect): Updated to use background bitmap and new
3653 terminal coloring.
3654 (scroll_up): Added optimization for case when there is no bitmap.
3655 (grub_gfxterm_cls): Fixed to use correct background color.
3656 (grub_virtual_screen_setcolorstate): Changed to use new terminal
3657 coloring.
3658 (grub_virtual_screen_setcolor): Likewise.
3659 (grub_virtual_screen_getcolor): Added.
3660 (grub_gfxterm_background_image_cmd): Likewise.
3661 (grub_video_term): Added setcolor and getcolor.
3662 (MOD_INIT): Added registration of background_image command.
3663 (MOD_TERM): Added unregistration for background_image command.
3664
c3c20931 36652007-12-30 Pavel Roskin <proski@gnu.org>
3666
3667 * loader/multiboot_loader.c: Fix multiboot command
3668 unregistration. Fix all typos in the word "multiboot".
3669
df266716 36702007-12-29 Pavel Roskin <proski@gnu.org>
94239199 3671
3672 * util/grub.d/10_linux.in: Refactor search for initrd. Add
3673 support for initrd names used in Fedora.
3674
fc6e896c 36752007-12-26 Bean <bean123ch@gmail.com>
3676
3677 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
3678 (cpio_mod_SOURCES): New variable.
3679 (cpio_mod_CFLAGS): Likewise.
3680 (cpio_mod_LDFLAGS): Likewise.
3681
3682 * fs/cpio.c: New file.
3683
3684 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
3685
3686 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3687
3688 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3689
3690 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3691
533110ad 36922007-12-25 Robert Millan <rmh@aybabtu.com>
3693
3694 * include/grub/term.h (struct grub_term): Add `getcolor' function.
3695 (grub_getcolor): New function.
3696
3697 * kern/term.c (grub_getcolor): New function.
3698 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
3699 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
3700 (print_entry): Set normal and highlight colors to
3701 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
3702 respectively, before printing and restore them to old
3703 values afterwards.
3704 (grub_menu_init_page): Likewise. Fill an additional colored space
3705 that would otherwise be left blank.
3706
3707 * term/efi/console.c (grub_console_getcolor): New function.
3708 (struct grub_console_term.getcolor): New variable.
3709 * term/i386/pc/console.c (grub_console_getcolor): New function.
3710 (struct grub_console_term.getcolor): New variable.
3711 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
3712 (struct grub_console_term.getcolor): New variable.
3713
3714 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
3715 (struct grub_console_term.setcolor): Remove variable.
3716 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
3717 (struct grub_console_term.setcolor): Remove variable.
3718 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
3719 (struct grub_console_term.setcolor): Remove variable.
3720 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
3721 (struct grub_console_term.setcolor): Remove variable.
3722
4931827f 37232007-12-25 Robert Millan <rmh@aybabtu.com>
3724
3725 * configure.ac: Search for possible unifont.hex locations, and
3726 define UNIFONT_HEX if found.
3727
3728 * Makefile.in (UNIFONT_HEX): Define variable.
3729 (DATA): Rename to ...
3730 (PKGLIB): ... this. Update all users.
3731 (PKGDATA): New variable.
3732 (pkgdata_IMAGES): Rename to ...
3733 (pkglib_IMAGES): ... this. Update all users.
3734 (pkgdata_MODULES): Rename to ...
3735 (pkglib_MODULES): ... this. Update all users.
3736 (pkgdata_PROGRAMS): Rename to ...
3737 (pkglib_PROGRAMS): ... this. Update all users.
3738 (pkgdata_DATA): Rename to ...
3739 (pkglib_DATA): ... this. Update all users.
3740 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
3741 (unicode.pff, ascii.pff): New rules.
3742 (all-local): Add `$(PKGDATA)' dependency.
3743 (install-local): Process `$(PKGDATA)'.
3744
3745 * util/update-grub_lib.in (font_path): Search for *.pff files in
3746 a few more locations, including `${pkgdata}'.
3747
57e57e31 37482007-12-23 Robert Millan <rmh@aybabtu.com>
3749
3750 Patch from Bean <bean123ch@gmail.com>:
3751 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
3752 `size'.
3753
4bc72aa9 37542007-12-21 Bean <bean123ch@gmail.com>
3755
3756 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
3757 (ntfscomp_mod_SOURCES): New variable.
3758 (ntfscomp_mod_CFLAGS): Likewise.
3759 (ntfscomp_mod_LDFLAGS): Likewise.
3760
3761 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
3762 (grub_probe_SOURCES): Likewise.
3763 (grub_emu_SOURCES): Likewise.
3764
3765 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3766 (grub_emu_SOURCES): Likewise.
3767
3768 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3769 (grub_emu_SOURCES): Likewise.
3770
3771 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
3772 (grub_emu_SOURCES): Likewise.
3773
3774 * fs/ntfs.c (grub_ntfscomp_func): New variable.
3775 (read_run_list): Renamed to grub_ntfs_read_run_list.
3776 (decomp_nextvcn): Moved to ntfscomp.c.
3777 (decomp_getch): Likewise.
3778 (decomp_get16): Likewise.
3779 (decomp_block): Likewise.
3780 (read_block): Likewise.
3781 (read_data): Partially moved to ntfscomp.c.
3782 (fixup): Change unsigned to grub_uint16_t.
3783 (read_mft): Change unsigned long to grub_uint32_t.
3784 (read_attr): Likewise.
3785 (read_data): Likewise.
3786 (read_run_data): Likewise.
3787 (read_run_list): Likewise.
3788 (read_mft): Likewise.
3789
3790 * fs/ntfscomp.c: New file.
3791
3792 * include/grub/ntfs.h: New file.
3793
af680a87 37942007-12-16 Robert Millan <rmh@aybabtu.com>
3795
3796 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
3797 IDE disk check, since Linux is known to support 20 IDE disks.
3798 Reported by Colin Watson.
3799
84be7599 38002007-12-15 Bean <bean123ch@gmail.com>
3801
3802 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
3803 (lnxboot_img_SOURCES): New variable.
3804 (lnxboot_img_ASFLAGS): Likewise.
3805 (lnxboot_img_LDFLAGS): Likewise.
3806
3807 * boot/i386/pc/lnxboot.S: New file.
3808
6af9db01 38092007-11-24 Pavel Roskin <proski@gnu.org>
3810
3811 * configure.ac: Test if '--build-id=none' is supported by the
3812 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
3813 objcopy to generate incorrect binary files (binutils
3814 2.17.50.0.18-1 as shipped by Fedora 8).
3815 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
3816 linking, so that build ID doesn't break the test.
3817
7361cfe6 38182007-11-24 Pavel Roskin <proski@gnu.org>
3819
3820 * include/grub/i386/time.h: use "void" in the argument list
3821 of grub_cpu_idle().
3822 * include/grub/powerpc/time.h: Likewise.
3823 * include/grub/sparc64/time.h: Likewise.
3824
1593e10c 38252007-11-18 Christian Franke <franke@computer.org>
3826
3827 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
3828 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
3829 This fixes the problem that function keys did not work in grub-emu.
3830
3b8db1a8 38312007-11-18 Christian Franke <franke@computer.org>
3832
3833 * disk/host.c (grub_host_open): Remove attribute unused from
3834 name parameter. Add check for "host". This fixes the problem
3835 that grub-emu does not find partitions.
3836
2e29408d 38372007-11-18 Christian Franke <franke@computer.org>
3838
3839 * util/hostfs.c (is_dir): New function.
3840 (grub_hostfs_dir): Handle missing dirent.d_type case.
3841 (grub_hostfs_read): Add missing fseek().
3842 (grub_hostfs_label): Clear label pointer. This fixes a crash
3843 of grub-emu on "ls (host)".
3844
398cd047 38452007-11-18 Christian Franke <franke@computer.org>
3846
3847 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
3848 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
3849 to 64 bit boundary by default.
3850
c405c391 38512007-11-18 Bean <bean123ch@gmail.com>
3852
3853 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
3854 (hexdump_mod_SOURCES): New variable.
3855 (hexdump_mod_CFLAGS): Likewise.
3856 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 3857
c405c391 3858 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3859
3860 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3861
3862 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3863
3864 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
3865
3866 * include/grub/hexdump.h: New file.
3867
3868 * commands/hexdump.c: New file.
3869
5cced7fd 38702007-11-10 Robert Millan <rmh@aybabtu.com>
3871
3872 * commands/i386/pc/play.c (beep_off): Switch order of arguments
3873 in grub_outb() calls.
3874 (beep_on): Likewise.
3875
8b714eb0 38762007-11-10 Christian Franke <franke@computer.org>
3877
3878 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
3879 (grub_menu_run): Likewise.
3880
ce0f1839 38812007-11-10 Robert Millan <rmh@aybabtu.com>
3882
3883 * include/grub/i386/efi/machine.h: New file.
3884 * include/grub/i386/linuxbios/machine.h: Likewise.
3885 * include/grub/i386/pc/machine.h: Likewise.
3886 * include/grub/powerpc/ieee1275/machine.h: Likewise.
3887 * include/grub/sparc64/ieee1275/machine.h: Likewise.
3888
3889 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
3890 (serial_hw_io_addr): New variable.
3891 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
3892 instead of `(unsigned short *) 0x400'.
3893
270c237d 38942007-11-10 Bean <bean123ch@gmail.com>
3895
3896 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
3897
a87783bf 38982007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3899
3900 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
3901 (vga_mod_SOURCES): Added.
3902 (vga_mod_CFLAGS): Likewise.
3903 (vga_mod_LDFLAGS): Likewise.
3904
3905 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
3906 grub_outb() calls.
3907 (set_map_mask): Likewise.
3908 (set_read_map): Likewise.
3909 (set_read_address): Likewise.
3910 (vga_font): Removed variable.
3911 (get_vga_glyph): Removed function.
3912 (invalidate_char): Likewise.
3913 (write_char): Changed to use grub_font_get_glyph() for font
3914 information.
3915 (grub_vga_putchar): Likewise.
3916 (grub_vga_getcharwidth): Likewise.
3917
6433b448 39182007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
3919
3920 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
3921 flags.
3922 (pxeboot_img_LDFLAGS): Likewise.
3923 (diskboot_img_LDFLAGS): Likewise.
3924 (kernel_img_LDFLAGS): Likewise.
3925
49178511 39262007-11-06 Robert Millan <rmh@aybabtu.com>
3927
3928 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
3929 in grub_outb() calls.
3930 (serial_hw_init): Likewise.
3931
53b052de 39322007-11-05 Robert Millan <rmh@aybabtu.com>
3933
3934 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
3935 spaces. Skip non-regular files.
3936
5ab33bba 39372007-11-05 Robert Millan <rmh@aybabtu.com>
3938
3939 * kern/disk.c (grub_disk_firmware_fini)
3940 (grub_disk_firmware_is_tainted): New variables.
3941
3942 * include/grub/disk.h (grub_disk_firmware_fini)
3943 (grub_disk_firmware_is_tainted): Likewise.
3944
3945 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
3946 (grub_disk_biosdisk_fini): ... to here.
3947 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
3948 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
3949 is set. Register grub_disk_biosdisk_fini() in
3950 `grub_disk_firmware_fini'.
3951
3952 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
3953 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
3954 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
3955 to finish existing firmware disk interface.
3956
3957 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
3958 (ata_mod_SOURCES): New variable.
3959 (ata_mod_CFLAGS): Likewise.
3960 (ata_mod_LDFLAGS): Likewise.
3961
0149ab7c 39622007-11-05 Robert Millan <rmh@aybabtu.com>
3963
3964 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
3965 (grub_ata_wait): Reimplement using grub_millisleep().
3966
3967 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
3968 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
3969
be7ac41e 39702007-11-03 Marco Gerards <marco@gnu.org>
3971
3972 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
3973 (CRTC_ADDR_PORT): New macro.
3974 (CRTC_DATA_PORT): Likewise.
3975 (CRTC_CURSOR): Likewise.
3976 (CRTC_CURSOR_ADDR_HIGH): Likewise.
3977 (CRTC_CURSOR_ADDR_LOW): Likewise.
3978 (update_cursor): New function.
3979 (grub_console_real_putchar): Call `update_cursor'.
3980 (grub_console_gotoxy): Likewise.
3981 (grub_console_cls): Set the default color when clearing the
3982 screen.
3983 (grub_console_setcursor): Implemented.
3984
bb06ab2e 39852007-11-03 Marco Gerards <marco@gnu.org>
3986
3987 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
3988 become activate.
3989 (grub_ata_pio_write): Likewise.
3990
3991 (grub_atapi_identify): Wait after issuing an ATA command.
3992 (grub_atapi_packet): Likewise.
3993 (grub_ata_identify): Likewise.
3994 (grub_ata_readwrite): Likewise.
3995
cf8f780b 39962007-11-03 Marco Gerards <marco@gnu.org>
3997
3998 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
3999 (grub_ata_pio_write): Likewise.
4000 (grub_ata_readwrite): Use `grub_error', instead of
4001 returning `grub_errno'.
4002
ed649e54 40032007-11-03 Marco Gerards <marco@gnu.org>
4004
4005 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
4006 grub_ata_pio_write once for every single sector, instead of for
4007 multiple sectors.
4008
ca25d8f0 40092007-10-31 Robert Millan <rmh@aybabtu.com>
4010
4011 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4012
4013 * conf/i386-linuxbios.rmk: New file.
4014
4015 * kern/i386/pc/hardware.c: Likewise.
4016 * term/i386/pc/at_keyboard.c: Likewise.
4017 * term/i386/pc/vga_text.c: Likewise.
4018
4019 * include/grub/i386/linuxbios/boot.h: Likewise.
4020 * include/grub/i386/linuxbios/console.h: Likewise.
4021 * include/grub/i386/linuxbios/init.h: Likewise.
4022 * include/grub/i386/linuxbios/kernel.h: Likewise.
4023 * include/grub/i386/linuxbios/loader.h: Likewise.
4024 * include/grub/i386/linuxbios/memory.h: Likewise.
4025 * include/grub/i386/linuxbios/serial.h: Likewise.
4026 * include/grub/i386/linuxbios/time.h: Likewise.
4027
4028 * kern/i386/linuxbios/init.c: Likewise.
4029 * kern/i386/linuxbios/startup.S: Likewise.
4030 * kern/i386/linuxbios/table.c: Likewise.
4031
e911ecc1 40322007-10-31 Marco Gerards <marco@gnu.org>
4033
4034 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
4035 (ata_mod_SOURCES): New variable.
4036 (ata_mod_CFLAGS): Likewise.
4037 (ata_mod_LDFLAGS): Likewise.
4038
4039 * disk/ata.c: New file.
4040
4041 * include/grub/disk.h (grub_disk_dev_id): Add
4042 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 4043
7f66d0e0 40442007-10-31 Robert Millan <rmh@aybabtu.com>
4045
4046 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
4047 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
4048
4049 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
4050 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
4051
4052 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
4053 `<grub/types.h>'.
4054
4055 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
4056
5cd7dd46 40572007-10-27 Robert Millan <rmh@aybabtu.com>
4058
3236ca65 4059 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 4060
2ebfc90f 40612007-10-22 Robert Millan <rmh@aybabtu.com>
4062
4063 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
4064 `"../realmode.S"'.
4065 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
4066
73fcb0f3 40672007-10-22 Robert Millan <rmh@aybabtu.com>
4068
4069 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
4070 (pkgdata_MODULES): Add `biosdisk.mod'.
4071 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
4072 variables.
4073
4074 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
4075 (grub_biosdisk_init): Replace with ...
4076 (GRUB_MOD_INIT(biosdisk)): ... this.
4077 (grub_biosdisk_fini): Replace with ...
4078 (GRUB_MOD_FINI(biosdisk)): ... this.
4079
4080 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
4081 (grub_machine_init): Remove call to grub_biosdisk_init().
4082 (grub_machine_fini): Remove call to grub_machine_fini().
4083
4084 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
4085
3381d274 40862007-10-22 Robert Millan <rmh@aybabtu.com>
4087
4088 * include/grub/time.h: New file.
4089 * include/grub/i386/time.h: Likewise.
4090 * include/grub/powerpc/time.h: Likewise.
4091 * include/grub/sparc64/time.h: Likewise.
4092
4093 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
4094 instances to ...
4095 (KERNEL_MACHINE_TIME_HEADER): ... this.
4096 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4097 instances to ...
4098 (KERNEL_MACHINE_TIME_HEADER): ... this.
4099 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4100 instances to ...
4101 (KERNEL_MACHINE_TIME_HEADER): ... this.
4102
4103 * kern/i386/efi/init.c: Include `<grub/time.h>'.
4104 (grub_millisleep): New function.
4105 * kern/i386/pc/init.c: Include `<grub/time.h>'.
4106 (grub_millisleep): New function.
4107 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
4108 Remove `grub/machine/time.h' include.
4109 (grub_millisleep): New function.
4110 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
4111 Remove `grub/machine/time.h' include.
4112 (grub_millisleep): New function.
4113
4114 * include/grub/misc.h (grub_div_roundup): New function.
4115
4116 * kern/misc.c: Include `<grub/time.h>'.
4117 (grub_millisleep_generic): New function.
4118
4119 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
4120 Add `time.h'.
4121 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
4122 Add `time.h'.
4123 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
4124 `machine/time.h'. Add `time.h'.
4125 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4126
a39a0312 41272007-10-21 Robert Millan <rmh@aybabtu.com>
4128
4129 * include/grub/misc.h (grub_max): New function.
4130
2aad70e2 41312007-10-21 Robert Millan <rmh@aybabtu.com>
4132
4133 * util/misc.c (grub_util_info): Call fflush() before returning.
4134
54b71c4b 41352007-10-20 Robert Millan <rmh@aybabtu.com>
4136
4137 * genmk.rb (Image): Copy `extra_flags' from here ...
4138 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
4139
4140 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
4141 to `argc' and `args' arguments.
4142
a979f513 41432007-10-17 Robert Millan <rmh@aybabtu.com>
4144
4145 * kern/i386/loader.S: New file.
4146
4147 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
4148 * kern/i386/loader.S (grub_linux_prot_size)... to here.
4149 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
4150 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
4151 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
4152 * kern/i386/loader.S (grub_linux_real_addr)... to here.
4153 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
4154 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
4155 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
4156 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
4157 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
4158 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
4159 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
4160 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
4161
4162 * kern/i386/realmode.S: New file.
4163
4164 * kern/i386/pc/startup.S (protstack): Moved from here ...
4165 * kern/i386/realmode.S (protstack)... to here.
4166 * kern/i386/pc/startup.S (gdt): Moved from here ...
4167 * kern/i386/realmode.S (gdt)... to here.
4168 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
4169 * kern/i386/realmode.S (prot_to_real)... to here.
4170
4171 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
4172 `kern/i386/realmode.S'.
4173
825fc8fd 41742007-10-17 Robert Millan <rmh@aybabtu.com>
4175
4176 * include/grub/i386/loader.h: New file.
4177
4178 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
4179 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4180 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4181 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4182 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
4183 * include/grub/i386/loader.h (grub_linux_prot_size)
4184 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
4185 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
4186 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
4187 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
4188
4189 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
4190
e179b2f4 41912007-10-15 Robert Millan <rmh@aybabtu.com>
4192
4193 * normal/misc.c (grub_normal_print_device_info): Do not probe for
4194 filesystem when dev->disk is unset.
4195 Do probe for filesystem even when dev->disk->has_partitions is set.
4196 In case a filesystem is found, always report it.
4197 In case it isn't, if dev->disk->has_partitions is set, report that
4198 a partition table was found instead of reporting that no filesystem
4199 could be identified.
4200
5db82af6 42012007-10-12 Robert Millan <rmh@aybabtu.com>
4202
4203 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
4204 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
4205
68f6ac74 4206 * include/grub/types.h (grub_host_to_target16): New macro.
4207 (grub_host_to_target32): Likewise.
4208 (grub_host_to_target64): Likewise.
4209 (grub_target_to_host16): Likewise.
4210 (grub_target_to_host32): Likewise.
4211 (grub_target_to_host64): Likewise.
5db82af6 4212
4213 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
4214 Renamed from to ...
4215 (GRUB_MOD_ALIGN): ...this. Update all users.
4216
68f6ac74 4217 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
4218 grub_host_to_target32.
4219 Replace grub_be_to_cpu32 with grub_target_to_host32.
4220 (load_modules): Likewise.
4221 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
4222 Replace grub_be_to_cpu32 with grub_target_to_host32.
4223 Replace grub_cpu_to_be16 with grub_host_to_target16.
4224 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 4225
3cf497cc 42262007-10-12 Robert Millan <rmh@aybabtu.com>
4227
4228 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
4229 * util/elf/grub-mkimage.c: ... here.
4230
4231 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
4232 `util/powerpc/ieee1275/grub-mkimage.c'.
4233
c8cc3692 42342007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 4235
c8cc3692 4236 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
4237 and make it easier to figure out.
4238 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
4239 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
4240 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
4241 leave us with less than HEAP_MIN_SIZE total heap.
4242 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 4243
5c58b791 42442007-10-03 Robert Millan <rmh@aybabtu.com>
4245
4246 * include/grub/i386/io.h: New file.
4247 * commands/i386/pc/play.c (inb): Removed.
4248 (outb): Removed.
4249 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4250 with grub_outb().
afcd2ef8 4251 * term/i386/pc/serial.c (inb): Removed.
4252 (outb): Removed.
4253 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4254 with grub_outb().
4255 * term/i386/pc/vga.c (inb): Removed.
4256 (outb): Removed.
4257 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
4258 with grub_outb().
5c58b791 4259
1a477ed6 42602007-10-02 Robert Millan <rmh@aybabtu.com>
4261
4262 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
4263 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4264 Reported by Marcin Kurek.
4265
6b5d80fa 42662007-09-07 Robert Millan <rmh@aybabtu.com>
4267
4268 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
4269 SmartFirmware version updates (as released by Sven Luther), and avoid
4270 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
4271 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
4272 known broken.
4273
5618afbf 42742007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4275
4276 From Hitoshi Ozeki:
4277 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
4278 when merging two regions.
4279
6139dcd9 42802007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
4281
508e39ee 4282 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
4283 * normal/completion.c (grub_normal_do_completion): Likewise.
4284 Reported by Hitoshi Ozeki.
4285
42862007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 4287
6139dcd9 4288 Do not use devices at boot in chainloading.
f19dbdb7 4289
6139dcd9 4290 * loader/i386/pc/chainloader.c (boot_drive): New variable.
4291 (boot_part_addr): Likewise.
4292 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
4293 with BOOT_DRIVE and BOOT_PART_ADDR.
4294 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
4295 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
4296
38da6516 42972007-08-29 Robert Millan <rmh@aybabtu.com>
4298
4299 Patch from Simon Peter <dn.tlp@gmx.net>:
4300 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
4301 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
4302 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
4303 util/i386/pc/grub-setup.c_DEPENDENCIES.
4304 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
4305 util/grub-probe.c_DEPENDENCIES.
4306 * conf/powerpc-ieee1275.rmk: Likewise.
4307
29d0928c 43082007-08-28 Robert Millan <rmh@aybabtu.com>
4309
4310 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
4311 to tell grub-mkdevicemap how to name devices.
4312 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
4313 feature).
4314
4315 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
4316 util/i386/get_disk_name.c.
4317 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
4318 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
4319 util/ieee1275/get_disk_name.c.
4320
4321 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
4322
4323 * DISTLIST: Add util/i386/get_disk_name.c and
4324 util/ieee1275/get_disk_name.c.
4325
4326 * util/grub-mkdevicemap.c: Replace device naming logic with
4327 grub_util_get_disk_name() calls.
4328
5a0d3cca 43292007-08-20 Robert Millan <rmh@aybabtu.com>
4330
4331 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
4332 (so that it works for both plural and singular quantities).
4333
8b72db2f 43342007-08-05 Robert Millan <rmh@aybabtu.com>
4335
4336 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
4337 so that [xz] isn't taken into account when determining order.
4338
352466bf 43392007-08-02 Marco Gerards <marco@gnu.org>
4340
4341 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
4342 `include/multiboot2.h', `include/grub/elfload.h',
4343 `include/multiboot.h', `include/grub/multiboot.h',
4344 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
4345 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
4346 `kern/elf.c', `loader/multiboot_loader.c',
4347 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
4348 `loader/i386/pc/multiboot2.c',
4349 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
4350 `util/i386/pc/grub-mkrescue.in'. Remove
4351 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
4352 `include/grub/i386/pc/util/biosdisk.h' and
4353 `include/grub/powerpc/ieee1275/multiboot.h'.
4354
8f096014 43552007-08-02 Bean <bean123ch@gmail.com>
4356
4357 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
4358 (ntfs_mod_SOURCES): New variable.
4359 (ntfs_mod_CFLAGS): Likewise.
4360 (ntfs_mod_LDFLAGS): Likewise.
4361
4362 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
4363 (grub_probe_SOURCES): Likewise.
4364 (grub_emu_SOURCES): Likewise.
4365
4366 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4367 (grub_emu_SOURCES): Likewise.
4368
4369 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
4370 (grub_emu_SOURCES): Likewise.
f19dbdb7 4371
8f096014 4372 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
4373
4374 * fs/ntfs.c: New file.
4375
9959f7db 43762007-08-02 Bean <bean123ch@gmail.com>
4377
4378 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
4379
4380 * file.h (grub_file): Likewise.
4381
4382 * fshelp.h (grub_fshelp_read_file): Likewise.
4383
4384 * util/i386/pc/grub-setup.c (setup): Likewise.
4385 (save_first_sector): Likewise.
4386 (save_blocklists): Likewise.
f19dbdb7 4387
9959f7db 4388 * fs/affs.c (grub_affs_read_file): Likewise.
4389
4390 * fs/ext2.c (grub_ext2_read_file): Likewise.
4391
4392 * fs/fat.c (grub_fat_read_data): Likewise.
4393
4394 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
4395
4396 * fs/hfs.c (grub_hfs_read_file): Likewise.
4397
4398 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4399
4400 * fs/jfs.c (grub_jfs_read_file): Likewise.
4401
4402 * fs/minix.c (grub_minix_read_file): Likewise.
4403
4404 * fs/sfs.c (grub_sfs_read_file): Likewise.
4405
4406 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 4407
9959f7db 4408 * fs/xfs.c (grub_xfs_read_file): Likewise.
4409
4410 * command/blocklist.c (read_blocklist): Likewise.
4411 (print_blocklist): Likewise.
4412
0a203f83 44132007-08-02 Marco Gerards <marco@gnu.org>
4414
4415 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
4416 `util/hostfs.c'.
4417
4418 * disk/host.c: New file.
4419
4420 * util/hostfs.c: Likewise.
4421
4422 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
4423 return `GRUB_ERR_BAD_FS'.
4424 * fs/sfs.c (grub_sfs_mount): Likewise.
4425 * fs/xfs.c (grub_xfs_mount): Likewise.
4426
4427 * include/grub/disk.h (enum grub_disk_dev_id): Add
4428 `GRUB_DISK_DEVICE_HOST_ID'.
4429
4430 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
4431
e5dfe777 44322007-07-24 Jerone Young <jerone@gmail.com>
4433
f19dbdb7 4434 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 4435 modules for compilation.
4436 * conf/powerpc-ieee1275.rmk: Likewise.
4437
4438 * include/multiboot.h: Move multiboot definitions to one file. Rename
4439 many definitions to not get grub specific.
4440 * include/multiboot2.h: Create header with multiboot 2 definitions.
4441 * include/grub/multiboot.h: Header for grub specific function
4442 prototypes and definitions.
4443 * include/grub/multiboot2.h: Likewise.
4444 * include/grub/multiboot_loader.h: Likewise.
4445 * include/grub/i386/pc/multiboot.h: Removed.
4446 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
4447
4448 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
4449 and 2 to allow for one multiboot and module commands.
4450 * loader/multiboot2.c: Add multiboot2 functionality.
4451 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
4452 and definition names.
4453 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
4454 2 functions.
4455 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
4456 ieee1275 specific multiboot2 code.
4457
4458 * kern/i386/pc/startup.S: Change headers and definition names for
4459 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
4460
daf0f0ba 44612007-07-22 Robert Millan <rmh@aybabtu.com>
4462
4463 * geninitheader.sh: Process file specified in first parameter rather
4464 than hardcoding grub_modules_init.lst.
fe6b695a 4465 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 4466 than hardcoding grub_modules_init.h.
4467
4468 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
4469 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
4470 grub_probe_init.[ch] and grub_setup_init.[ch].
4471
4472 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
4473 grub_modules_init.h with grub_emu_init.h.
4474 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
4475 grub_probe_init.[ch] files.
4476 * conf/i386-efi.rmk: Likewise.
4477 * conf/i386-pc.rmk: Likewise.
4478 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
4479 grub_setup_init.[ch] files.
4480
4481 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
4482 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
4483 to initialize modules rather than a list of hardcoded functions.
4484 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
4485 grub_init_all() to initialize modules rather than a list of hardcoded
4486 functions.
4487
54cdc1cc 44882007-07-22 Robert Millan <rmh@aybabtu.com>
4489
4490 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
4491 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
4492
ad0686cc 44932007-07-22 Robert Millan <rmh@aybabtu.com>
4494
4495 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4496 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
4497 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
4498 flag when running on SmartFirmware.
4499 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
4500 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
4501 was set.
4502
4503 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
4504 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
4505 rather than decreasing it.
4506
4507 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
4508 there's not enough space to do it, fail in the same way as when it
4509 can't be done because there are no partitions.
4510
4511 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
4512 when nvsetenv failed.
4513
969c02ec 45142007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4515
4516 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
4517 because this rule is automatically generated.
4518 (grub-mkrescue): Removed for the same reason as above.
4519
5a79f472 45202007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
4521
4522 Migrate to GNU General Public License Version 3.
f19dbdb7 4523
5a79f472 4524 * COPYING: Replaced with the plain text version of GPLv3.
4525
4526 * config.guess: Updated from gnulib.
4527 * config.sub: Likewise.
4528
4529 * geninit.sh: Output a GPLv3 copyright notice.
4530 * geninitheader.sh: Likewise.
4531 * genmodsrc.sh: Likewise.
4532 * gensymlist.sh.in: Likewise.
4533
4534 * boot/i386/pc/boot.S: Upgraded to GPLv3.
4535 * boot/i386/pc/diskboot.S: Likewise.
4536 * boot/i386/pc/pxeboot.S: Likewise.
4537 * commands/blocklist.c: Likewise.
4538 * commands/boot.c: Likewise.
4539 * commands/cat.c: Likewise.
4540 * commands/cmp.c: Likewise.
4541 * commands/configfile.c: Likewise.
4542 * commands/echo.c: Likewise.
4543 * commands/help.c: Likewise.
4544 * commands/ls.c: Likewise.
4545 * commands/search.c: Likewise.
4546 * commands/terminal.c: Likewise.
4547 * commands/test.c: Likewise.
4548 * commands/videotest.c: Likewise.
4549 * commands/i386/cpuid.c: Likewise.
4550 * commands/i386/pc/halt.c: Likewise.
4551 * commands/i386/pc/play.c: Likewise.
4552 * commands/i386/pc/reboot.c: Likewise.
4553 * commands/i386/pc/vbeinfo.c: Likewise.
4554 * commands/i386/pc/vbetest.c: Likewise.
4555 * commands/ieee1275/halt.c: Likewise.
4556 * commands/ieee1275/reboot.c: Likewise.
4557 * commands/ieee1275/suspend.c: Likewise.
4558 * disk/loopback.c: Likewise.
4559 * disk/lvm.c: Likewise.
4560 * disk/raid.c: Likewise.
4561 * disk/efi/efidisk.c: Likewise.
4562 * disk/i386/pc/biosdisk.c: Likewise.
4563 * disk/ieee1275/ofdisk.c: Likewise.
4564 * font/manager.c: Likewise.
4565 * fs/affs.c: Likewise.
4566 * fs/ext2.c: Likewise.
4567 * fs/fat.c: Likewise.
4568 * fs/fshelp.c: Likewise.
4569 * fs/hfs.c: Likewise.
4570 * fs/hfsplus.c: Likewise.
4571 * fs/iso9660.c: Likewise.
4572 * fs/jfs.c: Likewise.
4573 * fs/minix.c: Likewise.
4574 * fs/sfs.c: Likewise.
4575 * fs/ufs.c: Likewise.
4576 * fs/xfs.c: Likewise.
4577 * hello/hello.c: Likewise.
4578 * include/grub/acorn_filecore.h: Likewise.
4579 * include/grub/arg.h: Likewise.
4580 * include/grub/bitmap.h: Likewise.
4581 * include/grub/boot.h: Likewise.
4582 * include/grub/cache.h: Likewise.
4583 * include/grub/device.h: Likewise.
4584 * include/grub/disk.h: Likewise.
4585 * include/grub/dl.h: Likewise.
4586 * include/grub/elfload.h: Likewise.
4587 * include/grub/env.h: Likewise.
4588 * include/grub/err.h: Likewise.
4589 * include/grub/file.h: Likewise.
4590 * include/grub/font.h: Likewise.
4591 * include/grub/fs.h: Likewise.
4592 * include/grub/fshelp.h: Likewise.
4593 * include/grub/gzio.h: Likewise.
4594 * include/grub/hfs.h: Likewise.
4595 * include/grub/kernel.h: Likewise.
4596 * include/grub/loader.h: Likewise.
4597 * include/grub/lvm.h: Likewise.
4598 * include/grub/misc.h: Likewise.
4599 * include/grub/mm.h: Likewise.
4600 * include/grub/net.h: Likewise.
4601 * include/grub/normal.h: Likewise.
4602 * include/grub/parser.h: Likewise.
4603 * include/grub/partition.h: Likewise.
4604 * include/grub/pc_partition.h: Likewise.
4605 * include/grub/raid.h: Likewise.
4606 * include/grub/rescue.h: Likewise.
4607 * include/grub/script.h: Likewise.
4608 * include/grub/setjmp.h: Likewise.
4609 * include/grub/symbol.h: Likewise.
4610 * include/grub/term.h: Likewise.
4611 * include/grub/terminfo.h: Likewise.
4612 * include/grub/tparm.h: Likewise.
4613 * include/grub/types.h: Likewise.
4614 * include/grub/video.h: Likewise.
4615 * include/grub/efi/api.h: Likewise.
4616 * include/grub/efi/chainloader.h: Likewise.
4617 * include/grub/efi/console.h: Likewise.
4618 * include/grub/efi/console_control.h: Likewise.
4619 * include/grub/efi/disk.h: Likewise.
4620 * include/grub/efi/efi.h: Likewise.
4621 * include/grub/efi/pe32.h: Likewise.
4622 * include/grub/efi/time.h: Likewise.
4623 * include/grub/i386/linux.h: Likewise.
4624 * include/grub/i386/setjmp.h: Likewise.
4625 * include/grub/i386/types.h: Likewise.
4626 * include/grub/i386/efi/kernel.h: Likewise.
4627 * include/grub/i386/efi/loader.h: Likewise.
4628 * include/grub/i386/efi/time.h: Likewise.
4629 * include/grub/i386/pc/biosdisk.h: Likewise.
4630 * include/grub/i386/pc/boot.h: Likewise.
4631 * include/grub/i386/pc/chainloader.h: Likewise.
4632 * include/grub/i386/pc/console.h: Likewise.
4633 * include/grub/i386/pc/init.h: Likewise.
4634 * include/grub/i386/pc/kernel.h: Likewise.
4635 * include/grub/i386/pc/loader.h: Likewise.
4636 * include/grub/i386/pc/memory.h: Likewise.
4637 * include/grub/i386/pc/multiboot.h: Likewise.
4638 * include/grub/i386/pc/serial.h: Likewise.
4639 * include/grub/i386/pc/time.h: Likewise.
4640 * include/grub/i386/pc/vbe.h: Likewise.
4641 * include/grub/i386/pc/vbeblit.h: Likewise.
4642 * include/grub/i386/pc/vbefill.h: Likewise.
4643 * include/grub/i386/pc/vbeutil.h: Likewise.
4644 * include/grub/i386/pc/vga.h: Likewise.
4645 * include/grub/ieee1275/ieee1275.h: Likewise.
4646 * include/grub/ieee1275/ofdisk.h: Likewise.
4647 * include/grub/powerpc/libgcc.h: Likewise.
4648 * include/grub/powerpc/setjmp.h: Likewise.
4649 * include/grub/powerpc/types.h: Likewise.
4650 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
4651 * include/grub/powerpc/ieee1275/console.h: Likewise.
4652 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
4653 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
4654 * include/grub/powerpc/ieee1275/loader.h: Likewise.
4655 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
4656 * include/grub/powerpc/ieee1275/time.h: Likewise.
4657 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
4658 * include/grub/sparc64/libgcc.h: Likewise.
4659 * include/grub/sparc64/setjmp.h: Likewise.
4660 * include/grub/sparc64/types.h: Likewise.
4661 * include/grub/sparc64/ieee1275/console.h: Likewise.
4662 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
4663 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
4664 * include/grub/sparc64/ieee1275/time.h: Likewise.
4665 * include/grub/util/biosdisk.h: Likewise.
4666 * include/grub/util/getroot.h: Likewise.
4667 * include/grub/util/lvm.h: Likewise.
4668 * include/grub/util/misc.h: Likewise.
4669 * include/grub/util/raid.h: Likewise.
4670 * include/grub/util/resolve.h: Likewise.
4671 * io/gzio.c: Likewise.
4672 * kern/device.c: Likewise.
4673 * kern/disk.c: Likewise.
4674 * kern/dl.c: Likewise.
4675 * kern/elf.c: Likewise.
4676 * kern/env.c: Likewise.
4677 * kern/err.c: Likewise.
4678 * kern/file.c: Likewise.
4679 * kern/fs.c: Likewise.
4680 * kern/loader.c: Likewise.
4681 * kern/main.c: Likewise.
4682 * kern/misc.c: Likewise.
4683 * kern/mm.c: Likewise.
4684 * kern/parser.c: Likewise.
4685 * kern/partition.c: Likewise.
4686 * kern/rescue.c: Likewise.
4687 * kern/term.c: Likewise.
4688 * kern/efi/efi.c: Likewise.
4689 * kern/efi/init.c: Likewise.
4690 * kern/efi/mm.c: Likewise.
4691 * kern/i386/dl.c: Likewise.
4692 * kern/i386/efi/init.c: Likewise.
4693 * kern/i386/efi/startup.S: Likewise.
4694 * kern/i386/pc/init.c: Likewise.
4695 * kern/i386/pc/lzo1x.S: Likewise.
4696 * kern/i386/pc/startup.S: Likewise.
4697 * kern/ieee1275/ieee1275.c: Likewise.
4698 * kern/powerpc/cache.S: Likewise.
4699 * kern/powerpc/dl.c: Likewise.
4700 * kern/powerpc/ieee1275/cmain.c: Likewise.
4701 * kern/powerpc/ieee1275/crt0.S: Likewise.
4702 * kern/powerpc/ieee1275/init.c: Likewise.
4703 * kern/powerpc/ieee1275/openfw.c: Likewise.
4704 * kern/sparc64/cache.S: Likewise.
4705 * kern/sparc64/dl.c: Likewise.
4706 * kern/sparc64/ieee1275/init.c: Likewise.
4707 * kern/sparc64/ieee1275/openfw.c: Likewise.
4708 * loader/efi/chainloader.c: Likewise.
4709 * loader/efi/chainloader_normal.c: Likewise.
4710 * loader/i386/efi/linux.c: Likewise.
4711 * loader/i386/efi/linux_normal.c: Likewise.
4712 * loader/i386/pc/chainloader.c: Likewise.
4713 * loader/i386/pc/chainloader_normal.c: Likewise.
4714 * loader/i386/pc/linux.c: Likewise.
4715 * loader/i386/pc/linux_normal.c: Likewise.
4716 * loader/i386/pc/multiboot.c: Likewise.
4717 * loader/i386/pc/multiboot_normal.c: Likewise.
4718 * loader/powerpc/ieee1275/linux.c: Likewise.
4719 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4720 * normal/arg.c: Likewise.
4721 * normal/cmdline.c: Likewise.
4722 * normal/command.c: Likewise.
4723 * normal/completion.c: Likewise.
4724 * normal/execute.c: Likewise.
4725 * normal/function.c: Likewise.
4726 * normal/lexer.c: Likewise.
4727 * normal/main.c: Likewise.
4728 * normal/menu.c: Likewise.
4729 * normal/menu_entry.c: Likewise.
4730 * normal/misc.c: Likewise.
4731 * normal/parser.y: Likewise.
4732 * normal/script.c: Likewise.
4733 * normal/i386/setjmp.S: Likewise.
4734 * normal/powerpc/setjmp.S: Likewise.
4735 * normal/sparc64/setjmp.S: Likewise.
4736 * partmap/acorn.c: Likewise.
4737 * partmap/amiga.c: Likewise.
4738 * partmap/apple.c: Likewise.
4739 * partmap/gpt.c: Likewise.
4740 * partmap/pc.c: Likewise.
4741 * partmap/sun.c: Likewise.
4742 * term/gfxterm.c: Likewise.
4743 * term/terminfo.c: Likewise.
4744 * term/efi/console.c: Likewise.
4745 * term/i386/pc/console.c: Likewise.
4746 * term/i386/pc/serial.c: Likewise.
4747 * term/i386/pc/vesafb.c: Likewise.
4748 * term/i386/pc/vga.c: Likewise.
4749 * term/ieee1275/ofconsole.c: Likewise.
4750 * util/biosdisk.c: Likewise.
4751 * util/console.c: Likewise.
4752 * util/genmoddep.c: Likewise.
4753 * util/getroot.c: Likewise.
4754 * util/grub-emu.c: Likewise.
4755 * util/grub-mkdevicemap.c: Likewise.
4756 * util/grub-probe.c: Likewise.
4757 * util/lvm.c: Likewise.
4758 * util/misc.c: Likewise.
4759 * util/raid.c: Likewise.
4760 * util/resolve.c: Likewise.
4761 * util/update-grub.in: Likewise.
4762 * util/update-grub_lib.in: Likewise.
4763 * util/grub.d/00_header.in: Likewise.
4764 * util/grub.d/10_hurd.in: Likewise.
4765 * util/grub.d/10_linux.in: Likewise.
4766 * util/i386/efi/grub-install.in: Likewise.
4767 * util/i386/efi/grub-mkimage.c: Likewise.
4768 * util/i386/pc/grub-install.in: Likewise.
4769 * util/i386/pc/grub-mkimage.c: Likewise.
4770 * util/i386/pc/grub-mkrescue.in: Likewise.
4771 * util/i386/pc/grub-setup.c: Likewise.
4772 * util/i386/pc/misc.c: Likewise.
4773 * util/powerpc/ieee1275/grub-install.in: Likewise.
4774 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
4775 * util/powerpc/ieee1275/misc.c: Likewise.
4776 * video/bitmap.c: Likewise.
4777 * video/video.c: Likewise.
4778 * video/i386/pc/vbe.c: Likewise.
4779 * video/i386/pc/vbeblit.c: Likewise.
4780 * video/i386/pc/vbefill.c: Likewise.
4781 * video/i386/pc/vbeutil.c: Likewise.
4782 * video/readers/tga.c: Likewise.
4783
3572d015 47842007-07-02 Robert Millan <rmh@aybabtu.com>
4785
4786 * conf/i386-efi.rmk: Replace obsolete reference to
4787 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
4788 with util/getroot.c.
4789 * conf/powerpc-ieee1275.rmk: Likewise.
4790 * conf/sparc64-ieee1275.rmk: Likewise.
4791
4792 * util/grub-emu.c (main): Fix unchecked pointer handling.
4793
2c2a681b 47942007-07-02 Robert Millan <rmh@aybabtu.com>
4795
4796 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
4797 invocation to fail, in order to support partition-less media.
4798
4799 * util/i386/pc/grub-install.in: Likewise.
4800
4801 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
4802 which fs or partmap modules are needed (akin to its sister scripts).
4803
4804 Also use grub-probe to get rid of unportable /proc/mounts check.
4805
4806 Print the same informational message that the other scripts do, before
fe6b695a 4807 exiting.
2c2a681b 4808
6193defe 48092007-06-23 Robert Millan <rmh@aybabtu.com>
4810
fe6b695a 4811 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 4812 a font file can be found and, if so, echo the GRUB path to it.
4813
4814 * util/update-grub.in: Handle multiple terminals depending on user
4815 input, platform availability and font file presence. Propagate
4816 variables of our findings to /etc/grub.d/ children.
4817
4818 * util/grub.d/00_header.in: Handle multiple terminals, based on
4819 environment setup by update-grub.
4820
eface1dc 48212007-06-23 Robert Millan <rmh@aybabtu.com>
4822
ba50d28f 4823 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 4824
bf697e28 48252007-06-21 Robert Millan <rmh@aybabtu.com>
4826
4827 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
4828 indicate end of data section in kernel image.
4829 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
4830 GRUB_KERNEL_MACHINE_DATA_END.
4831
4832 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
4833 space for it.
4834 * kern/i386/efi/startup.S: Likewise.
4835
4836 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
4837 during image generation. Implement --prefix option to override this
4838 patch.
4839 * util/i386/efi/grub-mkimage.c: Likewise.
4840
4841 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
4842 code to make path relative to its root into a separate function.
4843
4844 * util/i386/pc/grub-install.in: Use newly provided
4845 make_system_path_relative_to_its_root() to convert ${grubdir}, then
4846 pass the result to grub-install --prefix.
4847
baa574b4 48482007-06-13 Robert Millan <rmh@aybabtu.com>
4849
4850 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
4851 DEFAULT_DEVICE_MAP.
4852 * util/grub-emu.c: Use above definitions from misc.h instead of
4853 defining them.
4854 * util/grub-mkdevicemap.c: Likewise.
4855 * util/i386/pc/grub-setup.c: Likewise.
4856 * util/grub-probe.c: Likewise.
4857 (probe): Abort with grub_util_error() when either
4858 grub_guess_root_device or grub_util_get_grub_dev fails.
4859
0215dcbf 48602007-06-12 Robert Millan <rmh@aybabtu.com>
4861
4862 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
4863 "pager" assignment.
4864 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
4865 "pcdata".
4866 * util/grub-probe.c (probe): Likewise for "drive_name".
4867
8af2ab7b 48682007-06-11 Robert Millan <rmh@aybabtu.com>
4869
4870 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
4871 not just the cdrom one.
4872
59d31694 48732007-06-11 Robert Millan <rmh@aybabtu.com>
4874
4875 * util/i386/pc/grub-mkrescue.in: Add "set -e".
4876 Add --pkglibdir=DIR option to override pkglibdir.
4877 Mention --image-type=TYPE in help output.
4878 Fix --grub-mkimage (it was a no-op).
fe6b695a 4879 Abort gracefully when no parameter is given.
59d31694 4880
7ee367e4 48812007-06-11 Robert Millan <rmh@aybabtu.com>
4882
4883 * util/i386/pc/grub-mkrescue.in: New file.
4884 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
4885 * Makefile.in: Handle bin_SCRIPTS.
4886
29b0ed46 48872007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
4888
4889 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
4890 list of video modes.
4891
c0f90770 48922007-06-06 Robert Millan <rmh@aybabtu.com>
4893
4894 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
4895 file doesn't exist, or if it is in a filesystem grub can't read.
4896
4897 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
4898 not abort if GRUB_DRIVE could not be defined. Rearrange generated
4899 header comment to fit in 80 columns when the variables are resolved.
4900
4901 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
4902 could be identified by update-grub. Remove redundant check for
fe6b695a 4903 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 4904 handles that).
4905
fb36dc26 49062007-06-04 Robert Millan <rmh@aybabtu.com>
4907
4908 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
4909
4910 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
4911
4912 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
4913
0c68c93e 49142007-06-04 Robert Millan <rmh@aybabtu.com>
4915
4916 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
4917
4918 * include/grub/partition.h: Declare grub_apple_partition_map_init and
4919 grub_apple_partition_map_fini.
4920
4921 * util/biosdisk.c
4922 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
4923 to access >2 TiB disks).
4924
4925 Print disk->total_sectors with %llu instead of %lu, since this
4926 variable is always 64-bit (prevents wrong disk size from being displayed
4927 on either >2 TiB disk or big-endian CPU).
4928
4929 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
4930 into a generic case that supports all (sane) partition maps.
4931
4932 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
4933 breaks big-endian.
4934
4935 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
4936 and grub_apple_partition_map_fini() after that.
4937
0f23eb74 49382007-06-01 Robert Millan <rmh@aybabtu.com>
4939
4940 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
4941
4942 * util/grub.d/00_header.in: Only enable gfxterm when
4943 convert_system_path_to_grub_path() succeeds.
4944
42c71976 49452007-05-20 Robert Millan <rmh@aybabtu.com>
4946
4947 * util/update-grub_lib.in: New file.
4948 * DISTLIST: Add update-grub_lib.in.
4949 * conf/common.rmk: Generate update-grub_lib and install it in
4950 $(lib_DATA).
4951 * Makefile.in: Add install routine for $(lib_DATA).
4952
4953 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
4954 function provided by update-grub_lib to support arbitrary paths of
4955 unifont.pff.
4956 * util/update-grub.in: Use convert_system_path_to_grub_path() to
4957 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
4958
5beb2291 49592007-05-19 Robert Millan <rmh@aybabtu.com>
4960
4961 * commands/i386/cpuid.c: New module.
4962 * DISTLIST: Add it.
4963 * conf/i386-efi.rmk: Enable cpuid.mod.
4964 * conf/i386-pc.rmk: Likewise.
4965
7262eca1 49662007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4967
4968 * kern/disk.c (grub_disk_read): Check return value of
4969 grub_realloc().
4970
260ba823 49712007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
4972
4973 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
4974 arrays.
4975 * disk/raid.c (grub_raid_open): Likewise.
4976
1ecb6cf2 49772007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4978
4979 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
4980 stack instead of on the heap.
4981
4982 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
4983 before doing a read on it.
4984
4985 * configure.ac: Only use -fno-stack-protector for the target
4986 environment.
f19dbdb7 4987
21c8cbb1 49882007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
4989
4990 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
4991 __attribute_ ((unused)) to mode_type argument.
4992
4993 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 4994
21c8cbb1 4995 * kern/misc.c (memcmp): Fix prototype.
4996
4997 * include/grub/partition.h [GRUB_UTIL]
4998 (grub_gpt_partition_map_init): Add prototype.
4999 (grub_gpt_partition_map_fini): Likewise.
5000
5001 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
5002 at the right place.
5003
5004 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
5005 (grub_fat_read_data): Likewise.
5006 (grub_fat_find_dir): Likewise.
5007
5008 * font/manager.c (find_glyph): Make table a const.
5009 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 5010
849d55d3 50112007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
5012
5013 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
5014 code, first search for device in /dev/mapper, then in /dev.
5015 (grub_util_get_grub_dev): New function.
5016 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
5017 prototype.
5018 * util/grub-probe.c (probe): Remove check for RAID, call
5019 grub_util_get_grub_dev() instead of
5020 grub_util_biosdisk_get_grub_dev().
5021 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
5022 grub_util_biosdisk_get_grub_dev().
5023 * util/i386/pc/grub-setup.c (main): Likewise.
5024
8fff7c2f 50252007-05-16 Robert Millan <rmh@aybabtu.com>
5026
5027 * DISTLIST: Update for the latest changes.
5028 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
5029 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
5030 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
5031 grub/util/biosdisk.h.
5032 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
5033 grub/util/biosdisk.h.
5034
48e12b52 50352007-05-16 Robert Millan <rmh@aybabtu.com>
5036
5037 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
5038
46b9d128 50392007-05-16 Robert Millan <rmh@aybabtu.com>
5040
5041 * util/i386/efi/grub-install.in: New.
5042 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
5043 newly added grub-install.
5044 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
5045 include.
5046 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
5047 grub/util/biosdisk.h.
5048 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
5049 grub/util/biosdisk.h.
5050
2d1a40a9 50512007-05-16 Robert Millan <rmh@aybabtu.com>
5052
5053 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
5054 * include/grub/util/biosdisk.h: ... here.
5055 * util/i386/pc/biosdisk.c: Moved to ...
5056 * util/biosdisk.c: ... here.
5057 * util/i386/pc/getroot.c: Moved to ...
5058 * util/getroot.c: ... here.
5059 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
5060 * util/grub-mkdevicemap.c: ... here.
5061 * util/i386/pc/grub-probe.c: Moved to ...
5062 * util/grub-probe.c: ... here.
5063
9e26e3bc 50642007-05-15 Robert Millan <rmh@aybabtu.com>
5065
5066 * util/update-grub.in: Remove duplicated line in grub.cfg header
5067 message.
5068
57f96397 50692007-05-13 Robert Millan <rmh@aybabtu.com>
5070
5071 * util/update-grub.in: Fix a few assumptions about the devices holding
5072 /, /boot and /boot/grub being the same.
5073 * util/grub.d/00_header.in: Likewise.
5074 * util/grub.d/10_hurd.in: Likewise.
5075 * util/grub.d/10_linux.in: Likewise.
5076
5077 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
5078 patterns. Use that to define the `.old' suffix as older than `'.
5079
5080 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
5081
5082 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
5083 the grub.cfg header message.
5084
2e610d62 50852007-05-11 Robert Millan <rmh@aybabtu.com>
5086
5087 * util/update-grub.in: Create device.map if it doesn't already exist,
5088 before attempting to run grub-probe.
5089 Check for grub-probe and grub-mkdevicemap with the same code
5090 grub-install is using.
5091 Remove test mode.
5092
3f6a10ef 50932007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
5094
5095 * Makefile.in: Add the datarootdir autoconf variable.
5096
02e7b75e 50972007-05-09 Robert Millan <rmh@aybabtu.com>
5098
5099 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 5100 fail gracefully if dev->disk->partition == NULL.
02e7b75e 5101
75f396cc 51022007-05-07 Robert Millan <rmh@aybabtu.com>
5103
5104 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
5105 determine partition map module.
5106 * util/i386/pc/grub-install.in: Use this feature to decide which
5107 partition module to load, instead of hardcoding pc and gpt.
5108
da65cb36 51092007-05-07 Robert Millan <rmh@aybabtu.com>
5110
5111 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
5112 source directory differs from build directory.
5113
b57d6a91 51142007-05-05 Robert Millan <rmh@aybabtu.com>
5115
5116 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
5117 initialisation.
5118
509d00f1 51192007-05-05 Robert Millan <rmh@aybabtu.com>
5120
5121 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
5122
c48f23ef 51232007-05-05 Robert Millan <rmh@aybabtu.com>
5124
5125 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
5126 command-line arguments via ${GRUB_CMDLINE_LINUX}.
5127
20b97658 51282007-05-05 Robert Millan <rmh@aybabtu.com>
5129
5130 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
5131 (grub_probe_SOURCES): Likewise.
5132 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
5133 GPT and initialize dos_part and bsd_part accordingly.
5134 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
5135 install_bsd_part.
5136 (main): Activate gpt module for use during partition identification,
5137 and deactivate it afterwards.
5138 * util/i386/pc/grub-install.in: Add gpt module to core.img.
5139 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
5140 partition identification, and deactivate it afterwards.
5141
99123174 51422007-05-05 Robert Millan <rmh@aybabtu.com>
5143
5144 * term/i386/pc/console.c (grub_console_fini): Call
5145 grub_term_set_current() before grub_term_unregister().
5146
ebd97f6e 51472007-05-04 Robert Millan <rmh@aybabtu.com>
5148
5149 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
5150 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
5151 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
5152 and update-grub_DATA.
5153 * conf/common.rmk: Build and install update-grub components.
5154 * conf/common.mk: Regenerate.
5155 * util/update-grub.in: New. Core of update-grub.
5156 * util/grub.d/00_header.in: New. Generates grub.cfg header.
5157 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
5158 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
5159 * util/grub.d/README: New. Document grub.d directory layout.
5160
b06a264d 51612007-05-01 Robert Millan <rmh@aybabtu.com>
5162
5163 * util/grub-emu.c: Move initialization functions
5164 grub_util_biosdisk_init() and grub_init_all() before
5165 grub_util_biosdisk_get_grub_dev(), which relies on them.
5166
41f0050e 51672007-04-19 Robert Millan <rmh@aybabtu.com>
5168
5169 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
5170 it is used later.
5171
04582bb3 51722007-04-18 Jerone Young <jerone@gmail.com>
5173
f19dbdb7 5174 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 5175 stanza.
5176
08db4632 51772007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 5178
08db4632 5179 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
5180 continue on and look for device node with real device name.
5181
801b76be 51822007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 5183
fe6b695a 5184 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 5185 ability.
5186 * Makefile.in: Add autoconf package transformation code.
5187 * util/i386/pc/grub-install.in: Likewise.
5188 * util/powerpc/ieee1275/grub-install.in: Likewise.
5189
6795c4e1 51902007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
5191
5192 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
5193 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
5194 (EXT2_REVISION): Likewise.
5195 (EXT2_INODE_SIZE): Likewise.
5196 (struct grub_ext2_block_group): Added a missing member
5197 "used_dirs".
5198 (grub_ext2_read_inode): Divide by the inode size in a superblock
5199 instead of 128 to obtain INODES_PER_BLOCK.
5200 Use the macro EXT2_INODE_SIZE instead of directly using
5201 SBLOCK->INODE_SIZE.
5202
d70af616 52032007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
5204
5205 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
5206 superblock instead of the structure size to compute an
5207 offset. This fixes the problem that GRUB could not read a
5208 filesystem when inode size is different from 128-byte.
5209
3b801603 52102007-03-05 Marco Gerards <marco@gnu.org>
5211
5212 * normal/main.c (read_config_file): When "menu" is not set, create
5213 an initial context.
5214
4785bfe4 52152007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5216
5217 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
5218 (HEAP_LIMIT): New macro.
5219 (grub_claim_heap): Claim memory up to `heaplimit'.
5220
a0cbb023 52212007-02-21 Hollis Blanchard <hollis@penguinppc.org>
5222
5223 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
5224 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
5225 (_start): Likewise.
5226 (grub_arch_modules_addr): Return address after `_end'.
5227 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
5228 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
5229 (add_segments): Calculate `_end' from phdr size and location.
5230 (ALIGN_UP): Moved to ...
5231 * include/grub/misc.h: here.
5232 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5233 New macro.
5234 (GRUB_IEEE1275_MODULE_BASE): Removed.
5235
fd7d8eba 52362007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5237
5238 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
5239 loop boundary.
5240
9b09e6fc 52412007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5242
5243 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
5244 All users updated.
5245 (grub_elf64_load_hook_t): Likewise.
5246 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
5247 debug output.
5248
3ce27299 52492007-02-20 Hollis Blanchard <hollis@penguinppc.org>
5250
5251 * kern/mm.c: Update copyright.
5252 (grub_mm_debug): Correct syntax error.
5253 (grub_mm_dump_free): New function.
5254 (grub_debug_free): Call `grub_free'.
5255 * include/grub/mm.h: Update copyright.
5256 (grub_mm_dump_free): Add declaration.
5257
077d5fee 52582007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5259
5260 * include/grub/ieee1275/ieee1275.h: Update copyright.
5261 * kern/powerpc/ieee1275/init.c: Likewise.
5262 * kern/powerpc/ieee1275/openfw.c: Likewise.
5263
5264 * loader/powerpc/ieee1275/linux.c: Likewise.
5265 * include/grub/elfload.h: Likewise.
5266 * kern/elf.c: Likewise.
5267 (grub_elf32_load): Pass `base' and `size' parameters. Update all
5268 callers.
5269 (grub_elf64_load): Likewise.
5270 (grub_elf32_load_segment): Move to a nested function.
5271 (grub_elf64_load_segment): Likewise.
5272
dc946850 52732007-02-12 Hollis Blanchard <hollis@penguinppc.org>
5274
5275 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
5276 prototype.
5277 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
5278 (grub_heap_len): Likewise.
5279 (HEAP_SIZE): New macro.
5280 (grub_claim_heap): New function.
5281 (grub_machine_init): Don't claim heap directly. Call
5282 `grub_claim_heap'.
5283 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
5284 (grub_available_iterate): New function.
5285
baa2a121 52862007-02-03 Thomas Schwinge <tschwinge@gnu.org>
5287
5288 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
5289 * configure.ac: Use it for testing the HOST and TARGET compilers.
5290
4fe9862e 52912006-12-13 Thomas Schwinge <tschwinge@gnu.org>
5292
5293 * Makefile.in (enable_grub_emu): New variable.
5294 * configure.ac (--enable-grub-emu): New option.
5295 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
5296 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
5297 * conf/i386-pc.rmk: Likewise.
5298 * conf/powerpc-ieee1275.rmk: Likewise.
5299 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
5300
a8aa5762 53012006-12-12 Marco Gerards <marco@gnu.org>
5302
5303 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
5304
5305 * kern/env.c (grub_env_unset): Don't free the member `value' when
5306 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
5307 pointer.
5308
5309 * normal/main.c (current_menu): Removed.
5310 (free_menu): Unset the `menu' environment variable.
5311 (grub_normal_menu_addentry): Make use of the environment variable
5312 `menu', instead of using the global `current_menu'. Allocate
5313 memory for the sourcecode of this entry.
5314 (read_config_file): New argument `nested', changed all callers.
5315 Only in the case of a new context, initialize a new menu. Set the
5316 `menu' environment variable.
5317 (grub_normal_execute): Don't set and unset the environment
5318 variable `menu' here anymore. Only free the menu when leaving the
5319 context.
5320
5321 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
5322 leak.
5323
957b3a3e 53242006-12-11 Marco Gerards <marco@gnu.org>
5325
5326 * normal/menu_entry.c (run): Fix off by one bug so the last line
5327 is executed. Move the loader check to outside the loop.
5328
ef875714 53292006-12-08 Hollis Blanchard <hollis@penguinppc.org>
5330
5331 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
5332
4e739985 53332006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
5334
5335 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
5336 the number of sectors. Reported by Andrey Shuvikov
5337 <mr_hyro@yahoo.com>.
f19dbdb7 5338
790707f2 53392006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
5340
5341 * kern/disk.c (grub_disk_read): When there is a read error, always
5342 try to read only the necessary data.
f19dbdb7 5343
790707f2 5344 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
5345 disk/raid.c.
5346 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
5347 prototype.
5348 [GRUB_UTIL] (grub_raid_fini): Likewise.
5349 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 5350 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 5351 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
5352 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
5353 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
5354 and grub_raid_fini().
f19dbdb7 5355
03e58196 53562006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5357
5358 * include/grub/types.h (__unused): Rename to UNUSED.
5359 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
5360 (grub_elf64_size): Likewise.
f19dbdb7 5361
ae4f23bf 53622006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5363
5364 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
5365 grub_error_push and grub_error_pop in the error-handling path.
5366 (grub_elf32_load_segment): Only call grub_file_read with non-zero
5367 length.
5368
2166cc83 53692006-11-03 Hollis Blanchard <hollis@penguinppc.org>
5370
5371 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
5372 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5373 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5374 (kernel_elf_SOURCES): Likewise.
5375 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
5376 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
5377 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5378 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5379 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
5380 (elf_mod_SOURCES): New variable.
5381 (elf_mod_CFLAGS): Likewise.
5382 (elf_mod_LDFLAGS): Likewise.
5383 * include/grub/types.h (__unused): New macro.
5384 * include/grub/elfload.h: New file.
5385 * kern/elf.c: Likewise.
5386 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
5387 (ELF32_LOADMASK): New macro.
5388 (ELF64_LOADMASK): Likewise.
5389 (vmlinux): Removed.
5390 (grub_linux_load32): New function.
5391 (grub_linux_load64): Likewise.
5392 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
5393 Use grub_elf_t instead of grub_file_t.
5394
a09d5aa5 53952006-11-02 Hollis Blanchard <hollis@penguinppc.org>
5396
5397 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
5398 `catch_result' to struct set_color_args.
5399
d976fc51 54002006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5401
5402 * normal/menu.c: Include grub/script.h.
5403 * normal/menu_entry.c: Likewise.
5404 * include/grub/normal.h: Do not include grub/script.h.
5405
67507549 54062006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5407
5408 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
5409
69203a99 54102006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5411
5412 * kern/disk.c (grub_disk_open): Print debug messages when opening a
5413 disk.
5414 (grub_disk_close): Print debug messages when closing a disk.
5415 (grub_disk_read): Print debug messages when disk read fails.
5416 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
5417 filesystem type.
5418 * kern/partition.c: Include misc.h.
5419 (grub_partition_iterate): Print debug messages when detecting
5420 partition type.
5421
e2b8278c 54222006-10-27 Hollis Blanchard <hollis@penguinppc.org>
5423
5424 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
5425 is negative.
5426 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
5427
97b2f2ff 54282006-10-26 Hollis Blanchard <hollis@penguinppc.org>
5429
5430 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5431 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
5432
6555d655 54332006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
5434
5435 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
5436 instead of sizeof(lv). Patch by Michael Guntsche.
5437
4d42b77f 54382006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
5439
5440 * disk/lvm.c: Rename VGS to VG_LIST.
5441 (grub_lvm_iterate): Change VGS->LV to VG-LV.
5442 (grub_lvm_open): Likewise.
5443 Thanks to Michael Guntsche for finding this bug.
5444
5d74d927 54452006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5446
5447 * configure.ac (AC_INIT): Bumped to 1.95.
5448
a1bb27e4 54492006-10-14 Robert Millan <rmh@aybabtu.com>
5450
5451 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
5452 with "/dev/.static/dev/md".
5453
e0994b8b 54542006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5455
5456 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
5457 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
5458 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
5459 DRIVE_NAME are always freed.
5460
5461 * util/i386/pc/biosdisk.c (make_device_name): Add one into
5462 DOS_PART, as a DOS partition is counted from one instead of zero
5463 now. Reported by Robert Millan.
5464
ddd5cee9 54652006-10-14 Robert Millan <rmh@aybabtu.com>
5466
5467 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
5468 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
5469 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
5470 string returned by grub_guess_root_device.
5471 * util/i386/pc/grub-setup.c: Likewise.
5472 * util/i386/pc/grub-probefs.c: Likewise.
5473
5474 * util/i386/pc/grub-probefs.c: Rename to ...
5475 * util/i386/pc/grub-probe.c: ... this.
5476 * DISTLIST: Remove grub-probefs, add grub-probe.
5477 * conf/i386-efi.rmk: Likewise.
5478 * conf/i386-pc.rmk: Likewise.
5479 * util/i386/pc/grub-install.in: Likewise.
5480
5481 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
5482 choose which information we want to print.
5483
2b002173 54842006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
5485
5486 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
5487 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
5488 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
5489 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
5490 video/readers/tga.c and video/i386/pc/vbeutil.c.
5491
54922006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
5493
5494 Added support for RAID and LVM.
f19dbdb7 5495
2b002173 5496 * disk/lvm.c: New file.
5497 * disk/raid.c: Likewise.
5498 * include/grub/lvm.h: Likewise.
f19dbdb7 5499 * include/grub/raid.h: Likewise.
2b002173 5500 * include/grub/util/lvm.h: Likewise.
5501 * include/grub/util/raid.h: Likewise.
5502 * util/lvm.c: Likewise.
5503 * util/raid.c: Likewise.
5504
5505 * include/grub/disk.h (grub_disk_dev_id): Add
5506 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
5507 (grub_disk_get_size): New prototype.
5508 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
5509 returns a partition.
5510 (grub_disk_get_size): New function.
f19dbdb7 5511
2b002173 5512 * kern/i386/pc/init.c (make_install_device): Copy the prefix
5513 verbatim if grub_install_dos_part is -2.
5514
5515 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
5516 and LVM devices.
5517
5518 * util/i386/pc/grub-setup.c (setup): New argument
5519 MUST_EMBED. Force embedding of GRUB when the argument is
5520 true. Close FILE before returning.
5521 (main): Add support for RAID and LVM.
f19dbdb7 5522
2b002173 5523 * conf/common.rmk: Add RAID and LVM modules.
5524 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
5525 util/lvm.c.
5526 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
5527
5528 * kern/misc.c (grub_strstr): New function.
5529 * include/grub/misc.h (grub_strstr): New prototype.
5530
050548d0 55312006-10-10 Tristan Gingold <tristan.gingold@bull.net>
5532
5533 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
5534
da849d2d 55352006-10-05 Tristan Gingold <tristan.gingold@bull.net>
5536
5537 * kern/misc.c (grub_strtoull): Guess the base only if not
5538 specified.
5539
97b2f2ff 55402006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 5541
5542 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
5543 PowerMac support.
5544
97b2f2ff 55452006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 5546
5547 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
5548
5549 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
5550 Remove `flags' argument. All callers changed.
5551 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
5552 (IEEE1275_IHANDLE_INVALID): New variable.
5553 (IEEE1275_CELL_INVALID): New variable.
5554 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
5555 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
5556 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
5557 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
5558 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
5559 codes from Open Firmware. All callers updated.
5560 (grub_ieee1275_next_property): Directly return Open Firmware return
5561 code.
5562 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
5563 Standardize error checking from `grub_ieee1275_get_property'.
5564 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
5565 `devalias' to `aliases'. Correct comments. Consolidate error paths.
5566
97b2f2ff 55672006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 5568
5569 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
5570 `instance_to_package_args' to `instance_to_path_args'.
5571
5572 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
5573 `grub_ieee1275_chosen'.
5574
5575 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
5576 `grub_ieee1275_interpret'.
5577
97b2f2ff 55782006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 5579
5580 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
5581
97b2f2ff 55822006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 5583
5584 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
5585 (__cmpdi): Likewise.
5586
5587 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
5588 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
5589 `grub_ssize_t'.
5590
02bb8acc 5591 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 5592
5593 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
5594 to type `grub_ssize_t'.
5595 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
5596
7f9a8531 55972006-09-22 Marco Gerards <marco@gnu.org>
5598
5599 * normal/script.c (grub_script_create_cmdmenu): Skip leading
5600 newlines.
5601
b5ef1102 56022006-09-22 Marco Gerards <marco@gnu.org>
5603
5604 * commands/echo.c: New file.
5605
5606 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
5607
5608 * conf/common.rmk (echo_mod_SOURCES): New variable.
5609 (echo_mod_CFLAGS): Likewise.
5610 (echo_mod_LDFLAGS): Likewise.
5611
2cff3677 56122006-09-22 Marco Gerards <marco@gnu.org>
5613
5614 * normal/main.c (get_line): Malloc memory instead of using
5615 preallocated memory. Removed the arguments `cmdline' and
5616 `max_len'. Updated all callers.
5617
6ba4688b 56182006-09-22 Marco Gerards <marco@gnu.org>
5619
5620 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
5621 (normal_mod_DEPENDENCIES): Likewise.
5622
5623 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
5624 (normal_mod_DEPENDENCIES): Likewise.
5625
5626 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
5627
e02ac02c 56282006-09-22 Johan Rydberg <jrydberg@gnu.org>
5629
5630 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
5631 programs.
5632 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
5633 (normal_mod_DEPENDENCIES): Likewise.
5634 * conf/i386-pc.mk: Regenerate.
5635 * conf/i386-efi.mk: Likewise
5636 * conf/common.mk: Likewise.
5637 * conf/powerpc-ieee1275.mk: Likewise.
5638 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 5639
8d252e44 56402006-09-22 Robert Millan <rmh@aybabtu.com>
5641
5642 Sync with i386 version.
5643 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
5644 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
5645
209bf7ac 56462006-09-21 Robert Millan <rmh@aybabtu.com>
5647
5648 Import from GRUB Legacy (lib/device.c):
5649 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
5650 (init_device_map) [__linux__]: Add support for I2O devices.
5651
6b146090 56522006-09-14 Marco Gerards <marco@gnu.org>
5653
5654 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
5655 `-melf_i386'.
5656
e38600a8 56572006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 5658
5659 * util/i386/pc/grub-install.in: Skip menu.lst when removing
5660 /boot/grub/*.lst.
78fa1790 5661
2952da5d 5662 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 5663
2952da5d 5664 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
5665 before adding it to device.map.
5666
01b82a64 56672006-08-15 Johan Rydberg <jrydberg@gnu.org>
5668
fe6b695a 5669 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 5670 compiles a file; using the -MD option.
5671 * conf/common.mk: Regenerate.
5672 * conf/i386-pc.mk: Likewise.
5673 * conf/i386-efi.mk: Likewise.
5674 * conf/powerpc-ieee1275.mk: Likewise.
5675 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 5676
1064790d 56772006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
5678
5679 Move the prototypes of grub_setjmp and grub_longjmp to
5680 cpu/setjmp.h, so that each architecture may specify different
5681 attributes.
f19dbdb7 5682
1064790d 5683 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
5684 (grub_longjmp): Likewise.
5685 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
5686 (grub_longjmp): Likewise.
5687 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
5688 (grub_longjmp): Likewise.
5689
5690 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
5691 [!GRUB_UTIL] (grub_longjmp): Removed.
5692
29dda3ed 56932006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
5694
5695 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
5696 "color!" method does not return any value.
5697
ad2a06ed 56982006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5699
5700 * include/grub/bitmap.h: New file.
5701
5702 * include/grub/i386/pc/vbeutil.h: Likewise.
5703
5704 * video/bitmap.c: Likewise.
5705
5706 * video/readers/tga.c: Likewise.
5707
5708 * video/i386/pc/vbeutil.c: Likewise.
5709
5710 * commands/videotest.c: Code cleanup and updated to reflect to new
5711 video API.
5712
5713 * term/gfxterm.c: Likewise.
5714
5715 * video/video.c: Likewise.
5716
5717 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
5718 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
5719 (bitmap_mod_SOURCES): New entry.
5720 (bitmap_mod_CFLAGS): Likewise.
5721 (bitmap_mod_LDFLAGS): Likewise.
5722 (tga_mod_SOURCES): Likewise.
5723 (tga_mod_CFLAGS): Likewise.
5724 (tga_mod_LDFLAGS): Likewise.
5725
5726 * include/grub/video.h (grub_video_blit_operators): New enum type.
5727 (grub_video_render_target): Changed as forward declaration and moved
5728 actual definition to be video driver specific.
5729 (grub_video_adapter.blit_bitmap): Added blitting operator.
5730 (grub_video_adapter.blit_render_target): Likewise.
5731 (grub_video_blit_bitmap): Likewise.
5732 (grub_video_blit_render_target): Likewise.
5733
5734 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
5735 driver specific render target definition.
5736 (grub_video_vbe_map_rgba): Added driver internal helper.
5737 (grub_video_vbe_unmap_color): Updated to use
5738 grub_video_i386_vbeblit_info.
5739 (grub_video_vbe_get_video_ptr): Likewise.
5740
5741 * include/grub/i386/pc/vbeblit.h
5742 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
5743 grub_video_i386_vbeblit_info.
5744 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5745 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5746 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5747 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5748 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5749 (grub_video_i386_vbeblit_index_index): Likewise.
5750 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
5751 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5752 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5753 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
5754 operator.
5755 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
5756 operator.
5757
5758 * video/i386/pc/vbeblit.c: Updated to reflect changes on
5759 include/grub/i386/pc/vbeblit.h.
5760
5761 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
5762 Updated to use grub_video_i386_vbeblit_info.
5763 (grub_video_i386_vbefill_R8G8B8): Likewise.
5764 (grub_video_i386_vbefill_index): Likewise.
5765 (grub_video_i386_vbefill): Added generic filler.
5766
5767 * video/i386/pc/vbefill.c: Updated to reflect changes on
5768 include/grub/i386/pc/vbefill.h.
5769
5770 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
5771 grub_video_i386_vbeblit_info.
5772 (grub_video_vbe_unmap_color): Likewise.
5773 (grub_video_vbe_blit_glyph): Likewise.
5774 (grub_video_vbe_scroll): Likewise.
5775 (grub_video_vbe_draw_pixel): Removed function.
5776 (grub_video_vbe_get_pixel): Likewise.
5777 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
5778 updated code to use it.
5779 (common_blitter): Added common blitter for render target and bitmap.
5780 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
5781 (grub_video_vbe_blit_render_target): Likewise.
5782
bc8c036d 57832006-07-30 Johan Rydberg <jrydberg@gnu.org>
5784
5785 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
5786 is in text mode if there is no console control protocol instance
5787 available.
5788
684a8eff 57892006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5790
5791 * include/grub/video.h: Code cleanup.
5792
5793 * include/grub/i386/pc/vbe.h: Likewise.
5794
5795 * video/i386/pc/vbe.c: Likewise.
5796
5797 * video/i386/pc/vbeblit.c: Likewise.
5798
5799 * video/i386/pc/vbefill.c: Likewise.
5800
5801 * video/video.c: Likewise. Also added more comments.
5802
5915059b 58032006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
5804
5805 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
5806 (struct grub_biosdisk_dap): Likewise.
5807
5808 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
5809 linkage settings for all functions.
5810
90ce5d56 58112006-07-12 Marco Gerards <marco@gnu.org>
5812
5813 * configure.ac (--enable-mm-debug): Fix typo.
5814
5815 * genkernsyms.sh.in: Use proper quoting for `CC'.
5816
43e7f879 58172006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
5818
5819 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
5820 (normal_mod_ASFLAGS): Remove "-m32".
5821
4889bdec 58222006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
5823
5824 * util/misc.c: Include config.h.
5825 [!HAVE_MEMALIGN]: Do not include malloc.h.
5826 (grub_memalign): Use posix_memalign, if present. Then, use
5827 memalign, if present. Otherwise, emit an error.
5828
5829 * util/grub-emu.c: Do not include malloc.h.
5830
5831 * include/grub/util/misc.h: Include unistd.h. This is required for
5832 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
5833 D. Eades III <hde@foobar-qux.org>.
5834
5835 * configure.ac (AC_GNU_SOURCE): Added.
5836 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
5837 type.
5838
fd39d4da 58392006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
5840
5841 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
5842 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
5843
b786f3b5 58442006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
5845
5846 * include/grub/types.h (grub_host_addr_t): Rename to
5847 grub_target_addr_t.
5848 (grub_host_off_t): Rename to grub_target_off_t.
5849 (grub_host_size_t): Rename to grub_target_size_t.
5850 (grub_host_ssize_t): Rename to grub_target_ssize_t.
5851 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
5852
5853 * include/grub/kernel.h (struct grub_module_header): Change type
5854 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
5855 (grub_module_info): Likewise.
f19dbdb7 5856
051988bb 58572006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5858
5859 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
5860 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
5861 Velazquez <jesus.velazquez@gmail.com>.
5862
deae281b 58632006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
5864
5865 Count partitions from 1 instead of 0 in the string representation
5866 of partitions. Still use 0-based internally.
f19dbdb7 5867
deae281b 5868 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
5869 (sun_partition_map_iterate): Use grub_partition_t instead of
5870 struct grub_partition *. Cast DESC->START_CYLINDER to
5871 grub_uint64_t after converting the endian.
5872 (sun_partition_map_probe): Subtract 1 for PARTNUM.
5873 (sun_partition_map_get_name): Add 1 to P->INDEX.
5874
5875 * partmap/pc.c (grub_partition_parse): Subtract 1 for
5876 PCDATA->DOS_PART.
5877 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
5878
5879 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
5880 zero instead of one.
5881 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
5882 (gpt_partition_map_get_name): Add 1 into P->INDEX.
5883
5884 * partmap/apple.c (apple_partition_map_iterate): Change the type
5885 of POS to unsigned.
5886 (apple_partition_map_probe): Subtract 1 for PARTNUM.
5887 (apple_partition_map_get_name): Add 1 into P->INDEX.
5888
5889 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
5890 of POS to unsigned.
5891 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
5892 calculate the offset of a partition.
5893 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
5894 (amiga_partition_map_get_name): Add 1 into P->INDEX.
5895
5896 * partmap/acorn.c (acorn_partition_map_find): Change the type of
5897 SECTOR to grub_disk_addr_t.
5898 (acorn_partition_map_iterate): Likewise.
5899 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
5900 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
5901 top.
5902 (acorn_partition_map_get_name): Add 1 into P->INDEX.
5903
5904 * kern/i386/pc/init.c (make_install_device): Add 1 into
5905 GRUB_INSTALL_DOS_PART.
5906
5907 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
5908 conditional.
5909
524a1e6a 59102006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
5911
5912 Clean up the code to support 64-bit addressing in disks and
5913 files. This change is not enough for filesystems yet.
f19dbdb7 5914
524a1e6a 5915 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
5916 type of "start" to grub_uint64_t.
5917 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
5918 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
5919 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
5920 convert addresses.
5921
5922 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
5923 to grub_disk_addr_t.
5924
5925 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
5926 string.
5927
5928 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5929
5930 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
5931 to char *.
5932
5933 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
5934
5935 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
5936
5937 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
5938
5939 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
5940 to grub_off_t, to detect an error from grub_file_seek.
5941 (grub_multiboot_load_elf32): Likewise.
5942
5943 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
5944 maximum unsigned long value when an overflow is detected.
5945 (grub_strtoull): New function.
5946 (grub_divmod64): Likewise.
5947 (grub_lltoa): use grub_divmod64.
5948
5949 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
5950 grub_disk_addr_t.
5951 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
5952 the pointer to next character. Use grub_strtoull instead of
5953 grub_strtoul.
5954 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
5955 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
5956 respectively.
5957
fe6b695a 5958 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 5959 return value is signed.
5960 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
5961 test if OFFSET is less than zero, as OFFSET is unsigned now.
5962
5963 * kern/disk.c (struct grub_disk_cache): Change the type of
5964 "sector" to grub_disk_addr_t.
5965 (grub_disk_cache_get_index): Change the type of SECTOR to
5966 grub_disk_addr_t. Calculate the hash with SECTOR casted to
5967 unsigned after shifting.
5968 (grub_disk_cache_invalidate): Change the type of SECTOR to
5969 grub_disk_addr_t.
5970 (grub_disk_cache_unlock): Likewise.
5971 (grub_disk_cache_store): Likewise.
5972 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
5973 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
5974 grub_disk_addr_t and grub_uint64_t, respectively.
5975 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
5976 body, as the value of OFFSET is tweaked by
5977 grub_disk_check_range. Change the types of START_SECTOR, LEN and
5978 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
5979 respectively.
5980 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
5981 body, as the value of OFFSET is tweaked by
5982 grub_disk_check_range. Change the types of LEN and N to
5983 grub_size_t.
5984
5985 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
5986 and "saved_offset" to grub_off_t.
5987 (test_header): Cast BUF to char *.
5988 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
5989 to char *.
5990 (grub_gzio_read): Change the types of OFFSET and SIZE to
5991 grub_off_t and grub_size_t, respectively.
5992
5993 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
5994 Removed.
5995 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
5996 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
5997 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
5998 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
5999 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
6000
6001 * include/grub/types.h (grub_off_t): Unconditionally set to
6002 grub_uint64_t.
6003 (grub_disk_addr_t): Changed to grub_uint64_t.
6004
6005 * include/grub/partition.h (struct grub_partition): Change the
6006 types of "start", "len" and "offset" to grub_disk_addr_t,
6007 grub_uint64_t and grub_disk_addr_t, respectively.
6008 (grub_partition_get_start): Return grub_disk_addr_t.
6009 (grub_partition_get_len): Return grub_uint64_t.
6010
6011 * include/grub/misc.h (grub_strtoull): New prototype.
6012 (grub_divmod64): Likewise.
6013
6014 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
6015 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
6016 grub_off_t, respectively.
6017 All callers and references changed.
6018
6019 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
6020 grub_size_t in "read".
6021 All callers and references changed.
6022
6023 * include/grub/file.h (struct grub_file): Change the types of
6024 "offset" and "size" to grub_off_t and grub_off_t,
6025 respectively. Change the type of SECTOR to grub_disk_addr_t in
6026 "read_hook".
6027 (grub_file_read): Change the type of LEN to grub_size_t.
6028 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
6029 grub_off_t.
6030 (grub_file_size): Return grub_off_t.
6031 (grub_file_tell): Likewise.
6032 All callers and references changed.
6033
6034 * include/grub/disk.h (struct grub_disk_dev): Change the types of
6035 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
6036 "write".
6037 (struct grub_disk): Change the type of "total_sectors" to
6038 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 6039 "read_hook".
524a1e6a 6040 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
6041 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
6042 (grub_disk_write): Likewise.
6043 All callers and references changed.
6044
6045 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
6046 char * for grub_strncmp to silence gcc.
6047 (grub_iso9660_mount): Likewise.
6048 (grub_iso9660_mount): Likewise.
6049 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
6050 return statement.
6051 (grub_iso9660_iterate_dir): Likewise.
6052 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
6053
6054 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
6055 LEN to grub_disk_addr_t and grub_size_t, respectively.
6056
6057 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6058
6059 * fs/jfs.c (grub_jfs_read_file): Likewise.
6060
6061 * fs/minix.c (grub_jfs_read_file): Likewise.
6062
6063 * fs/sfs.c (grub_jfs_read_file): Likewise.
6064
6065 * fs/ufs.c (grub_jfs_read_file): Likewise.
6066
6067 * fs/xfs.c (grub_jfs_read_file): Likewise.
6068
6069 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
6070 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
6071 respectively.
6072
6073 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
6074 BLKNR to -1 instead of returning GRUB_ERRNO.
6075 (grub_ext2_read_file): Change the types of SECTOR and
6076 LEN to grub_disk_addr_t and grub_size_t, respectively.
6077
6078 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
6079 LEN to grub_disk_addr_t and grub_size_t, respectively.
6080
6081 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
6082 grub_file_read.
6083
6084 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
6085 string. Do not cast SECTOR explicitly.
6086
6087 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
6088 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
6089 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
6090 grub_disk_addr_t and grub_size_t, respectively. If the sector is
6091 over 2TB and LBA mode is not supported, raise an error.
6092 (get_safe_sectors): New function.
6093 (grub_biosdisk_read): Use get_safe_sectors.
6094 (grub_biosdisk_write): Likewise.
6095
6096 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
6097 (grub_efidisk_write): Likewise.
6098
6099 * disk/loopback.c (delete_loopback): Cosmetic changes.
6100 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
6101 correctly.
6102 (grub_loopback_open): Likewise.
6103 (grub_loopback_read): Likewise. Also, change the type of POS to
6104 grub_off_t, and fix the usage of grub_memset.
6105
6106 * commands/i386/pc/play.c: Include grub/machine/time.h.
6107
6108 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
6109 print FILE->SIZE.
6110
6111 * commands/configfile.c: Include grub/env.h.
6112
6113 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
6114 GRUB_ERRNO directly instead. Change the type of POS to
6115 grub_off_t. Follow the coding standard.
6116
6117 * commands/blocklist.c: Include grub/partition.h.
6118 (grub_cmd_blocklist): Return an error if the underlying device is
6119 not a disk. Take the starting sector of a partition into account,
6120 if a partition is used.
6121
6122 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
6123 a length field.
6124 (lba_mode): Support 64-bit addresses.
6125 (chs_mode): Likewise.
6126 (copy_buffer): Adapted to the new offsets of a length field and a
6127 segment field.
6128 (blocklist_default_start): Allocate 64-bit space.
6129
6130 * boot/i386/pc/boot.S (force_lba): Removed.
6131 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 6132 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 6133 space.
6134 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
6135 is useless.
6136 (lba_mode): Refactored to support a 64-bit address. More size
6137 optimization.
6138 (setup_sectors): Likewise.
6139
53af98ad 61402006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
6141
6142 * DISTLIST: Added include/grub/i386/linux.h. Removed
6143 include/grub/i386/pc/linux.h
6144
6145 * configure.ac (AC_INIT): Bumped to 1.94.
6146
6147 * config.guess: Updated from gnulib.
6148 * config.sub: Likewise.
6149 * install-sh: Likewise.
6150 * mkinstalldirs: Likewise.
6151
b4c1940a 61522006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6153
6154 * conf/common.rmk (grub_modules_init.lst): Depended on
6155 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
6156 MODSRCFILES.
6157
6158 * genmk.rb (PModule::rule): Reverted the previous change.
6159
cfca1cfd 61602006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6161
6162 * conf/common.rmk (grub_modules_init.lst): Depends on
6163 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
6164 that the target does not exist before producing.
6165 (grub_modules_init.h): Remove the target before generating.
6166 (grub_emu_init.c): Likewise.
6167
6168 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
6169
aa6d7826 61702006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
6171
6172 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
6173 for the target-specific tests. Make sure that we also have the
6174 up-to-date target variables for those tests.
6175
26c607b9 61762006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
6177
6178 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
6179 (PModule::rule): Likewise.
6180
0162321a 61812006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
6182
6183 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
6184 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
6185 target-specific flags should be prefixed.
6186 (PModule::rule): Likewise.
6187
6c826348 61882006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
6189
6190 * configure.ac (CMP): Check if cmp is available explicitly.
6191
b977bf01 61922006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
6193
6194 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
6195 (target_cpu): New variable.
6196 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 6197
b977bf01 6198 * util/i386/pc/grub-install.in (host_cpu): Removed.
6199 (target_cpu): New variable.
6200 (pkglibdir): Use target_cpu instead of host_cpu.
6201
6202 * util/genmoddep.c: Removed.
f19dbdb7 6203
b977bf01 6204 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
6205 instead of GRUB_HOST_SIZEOF_VOID_P.
6206 * kern/dl.c: Likewise.
6207
6208 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
6209 ...
6210 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6211 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6212 (GRUB_TARGET_SIZEOF_LONG): ... this.
6213 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6214 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6215 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6216 to ...
6217 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6218 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6219 (GRUB_TARGET_SIZEOF_LONG): ... this.
6220 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6221 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6222 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
6223 to ...
6224 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
6225 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
6226 (GRUB_TARGET_SIZEOF_LONG): ... this.
6227 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
6228 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
6229
6230 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
6231 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
6232 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
6233 instead of GRUB_HOST_SIZEOF_LONG.
6234 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
6235 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
6236 GRUB_CPU_WORDS_BIGENDIAN.
6237 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
6238 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
6239 grub_host_ssize_t.
6240
6241 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
6242 (genmoddep_SOURCES): Likewise.
6243 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
6244 (genmoddep_SOURCES): Likewise.
6245 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
6246 (genmoddep_SOURCES): Likewise.
6247 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
6248 Likewise.
6249 (genmoddep_SOURCES): Likewise.
6250
6251 * genmoddep.awk: New file.
6252
6253 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
6254 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
6255 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
6256 (PModule::rule): Likewise.
6257 (Program::rule): Likewise.
6258 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
6259 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
6260 respectively.
6261
6262 * configure.ac: Rewritten intensively to use host and target
6263 instead of build and host, respectively.
6264
6265 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
6266 (host_cpu): Removed.
6267 (target_cpu): New variable.
6268 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
6269 (BUILD_CC): Removed.
6270 (BUILD_CFLAGS): Likewise.
6271 (BUILD_CPPFLAGS): Likewise.
6272 (TARGET_CC): New variable.
6273 (TARGET_CFLAGS): Likewise.
6274 (TARGET_CPPFLAGS): Likewise.
6275 (TARGET_LDFLAGS): Likewise.
6276 (AWK): Likewise.
6277 (include): Use target_cpu instead of host_cpu.
6278 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 6279
b977bf01 6280 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
6281
f09771a1 62822006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
6283
6284 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
6285 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
6286 field 'false' to 'exec_on_false'.
6287 (grub_script_create_cmdif): Renamed argument names to reflect above
6288 changes.
6289
6290 * normal/execute.c (grub_script_execute_cmdif): Likewise.
6291
6292 * normal/script.c (grub_script_create_cmdif): Likewise.
6293
118f4fb3 62942006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
6295
6296 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
6297 top.
6298 (grub_hfsplus_btree_recptr): Likewise.
6299 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
6300 FILEBLOCK both to pass a block number and store next block
6301 number.
6302 (grub_hfsplus_read_block): Rewritten heavily to support an extent
6303 overflow file correctly. Specify errors appropriately, because
6304 fshelp expects that GRUB_ERRNO is set when fails. Reuse
6305 grub_hfsplus_btree_recptr to get the pointer to a found key.
6306 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
6307 is found.
6308
6309 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
6310 linux.mod.
6311 (_linux_mod_SOURCES): New variable.
6312 (_linux_mod_CFLAGS): Likewise.
6313 (_linux_mod_LDFLAGS): Likewise.
6314 (linux_mod_SOURCES): Likewise.
6315 (linux_mod_CFLAGS): Likewise.
6316 (linux_mod_LDFLAGS): Likewise.
6317
6318 * DISTLIST: Added loader/i386/efi/linux.c,
6319 loader/i386/efi/linux_normal.c and
6320 include/grub/i386/efi/loader.h.
6321
6322 * loader/i386/efi/linux.c: New file.
6323 * loader/i386/efi/linux_normal.c: Likewise.
6324 * include/grub/i386/efi/loader.h: Likewise.
6325
89a7d726 63262006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
6327
6328 * commands/blocklist.c: New file.
6329
6330 * DISTLIST: Added commands/blocklist.c.
6331
6332 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 6333 color for the background, and a darker color for the foreground.
89a7d726 6334 (grub_console_checkkey): Return READ_KEY.
6335 (grub_console_cls): Set the background to
6336 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
6337
6338 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
6339
6340 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
6341 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
6342
6343 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
6344 prototype.
6345
6346 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
6347 BG. The spec is wrong again.
6348
6349 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
6350 prototype.
6351 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
6352
6353 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6354 commands/blocklist.c.
6355 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 6356
89a7d726 6357 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
6358 (blocklist_mod_SOURCES): New variable.
6359 (blocklist_mod_CFLAGS): Likewise.
6360 (blocklist_mod_LDFLAGS): Likewise.
6361
75c8f258 63622006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
6363
6364 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
6365 duplication.
6366 (lba_mode): Use %eax more intensively to reduce the code size.
6367
da2eb181 63682006-05-20 Marco Gerards <marco@gnu.org>
6369
6370 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
6371
6372 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
6373 for `menuentry'.
6374 (script): Accept leading newlines.
6375 (newlines): New rule to describe 0 or more newlines.
6376 (commands): Accept `command' with trailing newline. Fixed the
6377 order in which arguments were passed to `grub_script_add_cmd'.
6378 Accept commands separated by newlines.
6379 (function): Changed to accept newlines.
6380 (menuentry) Rewritten.
6381
6382 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
6383 front of the list, instead of to the end.
6384
577b4050 63852006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
6386
6387 * util/i386/pc/grub-install.in (bindir): New variable.
6388 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
6389 Shaver <lbgwjl@gmail.com>.
6390
0d6e1189 63912006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
6392
6393 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
6394 grub/machine/linux.h
6395 * loader/i386/pc/linux.c: Likewise.
6396
6397 * include/grub/i386/pc/linux.h: Moved to ...
6398 * include/grub/i386/linux.h: ... here.
6399
6400 * include/grub/i386/linux.h (struct linux_kernel_params): New
6401 struct.
f19dbdb7 6402
31b86e9f 64032006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
6404
6405 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
6406 checking.
6407 (grub_video_vbe_blit_glyph): Likewise.
6408 (grub_video_vbe_blit_bitmap): Likewise.
6409 (grub_video_vbe_blit_render_target): Likewise.
6410
83b984de 64112006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
6412
6413 * configure.ac (--with-platform): Properly quote the square
6414 brackets.
6415
5f0413bd 64162006-05-08 Marco Gerards <marco@gnu.org>
6417
6418 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
6419 this...
6420 (kernel_elf_HEADERS): ...to this. Updated all users.
6421 (grubof_symlist.c): Renamed from this...
6422 (kernel_elf_symlist.c): ...to this. Updated all users.
6423 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6424 (grubof_SOURCES): Renamed from this...
6425 (kernel_elf_SOURCES): ...to this.
6426 (grubof_HEADERS): Renamed from this...
6427 (kernel_elf_HEADERS): ...to this.
6428 (grubof_CFLAGS): Renamed from this...
6429 (kernel_elf_CFLAGS): ...to this.
6430 (grubof_ASFLAGS): Renamed from this...
6431 (kernel_elf_ASFLAGS): ...to this.
6432 (grubof_LDFLAGS): Renamed from this...
6433 (kernel_elf_LDFLAGS): ...to this.
6434
6435 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
6436 this...
6437 (kernel_elf_HEADERS): ...to this. Updated all users.
6438 (grubof_symlist.c): Renamed from this...
6439 (kernel_elf_symlist.c): ...to this. Updated all users.
6440 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
6441 (grubof_SOURCES): Renamed from this...
6442 (kernel_elf_SOURCES): ...to this.
6443 (grubof_HEADERS): Renamed from this...
6444 (kernel_elf_HEADERS): ...to this.
6445 (grubof_CFLAGS): Renamed from this...
6446 (kernel_elf_CFLAGS): ...to this.
6447 (grubof_ASFLAGS): Renamed from this...
6448 (kernel_elf_ASFLAGS): ...to this.
6449 (grubof_LDFLAGS): Renamed from this...
6450 (kernel_elf_LDFLAGS): ...to this.
6451
6452 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
6453 `kernel.elf' instead of `grubof'.
6454
05568c2e 64552006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
6456
6457 Add --with-platform to configure. Use pkglibdir instead of
6458 pkgdatadir. This is reported by Roger Leigh.
6459
6460 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
6461 (host_vendor): Likewise.
6462 (host_os): Likewise.
6463 (pkgdatadir): Likewise.
6464 (platform): New variable.
6465 (pkglibdir): Likewise.
6466 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 6467
05568c2e 6468 * util/i386/pc/grub-install.in (datadir): Removed.
6469 (host_vendor): Likewise.
6470 (host_os): Likewise.
6471 (pkgdatadir): Likewise.
6472 (platform): New variable.
6473 (pkglibdir): Likewise.
6474 Use PKGLIBDIR instead of PKGDATADIR.
6475
6476 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
6477 instead of GRUB_DATADIR.
6478 (main): Likewise.
6479 * util/i386/pc/grub-mkimage.c (usage): Likewise.
6480 (main): Likewise.
6481 * util/i386/efi/grub-mkimage.c (usage): Likewise.
6482 (main): Likewise.
6483
6484 * configure.ac (--with-platform): New option.
6485 Use PLATFORM instead of HOST_VENDOR to specify a platform.
6486
6487 * Makefile.in: Include a makefile based on PLATFORM instead of
6488 HOST_VENDOR.
6489 (pkgdatadir): Not appended by the machine type.
6490 (pkglibdir): Appended by the machine type.
6491 (host_vendor): Removed.
6492 (platform): New variable.
6493 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
6494 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
6495 (uninstall): Likewise.
6496
4e93851c 64972006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
6498
6499 Use the environment context in the menu. Remove the commands
6500 "default" and "timeout", and use variables instead.
f19dbdb7 6501
4e93851c 6502 * normal/menu.c: Include grub/env.h.
6503 (print_entry): Cast TITLE to silence gcc.
6504 (get_timeout): New function.
6505 (set_timeout): Likewise.
6506 (get_entry_number): Likewise.
6507 (run_menu): Use a default entry, a fallback entry and a timeout
6508 in the environment variables "default", "fallback" and
6509 "timeout". Also, tweak the default entry if it is not within the
6510 current menu entries.
6511 (grub_menu_run): Use a fallback entry in the environment variable
6512 "fallback".
6513
6514 * normal/main.c (read_config_file): Do not initialize
6515 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
6516 NEWMENU->TIMEOUT.
6517 (grub_normal_execute): Use a data slot to store the menu.
6518
6519 * include/grub/normal.h (struct grub_menu): Removed default_entry,
6520 fallback_entry and timeout.
6521 (struct grub_menu_list): Removed.
6522 (grub_menu_list_t): Likewise.
6523 (struct grub_context): Likewise.
6524 (grub_context_t): Likewise.
6525 (grub_context_get): Likewise.
6526 (grub_context_get_current_menu): Likewise.
6527 (grub_context_push_menu): Likewise.
6528 (grub_context_pop_menu): Likewise.
6529 (grub_default_init): Likewise.
6530 (grub_default_fini): Likewise.
6531 (grub_timeout_init): Likewise.
6532 (grub_timeout_fini): Likewise.
6533
6534 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
6535 and timeout.mod.
6536 (normal_mod_SOURCES): Removed normal/context.c.
6537
6538 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
6539 commands/default.c, commands/timeout.c and normal/context.c.
6540 (normal_mod_SOURCES): Removed normal/context.c.
6541
6542 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
6543 commands/timeout.c and normal/context.c.
6544 (normal_mod_SOURCES): Removed normal/context.c.
6545
6546 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
6547 commands/default.c, commands/timeout.c and normal/context.c.
6548 (normal_mod_SOURCES): Removed normal/context.c.
6549
6550 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
6551 timeout.mod.
6552 (default_mod_SOURCES): Removed.
6553 (default_mod_CFLAGS): Likewise.
6554 (default_mod_LDFLAGS): Likewise.
6555 (timeout_mod_SOURCES): Removed.
6556 (timeout_mod_CFLAGS): Likewise.
6557 (timeout_mod_LDFLAGS): Likewise.
6558
6559 * DISTLIST: Removed commands/default.c, commands/timeout.c and
6560 normal/context.c.
6561
6562 * commands/default.c: Removed.
6563 * commands/timeout.c: Likewise.
6564 * normal/context.c: Likewise.
6565
1eb9cc1d 65662006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
6567
6568 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
6569
385bd9c1 65702006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
6571
6572 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
6573 "next" to "prev" for readability.
6574 (struct grub_env_sorted_var): New struct.
6575 (grub_env_context): Renamed to ...
6576 (initial_context): ... this.
6577 (grub_env_var_context): Renamed to ...
6578 (current_context): ... this.
6579 (grub_env_find): Look only at CURRENT_CONTEXT.
6580 (grub_env_context_open): Rewritten to copy exported variables from
6581 previous context.
6582 (grub_env_context_close): Rewritten according to the new
6583 scheme. Also, add an assertion to prevent the initial context from
6584 removed.
6585 (grub_env_insert): Removed the code for the sorted list.
6586 (grub_env_remove): Likewise.
6587 (grub_env_export): Simply mark the variable with
6588 GRUB_ENV_VAR_GLOBAL.
6589 (grub_env_set): A cosmetic change for naming consistency.
6590 (grub_env_get): Likewise.
6591 (grub_env_unset): Likewise.
6592 (grub_env_iterate): Rewritten to sort variables within this
6593 function.
6594 (grub_register_variable_hook): Fixed for naming consistency. Call
6595 grub_env_find again, only if NAME is not found at the first time.
6596 (mangle_data_slot_name): New function.
6597 (grub_env_set_data_slot): Likewise.
6598 (grub_env_get_data_slot): Likewise.
6599 (grub_env_unset_data_slot): Likewise.
6600
6601 * include/grub/env.h (grub_env_var_type): New enum.
6602 (GRUB_ENV_VAR_LOCAL): New constant.
6603 (GRUB_ENV_VAR_GLOBAL): Likewise.
6604 (GRUB_ENV_VAR_DATA): Likewise.
6605 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
6606 "type".
6607 (grub_env_set): Replace VAR with NAME for consistency.
6608 (grub_register_variable_hook): Likewise.
6609 (grub_env_export): Specify the name of the argument.
6610 (grub_env_set_data_slot): New prototype.
6611 (grub_env_get_data_slot): Likewise.
6612 (grub_env_unset_data_slot): Likewise.
6613
7f362539 66142006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6615
6616 Extend the loader so that GRUB can accept a loader which comes
6617 back to GRUB when a loaded image exits. Also, this change adds
6618 support for a chainloader on EFI.
f19dbdb7 6619
7f362539 6620 * term/efi/console.c: Include grub/misc.h.
6621 (grub_console_checkkey): Display a scan code on the top for
6622 debugging. This will be removed once the EFI port gets stable.
6623 Correct the scan code mapping.
6624
6625 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
6626 allocate memory from larger regions, in order to reduce the number
6627 of allocated regions. Otherwise, the MacOSX loader panics.
6628 (filter_memory_map): Avoid less than 1MB for compatibility with
6629 other loaders.
6630 (add_memory_regions): Allocate from the tail of a region, if
6631 possible, to avoid allocating a region near to 1MB, for the MacOSX
6632 loader.
6633
6634 * kern/efi/init.c (grub_efi_set_prefix): Specify
6635 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
6636
6637 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
6638 argument IMAGE_HANDLE and specify it to get a loaded image.
6639 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
6640 grub_efi_get_loaded_image.
fe6b695a 6641 (grub_efi_get_filename): Divide the length by the size of
7f362539 6642 grub_efi_char16_t.
6643 (grub_efi_get_device_path): New function.
6644 (grub_efi_print_device_path): Print End Device Path nodes. Divide
6645 the length by the size of grub_efi_char16_t for a file path device
6646 path node.
6647
6648 * kern/loader.c (grub_loader_noreturn): New variable.
6649 (grub_loader_set): Accept a new argument NORETURN. Set
6650 GRUB_LOADER_NORETURN to NORETURN.
6651 All callers changed.
6652 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
6653 grub_machine_fini.
6654
6655 * include/grub/efi/efi.h (grub_efi_get_device_path): New
6656 prototype.
6657 (grub_efi_get_loaded_image): Take an argument to specify an image
6658 handle.
6659
6660 * include/grub/loader.h (grub_loader_set): Added one more argument
6661 NORETURN.
6662
6663 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
6664 instead of grub_efi_open_protocol.
6665 (grub_efidisk_get_device_name): Likewise.
6666 (grub_efidisk_close): Print a newline.
6667 (grub_efidisk_get_device_handle): Fixed to use
6668 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
6669 GRUB_EFI_DEVICE_PATH_TYPE.
6670
6671 * disk/efi/efidisk.c (device_path_guid): Moved to ...
6672 * kern/efi/efi.c (device_path_guid): ... here.
6673
6674 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
6675 chain.mod.
6676 (kernel_mod_HEADERS): Added efi/disk.h.
6677 (_chain_mod_SOURCES): New variable.
6678 (_chain_mod_CFLAGS): Likewise.
6679 (_chain_mod_LDFLAGS): Likewise.
6680 (chain_mod_SOURCES): Likewise.
6681 (chain_mod_CFLAGS): Likewise.
6682 (chain_mod_LDFLAGS): Likewise.
6683
6684 * DISTLIST: Added include/grub/efi/chainloader.h,
6685 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
6686
6687 * include/grub/efi/chainloader.h: New file.
6688 * loader/efi/chainloader.c: Likewise.
6689 * loader/efi/chainloader_normal.c: Likewise.
6690
c0111d6e 66912006-04-30 Marco Gerards <marco@gnu.org>
6692
6693 * commands/configfile.c (grub_cmd_source): New function.
6694 (GRUB_MOD_INIT): Register the commands `source' and `.'.
6695 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
6696
df5341da 66972006-04-30 Marco Gerards <marco@gnu.org>
6698
6699 * normal/execute.c (grub_script_execute_cmd): Change the return
6700 type to `grub_err_t'. Correctly return the error.
6701 (grub_script_execute_cmdline): In case a command line is not a
6702 command or a function, try to interpret it as an assignment.
6703
f85934bd 67042006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
6705
6706 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
6707 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
6708 skip a node whose name is obviously invalid as UTF-16,
6709 i.e. contains a NUL character. Stop the iteration when the last
6710 directory entry is found. Instead of using the return value of
6711 grub_hfsplus_btree_iterate_node, store the value in RET and use
6712 it, because the iterator can be stopped by the last directory
6713 entry.
6714
8f8a2cf8 67152006-04-30 Marco Gerards <marco@gnu.org>
6716
6717 * include/grub/env.h (grub_env_export): New prototype. Reported
6718 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
6719
a27e84ce 67202006-04-30 Marco Gerards <marco@gnu.org>
6721
6722 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
6723 size of the extents in a catalog file record.
6724
eaef0553 67252006-04-29 Marco Gerards <marco@gnu.org>
6726
6727 * commands/configfile.c (grub_cmd_configfile): Execute the
6728 configfile within its own context.
6729
6730 * include/grub/env.h (grub_env_context_open): New prototype.
6731 (grub_env_context_close): Likewise.
6732
6733 * kern/env.c (grub_env): Removed.
6734 (grub_env_sorted): Likewise.
6735 (grub_env_context): New variable.
6736 (grub_env_var_context): Likewise.
6737 (grub_env_find): Search both the active context and the global
6738 context.
6739 (grub_env_context_open): New function.
6740 (grub_env_context_close): Likewise.
6741 (grub_env_insert): Likewise.
6742 (grub_env_remove): Likewise.
6743 (grub_env_export): Likewise.
6744 (grub_env_set): Changed to use helper functions to avoid code
6745 duplication.
6746 (grub_env_iterate): Rewritten so both the current context and the
6747 global context are being used.
6748
6749 * normal/command.c (export_command): New function.
6750 (grub_command_init): Register the `export' function.
6751
7b455f4d 67522006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
6753
6754 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
6755 explicitly to suppress gcc's warnings.
6756 * fs/fat.c (grub_fat_find_dir): Likewise.
6757 (grub_fat_label): Likewise.
6758 * fs/xfs.c (grub_xfs_read_inode): Likewise.
6759 (grub_xfs_mount): Likewise.
6760 (grub_xfs_label): Likewise.
6761 * fs/affs.c (grub_affs_mount): Likewise.
6762 (grub_affs_label): Likewise.
6763 (grub_affs_iterate_dir): Likewise.
6764 * fs/sfs.c (grub_sfs_mount): Likewise.
6765 (grub_sfs_iterate_dir): Likewise.
6766 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
6767 * fs/hfs.c (grub_hfs_mount): Likewise.
6768 (grub_hfs_cmp_catkeys): Likewise.
6769 (grub_hfs_find_dir): Likewise.
6770 (grub_hfs_dir): Likewise.
6771 (grub_hfs_label): Likewise.
6772 * fs/jfs.c (grub_jfs_mount): Likewise.
6773 (grub_jfs_opendir): Likewise.
6774 (grub_jfs_getent): Likewise.
6775 (grub_jfs_lookup_symlink): Likewise.
6776 (grub_jfs_label): Likewise.
6777 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
6778 (grub_hfsplus_iterate_dir): Likewise.
6779 (grub_hfsplus_btree_iterate_node): Made static.
6780
6781 * util/grub-emu.c (prefix): New variable.
6782 (grub_machine_set_prefix): New function.
6783 (main): Do not set the environment variable "prefix" here. Only
6784 set PREFIX, which is used later by grub_machine_set_prefix.
6785
6786 * include/grub/video.h: Do not include grub/symbol.h.
6787 (grub_video_register): Not exported. This symbol is not defined in
6788 the kernel.
6789 (grub_video_unregister): Likewise.
6790 (grub_video_iterate): Likewise.
6791 (grub_video_setup): Likewise.
6792 (grub_video_restore): Likewise.
6793 (grub_video_get_info): Likewise.
6794 (grub_video_get_blit_format): Likewise.
6795 (grub_video_set_palette): Likewise.
6796 (grub_video_get_palette): Likewise.
6797 (grub_video_set_viewport): Likewise.
6798 (grub_video_get_viewport): Likewise.
6799 (grub_video_map_color): Likewise.
6800 (grub_video_map_rgb): Likewise.
6801 (grub_video_map_rgba): Likewise.
6802 (grub_video_fill_rect): Likewise.
6803 (grub_video_blit_glyph): Likewise.
6804 (grub_video_blit_bitmap): Likewise.
6805 (grub_video_blit_render_target): Likewise.
6806 (grub_video_scroll): Likewise.
6807 (grub_video_swap_buffers): Likewise.
6808 (grub_video_create_render_target): Likewise.
6809 (grub_video_delete_render_target): Likewise.
6810 (grub_video_set_active_render_target): Likewise.
6811
6812 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
6813 Undefined.
6814 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
6815
6816 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
6817 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6818 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6819 instead of $(srcdir)/genkernsyms.sh.
6820
6821 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
6822 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6823 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6824 instead of $(srcdir)/genkernsyms.sh.
6825
6826 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
6827 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6828 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6829 instead of $(srcdir)/genkernsyms.sh.
6830
6831 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
6832 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
6833 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
6834 instead of $(srcdir)/genkernsyms.sh.
6835
6836 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
6837 genkernsyms.sh.
6838
6839 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
6840 genkernsyms.sh.
6841 (gensymlist.sh): New target.
6842 (genkernsyms.sh): Likewise.
6843
6844 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
6845 genkernsyms.sh.in and gensymlist.sh.in.
6846
6847 * genkernsyms.sh: Removed.
6848 * gensymlist.sh: Likewise.
f19dbdb7 6849
7b455f4d 6850 * genkernsyms.sh.in: New file.
6851 * gensymlist.sh.in: Likewise.
6852
1885bb27 68532006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6854
6855 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
6856 clobber "prefix", since we may have already set it manually.
6857
71538dff 68582006-04-25 Hollis Blanchard <hollis@penguinppc.org>
6859
6860 * kern/misc.c (abort): New alias for grub_abort.
6861
2965c7cc 68622006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
6863
6864 A new machine-specific function "grub_machine_set_prefix" is
6865 defined. This is called after loading modules, so that a prefix
6866 initialization can use modules. Also, this change adds an
6867 intensive debugging feature for the memory manager via the
6868 configure option "--enable-mm-debug".
f19dbdb7 6869
2965c7cc 6870 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
6871 PART.LEN.
6872
6873 * kern/sparc64/ieee1275/init.c (abort): Removed.
6874 (grub_stop): Likewise.
6875 (grub_exit): New function.
6876 (grub_set_prefix): Renamed to ...
6877 (grub_machine_set_prefix): ... this.
6878 (grub_machine_init): Do not call grub_set_prefix.
6879
6880 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
6881 (grub_machine_set_prefix): ... this.
6882 (grub_machine_init): Do not call grub_set_prefix.
6883
6884 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
6885 (grub_machine_init): Do not set the prefix here.
6886
6887 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
6888
6889 * kern/efi/init.c: Include grub/mm.h.
6890 (grub_efi_set_prefix): New function.
6891
6892 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
6893 (grub_efi_get_filename): New function.
6894 (grub_print_device_path): Renamed to ...
6895 (grub_efi_print_device_path): ... this.
6896
6897 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
6898 [MM_DEBUG] (grub_realloc): Likewise.
6899 [MM_DEBUG] (grub_free): Likewise.
6900 [MM_DEBUG] (grub_memalign): Likewise.
6901 [MM_DEBUG] (grub_mm_debug): New variable.
6902 [MM_DEBUG] (grub_debug_malloc): New function.
6903 [MM_DEBUG] (grub_debug_free): New function.
6904 [MM_DEBUG] (grub_debug_realloc): New function.
6905 [MM_DEBUG] (grub_debug_memalign): New function.
6906
6907 * kern/misc.c (grub_abort): Print a newline to distinguish
6908 the message.
6909
6910 * kern/main.c (grub_main): Call grub_machine_set_prefix and
6911 grub_set_root_dev after loading modules. This is necessary when
6912 setting a prefix depends on modules.
6913
6914 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
6915 (grub_efi_print_device_path): ... this.
6916 (grub_efi_get_filename): New prototype.
6917 (grub_efi_set_prefix): Likewise.
6918
6919 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
6920 and grub/disk.h.
6921 (grub_efidisk_get_device_handle): New prototype.
6922 (grub_efidisk_get_device_name): Likewise.
6923
6924 * include/grub/mm.h: Include config.h.
6925 (MM_DEBUG): Removed.
6926 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
6927 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
6928 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
6929 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
6930 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
6931 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
6932 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
6933 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
6934 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
6935
6936 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
6937
6938 * disk/efi/efidisk.c: Include grub/partition.h.
6939 (iterate_child_devices): New function.
6940 (add_device): First, compare only last device path nodes, so that
6941 devices are sorted by the types.
6942 (grub_efidisk_get_device_handle): New function.
6943 (grub_efidisk_get_device_name): Likewise.
6944
6945 * configure.ac (--enable-mm-debug): New option to enable the
6946 memory manager debugging feature. This makes the binary much
6947 bigger, so is disabled by default.
6948
9cacaa17 69492006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
6950
6951 Use grub_abort instead of grub_stop, and grub_exit must be
6952 define in each architecture now. Also, this change adds support
6953 for EFI disks.
f19dbdb7 6954
9cacaa17 6955 * util/i386/pc/grub-probefs.c: Include grub/term.h.
6956 (grub_getkey): New function.
6957 (grub_term_get_current): Likewise.
6958
6959 * util/i386/pc/grub-setup.c: Include grub/term.h.
6960 (grub_getkey): New function.
6961 (grub_term_get_current): Likewise.
6962
6963 * util/misc.c (grub_stop): Renamed to ...
6964 (grub_exit): ... this.
6965
6966 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
6967 (grub_exit): ... this.
6968 (grub_machine_init): Use grub_abort instead of abort.
6969 (grub_stop): Removed.
6970
6971 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
6972 abort.
6973
6974 * kern/i386/pc/startup.S (grub_exit): New function.
6975 (cold_reboot): New label.
6976
6977 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
6978 (grub_efi_init): Call grub_efidisk_init.
6979 (grub_efi_fini): Call grub_efidisk_fini.
6980
6981 * kern/efi/efi.c: Include grub/mm.h.
6982 (grub_efi_console_control_guid): Renamed to ...
6983 (console_control_guid): ... this.
6984 (grub_efi_loaded_image_guid): Renamed to ...
6985 (loaded_image_guid): ... this.
6986 (grub_efi_locate_handle): New function.
6987 (grub_efi_open_protocol): Likewise.
6988 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
6989 GRUB_EFI_CONSOLE_CONTROL_GUID.
6990 (grub_efi_exit): Removed.
6991 (grub_stop): Likewise.
6992 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
6993 (grub_exit): New function.
6994 (grub_print_device_path): Likewise.
6995
6996 * kern/rescue.c (grub_rescue_cmd_exit): New function.
6997 (grub_enter_rescue_mode): Register "exit".
6998
6999 * kern/misc.c (grub_real_dprintf): A cosmetic change.
7000 (grub_abort): New function.
7001
7002 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
7003
7004 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
7005
7006 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
7007
7008 * include/grub/efi/efi.h (grub_efi_exit): Removed.
7009 (grub_print_device_path): New prototype.
7010 (grub_efi_locate_handle): Likewise.
7011 (grub_efi_open_protocol): Likewise.
7012
7013 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
7014 * disk/efi/efidisk.c: Likewise.
7015
7016 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
7017
7018 * include/grub/efi/console_control.h
7019 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
7020
7021 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
7022 last 8 bytes as an array.
7023 (GRUB_EFI_DISK_IO_GUID): New macro.
7024 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
7025 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
7026 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
7027 grub_uint8_t.
7028 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
7029 (struct grub_efi_device_path): Rename the member "sub_type" to
7030 "subtype".
7031 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
7032 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
7033 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
7034 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
7035 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
7036 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
7037 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
7038 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
7039 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
7040 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
7041 (struct grub_efi_pci_device_path): New structure.
7042 (grub_efi_pci_device_path_t): New type.
7043 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
7044 (struct grub_efi_pccard_device_path): New structure.
7045 (grub_efi_pccard_device_path_t): New type.
7046 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
7047 (struct grub_efi_memory_mapped_device_path): New structure.
7048 (grub_efi_memory_mapped_device_path_t): New type.
7049 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
7050 (struct grub_efi_vendor_device_path): New structure.
7051 (grub_efi_vendor_device_path_t): New type.
7052 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
7053 (struct grub_efi_controller_device_path): New structure.
7054 (grub_efi_controller_device_path_t): New type.
7055 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
7056 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
7057 (struct grub_efi_acpi_device_path): New structure.
7058 (grub_efi_acpi_device_path_t): New type.
7059 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
7060 (struct grub_efi_expanded_acpi_device_path): New structure.
7061 (grub_efi_expanded_acpi_device_path_t): New type.
7062 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
7063 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
7064 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
7065 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
7066 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
7067 (struct grub_efi_atapi_device_path): New structure.
7068 (grub_efi_atapi_device_path_t): New type.
7069 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
7070 (struct grub_efi_fibre_channel_device_path): New structure.
7071 (grub_efi_fibre_channel_device_path_t): New type.
7072 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
7073 (struct grub_efi_1394_device_path): New structure.
7074 (grub_efi_1394_device_path_t): New type.
7075 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
7076 (struct grub_efi_usb_device_path): New structure.
7077 (grub_efi_usb_device_path_t): New type.
7078 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
7079 (struct grub_efi_usb_class_device_path): New structure.
7080 (grub_efi_usb_class_device_path_t): New type.
7081 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
7082 (struct grub_efi_i2o_device_path): New structure.
7083 (grub_efi_i2o_device_path_t): New type.
7084 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
7085 (struct grub_efi_mac_address_device_path): New structure.
7086 (grub_efi_mac_address_device_path_t): New type.
7087 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
7088 (struct grub_efi_ipv4_device_path): New structure.
7089 (grub_efi_ipv4_device_path_t): New type.
7090 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
7091 (struct grub_efi_ipv6_device_path): New structure.
7092 (grub_efi_ipv6_device_path_t): New type.
7093 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
7094 (struct grub_efi_infiniband_device_path): New structure.
7095 (grub_efi_infiniband_device_path_t): New type.
7096 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
7097 (struct grub_efi_uart_device_path): New structure.
7098 (grub_efi_uart_device_path_t): New type.
7099 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
7100 (struct grub_efi_vendor_messaging_device_path): New structure.
7101 (grub_efi_vendor_messaging_device_path_t): New type.
7102 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
7103 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
7104 (struct grub_efi_hard_drive_device_path): New structure.
7105 (grub_efi_hard_drive_device_path_t): New type.
7106 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
7107 (struct grub_efi_cdrom_device_path): New structure.
7108 (grub_efi_cdrom_device_path_t): New type.
7109 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
7110 (struct grub_efi_vendor_media_device_path): New structure.
7111 (grub_efi_vendor_media_device_path_t): New type.
7112 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
7113 (struct grub_efi_file_path_device_path): New structure.
7114 (grub_efi_file_path_device_path_t): New type.
7115 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
7116 (struct grub_efi_protocol_device_path): New structure.
7117 (grub_efi_protocol_device_path_t): New type.
7118 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
7119 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
7120 (struct grub_efi_bios_device_path): New structure.
7121 (grub_efi_bios_device_path_t): New type.
7122 (struct grub_efi_disk_io): New structure.
7123 (grub_efi_disk_io_t): New type.
7124 (struct grub_efi_block_io_media): New structure.
7125 (grub_efi_block_io_media_t): New type.
7126 (struct grub_efi_block_io): New structure.
7127 (grub_efi_block_io_t): New type.
7128
7129 * include/grub/misc.h (grub_stop): Removed.
7130 (grub_exit): New prototype.
7131 (grub_abort): Likewise.
7132
7133 * include/grub/disk.h (enum grub_disk_dev_id): Added
7134 GRUB_DISK_DEVICE_EFIDISK_ID.
7135
7136 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
7137 disk/efi/efidisk.c.
7138 (kernel_syms.lst): Remove the target if an error occurs.
7139
49986a9f 71402006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
7141
7142 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
7143 as it was simply too buggy.
7144
970d3b8a 71452006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
7146
7147 * kern/misc.c (grub_lltoa): New function.
7148 (grub_vsprintf): Added support for the long long suffix,
7149 i.e. "ll".
7150
ff04ec24 71512006-04-20 Hollis Blanchard <hollis@penguinppc.org>
7152
7153 * Makefile.in (LDFLAGS): Add variable.
7154 (LD): Remove variable.
7155 * configure.ac: Add -m32 to LDFLAGS.
7156 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
7157 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
7158 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
7159 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
7160 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
7161 variables.
7162 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
7163 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
7164 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
7165
37e5e1a4 71662006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
7167
7168 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
7169 length for unknown glyph.
7170
c352d8dd 71712006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
7172
2eab1c0d 7173 Add support for pre-loaded modules into the EFI port.
f19dbdb7 7174
2eab1c0d 7175 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
7176 completely. Accept one more argument DIR. The caller has changed.
7177
7178 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
7179
7180 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
7181 (grub_efi_loaded_image_guid): New variable.
7182 (grub_efi_get_loaded_image): New function.
7183 (grub_arch_modules_addr): Likewise.
7184
7185 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
7186 prototype.
7187
7188 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
7189 (struct grub_efi_loaded_image): New structure.
7190 (grub_efi_loaded_image_t): New type.
7191
71922006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7193
c352d8dd 7194 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
7195 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
7196 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
7197
6d01d6b4 71982006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
7199
7200 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
7201
976a4ea0 72022006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
7203
7204 * DISTLIST: Added include/grub/efi/console.h,
7205 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
7206 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7207
7208 * include/grub/efi/console.h: New file.
7209 * include/grub/efi/time.h: Likewise.
7210 * include/grub/i386/efi/kernel.h: Likewise.
7211 * kern/efi/init.c: Likewise.
7212 * kern/efi/mm.c: Likewise.
7213 * term/efi/console.c: Likewise.
f19dbdb7 7214
976a4ea0 7215 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
7216 (grub_stop): Removed.
7217 (grub_get_rtc): Likewise.
7218 (grub_machine_init): Simply call grub_efi_init.
7219 (grub_machine_fini): Call grub_efi_fini.
7220
7221 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
7222 (grub_efi_output_string): Removed.
7223 (grub_efi_stall): New function.
7224 (grub_stop): Likewise.
7225 (grub_get_rtc): Likewise.
7226
7227 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
7228 (grub_efi_stall): New prototype.
7229 (grub_efi_allocate_pages): Likewise.
7230 (grub_efi_free_pages): Likewise.
7231 (grub_efi_get_memory_map): Likewise.
7232 (grub_efi_mm_init): Likewise.
7233 (grub_efi_mm_fini): Likewise.
7234 (grub_efi_init): Likewise.
7235 (grub_efi_fini): Likewise.
7236
7237 * include/grub/i386/efi/time.h: Do not include
7238 grub/symbol.h. Include grub/efi/time.h.
7239 (GRUB_TICKS_PER_SECOND): Removed.
7240 (grub_get_rtc): Likewise.
7241
7242 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
7243 Added padding. The EFI spec is buggy.
7244 (GRUB_EFI_BLACK): New macro.
7245 (GRUB_EFI_BLUE): Likewise.
7246 (GRUB_EFI_GREEN): Likewise.
7247 (GRUB_EFI_CYAN): Likewise.
7248 (GRUB_EFI_RED): Likewise.
7249 (GRUB_EFI_MAGENTA): Likewise.
7250 (GRUB_EFI_BROWN): Likewise.
7251 (GRUB_EFI_LIGHTGRAY): Likewise.
7252 (GRUB_EFI_BRIGHT): Likewise.
7253 (GRUB_EFI_DARKGRAY): Likewise.
7254 (GRUB_EFI_LIGHTBLUE): Likewise.
7255 (GRUB_EFI_LIGHTGREEN): Likewise.
7256 (GRUB_EFI_LIGHTCYAN): Likewise.
7257 (GRUB_EFI_LIGHTRED): Likewise.
7258 (GRUB_EFI_LIGHTMAGENTA): Likewise.
7259 (GRUB_EFI_YELLOW): Likewise.
7260 (GRUB_EFI_WHITE): Likewise.
7261 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
7262 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
7263 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
7264 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
7265 (GRUB_EFI_BACKGROUND_RED): Likewise.
7266 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
7267 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
7268 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
7269 (GRUB_EFI_TEXT_ATTR): Likewise.
7270
7271 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
7272 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
7273 (kernel_mod_HEADERS): Added efi/time.h.
7274
83709125 72752006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
7276
7277 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
7278 include/grub/efi/api.h, include/grub/efi/console_control.h,
7279 include/grub/efi/efi.h, include/grub/efi/pe32.h,
7280 include/grub/i386/efi/time.h, kern/efi/efi.c,
7281 kern/i386/efi/init.c, kern/i386/efi/startup.S,
7282 and util/i386/efi/grub-mkimage.c.
7283
7284 * Makefile.in (RMKFILES): Added i386-efi.rmk.
7285
7286 * genmk.rb (PModule#rule): Do not export symbols if
7287 #{prefix}_EXPORTS is set to "no".
7288
7289 * conf/i386-efi.mk: New file.
7290 * conf/i386-efi.rmk: Likewise.
7291 * include/grub/efi/api.h: Likewise.
7292 * include/grub/efi/console_control.h: Likewise.
7293 * include/grub/efi/efi.h: Likewise.
7294 * include/grub/efi/pe32.h: Likewise.
7295 * include/grub/i386/efi/time.h: Likewise.
7296 * kern/efi/efi.c: Likewise.
7297 * kern/i386/efi/init.c: Likewise.
7298 * kern/i386/efi/startup.S: Likewise.
7299 * util/i386/efi/grub-mkimage.c: Likewise.
7300
73012006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 7302
7303 * include/grub/script.h: Include <grub/parser.h> and
7304 "grub_script.tab.h".
7305 (struct grub_lexer_param): New struct.
7306 (struct grub_parser_param): Likewise.
7307 (grub_script_create_arglist): Pass the state in an argument.
7308 (grub_script_add_arglist): Likewise.
7309 (grub_script_create_cmdline): Likewise.
7310 (grub_script_create_cmdblock): Likewise.
7311 (grub_script_create_cmdif): Likewise.
7312 (grub_script_create_cmdmenu): Likewise.
7313 (grub_script_add_cmd): Likewise.
7314 (grub_script_arg_add): Likewise.
7315 (grub_script_lexer_ref): Likewise.
7316 (grub_script_lexer_deref): Likewise.
7317 (grub_script_lexer_record_start): Likewise.
7318 (grub_script_lexer_record_stop): Likewise.
7319 (grub_script_mem_record): Likewise.
7320 (grub_script_mem_record_stop): Likewise.
7321 (grub_script_malloc): Likewise.
7322 (grub_script_yylex): Likewise.
7323 (grub_script_yyparse): Likewise.
7324 (grub_script_yyerror): Likewise.
7325 (grub_script_yylex): Likewise.
7326 (grub_script_lexer_init): Return the state.
7327
7328 * normal/lexer.c (grub_script_lexer_state): Removed variable.
7329 (grub_script_lexer_done): Likewise.
7330 (grub_script_lexer_getline): Likewise.
7331 (grub_script_lexer_refs): Likewise.
7332 (script): Likewise.
7333 (newscript): Likewise.
7334 (record): Likewise.
7335 (recording): Likewise.
7336 (recordpos): Likewise.
7337 (recordlen): Likewise.
7338 (grub_script_lexer_init): Return the state instead of setting
7339 global variables.
7340 (grub_script_lexer_ref): Use the newly added argument for state
7341 instead of globals.
7342 (grub_script_lexer_deref): Likewise.
7343 (grub_script_lexer_record_start): Likewise.
7344 (grub_script_lexer_record_stop): Likewise.
7345 (recordchar): Likewise.
7346 (nextchar): Likewise.
7347 (grub_script_yylex2): Likewise.
7348 (grub_script_yylex): Likewise.
7349 (grub_script_yyerror): Likewise.
7350
7351 * normal/parser.y (func_mem): Removed variable.
7352 (menu_entry): Likewise.
7353 (err): Likewise.
7354 (%lex-param): New parser option.
7355 (%parse-param): Likewise.
7356 (script): Always return the AST.
7357 (argument): Pass the state around.
7358 (arguments): Likewise.
7359 (grubcmd): Likewise.
7360 (commands): Likewise.
7361 (function): Likewise.
7362 (menuentry): Likewise.
7363 (if_statement): Likewise.
7364 (if): Likewise.
7365
7366 * normal/script.c (grub_script_memused): Removed variable.
7367 (grub_script_parsed): Likewise.
7368 (grub_script_malloc): Added a state argument. Use that instead of
7369 global variables.
7370 (grub_script_mem_record): Likewise.
7371 (grub_script_mem_record_stop): Likewise.
7372 (grub_script_arg_add): Likewise.
7373 (grub_script_add_arglist): Likewise.
7374 (grub_script_create_cmdline): Likewise.
7375 (grub_script_create_cmdif): Likewise.
7376 (grub_script_create_cmdmenu): Likewise.
7377 (grub_script_add_cmd): Likewise.
7378 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 7379
e2a8c904 73802006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 7381
7382 * normal/command.c (grub_command_init): Remove the title command.
7383
7384 * normal/lexer.c (grub_script_yylex): Renamed from this...
7385 (grub_script_yylex2): ... to this.
7386 (grub_script_yylex): New function. Temporary
7387 introduced to filter some tokens.
7388 (grub_script_yyerror): Print a newline.
7389
7390 * normal/main.c (read_config_file): Output information about the
7391 lines that contain errors. Wait for a key after all lines have
7392 been processed. Don't return an empty menu.
7393
7394 * normal/parser.y (func_mem): Don't initialize.
7395 (menu_entry): Likewise.
7396 (err): New variable.
7397 (script): Don't return anything when an error was encountered.
7398 (ws, returns): Removed rules.
7399 (argument): Disabled concatenated variable support.
7400 (arguments): Remove explicit separators.
7401 (grubcmd): Likewise.
7402 (function): Likewise.
7403 (menuentry): Likewise.
7404 (if): Likewise.
7405 (commands): Likewise. Add error handling.
7406
7407 * normal/script.c (grub_script_create_cmdline): If
7408 `grub_script_parsed' is 0, assume the parser encountered an error.
7409
c9a86192 74102006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
7411
7412 * configure.ac: Add support for EFI. Fix the typo
7413 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
7414
70f3b243 74152006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7416
7417 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
7418 foreign multibyte characters should be shown correctly.
7419
65f201ad 74202006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
7421
7422 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
7423 calculation.
7424 (read_config_file): Made it to close file before returning.
7425
b4b93674 74262006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
7427
7428 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
7429 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
7430 video/i386/pc/vbefill.c.
7431
7432 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
7433 video/i386/pc/vbefill.c.
7434
7435 * include/grub/video.h (grub_video_blit_format): New enum.
7436 (grub_video_mode_info): Added new member blit_format.
7437 (grub_video_get_blit_format): New function prototype.
7438
7439 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
7440 function prototype.
7441 (grub_video_vbe_map_rgb): Likewise.
7442 (grub_video_vbe_unmap_color): Likewise.
7443
7444 * include/grub/i386/pc/vbeblit.h: New file.
7445
7446 * include/grub/i386/pc/vbefill.h: New file.
7447
7448 * video/video.c (grub_video_get_blit_format): New function.
7449 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
7450 (grub_video_vbe_map_rgb): Likewise.
7451 (grub_video_vbe_unmap_color): Likewise.
7452
7453 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
7454 optimized fills.
7455 (grub_video_vbe_blit_render_target): Changed to use more optimized
7456 blits.
7457 (grub_video_vbe_setup): Added detection for optimized settings.
7458 (grub_video_vbe_create_render_target): Likewise.
7459
7460 * video/i386/pc/vbeblit.c: New file.
7461
7462 * video/i386/pc/vbefill.c: New file.
7463
c2379b9c 74642006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
7465
7466 * font/manager.c (grub_font_get_glyph): Removed font fixup from
7467 here...
7468
7469 * util/unifont2pff.rb: ... and moved it to here. Improved argument
7470 parsing to support both hex and dec ranges. If filename was missing
7471 show usage information.
7472
bd0d7896 74732006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
7474
7475 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
7476 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
7477
7478 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
7479 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
7480 (video_mod_SOURCES): Added.
7481 (video_mod_CFLAGS): Likewise.
7482 (video_mod_LDFLAGS): Likewise.
7483 (gfxterm_mod_SOURCES): Likewise.
7484 (gfxterm_mod_CFLAGS): Likewise.
7485 (gfxterm_mod_LDFLAGS): Likewise.
7486 (videotest_mod_SOURCES): Likewise.
7487 (videotest_mod_CFLAGS): Likewise.
7488 (videotest_mod_LDFLAGS): Likewise.
7489 (vesafb_mod_SOURCES): Removed.
7490 (vesafb_mod_CFLAGS): Likewise.
7491 (vesafb_mod_LDFLAGS): Likewise.
7492 (vga_mod_SOURCES): Likewise.
7493 (vga_mod_CFLAGS): Likewise.
7494 (vga_mod_LDFLAGS): Likewise.
7495
7496 * commands/videotest.c: New file.
7497
7498 * font/manager.c (fill_with_default_glyph): Modified to use
7499 grub_font_glyph.
7500 (grub_font_get_glyph): Likewise.
7501 (fontmanager): Renamed from this...
7502 (font_manager): ... to this.
7503
7504 * include/grub/font.h (grub_font_glyph): Added new structure.
7505 (grub_font_get_glyph): Modified to use grub_font_glyph.
7506
7507 * include/grub/misc.h (grub_abs): Added as inline function.
7508
7509 * include/grub/video.h: New file.
7510
7511 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
7512 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
7513 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
7514 (grub_vbe_get_controller_info): Renamed from this...
7515 (grub_vbe_bios_get_controller_info): ... to this.
7516 (grub_vbe_get_mode_info): Renamed from this...
7517 (grub_vbe_bios_get_mode_info): ... to this.
7518 (grub_vbe_set_mode): Renamed from this...
7519 (grub_vbe_bios_set_mode): ... to this.
7520 (grub_vbe_get_mode): Renamed from this...
7521 (grub_vbe_bios_get_mode): ... to this.
7522 (grub_vbe_set_memory_window): Renamed from this...
7523 (grub_vbe_bios_set_memory_window): ... to this.
7524 (grub_vbe_get_memory_window): Renamed from this...
7525 (grub_vbe_bios_get_memory_window): ... to this.
7526 (grub_vbe_set_scanline_length): Renamed from this...
7527 (grub_vbe_set_scanline_length): ... to this.
7528 (grub_vbe_get_scanline_length): Renamed from this...
7529 (grub_vbe_bios_get_scanline_length): ... to this.
7530 (grub_vbe_set_display_start): Renamed from this...
7531 (grub_vbe_bios_set_display_start): ... to this.
7532 (grub_vbe_get_display_start): Renamed from this...
7533 (grub_vbe_bios_get_display_start): ... to this.
7534 (grub_vbe_set_palette_data): Renamed from this...
7535 (grub_vbe_bios_set_palette_data): ... to this.
7536 (grub_vbe_set_pixel_rgb): Removed.
7537 (grub_vbe_set_pixel_index): Likewise.
7538
7539 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
7540 from this...
7541 (grub_vbe_bios_get_controller_info): ... to this.
7542 (grub_vbe_get_mode_info): Renamed from this...
7543 (grub_vbe_bios_get_mode_info): ... to this.
7544 (grub_vbe_set_mode): Renamed from this...
7545 (grub_vbe_bios_set_mode): ... to this.
7546 (grub_vbe_get_mode): Renamed from this...
7547 (grub_vbe_bios_get_mode): ... to this.
7548 (grub_vbe_set_memory_window): Renamed from this...
7549 (grub_vbe_bios_set_memory_window): ... to this.
7550 (grub_vbe_get_memory_window): Renamed from this...
7551 (grub_vbe_bios_get_memory_window): ... to this.
7552 (grub_vbe_set_scanline_length): Renamed from this...
7553 (grub_vbe_set_scanline_length): ... to this.
7554 (grub_vbe_get_scanline_length): Renamed from this...
7555 (grub_vbe_bios_get_scanline_length): ... to this.
7556 (grub_vbe_set_display_start): Renamed from this...
7557 (grub_vbe_bios_set_display_start): ... to this.
7558 (grub_vbe_get_display_start): Renamed from this...
7559 (grub_vbe_bios_get_display_start): ... to this.
7560 (grub_vbe_set_palette_data): Renamed from this...
7561 (grub_vbe_bios_set_palette_data): ... to this.
7562 (grub_vbe_bios_get_controller_info): Fixed problem with registers
7563 getting corrupted after calling it. Added more pushes and pops.
7564 (grub_vbe_bios_set_mode): Likewise.
7565 (grub_vbe_bios_get_mode): Likewise.
7566 (grub_vbe_bios_get_memory_window): Likewise.
7567 (grub_vbe_bios_set_scanline_length): Likewise.
7568 (grub_vbe_bios_get_scanline_length): Likewise.
7569 (grub_vbe_bios_get_display_start): Likewise.
7570 (grub_vbe_bios_set_palette_data): Likewise.
7571
7572 * normal/cmdline.c (cl_set_pos): Refresh the screen.
7573 (cl_insert): Likewise.
7574 (cl_delete): Likewise.
7575
7576 * term/gfxterm.c: New file.
7577
7578 * term/i386/pc/vesafb.c: Removed file.
7579
7580 * video/video.c: New file.
7581
7582 * video/i386/pc/vbe.c (real2pm): Added new function.
7583 (grub_video_vbe_draw_pixel): Likewise.
7584 (grub_video_vbe_get_video_ptr): Likewise.
7585 (grub_video_vbe_get_pixel): Likewise
7586 (grub_video_vbe_init): Likewise.
7587 (grub_video_vbe_fini): Likewise.
7588 (grub_video_vbe_setup): Likewise.
7589 (grub_video_vbe_get_info): Likewise.
7590 (grub_video_vbe_set_palette): Likewise.
7591 (grub_video_vbe_get_palette): Likewise.
7592 (grub_video_vbe_set_viewport): Likewise.
7593 (grub_video_vbe_get_viewport): Likewise.
7594 (grub_video_vbe_map_color): Likewise.
7595 (grub_video_vbe_map_rgb): Likewise.
7596 (grub_video_vbe_map_rgba): Likewise.
7597 (grub_video_vbe_unmap_color): Likewise.
7598 (grub_video_vbe_fill_rect): Likewise.
7599 (grub_video_vbe_blit_glyph): Likewise.
7600 (grub_video_vbe_blit_bitmap): Likewise.
7601 (grub_video_vbe_blit_render_target): Likewise.
7602 (grub_video_vbe_scroll): Likewise.
7603 (grub_video_vbe_swap_buffers): Likewise.
7604 (grub_video_vbe_create_render_target): Likewise.
7605 (grub_video_vbe_delete_render_target): Likewise.
7606 (grub_video_vbe_set_active_render_target): Likewise.
7607 (grub_vbe_set_pixel_rgb): Remove function.
7608 (grub_vbe_set_pixel_index): Likewise.
7609 (index_color_mode): Remove static variable.
7610 (active_mode): Likewise.
7611 (framebuffer): Likewise.
7612 (bytes_per_scan_line): Likewise.
7613 (grub_video_vbe_adapter): Added new static variable.
7614 (framebuffer): Likewise.
7615 (render_target): Likewise.
7616 (initial_mode): Likewise.
7617 (mode_in_use): Likewise.
7618 (mode_list): Likewise.
7619
5f97350b 76202006-03-10 Marco Gerards <marco@gnu.org>
7621
7622 * configure.ac (AC_INIT): Bumped to 1.93.
7623
7624 * DISTLIST: Added `include/grub/hfs.h'.
7625
a3c5c6f8 76262006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
7627
7628 * boot/i386/pc/boot.S (general_error): Before looping, try INT
7629 18H, which might help the BIOS falling back to next boot media.
7630
6de53d26 76312006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
7632
7633 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
7634 Poe Chen <poe.poechen@gmail.com>.
7635
77c4a393 76362006-01-17 Marco Gerards <marco@gnu.org>
7637
7638 * include/grub/normal.h: Include <grub/script.h>.
7639 (grub_command_list): Removed struct.
7640 (grub_command_list_t): Removed type.
7641 (grub_menu_entry): Remove members `num' and `command_list'. Add
7642 members `commands' and `sourcecode'.
7643 * include/grub/script.h: Add inclusion guards.
7644 (grub_script_cmd_menuentry): New struct.
7645 (grub_script_execute_menuentry): New prototype.
7646 (grub_script_lexer_record_start): Likewise.
7647 (grub_script_lexer_record_stop): Likewise.
7648 * normal/execute.c (grub_script_execute_menuentry): New function.
7649 * normal/lexer.c (record, recording, recordpos, recordlen): New
7650 variables.
7651 (grub_script_lexer_record_start): New function.
7652 (grub_script_lexer_record_stop): Likewise.
7653 (recordchar): Likewise.
7654 (nextchar): Likewise.
7655 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
7656 2048 as the buffer size. Add the tokens `menuentry' and `@'.
7657 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
7658 (current_menu): New variable.
7659 (free_menu): Mainly rewritten.
7660 (grub_normal_menu_addentry): New function.
7661 (read_config_file): Rewritten.
7662 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 7663 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 7664 the menu entry.
7665 (run): Mainly rewritten.
7666 * normal/parser.y (menu_entry): New variable.
7667 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
7668 (menuentry): New rule.
7669 (command): Add `menuentry'.
7670 (if_statement): Allow additional returns before `fi'.
7671 * normal/script.c (grub_script_create_cmdmenu): New function.
7672
144f1f98 76732006-01-03 Marco Gerards <marco@gnu.org>
7674
7675 * INSTALL: GNU Bison is required.
7676 * configure.ac: Rewritten the test to detect Bison.
7677 * Makefile.in (YACC): New variable. Reported by Xun Sun
7678 <xun.sun.cn@gmail.com>.
7679
af4b2d89 76802006-01-03 Marco Gerards <marco@gnu.org>
7681
7682 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
7683 the HFS+ filesystem to filesystem blocks.
7684 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
7685 GCC warning is silenced.
7686
15643b71 76872006-01-03 Marco Gerards <marco@gnu.org>
7688
7689 * partmap/apple.c (apple_partition_map_iterate): Convert the data
7690 read from disk from big endian to host byte order.
7691
00905879 76922006-01-03 Hollis Blanchard <hollis@penguinppc.org>
7693
7694 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
7695 documentation.
7696 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
7697 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
7698 embedded HFS+ filesystem.
7699 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
7700 (grub_hfs_sblock): Move from here...
7701 * include/grub/hfs.h: To here... New file.
7702 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
7703 documentation.
7704 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
7705 New macros.
7706 (grub_hfsplus_volheader): Change type of member `magic' to
7707 `grub_uint16_t'.
7708 (grub_hfsplus_data): Add new member `embedded_offset'.
7709 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
7710 returned block.
7711 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
7712 Calculate the offset.
7713
8899bc3e 77142005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7715
7716 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
7717 Removed.
7718 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
7719
ae8c0277 77202005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7721
7722 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
7723 ENV->NAME is NULL after allocating ENV->VALUE.
7724
07084456 77252005-12-25 Marco Gerards <marco@gnu.org>
7726
7727 * kern/env.c (grub_env_set): Rewritten the error handling code.
7728
4750f5f1 77292005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7730
7731 * geninit.sh: Made more robust, and more portable.
7732
50214199 77332005-12-25 Marco Gerards <marco@gnu.org>
7734
7735 Add support for Apple HFS+ filesystems.
f19dbdb7 7736
50214199 7737 * fs/hfsplus.c: New file.
7738
7739 * DISTLIST: Added `fs/hfsplus.c'.
7740
7741 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
7742 (hfsplus_mod_SOURCES): New variable.
7743 (hfsplus_mod_CFLAGS): Likewise.
7744 (hfsplus_mod_LDFLAGS): Likewise.
7745 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
7746 (grub_setup_SOURCES): Likewise.
7747 (grub_mkdevicemap_SOURCES): Likewise.
7748 (grub_emu_SOURCES): Likewise.
7749 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7750
7751 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
7752
7753 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
7754
befaed6c 77552005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7756
7757 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
7758 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
7759 include/grub/parser.h, include/grub/script.h, kern/parser.c,
7760 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
7761 normal/lexer.c, normal/parser.y, normal/script.c, and
7762 partmap/gpt.c.
7763 Removed kern/sparc64/cache.c.
7764
7765 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
7766 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
7767 grub_emu_init.c.
7768
7769 * configure.ac (AC_INIT): Bumped to 1.92.
7770
6a124103 77712005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
7772
7773 * kern/err.c (grub_error_push): Added new function to support error
7774 stacks.
7775 (grub_error_pop): Likewise.
7776 (grub_error_stack_items): New local variable to support error stacks.
7777 (grub_error_stack_pos): Likewise.
7778 (grub_error_stack_assert): Likewise.
7779 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
7780 stack depth.
7781 (grub_print_error): Added support to print errors from error stack.
7782
7783 * include/grub/err.h (grub_error_push): Added function prototype.
7784 (grub_error_pop): Likewise.
7785
be973c1b 77862005-12-09 Hollis Blanchard <hollis@penguinppc.org>
7787
7788 * configure.ac: Accept `powerpc64' as host_cpu.
7789 (amd64): Rename to `biarch32'.
7790
7791 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
7792 non-cacheline-aligned addresses.
7793
7794 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
7795 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
7796 if `size' is non-zero.
7797
b04216ab 77982005-12-03 Marco Gerards <mgerards@xs4all.nl>
7799
7800 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
7801 and `cd' to make sure the filename is not prefixed with a
7802 directory name.
7803 (pkgdata_MODULES): Add `gpt.mod'.
7804 (gpt_mod_SOURCES): New variable.
7805 (gpt_mod_CFLAGS): Likewise.
7806 (gpt_mod_LDFLAGS): Likewise.
7807
7808 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
7809
7810 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
7811 New macro.
7812
7813 * partmap/gpt.c: New file.
7814
7815 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
7816 GPT partition map is detected.
7817
41730ed9 78182005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
7819
7820 * commands/i386/pc/play.c: New file.
7821 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
7822 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
7823 macros.
f19dbdb7 7824
95dc3643 78252005-11-27 Marco Gerards <mgerards@xs4all.nl>
7826
7827 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
7828 ((unused))' to silence gcc warning.
7829
1569ec51 78302005-11-26 Hollis Blanchard <hollis@penguinppc.org>
7831
7832 * configure.ac: Correct `AC_PROG_YACC' test.
7833
9abde152 78342005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7835
7836 * util/powerpc/ieee1275/grub-install.in: Run the mount point
7837 check before installing files.
7838
44b83271 78392005-11-22 Mike Small <smallm@panix.com>
7840
7841 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
7842 number regex so multidigit numbers are recognized correctly.
7843
78442005-11-22 Mike Small <smallm@panix.com>
7845
7846 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
7847 debugging message before attempting to claim memory.
7848 (grub_rescue_cmd_initrd): Add a claim debugging message and try
7849 multiple addresses in case of failure.
7850
9c12956b 78512005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7852
7853 * term/tparm.c (get_space): Remove empty `if' statement.
7854
7855 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
7856
7857 * kern/parser.c (check_varstate): Rename `state' to 's'.
7858
aeaf81d9 78592005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7860
7861 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
7862 variable definitions to the beginning of each function. Sort stack
7863 variables by size.
7864 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
7865 `buf' argument to `char *'.
7866
79bbb63f 78672005-11-22 Hollis Blanchard <hollis@penguinppc.org>
7868
7869 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
7870 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 7871 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 7872 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7873 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7874 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7875 configfile.mod, search.mod, gzio.mod and test.mod.
7876 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7877 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7878 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7879 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7880 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7881 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7882 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7883 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7884 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7885 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7886 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7887 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7888 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7889 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7890 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7891 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7892 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7893 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7894 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7895 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7896 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7897 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7898 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
7899
7900 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
7901 `grep --include'.
7902 (pkgdata_MODULES): Add test.mod.
7903
233b1628 79042005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7905
7906 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
7907 appending to variables with "+=".
7908 (PModule): Use full pathname to generate *.lst filenames.
7909
7910 * Makefile.in: Fixed list rules moved from genmk.rb.
7911 (.DELETE_ON_ERROR): New special target.
7912 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
7913
7914 * conf/i386-pc.rmk: Include conf/common.mk.
7915 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 7916 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 7917 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
7918 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
7919 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
7920 configfile.mod, search.mod, gzio.mod and test.mod.
7921 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
7922 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
7923 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
7924 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
7925 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
7926 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
7927 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
7928 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
7929 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
7930 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
7931 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
7932 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
7933 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
7934 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
7935 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
7936 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
7937 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7938 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
7939 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
7940 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
7941 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
7942 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
7943 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
7944 here...
7945 * conf/common.rmk: ... to here. New file.
7946
7947 * conf/common.mk: New file.
7948
16f820c8 79492005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
7950
7951 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
7952 (grub_script.tab.c): ... here.
7953
7954 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
7955 (grub_script.tab.c): ... here.
7956
7957 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
7958 (grub_script.tab.c): ... here.
7959
7960 * normal/command.c (grub_command_find): Fixed a memory leak of
7961 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
7962
63ba1554 79632005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7964
7965 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
7966 "@" which marks the start of a comment on ARM.
7967 (VARIABLE): Likewise.
7968
7f67dc13 79692005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7970
79bbb63f 7971 Add support for Linux/ADFS partition tables.
7f67dc13 7972
7973 * partmap/acorn.c: New file.
7974
7975 * include/grub/acorn_filecore.h: Likewise.
7976
7977 * DISTLIST: Added `partmap/acorn.c' and
7978 `include/grub/acorn_filecore.h'.
f19dbdb7 7979
7f67dc13 7980 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7981 `partmap/acorn.c'.
7982 (pkgdata_MODULES): Add `acorn.mod'.
7983 (acorn_mod_SOURCES): New variable.
7984 (acorn_mod_CFLAGS): Likewise.
7985
7986 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
7987 `partmap/acorn.c'.
7988 (pkgdata_MODULES): Add `acorn.mod'.
7989 (acorn_mod_SOURCES): New variable.
7990 (acorn_mod_CFLAGS): Likewise.
7991
7992 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
7993 (pkgdata_MODULES): Add `acorn.mod'.
7994 (acorn_mod_SOURCES): New variable.
7995 (acorn_mod_CFLAGS): Likewise.
7996 (acorn_mod_LDFLAGS): Likewise.
7997
7998 * include/types.h (grub_disk_addr_t): New typedef.
7999
6d099807 80002005-11-13 Marco Gerards <mgerards@xs4all.nl>
8001
8002 * geninit.sh: New file.
8003
8004 * geninitheader.sh: Likewise.
8005
8006 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
8007 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
8008 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
8009 * commands/configfile.c (grub_configfile_init)
8010 (grub_configfile_fini): Likewise.
8011 * commands/default.c (grub_default_init, grub_default_fini):
8012 Likewise.
8013 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
8014 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
8015 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
8016 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
8017 Likewise.
8018 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
8019 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
8020 Likewise.
8021 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 8022 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 8023 Likewise.
8024 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
8025 Likewise.
fe6b695a 8026 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 8027 Likewise.
8028 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
8029 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
8030 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
8031 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
8032 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
8033 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
8034 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
8035 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
8036 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
8037 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
8038 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
8039 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
8040 * partmap/amiga.c (grub_amiga_partition_map_init)
8041 (grub_amiga_partition_map_fini): Likewise.
8042 * partmap/apple.c (grub_apple_partition_map_init)
8043 (grub_apple_partition_map_fini): Likewise.
8044 * partmap/pc.c (grub_pc_partition_map_init)
8045 (grub_pc_partition_map_fini): Likewise.
8046 * partmap/sun.c (grub_sun_partition_map_init,
8047 grub_sun_partition_map_fini): Likewise.
8048 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
8049 Likewise.
8050
8051 * util/grub-emu.c: Include <grub_modules_init.h>.
8052 (main): Don't initialize and de-initialize any modules directly,
8053 use `grub_init_all' and `grub_fini_all' instead.
8054
8055 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
8056 `grub_vesafb_mod_init'.
8057 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
8058 all users.
8059 * term/i386/pc/vga.c (grub_vga_init): Renamed to
8060 `grub_vga_mod_init'. Updated all users.
8061 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 8062
6d099807 8063 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
8064 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
8065 rules.
8066
8067 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
8068 Generate a function to initialize the module in utilities.
8069 Updated all callers.
8070 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
8071 initialize the module in utilities. Updated all callers.
8072
9046bcf0 80732005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8074
8075 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
8076 escape sequence and a literal ^L to clear the screen.
8077
8078 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
8079 when returning from Open Firmware.
8080
d13ea639 80812005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8082
8083 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
8084 (grub_ofconsole_height): Likewise.
8085 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
8086 manually insert a '\n'.
8087 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
8088 `grub_ofconsole_height'. Return early if these are already set.
8089
a8fcf206 80902005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
8091
8092 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8093 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
8094 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
8095 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
8096 and `normal/script.c'.
8097 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8098 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8099 (test_mod_SOURCES): New variable.
8100 (test_mod_CFLAGS): Likewise.
8101 (test_mod_LDFLAGS): Likewise.
8102 (pkgdata_MODULES): Add `test.mod'.
8103 (grub_script.tab.c): New rule.
8104 (grub_script.tab.h): Likewise.
8105
b6b32745 81062005-11-07 Marco Gerards <mgerards@xs4all.nl>
8107
8108 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8109 `commands/test.c', `normal/execute.c', `normal/lexer.c',
8110 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8111 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8112 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8113 (test_mod_SOURCES): New variable.
8114 (test_mod_CFLAGS): Likewise.
8115 (pkgdata_MODULES): Add `test.mod'.
8116 (grub_script.tab.c): New rule.
8117 (grub_script.tab.h): Likewise.
8118
daac212a 81192005-11-06 Marco Gerards <mgerards@xs4all.nl>
8120
8121 Add initial scripting support.
8122
8123 * commands/test.c: New file.
8124 * include/grub/script.h: Likewise.
8125 * normal/execute.c: Likewise.
8126 * normal/function.c: Likewise.
8127 * normal/lexer.c: Likewise.
8128 * normal/parser.y: Likewise.
8129 * normal/script.c: Likewise.
8130
8131 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 8132
daac212a 8133 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
8134 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
8135 `normal/function.c' and `normal/script.c'.
8136 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8137 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 8138 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
8139 variables.
daac212a 8140 (pkgdata_MODULES): Add `test.mod'.
8141 (grub_script.tab.c): New rule.
8142 (grub_script.tab.h): Likewise.
8143
8144 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
8145
8146 * include/grub/normal.h (grub_test_init): New prototype.
8147 (grub_test_fini): Likewise.
f19dbdb7 8148
daac212a 8149 * normal/command.c: Include <grub/script.h>.
8150 (grub_command_execute): Rewritten.
f19dbdb7 8151
daac212a 8152 * util/grub-emu.c (main): Call `grub_test_init' and
8153 `grub_test_fini'.
8154
77500b2b 81552005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8156
8157 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
8158 to 0.
8159 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
8160 there are no pending characters.
8161
e45deb9e 81622005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8163
8164 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
8165 `grub_strndup' to drop device arguments. Replace unnecessary
8166 `grub_strndup' with `grub_strdup'.
8167
4ce32619 81682005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8169
8170 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
8171 `debug' environment variable has been set.
8172
81732005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 8174
4ce32619 8175 * Makefile.in (install-local): Use $(DATA).
8176 (uninstall): Likewise.
8177 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
8178 (sbin_UTILITIES): ... to here.
8179 (sbin_SCRIPTS): New variable.
8180 (grub_install_SOURCES): New variable.
8181 * util/powerpc/ieee1275/grub-install.in: New file.
8182 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
8183 variable.
8184 (add_segments): Call `grub_util_get_path'.
8185
25fe6f03 81862005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8187
8188 From Timothy Baldwin:
8189 * commands/ls.c (grub_ls_list_files): Close FILE with
8190 grub_file_close.
8191 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
8192
04ccf3ec 81932005-10-24 Marco Gerards <mgerards@xs4all.nl>
8194
8195 * include/grub/parser.h: New file.
8196
8197 * kern/parser.c: Likewise.
8198
8199 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
8200 (grub_setup_SOURCES): Likewise.
8201 (grub_probefs_SOURCES): Likewise.
8202 (grub_emu_SOURCES): Likewise.
8203 (kernel_img_HEADERS): Add `parser.h'.
8204
8205 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8206 (grub_emu_SOURCES): Add `kern/parser.c'.
8207 (grubof_SOURCES): Likewise.
8208
8209 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
8210 (grubof_SOURCES): Add `kern/parser.c'.
8211
8212 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
8213
8214 * kern/misc.c (grub_split_cmdline): Removed function.
8215
8216 * kern/rescue.c: Include <grub/parser.h>.
8217 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
8218 of `grub_split_cmdline'.
8219
8220 * normal/command.c: Include <grub/parser.h>.
8221 (grub_command_execute): Use `grub_parser_split_cmdline' instead
8222 of `grub_split_cmdline'.
8223
8224 * normal/completion.c: Include <grub/parser.h>.
8225 (cmdline_state): New variable.
8226 (iterate_dir): End the filename with a quote depending on the
8227 command line state.
8228 (get_state): new function.
8229 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
8230 split the arguments and determine the current argument. When the
8231 argument string is not quoted, escape all spaces.
8232
6d8f4b0e 82332005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8234
8235 * normal/sparc64/setjmp.S: New file.
8236
15cf03ed 82372005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8238
8239 * include/grub/sparc64/libgcc.h: New file.
8240 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
8241 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
8242 normal/sparc64/setjmp.c.
8243
03e8661a 82442005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
8245
8246 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
8247 * kern/sparc64/cache.S: New file.
8248 * kern/sparc64/cache.c: Removed.
8249 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
8250 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
8251 -mtune=ultrasparc.
8252 (COMMON_LDFLAGS): Add -melf64_sparc.
8253 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
8254 (grubof_SOURCES): Use cache.S instead of cache.c.
8255 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
8256 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
8257 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
8258 commented though.
8259 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
8260 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
8261 (linux_mod_CFLAGS): Commented out.
8262 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
8263 out because module isn't built.
8264 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
8265 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
8266 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
8267 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
8268 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
8269 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8270 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8271 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
8272 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
8273 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
8274 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8275 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8276 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
8277 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
8278
34eeec8a 82792005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
8280
8281 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
8282 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
8283 longer, because HFS should not be used on PC.
8284
708367a3 82852005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8286
8287 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
8288 consistently within the loop.
8289
6fa1251a 82902005-10-15 Marco Gerards <mgerards@xs4all.nl>
8291
8292 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
8293 directory can not be read.
8294
4801580b 82952005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8296
8297 * configure.ac (AC_INIT): Increase the version number to 1.91.
8298
8299 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
8300 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
8301 term/i386/pc/serial.c.
8302
219ad426 83032005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8304
8305 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
8306 file size must be permitted.
8307
8308 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
8309 between %ah and %al.
8310
688e5699 83112005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8312
8313 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
8314 grub_uint64_t.
8315 Call the hook with a NUL-terminated filename.
8316 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
8317 grub_cpu_to_be32.
8318
8319 * kern/term.c (cursor_state): New variable.
8320 (grub_term_set_current): Reset the cursor state on a new
8321 terminal.
8322 (grub_setcursor): Rewritten to use CURSOR_STATE.
8323 (grub_getcursor): New function.
8324
8325 * include/grub/term.h (grub_getcursor): New prototype.
8326
8327 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
8328 integers on ARM. Reported by Timothy Baldwin
8329 <T.E.Baldwin99@members.leeds.ac.uk>.
8330
bb34586c 83312005-10-11 Marco Gerards <mgerards@xs4all.nl>
8332
8333 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
8334 allocated.
8335 (grub_sfs_dir): Likewise.
8336
9a909877 83372005-10-09 Marco Gerards <mgerards@xs4all.nl>
8338
8339 Add support for the SFS filesystem.
8340
8341 * fs/sfs.c: New file.
8342
8343 * DISTLIST: Added `fs/sfs.c'.
8344
8345 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
8346 (grub_probefs_SOURCES): Likewise.
8347 (grub_emu_SOURCES): Likewise.
8348 (pkgdata_MODULES): Add `sfs.mod'.
8349 (sfs_mod_SOURCES): New variable.
8350 (sfs_mod_CFLAGS): Likewise.
8351 (sfs_mod_LDFLAGS): Likewise.
8352
8353 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
8354 (pkgdata_MODULES): Add `sfs.mod'.
8355 (sfs_mod_SOURCES): New variable.
8356 (sfs_mod_CFLAGS): Likewise.
8357
8358 * util/grub-emu.c (main): Call `grub_sfs_init' and
8359 `grub_sfs_fini'.
8360
8361 * include/grub/fs.h (grub_sfs_init): New prototype.
8362 (grub_sfs_fini): Likewise.
8363
57bdbde3 83642005-10-07 Marco Gerards <mgerards@xs4all.nl>
8365
8366 Add support for the AFFS filesystem.
8367
8368 * fs/affs.c: New file.
8369
8370 * DISTLIST: Added `fs/affs.c'.
8371
8372 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
8373 (grub_probefs_SOURCES): Likewise.
8374 (grub_emu_SOURCES): Likewise.
8375 (pkgdata_MODULES): Add `affs.mod'.
8376 (affs_mod_SOURCES): New variable.
8377 (affs_mod_CFLAGS): Likewise.
8378 (affs_mod_LDFLAGS): Likewise.
8379
8380 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
8381 (pkgdata_MODULES): Add `affs.mod'.
8382 (affs_mod_SOURCES): New variable.
8383 (affs_mod_CFLAGS): Likewise.
8384
8385 * util/grub-emu.c (main): Call `grub_affs_init' and
8386 `grub_affs_fini'.
8387
8388 * include/grub/fs.h (grub_affs_init): New prototype.
8389 (grub_affs_fini): Likewise.
8390
047b67e0 83912005-10-01 Marco Gerards <mgerards@xs4all.nl>
8392
8393 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
8394
59b8208a 83952005-10-01 Marco Gerards <mgerards@xs4all.nl>
8396
8397 * configure.ac: Accept `x86_64' as host_cpu. In that case add
8398 `-m32' to CFLAGS.
8399
8400 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
8401 linking.
f19dbdb7 8402
59b8208a 8403 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
8404 (COMMON_LDFLAGS): New variable.
8405 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
8406 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
8407 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
8408 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
8409 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
8410 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
8411 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
8412 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
8413 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
8414 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
8415 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
8416 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
8417 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
8418 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
8419 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
8420 variables.
8421 (normal_mod_ASFLAGS): Add `-m32'.
8422
8423 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
8424 (grub_host_size_t, grub_host_ssize_t): New types.
8425 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 8426 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 8427 `GRUB_HOST_SIZEOF_VOID_P'.
8428
8429 * include/grub/kernel.h (struct grub_module_header): Type of
8430 member offset changed to `grub_host_off_t'. Type of member size
8431 changed to `grub_host_size_t'.
8432 (struct grub_module_info): Type of member offset changed to
8433 `grub_host_off_t'. Type of member size changed to
8434 `grub_host_size_t'.
8435
b4093103 84362005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
8437
8438 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 8439
b4093103 8440 * kern/i386/pc/startup.S (multiboot_header): New label.
8441 (multiboot_entry): Likewise.
8442 (multiboot_trampoline): Likewise.
8443
8444 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8445 Increased to 0x4A0.
8446
8447 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
8448 put parentheses after a question mark.
8449 [!GRUB_UTIL] (my_mod): New variable.
8450
8451 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
8452
b2499b29 84532005-09-28 Marco Gerards <mgerards@xs4all.nl>
8454
8455 Adds support for the XFS filesystem. Btrees are not supported
8456 yet.
8457
8458 * fs/xfs.c: New file.
8459
8460 * DISTLIST: Added `fs/xfs.c'.
8461
8462 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
8463 (grub_probefs_SOURCES): Likewise.
8464 (grub_emu_SOURCES): Likewise.
8465 (pkgdata_MODULES): Add `xfs.mod'.
8466 (xfs_mod_SOURCES): New variable.
8467 (xfs_mod_CFLAGS): Likewise.
8468
8469 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
8470 (pkgdata_MODULES): Add `xfs.mod'.
8471 (xfs_mod_SOURCES): New variable.
8472 (xfs_mod_CFLAGS): Likewise.
8473
8474 * util/grub-emu.c (main): Call `grub_xfs_init' and
8475 `grub_xfs_fini'.
8476
8477 * include/grub/fs.h (grub_xfs_init): New prototype.
8478 (grub_xfs_fini): Likewise.
8479
f19dbdb7 8480
83d37a62 84812005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
8482
8483 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
8484 color modes, allow greater than 16 colors to be configured as
8485 a default palette.
8486
47d2d65e 84872005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8488
8489 * normal/completion.c (complete_arguments): Add the qualifier
8490 const into OPTIONS.
8491
8492 From Omniflux <omniflux+lists@omniflux.com>:
8493 * include/grub/terminfo.h: New file.
8494 * include/grub/tparm.h: Likewise.
8495 * include/grub/i386/pc/serial.h: Likewise.
8496 * term/terminfo.c: Likewise.
8497 * term/tparm.c: Likewise.
8498 * term/i386/pc/serial.c: Likewise.
8499 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
8500 serial.mod.
8501 (terminfo_mod_SOURCES): New variable.
8502 (terminfo_mod_CFLAGS): Likewise.
8503 (serial_mod_SOURCES): Likewise.
8504 (serial_mod_CFLAGS): Likewise.
8505
48b671ff 85062005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
8507
8508 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
8509 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
8510 and kern/powerpc/ieee1275/cmain.c, respectively.
8511
8512 * boot/powerpc/ieee1275/crt0.S: Moved to ...
8513 * kern/powerpc/ieee1275/crt0.S: ... here.
8514
8515 * boot/powerpc/ieee1275/cmain.c: Moved to ...
8516 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 8517
48b671ff 8518 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
8519 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
8520 instead of boot/powerpc/ieee1275/crt0.S and
8521 boot/powerpc/ieee1275/cmain.c, respectively.
8522
8523 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
8524 sectors. It was not used anyway.
8525
09fc77a7 85262005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8527
8528 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
8529 `unused parameter' warning.
8530
003789c7 85312005-08-30 Hollis Blanchard <hollis@penguinppc.org>
8532
8533 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
8534 function.
8535 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
8536 getcharwidth.
8537
67f44c86 85382005-08-28 Marco Gerards <metgerards@student.han.nl>
8539
8540 * include/grub/normal.h (enum grub_completion_type): Added
8541 `GRUB_COMPLETION_TYPE_ARGUMENT'.
8542
8543 * normal/cmdline.c (print_completion): Handle
8544 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
8545 * normal/menu_entry.c (store_completion): Likewise.
8546
8547 * normal/completion.c (complete_arguments): New function.
8548 (grub_normal_do_completion): Call `complete_arguments' when the
8549 current words start with a dash.
8550
0b5abe02 85512005-08-27 Marco Gerards <metgerards@student.han.nl>
8552
8553 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
8554 `gzio.mod' instead of `io.mod').
8555
d9864ee1 85562005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
8557
8558 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
8559 (DISTDIRS): Added io and video.
8560 Rewrite the search routine to make an output consistently.
8561
8562 * DISTLIST: Added conf/sparc64-ieee1275.mk,
8563 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
8564 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
8565 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
8566 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
8567 util/powerpc/ieee1275/misc.c.
f19dbdb7 8568
d9864ee1 8569 * include/grub/gzio.h: New file.
8570 * io/gzio.c: Likewise.
f19dbdb7 8571
d9864ee1 8572 * kern/file.c (grub_file_close): Call grub_device_close only if
8573 FILE->DEVICE is not NULL.
8574
8575 * include/grub/mm.h [!NULL] (NULL): New macro.
8576
8577 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
8578
8579 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
8580 (pkgdata_MODULES): Added gzio.mod.
8581 (gzio_mod_SOURCES): New variable.
8582 (gzio_mod_CFLAGS): Likewise.
8583
8584 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
8585 (pkgdata_MODULES): Added gzio.mod.
8586 (gzio_mod_SOURCES): New variable.
8587 (gzio_mod_CFLAGS): Likewise.
8588
8589 * commands/cat.c: Include grub/gzio.h.
8590 (grub_cmd_cat): Use grub_gzfile_open instead of
8591 grub_file_open.
f19dbdb7 8592
d9864ee1 8593 * commands/cmp.c: Include grub/gzio.h.
8594 (grub_cmd_cmp): Use grub_gzfile_open instead of
8595 grub_file_open.
8596
8597 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
8598 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
8599 grub_file_open.
8600 (grub_rescue_cmd_module): Likewise.
8601
fa46f4b5 86022005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8603
8604 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
8605 kern/sparc64/ieee1275/init.c because it contains _start.
8606 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
8607
e9211b5d 86082005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
8609
8610 * configure.ac: Add support for sparc64 host with ieee1275
8611 firmware.
8612 * configure: Generated from configure.ac.
8613 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
8614 instead of int.
8615 (grub_ofdisk_read): Likewise.
8616 (grub_ofdisk_open): Use %p to print pointer values, and cast the
8617 pointers as (void *) to remove a warning.
8618 (grub_ofdisk_close): Likewise.
8619 (grub_ofdisk_read): Likewise.
8620 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
8621 returns, so make it return void to remove a warning.
8622 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
8623 Corresponding prototype change.
8624 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
8625 values, and cast the pointers as (void *) to remove a warning.
8626 (grub_mm_dump): Likewise.
8627 * conf/sparc64-ieee1275.mk: New file.
8628 * conf/sparc64-ieee1275.rmk: Likewise.
8629 * include/grub/sparc64/setjmp.h: Likewise.
8630 * include/grub/sparc64/types.h: Likewise.
8631 * include/grub/sparc64/ieee1275/console.h: Likewise.
8632 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8633 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8634 * include/grub/sparc64/ieee1275/time.h: Likewise.
8635 * kern/sparc64/cache.c: Likewise.
8636 * kern/sparc64/dl.c: Likewise.
8637 * kern/sparc64/ieee1275/init.c: Likewise.
8638 * kern/sparc64/ieee1275/openfw.c: Likewise.
8639
385c6a92 86402005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8641
8642 * util/console.c (grub_ncurses_putchar): If C is greater than
8643 0x7f, set C to a question mark.
8644 (grub_ncurses_getcharwidth): New function.
8645 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
8646 getcharwidth.
8647
8648 * normal/menu.c (print_entry): Made aware of Unicode. First,
8649 convert TITLE to UCS-4, and predict the cursor position by
8650 grub_getcharwidth.
8651
8652 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
8653 const to SRC.
8654 * kern/misc.c (grub_utf16_to_utf8): Likewise.
8655
16ccb8b1 86562005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8657
8658 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
8659 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8660 grub_strcat.
8661
8662 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
8663 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
8664 grub_strcpy and grub_strlen. Take it into account that a space
8665 character is inserted as a delimiter.
8666
6a85ce79 86672005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8668
8669 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 8670 invalid magic in the error.
6a85ce79 8671
8672 * commands/search.c: New file.
f19dbdb7 8673
6a85ce79 8674 * util/grub-emu.c (main): Call grub_search_init and
8675 grub_search_fini.
8676
8677 * kern/rescue.c (grub_rescue_print_disks): Removed.
8678 (grub_rescue_print_devices): New function.
8679 (grub_rescue_cmd_ls): Use grub_device_iterate with
8680 grub_rescue_print_devices instead of grub_disk_dev_iterate with
8681 grub_rescue_print_disks.
8682
8683 * kern/partition.c (grub_partition_iterate): Return the result of
8684 PARTMAP->ITERATE instead of GRUB_ERRNO.
8685
8686 * kern/device.c: Include grub/partition.h.
8687 (grub_device_iterate): New function.
8688
8689 * include/grub/partition.h (grub_partition_iterate): Return int
8690 instead of grub_err_t.
8691
8692 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
8693 prototype.
8694 [GRUB_UTIL] (grub_search_fini): Likewise.
8695
8696 * include/grub/device.h (grub_device_iterate): New prototype.
8697
8698 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8699 commands/search.c.
8700 (pkgdata_MODULES): Added search.mod.
8701 (search_mod_SOURCES): New variable.
8702 (search_mod_CFLAGS): Likewise.
8703
8704 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
8705 (pkgdata_MODULES): Added search.mod.
8706 (search_mod_SOURCES): New variable.
8707 (search_mod_CFLAGS): Likewise.
8708
8709 * commands/ls.c (grub_ls_list_disks): Renamed to ...
8710 (grub_ls_list_devices): ... this, and use grub_device_iterate.
8711 All callers changed.
8712
8713 * DISTLIST: Added commands/search.c.
8714
ef095434 87152005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
8716
8717 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
8718 conversion.
8719 (grub_getcharwidth): New function.
8720
8721 * kern/misc.c (grub_utf8_to_ucs4): New function.
8722
8723 * include/grub/term.h (struct grub_term): Added a new member
8724 "getcharwidth".
8725 (grub_getcharwidth): New prototype.
8726
8727 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
8728
8729 * term/i386/pc/console.c (map_char): New function. Segregated from
8730 grub_console_putchar.
8731 (grub_console_putchar): Use map_char.
8732 (grub_console_getcharwidth): New function.
8733 (grub_console_term): Specified grub_console_getcharwidth as
8734 getcharwidth.
8735
8736 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
8737 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
8738
8739 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
8740 GRUB_ERRNO.
8741 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
8742 on grub_strtoul completely.
8743 (write_char): Declare local variables in the beginning of the
8744 function.
8745 (grub_vesafb_getcharwidth): New function.
8746 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
8747 getcharwidth.
8748
1f0a95e4 87492005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
8750
8751 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
8752 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
8753 commands/i386/pc/vbetest.c.
8754
8755 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
8756 call grub_vbe_get_controller_info again, because the returned
8757 information is volatile.
8758 (grub_vbe_set_video_mode): Mostly rewritten.
8759 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
8760 grub_vbe_status_t correctly.
8761 (grub_vbe_get_video_mode_info): Likewise.
8762 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
8763 several if statements.
8764
8765 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
8766 * commands/i386/pc/vbeinfo.c: ... this.
8767
8768 * commands/i386/pc/vbe_test.c: Renamed to ...
8769 * commands/i386/pc/vbetest.c: ... this.
8770
8771 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
8772 ...
8773 (grub_cmd_vbeinfo): ... this. Save video modes before
8774 iterating. Skip a video mode, if it is not available, not enough
8775 information is given or it is monochrome. Show the memory
8776 model. Leave the interpretation of MODEVAR to grub_strtoul
8777 completely.
8778 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
8779 (GRUB_MOD_FINI): Likewise.
8780
8781 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
8782 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
8783 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
8784 duplicated grub_env_get. Leave the interpretation of MODEVAR to
8785 grub_strtoul completely.
8786 (real2pm): Removed.
8787 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
8788 (GRUB_MOD_FINI): Likewise.
8789
8790 * normal/misc.c: Include grub/mm.h.
8791
8792 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
8793 vbe_list_modes with vbetest.mod and vbeinfo.mod.
8794 (vbe_list_modes_mod_SOURCES): Removed.
8795 (vbe_list_modes_mod_CFLAGS): Likewise.
8796 (vbe_test_mod_SOURCES): Likewise.
8797 (vbe_test_mod_CFLAGS): Likewise.
8798 (vbeinfo_mod_SOURCES): New variable.
8799 (vbeinfo_mod_CFLAGS): Likewise.
8800 (vbetest_mod_SOURCES): Likewise.
8801 (vbetest_mod_CFLAGS): Likewise.
8802
992ffbbe 88032005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
8804
8805 * normal/misc.c: New file.
8806
8807 * DISTLIST: Added normal/misc.c.
f19dbdb7 8808
992ffbbe 8809 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
8810 DISK to HOOK. Call HOOK with DISK.
8811 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8812 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8813 * partmap/sun.c (sun_partition_map_iterate): Likewise.
8814
8815 * normal/menu_entry.c (struct screen): Added a new member
8816 "completion_shown".
8817 (completion_buffer): New global variable.
8818 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
8819 (store_completion): New function.
8820 (complete): Likewise.
8821 (clear_completions): Likewise.
8822 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
8823 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
8824 a tab, call complete.
8825
8826 * normal/completion.c (disk_dev): Removed.
8827 (print_simple_completion): Likewise.
8828 (print_partition_completion): Likewise.
8829 (print_func): New global variable.
8830 (add_completion): Do not take the arguments WHAT or PRINT any
8831 longer. Added a new argument TYPE. Instead of printing directly,
8832 call PRINT_FUNC if not NULL.
8833 All callers changed.
8834 (complete_device): Use a local variable DEV instead of
8835 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
8836 (grub_normal_do_completion): Take a new argument HOOK. Do not
8837 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
8838 empty string, return NULL instead.
8839 All callers changed.
8840
8841 * normal/cmdline.c (print_completion): New function.
8842
8843 * kern/partition.c (grub_partition_iterate): Add an argument DISK
8844 to HOOK.
8845 All callers changed.
8846
8847 * kern/disk.c (grub_print_partinfo): Removed.
8848
8849 * include/grub/partition.h (struct grub_partition_map): Add a new
8850 argument DISK into HOOK of ITERATE.
8851 (grub_partition_iterate): Add a new argument DISK to HOOK.
8852
8853 * include/grub/normal.h (enum grub_completion_type): New enum.
8854 (grub_completion_type_t): New type.
8855 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
8856 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
8857 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
8858 (GRUB_COMPLETION_TYPE_FILE): Likewise.
8859 (grub_normal_do_completion): Added a new argument HOOK.
8860 (grub_normal_print_device_info): New prototype.
8861
8862 * include/grub/disk.h (grub_print_partinfo): Removed.
8863
8864 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
8865 (normal_mod_SOURCES): Likewise.
8866 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8867 (normal_mod_SOURCES): Likewise.
8868
8869 * commands/ls.c (grub_ls_list_disks): Use
8870 grub_normal_print_device_info instead of grub_print_partinfo. Free
8871 PNAME.
8872 (grub_ls_list_files): Use grub_normal_print_device_info instead of
8873 duplicating the code.
8874
0bd41162 88752005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8876
8877 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 8878 follow GCS more precisely.
8879 * commands/i386/pc/vbe_test.c: Likewise.
8880 * include/grub/i386/pc/vbe.h: Likewise.
8881 * term/i386/pc/vesafb.c: Likewise.
8882 * video/i386/pc/vbe.c: Likewise.
0bd41162 8883
6323696a 88842005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
8885
8886 * DISTLIST: Added term/i386/pc/vesafb.c
8887 DISTLIST: Added video/i386/pc/vbe.c
8888 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
8889 DISTLIST: Added commands/i386/pc/vbe_test.c.
8890 * commands/i386/pc/vbe_list_modes.c: New file.
8891 * commands/i386/pc/vbe_test.c: Likewise.
8892 * term/i386/pc/vesafb.c: Likewise.
8893 * video/i386/pc/vbe.c: Likewise.
8894 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
8895 (grub_vbe_probe) Added prototype.
8896 (grub_vbe_set_video_mode) Likewise.
8897 (grub_vbe_get_video_mode) Likewise.
8898 (grub_vbe_get_video_mode_info) Likewise.
8899 (grub_vbe_set_pixel_rgb) Likewise.
8900 (grub_vbe_set_pixel_index) Likewise.
8901 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
8902 (pkgdata_MODULES): Added vesafb.mod.
8903 (pkgdata_MODULES): Added vbe_list_modes.mod.
8904 (pkgdata_MODULES): Added vbe_test.mod.
8905 (vbe_mod_SOURCES): Added.
8906 (vbe_mod_CFLAGS): Likewise.
8907 (vesafb_mod_SOURCES): Likewise.
8908 (vesafb_mod_CFLAGS): Likewise.
8909 (vbe_list_modes_mod_SOURCES): Likewise.
8910 (vbe_list_modes_mod_CFLAGS): Likewise.
8911 (vbe_test_mod_SOURCES): Likewise.
8912 (vbe_test_mod_CFLAGS): Likewise.
8913
0a74e62f 89142005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
8915
0a74e62f 8916 * normal/command.c (grub_command_execute): If INTERACTIVE is
8917 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
8918 CMDLINE. Disable the pager if INTERACTIVE is true.
8919 All callers are changed.
8920
8921 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
8922 before reading a config file.
8923 * normal/main.c (read_config_file): Even if a command is not
8924 found, register it if it is within an entry.
8925
8926 * util/grub-emu.c: Include sys/types.h and unistd.h.
8927 (options): Added --hold.
8928 (struct arguments): Added a new member "hold".
8929 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
8930 missing.
8931 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
8932 cleared by a debugger, if it is not zero.
8933
8934 * include/grub/normal.h (grub_command_execute): Add an argument
8935 INTERACTIVE.
8936
e51f85ae 89372005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
8938
8939 * DISTLIST: Added include/grub/i386/pc/vbe.h.
8940
e9c6f39b 89412005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
8942
8943 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
8944 program with another one, because the old one didn't detect a bug
8945 in gcc-3.4. Always use regparm 2, because the new test is still
8946 not enough for gcc-4.0. Someone must investigate a simple test
8947 case which detects a bug in gcc-4.0.
8948
8de3495c 89492005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
8950
8951 * DISTLIST: Added normal/completion.c.
8952
8953 * normal/completion.c: New file.
f19dbdb7 8954
8de3495c 8955 * term/i386/pc/console.c (grub_console_getwh): New function.
8956 (grub_console_term): Assign grub_console_getwh to getwh.
8957
8958 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
8959 function is defined in normal/completion.c as
8960 grub_normal_do_completion.
8961 (grub_cmdline_get): Use grub_normal_do_completion instead of
8962 grub_tab_complete.
8963
8964 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
8965 returns non-zero, otherwise return 0.
8966 (grub_partition_iterate): First, probe the partition map. Then,
8967 call ITERATE only for this partition map.
8968
8969 * kern/misc.c (grub_strncmp): Rewritten.
8970
8971 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
8972 returns non-zero. Otherwise return 0.
8973
8974 * include/grub/partition.h (grub_partition_map_iterate): Return
8975 int instead of void.
8976
8977 * include/grub/normal.h (grub_normal_do_completion): New prototype.
8978
8979 * include/grub/misc.h (grub_strncmp): Change the type of N to
8980 grub_size_t.
8981
8982 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
8983 of void.
8984
8985 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 8986 unsigned explicitly before comparing it with I.
8de3495c 8987
8988 * kern/main.c (grub_env_write_root): Add the attribute unused into
8989 VAR.
8990
8991 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8992 normal/completion.c.
8993 (normal_mod_SOURCES): Likewise.
8994 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8995 (normal_mod_SOURCES): Likewise.
8996
8997 * normal/command.c (grub_iterate_commands): If ITERATE returns
8998 non-zero, return one immediately.
8999
e85e144b 90002005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
9001
9002 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
9003 * kern/i386/pc/startup.S: Updated Global Descriptor table's
9004 descriptions.
9005 (grub_vbe_get_controller_info): New function.
9006 (grub_vbe_get_mode_info): Likewise.
9007 (grub_vbe_set_mode): Likewise.
9008 (grub_vbe_get_mode): Likewise.
9009 (grub_vbe_set_memory_window): Likewise.
9010 (grub_vbe_get_memory_window): Likewise.
9011 (grub_vbe_set_scanline_length): Likewise.
9012 (grub_vbe_get_scanline_length): Likewise.
9013 (grub_vbe_set_display_start): Likewise.
9014 (grub_vbe_get_display_start): Likewise.
9015 (grub_vbe_set_palette_data): Likewise.
9016 * include/grub/i386/pc/vbe.h: New file.
9017
c46153d2 90182005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9019
9020 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9021 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
9022 * DISTLIST: Likewise.
9023 * kern/ieee1275/of.c: Moved to ...
9024 * kern/ieee1275/ieee1275.c: ... here.
9025
0cb90c45 90262005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9027
9028 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
9029 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
9030 Pass 0 as `end' parameter to grub_strtoul().
9031
a19fb360 90322005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9033
9034 * include/grub/powerpc/ieee1275/console.h: Do not include
9035 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
9036 ifdef.
9037 (grub_console_cur_color): Remove i386-specific prototype.
9038 (grub_console_real_putchar): Likewise.
9039 (grub_console_checkkey): Likewise.
9040 (grub_console_getkey): Likewise.
9041 (grub_console_getxy): Likewise.
9042 (grub_console_gotoxy): Likewise.
9043 (grub_console_cls): Likewise.
9044 (grub_console_setcursor): Likewise.
9045 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
9046 Include <grub/machine/console.h>.
9047 * term/ieee1275/ofconsole.c: Likewise.
9048
4ac9bd04 90492005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
9050
9051 * Makefile.in (LIBLZO): New variable.
9052
9053 * configure.ac: Check for LZO version 2.
9054
9055 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
9056 lzo/lzo1x.h instead of lzo1x.h.
9057
9058 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
9059 of -llzo.
9060
9061 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
9062 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
9063
9064 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
9065 copying the data from PARTITION to P.
9066
f4917dfd 90672005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9068
9069 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
9070 negative, unload the module.
9071
9072 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
9073 map is "pc_partition_map" but not "pc".
9074 (usage): Fix the description. The options are --boot-image and
9075 --core-image but not --boot-file or --core-file.
9076 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
9077 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
9078 DEFAULT_DIRECTORY.
9079
9080 * util/i386/pc/grub-install.in: Do not specify --boot-file or
9081 --core-file. Specify INSTALL_DEVICE as an argument.
9082
9083 * util/console.c: Include config.h.
9084 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
9085 [HAVE_NCURSES_H]: Include ncurses.h.
9086 [HAVE_CURSES_H]: Include curses.h.
9087 [!A_NORMAL] (A_NORMAL): Defined as zero.
9088 [!A_STANDOUT] (A_STANDOUT): Likewise.
9089
9090 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
9091 -lncurses.
9092 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
9093
9094 * configure.ac: Check for curses libraries and headers.
9095
9096 * Makefile.in (LIBCURSES): New variable.
9097
9098 * genmk.rb (Script::rule): Set the executable bits.
9099
9100 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
9101 name of the PC partition map is "pc_partition_map" but not "pc".
9102
0e143073 91032005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9104
9105 * util/i386/pc/grub-install.in (grub_probefs): New variable.
9106 (modules): Likewise.
9107 (usage): Added descriptions for --modules and --grub-probefs.
9108 Handle --modules and --grub-probefs. Save the arguments in MODULES
9109 and GRUB_PROBEFS, respectively.
9110 Auto-detect a filesystem module against GRUBDIR. If the result is
9111 empty and modules are not specified explicitly, abort the
9112 installation. Add the result to MODULES.
9113
9114 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
9115 disk/powerpc/ieee1275/ofdisk.c,
9116 include/grub/powerpc/ieee1275/init.h and
9117 term/powerpc/ieee1275/ofconsole.c.
9118 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
9119 term/ieee1275/ofconsole.c.
9120
9121 * include/grub/powerpc/ieee1275/console.h: Resurrected.
9122
9123 * COPYING: Upgraded to the latest version. Only the address of the
9124 FSF office has changed.
f19dbdb7 9125
efd6e6d5 91262005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9127
9128 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9129 kern/ieee1275.c with kern/ieee1275/of.c.
9130
9131 * kern/ieee1275.c: Moved to ...
9132 * kern/ieee1275/of.c: ... here.
9133
8ceafda2 91342005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
9135
9136 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 9137 readability.
8ceafda2 9138
9139 * config.guess: Updated to the latest version from gnulib.
9140 * config.sub: Likewise.
9141 * install.sh: Likewise.
9142 * mkinstalldirs: Likewise.
9143
9144 * include/grub/console.h: Removed. This file is arch-specific. Do
9145 not put this in include/grub.
9146
9147 * include/grub/i386/pc/console.h: Resurrected.
9148
9149 * util/console.c: Include grub/machine/console.h instead of
9150 grub/console.h.
9151 * util/grub-emu.c: Likewise.
9152
267f6cd9 91532005-08-04 Marco Gerards <metgerards@student.han.nl>
9154
9155 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
9156 hardcoded value.
f19dbdb7 9157
267f6cd9 9158 From Vincent Pelletier <subdino2004@yahoo.fr>
9159 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
9160 Redefined to use grub_getwh.
9161 (grub_term): New member named getwh.
9162 (grub_getwh): New prototype.
9163 * kern/term.c (grub_getwh): New function.
9164 * term/i386/pc/console.c (grub_console_getwh): New function.
9165 (grub_console_term): New member `getwh'.
9166 * term/i386/pc/vga.c (grub_vga_getwh): New function.
9167 (grub_vga_term): New member `getwh'.
0b5abe02 9168 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 9169 grub_ssize_t.
9170 (grub_ofconsole_getw): New function.
9171 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
9172 (grub_ofconsole_term): New field named getwh and new initial
9173 value.
9174
3be7266d 91752005-08-03 Hollis Blanchard <hollis@penguinppc.org>
9176
9177 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
9178 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
9179 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
9180 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
9181 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
9182 of <grub/machine/ieee1275.h>.
9183 * commands/ieee1275/reboot.c: Likewise.
9184 * boot/powerpc/ieee1275/ieee1275.c: Move ...
9185 * kern/ieee1275.c: ... to here. All users updated. Change all
9186 parameter structs to use new type `grub_ieee1275_cell_t'.
9187 * term/powerpc/ieee1275/ofconsole.c: Move ...
9188 * term/ieee1275/ofconsole.c: ... to here. All users updated.
9189 * disk/powerpc/ieee1275/ofdisk.c: Move ...
9190 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
9191 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
9192 to return int.
9193 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
9194 Remove unused prototypes. All users updated.
9195 * include/grub/powerpc/ieee1275/console.h: Removed.
9196 * include/grub/powerpc/ieee1275/ieee1275.h: Define
9197 `grub_ieee1275_cell_t'.
9198 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
9199 Cast comparisons with -1 to the correct type.
9200 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
9201 type to match `grub_ieee1275_entry_fn'.
9202
8b5f3938 92032005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
9204
9205 * DISTLIST: Added util/i386/pc/grub-probefs.c.
9206
9207 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
9208 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
9209 partmap/sun.c.
9210 (grub_probefs_SOURCES): New variable.
9211
9212 * util/i386/pc/grub-probefs.c: New file.
9213
9214 * util/i386/pc/grub-setup.c (main): Call
9215 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
9216 grub_hfs_init and grub_jfs_init to initialize the system. Call
9217 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
9218 grub_pc_partition_map_fini to finish the system.
9219
ea409713 92202005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
9221
9222 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
9223 function.
9224 (grub_multiboot_load_elf32): Likewise.
9225 (grub_multiboot_is_elf64): Likewise.
9226 (grub_multiboot_load_elf64): Likewise.
9227 (grub_multiboot_load_elf): Likewise.
9228 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
9229 an ELF32 or ELF64 file.
9230 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
9231
9232 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
9233 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
9234 NULL before calling FS->LABEL.
9235 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
9236 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
9237 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
9238 before calling FS->LABEL.
9239
141a288b 92402005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
9241
9242 * util/i386/pc/grub-install.in (datadir): New variable.
9243 (libdir): Removed.
9244 (pkgdatadir): New variable.
9245 (pkglibdir): Removed.
9246
0d5f8a54 92472005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
9248
9249 * DISTLIST: Added util/i386/pc/grub-install.in.
9250
9251 * util/i386/pc/grub-install.in: New file.
9252
9253 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
9254 (grub_install_SOURCES): Likewise.
9255
9256 * genmk.rb: Added support for scripts.
9257 (Script): New class.
9258 (scripts): New variable.
9259
9260 * Makefile.in (install-local): Install sbin_SCRIPTS by
9261 INSTALL_SCRIPT.
9262 (uninstall): Remove sbin_SCRIPTS.
9263
9264 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
9265 device, try to get a GRUB device by
9266 grub_util_biosdisk_get_grub_dev.
9267 Free DEST_DEV.
9268
9269 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
9270 description for --device-map.
9271
5f968e1e 92722005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9273
9274 Change the semantics of variable hooks. They now return strings
9275 instead of error values.
f19dbdb7 9276
5f968e1e 9277 * util/i386/pc/grub-setup.c: Include grub/env.h.
9278 (setup): Use grub_device_set_root instead of grub_env_set.
9279
9280 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
9281 grub_env_get instead of grub_device_set_root and
9282 grub_device_get_root, respectively.
9283
9284 * kern/main.c (grub_env_write_root): New function.
9285 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
9286 grub_env_set instead of grub_device_set_root.
9287
9288 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
9289 many variables.
9290 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
9291 rather than calling ENV->WRITE_HOOK afterwards.
9292 (grub_env_get): Return the result of ENV->READ_HOOK rather than
9293 passing a pointer of a pointer.
9294 (grub_register_variable_hook): Change the types of "read_hook" and
9295 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
9296 respectively.
9297 Allocate the default empty string on the heap, because this string
9298 may be freed later.
9299
9300 * kern/device.c: Include grub/env.h.
9301 (grub_device_set_root): Removed.
9302 (grub_device_get_root): Likewise.
9303 (grub_device_open): Use grub_env_get instead of
9304 grub_device_get_root.
9305
9306 * include/grub/env.h (grub_env_read_hook_t): New type.
9307 (grub_env_write_hook_t): Likewise.
9308 (grub_env_var): Change the types of "read_hook" and "write_hook"
9309 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
9310 (grub_register_variable_hook): Likewise.
9311
9312 * include/grub/device.h (grub_device_set_root): Removed.
9313 (grub_device_set_root): Likewise.
9314
9315 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
9316 make sure that DIRNAME terminates with '/', so that
9317 grub_fat_find_dir will fail if PATH is not a directory.
9318
9319 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
9320 from DIRNAME.
9321 Use the qualifier auto for print_files and print_files_long.
9322 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
9323 as a regular file.
9324 Put a newline only if there is no error.
9325 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
9326 used.
9327
896f0afd 93282005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
9329
9330 * kern/partition.c (grub_partition_probe): Initialize PART to
9331 NULL. Otherwise, when no partition map is registered, this returns
9332 a garbage.
9333
b28b81b2 93342005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
9335
9336 * partmap/apple.c (apple_partition_map_iterate): Check if POS
9337 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
9338 valid.
9339
5f3607e0 93402005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
9341
9342 * commands/ls.c (grub_ls_list_disks): Print the filesystem
9343 information on each device, if it does not have partitions. Print
9344 "Device" instead of "Disk", because this function is not specific
9345 to disk devices.
9346
9347 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
9348 static to ensure that it is put on the memory rather than a
9349 register.
9350
502c87e8 93512005-07-17 Yoshinori Okuji <okuji@enbug.org>
9352
9353 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
9354 (grub_cat_init): Likewise.
9355 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
9356 (options): Likewise.
9357 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
9358 (grub_configfile_init): Likewise.
9359 * font/manager.c (GRUB_MOD_INIT): Likewise.
9360 * commands/help.c (GRUB_MOD_INIT): Likewise.
9361 (grub_help_init): Likewise.
9362 * normal/command.c (grub_command_init): Likewise.
9363 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
9364 * disk/loopback.c (grub_loop_init): Likewise.
9365 (GRUB_MOD_INIT): Likewise.
9366 * commands/ls.c (grub_ls_init): Likewise.
9367 (GRUB_MOD_INIT): Likewise.
9368 (options): Likewise.
9369 * commands/boot.c (grub_boot_init): Likewise.
9370 (GRUB_MOD_INIT): Likewise.
9371 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
9372 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
9373 (GRUB_MOD_INIT): Likewise.
9374 * commands/cmp.c (grub_cmp_init): Likewise.
9375 (GRUB_MOD_INIT): Likewise.
9376
9377 * normal/arg.c: Use <> instead of "" to include header files.
9378 (SHORT_ARG_HELP): New macro.
9379 (SHORT_ARG_USAGE): Likewise.
9380 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
9381 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
9382 descriptions.
9383 (find_short): Check if C is 'h' or 'u' explicitly.
9384 (grub_arg_show_help): Use space characters instead of tabs. Treat
9385 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
9386 are shown with --help and --usage only if they are not used for
9387 the command itself.
9388 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
9389 'h' and 'u'.
9390
9391 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
9392 const into "longarg". Change the type of "shortarg" to int.
9393
f806d18e 93942005-07-17 Yoshinori Okuji <okuji@enbug.org>
9395
9396 * boot/i386/pc/boot.S (boot_drive_check): New label.
9397
9398 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
9399 macro.
9400
9401 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
9402 which do not pass a boot drive correctly. Copied from GRUB Legacy.
9403
e293232b 94042005-07-17 Yoshinori Okuji <okuji@enbug.org>
9405
9406 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
9407 When turning off Gate A20, skip the check and return immediately,
9408 because this is not fatal usually.
9409
ebedfd00 94102005-07-17 Yoshinori Okuji <okuji@enbug.org>
9411
9412 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
9413 be 0x7C00 instead of 0x8000.
9414
9415 * boot/i386/pc/pxeboot.S: Rewritten.
9416
9417 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
9418 EXT_C.
9419 (gate_a20_check_state): Read a byte from 0x108000. Invert the
9420 result.
9421
654fc59f 94222005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
9423
9424 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
9425 robustness. This routine now supports a BIOS call and System
9426 Control Port A to modify the gate A20.
9427
9428 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9429 Increased to 0x440.
9430
09f9923f 94312005-07-12 Hollis Blanchard <hollis@penguinppc.org>
9432
9433 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
9434 device path and resulting ihandle.
9435 (grub_ofdisk_close): dprintf the ihandle being closed.
9436 (grub_ofdisk_read): dprintf function parameters.
9437 * kern/mm.c (grub_mm_init_region): Likewise.
9438 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
9439 (grub_linux_boot): dprintf the Linux entry point, initrd address and
9440 size, and boot arguments.
9441 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
9442 before loading into memory.
9443 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
9444 before loading into memory.
9445
7ef504d8 94462005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
9447
9448 * kern/mm.c: Added much documentation.
9449 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
9450 8, set to 5 instead of 8.
9451
e0f050c2 94522005-07-10 Yoshinori Okuji <okuji@enbug.org>
9453
9454 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
9455
9456 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
9457 (grub_mkdevicemap_SOURCES): New variable.
9458
9459 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
9460 lib/device.c of GRUB Legacy.
9461
7224189a 94622005-07-10 Yoshinori Okuji <okuji@enbug.org>
9463
9464 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
9465 instead of PATH is NULL.
9466
68c864eb 94672005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
9468
9469 * commands/cmp.c (BUFFER_SIZE): New macro.
9470 (grub_cmd_cmp): Close the right file at the right time. Compare
9471 only data just read. Don't report files of different size as
9472 identical. Dynamically allocate buffers. Move variable
9473 declarations at the beginning of function.
9474
e6f3e614 94752005-07-09 Yoshinori Okuji <okuji@enbug.org>
9476
9477 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
9478 reverse.
9479
f8f1559a 94802004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
9481
9482 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
9483 when backspace is pressed at beginning of line.
9484
39c9d41d 94852005-07-03 Yoshinori Okuji <okuji@enbug.org>
9486
9487 * DISTLIST: Added genfslist.sh.
9488
9489 * normal/main.c (fs_module_list): New variable.
9490 (autoload_fs_module): New function.
9491 (read_fs_list): Likewise.
9492 (grub_normal_execute): Call read_fs_list.
9493
9494 * kern/fs.c (grub_fs_autoload_hook): New variable.
9495 (grub_fs_probe): Added support for auto-loading.
9496
9497 * include/grub/normal.h (struct grub_fs_module_list): New struct.
9498 (grub_fs_module_list_t): New type.
9499
9500 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
9501 (grub_fs_autoload_hook): New prototype.
9502
9503 * genfslist.sh: New file.
f19dbdb7 9504
39c9d41d 9505 * genmk.rb: Added a rule to generate a filesystem list.
9506
121c1d83 95072005-06-30 Marco Gerards <metgerards@student.han.nl>
9508
9509 * configure.ac: Fix the test for cross-compiling.
9510
9511 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
9512 define GRUB_UTIL anymore.
9513
9514 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
9515 so this function works on other systems than just big endian.
9516 (load_modules): Likewise.
9517 (add_segments): Likewise.
9518
e75d76e1 95192005-06-23 Hollis Blanchard <hollis@penguinppc.org>
9520
9521 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
9522 contains `l' modifier, get a long from va_arg().
9523
50b5a0a7 95242005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
9525
9526 * kern/mm.c (grub_free): If the next free block which is being
9527 merged is the first free block, set the first block to the block
9528 being freed.
9529 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
9530
89371b20 95312005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9532
9533 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
9534 `grub_ieee1275_chosen'.
9535
168d6e58 95362005-05-08 Hollis Blanchard <hollis@penguinppc.org>
9537
9538 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
9539 (grub_ieee1275_chosen): New variable.
9540 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
9541 `chosen'.
9542 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
9543 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9544 Rename first argument to `phandle' for consistency.
9545 (grub_ieee1275_get_property_length): Likewise.
9546 (grub_ieee1275_next_property): Likewise. Change type of first argument
9547 to grub_ieee1275_phandle_t.
9548 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
9549 Move export next to declaration.
9550 (grub_ieee1275_chosen): New variable.
9551 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
9552 Correct cosmetic typo.
9553 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
9554 `grub_ieee1275_chosen'.
9555 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
9556 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
9557 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
9558 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
9559 `grub_ieee1275_chosen'.
9560
ca5baa3f 95612005-05-10 Hollis Blanchard <hollis@penguinppc.org>
9562
9563 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
9564 /chosen/bootargs.
9565 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
9566 /chosen/bootargs as "variable=value" pairs.
9567
708b345f 95682005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
9569
9570 * include/grub/misc.h (grub_dprintf): New macro.
9571 (grub_real_dprintf): New prototype.
9572 (grub_strword): Likewise.
9573 (grub_iswordseparator): Likewise.
9574 * kern/misc.c (grub_real_dprintf): New function.
9575 (grub_strword): Likewise.
9576 (grub_iswordseparator): Likewise.
9577
f4c5e67c 95782005-04-30 Hollis Blanchard <hollis@penguinppc.org>
9579
9580 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
9581 (roundup): Remove macro.
9582 (grub_ieee1275_flags): Make static.
9583 (grub_ieee1275_realmode): Remove.
9584 (grub_ieee1275_test_flag): New function.
9585 (grub_ieee1275_set_flag): Likewise.
9586 (find_options): Rename to `grub_ieee1275_find_options'; update
9587 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
9588 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
9589 (cmain): New prototype.
9590 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
9591 `grub_ieee1275_flags' directly.
9592 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
9593 machine/biosdisk.h.
9594 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
9595 Don't include grub/machine/init.h.
9596 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
9597 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
9598 Remove prototype.
9599 (grub_ieee1275_realmode): Likewise.
9600 (grub_ieee1275_flag): New enum.
9601 (grub_ieee1275_test_flag): New prototype.
9602 (grub_ieee1275_set_flag): New prototype.
9603 * include/grub/powerpc/ieee1275/init.h: Remove file.
9604 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
9605 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
9606 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
9607 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
9608 comment.
9609 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
9610 `grub_ieee1275_test_flag'.
9611 (grub_ieee1275_encode_devname): Likewise.
9612
ed16607e 96132005-04-21 Hollis Blanchard <hollis@penguinppc.org>
9614
9615 * include/grub/powerpc/ieee1275/ieee1275.h
9616 (grub_ieee1275_encode_devname): New prototype.
9617 (grub_ieee1275_get_filename): Likewise.
9618 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
9619 function.
9620 (grub_set_prefix): Likewise.
9621 (grub_machine_init): Call grub_set_prefix.
9622 * kern/powerpc/ieee1275/openfw.c: Fix typos.
9623 (grub_parse_type): New enum.
9624 (grub_ieee1275_get_devargs): New function.
9625 (grub_ieee1275_get_devname): Likewise.
9626 (grub_ieee1275_parse_args): Likewise.
9627 (grub_ieee1275_get_filename): Likewise.
9628 (grub_ieee1275_encode_devname): Likewise.
9629
be369920 96302005-03-30 Marco Gerards <metgerards@student.han.nl>
9631
9632 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
9633 `grub_loader_unset'.
9634
a5ce3a4a 96352005-03-26 Hollis Blanchard <hollis@penguinppc.org>
9636
9637 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
9638 instead of grub_ieee1275_interpret.
9639 (grub_halt_init): New function.
9640 (grub_halt_fini): Likewise.
9641 (GRUB_MOD_INIT): Correct message grammar.
9642 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
9643 instead of grub_ieee1275_interpret.
9644 (grub_reboot_init): New function.
9645 (grub_reboot_fini): Likewise.
9646 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
9647 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
9648 util/i386/pc/misc.c with commands/ieee1275/halt.c,
9649 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
9650 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
9651 function.
9652 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
9653 Add prototype.
9654 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
9655 prototype.
9656 (grub_halt): Likewise.
9657 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
9658 (cmain): Remove __attribute__((unused)).
9659 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
9660 (grub_heap_len): Likewise.
9661 (grub_machine_fini): New function.
9662 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
9663 (grub_halt): Likewise.
9664 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
9665 function.
9666 * util/powerpc/ieee1275/misc.c: New file.
9667
0058f771 96682005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9669
9670 * DISTLIST: New file.
9671 * gendistlist.sh: Likewise.
f19dbdb7 9672
0058f771 9673 * Makefile.in (COMMON_DISTFILES): Removed.
9674 (BOOT_DISTFILES): Likewise.
9675 (CONF_DISTFILES): Likewise.
9676 (DISK_DISTFILES): Likewise.
9677 (FS_DISTFILES): Likewise.
9678 (INCLUDE_DISTFILES): Likewise.
9679 (KERN_DISTFILES): Likewise.
9680 (LOADER_DISTFILES): Likewise.
9681 (TERM_DISTFILES): Likewise.
9682 (UTIL_DISTFILES): Likewise.
9683 (DISTFILES): Likewise.
9684 (uninstall): Uninstall files in $(pkgdata_DATA).
9685 (DISTLIST): New target.
9686 (distdir): Use the contents of the file DISTLIST to get a list of
9687 distributed files.
9688
46b3b8a5 96892005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9690
9691 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
9692 descriptor. This is ported from GRUB Legacy.
9693
9694 * gencmdlist.sh: Added an extra semicolon to make it work with
9695 old sed versions. Reported by Robert Bihlmeyer
9696 <robbe@orcus.priv.at>.
9697
5822ff87 96982005-03-08 Yoshinori Okuji <okuji@enbug.org>
9699
9700 Automatic loading of commands is supported.
f19dbdb7 9701
5822ff87 9702 * normal/main.c (read_command_list): New function.
9703 (grub_normal_execute): Call read_command_list.
9704
9705 * normal/command.c (grub_register_command): Return zero or CMD.
9706 Allocate CMD->NAME from the heap.
9707 Initialize CMD->MODULE_NAME to zero.
9708 Find the same name as well. If the same command is found and it is
9709 a dummy command, overwrite members. If it is not a dummy command,
9710 return zero.
9711 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
9712 (grub_command_find): If a dummy command is found, load a module
9713 and retry to find a command only once.
9714
9715 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
9716 make sure that each command is loaded.
9717
9718 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
9719 macro.
9720 (struct grub_command): Remove const from the member `name'.
9721 Add a new member `module_name'.
9722 (grub_register_command): Return grub_command_t.
9723
9724 * commands/help.c (grub_cmd_help): Call grub_command_find to make
9725 sure that each command is loaded.
9726
9727 * genmk.rb (PModule::rule): Specify a module name without the
9728 suffix ".mod" to gencmdlist.sh.
9729
7b1f4b57 97302005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9731
9732 * gencmdlist.sh: New file.
f19dbdb7 9733
7b1f4b57 9734 * genmk.rb (PModule::rule): Generate a rule for a command list.
9735 Clean command.lst.
9736 Generate command.lst from $(COMMANDFILES).
9737
9738 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
9739 (DATA): Added $(pkgdata_DATA).
9740 (install-local): Install files in $(pkgdata_DATA).
9741
062aaf39 97422005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
9743
9744 * term/i386/pc/vga.c (debug_command): Removed.
9745 (GRUB_MOD_INIT): Do not register the command "debug".
9746
9747 From Hollis Blanchard:
9748 * commands/configfile.c: New file.
9749 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9750 commands/configfile.c.
9751 (pkgdata_MODULES): Added configfile.mod.
9752 (configfile_mod_SOURCES): New variable.
9753 (configfile_mod_CFLAGS): Likewise.
9754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9755 commands/configfile.c.
9756 (pkgdata_MODULES): Added configfile.mod.
9757 (configfile_mod_SOURCES): New variable.
9758 (configfile_mod_CFLAGS): Likewise.
9759 * util/grub-emu.c (main): Call grub_configfile_init and
9760 grub_configfile_fini.
9761 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
9762 prototype.
9763 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 9764
cee01aa6 97652005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9766
9767 * normal/arg.c (grub_arg_show_help): Do not show the bug report
9768 address.
9769
9770 * commands/help.c (grub_cmd_help): Do not print newlines after
9771 the last command in print_command_help.
9772
93f3a1d8 97732005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
9774
9775 * commands/default.h: New file.
9776 * commands/timeout.h: Likewise.
9777 * normal/context.c: Likewise.
f19dbdb7 9778
93f3a1d8 9779 * util/misc.c: Do not include sys/times.h.
9780 Include sys/time.h and grub/machine/time.h.
9781 (grub_get_rtc): Rewritten with gettimeofday.
9782
9783 * util/grub-emu.c (main): Call grub_default_init and
9784 grub_timeout_init before grub_normal_init, and call
9785 grub_timeout_fini and grub_default_fini after grub_main.
9786
9787 * util/console.c (grub_ncurses_checkkey): Return the read
9788 character or -1.
9789
9790 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
9791 timeouts.
9792
9793 * normal/main.c (read_config_file): Push MENU. If this fails,
9794 print an error and wait for a user input.
9795 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
9796 If a menu is empty or an error occurs, pop MENU.
9797 (grub_normal_execute): Pop and free MENU after grub_menu_run
9798 returns.
9799
9800 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
9801
9802 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
9803 include time.h.
9804 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9805 without GRUB_UTIL.
9806 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
9807 time.h.
9808 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
9809 without GRUB_UTIL.
9810
9811 * include/grub/normal.h (struct grub_menu_list): New struct.
9812 (grub_menu_list_t): New type.
9813 (struct grub_context): New struct.
9814 (grub_context_t): New type.
9815 (grub_register_command): Got rid of EXPORT_FUNC.
9816 (grub_unregister_command): Likewise.
9817 (grub_context_get): New prototype.
9818 (grub_context_get_current_menu): Likewise.
9819 (grub_context_push_menu): Likewise.
9820 (grub_context_pop_menu): Likewise.
9821 [GRUB_UTIL] (grub_default_init): Likewise.
9822 [GRUB_UTIL] (grub_default_fini): Likewise.
9823 [GRUB_UTIL] (grub_timeout_init): Likewise.
9824 [GRUB_UTIL] (grub_timeout_fini): Likewise.
9825
9826 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
9827 commands/timeout.c and normal/context.c.
9828 (pkgdata_MODULES): Added default.mod and timeout.mod.
9829 (normal_mod_SOURCES): Added normal/context.c.
9830 (default_mod_SOURCES): New variable.
9831 (default_mod_CFLAGS): Likewise.
9832 (timeout_mod_SOURCES): Likewise.
9833 (timeout_mod_CFLAGS): Likewise.
9834 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
9835 conf/i386-pc.rmk.
9836 (pkgdata_MODULES): Added default.mod and timeout.mod.
9837 (normal_mod_SOURCES): Added normal/context.c.
9838 (default_mod_SOURCES): New variable.
9839 (default_mod_CFLAGS): Likewise.
9840 (timeout_mod_SOURCES): Likewise.
9841 (timeout_mod_CFLAGS): Likewise.
9842
9843 * Makefile.in (all-local): Added $(MKFILES).
9844
4ed2e1dd 98452005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
9846
9847 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
9848 (grub_emu_SOURCES): Likewise.
9849 (pkgdata_MODULES): Add `sun.mod'.
9850 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9851 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9852 `partmap/sun.c'.
9853 (pkgdata_MODULES): Add `sun.mod'.
9854 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
9855 * include/grub/partition.h (grub_sun_partition_map_init): New
9856 prototype.
9857 (grub_sun_partition_map_fini): Likewise.
9858 * partmap/sun.c: New file.
9859 * util/grub-emu.c (main): Initialize and de-initialize the sun
9860 partitionmap support.
9861
4d4e372e 98622005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
9863
9864 This implements an Emacs-like menu entry editor.
f19dbdb7 9865
4d4e372e 9866 * normal/menu_entry.c: New file.
f19dbdb7 9867
4d4e372e 9868 * util/console.c (grub_ncurses_putchar): Translate some Unicode
9869 characters to ASCII.
9870 (saved_char): New variable.
9871 (grub_ncurses_checkkey): Rewritten completely.
9872 (grub_ncurses_getkey): Likewise.
9873 (grub_ncurses_init): Call raw instead of cbreak.
9874
9875 * normal/menu.c (print_entry): Do not put a space.
9876 (init_page): Renamed to ...
9877 (grub_menu_init_page): ... this. All callers changed.
9878 (edit_menu_entry): Removed.
9879 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
9880
9881 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
9882
9883 * kern/misc.c (grub_vprintf): Call grub_refresh.
9884
9885 * normal/menu.c (DISP_LEFT): Renamed to ...
9886 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
9887 * normal/menu.c (DISP_UP): Renamed to ...
9888 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
9889 * normal/menu.c (DISP_RIGHT): Renamed to ...
9890 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
9891 * normal/menu.c (DISP_DOWN): Renamed to ...
9892 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
9893 * normal/menu.c (DISP_HLINE): Renamed to ...
9894 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
9895 * normal/menu.c (DISP_VLINE): Renamed to ...
9896 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
9897 * normal/menu.c (DISP_UL): Renamed to ...
9898 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
9899 * normal/menu.c (DISP_UR): Renamed to ...
9900 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
9901 * normal/menu.c (DISP_LL): Renamed to ...
9902 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
9903 * normal/menu.c (DISP_LR): Renamed to ...
9904 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
9905 * normal/menu.c (TERM_WIDTH): Renamed to ...
9906 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
9907 * normal/menu.c (TERM_HEIGHT): Renamed to ...
9908 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
9909 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
9910 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
9911 * normal/menu.c (TERM_MARGIN): Renamed to ...
9912 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
9913 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
9914 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
9915 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
9916 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
9917 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
9918 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
9919 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
9920 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
9921 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
9922 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
9923 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
9924 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
9925 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
9926 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
9927 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
9928 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
9929 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
9930 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
9931 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
9932 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
9933 All callers changed.
9934
9935 * include/grub/normal.h: New prototype.
9936
9937 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9938 normal/menu_entry.c.
9939 (normal_mod_SOURCES): Likewise.
9940 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9941 (normal_mod_SOURCES): Likewise.
9942
e6b92c8a 99432005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
9944
9945 * include/grub/normal.h (grub_halt_init): New prototype.
9946 (grub_halt_fini): Likewise.
9947 (grub_reboot_init): Likewise.
9948 (grub_reboot_fini): Likewise.
9949
9950 * util/grub-emu.c: Include signal.h.
9951 (main_env): New global variable.
9952 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
9953 catch C-c.
9954 (grub_machine_fini): New function.
9955 (main): Call grub_halt_init and grub_reboot_init before
9956 grub_main, and grub_reboot_fini and grub_halt_fini after it.
9957 Call setjmp with MAIN_ENV to go back afterwards.
9958 Call grub_machine_fini right before return.
9959
9960 * include/grub/util/misc.h: Include setjmp.h.
9961 (main_env): New prototype.
9962
9963 * include/grub/kernel.h (grub_machine_fini): New prototype.
9964 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
9965 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
9966
9967 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
9968 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
9969 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 9970
e6b92c8a 9971 * util/i386/pc/misc.c: New file.
f19dbdb7 9972
e6b92c8a 9973 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9974 util/i386/pc/misc.c, commands/i386/pc/halt.c and
9975 commands/i386/pc/reboot.c.
9976
c642636f 99772005-02-14 Guillem Jover <guillem@hadrons.org>
9978
9979 * include/grub/dl.h (grub_dl_check_header): New prototype.
9980 (grub_arch_dl_check_header): Change return type to grub_err_t,
9981 remove size parameter and export function. Update all callers.
9982 * kern/dl.c (grub_dl_check_header): New function.
9983 (grub_dl_load_core): Use `grub_dl_check_header' instead of
9984 `grub_arch_dl_check_header'. Check ELF type. Check if sections
9985 are inside the core.
9986 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
9987 independent ELF header checks.
9988 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
9989 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
9990 `grub_dl_check_header' instead of explicit checks. Check for the
9991 ELF type.
9992 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
9993 `grub_dl_check_header' instead of explicit checks. Remove arch
9994 specific ELF header checks.
9995
e6b92c8a 9996 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
9997 argument SIZE.
9998
5eabe94b 99992005-02-13 Hollis Blanchard <hollis@penguinppc.org>
10000
10001 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
10002 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
10003
1b14a681 100042005-02-12 Hollis Blanchard <hollis@penguinppc.org>
10005
10006 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 10007 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 10008 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 10009 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 10010 * partmap/amiga.c (amiga_partition_map_iterate): Return
10011 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
10012 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10013
aca108aa 100142005-02-01 Guillem Jover <guillem@hadrons.org>
10015
10016 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
10017 help info.
10018
c9f9c556 100192005-01-31 Marco Gerards <metgerards@student.han.nl>
10020
10021 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
10022 Removed prototype.
10023 (grub_rescue_cmd_linux): New prototype.
10024 (grub_rescue_cmd_initrd): Likewise.
10025 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
10026 `bi_rec'.
10027 (grub_linux_release_mem): Release the memory for the initrd.
10028 (grub_load_linux): Renamed from this...
10029 (grub_rescue_cmd_linux): ...To this. Changed all callers.
10030 Changed `entry' not to be static. Loop over memory regions to
10031 find another one when the default fails.
10032 (grub_rescue_cmd_initrd): New function.
10033 (grub_linux_init): Remove function.
10034 (grub_linux_fini): Likewise.
10035 (GRUB_MOD_INIT): Register `initrd'.
10036 (GRUB_MOD_FINI): Unregister `initrd'.
10037 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
10038 Function removed.
10039 (grub_linux_normal_fini): Likewise.
10040 (GRUB_MOD_INIT): Register `initrd'.
10041 (GRUB_MOD_FINI): Unregister `initrd'.
10042
990cf3aa 100432005-01-31 Marco Gerards <metgerards@student.han.nl>
10044
10045 * commands/help.c: New file.
10046 * normal/arg.c (show_help): Renamed to...
10047 (grub_arg_show_help): ... this.
10048 * commands/i386/pc/halt.c: New file.
10049 * commands/i386/pc/reboot.c: Likewise.
10050 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
10051 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
10052 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
10053 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
10054 variables.
10055 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10056 `commands/help.c'.
10057 (pkgdata_MODULES): Add `help.mod'.
10058 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
10059 * grub/i386/pc/init.h (grub_reboot): New prototype.
10060 (grub_halt): Likewise.
10061 * include/grub/normal.h (grub_arg_show_help): New prototype.
10062 (grub_help_init): Likewise.
10063 (grub_help_fini): Likewise.
10064 * util/grub-emu.c (main): Initialize and deinitialize the help
10065 command.
10066
10067 * normal/cmdline.c (grub_cmdline_get): Doc fix.
10068
10069 * normal/command.c (grub_command_init): Fixed the description of
10070 the `set' and `unset' commands.
10071
100722005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 10073
10074 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
10075 function.
10076 * commands/ieee1275/halt.c: New file.
10077 * commands/ieee1275/reboot.c: Likewise.
10078 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
10079 `__attribute__ ((unused))'. Some GCS related fixed.
10080 (grub_suspend_init) [GRUB_UTIL]: Function removed.
10081 (grub_suspend_fini): Likewise.
10082 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
10083 and `halt.mod'.
10084 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
10085 (halt_mod_CFLAGS): New variables.
10086 * include/grub/powerpc/ieee1275/ieee1275.h
10087 (grub_ieee1275_interpret): New prototype.
10088
1ab09cc7 100892005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
10090
10091 * include/grub/misc.h (memmove): New prototype.
10092 (memcpy): Likewise.
10093
8b8cbdb2 100942005-01-22 Hollis Blanchard <hollis@penguinppc.org>
10095
10096 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
10097 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
10098
e3741a27 100992005-01-22 Marco Gerards <metgerards@student.han.nl>
10100
10101 * kern/misc.c (grub_strndup): Function rewritten.
10102
776bd780 101032005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
10104
10105 * normal/menu.c (TERM_WIDTH): Macro redefined.
10106 (TERM_TOP_BORDER_Y): Likewise.
10107 (draw_border): Replaced while-loop by a for-loop. Make the number
10108 of lines consistent with the number of lines displayed in
10109 print_entries. Added a margin below the rectangle.
10110 (print_entry): Make the entry fit in the rectangle.
10111 (print_entries): Display the scroll arrows next to the right
10112 border.
10113
78026bce 101142005-01-21 Marco Gerards <metgerards@student.han.nl>
10115
10116 * fs/minix.c (grub_minix_find_file): Reserve more space for
10117 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
10118 `grub_strncpy' to copy `path' into it.
10119
67bbaf0f 101202005-01-21 Marco Gerards <metgerards@student.han.nl>
10121
10122 Add the loopback device, a device via which files can be accessed
10123 as devices.
f19dbdb7 10124
67bbaf0f 10125 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
10126 (pkgdata_MODULES): Add loopback.mod.
10127 (loopback_mod_SOURCES): New variable.
10128 (loopback_mod_CFLAGS): Likewise.
10129 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10130 `disk/loopback.c'.
10131 (pkgdata_MODULES): Add loopback.mod.
10132 (loopback_mod_SOURCES): New variable.
10133 (loopback_mod_CFLAGS): Likewise.
10134 * disk/loopback.c: new file.
10135 * include/grub/normal.h (grub_loop_init): New prototype.
10136 (grub_loop_fini): New prototype.
10137 * util/grub-emu.c (main): Initialize and de-initialize loopback
10138 support.
10139 * include/grub/disk.h (grub_disk_dev_id): Add
10140 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
10141
6f1c18bd 101422005-01-20 Hollis Blanchard <hollis@penguinppc.org>
10143
10144 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
10145 function.
10146 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
10147 (suspend_mod_SOURCES): New variable.
10148 (suspend_mod_CFLAGS): Likewise.
10149 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
10150 New prototype.
10151 * commands/ieee1275/suspend.c: New file.
10152
b38551da 101532005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10154
10155 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 10156 ((unused))' to `__attribute__ ((used))'.
b38551da 10157 (GRUB_MOD_FINI): Likewise.
10158 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
10159 * genmk.rb (PModule): Assign space to common symbols when linking
10160 modules.
10161
777aff39 101622005-01-20 Marco Gerards <metgerards@student.han.nl>
10163
10164 * include/grub/mm.h (grub_mm_init_region): Change the type of the
10165 `unsigned' arguments to `grub_size_t'.
10166 (grub_malloc): Likewise.
10167 (grub_realloc): Likewise.
10168 (grub_memalign): Likewise.
10169 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
10170 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10171 * util/misc.c (grub_malloc): Likewise.
10172 (grub_realloc): Likewise.
10173 * kern/mm.c (get_header_from_pointer): Change the casts to
10174 `unsigned' into a cast to `grub_size_t'.
10175
10176 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
10177 point to `currnode' when `currnode' is changed.
10178
10179 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
10180 Schottelius <nico-linux@schottelius.org>.
10181
d0ff18e1 101822005-01-09 Hollis Blanchard <hollis@penguinppc.org>
10183
10184 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
10185 (note_path): Remove variable.
10186 (GRUB_IEEE1275_NOTE_NAME): New macro.
10187 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
10188 (grub_ieee1275_note_hdr): New structure.
10189 (grub_ieee1275_note_desc): Likewise.
10190 (grub_ieee1275_note): Likewise.
10191 (load_note): Remove `dir' argument. All callers updated. Remove
10192 `note_img' and `path'. Do not load a file from `note_path'.
10193 Initialize a struct grub_ieee1275_note and write that to `out'.
10194 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
10195
4ca7004c 101962005-01-05 Marco Gerards <metgerards@student.han.nl>
10197
10198 * util/misc.c (grub_util_read_image): Revert last change. It
10199 called `grub_util_read_at', which seeks from the beginning of the
10200 file.
10201
0b412211 102022005-01-04 Hollis Blanchard <hollis@penguinppc.org>
10203
10204 * TODO: Add note about endianness in grub-mkimage.
10205 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
10206 section.
10207 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
10208 (grub_mkimage_SOURCES): New target.
10209 * include/grub/kernel.h (grub_start_addr): Remove variable.
10210 (grub_end_addr): Likewise.
10211 (grub_total_module_size): Likewise.
10212 (grub_kernel_image_size): Likewise.
10213 (GRUB_MODULE_MAGIC): New constant.
10214 (grub_module_info): New structure.
10215 (grub_arch_modules_addr): New prototype.
10216 (grub_get_end_addr): Remove prototype.
10217 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
10218 * include/grub/powerpc/ieee1275/kernel.h: New file.
10219 * include/grub/util/misc.h (grub_util_get_fp_size): New
10220 prototype.
10221 (grub_util_read_at): Likewise.
10222 (grub_util_write_image_at): Likewise.
10223 * kern/main.c (grub_get_end_addr): Remove function.
10224 (grub_load_modules): Call grub_arch_modules_addr instead of using
10225 grub_end_addr. Look for a grub_module_info struct in memory. Use
10226 the grub_module_info fields instead of calling grub_get_end_addr
10227 as loop conditions. Move grub_add_unused_region code here.
10228 (grub_add_unused_region): Remove function.
10229 * kern/i386/pc/init.c: Include grub/cache.h.
10230 (grub_machine_init): Remove call to grub_get_end_addr. Remove
10231 one call to add_mem_region.
10232 (grub_arch_modules_addr): New function.
10233 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
10234 (grub_total_module_size): Likewise.
10235 Include grub/machine/kernel.h.
10236 (grub_arch_modules_addr): New function.
10237 * util/grub-emu.c (grub_end_addr): Remove variable.
10238 (grub_total_module_size): Likewise.
10239 (grub_arch_modules_addr): New function.
10240 * util/misc.c: Include unistd.h.
10241 (grub_util_get_fp_size): New function.
10242 (grub_util_read_at): Likewise.
10243 (grub_util_write_image_at): Likewise.
10244 (grub_util_read_image): Call grub_util_read_at.
10245 (grub_util_write_image): Call grub_util_write_image_at.
10246 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
10247 additional memory in kernel_img for a struct grub_module_info.
10248 Fill in that grub_module_info.
10249 * util/powerpc/ieee1275/grub-mkimage.c: New file.
10250
458786f8 102512005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10252
10253 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
10254 New function.
10255 * include/grub/powerpc/ieee1275/ieee1275.h
10256 (grub_ieee1275_milliseconds): New prototype.
10257 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
10258 Change to 1000.
10259 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
10260 grub_ieee1275_milliseconds.
10261
ac507d1b 102622005-01-03 Hollis Blanchard <hollis@penguinppc.org>
10263
10264 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
10265 variable.
10266 (find_options): New function.
10267 (cmain): Call find_options.
10268 * include/grub/powerpc/ieee1275/ieee1275.h
10269 (grub_ieee1275_realmode): New extern variable.
10270 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
10271 grub_map if grub_ieee1275_realmode is false.
10272
6b8fd1c4 102732004-12-29 Marco Gerards <metgerards@student.han.nl>
10274
10275 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
10276 lines are inserted and make it work like readline. Reported by
10277 Vincent Pelletier <subdino2004@yahoo.fr>.
10278
8514a1e0 102792004-12-28 Marco Gerards <metgerards@student.han.nl>
10280
10281 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
10282
10283 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
10284 `kern/powerpc/cache.S'.
10285
924b6140 102862004-12-27 Marco Gerards <metgerards@student.han.nl>
10287
10288 * genmk.rb: Handle the `Program' class in the main loop. Written
10289 by Johan Rydberg <jrydberg@gnu.org>.
10290 (Program): New class.
10291 (programs): New variable.
10292 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
10293 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
10294 instead of "grub/kernel.h". Include <grub/machine/init.h>.
10295 (help_arch): Function removed.
10296 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
10297 `powerpc/libgcc.h' and `loader.h'.
10298 (pkgdata_PROGRAMS): New variable.
10299 (sbin_UTILITIES): Variable removed.
10300 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
10301 (grubof_SOURCES): Variable re-defined so it only includes the
10302 core functionality.
10303 (grubof_CFLAGS): Remove `-DGRUBOF'.
10304 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
10305 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
10306 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
10307 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
10308 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
10309 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
10310 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
10311 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
10312 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
10313 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
10314 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10315 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
10316 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
10317 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
10318 (pc_mod_CFLAGS): New variables.
10319 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
10320 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
10321 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
10322 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
10323 Moved from here...
10324 * include/grub/i386/pc/init.h (grub_os_area_addr)
10325 (rub_os_area_size): ... to here.
10326 * include/grub/powerpc/ieee1275/ieee1275.h
10327 (grub_ieee1275_entry_fn): Export symbol.
10328 * include/grub/powerpc/ieee1275/init.h: New file.
10329 * include/grub/powerpc/libgcc.h: Likewise.
10330 * include/grub/cache.h: Likewise.
10331 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
10332 <hollis@penguinppc.org>.
10333 * kern/dl.c: Include <grub/cache.h>.
10334 (grub_dl_flush_cache): New function.
10335 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
10336 for this module.
10337 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
10338 (grub_console_init): Removed prototypes.
10339 (grub_machine_init): Don't initialize the modules anymore.
10340 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
10341 static.
10342 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
10343 Macro undef removed.
10344 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
10345 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
10346 relocation `R_PPC_REL32'. Return an error when the relocation is
10347 unknown.
10348 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
10349 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
10350 * util/misc.c (grub_arch_sync_caches): Likewise.
10351
e4b47e0c 103522004-12-19 Marco Gerards <metgerards@student.han.nl>
10353
10354 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
10355 `symlist.c', add `grubof_symlist.c'.
10356 (symlist.c): Variable removed.
10357 (grubof_HEADERS): Variable added.
10358 (grubof_symlist.c): New target.
10359 (kernel_syms.lst): Use `grubof_HEADERS' instead of
10360 `kernel_img_HEADERS'.
10361 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
10362 * kern/powerpc/dl.c: New file.
10363 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
10364 Function removed.
10365 (grub_arch_dl_relocate_symbols): Likewise.
10366 (grub_register_exported_symbols): Likewise.
10367
4ceb3636 103682004-12-13 Marco Gerards <metgerards@student.han.nl>
10369
10370 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
10371 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
10372 to fail instead. Reported by Vincent Pelletier
10373 <subdino2004@yahoo.fr>.
10374
10375 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
10376 it is not allocated. Reported by Vincent Pelletier
10377 <subdino2004@yahoo.fr>.
10378
10379 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
10380 output so the output looks better.
f19dbdb7 10381
3f1578fe 103822004-12-04 Marco Gerards <metgerards@student.han.nl>
10383
10384 Modulize the partition map support and add support for the amiga
10385 partition map.
f19dbdb7 10386
3f1578fe 10387 * commands/ls.c: Include <grub/partition.h> instead of
10388 <grub/machine/partition.h>.
10389 * kern/disk.c: Likewise.
10390 * kern/rescue.c: Likewise.
10391 * loader/i386/pc/chainloader.c: Likewise.
10392 * normal/cmdline.c: Likewise.
10393 * kern/powerpc/ieee1275/init.c: Likewise.
10394 (grub_machine_init): Call `grub_pc_partition_map_init',
10395 `grub_amiga_partition_map_init' and
10396 `grub_apple_partition_map_init'.
10397 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
10398 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
10399 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
10400 `partition.h' and `pc_partition.h'.
10401 (grub_setup_SOURCES): Remove
10402 `disk/i386/pc/partition.c'. Add `kern/partition.c',
10403 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10404 (grub_emu_SOURCES): Likewise.
10405 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
10406 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
10407 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
10408 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10409 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
10410 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
10411 (grubof_SOURCES): Likewise.
10412 * disk/i386/pc/partition.c: File removed.
10413 * disk/powerpc/ieee1275/partition.c: Likewise.
10414 * include/grub/powerpc/ieee1275/partition.h: Likewise.
10415 * include/grub/i386/pc/partition.h: Likewise.
10416 * kern/partition.c: New file.
10417 * partmap/amiga.c: Likewise.
10418 * partmap/apple.c: Likewise.
10419 * partmap/pc.c: Likewise.
10420 * include/grub/partition.h: Likewise..
10421 * include/grub/pc_partition.h: Likewise.
10422 * util/grub-emu.c: Include <grub/partition.h> instead of
10423 <grub/machine/partition.h>.
10424 (main): Call `grub_pc_partition_map_init',
10425 `grub_amiga_partition_map_init' and
10426 `grub_apple_partition_map_init' and deinitialize afterwards.
10427 * util/i386/pc/biosdisk.c: Include `#include
10428 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10429 `<grub/machine/partition.h>'.
10430 * util/i386/pc/grub-setup.c: Likewise.
10431 * util/i386/pc/biosdisk.c: Likewise.
10432 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
10433 partition information in case of a PC partition.
10434 * util/i386/pc/grub-setup.c: Include `#include
10435 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
10436 `<grub/machine/partition.h>'.
10437 (setup): Only access the PC specific partition information in case
10438 of a PC partition.
10439
0ef4ced9 104402004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10441
0ef4ced9 10442 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
10443 (grub_longjmp): Likewise.
10444 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
10445 20.
10446 * normal/powerpc/setjmp.S: New file.
10447 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10448 `normal/powerpc/setjmp.S'.
10449 (grubof_CFLAGS): Add `-DGRUBOF'.
10450 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
10451 [GRUB_UTIL && !GRUBOF].
f19dbdb7 10452
19950e29 104532004-11-16 Marco Gerards <metgerards@student.han.nl>
10454
10455 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
10456 property named `name'. Correctly handle the error returned by
10457 `grub_ieee1275_finddevice' if a device can not be opened.
10458
a2fea427 104592004-11-02 Hollis Blanchard <hollis@penguinppc.org>
10460
10461 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
10462 `actual' for negativity.
10463 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
10464 kern/fshelp.c.
10465
41ea0ea3 104662004-11-01 Marco Gerards <metgerards@student.han.nl>
10467
10468 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
10469 (PAGE_OFFSET): New macro.
10470 (CRTC_ADDR_PORT): Likewise.
10471 (CRTC_DATA_PORT): Likewise.
10472 (START_ADDR_HIGH_REGISTER): Likewise.
10473 (START_ADDR_LOW_REGISTER): Likewise.
10474 (GRAPHICS_ADDR_PORT): Likewise.
10475 (GRAPHICS_DATA_PORT): Likewise.
10476 (READ_MAP_REGISTER): Likewise.
10477 (INPUT_STATUS1_REGISTER): Likewise.
10478 (INPUT_STATUS1_VERTR_BIT): Likewise.
10479 (page): New variable.
10480 (wait_vretrace): New function.
10481 (set_read_map): Likewise.
10482 (set_start_address): Likewise.
10483 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
10484 the right page.
10485 (check_vga_mem): Take the page into account.
10486 (write_char): Likewise.
10487 (write_cursor): Likewise.
10488 (scroll_up): Likewise. Copy the page to the page that is not
10489 shown and switch between both pages.
10490 (grub_vga_putchar): Fix off by one error.
10491 (grub_vga_cls): Wait for the vertical retrace. Take the page into
10492 account.
10493
ad0bd20b 104942004-11-01 Marco Gerards <metgerards@student.han.nl>
10495
10496 Add support for iso9660 (including rockridge).
f19dbdb7 10497
ad0bd20b 10498 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10499 (iso9660_mod_SOURCES): New variable.
10500 (iso9660_mod_CFLAGS): Likewise.
10501 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
10502 * include/grub/fs.h (grub_iso9660_init): New prototype.
10503 * util/grub-emu.c (main): Call `grub_iso9660_init'.
10504 * fs/iso9660.c: New file.
10505
10506 * include/grub/misc.h (grub_strncat): New prototype.
10507 * kern/misc.c (grub_strncat): New function.
f19dbdb7 10508
ad0bd20b 10509 * fs/hfs.c (grub_hfs_mount): Translate the error
10510 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
10511 * fs/jfs.c (grub_jfs_mount): Likewise.
10512 * fs/ufs.c (grub_ufs_mount): Likewise.
10513
a5477a59 105142004-10-28 Hollis Blanchard <hollis@penguinppc.org>
10515
10516 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
10517 which initialized BAT registers.
10518 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
10519 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10520 Move from here...
10521 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
10522 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
10523 ... to here.
10524 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
10525 (grub_mapclaim): Likewise.
10526 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
10527 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
10528 hand.
10529
9304c1f8 105302004-10-19 Hollis Blanchard <hollis@penguinppc.org>
10531
10532 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
10533 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
10534 -ffreestanding and -msoft-float.
10535
86f4ae25 105362004-10-15 Hollis Blanchard <hollis@penguinppc.org>
10537
10538 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
10539 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
10540 set in grub_ieee1275_flags.
10541
38912228 105422004-10-14 Hollis Blanchard <hollis@penguinppc.org>
10543
10544 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
10545 prototype.
10546 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
10547 grub_console_init first.
10548 Change the memory range used for grub_ieee1275_claim and
10549 grub_mm_init_region.
10550 Print an error message if the claim fails.
10551 Include <grub/misc.h>.
10552
d1923dc8 105532004-10-13 Hollis Blanchard <hollis@penguinppc.org>
10554
10555 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
10556 Call grub_children_iterate for device nodes of type `scsi',
10557 `ide', or `ata'.
10558 (grub_ofdisk_open): Remove manual device alias resolution.
10559 Fix memory leak when device cannot be opened.
f19dbdb7 10560 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 10561 (grub_children_iterate): New prototype.
10562 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
10563 New function.
10564 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10565 Return -1 if args.size was -1.
10566
4512e4f3 105672004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10568
10569 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
10570 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
10571 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
10572 Open Firmware's memory for it; claim memory from _start to _end.
10573 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
10574 (_end): New extern.
10575 (_start): Zero BSS from __bss_start to _end.
10576 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10577 New extern.
10578 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
10579
4d61feb0 105802004-10-11 Hollis Blanchard <hollis@penguinppc.org>
10581
ad0bd20b 10582 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
10583 -1 if args.base was -1.
4d61feb0 10584
026fa2f9 105852004-10-08 Hollis Blanchard <hollis@penguinppc.org>
10586
10587 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
10588 escape sequence instead of a literal ^L. Also call
10589 grub_ofconsole_gotoxy.
10590
9f2220ef 105912004-10-03 Hollis Blanchard <hollis@penguinppc.org>
10592
10593 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
10594 void * arguments to grub_addr_t. All callers updated. Also make
10595 the `result' argument optional.
10596 (grub_ieee1275_release): change void * arguments to grub_addr_t.
10597 All callers updated.
10598
8a572cd7 105992004-09-22 Hollis Blanchard <hollis@penguinppc.org>
10600
10601 * commands/ls.c (grub_ls_list_files): Use the string following the
10602 initial ')', if present, as the filesystem path.
10603 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
10604
10605 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
10606
18aa81f2 106072004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
10608
10609 Make the source code of the menu interface more readable.
f19dbdb7 10610
18aa81f2 10611 * normal/menu.c: Include grub/mm.h.
10612 (TERM_WIDTH): New macro.
10613 (TERM_HEIGHT): Likewise.
10614 (TERM_INFO_HEIGHT): Likewise.
10615 (TERM_MARGIN): Likewise.
10616 (TERM_SCROLL_WIDTH): Likewise.
10617 (TERM_TOP_BORDER_Y): Likewise.
10618 (TERM_LEFT_BORDER_X): Likewise.
10619 (TERM_BORDER_WIDTH): Likewise.
10620 (TERM_MESSAGE_HEIGHT): Likewise.
10621 (TERM_BORDER_HEIGHT): Likewise.
10622 (TERM_NUM_ENTRIES): Likewise.
10623 (TERM_FIRST_ENTRY_Y): Likewise.
10624 (TERM_ENTRY_WIDTH): Likewise.
10625 (TERM_CURSOR_X): Likewise.
10626 (draw_border): Use macros instead of magic numbers.
10627 (print_entry): Likewise.
10628 (print_entries): Likewise.
10629 (run_menu): Likewise. Also, handle the key 'e'.
10630 (run_menu_entry): Ignore empty command lines.
10631 (print_message): Added a new argument EDIT. If EDIT is true,
10632 print a different message.
10633 (init_page): Likewise.
10634 (edit_menu_entry): New function. Not implemented yet.
10635
b47efe30 106362004-09-17 Marco Gerards <metgerards@student.han.nl>
10637
10638 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
10639 can be loaded from normal mode.
f19dbdb7 10640
b47efe30 10641 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
10642 `multiboot.mod'.
10643 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
10644 (multiboot_mod_CFLAGS): New variables.
10645 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 10646 * loader/i386/pc/multiboot_normal.c: Likewise.
10647
b47efe30 10648 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
10649 attribute `unused'.
f19dbdb7 10650
b47efe30 10651 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
10652 `fdiro' to read the mode information from instead of `diro'.
10653
10654 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
10655 looking up a symlink.
10656
10657 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
10658 macro.
10659 * normal/command.c (grub_command_execute): Don't parse the
10660 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
10661 flags of the command.
10662
10663 * normal/menu.c (grub_menu_run): Fix typo.
10664
da75ac71 106652004-09-14 Hollis Blanchard <hollis@penguinppc.org>
10666
10667 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
10668
10669 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
10670 `y + 1' instead of `y - 1'.
10671
10672 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 10673
062b24c2 106742004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
10675
10676 From Hollis Blanchard <hollis@penguinppc.org>:
10677 * kern/misc.c (memmove): New alias for grub_memmove.
10678 (memcmp): New alias for grub_memcmp.
10679 (memset): New alias for grub_memset.
f19dbdb7 10680 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 10681 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 10682 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 10683 (grub_ieee1275_get_property): Likewise.
f19dbdb7 10684
8ddad845 106852004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
10686
10687 Added normal mode command `chainloader' as module chain.mod, which
10688 depends on normal.mod and _chain.mod.
f19dbdb7 10689
8ddad845 10690 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
10691 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
10692 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
10693 Deleted prototype.
10694 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
10695 but arguments parsing moved to ...
10696 (grub_chainloader_cmd): ... here. New function.
10697 * include/grub/i386/pc/chainloader.h: New file.
10698 * loader/i386/pc/chainloader_normal.c: Likewise.
10699
2c1f4ce3 107002004-09-11 Marco Gerards <metgerards@student.han.nl>
10701
10702 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
10703 (grub_mkimage_LDFLAGS): Likewise.
10704 (grub_emu_SOURCES): Likewise.
10705 (kernel_img_HEADERS): Added fshelp.h.
10706 * fs/ext2.c: Include <grub/fshelp.h>.
10707 (FILETYPE_REG): New macro.
10708 (FILETYPE_INO_REG): Likewise.
10709 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
10710 Changed all users.
10711 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
10712 all users.
10713 (grub_fshelp_node): New struct.
10714 (grub_ext2_data): Added member `diropen'. Changed member `inode'
10715 to a pointer.
10716 (grub_ext2_get_file_block): Removed function.
10717 (grub_ext2_read_block): New function.
10718 (grub_ext2_read_file): Replaced parameter `data' by `node'.
10719 This function was written.
10720 (grub_ext2_mount): Read the root inode. Create a diropen struct.
10721 (grub_ext2_find_file): Removed function.
10722 (grub_ext2_read_symlink): New function.
10723 (grub_ext2_iterate_dir): Likewise.
10724 (grub_ext2_open): Rewritten.
10725 (grub_ext2_dir): Rewritten.
10726 * include/grub/fshelp.h: New file.
10727 * fs/fshelp.c: Likewise.
10728
3c52136a 107292004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
10730
10731 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
10732 (print_message): Add a missing newline.
10733 (run_menu): Added timeout support.
10734 (run_menu_entry): New local function.
10735 (grub_menu_run): Added support for booting.
10736
10737 * kern/loader.c (grub_loader_is_loaded): New function.
10738
10739 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
10740 (grub_get_rtc): Exported.
10741
10742 * include/grub/i386/pc/time.h: Include grub/symbol.h.
10743 (grub_get_rtc): Exported.
10744
10745 * include/grub/normal.h (struct grub_command_list): Remove
10746 constant from the member `command'.
10747
10748 * include/grub/loader.h (grub_loader_is_loaded): Declared.
10749
10750 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
10751
10752 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
10753
aa033560 107542004-08-28 Marco Gerards <metgerards@student.han.nl>
10755
10756 Add support for the JFS filesystem.
10757
10758 * fs/jfs.c: New file.
10759 * include/grub/fs.h (grub_jfs_init): New prototype.
10760 (grub_jfs_fini): New prototype.
10761 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
10762 (grub_emu_SOURCES): Likewise.
10763 (pkgdata_MODULES): Add jfs.mod.
10764 (jfs_mod_SOURCES): New variable.
10765 (jfs_mod_CFLAGS): Likewise.
10766 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
10767 (grubof_SOURCES): Likewise.
10768 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
10769
10770 * fs/fat.c (grub_fat_find_dir): Convert the filename little
10771 endian to the host endian.
10772 (grub_fat_utf16_to_utf8): Move function from there...
10773 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 10774 the endianness of the source string anymore.
aa033560 10775 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
10776
94bc45af 107772004-08-24 Marco Gerards <metgerards@student.han.nl>
10778
10779 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
10780 (grub_boot_fini) [GRUB_UTIL]: Likewise.
10781 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
10782 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 10783
94bc45af 10784 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
10785 (grub_hfs_iterate_dir): Make the function static. Add prototypes
10786 for `node_found' and `it_dir'.
10787 (grub_hfs_dir): Add prototype for `dir_hook'.
10788
10789 * fs/minix.c (grub_minix_get_file_block): Add prototype for
10790 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
10791 and `indir32' to silence a gcc warning.
10792
10793 * include/grub/fs.h (grub_hfs_init): New prototype.
10794 (grub_hfs_fini): Likewise.
f19dbdb7 10795
10796
97543f08 107972004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
10798
10799 Each disk device has its own id now. This is useful to make use
10800 of multiple disk devices.
f19dbdb7 10801
97543f08 10802 * include/grub/disk.h (grub_disk_dev_id): New enum.
10803 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
10804 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
10805
10806 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
10807 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10808
10809 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
10810 GRUB_DISK_DEVICE_OFDISK_ID as an id.
10811
10812 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
10813 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
10814
10815 * include/grub/disk.h (struct grub_disk_dev): Added a new member
10816 "id" which is used by the cache manager.
10817
10818 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
10819 of just "GRUB".
10820
64372eb4 108212004-08-18 Marco Gerards <metgerards@student.han.nl>
10822
10823 * fs/hfs.c: New file.
10824 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
10825 (grub_emu_SOURCES): Likewise.
10826 (pkgdata_MODULES): Add hfs.mod.
10827 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
10828 (grubof_SOURCES): Likewise.
10829 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
10830
10831 * include/grub/misc.h (grub_strncasecmp): Add prototype.
10832 * kern/misc.c (grub_strncasecmp): Add function.
10833
cc61b58f 108342004-08-14 Marco Gerards <metgerards@student.han.nl>
10835
10836 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
10837 with parentheses.
10838
10839 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
10840 (grub_ext2_dir): In case the directory entry type is unknown, read
10841 it from the inode.
10842
0ef123f6 108432004-08-02 Peter Bruin <pjbruin@dds.nl>
10844
10845 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
10846 grub_load_linux instead of grub_rescue_cmd_linux as second
10847 argument of grub_rescue_register_command.
10848
10849 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
10850
a447c5df 108512004-07-27 Marco Gerards <metgerards@student.han.nl>
10852
10853 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
10854 function.
10855 * commands/boot.c: Remove the check for `GRUB_UTIL'.
10856 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
10857 `loader/powerpc/ieee1275/linux.c',
10858 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
10859 * include/grub/powerpc/ieee1275/ieee1275.h
10860 (grub_ieee1275_release): New prototype.
10861 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
10862 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
10863 normal, boot, linux and linux_normal.
10864 * loader/powerpc/ieee1275/linux.c: New file.
10865 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10866
5a9e3546 108672004-07-12 Marco Gerards <metgerards@student.han.nl>
10868
10869 * normal/arg.c (grub_arg_parse): Correct error handling after
10870 reallocating the argumentlist (check if `argl' is not null instead
10871 of checking if `args' is not null).
10872 * kern/mm.c (grub_realloc): Return the same pointer when using the
10873 same region, instead of returning the header address.
10874
e15199cb 108752004-07-11 Marco Gerards <metgerards@student.han.nl>
10876
10877 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
10878 one block instead of two when looking for the initial partition.
10879 (grub_partition_probe): Initialize the local variable `p' with 0.
10880 Use base 10 for the grub_strtoul call.
10881 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
10882 need for one local variable.
10883 (grub_strtoul): Don't add the new value to `num', instead of that
10884 just assign it.
10885
020616c2 108862004-07-11 Marco Gerards <metgerards@student.han.nl>
10887
10888 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
10889 (pxeboot_img_SOURCES): New variable.
10890 (pxeboot_img_ASFLAGS): Likewise.
10891 (pxeboot_img_LDFLAGS): Likewise.
10892 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
10893 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
10894 <lode_leroy@hotmail.com>.
10895
6c51eb64 108962004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10897
10898 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
10899 there was no input.
10900
cfb12aff 109012004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10902
10903 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
10904 the history buffer logic.
10905
6eabba74 109062004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
10907
10908 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
10909 (FILETYPE_INO_SYMLINK): New macros.
10910 (grub_ext2_find_file): Check if the node is a directory using the
10911 inode stat information instead of using the filetype in the
10912 dirent. Exclude the first character of an absolute symlink.
10913 (grub_ext2_dir): Mask out the filetype part of the mode member of
10914 the inode.
10915
66e19ef8 109162004-05-24 Marco Gerards <metgerards@student.han.nl>
10917
10918 Add support for UFS version 1 and 2. Add support for the minix
10919 filesystem version 1 and 2, both the variants with 14 and 30 long
10920 filenames.
f19dbdb7 10921
66e19ef8 10922 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
10923 fs/minix.c.
10924 (grub_emu_SOURCES): Likewise.
10925 (pkgdata_MODULES): Add ufs.mod and minix.mod.
10926 (ufs_mod_SOURCES): New variable.
10927 (ufs_mod_CFLAGS): Likewise.
10928 (minix_mod_SOURCES): Likewise.
10929 (minix_mod_CFLAGS): Likewise.
10930 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
10931 fs/minix.c.
10932 (grubof_SOURCES): Likewise.
10933 * fs/ufs.c: New file.
10934 * fs/minix.c: New file.
10935 * include/grub/fs.h (grub_ufs_init): New prototype.
10936 (grub_ufs_fini): Likewise.
10937 (grub_minix_init): Likewise.
10938 (grub_minix_fini): Likewise.
10939 * util/grub-emu.c (main): Initialize and deinitialize UFS and
10940 minix fs.
10941
cc2e748a 109422004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
10943
10944 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
10945 commands/ls.c, commands/terminal.c, commands/boot.c,
10946 commands/cmp.c and commands/cat.c.
10947 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
10948
10949 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
10950 "env.h"
10951
4b13b216 109522004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10953
10954 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
10955 and grub_, respectively. Because the conversion is trivial and
10956 mechanical, I omit the details here. Please refer to the CVS
10957 if you need more information.
10958
6a142551 109592004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
10960
10961 * include/pupa: Renamed to ...
10962 * include/grub: ... this.
10963 * util/i386/pc/pupa-mkimage.c: Renamed to ...
10964 * util/i386/pc/grub-mkimage.c: ... this.
10965 * util/i386/pc/pupa-setup.c: Renamed to ...
10966 * util/i386/pc/grub-setup.c: ... this.
10967 * util/pupa-emu.c: Renamed to ...
10968 * util/grub-emu.c: ... this.
10969
e56cdf21 109702004-03-29 Marco Gerards <metgerards@student.han.nl>
10971
10972 Add support for the newworld apple macintosh (PPC). This has been
10973 tested on the powerbook 2000 only. It only adds support for
10974 generic ieee1275 functions, console and disk support. This should
10975 be easy to port to other architectures with support for Open
10976 Firmware.
f19dbdb7 10977
e56cdf21 10978 * configure.ac: Accept the powerpc as host_cpu. In the case of
10979 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
10980 specific tests are only executed while building for the i386.
10981 Inverse test for crosscompile.
10982 * genmk.rb (Utility): Allow assembler files.
10983 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
10984 * conf/powerpc-ieee1275.rmk: New file.
10985 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
10986 * disk/powerpc/ieee1275/partition.c: Likewise.
10987 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
10988 * include/pupa/powerpc/ieee1275/console.h: Likewise.
10989 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
10990 * include/pupa/powerpc/ieee1275/time.h: Likewise.
10991 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
10992 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
10993 * include/pupa/powerpc/ieee1275/loader.h
10994 * include/pupa/powerpc/setjmp.h: Likewise.
10995 * include/pupa/powerpc/types.h: Likewise.
10996 * kern/powerpc/ieee1275/init.c: Likewise.
10997 * kern/powerpc/ieee1275/openfw.c: Likewise.
10998 * term/powerpc/ieee1275/ofconsole.c: Likewise.
10999
11000 These files were written by Johan Rydberg
11001 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 11002
e56cdf21 11003 * boot/powerpc/ieee1275/cmain.c: New file.
11004 * boot/powerpc/ieee1275/crt0.S: Likewise.
11005 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
11006 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
11007
8c8cc205 110082004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
11009
11010 * Makefile.in: Update copyright.
11011 * genmodsrc.sh: Likewise.
11012 * gensymlist.sh: Likewise.
11013 * term/i386/pc/vga.c: Indent correctly.
11014
11015 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
11016 bugreporting address.
11017 * util/i386/pc/pupa-setup.c (usage): Likewise,
11018 (main): Call pupa_ext2_init and pupa_ext2_fini.
11019
f19dbdb7 11020 * fs/fat.c (log2): Renamed to ...
8c8cc205 11021 (fat_log2): ... this.
11022 All callers changed.
11023 * kern/misc.c (memcpy): Alias to pupa_memmove.
11024 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
11025 lvalue cast.
11026 * util/console.c (pupa_ncurses_fini): Return 0.
11027
11028 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
11029 Move fail label here.
11030 [__GNU__]: Don't warn when using stat.
11031 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
11032 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
11033 long int. Use strtol instead of strtoul.
f19dbdb7 11034
db1771cf 110352004-03-14 Marco Gerards <metgerards@student.han.nl>
11036
11037 * commands/boot.c: New file.
11038 * commands/cat.c: Likewise.
11039 * commands/cmp.c: Likewise.
11040 * commands/ls.c: Likewise.
11041 * commands/terminal.c: Likewise.
11042 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
11043 (pupa_register_command): Changed interface to match the new
11044 argument parser.
11045 (pupa_command_execute): Changed (almost rewritten) so it uses
11046 pupa_split_command. Added support for setting variables using the
11047 syntax `foo=bar'.
11048 (rescue_command): Changed to work with the new argument parser.
11049 (terminal_command): Moved from here to commands/terminal.c.
11050 (set_command): New function.
11051 (unset_command): New function.
11052 (insmod_command): New function.
11053 (rmmod_command): New function.
11054 (lsmod_command): New function.
11055 (pupa_command_init): Don't initialize the command terminal
11056 anymore. Initialize the commands set, unset, insmod, rmmod and
11057 lsmod.
11058 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
11059 (kernel_img_HEADERS): Add arg.h and env.h.
11060 (pupa_mkimage_LDFLAGS): Add kern/env.c.
11061 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
11062 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
11063 normal/arg.c.
11064 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
11065 terminal.mod.
11066 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
11067 (boot_mod_SOURCES): New variable.
11068 (terminal_mod_SOURCES): Likewise.
11069 (ls_mod_SOURCES): Likewise.
11070 (cmp_mod_SOURCES): Likewise.
11071 (cat_mod_SOURCES): Likewise.
11072
11073 * normal/arg.c: New file.
11074 * kern/env.c: Likewise.
11075 * include/pupa/arg.h: Likewise.
11076 * include/pupa/env.h: Likewise.
11077 * font/manager.c (font_command): Changed to match argument parsing
11078 interface changes.
11079 (PUPA_MOD_INIT): Likewise.
11080 * hello/hello.c (pupa_cmd_hello): Likewise.
11081 (PUPA_MOD_INIT): Likewise.
11082 * include/pupa/disk.h: Include <pupa/device.h>.
11083 (pupa_print_partinfo): New prototype.
11084 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
11085 (pupa_dl_get_prefix): Likewise.
11086 * include/pupa/misc.h: Include <pupa/err.h>.
11087 (pupa_isgraph): New prototype.
11088 (pupa_isdigit): Likewise.
11089 (pupa_split_cmdline): Likewise.
11090 * include/pupa/normal.h: Include <pupa/arg.h>.
11091 (pupa_command): Changed the prototype of the member `func' to
11092 match the argument parsing interface. Added member `options'.
11093 (pupa_register_command): Updated to match function.
11094 (pupa_arg_parse): New prototype.
11095 (pupa_hello_init) [PUPA_UTIL]: New prototype.
11096 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
11097 (pupa_ls_init) [PUPA_UTIL]: Likewise.
11098 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
11099 (pupa_cat_init) [PUPA_UTIL]: Likewise.
11100 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
11101 (pupa_boot_init) [PUPA_UTIL]: Likewise.
11102 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
11103 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
11104 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
11105 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
11106 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
11107 * kern/disk.c: Include <pupa/file.h>.
11108 (pupa_print_partinfo): New function.
11109 * kern/dl.c: Include <pupa/env.h>.
11110 (pupa_dl_dir): Variable removed.
11111 (pupa_dl_load): Use the environment variable `prefix' instead of
11112 the variable pupa_dl_dir.
11113 (pupa_dl_set_prefix): Function removed.
11114 (pupa_dl_get_prefix): Likewise.
11115 * kern/i386/pc/init.c: Include <pupa/env.h>.
11116 (pupa_machine_init): Use the environment variable `prefix' instead of
11117 using pupa_dl_set_prefix to set the prefix.
11118 * kern/main.c: Include <pupa/env.h>.
11119 (pupa_set_root_dev): Use the environment variable `prefix' instead of
11120 using pupa_dl_get_prefix to get the prefix.
11121 * kern/misc.c: Include <pupa/env.h>.
11122 (pupa_isdigit): New function.
11123 (pupa_isgraph): Likewise.
11124 (pupa_ftoa): Likewise.
11125 (pupa_vsprintf): Added support for printing values of the type
11126 `double'. Make it possible to format variable output when using
11127 formatting like `%1.2%f'.
11128 (pupa_split_cmdline): New function.
11129 * kern/rescue.c: Include <pupa/env.h>.
11130 (next_word): Removed function.
11131 (pupa_rescue_cmd_prefix): Likewise.
11132 (pupa_rescue_cmd_set): New function.
11133 (pupa_rescue_cmd_unset): New function.
11134 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
11135 split the command line instead of splitting it here. Added
11136 support for setting variables using the syntax `foo=bar'. Don't
11137 initialize the prefix command anymore. Initialized the set and
11138 unset commands.
11139 * normal/cmdline.c: Include <pupa/env.h>.
11140 (pupa_tab_complete): Added prototypes for print_simple_completion,
11141 print_partition_completion, add_completion, iterate_commands,
11142 iterate_dev, iterate_part and iterate_dir. Moved code to print
11143 partition information from here to kern/disk.c.
fe6b695a 11144 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 11145 * normal/main.c: Include <pupa/env.h>.
11146 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
11147 instead of using pupa_dl_get_prefix to get the prefix.
11148 * term/i386/pc/vga.c: Include <pupa/arg.h>.
11149 (check_vga_mem): Cast pointers to `void *' to silence a gcc
11150 warning.
11151 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
11152 (pupa_vga_setcolor): Declare unused variables with `__attribute__
11153 ((unused))' to silence a gcc warning.
11154 (pupa_vga_setcolor): Likewise.
11155 (debug_command): Changed to match argument parsing
11156 interface changes.
11157 * util/pupa-emu.c: Include <pupa/env.h>.
11158 (options): Added 0's for unused fields to silence a gcc warning.
11159 (argp): Likewise.
11160 (main): Use the environment variable `prefix' instead of using
11161 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
11162 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
11163 and terminal.
11164
11165 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
11166 * util/misc.c: Include <malloc.h>.
11167 (pupa_malloc): Rewritten so errors are correctly reported.
11168 (pupa_realloc): Likewise.
11169 (pupa_memalign): Likewise.
11170 (pupa_mm_init_region): Declare unused variables with
11171 `__attribute__ ((unused))' to silence a gcc warning.
11172 * normal/i386/setjmp.S: Remove tab at the end of the file to
11173 silence a gcc warning.
11174 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
11175 variables with `__attribute__ ((unused))' to silence a gcc
11176 warning.
11177 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
11178 local variable i unsigned to silence a gcc warning.
11179
11180 * kern/term.c: Include <pupa/misc.h>.
11181 (pupa_more_lines): New variable.
11182 (pupa_more): Likewise.
11183 (pupa_putcode): When the pager is active pause at the end of every
11184 screen.
11185 (pupa_set_more): New function.
11186 * include/pupa/term.h (pupa_set_more): New prototype.
11187
11188
3b1139cb 111892004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
11190
11191 Now this project is GRUB 2 rather than PUPA. The location of
11192 the CVS repository was moved to GRUB's.
f19dbdb7 11193
3b1139cb 11194 * configure.ac: Use bug-grub as the reporting address.
11195 Use GRUB instead of PUPA.
11196 Change the version number to 1.90.
11197
8367695c 111982004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
11199
11200 * genkernsyms.sh: Updated copyright information.
11201 * genmk.rb: Likewise.
11202 * genmodsrc.sh: Likewise.
11203 * gensymlist.sh: Likewise.
11204 * boot/i386/pc/boot.S: Likewise.
11205 * boot/i386/pc/diskboot.S: Likewise.
11206 * disk/i386/pc/biosdisk.c: Likewise.
11207 * disk/i386/pc/partition.c: Likewise.
11208 * font/manager.c: Likewise.
11209 * fs/ext2.c: Likewise.
11210 * fs/fat.c: Likewise.
11211 * include/pupa/boot.h: Likewise.
11212 * include/pupa/device.h: Likewise.
11213 * include/pupa/disk.h: Likewise.
11214 * include/pupa/dl.h: Likewise.
11215 * include/pupa/elf.h: Likewise.
11216 * include/pupa/err.h: Likewise.
11217 * include/pupa/file.h: Likewise.
11218 * include/pupa/font.h: Likewise.
11219 * include/pupa/fs.h: Likewise.
11220 * include/pupa/kernel.h: Likewise.
11221 * include/pupa/loader.h: Likewise.
11222 * include/pupa/misc.h: Likewise.
11223 * include/pupa/mm.h: Likewise.
11224 * include/pupa/net.h: Likewise.
11225 * include/pupa/normal.h: Likewise.
11226 * include/pupa/rescue.h: Likewise.
11227 * include/pupa/setjmp.h: Likewise.
11228 * include/pupa/symbol.h: Likewise.
11229 * include/pupa/term.h: Likewise.
11230 * include/pupa/types.h: Likewise.
11231 * include/pupa/i386/setjmp.h: Likewise.
11232 * include/pupa/i386/types.h: Likewise.
11233 * include/pupa/i386/pc/biosdisk.h: Likewise.
11234 * include/pupa/i386/pc/boot.h: Likewise.
11235 * include/pupa/i386/pc/console.h: Likewise.
11236 * include/pupa/i386/pc/init.h: Likewise.
11237 * include/pupa/i386/pc/kernel.h: Likewise.
11238 * include/pupa/i386/pc/linux.h: Likewise.
11239 * include/pupa/i386/pc/loader.h: Likewise.
11240 * include/pupa/i386/pc/memory.h: Likewise.
11241 * include/pupa/i386/pc/multiboot.h: Likewise.
11242 * include/pupa/i386/pc/partition.h: Likewise.
11243 * include/pupa/i386/pc/time.h: Likewise.
11244 * include/pupa/i386/pc/vga.h: Likewise.
11245 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
11246 * include/pupa/util/getroot.h: Likewise.
11247 * include/pupa/util/misc.h: Likewise.
11248 * include/pupa/util/resolve.h: Likewise.
11249 * kern/device.c: Likewise.
11250 * kern/disk.c: Likewise.
11251 * kern/dl.c: Likewise.
11252 * kern/err.c: Likewise.
11253 * kern/file.c: Likewise.
11254 * kern/fs.c: Likewise.
11255 * kern/loader.c: Likewise.
11256 * kern/main.c: Likewise.
11257 * kern/misc.c: Likewise.
11258 * kern/mm.c: Likewise.
11259 * kern/rescue.c: Likewise.
11260 * kern/term.c: Likewise.
11261 * kern/i386/dl.c: Likewise.
11262 * kern/i386/pc/init.c: Likewise.
11263 * kern/i386/pc/lzo1x.S: Likewise.
11264 * kern/i386/pc/startup.S: Likewise.
11265 * loader/i386/pc/chainloader.c: Likewise.
11266 * loader/i386/pc/linux.c: Likewise.
11267 * loader/i386/pc/multiboot.c: Likewise.
11268 * normal/cmdline.c: Likewise.
11269 * normal/command.c: Likewise.
11270 * normal/main.c: Likewise.
11271 * normal/menu.c: Likewise.
11272 * normal/i386/setjmp.S: Likewise.
11273 * term/i386/pc/console.c: Likewise.
11274 * term/i386/pc/vga.c: Likewise.
11275 * util/console.c: Likewise.
11276 * util/genmoddep.c: Likewise.
11277 * util/misc.c: Likewise.
11278 * util/pupa-emu.c: Likewise.
11279 * util/resolve.c: Likewise.
11280 * util/unifont2pff.rb: Likewise.
11281 * util/i386/pc/biosdisk.c: Likewise.
11282 * util/i386/pc/getroot.c: Likewise.
11283 * util/i386/pc/pupa-mkimage.c: Likewise.
11284 * util/i386/pc/pupa-setup.c: Likewise.
11285
e6eced71 112862004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
11287
11288 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
11289 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
11290 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
11291 reading and reset it after reading.
11292 (pupa_ext2_close): Return PUPA_ERR_NONE.
11293
11294 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
11295 Correct value.
11296 (struct linux_kernel_header): Add kernel_version and
11297 initrd_addr_max.
11298 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
11299 pupa_file_read succeeds.
11300 (pupa_rescue_cmd_initrd): Implement.
11301
5aded270 113022003-12-03 Marco Gerards <metgerards@student.han.nl>
11303
11304 * fs/ext2.c (pupa_ext2_label): New function.
11305 (pupa_ext2_fs): Added label.
11306 * fs/fat.c (pupa_fat_label): New function.
11307 (pupa_fat_fs): Added label.
11308 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
11309
11310 * kern/misc.c (pupa_strndup): New function.
11311 * include/pupa/misc.h (pupa_strndup): New prototype.
11312
11313 * include/pupa/normal.h: Include <pupa/err.h>.
11314 (pupa_set_history): New prototype.
11315 (pupa_iterate_commands): New prototype.
11316 * normal/cmdline.c: Include <pupa/machine/partition.h>,
11317 <pupa/disk.h>, <pupa/file.h>.
11318 (hist_size): New variable.
11319 (hist_lines): Likewise.
11320 (hist_end): Likewise.
11321 (hist_used): Likewise.
11322 (pupa_set_history): New function.
11323 (pupa_history_get): Likewise.
11324 (pupa_history_add): Likewise.
11325 (pupa_history_replace): Likewise.
11326 (pupa_tab_complete): Likewise.
11327 (pupa_cmdline_run): Added tab completion and history buffer. Tab
11328 completion shows partitionnames while completing partitions, this
11329 feature was suggested by Jeff Bailey.
11330 * normal/command.c (pupa_iterate_commands): New function.
11331 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
11332 (pupa_normal_init): Initialize history buffer.
11333 (PUPA_MOD_INIT): Likewise.
11334 (pupa_normal_fini): Free the history buffer.
11335 (PUPA_MOD_FINI): Likewise.
11336
11337 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
11338 key.
11339
11340 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
11341 * configure.ac [i386]: Check for regparam bug.
11342 (NESTED_FUNC_ATTR) [! i386]: Defined.
11343
1f7315a3 113442003-11-17 Marco Gerards <metgerards@student.han.nl>
11345
11346 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
11347 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
11348 (pupa_emu_SOURCES): New variable.
11349 (pupa_emu_LDFLAGS): Likewise.
11350 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
11351 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
11352 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
11353 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11354 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
11355 (pupa_jmp_buf): New typedef.
11356 (pupa_setjmp) [PUPA_UTIL]: New macro.
11357 (pupa_longjmp) [PUPA_UTIL]: Likewise.
11358 * include/pupa/term.h (struct pupa_term): New member `refresh'.
11359 (pupa_refresh): New prototype.
11360 * include/pupa/util/getroot.h: New file.
11361 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
11362 it.
11363 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
11364 (pupa_rescue_cmd_cat): Likewise.
11365 (pupa_rescue_cmd_ls): Likewise.
11366 (pupa_rescue_cmd_testload): Likewise.
11367 (pupa_rescue_cmd_lsmod): Likewise.
11368 * normal/cmdline.c (pupa_cmdline_get): Likewise.
11369 * normal/menu.c (run_menu): Likewise.
11370 * kern/term.c (pupa_cls): Likewise.
11371 (pupa_refresh): New function.
11372 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
11373 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
11374 * util/console.c: New file.
f19dbdb7 11375
1f7315a3 11376 * util/i386/pc/getroot.c: New file.
11377 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
11378 (pupa_putchar): New function.
11379 (pupa_refresh): Likewise.
11380 (xgetcwd): Function moved to ...
11381 (strip_extra_slashes): Likewise.
11382 (get_prefix): Likewise.
f19dbdb7 11383 * util/i386/pc/getroot.c: ... here.
1f7315a3 11384 (find_root_device): Function moved and renamed to...
11385 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
11386 Changed all callers.
11387 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
11388 and renamed to...
11389 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
11390 Changed all callers.
11391 * util/misc.c (pupa_memalign): New function.
11392 (pupa_mm_init_region): Likewise.
11393 (pupa_register_exported_symbols): Likewise.
11394 (pupa_putchar): Function removed.
11395 * util/pupa-emu.c: New file.
11396
9a5c1ade 113972003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
11398
11399 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
11400 (_multiboot_mod_SOURCES): New variable.
11401 (_multiboot_mod_CFLAGS): Likewise.
11402 * loader/i386/pc/multiboot.c: New file.
11403 * include/pupa/i386/pc/multiboot.h: Likewise.
11404 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
11405 (pupa_multiboot_real_boot): New function.
11406 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
11407 (pupa_multiboot_real_boot): New prototype.
11408 (pupa_rescue_cmd_multiboot): Likewise
11409 (pupa_rescue_cmd_module): Likewise.
11410
11411 * kern/loader.c (pupa_loader_set): Continue when
11412 pupa_loader_unload_func() fails.
11413 (pupa_loader_unset): New function.
11414 * include/pupa/loader.h (pupa_loader_unset): New prototype.
11415
11416 * kern/misc.c (pupa_stpcpy): New function.
11417 * include/pupa/misc.h (pupa_stpcpy): New prototype.
11418
8e72a9c0 114192003-11-12 Marco Gerards <metgerards@student.han.nl>
11420
11421 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
11422 for available extensions.
11423
11424 * include/pupa/i386/pc/time.h: New file.
11425 * kern/disk.c: Include <pupa/machine/time.h>.
11426 (PUPA_CACHE_TIMEOUT): New macro.
11427 (pupa_last_time): New variable.
11428 (pupa_disk_open): Flush the cache when there was a timeout.
11429 (pupa_disk_close): Reset the timer.
11430 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
11431 pupa_currticks.
11432 * util/misc.c: Include <sys/times.h>
11433 (pupa_get_rtc): New function.
11434
c4adbd32 114352003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
11436
11437 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
11438 as blocks.
11439 (pupa_ext2_get_file_block): Use blocks member.
11440
11441 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
11442 first block. Return -1 instead of pupa_errno on error.
11443
bfd30f06 114442003-10-27 Marco Gerards <metgerards@student.han.nl>
11445
11446 * README: In the pupa-mkimage example use _chain instead of chain
11447 and ext2 instead of fat.
11448 * TODO: Replace ext2fs with jfs as an example. Add an item for
11449 adding journal playback for ext2fs.
11450 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
11451 (pkgdata_MODULES): Added ext2.mod.
11452 (ext2_mod_SOURCES): New variable.
11453 (ext2_mod_CFLAGS): Likewise.
11454 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
11455 * include/pupa/misc.h (pupa_strncpy): New prototype.
11456 (pupa_strcat): Likewise.
11457 (pupa_strncmp): Likewise.
11458 * kern/misc.c (pupa_strcat): Enable function.
11459 (pupa_strncpy): New function.
11460 (pupa_strncmp): Likewise.
11461 * fs/ext2.c: New file.
f19dbdb7 11462
bfd30f06 11463 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
11464 when the read failed before retrying.
11465 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
11466 (_FILE_OFFSET_BITS): Likewise.
11467 * configure.ac: Added AC_SYS_LARGEFILE.
11468
98d15063 114692003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11470
11471 * genmk.rb (PModule#rule): Make sure to get only symbol names
11472 from the output of nm.
11473 Reported by Robert Millan <zeratul2@wanadoo.es>.
11474
18d9c7cd 114752003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
11476
11477 I forgot to check in these changes for a long time. This adds
11478 incomplete support for VGA console, and this is still very
11479 buggy. Also, a lot of consideration is required for I18N,
11480 UNICODE, and VGA font issues. Therefore, assume that this is
11481 such that "better than nothing".
f19dbdb7 11482
18d9c7cd 11483 * font/manager.c: New file.
11484 * include/pupa/font.h: Likewise.
11485 * include/pupa/i386/pc/vga.h: Likewise.
11486 * term/i386/pc/vga.c: Likewise.
11487 * util/unifont2pff.rb: Likewise.
11488
11489 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
11490 (pkgdata_MODULES): Added vga.mod and font.mod.
11491 (vga_mod_SOURCES): New variables.
11492 (vga_mod_CFLAGS): Likewise.
11493 (font_mod_SOURCES): Likewise.
11494 (font_mod_CFLAGS): Likewise.
11495
11496 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
11497
11498 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 11499 (struct pupa_term): Added init and fini.
18d9c7cd 11500 Changed the argument of putchar to pupa_uint32_t.
11501
11502 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
11503 (pupa_console_real_putchar): New prototype.
11504 (pupa_console_putchar): Removed.
11505 (pupa_console_checkkey): Exported.
11506 (pupa_console_getkey): Likewise.
11507
11508 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
11509 characters.
11510
11511 * kern/term.c (pupa_term_set_current): Rewritten.
11512 (pupa_putchar): Likewise.
11513 (pupa_putcode): New function.
11514
11515 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
11516 (pupa_console_real_putchar): ... this.
11517 (pupa_vga_set_mode): New function.
11518 (pupa_vga_get_font): Likewise.
11519
11520 * normal/command.c: Include pupa/term.h.
11521 (terminal_command): New function.
11522 (pupa_command_init): Register the command "terminal".
11523
11524 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
11525 (DISP_UP): Likewise.
11526 (DISP_RIGHT): Likewise.
11527 (DISP_DOWN): Likewise.
11528 (DISP_HLINE): Likewise.
11529 (DISP_VLINE): Likewise.
11530 (DISP_UL): Likewise.
11531 (DISP_UR): Likewise.
11532 (DISP_LL): Likewise.
11533 (DISP_LR): Likewise.
11534
11535 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 11536
977329f5 115372003-02-08 NIIBE Yutaka <gniibe@m17n.org>
11538
11539 * util/resolve.c (pupa_util_resolve_dependencies): BUG
11540 FIX. Reverse the path_list.
11541
11542 * include/pupa/normal.h: Export pupa_register_command and
11543 pupa_unregister_command.
11544
11545 * hello/hello.c (pupa_cmd_hello): New module.
11546 * conf/i386-pc.rmk: Added hello.mod.
11547
1f5ab428 115482003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
11549
11550 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 11551
1f5ab428 11552 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
11553 (compress_kernel): New variable.
11554 (generate_image): Heavily modified to support compressing a
11555 large part of the core image.
11556
11557 * util/misc.c (pupa_util_read_image): Fix a file descriptor
11558 leak.
11559 (pupa_util_load_image): New function.
11560
11561 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
11562 (pupa_compressed_size): New variable.
11563 (codestart): Enable Gate A20 here.
11564 Decompress the compressed part of the core image.
11565 Rearrange the code to put functions and variables which are
11566 required for initialization in the non-compressed part.
11567 Include lzo1x.S.
11568
11569 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
11570 here.
11571
11572 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
11573
f19dbdb7 11574 * include/pupa/i386/pc/kernel.h
1f5ab428 11575 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
11576 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
11577 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11578 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11579 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
11580
11581 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
11582
11583 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
11584 (Utility#rule): Likewise.
11585
11586 * configure.ac: Check if LZO is available.
11587
ce5bf700 115882003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
11589
11590 * include/pupa/normal.h: New file.
11591 * include/pupa/setjmp.h: Likewise.
11592 * include/pupa/i386/setjmp.h: Likewise.
11593 * normal/cmdline.c: Likewise.
11594 * normal/command.c: Likewise.
11595 * normal/main.c: Likewise.
11596 * normal/menu.c: Likewise.
11597 * normal/i386/setjmp.S: Likewise.
f19dbdb7 11598
ce5bf700 11599 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
11600 (pupa_rescue_cmd_initrd): Likewise.
11601
11602 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
11603 Likewise.
11604
11605 * kern/i386/pc/startup.S (translation_table): New variable.
11606 (translate_keycode): New function.
11607 (pupa_console_getkey): Call translate_keycode.
11608
11609 * kern/rescue.c (attempt_normal_mode): New function.
11610 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
11611 it failed, print a message.
11612
11613 * kern/mm.c (pupa_real_malloc): Print more information when a
11614 free magic is broken.
11615 (pupa_free): If the first free header is not free actually, set
11616 it to P.
11617
11618 * kern/main.c (pupa_load_normal_mode): Just load the module
11619 "normal".
11620 (pupa_main): Don't print the message
11621 "Entering into rescue mode..." here.
11622
11623 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
11624 Declared.
11625 (pupa_rescue_cmd_initrd): Likewise.
11626 (pupa_rescue_cmd_initrd): Likewise.
11627
11628 * include/pupa/symbol.h (FUNCTION): Specify the type.
11629 (VARIABLE): Likewise.
11630
11631 * include/pupa/err.h (pupa_err_t): Added
11632 PUPA_ERR_UNKNOWN_COMMAND.
11633
11634 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
11635 (pupa_dl_get_prefix): Likewise.
11636
11637 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
11638 Added _chain.mod and _linux.mod instead of chain.mod and
11639 linux.mod.
11640 (chain_mod_SOURCES): Renamed to ...
11641 (_chain_mod_SOURCES): ... this.
11642 (chain_mod_CFLAGS): Renamed to ...
11643 (_chain_mod_CFLAGS): ... this.
11644 (linux_mod_SOURCES): Renamed to ...
11645 (_linux_mod_SOURCES): ... this.
11646 (linux_mod_CFLAGS): Renamed to ...
11647 (_linux_mod_CFLAGS): ... this.
11648 (normal_mod_SOURCES): New variable.
11649 (normal_mod_CFLAGS): Likewise.
11650 (normal_mod_ASFLAGS): Likewise.
11651
116522003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
11653
11654 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
11655 possible.
11656
fe6b695a 11657 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 11658 recursively.
11659 (pupa_dl_unref): Unrefer depending modules recursively.
11660 Don't call pupa_dl_unload implicitly, because PUPA can crash if
11661 a module is unloaded before one depending on that module is
11662 unloaded.
11663 (pupa_dl_unload): Unload depending modules explicitly,
11664 if possible.
11665
c04da074 116662003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
11667
11668 * include/pupa/i386/pc/linux.h: New file.
11669 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 11670
c04da074 11671 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
11672 Removed.
11673 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
11674 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
11675 of PUPA_CHAINLOADER_BOOT_SECTOR.
11676
11677 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
11678 (pupa_linux_prot_size): New variable.
11679 (pupa_linux_tmp_addr): Likewise.
11680 (pupa_linux_real_addr): Likewise.
11681 (pupa_linux_boot_zimage): New function.
11682 (pupa_linux_boot_bzimage): Likewise.
11683
11684 * kern/i386/pc/init.c (struct mem_region): New structure.
11685 (MAX_REGIONS): New macro.
11686 (mem_regions): New variable.
11687 (num_regions): Likewise.
11688 (pupa_os_area_addr): Likewise.
11689 (pupa_os_area_size): Likewise.
11690 (pupa_lower_mem): Likewise.
11691 (pupa_upper_mem): Likewise.
11692 (add_mem_region): New function.
11693 (compact_mem_regions): Likewise.
11694 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
11695 the size of the conventional memory and that of so-called upper
11696 memory (before the first memory hole).
11697 Instead of adding each found region to free memory, use
11698 add_mem_region and add them after removing overlaps.
11699 Also, add only 1/4 of the upper memory to free memory. The rest
11700 is used for loading OS images. Maybe this is ad hoc, but this
11701 makes it much easier to relocate OS images when booting.
11702
11703 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
11704 (pupa_enter_rescue_mode): Don't register initrd and module.
11705
11706 * kern/mm.c: Include pupa/dl.h.
11707
11708 * kern/main.c: Include pupa/file.h and pupa/device.h.
11709
11710 * kern/loader.c (pupa_loader_load_module_func): Removed.
11711 (pupa_loader_load_module): Likewise.
11712
11713 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
11714 ``.o''.
11715
11716 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
11717 (pupa_linux_tmp_addr): Likewise.
11718 (pupa_linux_real_addr): Likewise.
11719 (pupa_linux_boot_zimage): Likewise.
11720 (pupa_linux_boot_bzimage): Likewise.
11721
11722 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
11723 (pupa_upper_mem): Likewise.
11724 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
11725 module is too dangerous.
11726
11727 * include/pupa/loader.h (pupa_os_area_addr): Declared.
11728 (pupa_os_area_size): Likewise.
11729 (pupa_loader_set): Remove the first argument. Loader doesn't
11730 manage modules or initrd any longer.
11731 (pupa_loader_load_module): Removed.
11732
11733 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
11734 (linux_mod_SOURCES): New variable.
11735 (linux_mod_CFLAGS): Likewise.
11736
a13f9237 117372003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
11738
11739 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
11740 the length of a blocklist correctly.
11741
11742 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
11743 Use ioctl only if the OS file is a block device.
11744 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
11745 not very useful for normal files.
11746
11747 * kern/main.c (pupa_set_root_dev): New function.
11748 (pupa_load_normal_mode): Likewise.
11749 (pupa_main): Call those above.
11750
11751 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
11752 pupa_uint16_t.
11753
11754 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
11755
a5ffe966 117562003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
11757
11758 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
11759 (setup): Configure the installed partition information and the
11760 dl prefix.
11761
11762 * loader/i386/pc/chainloader.c (my_mod): New variable.
11763 (pupa_chainloader_unload): New function.
11764 (pupa_rescue_cmd_chainloader): Refer itself.
11765 (PUPA_MOD_INIT): Save its own module in MY_MOD.
11766
11767 * kern/i386/pc/startup.S (install_partition): Removed.
11768 (version_string): Likewise.
11769 (config_file): Likewise.
11770 (pupa_install_dos_part): New variable.
11771 (pupa_install_bsd_part): Likewise.
11772 (pupa_prefix): Likewise.
11773 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
11774
11775 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
11776 and pupa/misc.h.
11777 (make_install_device): New function.
11778 (pupa_machine_init): Set the dl prefix.
11779
11780 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
11781 (buf): Renamed to ...
11782 (linebuf): ... this.
11783 (pupa_rescue_cmd_prefix): New function.
11784 (pupa_rescue_cmd_insmod): Likewise.
11785 (pupa_rescue_cmd_rmmod): Likewise.
11786 (pupa_rescue_cmd_lsmod): Likewise.
11787 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
11788 rmmod and lsmod.
11789
11790 * kern/mm.c (pupa_memalign): If failed even after invalidating
11791 disk caches, unload unneeded modules and retry.
11792
11793 * kern/misc.c (pupa_memmove): New function.
11794 (pupa_memcpy): Removed.
11795 (pupa_strcpy): New function.
11796 (pupa_itoa): Made static.
11797
11798 * kern/dl.c (pupa_dl_iterate): New function.
11799 (pupa_dl_ref): Likewise.
11800 (pupa_dl_unref): Likewise.
11801 (pupa_dl_unload): Return if succeeded or not.
11802 (pupa_dl_unload_unneeded): New function.
11803 (pupa_dl_unload_all): Likewise.
11804 (pupa_dl_init): Renamed to ...
11805 (pupa_dl_set_prefix): ... this.
11806 (pupa_dl_get_prefix): New function.
11807
11808 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
11809 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
11810 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
11811 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
11812 (pupa_install_dos_part): Declared.
11813 (pupa_install_bsd_part): Likewise.
11814 (pupa_prefix): Likewise.
11815 (pupa_boot_drive): Likewise.
11816
11817 * include/pupa/types.h: Fix a typo.
11818
11819 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
11820 pupa_memmove.
11821 (pupa_memmove): Declared.
11822 (pupa_strcpy): Likewise.
11823
11824 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
11825 pupa_mod_init takes one argument, its own module.
11826 (pupa_dl_unload_unneeded): Declared.
11827 (pupa_dl_unload_all): Likewise.
11828 (pupa_dl_ref): Likewise.
11829 (pupa_dl_unref): Likewise.
11830 (pupa_dl_iterate): Likewise.
11831 (pupa_dl_init): Renamed to ...
11832 (pupa_dl_set_prefix): ... this.
11833 (pupa_dl_get_prefix): Declared.
11834
11835 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 11836 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 11837 unloaded.
11838 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
11839 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
11840
11841 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
11842 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
11843
012d7999 118442003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11845
11846 * util/i386/pc/pupa-setup.c (setup): Define the internal
11847 function find_first_partition_start at the top level, because GCC
11848 3.0.x cannot compile internal functions in deeper scopes
11849 correctly.
11850 (find_root_device): Use lstat instead of stat.
11851 Don't follow symbolic links.
11852 Fix the path-constructing code.
11853
11854 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
11855 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
11856 by a BLKGETSIZE ioctl first, because block devices don't fill
11857 the member st_mode of the structure stat on Linux.
11858 [__linux__] (linux_find_partition): Use a temporary buffer
11859 REAL_DEV for the working space. Copy it to DEV before returning.
11860 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
11861 buffer cache consistent.
11862 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
11863 strncmp. The previous value was merely wrong.
11864 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
11865
11866 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
11867 FAT size is 12. The previous value was merely wrong.
11868
11869 * kern/main.c (pupa_main): Don't split the starting message from
11870 newlines.
11871
11872 * kern/term.c (pupa_putchar): Put CR after LF instead of before
11873 LF, because BIOS goes crazy about character attributes in this
11874 case.
11875
1cc73a62 118762003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
11877
11878 * include/i386/pc/util/biosdisk.h: New file.
11879 * util/i386/pc/biosdisk.c: Likewise.
11880 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 11881
1cc73a62 11882 * Makefile.in (INCLUDE_DISTFILES): Added
11883 include/pupa/i386/pc/util/biosdisk.h.
11884 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
11885 directory util/i386/pc.
11886 (install-local): Added a rule for sbin_UTILITIES.
11887 (uninstall): Likewise.
11888
11889 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
11890
11891 * util/misc.c (xrealloc): New function.
11892 (pupa_malloc): Likewise.
11893 (pupa_free): Likewise.
11894 (pupa_realloc): Likewise.
11895 (pupa_stop): Likewise.
11896 (pupa_putchar): Likewise.
11897
11898 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
11899
11900 * include/pupa/util/misc.h (xrealloc): Declared.
11901
11902 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
11903 macro.
11904 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
11905 (PUPA_BOOT_MACHINE_BPB_END): ... this.
11906
11907 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
11908 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11909
11910 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
11911 way should be implemented.
11912 [PUPA_UTIL] (pupa_fat_fini): Likewise.
11913
11914 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
11915 the size of NAME for safety.
11916 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
11917 0x88.
11918
11919 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
11920 (pupa_setup_SOURCES): Likewise.
11921
11922 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
11923
08b70fe8 119242002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11925
11926 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
11927 bunch of pushl's from pusha, because this destroys the return
11928 value.
11929
62ddcc8f 119302002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
11931
11932 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
11933 This means that any missing prototypes could be fatal. Also, you
11934 must take care when writing assembly code. See the comments at
11935 the beginning of startup.S, for more details.
f19dbdb7 11936
62ddcc8f 11937 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
11938 compilation mechanism.
11939 (pupa_chainloader_real_boot): Likewise.
11940 (pupa_biosdisk_rw_int13_extensions): Likewise.
11941 (pupa_biosdisk_rw_standard): Likewise.
11942 (pupa_biosdisk_check_int13_extensions): Likewise.
11943 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
11944 (pupa_biosdisk_get_diskinfo_standard): Likewise.
11945 (pupa_get_memsize): Likewise.
11946 (pupa_get_mmap_entry): Likewise.
11947 (pupa_console_putchar): Likewise.
11948 (pupa_console_setcursor): Likewise.
11949 (pupa_getrtsecs): Use pushl instead of push.
11950
11951 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
11952 memory instead of the stack for a mmap entry, because some
11953 BIOSes may ignore the maximum size and overflow.
11954
11955 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
11956
11957 * genmk.rb (PModule#rule): Compile automatically generated
11958 sources with module-specific CFLAGS as well as other sources.
11959
9962ed99 119602002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11961
11962 * configure.ac: Check ld.
11963 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
11964 respectively, before checking endianness and sizes.
11965
11966 * Makefile.in (LD): New variable.
f19dbdb7 11967
abdfc3c5 119682002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11969
11970 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
11971
6a161fa9 119722002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
11973
11974 * Changelog: New file.
11975