]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-03-31 Bean <bean123ch@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
86cb4f54 12008-03-31 Bean <bean123ch@gmail.com>
2
3 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4 (grub_probe_SOURCES): Add fs/afs.c.
5 (grub_fstest_SOURCES): Likewise.
6 (afs_mod_SOURCES): New variable.
7 (afs_mod_CFLAGS): Likewise.
8 (afs_mod_LDFLAGS): Likewise.
9
10 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
11 (grub_emu_SOURCES): Likewise.
12
13 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
14
15 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16
17 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
18
19 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
20
21 * fs/afs.c: New file.
22
17c74c21 232008-03-30 Pavel Roskin <proski@gnu.org>
24
4cb68e89 25 * disk/host.c: Include grub/misc.h to fix a warning.
26 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
27 warnings about implicit declarations.
28
8790bb04 29 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
30 variable.
31 * include/grub/i386/loader.h: Change declaration of
32 grub_linux_boot() to match what grub_loader_set() expects.
33 * util/getroot.c (grub_guess_root_device): Return const char* to
34 fix a warning.
35 * util/grub-probe.c (probe): Fix a warning about uninitialized
36 abstraction_name variable.
37 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
38 second argument as unused to fix a warning.
39
9a3f3296 40 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
41 missing grub_error() call.
42
0ecef90d 43 * util/update-grub_lib.in: Define datarootdir, since Autoconf
44 2.60 and newer uses it to define datadir.
45
0bf6d401 46 * commands/sleep.c: Fix warning about implicit declaration.
47 * disk/memdisk.c: Likewise.
48 * loader/aout.c: Likewise.
49 * loader/i386/bsd_normal.c: Likewise.
50 * util/grub-probe.c: Likewise.
51
7cdacf97 52 * commands/i386/cpuid.c (has_longmode): Make static.
53 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
54 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
55
17c74c21 56 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
57 GDT. This is more robust, as %ds can change.
58 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
59 calling real_to_prot().
60 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
61
80a3e68b 622008-03-28 Pavel Roskin <proski@gnu.org>
63
64 * kern/i386/pc/startup.S: Assert that uncompressed functions
65 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
66 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
67 code, as they push parts of the code (error handlers) beyond
68 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
69 code as correctness and size.
70
77bcd272 712008-03-28 Pavel Roskin <proski@gnu.org>
72
73 * kern/i386/pc/startup.S
74 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
75 data block address to the real mode, keep offset minimal. This
76 works around a bug in AWARD BIOS on old Athlon systems, which
77 makes CD detection hang.
78
c5dfd43b 792008-03-26 Pavel Roskin <proski@gnu.org>
80
81 * normal/color.c (grub_parse_color_name_pair): Make `name' a
82 const.
83 * include/grub/normal.h: Add grub_parse_color_name_pair()
84 declaration.
85
bf962df2 862008-03-24 Bean <bean123ch@gmail.com>
87
88 * disk/i386/pc/biosdisk.c (cd_start): Removed.
89 (cd_count): Removed.
90 (cd_drive): New variable.
91 (grub_biosdisk_get_drive): Don't check for (cdN) device.
92 (grub_biosdisk_call_hook): Likewise.
93 (grub_biosdisk_iterate): Change cdrom detection method.
94 (grub_biosdisk_open): Replace cd_start with cd_drive.
95 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
96 detect cdrom device.
97
98 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
99 Removed.
100 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
101 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
102 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
103 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
104 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
105 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
106 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
107 (grub_biosdisk_cdrp): New structure.
108 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
109
110 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
111
112 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
113 device.
114
115 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
116 New function.
117
68e7fc7a 1182008-03-20 Robert Millan <rmh@aybabtu.com>
119
120 Remove 2 TiB limit in ata.mod.
121 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
122 (grub_ata_dumpinfo): Print sector count with 0x%llx.
123 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
124 grub_uint64_t instead of grub_uint32_t.
125
38ad2cf5 1262008-03-05 Bean <bean123ch@gmail.com>
127
128 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
129 (grub_multiboot): Set boot device.
130
131 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
132
2b89344e 1332008-03-02 Bean <bean123ch@gmail.com>
134
135 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
136 symlink_buffer.
137
87a95d1f 1382008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
139
140 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
141 texinfo.tex.
142
143 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
144 modified.
145
146 * docs/fdl.texi: New file.
147
148 * docs/mdate-sh: New file. Copied from gnulib.
149 * docs/texinfo.tex: Likewise.
150
151 * config.guess: Updated from gnulib.
152 * install-sh: Likewise.
153
7dc15d8e 1542008-02-28 Robert Millan <rmh@aybabtu.com>
155
156 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
157 (aout_mod_SOURCES): New variable.
158 (aout_mod_CFLAGS): Likewise.
159 (aout_mod_LDFLAGS): Likewise.
160
161 * conf/i386-ieee1275.rmk: Likewise.
162
b00ab696 1632008-02-28 Robert Millan <rmh@aybabtu.com>
164
165 * util/update-grub.in: Reorganise terminal validity check. Accept
166 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
167 Based on suggestion by Franklin PIAT.
168
79ca2d78 1692008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
170
171 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
172 function.
173 * util/getroot.c (grub_util_check_block_device): New function that
174 returns the given argument if it is a block device and returns NULL else.
175 * util/grub-probe.c (argument_is_device): New variable.
176 (probe): Promote device_name from a variable to an argument. Receive
177 device_name from grub_util_check_block_device() if path is NULL and from
178 grub_guess_root_device() else. Do not free() device_name anymore.
179 (options): Introduce new parameter '-d, --device'.
180 (main): Add description of the new parameter to the help screen.
181 Rename path variable to argument. Set argument_is_device if the '-d'
182 option is given. Pass argument to probe() depending on
183 argument_is_device.
184
0d16e571 1852008-02-24 Bean <bean123ch@gmail.com>
186
187 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
188 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
189 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
190 (GRUB_ISO9660_VOLDESC_PART): Likewise.
191 (GRUB_ISO9660_VOLDESC_END): Likewise.
192 (grub_iso9660_primary_voldesc): New member escape.
193 (grub_iso9660_data): New member joliet.
194 (grub_iso9660_convert_string): New function.
195 (grub_iso9660_mount): Detect joliet extension.
196 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
197 (grub_iso9660_iso9660_label): Likewise.
198
199 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
200 (grub_setup_SOURCES): Add fs/udf.c.
201 (grub_fstest_SOURCES): Likewise.
202 (udf_mod_SOURCES): New variable.
203 (udf_mod_CFLAGS): Likewise.
204 (udf_mod_LDFLAGS): Likewise.
205
206 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
207 (grub_emu_SOURCES): Likewise.
208
209 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
210
211 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
212
213 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
214
215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
216
217 * fs/udf.c: New file.
218
8a594a17 2192008-02-24 Robert Millan <rmh@aybabtu.com>
220
221 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
222 (normal/lexer.c_DEPENDENCIES): New variables.
223 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
224 (normal/lexer.c_DEPENDENCIES): Likewise.
225 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
226 (normal/lexer.c_DEPENDENCIES): Likewise.
227 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
228 (normal/lexer.c_DEPENDENCIES): Likewise.
229 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
230 (normal/lexer.c_DEPENDENCIES): Likewise.
231 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
232 (normal/lexer.c_DEPENDENCIES): Likewise.
233
2dc33c03 2342008-02-23 Robert Millan <rmh@aybabtu.com>
235
236 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
237 since they were intended to be in hex. This didn't break previously
238 because of a bug in gpt_partition_map_iterate() (see below).
239
240 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
241 when checking the validity of GPT header.
242 Remove `partno', since it always provides the same information as `i'.
243
f6f4cfb0 2442008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
245
246 * include/grub/efi/time.h: Fix a wrong comment.
247
79ff665f 2482008-02-19 Pavel Roskin <proski@gnu.org>
249
250 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
251 message.
252
d38e24c2 2532008-02-19 Bean <bean123ch@gmail.com>
254
255 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
256 (aout_mod_SOURCES): New variable.
257 (aout_mod_CFLAGS): Likewise.
258 (aout_mod_LDFLAGS): Likewise.
259 (_bsd_mod_SOURCES): New variable.
260 (_bsd_mod_CFLAGS): Likewise.
261 (_bsd_mod_LDFLAGS): Likewise.
262 (bsd_mod_SOURCES): New variable.
263 (bsd_mod_CFLAGS): Likewise.
264 (bsd_mod_LDFLAGS): Likewise.
265
266 * include/grub/aout.h: New file.
267
268 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
269
270 * include/grub/i386/bsd.h: New file.
271
272 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
273 to make it public.
274
275 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
276 function is called, so that it's possible to change it inside the hook.
277 (grub_elf64_load): Likewise.
278 (grub_elf_file): Don't close the file if elf header is not found.
279 (grub_elf_close): Close the file if grub_elf_file fails (The new
280 grub_elf_file won't close it).
281 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
282 (grub_elf64_size): Likewise.
283
284 * kern/i386/loader.S (grub_unix_real_boot): New function.
285
286 * loader/aout.c: New file.
287
288 * loader/i386/bsd.c: New file.
289
290 * loader/i386/bsd_normal.c: New file.
291
292 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
293
294 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
295 can test othe formats.
296
b93bdb0f 2972008-02-19 Robert Millan <rmh@aybabtu.com>
298
299 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
300 (grub_gpt_partition_type_empty): Redefine with macro from
301 `<grub/gpt_partition.h>'.
302 (gpt_partition_map_iterate): Adjust partition type comparison.
303
304 Export `entry' as partmap-specific `part.data' struct.
305 (grub_gpt_header, grub_gpt_partentry): Move from here ...
306
307 * include/grub/gpt_partition.h (grub_gpt_header)
308 (grub_gpt_partentry): ... to here (new file).
309
310 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
311
312 (grub_gpt_partition_type_bios_boot): New const variable, defined
313 with macro from `<grub/gpt_partition.h>'.
314
315 (setup): Replace `first_start' with `embed_region', which keeps
316 track of the embed region (and is partmap-agnostic).
317
318 Replace find_first_partition_start() with find_usable_region(),
319 which finds a usable region for embedding using partmap-specific
320 knowledge (supports PC/MSDOS and GPT).
321
322 Fix all assumptions that the embed region start at sector 1, using
323 `embed_region.start' from now on. Similarly, use `embed_region.end'
324 rather than `first_start' to calculate available size.
325
326 In grub_util_info() message, replace "into after the MBR" with an
327 indication of the specific sector our embed region starts at.
328
66cb40f6 3292008-02-19 Robert Millan <rmh@aybabtu.com>
330
331 * DISTLIST: Replace `commands/ieee1275/halt.c' and
332 `commands/ieee1275/reboot.c' with `commands/halt.c' and
333 `commands/reboot.c'.
334 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
335 (halt_mod_SOURCES): Likewise.
336 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
337 (halt_mod_SOURCES): Likewise.
338
b7202015 3392008-02-17 Christian Franke <franke@computer.org>
340
341 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
342
32b0fc49 3432008-02-17 Robert Millan <rmh@aybabtu.com>
344
345 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
346 set `first_start' to 0 for non-PC/MSDOS partition maps.
347
aca63502 3482008-02-16 Robert Millan <rmh@aybabtu.com>
349
350 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
351 do not assume partition map is PC/MSDOS before performing checks that
352 are specific to that layout.
353
0de8be86 3542008-02-13 Robert Millan <rmh@aybabtu.com>
355
356 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
357 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
358 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
359
c3db8364 3602008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
361
362 * configure.ac: Only a cosmetic change on the handling of
363 -fno-stack-protector.
364
f714229e 3652008-02-12 Alexandre Boeglin <alex@boeglin.org>
366
c3db8364 367 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
368 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
369 reboot.c.
f714229e 370 (grub_install_SOURCES): Add halt.mod and reboot.mod.
371 (halt_mod_SOURCES): New variable.
372 (halt_mod_CFLAGS): Likewise.
373 (halt_mod_LDFLAGS): Likewise.
374 (reboot_mod_SOURCES): Likewise.
375 (reboot_mod_CFLAGS): Likewise.
376 (reboot_mod_LDFLAGS): Likewise.
377
c3db8364 378 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
379 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
380 reboot.c.
f714229e 381 (halt_mod_SOURCES): Likewise.
382 (reboot_mod_SOURCES): Likewise.
383
c3db8364 384 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
385 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 386 (reboot_mod_SOURCES): Likewise.
387
388 * commands/i386/pc/reboot.c: merge this file ...
389
390 * commands/ieee1275/reboot.c: ... and this file ...
391
392 * commands/reboot.c: ... to this file.
c3db8364 393 Add some precompiler directive to include the correct header for
394 each machine.
f714229e 395
396 * commands/ieee1275/halt.c: move this file ...
397
398 * commands/halt.c: ... to here.
c3db8364 399 Add some precompiler directive to include the correct header for
400 each machine.
f714229e 401
402 * include/grub/efi/efi.h (grub_reboot): New function declaration.
403 (grub_halt): Likewise.
404
405 * kern/efi/efi.c (grub_reboot): New function.
406 (grub_halt): Likewise.
407
c74493e0 4082008-02-12 Robert Millan <rmh@aybabtu.com>
409
410 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
411 /dev (like it is done for /dev/mapper). This doesn't provide support
412 for EVMS, but at least it is now easy to identify the problem when it
413 arises.
414
d0db4b04 4152008-02-11 Robert Millan <rmh@aybabtu.com>
416
417 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
418 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
419 comparing it with -1, not 0.
420
bf748642 4212008-02-10 Robert Millan <rmh@aybabtu.com>
422
423 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
424 `disk/lvm.c'.
425 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
426 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
427
428 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
429 `disk/lvm.c' to the end of the list.
430 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
431 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
432
b5db202a 4332008-02-10 Robert Millan <rmh@aybabtu.com>
434
435 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
436 grub_print_error() instead. This will let user know why we're entering
437 rescue mode.
438 Based on suggestions from Sam Morris.
439
83abee31 4402008-02-10 Alexandre Boeglin <alex@boeglin.org>
441
442 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
443 on remaining N args, instead of "--" arg N times.
444
78d5a08b 4452008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
446
447 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
448 (fill_with_default_glyph): Changed to use unknown_glyph for fill
449 pattern for unknown glyphs.
450
68807e5f 4512008-02-09 Robert Millan <rmh@aybabtu.com>
452
453 * configure.ac: Probe for `help2man'.
454 * Makefile.in (builddir): New variable.
455 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
456 or otherwise add a few flags/options to it.
457 (install-local): For every executable utility or script that is
458 installed, invoke $(HELP2MAN) to install a manpage based on --help
459 output.
460
461 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
462 that it doesn't prevent --help from working in build tree.
463
464 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
465 with `bug-grub@gnu.org'.
466 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
467 * util/update-grub.in (usage): New function.
468 Implement proper argument check, with support for --help and --version
469 (as well as existing -y).
470
4712008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 472
473 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
474 avoid overwriting previous output.
475 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
476
c1962162 4772008-02-09 Robert Millan <rmh@aybabtu.com>
478
479 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
480 drawing the menu.
481
3dac2e3f 4822008-02-09 Robert Millan <rmh@aybabtu.com>
483
484 * commands/sleep.c: New file.
485 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
486 (sleep_mod_SOURCES): New variable.
487 (sleep_mod_CFLAGS): Likewise.
488 (sleep_mod_LDFLAGS): Likewise.
489
7a634e08 4902008-02-09 Robert Millan <rmh@aybabtu.com>
491
492 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
493 situations in which we can deduce the RAID size and the superblock
494 doesn't match it.
495
b92f0c18 4962008-02-09 Robert Millan <rmh@aybabtu.com>
497
498 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
499 and return a grub_diskmemberlist_t composed of LVM physical volumes.
500 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
501
502 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
503 and return a grub_diskmemberlist_t composed of physical array members.
504 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
505
506 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
507 prototype.
508 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
509 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
510 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
511
512 * util/grub-probe.c (probe): Move partmap probing code from here ...
513 (probe_partmap): ... to here.
514 (probe): Use probe_partmap() once for the disk we're probing, and
515 additionally, when such disk contains a memberlist() struct member,
516 once for each disk that is contained in the structure returned by
517 memberlist().
518
91a4bf68 5192008-02-09 Robert Millan <rmh@aybabtu.com>
520
521 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
522 environment variable to 'all' in order to obtain debug output from
523 non-util/ code.
524 * util/i386/pc/grub-setup.c (main): Likewise.
525
a96f9caa 5262008-02-08 Robert Millan <rmh@aybabtu.com>
527
528 * disk/raid.c (grub_raid_scan_device): Check for
529 `array->device[sb.this_disk.number]' rather than for
530 `array->device[sb.this_disk.number]->name', since the latter is not
531 garanteed to be accessible.
532
b37a9222 5332008-02-08 Robert Millan <rmh@aybabtu.com>
534
535 * disk/raid.c: Update copyright.
536 * fs/cpio.c: Likewise.
537 * include/grub/raid.h: Likewise.
538 * loader/i386/pc/multiboot.c: Likewise.
539 * util/hostfs.c: Likewise.
540
5626aee1 5412008-02-08 Robert Millan <rmh@aybabtu.com>
542
543 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
544 to a grub_disk_t array.
545 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
546 `device[x]'.
547 (grub_raid_scan_device): Replace `device[x].name' accesses with
548 `device[x]->name'. Simplify initialization of `array->device[x]'.
549
554f0187 5502008-02-08 Robert Millan <rmh@aybabtu.com>
551
552 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
553 grub_dprintf() calls.
554 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
555 error message.
556
1ec8425d 5572008-02-07 Christian Franke <franke@computer.org>
558
559 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
560 instead of fseek and ftell to support large files.
561 (grub_hostfs_read): Likewise.
562
f2156fda 5632008-02-07 Robert Millan <rmh@aybabtu.com>
564
565 Patch from Jeroen Dekkers.
566 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
567 failure, since succesfuly reading all array members might not be
568 required.
569
9216e0e7 5702008-02-06 Robert Millan <rmh@aybabtu.com>
571
572 * util/grub-probe.c (probe): Simplify partmap probing (with the
573 assumption that the first word up to the underscore equals to
574 the module name).
575
b0dfd29a 5762008-02-06 Christian Franke <franke@computer.org>
577
578 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
579 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
580 last block of a cpio or tar stream.
581 Check for "TRAILER!!!" instead of any empty data
582 block to detect last block of a cpio stream.
583 (grub_cpio_dir): Fix constness of variable np.
584 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
585 cpio or tar trailer is detected. This fixes a crash
586 on open of a non existing file.
587
c32865bf 5882008-02-05 Bean <bean123ch@gmail.com>
589
590 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
591 address of entry.
592 (grub_multiboot_load_elf64): Likewise.
593 (grub_multiboot): Initialize mbi structure.
594
595 * util/grub-fstest.c: Don't include unused header file script.h.
596
597 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
598 of file.
599 (grub_fstest_SOURCES): Likewise.
600
409480b7 6012008-02-05 Robert Millan <rmh@aybabtu.com>
602
603 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
604 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
605 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
606 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
607
608 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
609 (translation_table): Replace hardcoded values with macros
610 provided by `<grub/term.h>'.
611
612 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
613 (keyboard_map): Correct/add a few values, with macros provided
614 by `<grub/term.h>'.
615 (keyboard_map_shift): Zero values that don't differ from their
616 `keyboard_map' equivalents.
617 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
618 Discard the second scan code that is always sent by Caps lock.
619 Only use `keyboard_map_shift' when it provides a non-zero value,
620 otherwise fallback to `keyboard_map'.
621
99fadbaa 6222008-02-04 Bean <bean123ch@gmail.com>
623
624 * Makefile.in (enable_grub_fstest): New variable.
625
626 * conf/common.rmk (grub_fstest_init.lst): New rule.
627 (grub_fstest_init.h): Likewise.
628 (grub_fstest_init.c): Likewise.
629 (util/grub-fstest.c_DEPENDENCIES): New variable.
630 (grub_fstest_SOURCES): Likewise.
631
632 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
633
634 * util/grub-fstest.c: New file.
635
bf567c50 6362008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
637
638 Make grub-setup handle a separate root device.
639
640 * util/i386/pc/grub-setup.c (setup): Always open the root device,
641 so that the root device can be compared with the destination
642 device.
643 When embedding the core image, if the root and destination devices
644 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
645 0xFF.
646 When not embedding, set ROOT_DRIVE to 0xFF.
647
9be6b98b 6482008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
649
650 Add support for having a grub directory in a different drive. This
651 is still only the data handling part.
652
653 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
654 (codestart): Save %dh in GRUB_ROOT_DRIVE.
655 (grub_root_drive): New variable.
656
657 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
658 instead of GRUB_BOOT_DRIVE to construct a device name. Set
659 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
660 as it was.
661
662 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
663
664 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
665 macro.
666 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
667
668 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
669 is bogus, because PXE booting does not specify any drive
670 correctly.
671
672 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
673 am not sure if this is really correct.
674
675 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
676 is always identical to the boot drive when booting from a CD.
677
678 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
679 longer.
680 (root_drive): New variable.
681 (real_start): Unconditionally set %dh to ROOT_DRIVE.
682 (setup_sectors): Push %dx right after popping it, because %dh will
683 be modified later.
684 (copy_buffer): Restore %dx.
685
e0ca0677 6862008-02-03 Robert Millan <rmh@aybabtu.com>
687
688 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
689 use `cdboot.img' for cdrom images.
690
3b3f6629 6912008-02-03 Robert Millan <rmh@aybabtu.com>
692
693 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
694 only setup gfxterm when `font' command has succeeded.
695
d42b3672 6962008-02-03 Robert Millan <rmh@aybabtu.com>
697
698 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
699 (grub_rescue_cmd_multiboot_loader)
700 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
701
fa370ea6 7022008-02-03 Pavel Roskin <proski@gnu.org>
703
704 * a/kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
705 %edx and %esi from stack only after grub_gate_a20() is called.
706 grub_gate_a20() clobbers %edx.
707
f2a76e1d 7082008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
709
710 * configure.ac (AC_INIT): Bumped to 1.96.
711
712 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
713 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
714 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
715 video/readers/png.c.
716
90fd32d1 7172008-02-03 Bean <bean123ch@gmail.com>
9be665dd 718
719 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
720 (cdboot_img_SOURCES): New variable.
721 (cdboot_img_ASFLAGS): New variable.
722 (cdboot_img_LDFLAGS): New variable.
723
724 * boot/i386/pc/cdboot.S: New file.
725
726 * disk/i386/pc/biosdisk.c (cd_start): New variable.
727 (cd_count): Likewise.
728 (grub_biosdisk_get_drive): Add support for cd device.
729 (grub_biosdisk_call_hook): Likewise.
730 (grub_biosdisk_iterate): Likewise.
731 (grub_biosdisk_open): Likewise.
732 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
733 (grub_biosdisk_rw): Support reading from cd device.
734 (GRUB_MOD_INIT): Iterate cd devices.
735
736 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
737 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
738 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
739
740 * kern/i386/pc/init.c (make_install_device): Check for cd device.
741
4020aa53 7422008-02-02 Robert Millan <rmh@aybabtu.com>
743
744 * commands/read.c: New file.
745 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
746 (read_mod_SOURCES): New variable.
747 (read_mod_CFLAGS): Likewise.
748 (read_mod_LDFLAGS): Likewise.
749
e03a1132 7502008-02-02 Robert Millan <rmh@aybabtu.com>
751
752 * normal/main.c (grub_normal_execute): Check for `menu->size' when
753 determining whether menu has to be displayed.
754
58c69220 7552008-02-02 Marco Gerards <marco@gnu.org>
756
757 * bus/pci.c: New file.
758
759 * include/grub/pci.h: Likewise.
760
761 * include/grub/i386/pc/pci.h: Likewise.
762
763 * commands/lspci.c: Likewise.
764
765 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
766 `lspci.mod'.
767 (pci_mod_SOURCES): New variable.
768 (pci_mod_CFLAGS): Likewise.
769 (pci_mod_LDFLAGS): Likewise.
770 (lspci_mod_SOURCES): Likewise.
771 (lspci_mod_CFLAGS): Likewise.
772 (lspci_mod_LDFLAGS): Likewise.
773
c004e1b4 7742008-02-02 Bean <bean123ch@gmail.com>
775
776 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
777 (grub_ufs_get_file_block): Fix indirect block calculation problem.
778
779 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
780 (grub_xfs_btree_node): New structure.
781 (grub_xfs_btree_root): New structure.
782 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
783 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
784 (GRUB_XFS_EXTENT_BLOCK): Likewise.
785 (GRUB_XFS_EXTENT_SIZE): Likewise.
786 (grub_xfs_read_block): Support btree format type.
787 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
788 Use directory block as basic unit.
789
790 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
791
792 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
793 __attribute__ ((__regparm__ (1))).
794
f95562bf 7952008-02-01 Robert Millan <rmh@aybabtu.com>
796
797 Correct a mistake in previous commit.
798
799 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
800 top.
801 (normal/command.c_DEPENDENCIES): New variable.
802
7d31f41f 8032008-02-01 Robert Millan <rmh@aybabtu.com>
804
805 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
806 top.
807 (normal/command.c_DEPENDENCIES): New variable.
808 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
809 * conf/i386-ieee1275.rmk: Likewise.
810 * conf/i386-linuxbios.rmk: Likewise.
811 * conf/i386-pc.rmk: Likewise.
812 * conf/sparc64-ieee1275.rmk: Likewise.
813 * conf/powerpc-ieee1275.rmk: Likewise.
814 (grub_emu_SOURCES): Add `fs/fshelp.c'.
815
816 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
817
60b6be74 8182008-02-01 Robert Millan <rmh@aybabtu.com>
819
820 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
821 call at beginning of function.
822
078522ab 8232008-01-31 Pavel Roskin <proski@gnu.org>
824
825 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 826 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
827 (grub_mkrescue_SOURCES): Likewise.
078522ab 828 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
829
ccaa8a5f 8302008-01-30 Robert Millan <rmh@aybabtu.com>
831
832 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
833 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
834 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
835 (grub_probe_SOURCES): ... to here.
836
837 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
838 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
839 * conf/i386-ieee1275.rmk: Likewise.
840 * conf/i386-linuxbios.rmk: Likewise.
841 * conf/powerpc-ieee1275.rmk: Likewise.
842
ae5a9cd7 8432008-01-30 Tristan Gingold <gingold@free.fr>
844
845 * kern/rescue.c: Silently accept empty lines.
846
70bc2ef2 8472008-01-29 Bean <bean123ch@gmail.com>
848
849 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
850 (real_code_2): Code cleanup and change comment style.
851 (move_memory): Avoid using 32-bit address mode.
852
6a4d50ea 8532008-01-29 Bean <bean123ch@gmail.com>
854
855 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
856 (png_mod_SOURCES): New variable.
857 (png_mod_CFLAGS): Likewise.
858 (png_mod_LDFLAGS): Likewise.
859
860 * video/readers/png.c: New file.
861
11cc30ac 8622008-01-28 Robert Millan <rmh@aybabtu.com>
863
864 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
865 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
866 `ifndef GRUB_MOD_GAP' hack.
867 * util/elf/grub-mkimage.c (add_segments): Likewise.
868
3abc589f 8692008-01-27 Robert Millan <rmh@aybabtu.com>
870
871 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
872 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 873 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 874
e1907778 8752008-01-27 Robert Millan <rmh@aybabtu.com>
876
877 Get grub-emu to build again (including parallel builds).
878
879 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
880 Split into ...
881 (util/grub-emu.c_DEPENDENCIES): ... this, ...
882 (normal/execute.c_DEPENDENCIES): ... this, ...
883 (grub-emu_DEPENDENCIES): ... and this.
884
885 * conf/i386-efi.rmk: Likewise.
886 * conf/i386-linuxbios.rmk: Likewise.
887 * conf/i386-ieee1275.rmk: Likewise.
888 * conf/powerpc-ieee1275.rmk: Likewise.
889 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
890
2216b101 8912008-01-27 Robert Millan <rmh@aybabtu.com>
892
893 * NEWS: Add a few items.
894
f75172d9 8952008-01-27 Robert Millan <rmh@aybabtu.com>
896
897 Fix parallel builds with grub-emu. Based on earlier commit for
898 grub-probe and grub-setup.
899
900 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
901 (util/grub-emu.c_DEPENDENCIES): ... this.
902 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
903 (util/grub-emu.c_DEPENDENCIES): ... this.
904 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
905 (util/grub-emu.c_DEPENDENCIES): ... this.
906 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
907 (util/grub-emu.c_DEPENDENCIES): ... this.
908 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
909 (util/grub-emu.c_DEPENDENCIES): ... this.
910
3f51de77 9112008-01-27 Pavel Roskin <proski@gnu.org>
912
913 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
914 to create a gap between _end and the modules added to the image
915 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
916 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
917 * util/elf/grub-mkimage.c (add_segments): Likewise.
918
2033f53e 9192008-01-26 Pavel Roskin <proski@gnu.org>
920
921 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
922 just return an error.
923
22da1f6f 9242008-01-26 Bean <bean123ch@gmail.com>
925
926 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
927 (grub_reiserfs_get_item): Save offset of the next item.
928 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
929
2a9525e6 9302008-01-25 Robert Millan <rmh@aybabtu.com>
931
932 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
933 make all filesystem sources appear together (possibly fixing omissions
934 while at it).
935 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
936 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
937 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
938 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
939
940 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
941 add `kern/file.c'.
942 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
943 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
944 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
945 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
946
947 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
948 (probe): Add a sanity check to make sure of our ability to read
949 requested files when probing for filesystem type.
950
951 * genmk.rb: Update copyright year (2007).
952
953 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
954 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
955 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
956 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
957 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
958 : Remove function prototypes.
959
b95f71b5 9602008-01-25 Robert Millan <rmh@aybabtu.com>
961
962 Revert my previous commits (based on wrong assumption of how grub_errno
963 works).
964
965 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
966 * kern/file.c (grub_file_open): Likewise.
967
d08bbb49 9682008-01-24 Pavel Roskin <proski@gnu.org>
969
970 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
971 that hang if GRUB tries to setup colors.
972 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
973 colors for firmwares that don't support it.
974 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
975 Recognize Open Hack'Ware, set flags to work around its
976 limitations.
977
605e36ed 9782008-01-24 Robert Millan <rmh@aybabtu.com>
979
980 * kern/file.c (grub_file_open): Do not account previous failures of
981 unrelated functions when grub_errno is checked for.
982 Reported by Oleg Strikov.
983
bac332a1 9842008-01-24 Bean <bean123ch@gmail.com>
985
986 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
987 (grub_ufs_sblock): New member volume name.
988 (grub_ufs_find_file): Fix string copy bug.
989 (grub_ufs_label): Implement this function properly.
990
991 * fs/hfs.c (grub_hfs_cnid_type): New enum.
992 (grub_hfs_iterate_records): Use the correct file number for extents
993 and catalog file. Fix problem in next index calculation.
994 (grub_hfs_find_node): Replace recursive function call with loop.
995 (grub_hfs_iterate_dir): Replace recursive function call with loop.
996
15c80c09 9972008-01-23 Robert Millan <rmh@aybabtu.com>
998
999 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
1000 `<grub/symbol.h>' and `<grub/multiboot.h>'.
1001 (grub_multiboot2_real_boot): New function prototype.
1002
1003 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
1004 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
1005
1006 * kern/i386/ieee1275/init.c (grub_os_area_addr)
1007 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
1008
305338fd 10092008-01-23 Robert Millan <rmh@aybabtu.com>
1010
1011 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
1012 #ifdef'ed out grub_printf().
1013
3ea52685 10142008-01-23 Robert Millan <rmh@aybabtu.com>
1015
1016 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
1017 grub_dprintf calls, since they make "debug=all" mode unusable.
1018 (grub_console_checkkey): Likewise.
1019
5882ae4b 10202008-01-23 Robert Millan <rmh@aybabtu.com>
1021
1022 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1023 `term/i386/pc/at_keyboard.c'.
1024 (pkglib_MODULES): Add `serial.mod'.
1025 (serial_mod_SOURCES): New variable.
1026 (serial_mod_CFLAGS): Likewise.
1027 (serial_mod_LDFLAGS): Likewise.
1028
1029 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
1030 `<grub/powerpc/ieee1275/console.h>'.
1031 (grub_keyboard_controller_init): New function prototype.
1032 (grub_console_checkkey): Likewise.
1033 (grub_console_getkey): Likewise.
1034
1035 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
1036 keyboard on i386.
1037
1038 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
1039 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
1040
06ab5303 10412008-01-23 Robert Millan <rmh@aybabtu.com>
1042
1043 * kern/i386/pc/init.c (make_install_device): When memdisk image is
1044 present, "(memdisk)/boot/grub" becomes the default prefix.
1045
1046 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
1047 a memdisk tarball with all the modules. Add --overlay=DIR option that
1048 allows users to overlay additional files into the image.
1049
dbb475a4 10502008-01-23 Robert Millan <rmh@aybabtu.com>
1051
1052 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1053 and `machine/memory.h'.
1054 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1055 (_multiboot_mod_SOURCES): New variable.
1056 (_multiboot_mod_CFLAGS): Likewise.
1057 (_multiboot_mod_LDFLAGS): Likewise.
1058 (multiboot_mod_SOURCES): Likewise.
1059 (multiboot_mod_CFLAGS): Likewise.
1060 (multiboot_mod_LDFLAGS): Likewise.
1061
1062 * include/grub/i386/ieee1275/loader.h: New file.
1063
1064 * include/grub/i386/ieee1275/machine.h: Likewise.
1065
1066 * include/grub/i386/ieee1275/memory.h: Likewise.
1067
1068 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1069 variable declaration.
1070 (grub_os_area_size): Likewise.
1071
1072 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1073 (grub_lower_mem, grub_upper_mem): New variables.
1074 (grub_stop_floppy): New function (just to make
1075 grub_multiboot2_real_boot() happy).
1076
1077 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1078 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1079 (grub_stop): New function.
1080 Include `"../realmode.S"' and `"../loader.S"'.
1081
1082 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1083 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1084
1085 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1086 rely on grub_multiboot2_real_boot() for final boot.
1087
25638629 10882008-01-22 Robert Millan <rmh@aybabtu.com>
1089
1090 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1091 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1092 device that doesn't look like an SD card.
1093 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1094 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1095 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1096 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1097 found.
1098
9dad816d 10992008-01-22 Robert Millan <rmh@aybabtu.com>
1100
1101 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1102 avoid claiming over our own code.
1103
34842f2d 11042008-01-22 Bean <bean123ch@gmail.com>
1105
1106 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1107 (jpeg_mod_SOURCES): New variable.
1108 (jpeg_mod_CFLAGS): Likewise.
1109 (jpeg_mod_LDFLAGS): Likewise.
1110
1111 * video/readers/jpeg.c : New file.
1112
44023a28 11132008-01-22 Bean <bean123ch@gmail.com>
1114
1115 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1116 there are no more items.
1117
bc2d8ac6 11182008-01-21 Robert Millan <rmh@aybabtu.com>
1119
1120 * kern/mm.c (grub_mm_init_region): Improve debug message.
1121
261bd4bc 11222008-01-21 Robert Millan <rmh@aybabtu.com>
1123
1124 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1125 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1126 address.
1127 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1128 a C macro.
1129 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1130 Indicates start of upper memory.
1131 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1132 (generate_image): Abort when image size is big enough to corrupt
1133 upper memory.
1134
1135 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1136 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1137 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1138 instead of hardcoding 0xA0000.
1139 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1140 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1141 instead of hardcoding 0xA0000.
1142
f970b55e 11432008-01-21 Robert Millan <rmh@aybabtu.com>
1144
1145 * disk/memdisk.c (memdisk_size): New variable.
1146 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1147 `memdisk_size'.
1148 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
1149 image to dynamic memory.
1150 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1151 `memdisk_size'. Free memdisk block.
1152
1a8b0526 11532008-01-21 Robert Millan <rmh@aybabtu.com>
1154
1155 Fix detection of very small filesystems (like tar).
1156
1157 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1158 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1159 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1160 a problem with this disk).
1161
6e9b4aab 11622008-01-21 Robert Millan <rmh@aybabtu.com>
1163
1164 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1165 on grub_biosdisk_rw_standard() error.
1166
0d8837b2 11672008-01-21 Robert Millan <rmh@aybabtu.com>
1168
1169 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1170 recent changes.
1171 * kern/elf.c: Likewise.
1172 * kern/ieee1275/ieee1275.c: Likewise.
1173 * kern/powerpc/ieee1275/openfw.c: Likewise.
1174 * term/ieee1275/ofconsole.c: Likewise.
1175
ffd36e34 11762008-01-21 Robert Millan <rmh@aybabtu.com>
1177
1178 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
1179
3f0093d0 1180 * include/grub/kernel.h (grub_arch_memdisk_addr)
1181 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 1182
3f0093d0 1183 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
1184 (grub_arch_memdisk_size): ... to here.
ffd36e34 1185
6c391b21 11862008-01-21 Robert Millan <rmh@aybabtu.com>
1187
1188 Mostly based on bugfix from Bean.
1189
1190 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
1191 attribute with hook() parameter.
1192 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
1193 declaration.
1194 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
1195 attribute with hook() parameter.
1196 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
1197 declaration.
1198
55a581dc 11992008-01-21 Robert Millan <rmh@aybabtu.com>
1200
1201 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
1202 (pkglib_MODULES): Add `memdisk.mod'.
1203 (memdisk_mod_SOURCES): New variable.
1204 (memdisk_mod_CFLAGS): Likewise.
1205 (memdisk_mod_LDFLAGS): Likewise.
1206
1207 * disk/memdisk.c: New file.
1208
1209 * include/grub/disk.h (grub_disk_dev_id): Add
1210 `GRUB_DISK_DEVICE_MEMDISK_ID'.
1211
1212 * include/grub/i386/pc/kernel.h
1213 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
1214 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
1215 (grub_kernel_image_size): New variable declaration.
1216 (grub_total_module_size): Likewise.
1217 (grub_memdisk_image_size): Likewise.
1218
1219 * include/grub/i386/pc/memory.h
1220 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
1221
1222 * include/grub/kernel.h: Include `<grub/symbol.h>'.
1223 (grub_arch_memdisk_addr): New variable declaration.
1224 (grub_arch_memdisk_size): Likewise.
1225
1226 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
1227 (grub_arch_memdisk_size): Likewise.
1228
1229 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
1230 (codestart): Replace hardcoded `0x100000' with
1231 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
1232
1233 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
1234 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
1235 not NULL, append the contents of the file it refers to, at the end of
1236 the compressed kernel image. Initialize `grub_memdisk_image_size'
1237 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
1238 (options): Add "memdisk"|'m' option.
1239 (main): Parse --memdisk|-m option, and pass user-provided path as
1240 parameter to generate_image().
1241
3d7f54c9 12422008-01-20 Robert Millan <rmh@aybabtu.com>
1243
1244 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
1245 grub_dprintf() calls from here ...
1246 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
1247
0bf74728 12482008-01-20 Robert Millan <rmh@aybabtu.com>
1249
1250 Fix detection of "real mode" when /options/real-mode? doesn't exist.
1251
1252 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
1253 declaration.
1254 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
1255 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
1256 `GRUB_IEEE1275_FLAG_REAL_MODE'.
1257 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
1258 property).
1259 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
1260 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
1261
33bf70a7 12622008-01-19 Robert Millan <rmh@aybabtu.com>
1263
1264 Get rid of confusing function (superceeded by
1265 `grub_ieee1275_get_integer_property')
1266 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
1267 prototype.
1268 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
1269 function.
1270 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
1271 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
1272 in native endianess from grub_ieee1275_get_integer_property().
1273
e2da7d26 12742008-01-19 Robert Millan <rmh@aybabtu.com>
1275
1276 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
1277 command after "shut-down", since implementations differ on which
1278 the command for halt is.
1279
59f1fd8d 12802008-01-19 Robert Millan <rmh@aybabtu.com>
1281
1282 * include/grub/i386/linuxbios/console.h: Add header protection.
1283 (grub_keyboard_controller_init): New function prototype.
1284 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
1285 (KEYBOARD_COMMAND_READ): Likewise.
1286 (KEYBOARD_COMMAND_WRITE): Likewise.
1287 (KEYBOARD_SCANCODE_SET1): Likewise.
1288 (grub_keyboard_controller_write): New function.
1289 (grub_keyboard_controller_read): Likewise.
1290 (grub_keyboard_controller_init): Likewise.
1291
1292 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
1293 (grub_console_init): On coreboot/LinuxBIOS, call
1294 grub_keyboard_controller_init().
1295
5f5a7c15 12962008-01-19 Robert Millan <rmh@aybabtu.com>
1297
1298 PowerPC changes provided by Pavel Roskin.
1299
1300 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
1301 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
1302 don't rely on cmain() doing it.
1303 * kern/i386/ieee1275/startup.S (_start): Store %eax in
1304 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
1305
1210e168 13062008-01-16 Robert Millan <rmh@aybabtu.com>
1307
1308 * include/grub/i386/linuxbios/memory.h
1309 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
1310 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
1311 receive `table_header' as argument. Instead, probe for it in the
1312 known memory ranges where it can be present.
1313 (grub_available_iterate): Do not pass a fixed `table_header' address
1314 to grub_linuxbios_table_iterate().
1315
3d04eab8 13162008-01-15 Robert Millan <rmh@aybabtu.com>
1317
1318 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
1319 * conf/i386-ieee1275.rmk: New file.
1320 * include/grub/i386/ieee1275/console.h: Likewise.
1321 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
1322 * include/grub/i386/ieee1275/kernel.h: Likewise.
1323 * include/grub/i386/ieee1275/time.h: Likewise.
1324 * kern/i386/ieee1275/init.c: Likewise.
1325 * kern/i386/ieee1275/startup.S: Likewise.
1326
d1bc1b73 13272008-01-15 Robert Millan <rmh@aybabtu.com>
1328
1329 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
1330 when pointers are 32-bit (but still do set it to one when they are
1331 64-bit).
1332
66a65807 13332008-01-15 Robert Millan <rmh@aybabtu.com>
1334
1335 * include/grub/ieee1275/ieee1275.h
1336 (grub_ieee1275_get_integer_property): New function prototype.
1337
1338 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
1339 (grub_ieee1275_get_integer_property): New function. Wraps around
1340 grub_ieee1275_get_property() to handle endianess.
1341
1342 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
1343 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
1344 where appropiate.
1345 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
1346 (grub_map): Likewise.
1347 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
1348
a83ccafd 13492008-01-15 Bean <bean123ch@gmail.com>
1350
1351 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
1352 (grub_script_execute_cmdline): Reset grub_errno.
1353
1354 * normal/main.c (read_config_file): Reset grub_errno.
1355
1356 * normal/parse.y (script_init): New.
1357 (script): Move function and menuentry here.
1358 (delimiter): New.
1359 (command): Add delimiter at the end of command.
1360 (commands): Adjust to match the new command.
1361 (commandblock): Remove grub_script_lexer_record_start.
1362 (menuentry): Add grub_script_lexer_record_start, use the new commands.
1363 (if): Use the new commands.
1364
1365 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
1366
df6ecfc6 13672008-01-15 Robert Millan <rmh@aybabtu.com>
1368
1369 * normal/menu.c (run_menu): Move timeout message from here ...
1370 (print_timeout): ... to here.
1371 (run_menu): Use print_timeout() once during initial draw to print
1372 the whole message, and again in every clock tick to update only
1373 the number of seconds.
1374
87ae25eb 13752008-01-15 Robert Millan <rmh@aybabtu.com>
1376
1377 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
1378 actual size of `available' from grub_ieee1275_get_property(), and
1379 restrict parsing to that bound.
1380
47bf09a4 13812008-01-15 Christian Franke <franke@computer.org>
1382
1383 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
1384 (argp_program_version): Remove variable.
1385 (argp_program_bug_address): Likewise.
1386 (options): Convert from struct argp_option to struct option.
1387 (struct arguments): Remove.
1388 (parse_opt): Remove.
1389 (usage): New function.
1390 (main): Replace struct args members by simple variables.
1391 Replace argp_parse() by getopt_long().
1392 Add switch to evaluate options.
1393 Add missing "(...)" around root_dev in prefix string.
1394
c86f1469 13952008-01-14 Robert Millan <rmh@aybabtu.com>
1396
1397 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
1398 for grub_ieee1275_exit(), in order to improve portability.
1399
e622c559 14002008-01-14 Robert Millan <rmh@aybabtu.com>
1401
1402 * util/grub.d/10_linux.in (prefix): Define.
1403 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
1404
44cb1ec8 14052008-01-13 Pavel Roskin <proski@gnu.org>
1406
1407 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
1408 grub_errno if no errors have been detected.
1409
1eb8c802 14102008-01-12 Robert Millan <rmh@aybabtu.com>
1411
1412 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
1413 (grub_util_get_dev_abstraction): New function prototype.
1414
1415 * util/getroot.c: Include `<grub/util/getroot.h>'
1416 (grub_util_get_grub_dev): Move detection of abstraction type to ...
1417 (grub_util_get_dev_abstraction): ... here (new function).
1418
1419 * util/grub-probe.c: Convert PRINT_* to an enum. Add
1420 `PRINT_ABSTRACTION'.
1421 (probe): Probe for abstraction type when requested.
1422 (main): Understand `--target=abstraction'.
1423
1424 * util/i386/efi/grub-install.in: Add abstraction module to core
1425 image when it is found to be necessary.
1426 * util/i386/pc/grub-install.in: Likewise.
1427 * util/powerpc/ieee1275/grub-install.in: Likewise.
1428
1429 * util/update-grub_lib.in (font_path): Return system path without
1430 converting to GRUB path.
1431 * util/update-grub.in: Convert system path returned by font_path()
1432 to a GRUB path. Use `grub-probe -t abstraction' to determine what
1433 abstraction module is needed for loading fonts (if any). Export
1434 that as `GRUB_PRELOAD_MODULES'.
1435 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
1436 insmod commands).
1437
52bd3de9 14382008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
1439
1440 Remove some unused code from reiserfs.
1441
1442 * fs/reiserfs.c (struct grub_reiserfs_key)
1443 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
1444 (struct grub_reiserfs_node_body): Removed.
1445 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1446 Likewise.
1447 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1448 Likewise.
1449 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1450 Likewise.
1451 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1452 Likewise.
1453 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1454 Likewise.
1455 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
1456 Likewise.
1457 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1458 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1459 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1460
2f80039d 14612008-01-10 Robert Millan <rmh@aybabtu.com>
1462
1463 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
1464 Determines if a file is garbage left by packaging systems, etc.
1465 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
1466 for processing /etc/grub.d scripts.
1467 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
1468 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
1469 as a condition for processing Linux images.
1470
87888032 14712008-01-10 Pavel Roskin <proski@gnu.org>
1472
1473 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
1474 to compile reiserfs.c on PowerPC.
1475
7e54fced 14762008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 1477
1478 * kern/device.c (grub_device_iterate): Do not abort device iteration
1479 when one of the devices cannot be opened.
1480 * kern/disk.c (grub_disk_open): Do not account previous failures of
1481 unrelated functions when grub_errno is checked for.
1482
5aa541e6 14832008-01-08 Robert Millan <rmh@aybabtu.com>
1484
1485 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
1486 `! grub_linux_is_bzimage', change order of address comparison to make
1487 it more intuitive, and improve "too big zImage" error message.
1488
7076340d 14892008-01-08 Robert Millan <rmh@aybabtu.com>
1490
1491 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
1492 `$(update-grub_DATA)'.
1493 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
1494 targets.
1495
9ca70333 14962008-01-07 Robert Millan <rmh@aybabtu.com>
1497
1498 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
1499 which instruction is modified by grub-setup during installation
1500 (since it wasn't obvious by only looking at this file).
1501
38ccf575 15022008-01-07 Robert Millan <rmh@aybabtu.com>
1503
1504 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
1505 listing actual TODO items.
1506
f5db4291 15072008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1508
868967cf 1509 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
1510 correctly.
1511 (grub_reiserfs_get_key_offset): Likewise.
1512 (grub_reiserfs_set_key_offset): Likewise.
1513 (grub_reiserfs_set_key_type): Likewise.
1514 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
1515
1516 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
1517 better to remove the bitfield version completely.
1518
15192008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1520
f5db4291 1521 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
1522 allocated from the heap, due to the fshelp implementation.
1523 (grub_reiserfs_dir): Free NODE, due to the same reason.
1524
492e6d9d 15252008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1526
1527 Mostly from Vincent Pelletier:
1528
1529 * fs/reiserfs.c: New file.
1530
1531 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
1532 (reiserfs_mod_SOURCES): New variable.
1533 (reiserfs_mod_CFLAGS): Likewise.
1534 (reiserfs_mod_LDFLAGS): Likewise.
1535
1536 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
1537 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
1538 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
1539 normal/color.c.
1540
9ce3e7c1 15412008-01-06 Robert Millan <rmh@aybabtu.com>
1542
1543 * normal/color.c: Remove `<grub/env.h>'.
1544
f3b58148 15452008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
1546
1547 * include/grub/normal.h: Include <grub/env.h>.
1548
7ac3bcfa 15492008-01-05 Robert Millan <rmh@aybabtu.com>
1550
1551 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
1552 usage example with `(hd0,1)'.
fb358190 1553 Reported by Samuel Thibault.
7ac3bcfa 1554
c8ee99d7 15552008-01-05 Robert Millan <rmh@aybabtu.com>
1556
1557 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
1558 (grub_linux_boot_zimage): Rename to ...
1559 (grub_linux_boot): ... this.
1560 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
1561 (grub_linux_boot_zimage): Conditionalize zImage copy.
1562
1563 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
1564 (grub_linux_boot_bzimage): Remove prototype.
1565 (grub_linux_boot_zimage): Rename to ...
1566 (grub_linux_boot): ... this.
1567
1568 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
1569 (grub_linux_boot): Remove function.
1570
0ece25b1 15712008-01-05 Robert Millan <rmh@aybabtu.com>
1572
1573 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
1574 (grub_env_write_color_highlight): Likewise.
1575 (grub_wait_after_message): Likewise.
1576
1577 * normal/color.c: New file.
1578
1579 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1580 (normal_mod_DEPENDENCIES): Likewise.
1581
1582 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1583 (normal_mod_DEPENDENCIES): Likewise.
1584
1585 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1586 (normal_mod_DEPENDENCIES): Likewise.
1587
1588 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1589 (normal_mod_DEPENDENCIES): Likewise.
1590
1591 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
1592 for waiting after a message is printed.
1593 * normal/main.c (read_config_file): Likewise.
1594 (grub_normal_init): Register grub_env_write_color_normal() and
1595 grub_env_write_color_highlight() hooks. Mark `color_normal' and
1596 `color_highlight' variables as global.
1597
1598 * normal/menu.c (grub_wait_after_message): New function.
1599 (grub_color_menu_normal): New variable. Replaces ...
1600 (GRUB_COLOR_MENU_NORMAL): ... this macro.
1601 (grub_color_menu_highlight): New variable. Replaces ...
1602 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
1603 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
1604 `GRUB_TERM_COLOR_STANDARD'.
1605 (print_message): Use `grub_setcolorstate' to reload colors. Rename
1606 `normal_code' and `highlight_code' to `old_color_normal' and
1607 `old_color_highlight', respectively.
1608 (grub_menu_init_page): Update colors when drawing the menu, based on
1609 `menu_color_normal' and `menu_color_highlight' variables.
1610 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
1611 a message is printed.
1612
182dd4e5 16132008-01-05 Robert Millan <rmh@aybabtu.com>
1614
1615 * kern/env.c (grub_env_context_open): Propagate hooks for global
1616 variables to new context.
1617
1618 * kern/main.c (grub_set_root_dev): Export `root' variable.
1619
ddf8f6ad 16202008-01-05 Robert Millan <rmh@aybabtu.com>
1621
1622 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
1623 discs unconditionaly, since udev and others have options to provide
1624 them.
1625
d8b43d9b 16262008-01-05 Robert Millan <rmh@aybabtu.com>
1627
1628 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
1629
2bff2de3 16302008-01-04 Christian Franke <franke@computer.org>
1631
1632 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
1633 of eisa_mmap.
1634
97eab917 16352008-01-03 Pavel Roskin <proski@gnu.org>
1636
1637 * kern/i386/linuxbios/init.c: Put "void" to all function
1638 declarations with no arguments.
1639 * kern/powerpc/ieee1275/init.c: Likewise.
1640 * term/i386/pc/at_keyboard.c: Likewise.
1641 * term/i386/pc/vga_text.c: Likewise.
1642 * util/grub-mkdevicemap.c: Likewise.
1643
b9416d00 16442008-01-02 Robert Millan <rmh@aybabtu.com>
1645
1646 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
1647 message when loaded image is out of bounds.
1648 (grub_multiboot_load_elf64): Likewise.
1649
92695df9 16502008-01-02 Pavel Roskin <proski@gnu.org>
1651
1652 * util/grub.d/10_linux.in: Try version without ".old" when
1653 looking for initrd. It's better to use initrd from the newer
1654 kernel of the same version than no initrd at all.
1655
d98d9cad 16562008-01-01 Robert Millan <rmh@aybabtu.com>
1657
1658 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
1659
dbfdce36 16602008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
1661
1662 * include/grub/video.h: Added grub_video_unmap_color and
1663 grub_video_get_active_render_target.
1664 (grub_video_adapter): Added unmap_color and get_active_render_target.
1665
1666 * video/video.c: Added grub_video_unmap_color and
1667 grub_video_get_active_render_target.
1668 (grub_video_get_info): Changed method to accept NULL pointer as an
1669 argument to allow detection of active video adapter.
1670
1671 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
1672 grub_video_vbe_unmap_color_int.
1673 Added grub_video_vbe_unmap_color and
1674 grub_video_vbe_get_active_render_target.
1675 (grub_video_vbe_adapter): Added unmap_color and
1676 get_active_render_target.
1677
1678 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
1679 with grub_video_vbe_unmap_color_int.
1680
1681 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
1682 (DEFAULT_NORMAL_COLOR): Likewise.
1683 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
1684 (DEFAULT_FG_COLOR): Removed.
1685 (DEFAULT_BG_COLOR): Likewise.
1686 (DEFAULT_CURSOR_COLOR): Changed value.
1687 (grub_virtual_screen): Added standard_color_setting,
1688 normal_color_setting, highlight_color_setting and term_color.
1689 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
1690 (bitmap_width): Added.
1691 (bitmap_height): Likewise.
1692 (bitmap): Likewise.
1693 (set_term_color): Likewise.
1694 (grub_virtual_screen_setup): Changed to use new terminal coloring
1695 settings.
1696 (grub_gfxterm_init): Added init for bitmap.
1697 (grub_gfxterm_fini): Added destroy for bitmap.
1698 (redraw_screen_rect): Updated to use background bitmap and new
1699 terminal coloring.
1700 (scroll_up): Added optimization for case when there is no bitmap.
1701 (grub_gfxterm_cls): Fixed to use correct background color.
1702 (grub_virtual_screen_setcolorstate): Changed to use new terminal
1703 coloring.
1704 (grub_virtual_screen_setcolor): Likewise.
1705 (grub_virtual_screen_getcolor): Added.
1706 (grub_gfxterm_background_image_cmd): Likewise.
1707 (grub_video_term): Added setcolor and getcolor.
1708 (MOD_INIT): Added registration of background_image command.
1709 (MOD_TERM): Added unregistration for background_image command.
1710
c3c20931 17112007-12-30 Pavel Roskin <proski@gnu.org>
1712
1713 * loader/multiboot_loader.c: Fix multiboot command
1714 unregistration. Fix all typos in the word "multiboot".
1715
df266716 17162007-12-29 Pavel Roskin <proski@gnu.org>
94239199 1717
1718 * util/grub.d/10_linux.in: Refactor search for initrd. Add
1719 support for initrd names used in Fedora.
1720
fc6e896c 17212007-12-26 Bean <bean123ch@gmail.com>
1722
1723 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
1724 (cpio_mod_SOURCES): New variable.
1725 (cpio_mod_CFLAGS): Likewise.
1726 (cpio_mod_LDFLAGS): Likewise.
1727
1728 * fs/cpio.c: New file.
1729
1730 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
1731
1732 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1733
1734 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1735
1736 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1737
533110ad 17382007-12-25 Robert Millan <rmh@aybabtu.com>
1739
1740 * include/grub/term.h (struct grub_term): Add `getcolor' function.
1741 (grub_getcolor): New function.
1742
1743 * kern/term.c (grub_getcolor): New function.
1744 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
1745 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
1746 (print_entry): Set normal and highlight colors to
1747 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
1748 respectively, before printing and restore them to old
1749 values afterwards.
1750 (grub_menu_init_page): Likewise. Fill an additional colored space
1751 that would otherwise be left blank.
1752
1753 * term/efi/console.c (grub_console_getcolor): New function.
1754 (struct grub_console_term.getcolor): New variable.
1755 * term/i386/pc/console.c (grub_console_getcolor): New function.
1756 (struct grub_console_term.getcolor): New variable.
1757 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
1758 (struct grub_console_term.getcolor): New variable.
1759
1760 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
1761 (struct grub_console_term.setcolor): Remove variable.
1762 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
1763 (struct grub_console_term.setcolor): Remove variable.
1764 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
1765 (struct grub_console_term.setcolor): Remove variable.
1766 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
1767 (struct grub_console_term.setcolor): Remove variable.
1768
4931827f 17692007-12-25 Robert Millan <rmh@aybabtu.com>
1770
1771 * configure.ac: Search for possible unifont.hex locations, and
1772 define UNIFONT_HEX if found.
1773
1774 * Makefile.in (UNIFONT_HEX): Define variable.
1775 (DATA): Rename to ...
1776 (PKGLIB): ... this. Update all users.
1777 (PKGDATA): New variable.
1778 (pkgdata_IMAGES): Rename to ...
1779 (pkglib_IMAGES): ... this. Update all users.
1780 (pkgdata_MODULES): Rename to ...
1781 (pkglib_MODULES): ... this. Update all users.
1782 (pkgdata_PROGRAMS): Rename to ...
1783 (pkglib_PROGRAMS): ... this. Update all users.
1784 (pkgdata_DATA): Rename to ...
1785 (pkglib_DATA): ... this. Update all users.
1786 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
1787 (unicode.pff, ascii.pff): New rules.
1788 (all-local): Add `$(PKGDATA)' dependency.
1789 (install-local): Process `$(PKGDATA)'.
1790
1791 * util/update-grub_lib.in (font_path): Search for *.pff files in
1792 a few more locations, including `${pkgdata}'.
1793
57e57e31 17942007-12-23 Robert Millan <rmh@aybabtu.com>
1795
1796 Patch from Bean <bean123ch@gmail.com>:
1797 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
1798 `size'.
1799
4bc72aa9 18002007-12-21 Bean <bean123ch@gmail.com>
1801
1802 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
1803 (ntfscomp_mod_SOURCES): New variable.
1804 (ntfscomp_mod_CFLAGS): Likewise.
1805 (ntfscomp_mod_LDFLAGS): Likewise.
1806
1807 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
1808 (grub_probe_SOURCES): Likewise.
1809 (grub_emu_SOURCES): Likewise.
1810
1811 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1812 (grub_emu_SOURCES): Likewise.
1813
1814 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1815 (grub_emu_SOURCES): Likewise.
1816
1817 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
1818 (grub_emu_SOURCES): Likewise.
1819
1820 * fs/ntfs.c (grub_ntfscomp_func): New variable.
1821 (read_run_list): Renamed to grub_ntfs_read_run_list.
1822 (decomp_nextvcn): Moved to ntfscomp.c.
1823 (decomp_getch): Likewise.
1824 (decomp_get16): Likewise.
1825 (decomp_block): Likewise.
1826 (read_block): Likewise.
1827 (read_data): Partially moved to ntfscomp.c.
1828 (fixup): Change unsigned to grub_uint16_t.
1829 (read_mft): Change unsigned long to grub_uint32_t.
1830 (read_attr): Likewise.
1831 (read_data): Likewise.
1832 (read_run_data): Likewise.
1833 (read_run_list): Likewise.
1834 (read_mft): Likewise.
1835
1836 * fs/ntfscomp.c: New file.
1837
1838 * include/grub/ntfs.h: New file.
1839
af680a87 18402007-12-16 Robert Millan <rmh@aybabtu.com>
1841
1842 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
1843 IDE disk check, since Linux is known to support 20 IDE disks.
1844 Reported by Colin Watson.
1845
84be7599 18462007-12-15 Bean <bean123ch@gmail.com>
1847
1848 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
1849 (lnxboot_img_SOURCES): New variable.
1850 (lnxboot_img_ASFLAGS): Likewise.
1851 (lnxboot_img_LDFLAGS): Likewise.
1852
1853 * boot/i386/pc/lnxboot.S: New file.
1854
6af9db01 18552007-11-24 Pavel Roskin <proski@gnu.org>
1856
1857 * configure.ac: Test if '--build-id=none' is supported by the
1858 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
1859 objcopy to generate incorrect binary files (binutils
1860 2.17.50.0.18-1 as shipped by Fedora 8).
1861 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
1862 linking, so that build ID doesn't break the test.
1863
7361cfe6 18642007-11-24 Pavel Roskin <proski@gnu.org>
1865
1866 * include/grub/i386/time.h: use "void" in the argument list
1867 of grub_cpu_idle().
1868 * include/grub/powerpc/time.h: Likewise.
1869 * include/grub/sparc64/time.h: Likewise.
1870
1593e10c 18712007-11-18 Christian Franke <franke@computer.org>
1872
1873 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
1874 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
1875 This fixes the problem that function keys did not work in grub-emu.
1876
3b8db1a8 18772007-11-18 Christian Franke <franke@computer.org>
1878
1879 * disk/host.c (grub_host_open): Remove attribute unused from
1880 name parameter. Add check for "host". This fixes the problem
1881 that grub-emu does not find partitions.
1882
2e29408d 18832007-11-18 Christian Franke <franke@computer.org>
1884
1885 * util/hostfs.c (is_dir): New function.
1886 (grub_hostfs_dir): Handle missing dirent.d_type case.
1887 (grub_hostfs_read): Add missing fseek().
1888 (grub_hostfs_label): Clear label pointer. This fixes a crash
1889 of grub-emu on "ls (host)".
1890
398cd047 18912007-11-18 Christian Franke <franke@computer.org>
1892
1893 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
1894 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
1895 to 64 bit boundary by default.
1896
c405c391 18972007-11-18 Bean <bean123ch@gmail.com>
1898
1899 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
1900 (hexdump_mod_SOURCES): New variable.
1901 (hexdump_mod_CFLAGS): Likewise.
1902 (hexdump_mod_LDFLAGS): Likewise.
1903
1904 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1905
1906 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1907
1908 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1909
1910 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1911
1912 * include/grub/hexdump.h: New file.
1913
1914 * commands/hexdump.c: New file.
1915
5cced7fd 19162007-11-10 Robert Millan <rmh@aybabtu.com>
1917
1918 * commands/i386/pc/play.c (beep_off): Switch order of arguments
1919 in grub_outb() calls.
1920 (beep_on): Likewise.
1921
8b714eb0 19222007-11-10 Christian Franke <franke@computer.org>
1923
1924 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
1925 (grub_menu_run): Likewise.
1926
ce0f1839 19272007-11-10 Robert Millan <rmh@aybabtu.com>
1928
1929 * include/grub/i386/efi/machine.h: New file.
1930 * include/grub/i386/linuxbios/machine.h: Likewise.
1931 * include/grub/i386/pc/machine.h: Likewise.
1932 * include/grub/powerpc/ieee1275/machine.h: Likewise.
1933 * include/grub/sparc64/ieee1275/machine.h: Likewise.
1934
1935 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
1936 (serial_hw_io_addr): New variable.
1937 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
1938 instead of `(unsigned short *) 0x400'.
1939
270c237d 19402007-11-10 Bean <bean123ch@gmail.com>
1941
1942 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
1943
a87783bf 19442007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
1945
1946 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
1947 (vga_mod_SOURCES): Added.
1948 (vga_mod_CFLAGS): Likewise.
1949 (vga_mod_LDFLAGS): Likewise.
1950
1951 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
1952 grub_outb() calls.
1953 (set_map_mask): Likewise.
1954 (set_read_map): Likewise.
1955 (set_read_address): Likewise.
1956 (vga_font): Removed variable.
1957 (get_vga_glyph): Removed function.
1958 (invalidate_char): Likewise.
1959 (write_char): Changed to use grub_font_get_glyph() for font
1960 information.
1961 (grub_vga_putchar): Likewise.
1962 (grub_vga_getcharwidth): Likewise.
1963
6433b448 19642007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
1965
1966 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
1967 flags.
1968 (pxeboot_img_LDFLAGS): Likewise.
1969 (diskboot_img_LDFLAGS): Likewise.
1970 (kernel_img_LDFLAGS): Likewise.
1971
49178511 19722007-11-06 Robert Millan <rmh@aybabtu.com>
1973
1974 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
1975 in grub_outb() calls.
1976 (serial_hw_init): Likewise.
1977
53b052de 19782007-11-05 Robert Millan <rmh@aybabtu.com>
1979
1980 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
1981 spaces. Skip non-regular files.
1982
5ab33bba 19832007-11-05 Robert Millan <rmh@aybabtu.com>
1984
1985 * kern/disk.c (grub_disk_firmware_fini)
1986 (grub_disk_firmware_is_tainted): New variables.
1987
1988 * include/grub/disk.h (grub_disk_firmware_fini)
1989 (grub_disk_firmware_is_tainted): Likewise.
1990
1991 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
1992 (grub_disk_biosdisk_fini): ... to here.
1993 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
1994 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
1995 is set. Register grub_disk_biosdisk_fini() in
1996 `grub_disk_firmware_fini'.
1997
1998 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
1999 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
2000 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
2001 to finish existing firmware disk interface.
2002
2003 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
2004 (ata_mod_SOURCES): New variable.
2005 (ata_mod_CFLAGS): Likewise.
2006 (ata_mod_LDFLAGS): Likewise.
2007
0149ab7c 20082007-11-05 Robert Millan <rmh@aybabtu.com>
2009
2010 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
2011 (grub_ata_wait): Reimplement using grub_millisleep().
2012
2013 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
2014 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
2015
be7ac41e 20162007-11-03 Marco Gerards <marco@gnu.org>
2017
2018 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
2019 (CRTC_ADDR_PORT): New macro.
2020 (CRTC_DATA_PORT): Likewise.
2021 (CRTC_CURSOR): Likewise.
2022 (CRTC_CURSOR_ADDR_HIGH): Likewise.
2023 (CRTC_CURSOR_ADDR_LOW): Likewise.
2024 (update_cursor): New function.
2025 (grub_console_real_putchar): Call `update_cursor'.
2026 (grub_console_gotoxy): Likewise.
2027 (grub_console_cls): Set the default color when clearing the
2028 screen.
2029 (grub_console_setcursor): Implemented.
2030
bb06ab2e 20312007-11-03 Marco Gerards <marco@gnu.org>
2032
2033 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
2034 become activate.
2035 (grub_ata_pio_write): Likewise.
2036
2037 (grub_atapi_identify): Wait after issuing an ATA command.
2038 (grub_atapi_packet): Likewise.
2039 (grub_ata_identify): Likewise.
2040 (grub_ata_readwrite): Likewise.
2041
cf8f780b 20422007-11-03 Marco Gerards <marco@gnu.org>
2043
2044 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
2045 (grub_ata_pio_write): Likewise.
2046 (grub_ata_readwrite): Use `grub_error', instead of
2047 returning `grub_errno'.
2048
ed649e54 20492007-11-03 Marco Gerards <marco@gnu.org>
2050
2051 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2052 grub_ata_pio_write once for every single sector, instead of for
2053 multiple sectors.
2054
ca25d8f0 20552007-10-31 Robert Millan <rmh@aybabtu.com>
2056
2057 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2058
2059 * conf/i386-linuxbios.rmk: New file.
2060
2061 * kern/i386/pc/hardware.c: Likewise.
2062 * term/i386/pc/at_keyboard.c: Likewise.
2063 * term/i386/pc/vga_text.c: Likewise.
2064
2065 * include/grub/i386/linuxbios/boot.h: Likewise.
2066 * include/grub/i386/linuxbios/console.h: Likewise.
2067 * include/grub/i386/linuxbios/init.h: Likewise.
2068 * include/grub/i386/linuxbios/kernel.h: Likewise.
2069 * include/grub/i386/linuxbios/loader.h: Likewise.
2070 * include/grub/i386/linuxbios/memory.h: Likewise.
2071 * include/grub/i386/linuxbios/serial.h: Likewise.
2072 * include/grub/i386/linuxbios/time.h: Likewise.
2073
2074 * kern/i386/linuxbios/init.c: Likewise.
2075 * kern/i386/linuxbios/startup.S: Likewise.
2076 * kern/i386/linuxbios/table.c: Likewise.
2077
e911ecc1 20782007-10-31 Marco Gerards <marco@gnu.org>
2079
2080 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2081 (ata_mod_SOURCES): New variable.
2082 (ata_mod_CFLAGS): Likewise.
2083 (ata_mod_LDFLAGS): Likewise.
2084
2085 * disk/ata.c: New file.
2086
2087 * include/grub/disk.h (grub_disk_dev_id): Add
2088 `GRUB_DISK_DEV_ATA_ID'.
2089
7f66d0e0 20902007-10-31 Robert Millan <rmh@aybabtu.com>
2091
2092 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2093 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2094
2095 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2096 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2097
2098 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2099 `<grub/types.h>'.
2100
2101 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2102
5cd7dd46 21032007-10-27 Robert Millan <rmh@aybabtu.com>
2104
3236ca65 2105 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 2106
2ebfc90f 21072007-10-22 Robert Millan <rmh@aybabtu.com>
2108
2109 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
2110 `"../realmode.S"'.
2111 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
2112
73fcb0f3 21132007-10-22 Robert Millan <rmh@aybabtu.com>
2114
2115 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2116 (pkgdata_MODULES): Add `biosdisk.mod'.
2117 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2118 variables.
2119
2120 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2121 (grub_biosdisk_init): Replace with ...
2122 (GRUB_MOD_INIT(biosdisk)): ... this.
2123 (grub_biosdisk_fini): Replace with ...
2124 (GRUB_MOD_FINI(biosdisk)): ... this.
2125
2126 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2127 (grub_machine_init): Remove call to grub_biosdisk_init().
2128 (grub_machine_fini): Remove call to grub_machine_fini().
2129
2130 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2131
3381d274 21322007-10-22 Robert Millan <rmh@aybabtu.com>
2133
2134 * include/grub/time.h: New file.
2135 * include/grub/i386/time.h: Likewise.
2136 * include/grub/powerpc/time.h: Likewise.
2137 * include/grub/sparc64/time.h: Likewise.
2138
2139 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2140 instances to ...
2141 (KERNEL_MACHINE_TIME_HEADER): ... this.
2142 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2143 instances to ...
2144 (KERNEL_MACHINE_TIME_HEADER): ... this.
2145 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2146 instances to ...
2147 (KERNEL_MACHINE_TIME_HEADER): ... this.
2148
2149 * kern/i386/efi/init.c: Include `<grub/time.h>'.
2150 (grub_millisleep): New function.
2151 * kern/i386/pc/init.c: Include `<grub/time.h>'.
2152 (grub_millisleep): New function.
2153 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2154 Remove `grub/machine/time.h' include.
2155 (grub_millisleep): New function.
2156 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2157 Remove `grub/machine/time.h' include.
2158 (grub_millisleep): New function.
2159
2160 * include/grub/misc.h (grub_div_roundup): New function.
2161
2162 * kern/misc.c: Include `<grub/time.h>'.
2163 (grub_millisleep_generic): New function.
2164
2165 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2166 Add `time.h'.
2167 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2168 Add `time.h'.
2169 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2170 `machine/time.h'. Add `time.h'.
2171 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2172
a39a0312 21732007-10-21 Robert Millan <rmh@aybabtu.com>
2174
2175 * include/grub/misc.h (grub_max): New function.
2176
2aad70e2 21772007-10-21 Robert Millan <rmh@aybabtu.com>
2178
2179 * util/misc.c (grub_util_info): Call fflush() before returning.
2180
54b71c4b 21812007-10-20 Robert Millan <rmh@aybabtu.com>
2182
2183 * genmk.rb (Image): Copy `extra_flags' from here ...
2184 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
2185
2186 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
2187 to `argc' and `args' arguments.
2188
a979f513 21892007-10-17 Robert Millan <rmh@aybabtu.com>
2190
2191 * kern/i386/loader.S: New file.
2192
2193 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
2194 * kern/i386/loader.S (grub_linux_prot_size)... to here.
2195 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
2196 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
2197 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
2198 * kern/i386/loader.S (grub_linux_real_addr)... to here.
2199 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
2200 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
2201 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
2202 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
2203 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
2204 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
2205 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
2206 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
2207
2208 * kern/i386/realmode.S: New file.
2209
2210 * kern/i386/pc/startup.S (protstack): Moved from here ...
2211 * kern/i386/realmode.S (protstack)... to here.
2212 * kern/i386/pc/startup.S (gdt): Moved from here ...
2213 * kern/i386/realmode.S (gdt)... to here.
2214 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
2215 * kern/i386/realmode.S (prot_to_real)... to here.
2216
2217 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
2218 `kern/i386/realmode.S'.
2219
825fc8fd 22202007-10-17 Robert Millan <rmh@aybabtu.com>
2221
2222 * include/grub/i386/loader.h: New file.
2223
2224 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
2225 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2226 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2227 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2228 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
2229 * include/grub/i386/loader.h (grub_linux_prot_size)
2230 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2231 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2232 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2233 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
2234
2235 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
2236
e179b2f4 22372007-10-15 Robert Millan <rmh@aybabtu.com>
2238
2239 * normal/misc.c (grub_normal_print_device_info): Do not probe for
2240 filesystem when dev->disk is unset.
2241 Do probe for filesystem even when dev->disk->has_partitions is set.
2242 In case a filesystem is found, always report it.
2243 In case it isn't, if dev->disk->has_partitions is set, report that
2244 a partition table was found instead of reporting that no filesystem
2245 could be identified.
2246
5db82af6 22472007-10-12 Robert Millan <rmh@aybabtu.com>
2248
2249 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
2250 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
2251
68f6ac74 2252 * include/grub/types.h (grub_host_to_target16): New macro.
2253 (grub_host_to_target32): Likewise.
2254 (grub_host_to_target64): Likewise.
2255 (grub_target_to_host16): Likewise.
2256 (grub_target_to_host32): Likewise.
2257 (grub_target_to_host64): Likewise.
5db82af6 2258
2259 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2260 Renamed from to ...
2261 (GRUB_MOD_ALIGN): ...this. Update all users.
2262
68f6ac74 2263 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
2264 grub_host_to_target32.
2265 Replace grub_be_to_cpu32 with grub_target_to_host32.
2266 (load_modules): Likewise.
2267 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
2268 Replace grub_be_to_cpu32 with grub_target_to_host32.
2269 Replace grub_cpu_to_be16 with grub_host_to_target16.
2270 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 2271
3cf497cc 22722007-10-12 Robert Millan <rmh@aybabtu.com>
2273
2274 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
2275 * util/elf/grub-mkimage.c: ... here.
2276
2277 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
2278 `util/powerpc/ieee1275/grub-mkimage.c'.
2279
c8cc3692 22802007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 2281
c8cc3692 2282 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
2283 and make it easier to figure out.
2284 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
2285 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
2286 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
2287 leave us with less than HEAP_MIN_SIZE total heap.
2288 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 2289
5c58b791 22902007-10-03 Robert Millan <rmh@aybabtu.com>
2291
2292 * include/grub/i386/io.h: New file.
2293 * commands/i386/pc/play.c (inb): Removed.
2294 (outb): Removed.
2295 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2296 with grub_outb().
afcd2ef8 2297 * term/i386/pc/serial.c (inb): Removed.
2298 (outb): Removed.
2299 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2300 with grub_outb().
2301 * term/i386/pc/vga.c (inb): Removed.
2302 (outb): Removed.
2303 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2304 with grub_outb().
5c58b791 2305
1a477ed6 23062007-10-02 Robert Millan <rmh@aybabtu.com>
2307
2308 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
2309 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2310 Reported by Marcin Kurek.
2311
6b5d80fa 23122007-09-07 Robert Millan <rmh@aybabtu.com>
2313
2314 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
2315 SmartFirmware version updates (as released by Sven Luther), and avoid
2316 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
2317 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
2318 known broken.
2319
5618afbf 23202007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2321
2322 From Hitoshi Ozeki:
2323 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
2324 when merging two regions.
2325
6139dcd9 23262007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2327
508e39ee 2328 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
2329 * normal/completion.c (grub_normal_do_completion): Likewise.
2330 Reported by Hitoshi Ozeki.
2331
23322007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2333
6139dcd9 2334 Do not use devices at boot in chainloading.
2335
2336 * loader/i386/pc/chainloader.c (boot_drive): New variable.
2337 (boot_part_addr): Likewise.
2338 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
2339 with BOOT_DRIVE and BOOT_PART_ADDR.
2340 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
2341 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
2342
38da6516 23432007-08-29 Robert Millan <rmh@aybabtu.com>
2344
2345 Patch from Simon Peter <dn.tlp@gmx.net>:
2346 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
2347 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
2348 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
2349 util/i386/pc/grub-setup.c_DEPENDENCIES.
2350 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
2351 util/grub-probe.c_DEPENDENCIES.
2352 * conf/powerpc-ieee1275.rmk: Likewise.
2353
29d0928c 23542007-08-28 Robert Millan <rmh@aybabtu.com>
2355
2356 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
2357 to tell grub-mkdevicemap how to name devices.
2358 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
2359 feature).
2360
2361 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
2362 util/i386/get_disk_name.c.
2363 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
2364 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
2365 util/ieee1275/get_disk_name.c.
2366
2367 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
2368
2369 * DISTLIST: Add util/i386/get_disk_name.c and
2370 util/ieee1275/get_disk_name.c.
2371
2372 * util/grub-mkdevicemap.c: Replace device naming logic with
2373 grub_util_get_disk_name() calls.
2374
5a0d3cca 23752007-08-20 Robert Millan <rmh@aybabtu.com>
2376
2377 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
2378 (so that it works for both plural and singular quantities).
2379
8b72db2f 23802007-08-05 Robert Millan <rmh@aybabtu.com>
2381
2382 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
2383 so that [xz] isn't taken into account when determining order.
2384
352466bf 23852007-08-02 Marco Gerards <marco@gnu.org>
2386
2387 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
2388 `include/multiboot2.h', `include/grub/elfload.h',
2389 `include/multiboot.h', `include/grub/multiboot.h',
2390 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
2391 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
2392 `kern/elf.c', `loader/multiboot_loader.c',
2393 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
2394 `loader/i386/pc/multiboot2.c',
2395 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
2396 `util/i386/pc/grub-mkrescue.in'. Remove
2397 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
2398 `include/grub/i386/pc/util/biosdisk.h' and
2399 `include/grub/powerpc/ieee1275/multiboot.h'.
2400
8f096014 24012007-08-02 Bean <bean123ch@gmail.com>
2402
2403 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
2404 (ntfs_mod_SOURCES): New variable.
2405 (ntfs_mod_CFLAGS): Likewise.
2406 (ntfs_mod_LDFLAGS): Likewise.
2407
2408 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
2409 (grub_probe_SOURCES): Likewise.
2410 (grub_emu_SOURCES): Likewise.
2411
2412 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2413 (grub_emu_SOURCES): Likewise.
2414
2415 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2416 (grub_emu_SOURCES): Likewise.
2417
2418 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
2419
2420 * fs/ntfs.c: New file.
2421
9959f7db 24222007-08-02 Bean <bean123ch@gmail.com>
2423
2424 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
2425
2426 * file.h (grub_file): Likewise.
2427
2428 * fshelp.h (grub_fshelp_read_file): Likewise.
2429
2430 * util/i386/pc/grub-setup.c (setup): Likewise.
2431 (save_first_sector): Likewise.
2432 (save_blocklists): Likewise.
2433
2434 * fs/affs.c (grub_affs_read_file): Likewise.
2435
2436 * fs/ext2.c (grub_ext2_read_file): Likewise.
2437
2438 * fs/fat.c (grub_fat_read_data): Likewise.
2439
2440 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
2441
2442 * fs/hfs.c (grub_hfs_read_file): Likewise.
2443
2444 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2445
2446 * fs/jfs.c (grub_jfs_read_file): Likewise.
2447
2448 * fs/minix.c (grub_minix_read_file): Likewise.
2449
2450 * fs/sfs.c (grub_sfs_read_file): Likewise.
2451
2452 * fs/ufs.c (grub_ufs_read_file): Likewise.
2453
2454 * fs/xfs.c (grub_xfs_read_file): Likewise.
2455
2456 * command/blocklist.c (read_blocklist): Likewise.
2457 (print_blocklist): Likewise.
2458
0a203f83 24592007-08-02 Marco Gerards <marco@gnu.org>
2460
2461 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
2462 `util/hostfs.c'.
2463
2464 * disk/host.c: New file.
2465
2466 * util/hostfs.c: Likewise.
2467
2468 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
2469 return `GRUB_ERR_BAD_FS'.
2470 * fs/sfs.c (grub_sfs_mount): Likewise.
2471 * fs/xfs.c (grub_xfs_mount): Likewise.
2472
2473 * include/grub/disk.h (enum grub_disk_dev_id): Add
2474 `GRUB_DISK_DEVICE_HOST_ID'.
2475
2476 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
2477
e5dfe777 24782007-07-24 Jerone Young <jerone@gmail.com>
2479
2480 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
2481 modules for compilation.
2482 * conf/powerpc-ieee1275.rmk: Likewise.
2483
2484 * include/multiboot.h: Move multiboot definitions to one file. Rename
2485 many definitions to not get grub specific.
2486 * include/multiboot2.h: Create header with multiboot 2 definitions.
2487 * include/grub/multiboot.h: Header for grub specific function
2488 prototypes and definitions.
2489 * include/grub/multiboot2.h: Likewise.
2490 * include/grub/multiboot_loader.h: Likewise.
2491 * include/grub/i386/pc/multiboot.h: Removed.
2492 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
2493
2494 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
2495 and 2 to allow for one multiboot and module commands.
2496 * loader/multiboot2.c: Add multiboot2 functionality.
2497 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
2498 and definition names.
2499 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
2500 2 functions.
2501 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
2502 ieee1275 specific multiboot2 code.
2503
2504 * kern/i386/pc/startup.S: Change headers and definition names for
2505 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
2506
daf0f0ba 25072007-07-22 Robert Millan <rmh@aybabtu.com>
2508
2509 * geninitheader.sh: Process file specified in first parameter rather
2510 than hardcoding grub_modules_init.lst.
2511 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
2512 than hardcoding grub_modules_init.h.
2513
2514 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
2515 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
2516 grub_probe_init.[ch] and grub_setup_init.[ch].
2517
2518 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
2519 grub_modules_init.h with grub_emu_init.h.
2520 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
2521 grub_probe_init.[ch] files.
2522 * conf/i386-efi.rmk: Likewise.
2523 * conf/i386-pc.rmk: Likewise.
2524 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
2525 grub_setup_init.[ch] files.
2526
2527 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
2528 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
2529 to initialize modules rather than a list of hardcoded functions.
2530 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
2531 grub_init_all() to initialize modules rather than a list of hardcoded
2532 functions.
2533
54cdc1cc 25342007-07-22 Robert Millan <rmh@aybabtu.com>
2535
2536 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
2537 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
2538
ad0686cc 25392007-07-22 Robert Millan <rmh@aybabtu.com>
2540
2541 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2542 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
2543 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
2544 flag when running on SmartFirmware.
2545 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
2546 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
2547 was set.
2548
2549 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2550 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
2551 rather than decreasing it.
2552
2553 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
2554 there's not enough space to do it, fail in the same way as when it
2555 can't be done because there are no partitions.
2556
2557 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
2558 when nvsetenv failed.
2559
969c02ec 25602007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2561
2562 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
2563 because this rule is automatically generated.
2564 (grub-mkrescue): Removed for the same reason as above.
2565
5a79f472 25662007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2567
2568 Migrate to GNU General Public License Version 3.
2569
2570 * COPYING: Replaced with the plain text version of GPLv3.
2571
2572 * config.guess: Updated from gnulib.
2573 * config.sub: Likewise.
2574
2575 * geninit.sh: Output a GPLv3 copyright notice.
2576 * geninitheader.sh: Likewise.
2577 * genmodsrc.sh: Likewise.
2578 * gensymlist.sh.in: Likewise.
2579
2580 * boot/i386/pc/boot.S: Upgraded to GPLv3.
2581 * boot/i386/pc/diskboot.S: Likewise.
2582 * boot/i386/pc/pxeboot.S: Likewise.
2583 * commands/blocklist.c: Likewise.
2584 * commands/boot.c: Likewise.
2585 * commands/cat.c: Likewise.
2586 * commands/cmp.c: Likewise.
2587 * commands/configfile.c: Likewise.
2588 * commands/echo.c: Likewise.
2589 * commands/help.c: Likewise.
2590 * commands/ls.c: Likewise.
2591 * commands/search.c: Likewise.
2592 * commands/terminal.c: Likewise.
2593 * commands/test.c: Likewise.
2594 * commands/videotest.c: Likewise.
2595 * commands/i386/cpuid.c: Likewise.
2596 * commands/i386/pc/halt.c: Likewise.
2597 * commands/i386/pc/play.c: Likewise.
2598 * commands/i386/pc/reboot.c: Likewise.
2599 * commands/i386/pc/vbeinfo.c: Likewise.
2600 * commands/i386/pc/vbetest.c: Likewise.
2601 * commands/ieee1275/halt.c: Likewise.
2602 * commands/ieee1275/reboot.c: Likewise.
2603 * commands/ieee1275/suspend.c: Likewise.
2604 * disk/loopback.c: Likewise.
2605 * disk/lvm.c: Likewise.
2606 * disk/raid.c: Likewise.
2607 * disk/efi/efidisk.c: Likewise.
2608 * disk/i386/pc/biosdisk.c: Likewise.
2609 * disk/ieee1275/ofdisk.c: Likewise.
2610 * font/manager.c: Likewise.
2611 * fs/affs.c: Likewise.
2612 * fs/ext2.c: Likewise.
2613 * fs/fat.c: Likewise.
2614 * fs/fshelp.c: Likewise.
2615 * fs/hfs.c: Likewise.
2616 * fs/hfsplus.c: Likewise.
2617 * fs/iso9660.c: Likewise.
2618 * fs/jfs.c: Likewise.
2619 * fs/minix.c: Likewise.
2620 * fs/sfs.c: Likewise.
2621 * fs/ufs.c: Likewise.
2622 * fs/xfs.c: Likewise.
2623 * hello/hello.c: Likewise.
2624 * include/grub/acorn_filecore.h: Likewise.
2625 * include/grub/arg.h: Likewise.
2626 * include/grub/bitmap.h: Likewise.
2627 * include/grub/boot.h: Likewise.
2628 * include/grub/cache.h: Likewise.
2629 * include/grub/device.h: Likewise.
2630 * include/grub/disk.h: Likewise.
2631 * include/grub/dl.h: Likewise.
2632 * include/grub/elfload.h: Likewise.
2633 * include/grub/env.h: Likewise.
2634 * include/grub/err.h: Likewise.
2635 * include/grub/file.h: Likewise.
2636 * include/grub/font.h: Likewise.
2637 * include/grub/fs.h: Likewise.
2638 * include/grub/fshelp.h: Likewise.
2639 * include/grub/gzio.h: Likewise.
2640 * include/grub/hfs.h: Likewise.
2641 * include/grub/kernel.h: Likewise.
2642 * include/grub/loader.h: Likewise.
2643 * include/grub/lvm.h: Likewise.
2644 * include/grub/misc.h: Likewise.
2645 * include/grub/mm.h: Likewise.
2646 * include/grub/net.h: Likewise.
2647 * include/grub/normal.h: Likewise.
2648 * include/grub/parser.h: Likewise.
2649 * include/grub/partition.h: Likewise.
2650 * include/grub/pc_partition.h: Likewise.
2651 * include/grub/raid.h: Likewise.
2652 * include/grub/rescue.h: Likewise.
2653 * include/grub/script.h: Likewise.
2654 * include/grub/setjmp.h: Likewise.
2655 * include/grub/symbol.h: Likewise.
2656 * include/grub/term.h: Likewise.
2657 * include/grub/terminfo.h: Likewise.
2658 * include/grub/tparm.h: Likewise.
2659 * include/grub/types.h: Likewise.
2660 * include/grub/video.h: Likewise.
2661 * include/grub/efi/api.h: Likewise.
2662 * include/grub/efi/chainloader.h: Likewise.
2663 * include/grub/efi/console.h: Likewise.
2664 * include/grub/efi/console_control.h: Likewise.
2665 * include/grub/efi/disk.h: Likewise.
2666 * include/grub/efi/efi.h: Likewise.
2667 * include/grub/efi/pe32.h: Likewise.
2668 * include/grub/efi/time.h: Likewise.
2669 * include/grub/i386/linux.h: Likewise.
2670 * include/grub/i386/setjmp.h: Likewise.
2671 * include/grub/i386/types.h: Likewise.
2672 * include/grub/i386/efi/kernel.h: Likewise.
2673 * include/grub/i386/efi/loader.h: Likewise.
2674 * include/grub/i386/efi/time.h: Likewise.
2675 * include/grub/i386/pc/biosdisk.h: Likewise.
2676 * include/grub/i386/pc/boot.h: Likewise.
2677 * include/grub/i386/pc/chainloader.h: Likewise.
2678 * include/grub/i386/pc/console.h: Likewise.
2679 * include/grub/i386/pc/init.h: Likewise.
2680 * include/grub/i386/pc/kernel.h: Likewise.
2681 * include/grub/i386/pc/loader.h: Likewise.
2682 * include/grub/i386/pc/memory.h: Likewise.
2683 * include/grub/i386/pc/multiboot.h: Likewise.
2684 * include/grub/i386/pc/serial.h: Likewise.
2685 * include/grub/i386/pc/time.h: Likewise.
2686 * include/grub/i386/pc/vbe.h: Likewise.
2687 * include/grub/i386/pc/vbeblit.h: Likewise.
2688 * include/grub/i386/pc/vbefill.h: Likewise.
2689 * include/grub/i386/pc/vbeutil.h: Likewise.
2690 * include/grub/i386/pc/vga.h: Likewise.
2691 * include/grub/ieee1275/ieee1275.h: Likewise.
2692 * include/grub/ieee1275/ofdisk.h: Likewise.
2693 * include/grub/powerpc/libgcc.h: Likewise.
2694 * include/grub/powerpc/setjmp.h: Likewise.
2695 * include/grub/powerpc/types.h: Likewise.
2696 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
2697 * include/grub/powerpc/ieee1275/console.h: Likewise.
2698 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
2699 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
2700 * include/grub/powerpc/ieee1275/loader.h: Likewise.
2701 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
2702 * include/grub/powerpc/ieee1275/time.h: Likewise.
2703 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
2704 * include/grub/sparc64/libgcc.h: Likewise.
2705 * include/grub/sparc64/setjmp.h: Likewise.
2706 * include/grub/sparc64/types.h: Likewise.
2707 * include/grub/sparc64/ieee1275/console.h: Likewise.
2708 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
2709 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
2710 * include/grub/sparc64/ieee1275/time.h: Likewise.
2711 * include/grub/util/biosdisk.h: Likewise.
2712 * include/grub/util/getroot.h: Likewise.
2713 * include/grub/util/lvm.h: Likewise.
2714 * include/grub/util/misc.h: Likewise.
2715 * include/grub/util/raid.h: Likewise.
2716 * include/grub/util/resolve.h: Likewise.
2717 * io/gzio.c: Likewise.
2718 * kern/device.c: Likewise.
2719 * kern/disk.c: Likewise.
2720 * kern/dl.c: Likewise.
2721 * kern/elf.c: Likewise.
2722 * kern/env.c: Likewise.
2723 * kern/err.c: Likewise.
2724 * kern/file.c: Likewise.
2725 * kern/fs.c: Likewise.
2726 * kern/loader.c: Likewise.
2727 * kern/main.c: Likewise.
2728 * kern/misc.c: Likewise.
2729 * kern/mm.c: Likewise.
2730 * kern/parser.c: Likewise.
2731 * kern/partition.c: Likewise.
2732 * kern/rescue.c: Likewise.
2733 * kern/term.c: Likewise.
2734 * kern/efi/efi.c: Likewise.
2735 * kern/efi/init.c: Likewise.
2736 * kern/efi/mm.c: Likewise.
2737 * kern/i386/dl.c: Likewise.
2738 * kern/i386/efi/init.c: Likewise.
2739 * kern/i386/efi/startup.S: Likewise.
2740 * kern/i386/pc/init.c: Likewise.
2741 * kern/i386/pc/lzo1x.S: Likewise.
2742 * kern/i386/pc/startup.S: Likewise.
2743 * kern/ieee1275/ieee1275.c: Likewise.
2744 * kern/powerpc/cache.S: Likewise.
2745 * kern/powerpc/dl.c: Likewise.
2746 * kern/powerpc/ieee1275/cmain.c: Likewise.
2747 * kern/powerpc/ieee1275/crt0.S: Likewise.
2748 * kern/powerpc/ieee1275/init.c: Likewise.
2749 * kern/powerpc/ieee1275/openfw.c: Likewise.
2750 * kern/sparc64/cache.S: Likewise.
2751 * kern/sparc64/dl.c: Likewise.
2752 * kern/sparc64/ieee1275/init.c: Likewise.
2753 * kern/sparc64/ieee1275/openfw.c: Likewise.
2754 * loader/efi/chainloader.c: Likewise.
2755 * loader/efi/chainloader_normal.c: Likewise.
2756 * loader/i386/efi/linux.c: Likewise.
2757 * loader/i386/efi/linux_normal.c: Likewise.
2758 * loader/i386/pc/chainloader.c: Likewise.
2759 * loader/i386/pc/chainloader_normal.c: Likewise.
2760 * loader/i386/pc/linux.c: Likewise.
2761 * loader/i386/pc/linux_normal.c: Likewise.
2762 * loader/i386/pc/multiboot.c: Likewise.
2763 * loader/i386/pc/multiboot_normal.c: Likewise.
2764 * loader/powerpc/ieee1275/linux.c: Likewise.
2765 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2766 * normal/arg.c: Likewise.
2767 * normal/cmdline.c: Likewise.
2768 * normal/command.c: Likewise.
2769 * normal/completion.c: Likewise.
2770 * normal/execute.c: Likewise.
2771 * normal/function.c: Likewise.
2772 * normal/lexer.c: Likewise.
2773 * normal/main.c: Likewise.
2774 * normal/menu.c: Likewise.
2775 * normal/menu_entry.c: Likewise.
2776 * normal/misc.c: Likewise.
2777 * normal/parser.y: Likewise.
2778 * normal/script.c: Likewise.
2779 * normal/i386/setjmp.S: Likewise.
2780 * normal/powerpc/setjmp.S: Likewise.
2781 * normal/sparc64/setjmp.S: Likewise.
2782 * partmap/acorn.c: Likewise.
2783 * partmap/amiga.c: Likewise.
2784 * partmap/apple.c: Likewise.
2785 * partmap/gpt.c: Likewise.
2786 * partmap/pc.c: Likewise.
2787 * partmap/sun.c: Likewise.
2788 * term/gfxterm.c: Likewise.
2789 * term/terminfo.c: Likewise.
2790 * term/efi/console.c: Likewise.
2791 * term/i386/pc/console.c: Likewise.
2792 * term/i386/pc/serial.c: Likewise.
2793 * term/i386/pc/vesafb.c: Likewise.
2794 * term/i386/pc/vga.c: Likewise.
2795 * term/ieee1275/ofconsole.c: Likewise.
2796 * util/biosdisk.c: Likewise.
2797 * util/console.c: Likewise.
2798 * util/genmoddep.c: Likewise.
2799 * util/getroot.c: Likewise.
2800 * util/grub-emu.c: Likewise.
2801 * util/grub-mkdevicemap.c: Likewise.
2802 * util/grub-probe.c: Likewise.
2803 * util/lvm.c: Likewise.
2804 * util/misc.c: Likewise.
2805 * util/raid.c: Likewise.
2806 * util/resolve.c: Likewise.
2807 * util/update-grub.in: Likewise.
2808 * util/update-grub_lib.in: Likewise.
2809 * util/grub.d/00_header.in: Likewise.
2810 * util/grub.d/10_hurd.in: Likewise.
2811 * util/grub.d/10_linux.in: Likewise.
2812 * util/i386/efi/grub-install.in: Likewise.
2813 * util/i386/efi/grub-mkimage.c: Likewise.
2814 * util/i386/pc/grub-install.in: Likewise.
2815 * util/i386/pc/grub-mkimage.c: Likewise.
2816 * util/i386/pc/grub-mkrescue.in: Likewise.
2817 * util/i386/pc/grub-setup.c: Likewise.
2818 * util/i386/pc/misc.c: Likewise.
2819 * util/powerpc/ieee1275/grub-install.in: Likewise.
2820 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
2821 * util/powerpc/ieee1275/misc.c: Likewise.
2822 * video/bitmap.c: Likewise.
2823 * video/video.c: Likewise.
2824 * video/i386/pc/vbe.c: Likewise.
2825 * video/i386/pc/vbeblit.c: Likewise.
2826 * video/i386/pc/vbefill.c: Likewise.
2827 * video/i386/pc/vbeutil.c: Likewise.
2828 * video/readers/tga.c: Likewise.
2829
3572d015 28302007-07-02 Robert Millan <rmh@aybabtu.com>
2831
2832 * conf/i386-efi.rmk: Replace obsolete reference to
2833 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
2834 with util/getroot.c.
2835 * conf/powerpc-ieee1275.rmk: Likewise.
2836 * conf/sparc64-ieee1275.rmk: Likewise.
2837
2838 * util/grub-emu.c (main): Fix unchecked pointer handling.
2839
2c2a681b 28402007-07-02 Robert Millan <rmh@aybabtu.com>
2841
2842 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
2843 invocation to fail, in order to support partition-less media.
2844
2845 * util/i386/pc/grub-install.in: Likewise.
2846
2847 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
2848 which fs or partmap modules are needed (akin to its sister scripts).
2849
2850 Also use grub-probe to get rid of unportable /proc/mounts check.
2851
2852 Print the same informational message that the other scripts do, before
2853 exitting.
2854
6193defe 28552007-06-23 Robert Millan <rmh@aybabtu.com>
2856
2857 * util/update-grub_lib.in (font_path): New function. Determine wether
2858 a font file can be found and, if so, echo the GRUB path to it.
2859
2860 * util/update-grub.in: Handle multiple terminals depending on user
2861 input, platform availability and font file presence. Propagate
2862 variables of our findings to /etc/grub.d/ children.
2863
2864 * util/grub.d/00_header.in: Handle multiple terminals, based on
2865 environment setup by update-grub.
2866
eface1dc 28672007-06-23 Robert Millan <rmh@aybabtu.com>
2868
ba50d28f 2869 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 2870
bf697e28 28712007-06-21 Robert Millan <rmh@aybabtu.com>
2872
2873 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
2874 indicate end of data section in kernel image.
2875 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
2876 GRUB_KERNEL_MACHINE_DATA_END.
2877
2878 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
2879 space for it.
2880 * kern/i386/efi/startup.S: Likewise.
2881
2882 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
2883 during image generation. Implement --prefix option to override this
2884 patch.
2885 * util/i386/efi/grub-mkimage.c: Likewise.
2886
2887 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
2888 code to make path relative to its root into a separate function.
2889
2890 * util/i386/pc/grub-install.in: Use newly provided
2891 make_system_path_relative_to_its_root() to convert ${grubdir}, then
2892 pass the result to grub-install --prefix.
2893
baa574b4 28942007-06-13 Robert Millan <rmh@aybabtu.com>
2895
2896 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
2897 DEFAULT_DEVICE_MAP.
2898 * util/grub-emu.c: Use above definitions from misc.h instead of
2899 defining them.
2900 * util/grub-mkdevicemap.c: Likewise.
2901 * util/i386/pc/grub-setup.c: Likewise.
2902 * util/grub-probe.c: Likewise.
2903 (probe): Abort with grub_util_error() when either
2904 grub_guess_root_device or grub_util_get_grub_dev fails.
2905
0215dcbf 29062007-06-12 Robert Millan <rmh@aybabtu.com>
2907
2908 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
2909 "pager" assignment.
2910 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
2911 "pcdata".
2912 * util/grub-probe.c (probe): Likewise for "drive_name".
2913
8af2ab7b 29142007-06-11 Robert Millan <rmh@aybabtu.com>
2915
2916 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
2917 not just the cdrom one.
2918
59d31694 29192007-06-11 Robert Millan <rmh@aybabtu.com>
2920
2921 * util/i386/pc/grub-mkrescue.in: Add "set -e".
2922 Add --pkglibdir=DIR option to override pkglibdir.
2923 Mention --image-type=TYPE in help output.
2924 Fix --grub-mkimage (it was a no-op).
2925 Abort gracefuly when no parameter is given.
2926
7ee367e4 29272007-06-11 Robert Millan <rmh@aybabtu.com>
2928
2929 * util/i386/pc/grub-mkrescue.in: New file.
2930 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
2931 * Makefile.in: Handle bin_SCRIPTS.
2932
29b0ed46 29332007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
2934
2935 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
2936 list of video modes.
2937
c0f90770 29382007-06-06 Robert Millan <rmh@aybabtu.com>
2939
2940 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
2941 file doesn't exist, or if it is in a filesystem grub can't read.
2942
2943 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
2944 not abort if GRUB_DRIVE could not be defined. Rearrange generated
2945 header comment to fit in 80 columns when the variables are resolved.
2946
2947 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
2948 could be identified by update-grub. Remove redundant check for
2949 unifont.pff existance (since convert_system_path_to_grub_path now
2950 handles that).
2951
fb36dc26 29522007-06-04 Robert Millan <rmh@aybabtu.com>
2953
2954 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
2955
2956 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
2957
2958 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
2959
0c68c93e 29602007-06-04 Robert Millan <rmh@aybabtu.com>
2961
2962 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
2963
2964 * include/grub/partition.h: Declare grub_apple_partition_map_init and
2965 grub_apple_partition_map_fini.
2966
2967 * util/biosdisk.c
2968 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
2969 to access >2 TiB disks).
2970
2971 Print disk->total_sectors with %llu instead of %lu, since this
2972 variable is always 64-bit (prevents wrong disk size from being displayed
2973 on either >2 TiB disk or big-endian CPU).
2974
2975 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
2976 into a generic case that supports all (sane) partition maps.
2977
2978 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
2979 breaks big-endian.
2980
2981 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
2982 and grub_apple_partition_map_fini() after that.
2983
0f23eb74 29842007-06-01 Robert Millan <rmh@aybabtu.com>
2985
2986 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
2987
2988 * util/grub.d/00_header.in: Only enable gfxterm when
2989 convert_system_path_to_grub_path() succeeds.
2990
42c71976 29912007-05-20 Robert Millan <rmh@aybabtu.com>
2992
2993 * util/update-grub_lib.in: New file.
2994 * DISTLIST: Add update-grub_lib.in.
2995 * conf/common.rmk: Generate update-grub_lib and install it in
2996 $(lib_DATA).
2997 * Makefile.in: Add install routine for $(lib_DATA).
2998
2999 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
3000 function provided by update-grub_lib to support arbitrary paths of
3001 unifont.pff.
3002 * util/update-grub.in: Use convert_system_path_to_grub_path() to
3003 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
3004
5beb2291 30052007-05-19 Robert Millan <rmh@aybabtu.com>
3006
3007 * commands/i386/cpuid.c: New module.
3008 * DISTLIST: Add it.
3009 * conf/i386-efi.rmk: Enable cpuid.mod.
3010 * conf/i386-pc.rmk: Likewise.
3011
7262eca1 30122007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3013
3014 * kern/disk.c (grub_disk_read): Check return value of
3015 grub_realloc().
3016
260ba823 30172007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3018
3019 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
3020 arrays.
3021 * disk/raid.c (grub_raid_open): Likewise.
3022
1ecb6cf2 30232007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3024
3025 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
3026 stack instead of on the heap.
3027
3028 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
3029 before doing a read on it.
3030
3031 * configure.ac: Only use -fno-stack-protector for the target
3032 environment.
3033
21c8cbb1 30342007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3035
3036 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
3037 __attribute_ ((unused)) to mode_type argument.
3038
3039 * util/getroot.c (grub_guess_root_device): Fix #endif.
3040
3041 * kern/misc.c (memcmp): Fix prototype.
3042
3043 * include/grub/partition.h [GRUB_UTIL]
3044 (grub_gpt_partition_map_init): Add prototype.
3045 (grub_gpt_partition_map_fini): Likewise.
3046
3047 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
3048 at the right place.
3049
3050 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3051 (grub_fat_read_data): Likewise.
3052 (grub_fat_find_dir): Likewise.
3053
3054 * font/manager.c (find_glyph): Make table a const.
3055 (grub_font_get_glyph): Remove bitmap from if statement.
3056
849d55d3 30572007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
3058
3059 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3060 code, first search for device in /dev/mapper, then in /dev.
3061 (grub_util_get_grub_dev): New function.
3062 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3063 prototype.
3064 * util/grub-probe.c (probe): Remove check for RAID, call
3065 grub_util_get_grub_dev() instead of
3066 grub_util_biosdisk_get_grub_dev().
3067 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3068 grub_util_biosdisk_get_grub_dev().
3069 * util/i386/pc/grub-setup.c (main): Likewise.
3070
8fff7c2f 30712007-05-16 Robert Millan <rmh@aybabtu.com>
3072
3073 * DISTLIST: Update for the latest changes.
3074 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3075 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3076 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3077 grub/util/biosdisk.h.
3078 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3079 grub/util/biosdisk.h.
3080
48e12b52 30812007-05-16 Robert Millan <rmh@aybabtu.com>
3082
3083 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3084
46b9d128 30852007-05-16 Robert Millan <rmh@aybabtu.com>
3086
3087 * util/i386/efi/grub-install.in: New.
3088 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3089 newly added grub-install.
3090 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3091 include.
3092 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3093 grub/util/biosdisk.h.
3094 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3095 grub/util/biosdisk.h.
3096
2d1a40a9 30972007-05-16 Robert Millan <rmh@aybabtu.com>
3098
3099 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3100 * include/grub/util/biosdisk.h: ... here.
3101 * util/i386/pc/biosdisk.c: Moved to ...
3102 * util/biosdisk.c: ... here.
3103 * util/i386/pc/getroot.c: Moved to ...
3104 * util/getroot.c: ... here.
3105 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3106 * util/grub-mkdevicemap.c: ... here.
3107 * util/i386/pc/grub-probe.c: Moved to ...
3108 * util/grub-probe.c: ... here.
3109
9e26e3bc 31102007-05-15 Robert Millan <rmh@aybabtu.com>
3111
3112 * util/update-grub.in: Remove duplicated line in grub.cfg header
3113 message.
3114
57f96397 31152007-05-13 Robert Millan <rmh@aybabtu.com>
3116
3117 * util/update-grub.in: Fix a few assumptions about the devices holding
3118 /, /boot and /boot/grub being the same.
3119 * util/grub.d/00_header.in: Likewise.
3120 * util/grub.d/10_hurd.in: Likewise.
3121 * util/grub.d/10_linux.in: Likewise.
3122
3123 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3124 patterns. Use that to define the `.old' suffix as older than `'.
3125
3126 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3127
3128 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3129 the grub.cfg header message.
3130
2e610d62 31312007-05-11 Robert Millan <rmh@aybabtu.com>
3132
3133 * util/update-grub.in: Create device.map if it doesn't already exist,
3134 before attempting to run grub-probe.
3135 Check for grub-probe and grub-mkdevicemap with the same code
3136 grub-install is using.
3137 Remove test mode.
3138
3f6a10ef 31392007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
3140
3141 * Makefile.in: Add the datarootdir autoconf variable.
3142
02e7b75e 31432007-05-09 Robert Millan <rmh@aybabtu.com>
3144
3145 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3146 fail gracefuly if dev->disk->partition == NULL.
3147
75f396cc 31482007-05-07 Robert Millan <rmh@aybabtu.com>
3149
3150 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3151 determine partition map module.
3152 * util/i386/pc/grub-install.in: Use this feature to decide which
3153 partition module to load, instead of hardcoding pc and gpt.
3154
da65cb36 31552007-05-07 Robert Millan <rmh@aybabtu.com>
3156
3157 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3158 source directory differs from build directory.
3159
b57d6a91 31602007-05-05 Robert Millan <rmh@aybabtu.com>
3161
3162 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3163 initialisation.
3164
509d00f1 31652007-05-05 Robert Millan <rmh@aybabtu.com>
3166
3167 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3168
c48f23ef 31692007-05-05 Robert Millan <rmh@aybabtu.com>
3170
3171 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3172 command-line arguments via ${GRUB_CMDLINE_LINUX}.
3173
20b97658 31742007-05-05 Robert Millan <rmh@aybabtu.com>
3175
3176 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
3177 (grub_probe_SOURCES): Likewise.
3178 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
3179 GPT and initialize dos_part and bsd_part accordingly.
3180 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
3181 install_bsd_part.
3182 (main): Activate gpt module for use during partition identification,
3183 and deactivate it afterwards.
3184 * util/i386/pc/grub-install.in: Add gpt module to core.img.
3185 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
3186 partition identification, and deactivate it afterwards.
3187
99123174 31882007-05-05 Robert Millan <rmh@aybabtu.com>
3189
3190 * term/i386/pc/console.c (grub_console_fini): Call
3191 grub_term_set_current() before grub_term_unregister().
3192
ebd97f6e 31932007-05-04 Robert Millan <rmh@aybabtu.com>
3194
3195 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
3196 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
3197 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
3198 and update-grub_DATA.
3199 * conf/common.rmk: Build and install update-grub components.
3200 * conf/common.mk: Regenerate.
3201 * util/update-grub.in: New. Core of update-grub.
3202 * util/grub.d/00_header.in: New. Generates grub.cfg header.
3203 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
3204 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
3205 * util/grub.d/README: New. Document grub.d directory layout.
3206
b06a264d 32072007-05-01 Robert Millan <rmh@aybabtu.com>
3208
3209 * util/grub-emu.c: Move initialization functions
3210 grub_util_biosdisk_init() and grub_init_all() before
3211 grub_util_biosdisk_get_grub_dev(), which relies on them.
3212
41f0050e 32132007-04-19 Robert Millan <rmh@aybabtu.com>
3214
3215 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
3216 it is used later.
3217
04582bb3 32182007-04-18 Jerone Young <jerone@gmail.com>
3219
3220 * kernel/elf.c: Add missing parenthesis for conditional statement
3221 stanza.
3222
08db4632 32232007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 3224
08db4632 3225 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
3226 continue on and look for device node with real device name.
3227
801b76be 32282007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 3229
3230 * configure.ac: Add argument for autoconf to use tranformation
3231 ability.
3232 * Makefile.in: Add autoconf package transformation code.
3233 * util/i386/pc/grub-install.in: Likewise.
3234 * util/powerpc/ieee1275/grub-install.in: Likewise.
3235
6795c4e1 32362007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3237
3238 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
3239 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
3240 (EXT2_REVISION): Likewise.
3241 (EXT2_INODE_SIZE): Likewise.
3242 (struct grub_ext2_block_group): Added a missing member
3243 "used_dirs".
3244 (grub_ext2_read_inode): Divide by the inode size in a superblock
3245 instead of 128 to obtain INODES_PER_BLOCK.
3246 Use the macro EXT2_INODE_SIZE instead of directly using
3247 SBLOCK->INODE_SIZE.
3248
d70af616 32492007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
3250
3251 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
3252 superblock instead of the structure size to compute an
3253 offset. This fixes the problem that GRUB could not read a
3254 filesystem when inode size is different from 128-byte.
3255
3b801603 32562007-03-05 Marco Gerards <marco@gnu.org>
3257
3258 * normal/main.c (read_config_file): When "menu" is not set, create
3259 an initial context.
3260
4785bfe4 32612007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3262
3263 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
3264 (HEAP_LIMIT): New macro.
3265 (grub_claim_heap): Claim memory up to `heaplimit'.
3266
a0cbb023 32672007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3268
3269 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
3270 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
3271 (_start): Likewise.
3272 (grub_arch_modules_addr): Return address after `_end'.
3273 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
3274 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
3275 (add_segments): Calculate `_end' from phdr size and location.
3276 (ALIGN_UP): Moved to ...
3277 * include/grub/misc.h: here.
3278 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3279 New macro.
3280 (GRUB_IEEE1275_MODULE_BASE): Removed.
3281
fd7d8eba 32822007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3283
3284 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
3285 loop boundary.
3286
9b09e6fc 32872007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3288
3289 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
3290 All users updated.
3291 (grub_elf64_load_hook_t): Likewise.
3292 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
3293 debug output.
3294
3ce27299 32952007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3296
3297 * kern/mm.c: Update copyright.
3298 (grub_mm_debug): Correct syntax error.
3299 (grub_mm_dump_free): New function.
3300 (grub_debug_free): Call `grub_free'.
3301 * include/grub/mm.h: Update copyright.
3302 (grub_mm_dump_free): Add declaration.
3303
077d5fee 33042007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3305
3306 * include/grub/ieee1275/ieee1275.h: Update copyright.
3307 * kern/powerpc/ieee1275/init.c: Likewise.
3308 * kern/powerpc/ieee1275/openfw.c: Likewise.
3309
3310 * loader/powerpc/ieee1275/linux.c: Likewise.
3311 * include/grub/elfload.h: Likewise.
3312 * kern/elf.c: Likewise.
3313 (grub_elf32_load): Pass `base' and `size' parameters. Update all
3314 callers.
3315 (grub_elf64_load): Likewise.
3316 (grub_elf32_load_segment): Move to a nested function.
3317 (grub_elf64_load_segment): Likewise.
3318
dc946850 33192007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3320
3321 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
3322 prototype.
3323 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
3324 (grub_heap_len): Likewise.
3325 (HEAP_SIZE): New macro.
3326 (grub_claim_heap): New function.
3327 (grub_machine_init): Don't claim heap directly. Call
3328 `grub_claim_heap'.
3329 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
3330 (grub_available_iterate): New function.
3331
baa2a121 33322007-02-03 Thomas Schwinge <tschwinge@gnu.org>
3333
3334 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
3335 * configure.ac: Use it for testing the HOST and TARGET compilers.
3336
4fe9862e 33372006-12-13 Thomas Schwinge <tschwinge@gnu.org>
3338
3339 * Makefile.in (enable_grub_emu): New variable.
3340 * configure.ac (--enable-grub-emu): New option.
3341 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
3342 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
3343 * conf/i386-pc.rmk: Likewise.
3344 * conf/powerpc-ieee1275.rmk: Likewise.
3345 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
3346
a8aa5762 33472006-12-12 Marco Gerards <marco@gnu.org>
3348
3349 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
3350
3351 * kern/env.c (grub_env_unset): Don't free the member `value' when
3352 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
3353 pointer.
3354
3355 * normal/main.c (current_menu): Removed.
3356 (free_menu): Unset the `menu' environment variable.
3357 (grub_normal_menu_addentry): Make use of the environment variable
3358 `menu', instead of using the global `current_menu'. Allocate
3359 memory for the sourcecode of this entry.
3360 (read_config_file): New argument `nested', changed all callers.
3361 Only in the case of a new context, initialize a new menu. Set the
3362 `menu' environment variable.
3363 (grub_normal_execute): Don't set and unset the environment
3364 variable `menu' here anymore. Only free the menu when leaving the
3365 context.
3366
3367 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
3368 leak.
3369
957b3a3e 33702006-12-11 Marco Gerards <marco@gnu.org>
3371
3372 * normal/menu_entry.c (run): Fix off by one bug so the last line
3373 is executed. Move the loader check to outside the loop.
3374
ef875714 33752006-12-08 Hollis Blanchard <hollis@penguinppc.org>
3376
3377 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
3378
4e739985 33792006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
3380
3381 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
3382 the number of sectors. Reported by Andrey Shuvikov
3383 <mr_hyro@yahoo.com>.
3384
790707f2 33852006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
3386
3387 * kern/disk.c (grub_disk_read): When there is a read error, always
3388 try to read only the necessary data.
3389
3390 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
3391 disk/raid.c.
3392 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
3393 prototype.
3394 [GRUB_UTIL] (grub_raid_fini): Likewise.
3395 [GRUB_UTIL] (grub_lvm_init): Likewise.
3396 [GRUB_UTIL] (grub_lvm_fini): Likewise.
3397 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
3398 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
3399 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
3400 and grub_raid_fini().
3401
03e58196 34022006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3403
3404 * include/grub/types.h (__unused): Rename to UNUSED.
3405 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
3406 (grub_elf64_size): Likewise.
3407
ae4f23bf 34082006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3409
3410 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
3411 grub_error_push and grub_error_pop in the error-handling path.
3412 (grub_elf32_load_segment): Only call grub_file_read with non-zero
3413 length.
3414
2166cc83 34152006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3416
3417 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
3418 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3419 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3420 (kernel_elf_SOURCES): Likewise.
3421 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
3422 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
3423 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3424 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3425 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
3426 (elf_mod_SOURCES): New variable.
3427 (elf_mod_CFLAGS): Likewise.
3428 (elf_mod_LDFLAGS): Likewise.
3429 * include/grub/types.h (__unused): New macro.
3430 * include/grub/elfload.h: New file.
3431 * kern/elf.c: Likewise.
3432 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
3433 (ELF32_LOADMASK): New macro.
3434 (ELF64_LOADMASK): Likewise.
3435 (vmlinux): Removed.
3436 (grub_linux_load32): New function.
3437 (grub_linux_load64): Likewise.
3438 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
3439 Use grub_elf_t instead of grub_file_t.
3440
a09d5aa5 34412006-11-02 Hollis Blanchard <hollis@penguinppc.org>
3442
3443 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
3444 `catch_result' to struct set_color_args.
3445
d976fc51 34462006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
3447
3448 * normal/menu.c: Include grub/script.h.
3449 * normal/menu_entry.c: Likewise.
3450 * include/grub/normal.h: Do not include grub/script.h.
3451
67507549 34522006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3453
3454 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
3455
69203a99 34562006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3457
3458 * kern/disk.c (grub_disk_open): Print debug messages when opening a
3459 disk.
3460 (grub_disk_close): Print debug messages when closing a disk.
3461 (grub_disk_read): Print debug messages when disk read fails.
3462 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
3463 filesystem type.
3464 * kern/partition.c: Include misc.h.
3465 (grub_partition_iterate): Print debug messages when detecting
3466 partition type.
3467
e2b8278c 34682006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3469
3470 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
3471 is negative.
3472 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
3473
97b2f2ff 34742006-10-26 Hollis Blanchard <hollis@penguinppc.org>
3475
3476 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3477 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
3478
6555d655 34792006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
3480
3481 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
3482 instead of sizeof(lv). Patch by Michael Guntsche.
3483
4d42b77f 34842006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
3485
3486 * disk/lvm.c: Rename VGS to VG_LIST.
3487 (grub_lvm_iterate): Change VGS->LV to VG-LV.
3488 (grub_lvm_open): Likewise.
3489 Thanks to Michael Guntsche for finding this bug.
3490
5d74d927 34912006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3492
3493 * configure.ac (AC_INIT): Bumped to 1.95.
3494
a1bb27e4 34952006-10-14 Robert Millan <rmh@aybabtu.com>
3496
3497 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
3498 with "/dev/.static/dev/md".
3499
e0994b8b 35002006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3501
3502 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
3503 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
3504 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
3505 DRIVE_NAME are always freed.
3506
3507 * util/i386/pc/biosdisk.c (make_device_name): Add one into
3508 DOS_PART, as a DOS partition is counted from one instead of zero
3509 now. Reported by Robert Millan.
3510
ddd5cee9 35112006-10-14 Robert Millan <rmh@aybabtu.com>
3512
3513 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
3514 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
3515 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
3516 string returned by grub_guess_root_device.
3517 * util/i386/pc/grub-setup.c: Likewise.
3518 * util/i386/pc/grub-probefs.c: Likewise.
3519
3520 * util/i386/pc/grub-probefs.c: Rename to ...
3521 * util/i386/pc/grub-probe.c: ... this.
3522 * DISTLIST: Remove grub-probefs, add grub-probe.
3523 * conf/i386-efi.rmk: Likewise.
3524 * conf/i386-pc.rmk: Likewise.
3525 * util/i386/pc/grub-install.in: Likewise.
3526
3527 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
3528 choose which information we want to print.
3529
2b002173 35302006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3531
3532 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
3533 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
3534 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
3535 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
3536 video/readers/tga.c and video/i386/pc/vbeutil.c.
3537
35382006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
3539
3540 Added support for RAID and LVM.
3541
3542 * disk/lvm.c: New file.
3543 * disk/raid.c: Likewise.
3544 * include/grub/lvm.h: Likewise.
3545 * include/grub/raid.h: Likewise.
3546 * include/grub/util/lvm.h: Likewise.
3547 * include/grub/util/raid.h: Likewise.
3548 * util/lvm.c: Likewise.
3549 * util/raid.c: Likewise.
3550
3551 * include/grub/disk.h (grub_disk_dev_id): Add
3552 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
3553 (grub_disk_get_size): New prototype.
3554 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
3555 returns a partition.
3556 (grub_disk_get_size): New function.
3557
3558 * kern/i386/pc/init.c (make_install_device): Copy the prefix
3559 verbatim if grub_install_dos_part is -2.
3560
3561 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
3562 and LVM devices.
3563
3564 * util/i386/pc/grub-setup.c (setup): New argument
3565 MUST_EMBED. Force embedding of GRUB when the argument is
3566 true. Close FILE before returning.
3567 (main): Add support for RAID and LVM.
3568
3569 * conf/common.rmk: Add RAID and LVM modules.
3570 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
3571 util/lvm.c.
3572 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
3573
3574 * kern/misc.c (grub_strstr): New function.
3575 * include/grub/misc.h (grub_strstr): New prototype.
3576
050548d0 35772006-10-10 Tristan Gingold <tristan.gingold@bull.net>
3578
3579 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
3580
da849d2d 35812006-10-05 Tristan Gingold <tristan.gingold@bull.net>
3582
3583 * kern/misc.c (grub_strtoull): Guess the base only if not
3584 specified.
3585
97b2f2ff 35862006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 3587
3588 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
3589 PowerMac support.
3590
97b2f2ff 35912006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 3592
3593 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
3594
3595 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
3596 Remove `flags' argument. All callers changed.
3597 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
3598 (IEEE1275_IHANDLE_INVALID): New variable.
3599 (IEEE1275_CELL_INVALID): New variable.
3600 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3601 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
3602 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
3603 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
3604 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
3605 codes from Open Firmware. All callers updated.
3606 (grub_ieee1275_next_property): Directly return Open Firmware return
3607 code.
3608 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3609 Standardize error checking from `grub_ieee1275_get_property'.
3610 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
3611 `devalias' to `aliases'. Correct comments. Consolidate error paths.
3612
97b2f2ff 36132006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 3614
3615 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
3616 `instance_to_package_args' to `instance_to_path_args'.
3617
3618 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
3619 `grub_ieee1275_chosen'.
3620
3621 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
3622 `grub_ieee1275_interpret'.
3623
97b2f2ff 36242006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 3625
3626 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
3627
97b2f2ff 36282006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 3629
3630 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
3631 (__cmpdi): Likewise.
3632
3633 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
3634 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
3635 `grub_ssize_t'.
3636
02bb8acc 3637 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 3638
3639 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
3640 to type `grub_ssize_t'.
3641 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
3642
7f9a8531 36432006-09-22 Marco Gerards <marco@gnu.org>
3644
3645 * normal/script.c (grub_script_create_cmdmenu): Skip leading
3646 newlines.
3647
b5ef1102 36482006-09-22 Marco Gerards <marco@gnu.org>
3649
3650 * commands/echo.c: New file.
3651
3652 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
3653
3654 * conf/common.rmk (echo_mod_SOURCES): New variable.
3655 (echo_mod_CFLAGS): Likewise.
3656 (echo_mod_LDFLAGS): Likewise.
3657
2cff3677 36582006-09-22 Marco Gerards <marco@gnu.org>
3659
3660 * normal/main.c (get_line): Malloc memory instead of using
3661 preallocated memory. Removed the arguments `cmdline' and
3662 `max_len'. Updated all callers.
3663
6ba4688b 36642006-09-22 Marco Gerards <marco@gnu.org>
3665
3666 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
3667 (normal_mod_DEPENDENCIES): Likewise.
3668
3669 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
3670 (normal_mod_DEPENDENCIES): Likewise.
3671
3672 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
3673
e02ac02c 36742006-09-22 Johan Rydberg <jrydberg@gnu.org>
3675
3676 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
3677 programs.
3678 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
3679 (normal_mod_DEPENDENCIES): Likewise.
3680 * conf/i386-pc.mk: Regenerate.
3681 * conf/i386-efi.mk: Likewise
3682 * conf/common.mk: Likewise.
3683 * conf/powerpc-ieee1275.mk: Likewise.
3684 * conf/sparc64-ieee1275.mk: Likewise.
3685
8d252e44 36862006-09-22 Robert Millan <rmh@aybabtu.com>
3687
3688 Sync with i386 version.
3689 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
3690 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
3691
209bf7ac 36922006-09-21 Robert Millan <rmh@aybabtu.com>
3693
3694 Import from GRUB Legacy (lib/device.c):
3695 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
3696 (init_device_map) [__linux__]: Add support for I2O devices.
3697
6b146090 36982006-09-14 Marco Gerards <marco@gnu.org>
3699
3700 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
3701 `-melf_i386'.
3702
e38600a8 37032006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 3704
3705 * util/i386/pc/grub-install.in: Skip menu.lst when removing
3706 /boot/grub/*.lst.
78fa1790 3707
2952da5d 3708 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 3709
2952da5d 3710 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
3711 before adding it to device.map.
3712
01b82a64 37132006-08-15 Johan Rydberg <jrydberg@gnu.org>
3714
3715 * genmk.rb: Let GCC generate dependenceies the first time it
3716 compiles a file; using the -MD option.
3717 * conf/common.mk: Regenerate.
3718 * conf/i386-pc.mk: Likewise.
3719 * conf/i386-efi.mk: Likewise.
3720 * conf/powerpc-ieee1275.mk: Likewise.
3721 * conf/sparc64-ieee1275.mk: Likewise.
3722
1064790d 37232006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
3724
3725 Move the prototypes of grub_setjmp and grub_longjmp to
3726 cpu/setjmp.h, so that each architecture may specify different
3727 attributes.
3728
3729 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
3730 (grub_longjmp): Likewise.
3731 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
3732 (grub_longjmp): Likewise.
3733 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
3734 (grub_longjmp): Likewise.
3735
3736 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
3737 [!GRUB_UTIL] (grub_longjmp): Removed.
3738
29dda3ed 37392006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
3740
3741 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
3742 "color!" method does not return any value.
3743
ad2a06ed 37442006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3745
3746 * include/grub/bitmap.h: New file.
3747
3748 * include/grub/i386/pc/vbeutil.h: Likewise.
3749
3750 * video/bitmap.c: Likewise.
3751
3752 * video/readers/tga.c: Likewise.
3753
3754 * video/i386/pc/vbeutil.c: Likewise.
3755
3756 * commands/videotest.c: Code cleanup and updated to reflect to new
3757 video API.
3758
3759 * term/gfxterm.c: Likewise.
3760
3761 * video/video.c: Likewise.
3762
3763 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
3764 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
3765 (bitmap_mod_SOURCES): New entry.
3766 (bitmap_mod_CFLAGS): Likewise.
3767 (bitmap_mod_LDFLAGS): Likewise.
3768 (tga_mod_SOURCES): Likewise.
3769 (tga_mod_CFLAGS): Likewise.
3770 (tga_mod_LDFLAGS): Likewise.
3771
3772 * include/grub/video.h (grub_video_blit_operators): New enum type.
3773 (grub_video_render_target): Changed as forward declaration and moved
3774 actual definition to be video driver specific.
3775 (grub_video_adapter.blit_bitmap): Added blitting operator.
3776 (grub_video_adapter.blit_render_target): Likewise.
3777 (grub_video_blit_bitmap): Likewise.
3778 (grub_video_blit_render_target): Likewise.
3779
3780 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
3781 driver specific render target definition.
3782 (grub_video_vbe_map_rgba): Added driver internal helper.
3783 (grub_video_vbe_unmap_color): Updated to use
3784 grub_video_i386_vbeblit_info.
3785 (grub_video_vbe_get_video_ptr): Likewise.
3786
3787 * include/grub/i386/pc/vbeblit.h
3788 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
3789 grub_video_i386_vbeblit_info.
3790 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3791 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3792 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3793 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3794 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3795 (grub_video_i386_vbeblit_index_index): Likewise.
3796 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
3797 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3798 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3799 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
3800 operator.
3801 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
3802 operator.
3803
3804 * video/i386/pc/vbeblit.c: Updated to reflect changes on
3805 include/grub/i386/pc/vbeblit.h.
3806
3807 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
3808 Updated to use grub_video_i386_vbeblit_info.
3809 (grub_video_i386_vbefill_R8G8B8): Likewise.
3810 (grub_video_i386_vbefill_index): Likewise.
3811 (grub_video_i386_vbefill): Added generic filler.
3812
3813 * video/i386/pc/vbefill.c: Updated to reflect changes on
3814 include/grub/i386/pc/vbefill.h.
3815
3816 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
3817 grub_video_i386_vbeblit_info.
3818 (grub_video_vbe_unmap_color): Likewise.
3819 (grub_video_vbe_blit_glyph): Likewise.
3820 (grub_video_vbe_scroll): Likewise.
3821 (grub_video_vbe_draw_pixel): Removed function.
3822 (grub_video_vbe_get_pixel): Likewise.
3823 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
3824 updated code to use it.
3825 (common_blitter): Added common blitter for render target and bitmap.
3826 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
3827 (grub_video_vbe_blit_render_target): Likewise.
3828
bc8c036d 38292006-07-30 Johan Rydberg <jrydberg@gnu.org>
3830
3831 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
3832 is in text mode if there is no console control protocol instance
3833 available.
3834
684a8eff 38352006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3836
3837 * include/grub/video.h: Code cleanup.
3838
3839 * include/grub/i386/pc/vbe.h: Likewise.
3840
3841 * video/i386/pc/vbe.c: Likewise.
3842
3843 * video/i386/pc/vbeblit.c: Likewise.
3844
3845 * video/i386/pc/vbefill.c: Likewise.
3846
3847 * video/video.c: Likewise. Also added more comments.
3848
5915059b 38492006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3850
3851 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
3852 (struct grub_biosdisk_dap): Likewise.
3853
3854 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
3855 linkage settings for all functions.
3856
90ce5d56 38572006-07-12 Marco Gerards <marco@gnu.org>
3858
3859 * configure.ac (--enable-mm-debug): Fix typo.
3860
3861 * genkernsyms.sh.in: Use proper quoting for `CC'.
3862
43e7f879 38632006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
3864
3865 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
3866 (normal_mod_ASFLAGS): Remove "-m32".
3867
4889bdec 38682006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
3869
3870 * util/misc.c: Include config.h.
3871 [!HAVE_MEMALIGN]: Do not include malloc.h.
3872 (grub_memalign): Use posix_memalign, if present. Then, use
3873 memalign, if present. Otherwise, emit an error.
3874
3875 * util/grub-emu.c: Do not include malloc.h.
3876
3877 * include/grub/util/misc.h: Include unistd.h. This is required for
3878 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
3879 D. Eades III <hde@foobar-qux.org>.
3880
3881 * configure.ac (AC_GNU_SOURCE): Added.
3882 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
3883 type.
3884
fd39d4da 38852006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
3886
3887 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
3888 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
3889
b786f3b5 38902006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
3891
3892 * include/grub/types.h (grub_host_addr_t): Rename to
3893 grub_target_addr_t.
3894 (grub_host_off_t): Rename to grub_target_off_t.
3895 (grub_host_size_t): Rename to grub_target_size_t.
3896 (grub_host_ssize_t): Rename to grub_target_ssize_t.
3897 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
3898
3899 * include/grub/kernel.h (struct grub_module_header): Change type
3900 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
3901 (grub_module_info): Likewise.
3902
051988bb 39032006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
3904
3905 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
3906 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
3907 Velazquez <jesus.velazquez@gmail.com>.
3908
deae281b 39092006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
3910
3911 Count partitions from 1 instead of 0 in the string representation
3912 of partitions. Still use 0-based internally.
3913
3914 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
3915 (sun_partition_map_iterate): Use grub_partition_t instead of
3916 struct grub_partition *. Cast DESC->START_CYLINDER to
3917 grub_uint64_t after converting the endian.
3918 (sun_partition_map_probe): Subtract 1 for PARTNUM.
3919 (sun_partition_map_get_name): Add 1 to P->INDEX.
3920
3921 * partmap/pc.c (grub_partition_parse): Subtract 1 for
3922 PCDATA->DOS_PART.
3923 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
3924
3925 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
3926 zero instead of one.
3927 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
3928 (gpt_partition_map_get_name): Add 1 into P->INDEX.
3929
3930 * partmap/apple.c (apple_partition_map_iterate): Change the type
3931 of POS to unsigned.
3932 (apple_partition_map_probe): Subtract 1 for PARTNUM.
3933 (apple_partition_map_get_name): Add 1 into P->INDEX.
3934
3935 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
3936 of POS to unsigned.
3937 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
3938 calculate the offset of a partition.
3939 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
3940 (amiga_partition_map_get_name): Add 1 into P->INDEX.
3941
3942 * partmap/acorn.c (acorn_partition_map_find): Change the type of
3943 SECTOR to grub_disk_addr_t.
3944 (acorn_partition_map_iterate): Likewise.
3945 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
3946 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
3947 top.
3948 (acorn_partition_map_get_name): Add 1 into P->INDEX.
3949
3950 * kern/i386/pc/init.c (make_install_device): Add 1 into
3951 GRUB_INSTALL_DOS_PART.
3952
3953 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
3954 conditional.
3955
524a1e6a 39562006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
3957
3958 Clean up the code to support 64-bit addressing in disks and
3959 files. This change is not enough for filesystems yet.
3960
3961 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
3962 type of "start" to grub_uint64_t.
3963 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
3964 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
3965 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
3966 convert addresses.
3967
3968 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
3969 to grub_disk_addr_t.
3970
3971 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
3972 string.
3973
3974 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3975
3976 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
3977 to char *.
3978
3979 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
3980
3981 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
3982
3983 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
3984
3985 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
3986 to grub_off_t, to detect an error from grub_file_seek.
3987 (grub_multiboot_load_elf32): Likewise.
3988
3989 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
3990 maximum unsigned long value when an overflow is detected.
3991 (grub_strtoull): New function.
3992 (grub_divmod64): Likewise.
3993 (grub_lltoa): use grub_divmod64.
3994
3995 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
3996 grub_disk_addr_t.
3997 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
3998 the pointer to next character. Use grub_strtoull instead of
3999 grub_strtoul.
4000 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
4001 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
4002 respectively.
4003
4004 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
4005 return value is signed.
4006 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
4007 test if OFFSET is less than zero, as OFFSET is unsigned now.
4008
4009 * kern/disk.c (struct grub_disk_cache): Change the type of
4010 "sector" to grub_disk_addr_t.
4011 (grub_disk_cache_get_index): Change the type of SECTOR to
4012 grub_disk_addr_t. Calculate the hash with SECTOR casted to
4013 unsigned after shifting.
4014 (grub_disk_cache_invalidate): Change the type of SECTOR to
4015 grub_disk_addr_t.
4016 (grub_disk_cache_unlock): Likewise.
4017 (grub_disk_cache_store): Likewise.
4018 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
4019 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
4020 grub_disk_addr_t and grub_uint64_t, respectively.
4021 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
4022 body, as the value of OFFSET is tweaked by
4023 grub_disk_check_range. Change the types of START_SECTOR, LEN and
4024 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
4025 respectively.
4026 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
4027 body, as the value of OFFSET is tweaked by
4028 grub_disk_check_range. Change the types of LEN and N to
4029 grub_size_t.
4030
4031 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
4032 and "saved_offset" to grub_off_t.
4033 (test_header): Cast BUF to char *.
4034 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
4035 to char *.
4036 (grub_gzio_read): Change the types of OFFSET and SIZE to
4037 grub_off_t and grub_size_t, respectively.
4038
4039 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
4040 Removed.
4041 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
4042 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
4043 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
4044 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
4045 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
4046
4047 * include/grub/types.h (grub_off_t): Unconditionally set to
4048 grub_uint64_t.
4049 (grub_disk_addr_t): Changed to grub_uint64_t.
4050
4051 * include/grub/partition.h (struct grub_partition): Change the
4052 types of "start", "len" and "offset" to grub_disk_addr_t,
4053 grub_uint64_t and grub_disk_addr_t, respectively.
4054 (grub_partition_get_start): Return grub_disk_addr_t.
4055 (grub_partition_get_len): Return grub_uint64_t.
4056
4057 * include/grub/misc.h (grub_strtoull): New prototype.
4058 (grub_divmod64): Likewise.
4059
4060 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4061 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4062 grub_off_t, respectively.
4063 All callers and references changed.
4064
4065 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4066 grub_size_t in "read".
4067 All callers and references changed.
4068
4069 * include/grub/file.h (struct grub_file): Change the types of
4070 "offset" and "size" to grub_off_t and grub_off_t,
4071 respectively. Change the type of SECTOR to grub_disk_addr_t in
4072 "read_hook".
4073 (grub_file_read): Change the type of LEN to grub_size_t.
4074 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4075 grub_off_t.
4076 (grub_file_size): Return grub_off_t.
4077 (grub_file_tell): Likewise.
4078 All callers and references changed.
4079
4080 * include/grub/disk.h (struct grub_disk_dev): Change the types of
4081 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4082 "write".
4083 (struct grub_disk): Change the type of "total_sectors" to
4084 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4085 "read_hook".
4086 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4087 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4088 (grub_disk_write): Likewise.
4089 All callers and references changed.
4090
4091 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4092 char * for grub_strncmp to silence gcc.
4093 (grub_iso9660_mount): Likewise.
4094 (grub_iso9660_mount): Likewise.
4095 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4096 return statement.
4097 (grub_iso9660_iterate_dir): Likewise.
4098 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4099
4100 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4101 LEN to grub_disk_addr_t and grub_size_t, respectively.
4102
4103 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4104
4105 * fs/jfs.c (grub_jfs_read_file): Likewise.
4106
4107 * fs/minix.c (grub_jfs_read_file): Likewise.
4108
4109 * fs/sfs.c (grub_jfs_read_file): Likewise.
4110
4111 * fs/ufs.c (grub_jfs_read_file): Likewise.
4112
4113 * fs/xfs.c (grub_jfs_read_file): Likewise.
4114
4115 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4116 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4117 respectively.
4118
4119 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4120 BLKNR to -1 instead of returning GRUB_ERRNO.
4121 (grub_ext2_read_file): Change the types of SECTOR and
4122 LEN to grub_disk_addr_t and grub_size_t, respectively.
4123
4124 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4125 LEN to grub_disk_addr_t and grub_size_t, respectively.
4126
4127 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4128 grub_file_read.
4129
4130 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4131 string. Do not cast SECTOR explicitly.
4132
4133 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4134 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4135 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4136 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4137 over 2TB and LBA mode is not supported, raise an error.
4138 (get_safe_sectors): New function.
4139 (grub_biosdisk_read): Use get_safe_sectors.
4140 (grub_biosdisk_write): Likewise.
4141
4142 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4143 (grub_efidisk_write): Likewise.
4144
4145 * disk/loopback.c (delete_loopback): Cosmetic changes.
4146 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4147 correctly.
4148 (grub_loopback_open): Likewise.
4149 (grub_loopback_read): Likewise. Also, change the type of POS to
4150 grub_off_t, and fix the usage of grub_memset.
4151
4152 * commands/i386/pc/play.c: Include grub/machine/time.h.
4153
4154 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4155 print FILE->SIZE.
4156
4157 * commands/configfile.c: Include grub/env.h.
4158
4159 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4160 GRUB_ERRNO directly instead. Change the type of POS to
4161 grub_off_t. Follow the coding standard.
4162
4163 * commands/blocklist.c: Include grub/partition.h.
4164 (grub_cmd_blocklist): Return an error if the underlying device is
4165 not a disk. Take the starting sector of a partition into account,
4166 if a partition is used.
4167
4168 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4169 a length field.
4170 (lba_mode): Support 64-bit addresses.
4171 (chs_mode): Likewise.
4172 (copy_buffer): Adapted to the new offsets of a length field and a
4173 segment field.
4174 (blocklist_default_start): Allocate 64-bit space.
4175
4176 * boot/i386/pc/boot.S (force_lba): Removed.
4177 (boot_drive): Moved to under KERNEL_SECTOR.
4178 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
4179 space.
4180 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
4181 is useless.
4182 (lba_mode): Refactored to support a 64-bit address. More size
4183 optimization.
4184 (setup_sectors): Likewise.
4185
53af98ad 41862006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4187
4188 * DISTLIST: Added include/grub/i386/linux.h. Removed
4189 include/grub/i386/pc/linux.h
4190
4191 * configure.ac (AC_INIT): Bumped to 1.94.
4192
4193 * config.guess: Updated from gnulib.
4194 * config.sub: Likewise.
4195 * install-sh: Likewise.
4196 * mkinstalldirs: Likewise.
4197
b4c1940a 41982006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4199
4200 * conf/common.rmk (grub_modules_init.lst): Depended on
4201 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
4202 MODSRCFILES.
4203
4204 * genmk.rb (PModule::rule): Reverted the previous change.
4205
cfca1cfd 42062006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4207
4208 * conf/common.rmk (grub_modules_init.lst): Depends on
4209 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
4210 that the target does not exist before producing.
4211 (grub_modules_init.h): Remove the target before generating.
4212 (grub_emu_init.c): Likewise.
4213
4214 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
4215
aa6d7826 42162006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
4217
4218 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
4219 for the target-specific tests. Make sure that we also have the
4220 up-to-date target variables for those tests.
4221
26c607b9 42222006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4223
4224 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
4225 (PModule::rule): Likewise.
4226
0162321a 42272006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4228
4229 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
4230 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
4231 target-specific flags should be prefixed.
4232 (PModule::rule): Likewise.
4233
6c826348 42342006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
4235
4236 * configure.ac (CMP): Check if cmp is available explicitly.
4237
b977bf01 42382006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
4239
4240 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
4241 (target_cpu): New variable.
4242 (pkglibdir): Use target_cpu instead of host_cpu.
4243
4244 * util/i386/pc/grub-install.in (host_cpu): Removed.
4245 (target_cpu): New variable.
4246 (pkglibdir): Use target_cpu instead of host_cpu.
4247
4248 * util/genmoddep.c: Removed.
4249
4250 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
4251 instead of GRUB_HOST_SIZEOF_VOID_P.
4252 * kern/dl.c: Likewise.
4253
4254 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
4255 ...
4256 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4257 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4258 (GRUB_TARGET_SIZEOF_LONG): ... this.
4259 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4260 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4261 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4262 to ...
4263 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4264 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4265 (GRUB_TARGET_SIZEOF_LONG): ... this.
4266 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4267 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4268 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4269 to ...
4270 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4271 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4272 (GRUB_TARGET_SIZEOF_LONG): ... this.
4273 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4274 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4275
4276 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
4277 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
4278 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
4279 instead of GRUB_HOST_SIZEOF_LONG.
4280 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
4281 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
4282 GRUB_CPU_WORDS_BIGENDIAN.
4283 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
4284 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
4285 grub_host_ssize_t.
4286
4287 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
4288 (genmoddep_SOURCES): Likewise.
4289 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
4290 (genmoddep_SOURCES): Likewise.
4291 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
4292 (genmoddep_SOURCES): Likewise.
4293 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
4294 Likewise.
4295 (genmoddep_SOURCES): Likewise.
4296
4297 * genmoddep.awk: New file.
4298
4299 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
4300 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
4301 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
4302 (PModule::rule): Likewise.
4303 (Program::rule): Likewise.
4304 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
4305 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
4306 respectively.
4307
4308 * configure.ac: Rewritten intensively to use host and target
4309 instead of build and host, respectively.
4310
4311 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
4312 (host_cpu): Removed.
4313 (target_cpu): New variable.
4314 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
4315 (BUILD_CC): Removed.
4316 (BUILD_CFLAGS): Likewise.
4317 (BUILD_CPPFLAGS): Likewise.
4318 (TARGET_CC): New variable.
4319 (TARGET_CFLAGS): Likewise.
4320 (TARGET_CPPFLAGS): Likewise.
4321 (TARGET_LDFLAGS): Likewise.
4322 (AWK): Likewise.
4323 (include): Use target_cpu instead of host_cpu.
4324 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
4325
4326 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
4327
f09771a1 43282006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
4329
4330 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
4331 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
4332 field 'false' to 'exec_on_false'.
4333 (grub_script_create_cmdif): Renamed argument names to reflect above
4334 changes.
4335
4336 * normal/execute.c (grub_script_execute_cmdif): Likewise.
4337
4338 * normal/script.c (grub_script_create_cmdif): Likewise.
4339
118f4fb3 43402006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
4341
4342 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
4343 top.
4344 (grub_hfsplus_btree_recptr): Likewise.
4345 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
4346 FILEBLOCK both to pass a block number and store next block
4347 number.
4348 (grub_hfsplus_read_block): Rewritten heavily to support an extent
4349 overflow file correctly. Specify errors appropriately, because
4350 fshelp expects that GRUB_ERRNO is set when fails. Reuse
4351 grub_hfsplus_btree_recptr to get the pointer to a found key.
4352 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
4353 is found.
4354
4355 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
4356 linux.mod.
4357 (_linux_mod_SOURCES): New variable.
4358 (_linux_mod_CFLAGS): Likewise.
4359 (_linux_mod_LDFLAGS): Likewise.
4360 (linux_mod_SOURCES): Likewise.
4361 (linux_mod_CFLAGS): Likewise.
4362 (linux_mod_LDFLAGS): Likewise.
4363
4364 * DISTLIST: Added loader/i386/efi/linux.c,
4365 loader/i386/efi/linux_normal.c and
4366 include/grub/i386/efi/loader.h.
4367
4368 * loader/i386/efi/linux.c: New file.
4369 * loader/i386/efi/linux_normal.c: Likewise.
4370 * include/grub/i386/efi/loader.h: Likewise.
4371
89a7d726 43722006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
4373
4374 * commands/blocklist.c: New file.
4375
4376 * DISTLIST: Added commands/blocklist.c.
4377
4378 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 4379 color for the background, and a darker color for the foreground.
89a7d726 4380 (grub_console_checkkey): Return READ_KEY.
4381 (grub_console_cls): Set the background to
4382 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
4383
4384 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
4385
4386 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
4387 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
4388
4389 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
4390 prototype.
4391
4392 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
4393 BG. The spec is wrong again.
4394
4395 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
4396 prototype.
4397 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
4398
4399 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4400 commands/blocklist.c.
4401 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4402
4403 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
4404 (blocklist_mod_SOURCES): New variable.
4405 (blocklist_mod_CFLAGS): Likewise.
4406 (blocklist_mod_LDFLAGS): Likewise.
4407
75c8f258 44082006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
4409
4410 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
4411 duplication.
4412 (lba_mode): Use %eax more intensively to reduce the code size.
4413
da2eb181 44142006-05-20 Marco Gerards <marco@gnu.org>
4415
4416 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
4417
4418 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
4419 for `menuentry'.
4420 (script): Accept leading newlines.
4421 (newlines): New rule to describe 0 or more newlines.
4422 (commands): Accept `command' with trailing newline. Fixed the
4423 order in which arguments were passed to `grub_script_add_cmd'.
4424 Accept commands separated by newlines.
4425 (function): Changed to accept newlines.
4426 (menuentry) Rewritten.
4427
4428 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
4429 front of the list, instead of to the end.
4430
577b4050 44312006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
4432
4433 * util/i386/pc/grub-install.in (bindir): New variable.
4434 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
4435 Shaver <lbgwjl@gmail.com>.
4436
0d6e1189 44372006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
4438
4439 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
4440 grub/machine/linux.h
4441 * loader/i386/pc/linux.c: Likewise.
4442
4443 * include/grub/i386/pc/linux.h: Moved to ...
4444 * include/grub/i386/linux.h: ... here.
4445
4446 * include/grub/i386/linux.h (struct linux_kernel_params): New
4447 struct.
4448
31b86e9f 44492006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
4450
4451 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
4452 checking.
4453 (grub_video_vbe_blit_glyph): Likewise.
4454 (grub_video_vbe_blit_bitmap): Likewise.
4455 (grub_video_vbe_blit_render_target): Likewise.
4456
83b984de 44572006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
4458
4459 * configure.ac (--with-platform): Properly quote the square
4460 brackets.
4461
5f0413bd 44622006-05-08 Marco Gerards <marco@gnu.org>
4463
4464 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
4465 this...
4466 (kernel_elf_HEADERS): ...to this. Updated all users.
4467 (grubof_symlist.c): Renamed from this...
4468 (kernel_elf_symlist.c): ...to this. Updated all users.
4469 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4470 (grubof_SOURCES): Renamed from this...
4471 (kernel_elf_SOURCES): ...to this.
4472 (grubof_HEADERS): Renamed from this...
4473 (kernel_elf_HEADERS): ...to this.
4474 (grubof_CFLAGS): Renamed from this...
4475 (kernel_elf_CFLAGS): ...to this.
4476 (grubof_ASFLAGS): Renamed from this...
4477 (kernel_elf_ASFLAGS): ...to this.
4478 (grubof_LDFLAGS): Renamed from this...
4479 (kernel_elf_LDFLAGS): ...to this.
4480
4481 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
4482 this...
4483 (kernel_elf_HEADERS): ...to this. Updated all users.
4484 (grubof_symlist.c): Renamed from this...
4485 (kernel_elf_symlist.c): ...to this. Updated all users.
4486 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4487 (grubof_SOURCES): Renamed from this...
4488 (kernel_elf_SOURCES): ...to this.
4489 (grubof_HEADERS): Renamed from this...
4490 (kernel_elf_HEADERS): ...to this.
4491 (grubof_CFLAGS): Renamed from this...
4492 (kernel_elf_CFLAGS): ...to this.
4493 (grubof_ASFLAGS): Renamed from this...
4494 (kernel_elf_ASFLAGS): ...to this.
4495 (grubof_LDFLAGS): Renamed from this...
4496 (kernel_elf_LDFLAGS): ...to this.
4497
4498 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
4499 `kernel.elf' instead of `grubof'.
4500
05568c2e 45012006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
4502
4503 Add --with-platform to configure. Use pkglibdir instead of
4504 pkgdatadir. This is reported by Roger Leigh.
4505
4506 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
4507 (host_vendor): Likewise.
4508 (host_os): Likewise.
4509 (pkgdatadir): Likewise.
4510 (platform): New variable.
4511 (pkglibdir): Likewise.
4512 Use PKGLIBDIR instead of PKGDATADIR.
4513
4514 * util/i386/pc/grub-install.in (datadir): Removed.
4515 (host_vendor): Likewise.
4516 (host_os): Likewise.
4517 (pkgdatadir): Likewise.
4518 (platform): New variable.
4519 (pkglibdir): Likewise.
4520 Use PKGLIBDIR instead of PKGDATADIR.
4521
4522 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
4523 instead of GRUB_DATADIR.
4524 (main): Likewise.
4525 * util/i386/pc/grub-mkimage.c (usage): Likewise.
4526 (main): Likewise.
4527 * util/i386/efi/grub-mkimage.c (usage): Likewise.
4528 (main): Likewise.
4529
4530 * configure.ac (--with-platform): New option.
4531 Use PLATFORM instead of HOST_VENDOR to specify a platform.
4532
4533 * Makefile.in: Include a makefile based on PLATFORM instead of
4534 HOST_VENDOR.
4535 (pkgdatadir): Not appended by the machine type.
4536 (pkglibdir): Appended by the machine type.
4537 (host_vendor): Removed.
4538 (platform): New variable.
4539 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
4540 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
4541 (uninstall): Likewise.
4542
4e93851c 45432006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
4544
4545 Use the environment context in the menu. Remove the commands
4546 "default" and "timeout", and use variables instead.
4547
4548 * normal/menu.c: Include grub/env.h.
4549 (print_entry): Cast TITLE to silence gcc.
4550 (get_timeout): New function.
4551 (set_timeout): Likewise.
4552 (get_entry_number): Likewise.
4553 (run_menu): Use a default entry, a fallback entry and a timeout
4554 in the environment variables "default", "fallback" and
4555 "timeout". Also, tweak the default entry if it is not within the
4556 current menu entries.
4557 (grub_menu_run): Use a fallback entry in the environment variable
4558 "fallback".
4559
4560 * normal/main.c (read_config_file): Do not initialize
4561 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
4562 NEWMENU->TIMEOUT.
4563 (grub_normal_execute): Use a data slot to store the menu.
4564
4565 * include/grub/normal.h (struct grub_menu): Removed default_entry,
4566 fallback_entry and timeout.
4567 (struct grub_menu_list): Removed.
4568 (grub_menu_list_t): Likewise.
4569 (struct grub_context): Likewise.
4570 (grub_context_t): Likewise.
4571 (grub_context_get): Likewise.
4572 (grub_context_get_current_menu): Likewise.
4573 (grub_context_push_menu): Likewise.
4574 (grub_context_pop_menu): Likewise.
4575 (grub_default_init): Likewise.
4576 (grub_default_fini): Likewise.
4577 (grub_timeout_init): Likewise.
4578 (grub_timeout_fini): Likewise.
4579
4580 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
4581 and timeout.mod.
4582 (normal_mod_SOURCES): Removed normal/context.c.
4583
4584 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
4585 commands/default.c, commands/timeout.c and normal/context.c.
4586 (normal_mod_SOURCES): Removed normal/context.c.
4587
4588 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
4589 commands/timeout.c and normal/context.c.
4590 (normal_mod_SOURCES): Removed normal/context.c.
4591
4592 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
4593 commands/default.c, commands/timeout.c and normal/context.c.
4594 (normal_mod_SOURCES): Removed normal/context.c.
4595
4596 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
4597 timeout.mod.
4598 (default_mod_SOURCES): Removed.
4599 (default_mod_CFLAGS): Likewise.
4600 (default_mod_LDFLAGS): Likewise.
4601 (timeout_mod_SOURCES): Removed.
4602 (timeout_mod_CFLAGS): Likewise.
4603 (timeout_mod_LDFLAGS): Likewise.
4604
4605 * DISTLIST: Removed commands/default.c, commands/timeout.c and
4606 normal/context.c.
4607
4608 * commands/default.c: Removed.
4609 * commands/timeout.c: Likewise.
4610 * normal/context.c: Likewise.
4611
1eb9cc1d 46122006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
4613
4614 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
4615
385bd9c1 46162006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
4617
4618 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
4619 "next" to "prev" for readability.
4620 (struct grub_env_sorted_var): New struct.
4621 (grub_env_context): Renamed to ...
4622 (initial_context): ... this.
4623 (grub_env_var_context): Renamed to ...
4624 (current_context): ... this.
4625 (grub_env_find): Look only at CURRENT_CONTEXT.
4626 (grub_env_context_open): Rewritten to copy exported variables from
4627 previous context.
4628 (grub_env_context_close): Rewritten according to the new
4629 scheme. Also, add an assertion to prevent the initial context from
4630 removed.
4631 (grub_env_insert): Removed the code for the sorted list.
4632 (grub_env_remove): Likewise.
4633 (grub_env_export): Simply mark the variable with
4634 GRUB_ENV_VAR_GLOBAL.
4635 (grub_env_set): A cosmetic change for naming consistency.
4636 (grub_env_get): Likewise.
4637 (grub_env_unset): Likewise.
4638 (grub_env_iterate): Rewritten to sort variables within this
4639 function.
4640 (grub_register_variable_hook): Fixed for naming consistency. Call
4641 grub_env_find again, only if NAME is not found at the first time.
4642 (mangle_data_slot_name): New function.
4643 (grub_env_set_data_slot): Likewise.
4644 (grub_env_get_data_slot): Likewise.
4645 (grub_env_unset_data_slot): Likewise.
4646
4647 * include/grub/env.h (grub_env_var_type): New enum.
4648 (GRUB_ENV_VAR_LOCAL): New constant.
4649 (GRUB_ENV_VAR_GLOBAL): Likewise.
4650 (GRUB_ENV_VAR_DATA): Likewise.
4651 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
4652 "type".
4653 (grub_env_set): Replace VAR with NAME for consistency.
4654 (grub_register_variable_hook): Likewise.
4655 (grub_env_export): Specify the name of the argument.
4656 (grub_env_set_data_slot): New prototype.
4657 (grub_env_get_data_slot): Likewise.
4658 (grub_env_unset_data_slot): Likewise.
4659
7f362539 46602006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4661
4662 Extend the loader so that GRUB can accept a loader which comes
4663 back to GRUB when a loaded image exits. Also, this change adds
4664 support for a chainloader on EFI.
4665
4666 * term/efi/console.c: Include grub/misc.h.
4667 (grub_console_checkkey): Display a scan code on the top for
4668 debugging. This will be removed once the EFI port gets stable.
4669 Correct the scan code mapping.
4670
4671 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
4672 allocate memory from larger regions, in order to reduce the number
4673 of allocated regions. Otherwise, the MacOSX loader panics.
4674 (filter_memory_map): Avoid less than 1MB for compatibility with
4675 other loaders.
4676 (add_memory_regions): Allocate from the tail of a region, if
4677 possible, to avoid allocating a region near to 1MB, for the MacOSX
4678 loader.
4679
4680 * kern/efi/init.c (grub_efi_set_prefix): Specify
4681 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
4682
4683 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
4684 argument IMAGE_HANDLE and specify it to get a loaded image.
4685 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
4686 grub_efi_get_loaded_image.
4687 (grub_efi_get_filename): Divide the legnth by the size of
4688 grub_efi_char16_t.
4689 (grub_efi_get_device_path): New function.
4690 (grub_efi_print_device_path): Print End Device Path nodes. Divide
4691 the length by the size of grub_efi_char16_t for a file path device
4692 path node.
4693
4694 * kern/loader.c (grub_loader_noreturn): New variable.
4695 (grub_loader_set): Accept a new argument NORETURN. Set
4696 GRUB_LOADER_NORETURN to NORETURN.
4697 All callers changed.
4698 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
4699 grub_machine_fini.
4700
4701 * include/grub/efi/efi.h (grub_efi_get_device_path): New
4702 prototype.
4703 (grub_efi_get_loaded_image): Take an argument to specify an image
4704 handle.
4705
4706 * include/grub/loader.h (grub_loader_set): Added one more argument
4707 NORETURN.
4708
4709 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
4710 instead of grub_efi_open_protocol.
4711 (grub_efidisk_get_device_name): Likewise.
4712 (grub_efidisk_close): Print a newline.
4713 (grub_efidisk_get_device_handle): Fixed to use
4714 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
4715 GRUB_EFI_DEVICE_PATH_TYPE.
4716
4717 * disk/efi/efidisk.c (device_path_guid): Moved to ...
4718 * kern/efi/efi.c (device_path_guid): ... here.
4719
4720 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
4721 chain.mod.
4722 (kernel_mod_HEADERS): Added efi/disk.h.
4723 (_chain_mod_SOURCES): New variable.
4724 (_chain_mod_CFLAGS): Likewise.
4725 (_chain_mod_LDFLAGS): Likewise.
4726 (chain_mod_SOURCES): Likewise.
4727 (chain_mod_CFLAGS): Likewise.
4728 (chain_mod_LDFLAGS): Likewise.
4729
4730 * DISTLIST: Added include/grub/efi/chainloader.h,
4731 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
4732
4733 * include/grub/efi/chainloader.h: New file.
4734 * loader/efi/chainloader.c: Likewise.
4735 * loader/efi/chainloader_normal.c: Likewise.
4736
c0111d6e 47372006-04-30 Marco Gerards <marco@gnu.org>
4738
4739 * commands/configfile.c (grub_cmd_source): New function.
4740 (GRUB_MOD_INIT): Register the commands `source' and `.'.
4741 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
4742
df5341da 47432006-04-30 Marco Gerards <marco@gnu.org>
4744
4745 * normal/execute.c (grub_script_execute_cmd): Change the return
4746 type to `grub_err_t'. Correctly return the error.
4747 (grub_script_execute_cmdline): In case a command line is not a
4748 command or a function, try to interpret it as an assignment.
4749
f85934bd 47502006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4751
4752 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
4753 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
4754 skip a node whose name is obviously invalid as UTF-16,
4755 i.e. contains a NUL character. Stop the iteration when the last
4756 directory entry is found. Instead of using the return value of
4757 grub_hfsplus_btree_iterate_node, store the value in RET and use
4758 it, because the iterator can be stopped by the last directory
4759 entry.
4760
8f8a2cf8 47612006-04-30 Marco Gerards <marco@gnu.org>
4762
4763 * include/grub/env.h (grub_env_export): New prototype. Reported
4764 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
4765
a27e84ce 47662006-04-30 Marco Gerards <marco@gnu.org>
4767
4768 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
4769 size of the extents in a catalog file record.
4770
eaef0553 47712006-04-29 Marco Gerards <marco@gnu.org>
4772
4773 * commands/configfile.c (grub_cmd_configfile): Execute the
4774 configfile within its own context.
4775
4776 * include/grub/env.h (grub_env_context_open): New prototype.
4777 (grub_env_context_close): Likewise.
4778
4779 * kern/env.c (grub_env): Removed.
4780 (grub_env_sorted): Likewise.
4781 (grub_env_context): New variable.
4782 (grub_env_var_context): Likewise.
4783 (grub_env_find): Search both the active context and the global
4784 context.
4785 (grub_env_context_open): New function.
4786 (grub_env_context_close): Likewise.
4787 (grub_env_insert): Likewise.
4788 (grub_env_remove): Likewise.
4789 (grub_env_export): Likewise.
4790 (grub_env_set): Changed to use helper functions to avoid code
4791 duplication.
4792 (grub_env_iterate): Rewritten so both the current context and the
4793 global context are being used.
4794
4795 * normal/command.c (export_command): New function.
4796 (grub_command_init): Register the `export' function.
4797
7b455f4d 47982006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
4799
4800 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
4801 explicitly to suppress gcc's warnings.
4802 * fs/fat.c (grub_fat_find_dir): Likewise.
4803 (grub_fat_label): Likewise.
4804 * fs/xfs.c (grub_xfs_read_inode): Likewise.
4805 (grub_xfs_mount): Likewise.
4806 (grub_xfs_label): Likewise.
4807 * fs/affs.c (grub_affs_mount): Likewise.
4808 (grub_affs_label): Likewise.
4809 (grub_affs_iterate_dir): Likewise.
4810 * fs/sfs.c (grub_sfs_mount): Likewise.
4811 (grub_sfs_iterate_dir): Likewise.
4812 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
4813 * fs/hfs.c (grub_hfs_mount): Likewise.
4814 (grub_hfs_cmp_catkeys): Likewise.
4815 (grub_hfs_find_dir): Likewise.
4816 (grub_hfs_dir): Likewise.
4817 (grub_hfs_label): Likewise.
4818 * fs/jfs.c (grub_jfs_mount): Likewise.
4819 (grub_jfs_opendir): Likewise.
4820 (grub_jfs_getent): Likewise.
4821 (grub_jfs_lookup_symlink): Likewise.
4822 (grub_jfs_label): Likewise.
4823 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
4824 (grub_hfsplus_iterate_dir): Likewise.
4825 (grub_hfsplus_btree_iterate_node): Made static.
4826
4827 * util/grub-emu.c (prefix): New variable.
4828 (grub_machine_set_prefix): New function.
4829 (main): Do not set the environment variable "prefix" here. Only
4830 set PREFIX, which is used later by grub_machine_set_prefix.
4831
4832 * include/grub/video.h: Do not include grub/symbol.h.
4833 (grub_video_register): Not exported. This symbol is not defined in
4834 the kernel.
4835 (grub_video_unregister): Likewise.
4836 (grub_video_iterate): Likewise.
4837 (grub_video_setup): Likewise.
4838 (grub_video_restore): Likewise.
4839 (grub_video_get_info): Likewise.
4840 (grub_video_get_blit_format): Likewise.
4841 (grub_video_set_palette): Likewise.
4842 (grub_video_get_palette): Likewise.
4843 (grub_video_set_viewport): Likewise.
4844 (grub_video_get_viewport): Likewise.
4845 (grub_video_map_color): Likewise.
4846 (grub_video_map_rgb): Likewise.
4847 (grub_video_map_rgba): Likewise.
4848 (grub_video_fill_rect): Likewise.
4849 (grub_video_blit_glyph): Likewise.
4850 (grub_video_blit_bitmap): Likewise.
4851 (grub_video_blit_render_target): Likewise.
4852 (grub_video_scroll): Likewise.
4853 (grub_video_swap_buffers): Likewise.
4854 (grub_video_create_render_target): Likewise.
4855 (grub_video_delete_render_target): Likewise.
4856 (grub_video_set_active_render_target): Likewise.
4857
4858 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
4859 Undefined.
4860 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
4861
4862 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
4863 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4864 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4865 instead of $(srcdir)/genkernsyms.sh.
4866
4867 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
4868 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4869 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4870 instead of $(srcdir)/genkernsyms.sh.
4871
4872 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
4873 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4874 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4875 instead of $(srcdir)/genkernsyms.sh.
4876
4877 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
4878 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4879 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4880 instead of $(srcdir)/genkernsyms.sh.
4881
4882 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
4883 genkernsyms.sh.
4884
4885 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
4886 genkernsyms.sh.
4887 (gensymlist.sh): New target.
4888 (genkernsyms.sh): Likewise.
4889
4890 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
4891 genkernsyms.sh.in and gensymlist.sh.in.
4892
4893 * genkernsyms.sh: Removed.
4894 * gensymlist.sh: Likewise.
4895
4896 * genkernsyms.sh.in: New file.
4897 * gensymlist.sh.in: Likewise.
4898
1885bb27 48992006-04-25 Hollis Blanchard <hollis@penguinppc.org>
4900
4901 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
4902 clobber "prefix", since we may have already set it manually.
4903
71538dff 49042006-04-25 Hollis Blanchard <hollis@penguinppc.org>
4905
4906 * kern/misc.c (abort): New alias for grub_abort.
4907
2965c7cc 49082006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
4909
4910 A new machine-specific function "grub_machine_set_prefix" is
4911 defined. This is called after loading modules, so that a prefix
4912 initialization can use modules. Also, this change adds an
4913 intensive debugging feature for the memory manager via the
4914 configure option "--enable-mm-debug".
4915
4916 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
4917 PART.LEN.
4918
4919 * kern/sparc64/ieee1275/init.c (abort): Removed.
4920 (grub_stop): Likewise.
4921 (grub_exit): New function.
4922 (grub_set_prefix): Renamed to ...
4923 (grub_machine_set_prefix): ... this.
4924 (grub_machine_init): Do not call grub_set_prefix.
4925
4926 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
4927 (grub_machine_set_prefix): ... this.
4928 (grub_machine_init): Do not call grub_set_prefix.
4929
4930 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
4931 (grub_machine_init): Do not set the prefix here.
4932
4933 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
4934
4935 * kern/efi/init.c: Include grub/mm.h.
4936 (grub_efi_set_prefix): New function.
4937
4938 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
4939 (grub_efi_get_filename): New function.
4940 (grub_print_device_path): Renamed to ...
4941 (grub_efi_print_device_path): ... this.
4942
4943 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
4944 [MM_DEBUG] (grub_realloc): Likewise.
4945 [MM_DEBUG] (grub_free): Likewise.
4946 [MM_DEBUG] (grub_memalign): Likewise.
4947 [MM_DEBUG] (grub_mm_debug): New variable.
4948 [MM_DEBUG] (grub_debug_malloc): New function.
4949 [MM_DEBUG] (grub_debug_free): New function.
4950 [MM_DEBUG] (grub_debug_realloc): New function.
4951 [MM_DEBUG] (grub_debug_memalign): New function.
4952
4953 * kern/misc.c (grub_abort): Print a newline to distinguish
4954 the message.
4955
4956 * kern/main.c (grub_main): Call grub_machine_set_prefix and
4957 grub_set_root_dev after loading modules. This is necessary when
4958 setting a prefix depends on modules.
4959
4960 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
4961 (grub_efi_print_device_path): ... this.
4962 (grub_efi_get_filename): New prototype.
4963 (grub_efi_set_prefix): Likewise.
4964
4965 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
4966 and grub/disk.h.
4967 (grub_efidisk_get_device_handle): New prototype.
4968 (grub_efidisk_get_device_name): Likewise.
4969
4970 * include/grub/mm.h: Include config.h.
4971 (MM_DEBUG): Removed.
4972 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
4973 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
4974 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
4975 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
4976 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
4977 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
4978 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
4979 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
4980 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
4981
4982 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
4983
4984 * disk/efi/efidisk.c: Include grub/partition.h.
4985 (iterate_child_devices): New function.
4986 (add_device): First, compare only last device path nodes, so that
4987 devices are sorted by the types.
4988 (grub_efidisk_get_device_handle): New function.
4989 (grub_efidisk_get_device_name): Likewise.
4990
4991 * configure.ac (--enable-mm-debug): New option to enable the
4992 memory manager debugging feature. This makes the binary much
4993 bigger, so is disabled by default.
4994
9cacaa17 49952006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
4996
4997 Use grub_abort instead of grub_stop, and grub_exit must be
4998 define in each architecture now. Also, this change adds support
4999 for EFI disks.
5000
5001 * util/i386/pc/grub-probefs.c: Include grub/term.h.
5002 (grub_getkey): New function.
5003 (grub_term_get_current): Likewise.
5004
5005 * util/i386/pc/grub-setup.c: Include grub/term.h.
5006 (grub_getkey): New function.
5007 (grub_term_get_current): Likewise.
5008
5009 * util/misc.c (grub_stop): Renamed to ...
5010 (grub_exit): ... this.
5011
5012 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
5013 (grub_exit): ... this.
5014 (grub_machine_init): Use grub_abort instead of abort.
5015 (grub_stop): Removed.
5016
5017 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
5018 abort.
5019
5020 * kern/i386/pc/startup.S (grub_exit): New function.
5021 (cold_reboot): New label.
5022
5023 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
5024 (grub_efi_init): Call grub_efidisk_init.
5025 (grub_efi_fini): Call grub_efidisk_fini.
5026
5027 * kern/efi/efi.c: Include grub/mm.h.
5028 (grub_efi_console_control_guid): Renamed to ...
5029 (console_control_guid): ... this.
5030 (grub_efi_loaded_image_guid): Renamed to ...
5031 (loaded_image_guid): ... this.
5032 (grub_efi_locate_handle): New function.
5033 (grub_efi_open_protocol): Likewise.
5034 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
5035 GRUB_EFI_CONSOLE_CONTROL_GUID.
5036 (grub_efi_exit): Removed.
5037 (grub_stop): Likewise.
5038 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
5039 (grub_exit): New function.
5040 (grub_print_device_path): Likewise.
5041
5042 * kern/rescue.c (grub_rescue_cmd_exit): New function.
5043 (grub_enter_rescue_mode): Register "exit".
5044
5045 * kern/misc.c (grub_real_dprintf): A cosmetic change.
5046 (grub_abort): New function.
5047
5048 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5049
5050 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5051
5052 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5053
5054 * include/grub/efi/efi.h (grub_efi_exit): Removed.
5055 (grub_print_device_path): New prototype.
5056 (grub_efi_locate_handle): Likewise.
5057 (grub_efi_open_protocol): Likewise.
5058
5059 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5060 * disk/efi/efidisk.c: Likewise.
5061
5062 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5063
5064 * include/grub/efi/console_control.h
5065 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5066
5067 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5068 last 8 bytes as an array.
5069 (GRUB_EFI_DISK_IO_GUID): New macro.
5070 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5071 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5072 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5073 grub_uint8_t.
5074 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5075 (struct grub_efi_device_path): Rename the member "sub_type" to
5076 "subtype".
5077 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5078 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5079 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5080 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5081 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5082 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5083 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5084 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5085 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5086 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5087 (struct grub_efi_pci_device_path): New structure.
5088 (grub_efi_pci_device_path_t): New type.
5089 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5090 (struct grub_efi_pccard_device_path): New structure.
5091 (grub_efi_pccard_device_path_t): New type.
5092 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5093 (struct grub_efi_memory_mapped_device_path): New structure.
5094 (grub_efi_memory_mapped_device_path_t): New type.
5095 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5096 (struct grub_efi_vendor_device_path): New structure.
5097 (grub_efi_vendor_device_path_t): New type.
5098 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5099 (struct grub_efi_controller_device_path): New structure.
5100 (grub_efi_controller_device_path_t): New type.
5101 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5102 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5103 (struct grub_efi_acpi_device_path): New structure.
5104 (grub_efi_acpi_device_path_t): New type.
5105 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5106 (struct grub_efi_expanded_acpi_device_path): New structure.
5107 (grub_efi_expanded_acpi_device_path_t): New type.
5108 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5109 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5110 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5111 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5112 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5113 (struct grub_efi_atapi_device_path): New structure.
5114 (grub_efi_atapi_device_path_t): New type.
5115 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5116 (struct grub_efi_fibre_channel_device_path): New structure.
5117 (grub_efi_fibre_channel_device_path_t): New type.
5118 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5119 (struct grub_efi_1394_device_path): New structure.
5120 (grub_efi_1394_device_path_t): New type.
5121 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5122 (struct grub_efi_usb_device_path): New structure.
5123 (grub_efi_usb_device_path_t): New type.
5124 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5125 (struct grub_efi_usb_class_device_path): New structure.
5126 (grub_efi_usb_class_device_path_t): New type.
5127 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5128 (struct grub_efi_i2o_device_path): New structure.
5129 (grub_efi_i2o_device_path_t): New type.
5130 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5131 (struct grub_efi_mac_address_device_path): New structure.
5132 (grub_efi_mac_address_device_path_t): New type.
5133 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5134 (struct grub_efi_ipv4_device_path): New structure.
5135 (grub_efi_ipv4_device_path_t): New type.
5136 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5137 (struct grub_efi_ipv6_device_path): New structure.
5138 (grub_efi_ipv6_device_path_t): New type.
5139 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5140 (struct grub_efi_infiniband_device_path): New structure.
5141 (grub_efi_infiniband_device_path_t): New type.
5142 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5143 (struct grub_efi_uart_device_path): New structure.
5144 (grub_efi_uart_device_path_t): New type.
5145 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5146 (struct grub_efi_vendor_messaging_device_path): New structure.
5147 (grub_efi_vendor_messaging_device_path_t): New type.
5148 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5149 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5150 (struct grub_efi_hard_drive_device_path): New structure.
5151 (grub_efi_hard_drive_device_path_t): New type.
5152 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5153 (struct grub_efi_cdrom_device_path): New structure.
5154 (grub_efi_cdrom_device_path_t): New type.
5155 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5156 (struct grub_efi_vendor_media_device_path): New structure.
5157 (grub_efi_vendor_media_device_path_t): New type.
5158 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5159 (struct grub_efi_file_path_device_path): New structure.
5160 (grub_efi_file_path_device_path_t): New type.
5161 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5162 (struct grub_efi_protocol_device_path): New structure.
5163 (grub_efi_protocol_device_path_t): New type.
5164 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5165 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5166 (struct grub_efi_bios_device_path): New structure.
5167 (grub_efi_bios_device_path_t): New type.
5168 (struct grub_efi_disk_io): New structure.
5169 (grub_efi_disk_io_t): New type.
5170 (struct grub_efi_block_io_media): New structure.
5171 (grub_efi_block_io_media_t): New type.
5172 (struct grub_efi_block_io): New structure.
5173 (grub_efi_block_io_t): New type.
5174
5175 * include/grub/misc.h (grub_stop): Removed.
5176 (grub_exit): New prototype.
5177 (grub_abort): Likewise.
5178
5179 * include/grub/disk.h (enum grub_disk_dev_id): Added
5180 GRUB_DISK_DEVICE_EFIDISK_ID.
5181
5182 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
5183 disk/efi/efidisk.c.
5184 (kernel_syms.lst): Remove the target if an error occurs.
5185
49986a9f 51862006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
5187
5188 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
5189 as it was simply too buggy.
5190
970d3b8a 51912006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
5192
5193 * kern/misc.c (grub_lltoa): New function.
5194 (grub_vsprintf): Added support for the long long suffix,
5195 i.e. "ll".
5196
ff04ec24 51972006-04-20 Hollis Blanchard <hollis@penguinppc.org>
5198
5199 * Makefile.in (LDFLAGS): Add variable.
5200 (LD): Remove variable.
5201 * configure.ac: Add -m32 to LDFLAGS.
5202 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
5203 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
5204 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
5205 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
5206 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
5207 variables.
5208 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
5209 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
5210 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
5211
37e5e1a4 52122006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
5213
5214 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
5215 length for unknown glyph.
5216
c352d8dd 52172006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5218
2eab1c0d 5219 Add support for pre-loaded modules into the EFI port.
5220
5221 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
5222 completely. Accept one more argument DIR. The caller has changed.
5223
5224 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
5225
5226 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
5227 (grub_efi_loaded_image_guid): New variable.
5228 (grub_efi_get_loaded_image): New function.
5229 (grub_arch_modules_addr): Likewise.
5230
5231 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
5232 prototype.
5233
5234 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
5235 (struct grub_efi_loaded_image): New structure.
5236 (grub_efi_loaded_image_t): New type.
5237
52382006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5239
c352d8dd 5240 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
5241 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
5242 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
5243
6d01d6b4 52442006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
5245
5246 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
5247
976a4ea0 52482006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
5249
5250 * DISTLIST: Added include/grub/efi/console.h,
5251 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
5252 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5253
5254 * include/grub/efi/console.h: New file.
5255 * include/grub/efi/time.h: Likewise.
5256 * include/grub/i386/efi/kernel.h: Likewise.
5257 * kern/efi/init.c: Likewise.
5258 * kern/efi/mm.c: Likewise.
5259 * term/efi/console.c: Likewise.
5260
5261 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
5262 (grub_stop): Removed.
5263 (grub_get_rtc): Likewise.
5264 (grub_machine_init): Simply call grub_efi_init.
5265 (grub_machine_fini): Call grub_efi_fini.
5266
5267 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
5268 (grub_efi_output_string): Removed.
5269 (grub_efi_stall): New function.
5270 (grub_stop): Likewise.
5271 (grub_get_rtc): Likewise.
5272
5273 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
5274 (grub_efi_stall): New prototype.
5275 (grub_efi_allocate_pages): Likewise.
5276 (grub_efi_free_pages): Likewise.
5277 (grub_efi_get_memory_map): Likewise.
5278 (grub_efi_mm_init): Likewise.
5279 (grub_efi_mm_fini): Likewise.
5280 (grub_efi_init): Likewise.
5281 (grub_efi_fini): Likewise.
5282
5283 * include/grub/i386/efi/time.h: Do not include
5284 grub/symbol.h. Include grub/efi/time.h.
5285 (GRUB_TICKS_PER_SECOND): Removed.
5286 (grub_get_rtc): Likewise.
5287
5288 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
5289 Added padding. The EFI spec is buggy.
5290 (GRUB_EFI_BLACK): New macro.
5291 (GRUB_EFI_BLUE): Likewise.
5292 (GRUB_EFI_GREEN): Likewise.
5293 (GRUB_EFI_CYAN): Likewise.
5294 (GRUB_EFI_RED): Likewise.
5295 (GRUB_EFI_MAGENTA): Likewise.
5296 (GRUB_EFI_BROWN): Likewise.
5297 (GRUB_EFI_LIGHTGRAY): Likewise.
5298 (GRUB_EFI_BRIGHT): Likewise.
5299 (GRUB_EFI_DARKGRAY): Likewise.
5300 (GRUB_EFI_LIGHTBLUE): Likewise.
5301 (GRUB_EFI_LIGHTGREEN): Likewise.
5302 (GRUB_EFI_LIGHTCYAN): Likewise.
5303 (GRUB_EFI_LIGHTRED): Likewise.
5304 (GRUB_EFI_LIGHTMAGENTA): Likewise.
5305 (GRUB_EFI_YELLOW): Likewise.
5306 (GRUB_EFI_WHITE): Likewise.
5307 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
5308 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
5309 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
5310 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
5311 (GRUB_EFI_BACKGROUND_RED): Likewise.
5312 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
5313 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
5314 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
5315 (GRUB_EFI_TEXT_ATTR): Likewise.
5316
5317 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
5318 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5319 (kernel_mod_HEADERS): Added efi/time.h.
5320
83709125 53212006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
5322
5323 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
5324 include/grub/efi/api.h, include/grub/efi/console_control.h,
5325 include/grub/efi/efi.h, include/grub/efi/pe32.h,
5326 include/grub/i386/efi/time.h, kern/efi/efi.c,
5327 kern/i386/efi/init.c, kern/i386/efi/startup.S,
5328 and util/i386/efi/grub-mkimage.c.
5329
5330 * Makefile.in (RMKFILES): Added i386-efi.rmk.
5331
5332 * genmk.rb (PModule#rule): Do not export symbols if
5333 #{prefix}_EXPORTS is set to "no".
5334
5335 * conf/i386-efi.mk: New file.
5336 * conf/i386-efi.rmk: Likewise.
5337 * include/grub/efi/api.h: Likewise.
5338 * include/grub/efi/console_control.h: Likewise.
5339 * include/grub/efi/efi.h: Likewise.
5340 * include/grub/efi/pe32.h: Likewise.
5341 * include/grub/i386/efi/time.h: Likewise.
5342 * kern/efi/efi.c: Likewise.
5343 * kern/i386/efi/init.c: Likewise.
5344 * kern/i386/efi/startup.S: Likewise.
5345 * util/i386/efi/grub-mkimage.c: Likewise.
5346
53472006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 5348
5349 * include/grub/script.h: Include <grub/parser.h> and
5350 "grub_script.tab.h".
5351 (struct grub_lexer_param): New struct.
5352 (struct grub_parser_param): Likewise.
5353 (grub_script_create_arglist): Pass the state in an argument.
5354 (grub_script_add_arglist): Likewise.
5355 (grub_script_create_cmdline): Likewise.
5356 (grub_script_create_cmdblock): Likewise.
5357 (grub_script_create_cmdif): Likewise.
5358 (grub_script_create_cmdmenu): Likewise.
5359 (grub_script_add_cmd): Likewise.
5360 (grub_script_arg_add): Likewise.
5361 (grub_script_lexer_ref): Likewise.
5362 (grub_script_lexer_deref): Likewise.
5363 (grub_script_lexer_record_start): Likewise.
5364 (grub_script_lexer_record_stop): Likewise.
5365 (grub_script_mem_record): Likewise.
5366 (grub_script_mem_record_stop): Likewise.
5367 (grub_script_malloc): Likewise.
5368 (grub_script_yylex): Likewise.
5369 (grub_script_yyparse): Likewise.
5370 (grub_script_yyerror): Likewise.
5371 (grub_script_yylex): Likewise.
5372 (grub_script_lexer_init): Return the state.
5373
5374 * normal/lexer.c (grub_script_lexer_state): Removed variable.
5375 (grub_script_lexer_done): Likewise.
5376 (grub_script_lexer_getline): Likewise.
5377 (grub_script_lexer_refs): Likewise.
5378 (script): Likewise.
5379 (newscript): Likewise.
5380 (record): Likewise.
5381 (recording): Likewise.
5382 (recordpos): Likewise.
5383 (recordlen): Likewise.
5384 (grub_script_lexer_init): Return the state instead of setting
5385 global variables.
5386 (grub_script_lexer_ref): Use the newly added argument for state
5387 instead of globals.
5388 (grub_script_lexer_deref): Likewise.
5389 (grub_script_lexer_record_start): Likewise.
5390 (grub_script_lexer_record_stop): Likewise.
5391 (recordchar): Likewise.
5392 (nextchar): Likewise.
5393 (grub_script_yylex2): Likewise.
5394 (grub_script_yylex): Likewise.
5395 (grub_script_yyerror): Likewise.
5396
5397 * normal/parser.y (func_mem): Removed variable.
5398 (menu_entry): Likewise.
5399 (err): Likewise.
5400 (%lex-param): New parser option.
5401 (%parse-param): Likewise.
5402 (script): Always return the AST.
5403 (argument): Pass the state around.
5404 (arguments): Likewise.
5405 (grubcmd): Likewise.
5406 (commands): Likewise.
5407 (function): Likewise.
5408 (menuentry): Likewise.
5409 (if_statement): Likewise.
5410 (if): Likewise.
5411
5412 * normal/script.c (grub_script_memused): Removed variable.
5413 (grub_script_parsed): Likewise.
5414 (grub_script_malloc): Added a state argument. Use that instead of
5415 global variables.
5416 (grub_script_mem_record): Likewise.
5417 (grub_script_mem_record_stop): Likewise.
5418 (grub_script_arg_add): Likewise.
5419 (grub_script_add_arglist): Likewise.
5420 (grub_script_create_cmdline): Likewise.
5421 (grub_script_create_cmdif): Likewise.
5422 (grub_script_create_cmdmenu): Likewise.
5423 (grub_script_add_cmd): Likewise.
5424 (grub_script_parse): Setup the state before calling the parser.
5425
e2a8c904 54262006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 5427
5428 * normal/command.c (grub_command_init): Remove the title command.
5429
5430 * normal/lexer.c (grub_script_yylex): Renamed from this...
5431 (grub_script_yylex2): ... to this.
5432 (grub_script_yylex): New function. Temporary
5433 introduced to filter some tokens.
5434 (grub_script_yyerror): Print a newline.
5435
5436 * normal/main.c (read_config_file): Output information about the
5437 lines that contain errors. Wait for a key after all lines have
5438 been processed. Don't return an empty menu.
5439
5440 * normal/parser.y (func_mem): Don't initialize.
5441 (menu_entry): Likewise.
5442 (err): New variable.
5443 (script): Don't return anything when an error was encountered.
5444 (ws, returns): Removed rules.
5445 (argument): Disabled concatenated variable support.
5446 (arguments): Remove explicit separators.
5447 (grubcmd): Likewise.
5448 (function): Likewise.
5449 (menuentry): Likewise.
5450 (if): Likewise.
5451 (commands): Likewise. Add error handling.
5452
5453 * normal/script.c (grub_script_create_cmdline): If
5454 `grub_script_parsed' is 0, assume the parser encountered an error.
5455
c9a86192 54562006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
5457
5458 * configure.ac: Add support for EFI. Fix the typo
5459 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
5460
70f3b243 54612006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5462
5463 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
5464 foreign multibyte characters should be shown correctly.
5465
65f201ad 54662006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5467
5468 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
5469 calculation.
5470 (read_config_file): Made it to close file before returning.
5471
b4b93674 54722006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
5473
5474 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
5475 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
5476 video/i386/pc/vbefill.c.
5477
5478 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
5479 video/i386/pc/vbefill.c.
5480
5481 * include/grub/video.h (grub_video_blit_format): New enum.
5482 (grub_video_mode_info): Added new member blit_format.
5483 (grub_video_get_blit_format): New function prototype.
5484
5485 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
5486 function prototype.
5487 (grub_video_vbe_map_rgb): Likewise.
5488 (grub_video_vbe_unmap_color): Likewise.
5489
5490 * include/grub/i386/pc/vbeblit.h: New file.
5491
5492 * include/grub/i386/pc/vbefill.h: New file.
5493
5494 * video/video.c (grub_video_get_blit_format): New function.
5495 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
5496 (grub_video_vbe_map_rgb): Likewise.
5497 (grub_video_vbe_unmap_color): Likewise.
5498
5499 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
5500 optimized fills.
5501 (grub_video_vbe_blit_render_target): Changed to use more optimized
5502 blits.
5503 (grub_video_vbe_setup): Added detection for optimized settings.
5504 (grub_video_vbe_create_render_target): Likewise.
5505
5506 * video/i386/pc/vbeblit.c: New file.
5507
5508 * video/i386/pc/vbefill.c: New file.
5509
c2379b9c 55102006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
5511
5512 * font/manager.c (grub_font_get_glyph): Removed font fixup from
5513 here...
5514
5515 * util/unifont2pff.rb: ... and moved it to here. Improved argument
5516 parsing to support both hex and dec ranges. If filename was missing
5517 show usage information.
5518
bd0d7896 55192006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
5520
5521 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
5522 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
5523
5524 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
5525 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
5526 (video_mod_SOURCES): Added.
5527 (video_mod_CFLAGS): Likewise.
5528 (video_mod_LDFLAGS): Likewise.
5529 (gfxterm_mod_SOURCES): Likewise.
5530 (gfxterm_mod_CFLAGS): Likewise.
5531 (gfxterm_mod_LDFLAGS): Likewise.
5532 (videotest_mod_SOURCES): Likewise.
5533 (videotest_mod_CFLAGS): Likewise.
5534 (videotest_mod_LDFLAGS): Likewise.
5535 (vesafb_mod_SOURCES): Removed.
5536 (vesafb_mod_CFLAGS): Likewise.
5537 (vesafb_mod_LDFLAGS): Likewise.
5538 (vga_mod_SOURCES): Likewise.
5539 (vga_mod_CFLAGS): Likewise.
5540 (vga_mod_LDFLAGS): Likewise.
5541
5542 * commands/videotest.c: New file.
5543
5544 * font/manager.c (fill_with_default_glyph): Modified to use
5545 grub_font_glyph.
5546 (grub_font_get_glyph): Likewise.
5547 (fontmanager): Renamed from this...
5548 (font_manager): ... to this.
5549
5550 * include/grub/font.h (grub_font_glyph): Added new structure.
5551 (grub_font_get_glyph): Modified to use grub_font_glyph.
5552
5553 * include/grub/misc.h (grub_abs): Added as inline function.
5554
5555 * include/grub/video.h: New file.
5556
5557 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
5558 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
5559 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
5560 (grub_vbe_get_controller_info): Renamed from this...
5561 (grub_vbe_bios_get_controller_info): ... to this.
5562 (grub_vbe_get_mode_info): Renamed from this...
5563 (grub_vbe_bios_get_mode_info): ... to this.
5564 (grub_vbe_set_mode): Renamed from this...
5565 (grub_vbe_bios_set_mode): ... to this.
5566 (grub_vbe_get_mode): Renamed from this...
5567 (grub_vbe_bios_get_mode): ... to this.
5568 (grub_vbe_set_memory_window): Renamed from this...
5569 (grub_vbe_bios_set_memory_window): ... to this.
5570 (grub_vbe_get_memory_window): Renamed from this...
5571 (grub_vbe_bios_get_memory_window): ... to this.
5572 (grub_vbe_set_scanline_length): Renamed from this...
5573 (grub_vbe_set_scanline_length): ... to this.
5574 (grub_vbe_get_scanline_length): Renamed from this...
5575 (grub_vbe_bios_get_scanline_length): ... to this.
5576 (grub_vbe_set_display_start): Renamed from this...
5577 (grub_vbe_bios_set_display_start): ... to this.
5578 (grub_vbe_get_display_start): Renamed from this...
5579 (grub_vbe_bios_get_display_start): ... to this.
5580 (grub_vbe_set_palette_data): Renamed from this...
5581 (grub_vbe_bios_set_palette_data): ... to this.
5582 (grub_vbe_set_pixel_rgb): Removed.
5583 (grub_vbe_set_pixel_index): Likewise.
5584
5585 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
5586 from this...
5587 (grub_vbe_bios_get_controller_info): ... to this.
5588 (grub_vbe_get_mode_info): Renamed from this...
5589 (grub_vbe_bios_get_mode_info): ... to this.
5590 (grub_vbe_set_mode): Renamed from this...
5591 (grub_vbe_bios_set_mode): ... to this.
5592 (grub_vbe_get_mode): Renamed from this...
5593 (grub_vbe_bios_get_mode): ... to this.
5594 (grub_vbe_set_memory_window): Renamed from this...
5595 (grub_vbe_bios_set_memory_window): ... to this.
5596 (grub_vbe_get_memory_window): Renamed from this...
5597 (grub_vbe_bios_get_memory_window): ... to this.
5598 (grub_vbe_set_scanline_length): Renamed from this...
5599 (grub_vbe_set_scanline_length): ... to this.
5600 (grub_vbe_get_scanline_length): Renamed from this...
5601 (grub_vbe_bios_get_scanline_length): ... to this.
5602 (grub_vbe_set_display_start): Renamed from this...
5603 (grub_vbe_bios_set_display_start): ... to this.
5604 (grub_vbe_get_display_start): Renamed from this...
5605 (grub_vbe_bios_get_display_start): ... to this.
5606 (grub_vbe_set_palette_data): Renamed from this...
5607 (grub_vbe_bios_set_palette_data): ... to this.
5608 (grub_vbe_bios_get_controller_info): Fixed problem with registers
5609 getting corrupted after calling it. Added more pushes and pops.
5610 (grub_vbe_bios_set_mode): Likewise.
5611 (grub_vbe_bios_get_mode): Likewise.
5612 (grub_vbe_bios_get_memory_window): Likewise.
5613 (grub_vbe_bios_set_scanline_length): Likewise.
5614 (grub_vbe_bios_get_scanline_length): Likewise.
5615 (grub_vbe_bios_get_display_start): Likewise.
5616 (grub_vbe_bios_set_palette_data): Likewise.
5617
5618 * normal/cmdline.c (cl_set_pos): Refresh the screen.
5619 (cl_insert): Likewise.
5620 (cl_delete): Likewise.
5621
5622 * term/gfxterm.c: New file.
5623
5624 * term/i386/pc/vesafb.c: Removed file.
5625
5626 * video/video.c: New file.
5627
5628 * video/i386/pc/vbe.c (real2pm): Added new function.
5629 (grub_video_vbe_draw_pixel): Likewise.
5630 (grub_video_vbe_get_video_ptr): Likewise.
5631 (grub_video_vbe_get_pixel): Likewise
5632 (grub_video_vbe_init): Likewise.
5633 (grub_video_vbe_fini): Likewise.
5634 (grub_video_vbe_setup): Likewise.
5635 (grub_video_vbe_get_info): Likewise.
5636 (grub_video_vbe_set_palette): Likewise.
5637 (grub_video_vbe_get_palette): Likewise.
5638 (grub_video_vbe_set_viewport): Likewise.
5639 (grub_video_vbe_get_viewport): Likewise.
5640 (grub_video_vbe_map_color): Likewise.
5641 (grub_video_vbe_map_rgb): Likewise.
5642 (grub_video_vbe_map_rgba): Likewise.
5643 (grub_video_vbe_unmap_color): Likewise.
5644 (grub_video_vbe_fill_rect): Likewise.
5645 (grub_video_vbe_blit_glyph): Likewise.
5646 (grub_video_vbe_blit_bitmap): Likewise.
5647 (grub_video_vbe_blit_render_target): Likewise.
5648 (grub_video_vbe_scroll): Likewise.
5649 (grub_video_vbe_swap_buffers): Likewise.
5650 (grub_video_vbe_create_render_target): Likewise.
5651 (grub_video_vbe_delete_render_target): Likewise.
5652 (grub_video_vbe_set_active_render_target): Likewise.
5653 (grub_vbe_set_pixel_rgb): Remove function.
5654 (grub_vbe_set_pixel_index): Likewise.
5655 (index_color_mode): Remove static variable.
5656 (active_mode): Likewise.
5657 (framebuffer): Likewise.
5658 (bytes_per_scan_line): Likewise.
5659 (grub_video_vbe_adapter): Added new static variable.
5660 (framebuffer): Likewise.
5661 (render_target): Likewise.
5662 (initial_mode): Likewise.
5663 (mode_in_use): Likewise.
5664 (mode_list): Likewise.
5665
5f97350b 56662006-03-10 Marco Gerards <marco@gnu.org>
5667
5668 * configure.ac (AC_INIT): Bumped to 1.93.
5669
5670 * DISTLIST: Added `include/grub/hfs.h'.
5671
a3c5c6f8 56722006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
5673
5674 * boot/i386/pc/boot.S (general_error): Before looping, try INT
5675 18H, which might help the BIOS falling back to next boot media.
5676
6de53d26 56772006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
5678
5679 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
5680 Poe Chen <poe.poechen@gmail.com>.
5681
77c4a393 56822006-01-17 Marco Gerards <marco@gnu.org>
5683
5684 * include/grub/normal.h: Include <grub/script.h>.
5685 (grub_command_list): Removed struct.
5686 (grub_command_list_t): Removed type.
5687 (grub_menu_entry): Remove members `num' and `command_list'. Add
5688 members `commands' and `sourcecode'.
5689 * include/grub/script.h: Add inclusion guards.
5690 (grub_script_cmd_menuentry): New struct.
5691 (grub_script_execute_menuentry): New prototype.
5692 (grub_script_lexer_record_start): Likewise.
5693 (grub_script_lexer_record_stop): Likewise.
5694 * normal/execute.c (grub_script_execute_menuentry): New function.
5695 * normal/lexer.c (record, recording, recordpos, recordlen): New
5696 variables.
5697 (grub_script_lexer_record_start): New function.
5698 (grub_script_lexer_record_stop): Likewise.
5699 (recordchar): Likewise.
5700 (nextchar): Likewise.
5701 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
5702 2048 as the buffer size. Add the tokens `menuentry' and `@'.
5703 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
5704 (current_menu): New variable.
5705 (free_menu): Mainly rewritten.
5706 (grub_normal_menu_addentry): New function.
5707 (read_config_file): Rewritten.
5708 * normal/menu.c (run_menu_entry): Mainly rewritten.
5709 * normal/menu_entry.c (make_screen): Rewritten te code to insert
5710 the menu entry.
5711 (run): Mainly rewritten.
5712 * normal/parser.y (menu_entry): New variable.
5713 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
5714 (menuentry): New rule.
5715 (command): Add `menuentry'.
5716 (if_statement): Allow additional returns before `fi'.
5717 * normal/script.c (grub_script_create_cmdmenu): New function.
5718
144f1f98 57192006-01-03 Marco Gerards <marco@gnu.org>
5720
5721 * INSTALL: GNU Bison is required.
5722 * configure.ac: Rewritten the test to detect Bison.
5723 * Makefile.in (YACC): New variable. Reported by Xun Sun
5724 <xun.sun.cn@gmail.com>.
5725
af4b2d89 57262006-01-03 Marco Gerards <marco@gnu.org>
5727
5728 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
5729 the HFS+ filesystem to filesystem blocks.
5730 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
5731 GCC warning is silenced.
5732
15643b71 57332006-01-03 Marco Gerards <marco@gnu.org>
5734
5735 * partmap/apple.c (apple_partition_map_iterate): Convert the data
5736 read from disk from big endian to host byte order.
5737
00905879 57382006-01-03 Hollis Blanchard <hollis@penguinppc.org>
5739
5740 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
5741 documentation.
5742 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
5743 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
5744 embedded HFS+ filesystem.
5745 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
5746 (grub_hfs_sblock): Move from here...
5747 * include/grub/hfs.h: To here... New file.
5748 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
5749 documentation.
5750 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
5751 New macros.
5752 (grub_hfsplus_volheader): Change type of member `magic' to
5753 `grub_uint16_t'.
5754 (grub_hfsplus_data): Add new member `embedded_offset'.
5755 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
5756 returned block.
5757 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
5758 Calculate the offset.
5759
8899bc3e 57602005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5761
5762 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
5763 Removed.
5764 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
5765
ae8c0277 57662005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5767
5768 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
5769 ENV->NAME is NULL after allocating ENV->VALUE.
5770
07084456 57712005-12-25 Marco Gerards <marco@gnu.org>
5772
5773 * kern/env.c (grub_env_set): Rewritten the error handling code.
5774
4750f5f1 57752005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5776
5777 * geninit.sh: Made more robust, and more portable.
5778
50214199 57792005-12-25 Marco Gerards <marco@gnu.org>
5780
5781 Add support for Apple HFS+ filesystems.
5782
5783 * fs/hfsplus.c: New file.
5784
5785 * DISTLIST: Added `fs/hfsplus.c'.
5786
5787 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
5788 (hfsplus_mod_SOURCES): New variable.
5789 (hfsplus_mod_CFLAGS): Likewise.
5790 (hfsplus_mod_LDFLAGS): Likewise.
5791 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
5792 (grub_setup_SOURCES): Likewise.
5793 (grub_mkdevicemap_SOURCES): Likewise.
5794 (grub_emu_SOURCES): Likewise.
5795 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5796
5797 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
5798
5799 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
5800
befaed6c 58012005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
5802
5803 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
5804 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
5805 include/grub/parser.h, include/grub/script.h, kern/parser.c,
5806 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
5807 normal/lexer.c, normal/parser.y, normal/script.c, and
5808 partmap/gpt.c.
5809 Removed kern/sparc64/cache.c.
5810
5811 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
5812 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
5813 grub_emu_init.c.
5814
5815 * configure.ac (AC_INIT): Bumped to 1.92.
5816
6a124103 58172005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
5818
5819 * kern/err.c (grub_error_push): Added new function to support error
5820 stacks.
5821 (grub_error_pop): Likewise.
5822 (grub_error_stack_items): New local variable to support error stacks.
5823 (grub_error_stack_pos): Likewise.
5824 (grub_error_stack_assert): Likewise.
5825 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
5826 stack depth.
5827 (grub_print_error): Added support to print errors from error stack.
5828
5829 * include/grub/err.h (grub_error_push): Added function prototype.
5830 (grub_error_pop): Likewise.
5831
be973c1b 58322005-12-09 Hollis Blanchard <hollis@penguinppc.org>
5833
5834 * configure.ac: Accept `powerpc64' as host_cpu.
5835 (amd64): Rename to `biarch32'.
5836
5837 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
5838 non-cacheline-aligned addresses.
5839
5840 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
5841 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
5842 if `size' is non-zero.
5843
b04216ab 58442005-12-03 Marco Gerards <mgerards@xs4all.nl>
5845
5846 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
5847 and `cd' to make sure the filename is not prefixed with a
5848 directory name.
5849 (pkgdata_MODULES): Add `gpt.mod'.
5850 (gpt_mod_SOURCES): New variable.
5851 (gpt_mod_CFLAGS): Likewise.
5852 (gpt_mod_LDFLAGS): Likewise.
5853
5854 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
5855
5856 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
5857 New macro.
5858
5859 * partmap/gpt.c: New file.
5860
5861 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
5862 GPT partition map is detected.
5863
41730ed9 58642005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
5865
5866 * commands/i386/pc/play.c: New file.
5867 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
5868 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
5869 macros.
5870
95dc3643 58712005-11-27 Marco Gerards <mgerards@xs4all.nl>
5872
5873 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
5874 ((unused))' to silence gcc warning.
5875
1569ec51 58762005-11-26 Hollis Blanchard <hollis@penguinppc.org>
5877
5878 * configure.ac: Correct `AC_PROG_YACC' test.
5879
9abde152 58802005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5881
5882 * util/powerpc/ieee1275/grub-install.in: Run the mount point
5883 check before installing files.
5884
44b83271 58852005-11-22 Mike Small <smallm@panix.com>
5886
5887 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
5888 number regex so multidigit numbers are recognized correctly.
5889
58902005-11-22 Mike Small <smallm@panix.com>
5891
5892 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
5893 debugging message before attempting to claim memory.
5894 (grub_rescue_cmd_initrd): Add a claim debugging message and try
5895 multiple addresses in case of failure.
5896
9c12956b 58972005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5898
5899 * term/tparm.c (get_space): Remove empty `if' statement.
5900
5901 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
5902
5903 * kern/parser.c (check_varstate): Rename `state' to 's'.
5904
aeaf81d9 59052005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5906
5907 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
5908 variable definitions to the beginning of each function. Sort stack
5909 variables by size.
5910 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
5911 `buf' argument to `char *'.
5912
79bbb63f 59132005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5914
5915 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
5916 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5917 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5918 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5919 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5920 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5921 configfile.mod, search.mod, gzio.mod and test.mod.
5922 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5923 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5924 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5925 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5926 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5927 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5928 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5929 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5930 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5931 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5932 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5933 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5934 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5935 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5936 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5937 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5938 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5939 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5940 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5941 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5942 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5943 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5944 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
5945
5946 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
5947 `grep --include'.
5948 (pkgdata_MODULES): Add test.mod.
5949
233b1628 59502005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5951
5952 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
5953 appending to variables with "+=".
5954 (PModule): Use full pathname to generate *.lst filenames.
5955
5956 * Makefile.in: Fixed list rules moved from genmk.rb.
5957 (.DELETE_ON_ERROR): New special target.
5958 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
5959
5960 * conf/i386-pc.rmk: Include conf/common.mk.
5961 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5962 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5963 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5964 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5965 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5966 configfile.mod, search.mod, gzio.mod and test.mod.
5967 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5968 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5969 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5970 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5971 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5972 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5973 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5974 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5975 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5976 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5977 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5978 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5979 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5980 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5981 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5982 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5983 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5984 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5985 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5986 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5987 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5988 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5989 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
5990 here...
5991 * conf/common.rmk: ... to here. New file.
5992
5993 * conf/common.mk: New file.
5994
16f820c8 59952005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
5996
5997 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
5998 (grub_script.tab.c): ... here.
5999
6000 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
6001 (grub_script.tab.c): ... here.
6002
6003 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
6004 (grub_script.tab.c): ... here.
6005
6006 * normal/command.c (grub_command_find): Fixed a memory leak of
6007 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
6008
63ba1554 60092005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6010
6011 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
6012 "@" which marks the start of a comment on ARM.
6013 (VARIABLE): Likewise.
6014
7f67dc13 60152005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6016
79bbb63f 6017 Add support for Linux/ADFS partition tables.
7f67dc13 6018
6019 * partmap/acorn.c: New file.
6020
6021 * include/grub/acorn_filecore.h: Likewise.
6022
6023 * DISTLIST: Added `partmap/acorn.c' and
6024 `include/grub/acorn_filecore.h'.
6025
6026 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6027 `partmap/acorn.c'.
6028 (pkgdata_MODULES): Add `acorn.mod'.
6029 (acorn_mod_SOURCES): New variable.
6030 (acorn_mod_CFLAGS): Likewise.
6031
6032 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6033 `partmap/acorn.c'.
6034 (pkgdata_MODULES): Add `acorn.mod'.
6035 (acorn_mod_SOURCES): New variable.
6036 (acorn_mod_CFLAGS): Likewise.
6037
6038 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
6039 (pkgdata_MODULES): Add `acorn.mod'.
6040 (acorn_mod_SOURCES): New variable.
6041 (acorn_mod_CFLAGS): Likewise.
6042 (acorn_mod_LDFLAGS): Likewise.
6043
6044 * include/types.h (grub_disk_addr_t): New typedef.
6045
6d099807 60462005-11-13 Marco Gerards <mgerards@xs4all.nl>
6047
6048 * geninit.sh: New file.
6049
6050 * geninitheader.sh: Likewise.
6051
6052 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6053 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6054 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6055 * commands/configfile.c (grub_configfile_init)
6056 (grub_configfile_fini): Likewise.
6057 * commands/default.c (grub_default_init, grub_default_fini):
6058 Likewise.
6059 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6060 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6061 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6062 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6063 Likewise.
6064 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6065 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6066 Likewise.
6067 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
6068 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
6069 Likewise.
6070 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6071 Likewise.
6072 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6073 Likewise.
6074 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6075 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6076 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6077 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6078 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6079 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6080 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6081 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6082 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6083 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6084 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6085 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6086 * partmap/amiga.c (grub_amiga_partition_map_init)
6087 (grub_amiga_partition_map_fini): Likewise.
6088 * partmap/apple.c (grub_apple_partition_map_init)
6089 (grub_apple_partition_map_fini): Likewise.
6090 * partmap/pc.c (grub_pc_partition_map_init)
6091 (grub_pc_partition_map_fini): Likewise.
6092 * partmap/sun.c (grub_sun_partition_map_init,
6093 grub_sun_partition_map_fini): Likewise.
6094 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6095 Likewise.
6096
6097 * util/grub-emu.c: Include <grub_modules_init.h>.
6098 (main): Don't initialize and de-initialize any modules directly,
6099 use `grub_init_all' and `grub_fini_all' instead.
6100
6101 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6102 `grub_vesafb_mod_init'.
6103 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
6104 all users.
6105 * term/i386/pc/vga.c (grub_vga_init): Renamed to
6106 `grub_vga_mod_init'. Updated all users.
6107 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6108
6109 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6110 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6111 rules.
6112
6113 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6114 Generate a function to initialize the module in utilities.
6115 Updated all callers.
6116 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
6117 initialize the module in utilities. Updated all callers.
6118
9046bcf0 61192005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6120
6121 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6122 escape sequence and a literal ^L to clear the screen.
6123
6124 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6125 when returning from Open Firmware.
6126
d13ea639 61272005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6128
6129 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6130 (grub_ofconsole_height): Likewise.
6131 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6132 manually insert a '\n'.
6133 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6134 `grub_ofconsole_height'. Return early if these are already set.
6135
a8fcf206 61362005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6137
6138 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6139 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6140 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6141 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6142 and `normal/script.c'.
6143 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6144 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6145 (test_mod_SOURCES): New variable.
6146 (test_mod_CFLAGS): Likewise.
6147 (test_mod_LDFLAGS): Likewise.
6148 (pkgdata_MODULES): Add `test.mod'.
6149 (grub_script.tab.c): New rule.
6150 (grub_script.tab.h): Likewise.
6151
b6b32745 61522005-11-07 Marco Gerards <mgerards@xs4all.nl>
6153
6154 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6155 `commands/test.c', `normal/execute.c', `normal/lexer.c',
6156 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6157 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6158 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6159 (test_mod_SOURCES): New variable.
6160 (test_mod_CFLAGS): Likewise.
6161 (pkgdata_MODULES): Add `test.mod'.
6162 (grub_script.tab.c): New rule.
6163 (grub_script.tab.h): Likewise.
6164
daac212a 61652005-11-06 Marco Gerards <mgerards@xs4all.nl>
6166
6167 Add initial scripting support.
6168
6169 * commands/test.c: New file.
6170 * include/grub/script.h: Likewise.
6171 * normal/execute.c: Likewise.
6172 * normal/function.c: Likewise.
6173 * normal/lexer.c: Likewise.
6174 * normal/parser.y: Likewise.
6175 * normal/script.c: Likewise.
6176
6177 * configure.ac: Add `AC_PROG_YACC' test.
6178
6179 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
6180 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
6181 `normal/function.c' and `normal/script.c'.
6182 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6183 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 6184 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
6185 variables.
daac212a 6186 (pkgdata_MODULES): Add `test.mod'.
6187 (grub_script.tab.c): New rule.
6188 (grub_script.tab.h): Likewise.
6189
6190 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
6191
6192 * include/grub/normal.h (grub_test_init): New prototype.
6193 (grub_test_fini): Likewise.
6194
6195 * normal/command.c: Include <grub/script.h>.
6196 (grub_command_execute): Rewritten.
6197
6198 * util/grub-emu.c (main): Call `grub_test_init' and
6199 `grub_test_fini'.
6200
77500b2b 62012005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6202
6203 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
6204 to 0.
6205 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
6206 there are no pending characters.
6207
e45deb9e 62082005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6209
6210 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
6211 `grub_strndup' to drop device arguments. Replace unnecessary
6212 `grub_strndup' with `grub_strdup'.
6213
4ce32619 62142005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6215
6216 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
6217 `debug' environment variable has been set.
6218
62192005-11-02 Hollis Blanchard <hollis@penguinppc.org>
6220
6221 * Makefile.in (install-local): Use $(DATA).
6222 (uninstall): Likewise.
6223 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
6224 (sbin_UTILITIES): ... to here.
6225 (sbin_SCRIPTS): New variable.
6226 (grub_install_SOURCES): New variable.
6227 * util/powerpc/ieee1275/grub-install.in: New file.
6228 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
6229 variable.
6230 (add_segments): Call `grub_util_get_path'.
6231
25fe6f03 62322005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6233
6234 From Timothy Baldwin:
6235 * commands/ls.c (grub_ls_list_files): Close FILE with
6236 grub_file_close.
6237 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
6238
04ccf3ec 62392005-10-24 Marco Gerards <mgerards@xs4all.nl>
6240
6241 * include/grub/parser.h: New file.
6242
6243 * kern/parser.c: Likewise.
6244
6245 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
6246 (grub_setup_SOURCES): Likewise.
6247 (grub_probefs_SOURCES): Likewise.
6248 (grub_emu_SOURCES): Likewise.
6249 (kernel_img_HEADERS): Add `parser.h'.
6250
6251 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6252 (grub_emu_SOURCES): Add `kern/parser.c'.
6253 (grubof_SOURCES): Likewise.
6254
6255 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6256 (grubof_SOURCES): Add `kern/parser.c'.
6257
6258 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
6259
6260 * kern/misc.c (grub_split_cmdline): Removed function.
6261
6262 * kern/rescue.c: Include <grub/parser.h>.
6263 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
6264 of `grub_split_cmdline'.
6265
6266 * normal/command.c: Include <grub/parser.h>.
6267 (grub_command_execute): Use `grub_parser_split_cmdline' instead
6268 of `grub_split_cmdline'.
6269
6270 * normal/completion.c: Include <grub/parser.h>.
6271 (cmdline_state): New variable.
6272 (iterate_dir): End the filename with a quote depending on the
6273 command line state.
6274 (get_state): new function.
6275 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
6276 split the arguments and determine the current argument. When the
6277 argument string is not quoted, escape all spaces.
6278
6d8f4b0e 62792005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6280
6281 * normal/sparc64/setjmp.S: New file.
6282
15cf03ed 62832005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6284
6285 * include/grub/sparc64/libgcc.h: New file.
6286 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
6287 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
6288 normal/sparc64/setjmp.c.
6289
03e8661a 62902005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6291
6292 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
6293 * kern/sparc64/cache.S: New file.
6294 * kern/sparc64/cache.c: Removed.
6295 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
6296 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
6297 -mtune=ultrasparc.
6298 (COMMON_LDFLAGS): Add -melf64_sparc.
6299 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
6300 (grubof_SOURCES): Use cache.S instead of cache.c.
6301 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
6302 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
6303 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
6304 commented though.
6305 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
6306 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
6307 (linux_mod_CFLAGS): Commented out.
6308 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
6309 out because module isn't built.
6310 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
6311 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
6312 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
6313 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
6314 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
6315 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6316 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6317 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
6318 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
6319 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
6320 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6321 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6322 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
6323 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
6324
34eeec8a 63252005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
6326
6327 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
6328 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
6329 longer, because HFS should not be used on PC.
6330
708367a3 63312005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6332
6333 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
6334 consistently within the loop.
6335
6fa1251a 63362005-10-15 Marco Gerards <mgerards@xs4all.nl>
6337
6338 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
6339 directory can not be read.
6340
4801580b 63412005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6342
6343 * configure.ac (AC_INIT): Increase the version number to 1.91.
6344
6345 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
6346 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
6347 term/i386/pc/serial.c.
6348
219ad426 63492005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6350
6351 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
6352 file size must be permitted.
6353
6354 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
6355 between %ah and %al.
6356
688e5699 63572005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6358
6359 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
6360 grub_uint64_t.
6361 Call the hook with a NUL-terminated filename.
6362 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
6363 grub_cpu_to_be32.
6364
6365 * kern/term.c (cursor_state): New variable.
6366 (grub_term_set_current): Reset the cursor state on a new
6367 terminal.
6368 (grub_setcursor): Rewritten to use CURSOR_STATE.
6369 (grub_getcursor): New function.
6370
6371 * include/grub/term.h (grub_getcursor): New prototype.
6372
6373 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
6374 integers on ARM. Reported by Timothy Baldwin
6375 <T.E.Baldwin99@members.leeds.ac.uk>.
6376
bb34586c 63772005-10-11 Marco Gerards <mgerards@xs4all.nl>
6378
6379 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
6380 allocated.
6381 (grub_sfs_dir): Likewise.
6382
9a909877 63832005-10-09 Marco Gerards <mgerards@xs4all.nl>
6384
6385 Add support for the SFS filesystem.
6386
6387 * fs/sfs.c: New file.
6388
6389 * DISTLIST: Added `fs/sfs.c'.
6390
6391 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
6392 (grub_probefs_SOURCES): Likewise.
6393 (grub_emu_SOURCES): Likewise.
6394 (pkgdata_MODULES): Add `sfs.mod'.
6395 (sfs_mod_SOURCES): New variable.
6396 (sfs_mod_CFLAGS): Likewise.
6397 (sfs_mod_LDFLAGS): Likewise.
6398
6399 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
6400 (pkgdata_MODULES): Add `sfs.mod'.
6401 (sfs_mod_SOURCES): New variable.
6402 (sfs_mod_CFLAGS): Likewise.
6403
6404 * util/grub-emu.c (main): Call `grub_sfs_init' and
6405 `grub_sfs_fini'.
6406
6407 * include/grub/fs.h (grub_sfs_init): New prototype.
6408 (grub_sfs_fini): Likewise.
6409
57bdbde3 64102005-10-07 Marco Gerards <mgerards@xs4all.nl>
6411
6412 Add support for the AFFS filesystem.
6413
6414 * fs/affs.c: New file.
6415
6416 * DISTLIST: Added `fs/affs.c'.
6417
6418 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
6419 (grub_probefs_SOURCES): Likewise.
6420 (grub_emu_SOURCES): Likewise.
6421 (pkgdata_MODULES): Add `affs.mod'.
6422 (affs_mod_SOURCES): New variable.
6423 (affs_mod_CFLAGS): Likewise.
6424 (affs_mod_LDFLAGS): Likewise.
6425
6426 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
6427 (pkgdata_MODULES): Add `affs.mod'.
6428 (affs_mod_SOURCES): New variable.
6429 (affs_mod_CFLAGS): Likewise.
6430
6431 * util/grub-emu.c (main): Call `grub_affs_init' and
6432 `grub_affs_fini'.
6433
6434 * include/grub/fs.h (grub_affs_init): New prototype.
6435 (grub_affs_fini): Likewise.
6436
047b67e0 64372005-10-01 Marco Gerards <mgerards@xs4all.nl>
6438
6439 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
6440
59b8208a 64412005-10-01 Marco Gerards <mgerards@xs4all.nl>
6442
6443 * configure.ac: Accept `x86_64' as host_cpu. In that case add
6444 `-m32' to CFLAGS.
6445
6446 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
6447 linking.
6448
6449 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
6450 (COMMON_LDFLAGS): New variable.
6451 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
6452 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
6453 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
6454 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
6455 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
6456 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
6457 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
6458 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
6459 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
6460 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
6461 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6462 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6463 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
6464 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
6465 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
6466 variables.
6467 (normal_mod_ASFLAGS): Add `-m32'.
6468
6469 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
6470 (grub_host_size_t, grub_host_ssize_t): New types.
6471 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
6472 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
6473 `GRUB_HOST_SIZEOF_VOID_P'.
6474
6475 * include/grub/kernel.h (struct grub_module_header): Type of
6476 member offset changed to `grub_host_off_t'. Type of member size
6477 changed to `grub_host_size_t'.
6478 (struct grub_module_info): Type of member offset changed to
6479 `grub_host_off_t'. Type of member size changed to
6480 `grub_host_size_t'.
6481
b4093103 64822005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
6483
6484 Make GRUB's kernel compliant to Multiboot Specification.
6485
6486 * kern/i386/pc/startup.S (multiboot_header): New label.
6487 (multiboot_entry): Likewise.
6488 (multiboot_trampoline): Likewise.
6489
6490 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6491 Increased to 0x4A0.
6492
6493 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
6494 put parentheses after a question mark.
6495 [!GRUB_UTIL] (my_mod): New variable.
6496
6497 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
6498
b2499b29 64992005-09-28 Marco Gerards <mgerards@xs4all.nl>
6500
6501 Adds support for the XFS filesystem. Btrees are not supported
6502 yet.
6503
6504 * fs/xfs.c: New file.
6505
6506 * DISTLIST: Added `fs/xfs.c'.
6507
6508 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
6509 (grub_probefs_SOURCES): Likewise.
6510 (grub_emu_SOURCES): Likewise.
6511 (pkgdata_MODULES): Add `xfs.mod'.
6512 (xfs_mod_SOURCES): New variable.
6513 (xfs_mod_CFLAGS): Likewise.
6514
6515 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
6516 (pkgdata_MODULES): Add `xfs.mod'.
6517 (xfs_mod_SOURCES): New variable.
6518 (xfs_mod_CFLAGS): Likewise.
6519
6520 * util/grub-emu.c (main): Call `grub_xfs_init' and
6521 `grub_xfs_fini'.
6522
6523 * include/grub/fs.h (grub_xfs_init): New prototype.
6524 (grub_xfs_fini): Likewise.
6525
6526
83d37a62 65272005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
6528
6529 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
6530 color modes, allow greater than 16 colors to be configured as
6531 a default palette.
6532
47d2d65e 65332005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6534
6535 * normal/completion.c (complete_arguments): Add the qualifier
6536 const into OPTIONS.
6537
6538 From Omniflux <omniflux+lists@omniflux.com>:
6539 * include/grub/terminfo.h: New file.
6540 * include/grub/tparm.h: Likewise.
6541 * include/grub/i386/pc/serial.h: Likewise.
6542 * term/terminfo.c: Likewise.
6543 * term/tparm.c: Likewise.
6544 * term/i386/pc/serial.c: Likewise.
6545 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
6546 serial.mod.
6547 (terminfo_mod_SOURCES): New variable.
6548 (terminfo_mod_CFLAGS): Likewise.
6549 (serial_mod_SOURCES): Likewise.
6550 (serial_mod_CFLAGS): Likewise.
6551
48b671ff 65522005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
6553
6554 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
6555 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
6556 and kern/powerpc/ieee1275/cmain.c, respectively.
6557
6558 * boot/powerpc/ieee1275/crt0.S: Moved to ...
6559 * kern/powerpc/ieee1275/crt0.S: ... here.
6560
6561 * boot/powerpc/ieee1275/cmain.c: Moved to ...
6562 * kern/powerpc/ieee1275/cmain.c: ... here.
6563
6564 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
6565 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
6566 instead of boot/powerpc/ieee1275/crt0.S and
6567 boot/powerpc/ieee1275/cmain.c, respectively.
6568
6569 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
6570 sectors. It was not used anyway.
6571
09fc77a7 65722005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6573
6574 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
6575 `unused parameter' warning.
6576
003789c7 65772005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6578
6579 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
6580 function.
6581 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
6582 getcharwidth.
6583
67f44c86 65842005-08-28 Marco Gerards <metgerards@student.han.nl>
6585
6586 * include/grub/normal.h (enum grub_completion_type): Added
6587 `GRUB_COMPLETION_TYPE_ARGUMENT'.
6588
6589 * normal/cmdline.c (print_completion): Handle
6590 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
6591 * normal/menu_entry.c (store_completion): Likewise.
6592
6593 * normal/completion.c (complete_arguments): New function.
6594 (grub_normal_do_completion): Call `complete_arguments' when the
6595 current words start with a dash.
6596
0b5abe02 65972005-08-27 Marco Gerards <metgerards@student.han.nl>
6598
6599 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
6600 `gzio.mod' instead of `io.mod').
6601
d9864ee1 66022005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
6603
6604 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
6605 (DISTDIRS): Added io and video.
6606 Rewrite the search routine to make an output consistently.
6607
6608 * DISTLIST: Added conf/sparc64-ieee1275.mk,
6609 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
6610 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
6611 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
6612 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
6613 util/powerpc/ieee1275/misc.c.
6614
6615 * include/grub/gzio.h: New file.
6616 * io/gzio.c: Likewise.
6617
6618 * kern/file.c (grub_file_close): Call grub_device_close only if
6619 FILE->DEVICE is not NULL.
6620
6621 * include/grub/mm.h [!NULL] (NULL): New macro.
6622
6623 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
6624
6625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
6626 (pkgdata_MODULES): Added gzio.mod.
6627 (gzio_mod_SOURCES): New variable.
6628 (gzio_mod_CFLAGS): Likewise.
6629
6630 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
6631 (pkgdata_MODULES): Added gzio.mod.
6632 (gzio_mod_SOURCES): New variable.
6633 (gzio_mod_CFLAGS): Likewise.
6634
6635 * commands/cat.c: Include grub/gzio.h.
6636 (grub_cmd_cat): Use grub_gzfile_open instead of
6637 grub_file_open.
6638
6639 * commands/cmp.c: Include grub/gzio.h.
6640 (grub_cmd_cmp): Use grub_gzfile_open instead of
6641 grub_file_open.
6642
6643 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
6644 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
6645 grub_file_open.
6646 (grub_rescue_cmd_module): Likewise.
6647
fa46f4b5 66482005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6649
6650 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
6651 kern/sparc64/ieee1275/init.c because it contains _start.
6652 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
6653
e9211b5d 66542005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6655
6656 * configure.ac: Add support for sparc64 host with ieee1275
6657 firmware.
6658 * configure: Generated from configure.ac.
6659 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
6660 instead of int.
6661 (grub_ofdisk_read): Likewise.
6662 (grub_ofdisk_open): Use %p to print pointer values, and cast the
6663 pointers as (void *) to remove a warning.
6664 (grub_ofdisk_close): Likewise.
6665 (grub_ofdisk_read): Likewise.
6666 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
6667 returns, so make it return void to remove a warning.
6668 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
6669 Corresponding prototype change.
6670 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
6671 values, and cast the pointers as (void *) to remove a warning.
6672 (grub_mm_dump): Likewise.
6673 * conf/sparc64-ieee1275.mk: New file.
6674 * conf/sparc64-ieee1275.rmk: Likewise.
6675 * include/grub/sparc64/setjmp.h: Likewise.
6676 * include/grub/sparc64/types.h: Likewise.
6677 * include/grub/sparc64/ieee1275/console.h: Likewise.
6678 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
6679 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
6680 * include/grub/sparc64/ieee1275/time.h: Likewise.
6681 * kern/sparc64/cache.c: Likewise.
6682 * kern/sparc64/dl.c: Likewise.
6683 * kern/sparc64/ieee1275/init.c: Likewise.
6684 * kern/sparc64/ieee1275/openfw.c: Likewise.
6685
385c6a92 66862005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
6687
6688 * util/console.c (grub_ncurses_putchar): If C is greater than
6689 0x7f, set C to a question mark.
6690 (grub_ncurses_getcharwidth): New function.
6691 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
6692 getcharwidth.
6693
6694 * normal/menu.c (print_entry): Made aware of Unicode. First,
6695 convert TITLE to UCS-4, and predict the cursor position by
6696 grub_getcharwidth.
6697
6698 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
6699 const to SRC.
6700 * kern/misc.c (grub_utf16_to_utf8): Likewise.
6701
16ccb8b1 67022005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6703
6704 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
6705 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6706 grub_strcat.
6707
6708 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
6709 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
6710 grub_strcpy and grub_strlen. Take it into account that a space
6711 character is inserted as a delimiter.
6712
6a85ce79 67132005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6714
6715 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
6716 invalid magic in thre error.
6717
6718 * commands/search.c: New file.
6719
6720 * util/grub-emu.c (main): Call grub_search_init and
6721 grub_search_fini.
6722
6723 * kern/rescue.c (grub_rescue_print_disks): Removed.
6724 (grub_rescue_print_devices): New function.
6725 (grub_rescue_cmd_ls): Use grub_device_iterate with
6726 grub_rescue_print_devices instead of grub_disk_dev_iterate with
6727 grub_rescue_print_disks.
6728
6729 * kern/partition.c (grub_partition_iterate): Return the result of
6730 PARTMAP->ITERATE instead of GRUB_ERRNO.
6731
6732 * kern/device.c: Include grub/partition.h.
6733 (grub_device_iterate): New function.
6734
6735 * include/grub/partition.h (grub_partition_iterate): Return int
6736 instead of grub_err_t.
6737
6738 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
6739 prototype.
6740 [GRUB_UTIL] (grub_search_fini): Likewise.
6741
6742 * include/grub/device.h (grub_device_iterate): New prototype.
6743
6744 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6745 commands/search.c.
6746 (pkgdata_MODULES): Added search.mod.
6747 (search_mod_SOURCES): New variable.
6748 (search_mod_CFLAGS): Likewise.
6749
6750 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
6751 (pkgdata_MODULES): Added search.mod.
6752 (search_mod_SOURCES): New variable.
6753 (search_mod_CFLAGS): Likewise.
6754
6755 * commands/ls.c (grub_ls_list_disks): Renamed to ...
6756 (grub_ls_list_devices): ... this, and use grub_device_iterate.
6757 All callers changed.
6758
6759 * DISTLIST: Added commands/search.c.
6760
ef095434 67612005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
6762
6763 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
6764 conversion.
6765 (grub_getcharwidth): New function.
6766
6767 * kern/misc.c (grub_utf8_to_ucs4): New function.
6768
6769 * include/grub/term.h (struct grub_term): Added a new member
6770 "getcharwidth".
6771 (grub_getcharwidth): New prototype.
6772
6773 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
6774
6775 * term/i386/pc/console.c (map_char): New function. Segregated from
6776 grub_console_putchar.
6777 (grub_console_putchar): Use map_char.
6778 (grub_console_getcharwidth): New function.
6779 (grub_console_term): Specified grub_console_getcharwidth as
6780 getcharwidth.
6781
6782 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
6783 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
6784
6785 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
6786 GRUB_ERRNO.
6787 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
6788 on grub_strtoul completely.
6789 (write_char): Declare local variables in the beginning of the
6790 function.
6791 (grub_vesafb_getcharwidth): New function.
6792 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
6793 getcharwidth.
6794
1f0a95e4 67952005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
6796
6797 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
6798 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
6799 commands/i386/pc/vbetest.c.
6800
6801 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
6802 call grub_vbe_get_controller_info again, because the returned
6803 information is volatile.
6804 (grub_vbe_set_video_mode): Mostly rewritten.
6805 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
6806 grub_vbe_status_t correctly.
6807 (grub_vbe_get_video_mode_info): Likewise.
6808 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
6809 several if statements.
6810
6811 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
6812 * commands/i386/pc/vbeinfo.c: ... this.
6813
6814 * commands/i386/pc/vbe_test.c: Renamed to ...
6815 * commands/i386/pc/vbetest.c: ... this.
6816
6817 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
6818 ...
6819 (grub_cmd_vbeinfo): ... this. Save video modes before
6820 iterating. Skip a video mode, if it is not available, not enough
6821 information is given or it is monochrome. Show the memory
6822 model. Leave the interpretation of MODEVAR to grub_strtoul
6823 completely.
6824 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
6825 (GRUB_MOD_FINI): Likewise.
6826
6827 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
6828 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
6829 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
6830 duplicated grub_env_get. Leave the interpretation of MODEVAR to
6831 grub_strtoul completely.
6832 (real2pm): Removed.
6833 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
6834 (GRUB_MOD_FINI): Likewise.
6835
6836 * normal/misc.c: Include grub/mm.h.
6837
6838 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
6839 vbe_list_modes with vbetest.mod and vbeinfo.mod.
6840 (vbe_list_modes_mod_SOURCES): Removed.
6841 (vbe_list_modes_mod_CFLAGS): Likewise.
6842 (vbe_test_mod_SOURCES): Likewise.
6843 (vbe_test_mod_CFLAGS): Likewise.
6844 (vbeinfo_mod_SOURCES): New variable.
6845 (vbeinfo_mod_CFLAGS): Likewise.
6846 (vbetest_mod_SOURCES): Likewise.
6847 (vbetest_mod_CFLAGS): Likewise.
6848
992ffbbe 68492005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
6850
6851 * normal/misc.c: New file.
6852
6853 * DISTLIST: Added normal/misc.c.
6854
6855 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
6856 DISK to HOOK. Call HOOK with DISK.
6857 * partmap/apple.c (apple_partition_map_iterate): Likewise.
6858 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6859 * partmap/sun.c (sun_partition_map_iterate): Likewise.
6860
6861 * normal/menu_entry.c (struct screen): Added a new member
6862 "completion_shown".
6863 (completion_buffer): New global variable.
6864 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
6865 (store_completion): New function.
6866 (complete): Likewise.
6867 (clear_completions): Likewise.
6868 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
6869 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
6870 a tab, call complete.
6871
6872 * normal/completion.c (disk_dev): Removed.
6873 (print_simple_completion): Likewise.
6874 (print_partition_completion): Likewise.
6875 (print_func): New global variable.
6876 (add_completion): Do not take the arguments WHAT or PRINT any
6877 longer. Added a new argument TYPE. Instead of printing directly,
6878 call PRINT_FUNC if not NULL.
6879 All callers changed.
6880 (complete_device): Use a local variable DEV instead of
6881 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
6882 (grub_normal_do_completion): Take a new argument HOOK. Do not
6883 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
6884 empty string, return NULL instead.
6885 All callers changed.
6886
6887 * normal/cmdline.c (print_completion): New function.
6888
6889 * kern/partition.c (grub_partition_iterate): Add an argument DISK
6890 to HOOK.
6891 All callers changed.
6892
6893 * kern/disk.c (grub_print_partinfo): Removed.
6894
6895 * include/grub/partition.h (struct grub_partition_map): Add a new
6896 argument DISK into HOOK of ITERATE.
6897 (grub_partition_iterate): Add a new argument DISK to HOOK.
6898
6899 * include/grub/normal.h (enum grub_completion_type): New enum.
6900 (grub_completion_type_t): New type.
6901 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
6902 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
6903 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
6904 (GRUB_COMPLETION_TYPE_FILE): Likewise.
6905 (grub_normal_do_completion): Added a new argument HOOK.
6906 (grub_normal_print_device_info): New prototype.
6907
6908 * include/grub/disk.h (grub_print_partinfo): Removed.
6909
6910 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
6911 (normal_mod_SOURCES): Likewise.
6912 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6913 (normal_mod_SOURCES): Likewise.
6914
6915 * commands/ls.c (grub_ls_list_disks): Use
6916 grub_normal_print_device_info instead of grub_print_partinfo. Free
6917 PNAME.
6918 (grub_ls_list_files): Use grub_normal_print_device_info instead of
6919 duplicating the code.
6920
0bd41162 69212005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
6922
6923 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
6924 follow GCS more precisely.
6925 * commands/i386/pc/vbe_test.c: Likewise.
6926 * include/grub/i386/pc/vbe.h: Likewise.
6927 * term/i386/pc/vesafb.c: Likewise.
6928 * video/i386/pc/vbe.c: Likewise.
6929
6323696a 69302005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
6931
6932 * DISTLIST: Added term/i386/pc/vesafb.c
6933 DISTLIST: Added video/i386/pc/vbe.c
6934 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
6935 DISTLIST: Added commands/i386/pc/vbe_test.c.
6936 * commands/i386/pc/vbe_list_modes.c: New file.
6937 * commands/i386/pc/vbe_test.c: Likewise.
6938 * term/i386/pc/vesafb.c: Likewise.
6939 * video/i386/pc/vbe.c: Likewise.
6940 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
6941 (grub_vbe_probe) Added prototype.
6942 (grub_vbe_set_video_mode) Likewise.
6943 (grub_vbe_get_video_mode) Likewise.
6944 (grub_vbe_get_video_mode_info) Likewise.
6945 (grub_vbe_set_pixel_rgb) Likewise.
6946 (grub_vbe_set_pixel_index) Likewise.
6947 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
6948 (pkgdata_MODULES): Added vesafb.mod.
6949 (pkgdata_MODULES): Added vbe_list_modes.mod.
6950 (pkgdata_MODULES): Added vbe_test.mod.
6951 (vbe_mod_SOURCES): Added.
6952 (vbe_mod_CFLAGS): Likewise.
6953 (vesafb_mod_SOURCES): Likewise.
6954 (vesafb_mod_CFLAGS): Likewise.
6955 (vbe_list_modes_mod_SOURCES): Likewise.
6956 (vbe_list_modes_mod_CFLAGS): Likewise.
6957 (vbe_test_mod_SOURCES): Likewise.
6958 (vbe_test_mod_CFLAGS): Likewise.
6959
0a74e62f 69602005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
6961
0a74e62f 6962 * normal/command.c (grub_command_execute): If INTERACTIVE is
6963 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
6964 CMDLINE. Disable the pager if INTERACTIVE is true.
6965 All callers are changed.
6966
6967 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
6968 before reading a config file.
6969 * normal/main.c (read_config_file): Even if a command is not
6970 found, register it if it is within an entry.
6971
6972 * util/grub-emu.c: Include sys/types.h and unistd.h.
6973 (options): Added --hold.
6974 (struct arguments): Added a new member "hold".
6975 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
6976 missing.
6977 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
6978 cleared by a debugger, if it is not zero.
6979
6980 * include/grub/normal.h (grub_command_execute): Add an argument
6981 INTERACTIVE.
6982
e51f85ae 69832005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
6984
6985 * DISTLIST: Added include/grub/i386/pc/vbe.h.
6986
e9c6f39b 69872005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
6988
6989 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
6990 program with another one, because the old one didn't detect a bug
6991 in gcc-3.4. Always use regparm 2, because the new test is still
6992 not enough for gcc-4.0. Someone must investigate a simple test
6993 case which detects a bug in gcc-4.0.
6994
8de3495c 69952005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
6996
6997 * DISTLIST: Added normal/completion.c.
6998
6999 * normal/completion.c: New file.
7000
7001 * term/i386/pc/console.c (grub_console_getwh): New function.
7002 (grub_console_term): Assign grub_console_getwh to getwh.
7003
7004 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
7005 function is defined in normal/completion.c as
7006 grub_normal_do_completion.
7007 (grub_cmdline_get): Use grub_normal_do_completion instead of
7008 grub_tab_complete.
7009
7010 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
7011 returns non-zero, otherwise return 0.
7012 (grub_partition_iterate): First, probe the partition map. Then,
7013 call ITERATE only for this partition map.
7014
7015 * kern/misc.c (grub_strncmp): Rewritten.
7016
7017 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
7018 returns non-zero. Otherwise return 0.
7019
7020 * include/grub/partition.h (grub_partition_map_iterate): Return
7021 int instead of void.
7022
7023 * include/grub/normal.h (grub_normal_do_completion): New prototype.
7024
7025 * include/grub/misc.h (grub_strncmp): Change the type of N to
7026 grub_size_t.
7027
7028 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
7029 of void.
7030
7031 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
7032 unsigned explictly before comparing it with I.
7033
7034 * kern/main.c (grub_env_write_root): Add the attribute unused into
7035 VAR.
7036
7037 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7038 normal/completion.c.
7039 (normal_mod_SOURCES): Likewise.
7040 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7041 (normal_mod_SOURCES): Likewise.
7042
7043 * normal/command.c (grub_iterate_commands): If ITERATE returns
7044 non-zero, return one immediately.
7045
e85e144b 70462005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
7047
7048 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7049 * kern/i386/pc/startup.S: Updated Global Descriptor table's
7050 descriptions.
7051 (grub_vbe_get_controller_info): New function.
7052 (grub_vbe_get_mode_info): Likewise.
7053 (grub_vbe_set_mode): Likewise.
7054 (grub_vbe_get_mode): Likewise.
7055 (grub_vbe_set_memory_window): Likewise.
7056 (grub_vbe_get_memory_window): Likewise.
7057 (grub_vbe_set_scanline_length): Likewise.
7058 (grub_vbe_get_scanline_length): Likewise.
7059 (grub_vbe_set_display_start): Likewise.
7060 (grub_vbe_get_display_start): Likewise.
7061 (grub_vbe_set_palette_data): Likewise.
7062 * include/grub/i386/pc/vbe.h: New file.
7063
c46153d2 70642005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7065
7066 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7067 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7068 * DISTLIST: Likewise.
7069 * kern/ieee1275/of.c: Moved to ...
7070 * kern/ieee1275/ieee1275.c: ... here.
7071
0cb90c45 70722005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7073
7074 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7075 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7076 Pass 0 as `end' parameter to grub_strtoul().
7077
a19fb360 70782005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7079
7080 * include/grub/powerpc/ieee1275/console.h: Do not include
7081 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
7082 ifdef.
7083 (grub_console_cur_color): Remove i386-specific prototype.
7084 (grub_console_real_putchar): Likewise.
7085 (grub_console_checkkey): Likewise.
7086 (grub_console_getkey): Likewise.
7087 (grub_console_getxy): Likewise.
7088 (grub_console_gotoxy): Likewise.
7089 (grub_console_cls): Likewise.
7090 (grub_console_setcursor): Likewise.
7091 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7092 Include <grub/machine/console.h>.
7093 * term/ieee1275/ofconsole.c: Likewise.
7094
4ac9bd04 70952005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
7096
7097 * Makefile.in (LIBLZO): New variable.
7098
7099 * configure.ac: Check for LZO version 2.
7100
7101 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7102 lzo/lzo1x.h instead of lzo1x.h.
7103
7104 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7105 of -llzo.
7106
7107 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7108 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7109
7110 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7111 copying the data from PARTITION to P.
7112
f4917dfd 71132005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7114
7115 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7116 negative, unload the module.
7117
7118 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7119 map is "pc_partition_map" but not "pc".
7120 (usage): Fix the description. The options are --boot-image and
7121 --core-image but not --boot-file or --core-file.
7122 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7123 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7124 DEFAULT_DIRECTORY.
7125
7126 * util/i386/pc/grub-install.in: Do not specify --boot-file or
7127 --core-file. Specify INSTALL_DEVICE as an argument.
7128
7129 * util/console.c: Include config.h.
7130 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7131 [HAVE_NCURSES_H]: Include ncurses.h.
7132 [HAVE_CURSES_H]: Include curses.h.
7133 [!A_NORMAL] (A_NORMAL): Defined as zero.
7134 [!A_STANDOUT] (A_STANDOUT): Likewise.
7135
7136 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7137 -lncurses.
7138 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7139
7140 * configure.ac: Check for curses libraries and headers.
7141
7142 * Makefile.in (LIBCURSES): New variable.
7143
7144 * genmk.rb (Script::rule): Set the executable bits.
7145
7146 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7147 name of the PC partition map is "pc_partition_map" but not "pc".
7148
0e143073 71492005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7150
7151 * util/i386/pc/grub-install.in (grub_probefs): New variable.
7152 (modules): Likewise.
7153 (usage): Added descriptions for --modules and --grub-probefs.
7154 Handle --modules and --grub-probefs. Save the arguments in MODULES
7155 and GRUB_PROBEFS, respectively.
7156 Auto-detect a filesystem module against GRUBDIR. If the result is
7157 empty and modules are not specified explicitly, abort the
7158 installation. Add the result to MODULES.
7159
7160 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7161 disk/powerpc/ieee1275/ofdisk.c,
7162 include/grub/powerpc/ieee1275/init.h and
7163 term/powerpc/ieee1275/ofconsole.c.
7164 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7165 term/ieee1275/ofconsole.c.
7166
7167 * include/grub/powerpc/ieee1275/console.h: Resurrected.
7168
7169 * COPYING: Upgraded to the latest version. Only the address of the
7170 FSF office has changed.
7171
efd6e6d5 71722005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7173
7174 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7175 kern/ieee1275.c with kern/ieee1275/of.c.
7176
7177 * kern/ieee1275.c: Moved to ...
7178 * kern/ieee1275/of.c: ... here.
7179
8ceafda2 71802005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
7181
7182 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
7183 readablity.
7184
7185 * config.guess: Updated to the latest version from gnulib.
7186 * config.sub: Likewise.
7187 * install.sh: Likewise.
7188 * mkinstalldirs: Likewise.
7189
7190 * include/grub/console.h: Removed. This file is arch-specific. Do
7191 not put this in include/grub.
7192
7193 * include/grub/i386/pc/console.h: Resurrected.
7194
7195 * util/console.c: Include grub/machine/console.h instead of
7196 grub/console.h.
7197 * util/grub-emu.c: Likewise.
7198
267f6cd9 71992005-08-04 Marco Gerards <metgerards@student.han.nl>
7200
7201 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
7202 hardcoded value.
7203
7204 From Vincent Pelletier <subdino2004@yahoo.fr>
7205 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
7206 Redefined to use grub_getwh.
7207 (grub_term): New member named getwh.
7208 (grub_getwh): New prototype.
7209 * kern/term.c (grub_getwh): New function.
7210 * term/i386/pc/console.c (grub_console_getwh): New function.
7211 (grub_console_term): New member `getwh'.
7212 * term/i386/pc/vga.c (grub_vga_getwh): New function.
7213 (grub_vga_term): New member `getwh'.
0b5abe02 7214 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 7215 grub_ssize_t.
7216 (grub_ofconsole_getw): New function.
7217 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
7218 (grub_ofconsole_term): New field named getwh and new initial
7219 value.
7220
3be7266d 72212005-08-03 Hollis Blanchard <hollis@penguinppc.org>
7222
7223 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
7224 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
7225 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
7226 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
7227 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
7228 of <grub/machine/ieee1275.h>.
7229 * commands/ieee1275/reboot.c: Likewise.
7230 * boot/powerpc/ieee1275/ieee1275.c: Move ...
7231 * kern/ieee1275.c: ... to here. All users updated. Change all
7232 parameter structs to use new type `grub_ieee1275_cell_t'.
7233 * term/powerpc/ieee1275/ofconsole.c: Move ...
7234 * term/ieee1275/ofconsole.c: ... to here. All users updated.
7235 * disk/powerpc/ieee1275/ofdisk.c: Move ...
7236 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
7237 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
7238 to return int.
7239 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
7240 Remove unused prototypes. All users updated.
7241 * include/grub/powerpc/ieee1275/console.h: Removed.
7242 * include/grub/powerpc/ieee1275/ieee1275.h: Define
7243 `grub_ieee1275_cell_t'.
7244 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
7245 Cast comparisons with -1 to the correct type.
7246 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
7247 type to match `grub_ieee1275_entry_fn'.
7248
8b5f3938 72492005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
7250
7251 * DISTLIST: Added util/i386/pc/grub-probefs.c.
7252
7253 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
7254 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
7255 partmap/sun.c.
7256 (grub_probefs_SOURCES): New variable.
7257
7258 * util/i386/pc/grub-probefs.c: New file.
7259
7260 * util/i386/pc/grub-setup.c (main): Call
7261 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
7262 grub_hfs_init and grub_jfs_init to initialize the system. Call
7263 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
7264 grub_pc_partition_map_fini to finish the system.
7265
ea409713 72662005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
7267
7268 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
7269 function.
7270 (grub_multiboot_load_elf32): Likewise.
7271 (grub_multiboot_is_elf64): Likewise.
7272 (grub_multiboot_load_elf64): Likewise.
7273 (grub_multiboot_load_elf): Likewise.
7274 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
7275 an ELF32 or ELF64 file.
7276 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
7277
7278 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
7279 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
7280 NULL before calling FS->LABEL.
7281 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
7282 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
7283 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
7284 before calling FS->LABEL.
7285
141a288b 72862005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
7287
7288 * util/i386/pc/grub-install.in (datadir): New variable.
7289 (libdir): Removed.
7290 (pkgdatadir): New variable.
7291 (pkglibdir): Removed.
7292
0d5f8a54 72932005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
7294
7295 * DISTLIST: Added util/i386/pc/grub-install.in.
7296
7297 * util/i386/pc/grub-install.in: New file.
7298
7299 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
7300 (grub_install_SOURCES): Likewise.
7301
7302 * genmk.rb: Added support for scripts.
7303 (Script): New class.
7304 (scripts): New variable.
7305
7306 * Makefile.in (install-local): Install sbin_SCRIPTS by
7307 INSTALL_SCRIPT.
7308 (uninstall): Remove sbin_SCRIPTS.
7309
7310 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
7311 device, try to get a GRUB device by
7312 grub_util_biosdisk_get_grub_dev.
7313 Free DEST_DEV.
7314
7315 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
7316 description for --device-map.
7317
5f968e1e 73182005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7319
7320 Change the semantics of variable hooks. They now return strings
7321 instead of error values.
7322
7323 * util/i386/pc/grub-setup.c: Include grub/env.h.
7324 (setup): Use grub_device_set_root instead of grub_env_set.
7325
7326 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
7327 grub_env_get instead of grub_device_set_root and
7328 grub_device_get_root, respectively.
7329
7330 * kern/main.c (grub_env_write_root): New function.
7331 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
7332 grub_env_set instead of grub_device_set_root.
7333
7334 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
7335 many variables.
7336 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
7337 rather than calling ENV->WRITE_HOOK afterwards.
7338 (grub_env_get): Return the result of ENV->READ_HOOK rather than
7339 passing a pointer of a pointer.
7340 (grub_register_variable_hook): Change the types of "read_hook" and
7341 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
7342 respectively.
7343 Allocate the default empty string on the heap, because this string
7344 may be freed later.
7345
7346 * kern/device.c: Include grub/env.h.
7347 (grub_device_set_root): Removed.
7348 (grub_device_get_root): Likewise.
7349 (grub_device_open): Use grub_env_get instead of
7350 grub_device_get_root.
7351
7352 * include/grub/env.h (grub_env_read_hook_t): New type.
7353 (grub_env_write_hook_t): Likewise.
7354 (grub_env_var): Change the types of "read_hook" and "write_hook"
7355 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
7356 (grub_register_variable_hook): Likewise.
7357
7358 * include/grub/device.h (grub_device_set_root): Removed.
7359 (grub_device_set_root): Likewise.
7360
7361 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
7362 make sure that DIRNAME terminates with '/', so that
7363 grub_fat_find_dir will fail if PATH is not a directory.
7364
7365 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
7366 from DIRNAME.
7367 Use the qualifier auto for print_files and print_files_long.
7368 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
7369 as a regular file.
7370 Put a newline only if there is no error.
7371 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
7372 used.
7373
896f0afd 73742005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7375
7376 * kern/partition.c (grub_partition_probe): Initialize PART to
7377 NULL. Otherwise, when no partition map is registered, this returns
7378 a garbage.
7379
b28b81b2 73802005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
7381
7382 * partmap/apple.c (apple_partition_map_iterate): Check if POS
7383 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
7384 valid.
7385
5f3607e0 73862005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
7387
7388 * commands/ls.c (grub_ls_list_disks): Print the filesystem
7389 information on each device, if it does not have partitions. Print
7390 "Device" instead of "Disk", because this function is not specific
7391 to disk devices.
7392
7393 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
7394 static to ensure that it is put on the memory rather than a
7395 register.
7396
502c87e8 73972005-07-17 Yoshinori Okuji <okuji@enbug.org>
7398
7399 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
7400 (grub_cat_init): Likewise.
7401 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
7402 (options): Likewise.
7403 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
7404 (grub_configfile_init): Likewise.
7405 * font/manager.c (GRUB_MOD_INIT): Likewise.
7406 * commands/help.c (GRUB_MOD_INIT): Likewise.
7407 (grub_help_init): Likewise.
7408 * normal/command.c (grub_command_init): Likewise.
7409 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
7410 * disk/loopback.c (grub_loop_init): Likewise.
7411 (GRUB_MOD_INIT): Likewise.
7412 * commands/ls.c (grub_ls_init): Likewise.
7413 (GRUB_MOD_INIT): Likewise.
7414 (options): Likewise.
7415 * commands/boot.c (grub_boot_init): Likewise.
7416 (GRUB_MOD_INIT): Likewise.
7417 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
7418 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
7419 (GRUB_MOD_INIT): Likewise.
7420 * commands/cmp.c (grub_cmp_init): Likewise.
7421 (GRUB_MOD_INIT): Likewise.
7422
7423 * normal/arg.c: Use <> instead of "" to include header files.
7424 (SHORT_ARG_HELP): New macro.
7425 (SHORT_ARG_USAGE): Likewise.
7426 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
7427 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
7428 descriptions.
7429 (find_short): Check if C is 'h' or 'u' explicitly.
7430 (grub_arg_show_help): Use space characters instead of tabs. Treat
7431 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
7432 are shown with --help and --usage only if they are not used for
7433 the command itself.
7434 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
7435 'h' and 'u'.
7436
7437 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
7438 const into "longarg". Change the type of "shortarg" to int.
7439
f806d18e 74402005-07-17 Yoshinori Okuji <okuji@enbug.org>
7441
7442 * boot/i386/pc/boot.S (boot_drive_check): New label.
7443
7444 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
7445 macro.
7446
7447 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
7448 which do not pass a boot drive correctly. Copied from GRUB Legacy.
7449
e293232b 74502005-07-17 Yoshinori Okuji <okuji@enbug.org>
7451
7452 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
7453 When turning off Gate A20, skip the check and return immediately,
7454 because this is not fatal usually.
7455
ebedfd00 74562005-07-17 Yoshinori Okuji <okuji@enbug.org>
7457
7458 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
7459 be 0x7C00 instead of 0x8000.
7460
7461 * boot/i386/pc/pxeboot.S: Rewritten.
7462
7463 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
7464 EXT_C.
7465 (gate_a20_check_state): Read a byte from 0x108000. Invert the
7466 result.
7467
654fc59f 74682005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
7469
7470 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
7471 robustness. This routine now supports a BIOS call and System
7472 Control Port A to modify the gate A20.
7473
7474 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7475 Increased to 0x440.
7476
09f9923f 74772005-07-12 Hollis Blanchard <hollis@penguinppc.org>
7478
7479 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
7480 device path and resulting ihandle.
7481 (grub_ofdisk_close): dprintf the ihandle being closed.
7482 (grub_ofdisk_read): dprintf function parameters.
7483 * kern/mm.c (grub_mm_init_region): Likewise.
7484 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
7485 (grub_linux_boot): dprintf the Linux entry point, initrd address and
7486 size, and boot arguments.
7487 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
7488 before loading into memory.
7489 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
7490 before loading into memory.
7491
7ef504d8 74922005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
7493
7494 * kern/mm.c: Added much documentation.
7495 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
7496 8, set to 5 instead of 8.
7497
e0f050c2 74982005-07-10 Yoshinori Okuji <okuji@enbug.org>
7499
7500 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
7501
7502 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
7503 (grub_mkdevicemap_SOURCES): New variable.
7504
7505 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
7506 lib/device.c of GRUB Legacy.
7507
7224189a 75082005-07-10 Yoshinori Okuji <okuji@enbug.org>
7509
7510 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
7511 instead of PATH is NULL.
7512
68c864eb 75132005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
7514
7515 * commands/cmp.c (BUFFER_SIZE): New macro.
7516 (grub_cmd_cmp): Close the right file at the right time. Compare
7517 only data just read. Don't report files of different size as
7518 identical. Dynamically allocate buffers. Move variable
7519 declarations at the beginning of function.
7520
e6f3e614 75212005-07-09 Yoshinori Okuji <okuji@enbug.org>
7522
7523 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
7524 reverse.
7525
f8f1559a 75262004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
7527
7528 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
7529 when backspace is pressed at beginning of line.
7530
39c9d41d 75312005-07-03 Yoshinori Okuji <okuji@enbug.org>
7532
7533 * DISTLIST: Added genfslist.sh.
7534
7535 * normal/main.c (fs_module_list): New variable.
7536 (autoload_fs_module): New function.
7537 (read_fs_list): Likewise.
7538 (grub_normal_execute): Call read_fs_list.
7539
7540 * kern/fs.c (grub_fs_autoload_hook): New variable.
7541 (grub_fs_probe): Added support for auto-loading.
7542
7543 * include/grub/normal.h (struct grub_fs_module_list): New struct.
7544 (grub_fs_module_list_t): New type.
7545
7546 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
7547 (grub_fs_autoload_hook): New prototype.
7548
7549 * genfslist.sh: New file.
7550
7551 * genmk.rb: Added a rule to generate a filesystem list.
7552
121c1d83 75532005-06-30 Marco Gerards <metgerards@student.han.nl>
7554
7555 * configure.ac: Fix the test for cross-compiling.
7556
7557 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
7558 define GRUB_UTIL anymore.
7559
7560 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
7561 so this function works on other systems than just big endian.
7562 (load_modules): Likewise.
7563 (add_segments): Likewise.
7564
e75d76e1 75652005-06-23 Hollis Blanchard <hollis@penguinppc.org>
7566
7567 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
7568 contains `l' modifier, get a long from va_arg().
7569
50b5a0a7 75702005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
7571
7572 * kern/mm.c (grub_free): If the next free block which is being
7573 merged is the first free block, set the first block to the block
7574 being freed.
7575 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
7576
89371b20 75772005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7578
7579 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
7580 `grub_ieee1275_chosen'.
7581
168d6e58 75822005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7583
7584 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
7585 (grub_ieee1275_chosen): New variable.
7586 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
7587 `chosen'.
7588 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
7589 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7590 Rename first argument to `phandle' for consistency.
7591 (grub_ieee1275_get_property_length): Likewise.
7592 (grub_ieee1275_next_property): Likewise. Change type of first argument
7593 to grub_ieee1275_phandle_t.
7594 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
7595 Move export next to declaration.
7596 (grub_ieee1275_chosen): New variable.
7597 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
7598 Correct cosmetic typo.
7599 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
7600 `grub_ieee1275_chosen'.
7601 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
7602 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
7603 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
7604 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
7605 `grub_ieee1275_chosen'.
7606
ca5baa3f 76072005-05-10 Hollis Blanchard <hollis@penguinppc.org>
7608
7609 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
7610 /chosen/bootargs.
7611 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
7612 /chosen/bootargs as "variable=value" pairs.
7613
708b345f 76142005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
7615
7616 * include/grub/misc.h (grub_dprintf): New macro.
7617 (grub_real_dprintf): New prototype.
7618 (grub_strword): Likewise.
7619 (grub_iswordseparator): Likewise.
7620 * kern/misc.c (grub_real_dprintf): New function.
7621 (grub_strword): Likewise.
7622 (grub_iswordseparator): Likewise.
7623
f4c5e67c 76242005-04-30 Hollis Blanchard <hollis@penguinppc.org>
7625
7626 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
7627 (roundup): Remove macro.
7628 (grub_ieee1275_flags): Make static.
7629 (grub_ieee1275_realmode): Remove.
7630 (grub_ieee1275_test_flag): New function.
7631 (grub_ieee1275_set_flag): Likewise.
7632 (find_options): Rename to `grub_ieee1275_find_options'; update
7633 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
7634 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
7635 (cmain): New prototype.
7636 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
7637 `grub_ieee1275_flags' directly.
7638 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
7639 machine/biosdisk.h.
7640 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
7641 Don't include grub/machine/init.h.
7642 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
7643 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7644 Remove prototype.
7645 (grub_ieee1275_realmode): Likewise.
7646 (grub_ieee1275_flag): New enum.
7647 (grub_ieee1275_test_flag): New prototype.
7648 (grub_ieee1275_set_flag): New prototype.
7649 * include/grub/powerpc/ieee1275/init.h: Remove file.
7650 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
7651 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
7652 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
7653 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
7654 comment.
7655 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
7656 `grub_ieee1275_test_flag'.
7657 (grub_ieee1275_encode_devname): Likewise.
7658
ed16607e 76592005-04-21 Hollis Blanchard <hollis@penguinppc.org>
7660
7661 * include/grub/powerpc/ieee1275/ieee1275.h
7662 (grub_ieee1275_encode_devname): New prototype.
7663 (grub_ieee1275_get_filename): Likewise.
7664 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
7665 function.
7666 (grub_set_prefix): Likewise.
7667 (grub_machine_init): Call grub_set_prefix.
7668 * kern/powerpc/ieee1275/openfw.c: Fix typos.
7669 (grub_parse_type): New enum.
7670 (grub_ieee1275_get_devargs): New function.
7671 (grub_ieee1275_get_devname): Likewise.
7672 (grub_ieee1275_parse_args): Likewise.
7673 (grub_ieee1275_get_filename): Likewise.
7674 (grub_ieee1275_encode_devname): Likewise.
7675
be369920 76762005-03-30 Marco Gerards <metgerards@student.han.nl>
7677
7678 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
7679 `grub_loader_unset'.
7680
a5ce3a4a 76812005-03-26 Hollis Blanchard <hollis@penguinppc.org>
7682
7683 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
7684 instead of grub_ieee1275_interpret.
7685 (grub_halt_init): New function.
7686 (grub_halt_fini): Likewise.
7687 (GRUB_MOD_INIT): Correct message grammar.
7688 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
7689 instead of grub_ieee1275_interpret.
7690 (grub_reboot_init): New function.
7691 (grub_reboot_fini): Likewise.
7692 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
7693 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
7694 util/i386/pc/misc.c with commands/ieee1275/halt.c,
7695 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
7696 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
7697 function.
7698 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
7699 Add prototype.
7700 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
7701 prototype.
7702 (grub_halt): Likewise.
7703 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
7704 (cmain): Remove __attribute__((unused)).
7705 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
7706 (grub_heap_len): Likewise.
7707 (grub_machine_fini): New function.
7708 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
7709 (grub_halt): Likewise.
7710 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
7711 function.
7712 * util/powerpc/ieee1275/misc.c: New file.
7713
0058f771 77142005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7715
7716 * DISTLIST: New file.
7717 * gendistlist.sh: Likewise.
7718
7719 * Makefile.in (COMMON_DISTFILES): Removed.
7720 (BOOT_DISTFILES): Likewise.
7721 (CONF_DISTFILES): Likewise.
7722 (DISK_DISTFILES): Likewise.
7723 (FS_DISTFILES): Likewise.
7724 (INCLUDE_DISTFILES): Likewise.
7725 (KERN_DISTFILES): Likewise.
7726 (LOADER_DISTFILES): Likewise.
7727 (TERM_DISTFILES): Likewise.
7728 (UTIL_DISTFILES): Likewise.
7729 (DISTFILES): Likewise.
7730 (uninstall): Uninstall files in $(pkgdata_DATA).
7731 (DISTLIST): New target.
7732 (distdir): Use the contents of the file DISTLIST to get a list of
7733 distributed files.
7734
46b3b8a5 77352005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7736
7737 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
7738 descriptor. This is ported from GRUB Legacy.
7739
7740 * gencmdlist.sh: Added an extra semicolon to make it work with
7741 old sed versions. Reported by Robert Bihlmeyer
7742 <robbe@orcus.priv.at>.
7743
5822ff87 77442005-03-08 Yoshinori Okuji <okuji@enbug.org>
7745
7746 Automatic loading of commands is supported.
7747
7748 * normal/main.c (read_command_list): New function.
7749 (grub_normal_execute): Call read_command_list.
7750
7751 * normal/command.c (grub_register_command): Return zero or CMD.
7752 Allocate CMD->NAME from the heap.
7753 Initialize CMD->MODULE_NAME to zero.
7754 Find the same name as well. If the same command is found and it is
7755 a dummy command, overwrite members. If it is not a dummy command,
7756 return zero.
7757 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
7758 (grub_command_find): If a dummy command is found, load a module
7759 and retry to find a command only once.
7760
7761 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
7762 make sure that each command is loaded.
7763
7764 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
7765 macro.
7766 (struct grub_command): Remove const from the member `name'.
7767 Add a new member `module_name'.
7768 (grub_register_command): Return grub_command_t.
7769
7770 * commands/help.c (grub_cmd_help): Call grub_command_find to make
7771 sure that each command is loaded.
7772
7773 * genmk.rb (PModule::rule): Specify a module name without the
7774 suffix ".mod" to gencmdlist.sh.
7775
7b1f4b57 77762005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
7777
7778 * gencmdlist.sh: New file.
7779
7780 * genmk.rb (PModule::rule): Generate a rule for a command list.
7781 Clean command.lst.
7782 Generate command.lst from $(COMMANDFILES).
7783
7784 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
7785 (DATA): Added $(pkgdata_DATA).
7786 (install-local): Install files in $(pkgdata_DATA).
7787
062aaf39 77882005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
7789
7790 * term/i386/pc/vga.c (debug_command): Removed.
7791 (GRUB_MOD_INIT): Do not register the command "debug".
7792
7793 From Hollis Blanchard:
7794 * commands/configfile.c: New file.
7795 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7796 commands/configfile.c.
7797 (pkgdata_MODULES): Added configfile.mod.
7798 (configfile_mod_SOURCES): New variable.
7799 (configfile_mod_CFLAGS): Likewise.
7800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7801 commands/configfile.c.
7802 (pkgdata_MODULES): Added configfile.mod.
7803 (configfile_mod_SOURCES): New variable.
7804 (configfile_mod_CFLAGS): Likewise.
7805 * util/grub-emu.c (main): Call grub_configfile_init and
7806 grub_configfile_fini.
7807 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
7808 prototype.
7809 [GRUB_UTIL] (grub_configfile_fini): Likewise.
7810
cee01aa6 78112005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
7812
7813 * normal/arg.c (grub_arg_show_help): Do not show the bug report
7814 address.
7815
7816 * commands/help.c (grub_cmd_help): Do not print newlines after
7817 the last command in print_command_help.
7818
93f3a1d8 78192005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
7820
7821 * commands/default.h: New file.
7822 * commands/timeout.h: Likewise.
7823 * normal/context.c: Likewise.
7824
7825 * util/misc.c: Do not include sys/times.h.
7826 Include sys/time.h and grub/machine/time.h.
7827 (grub_get_rtc): Rewritten with gettimeofday.
7828
7829 * util/grub-emu.c (main): Call grub_default_init and
7830 grub_timeout_init before grub_normal_init, and call
7831 grub_timeout_fini and grub_default_fini after grub_main.
7832
7833 * util/console.c (grub_ncurses_checkkey): Return the read
7834 character or -1.
7835
7836 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
7837 timeouts.
7838
7839 * normal/main.c (read_config_file): Push MENU. If this fails,
7840 print an error and wait for a user input.
7841 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
7842 If a menu is empty or an error occurs, pop MENU.
7843 (grub_normal_execute): Pop and free MENU after grub_menu_run
7844 returns.
7845
7846 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
7847
7848 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
7849 include time.h.
7850 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7851 without GRUB_UTIL.
7852 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
7853 time.h.
7854 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7855 without GRUB_UTIL.
7856
7857 * include/grub/normal.h (struct grub_menu_list): New struct.
7858 (grub_menu_list_t): New type.
7859 (struct grub_context): New struct.
7860 (grub_context_t): New type.
7861 (grub_register_command): Got rid of EXPORT_FUNC.
7862 (grub_unregister_command): Likewise.
7863 (grub_context_get): New prototype.
7864 (grub_context_get_current_menu): Likewise.
7865 (grub_context_push_menu): Likewise.
7866 (grub_context_pop_menu): Likewise.
7867 [GRUB_UTIL] (grub_default_init): Likewise.
7868 [GRUB_UTIL] (grub_default_fini): Likewise.
7869 [GRUB_UTIL] (grub_timeout_init): Likewise.
7870 [GRUB_UTIL] (grub_timeout_fini): Likewise.
7871
7872 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
7873 commands/timeout.c and normal/context.c.
7874 (pkgdata_MODULES): Added default.mod and timeout.mod.
7875 (normal_mod_SOURCES): Added normal/context.c.
7876 (default_mod_SOURCES): New variable.
7877 (default_mod_CFLAGS): Likewise.
7878 (timeout_mod_SOURCES): Likewise.
7879 (timeout_mod_CFLAGS): Likewise.
7880 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
7881 conf/i386-pc.rmk.
7882 (pkgdata_MODULES): Added default.mod and timeout.mod.
7883 (normal_mod_SOURCES): Added normal/context.c.
7884 (default_mod_SOURCES): New variable.
7885 (default_mod_CFLAGS): Likewise.
7886 (timeout_mod_SOURCES): Likewise.
7887 (timeout_mod_CFLAGS): Likewise.
7888
7889 * Makefile.in (all-local): Added $(MKFILES).
7890
4ed2e1dd 78912005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
7892
7893 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
7894 (grub_emu_SOURCES): Likewise.
7895 (pkgdata_MODULES): Add `sun.mod'.
7896 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7897 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7898 `partmap/sun.c'.
7899 (pkgdata_MODULES): Add `sun.mod'.
7900 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7901 * include/grub/partition.h (grub_sun_partition_map_init): New
7902 prototype.
7903 (grub_sun_partition_map_fini): Likewise.
7904 * partmap/sun.c: New file.
7905 * util/grub-emu.c (main): Initialize and de-initialize the sun
7906 partitionmap support.
7907
4d4e372e 79082005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
7909
7910 This implements an Emacs-like menu entry editor.
7911
7912 * normal/menu_entry.c: New file.
7913
7914 * util/console.c (grub_ncurses_putchar): Translate some Unicode
7915 characters to ASCII.
7916 (saved_char): New variable.
7917 (grub_ncurses_checkkey): Rewritten completely.
7918 (grub_ncurses_getkey): Likewise.
7919 (grub_ncurses_init): Call raw instead of cbreak.
7920
7921 * normal/menu.c (print_entry): Do not put a space.
7922 (init_page): Renamed to ...
7923 (grub_menu_init_page): ... this. All callers changed.
7924 (edit_menu_entry): Removed.
7925 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
7926
7927 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
7928
7929 * kern/misc.c (grub_vprintf): Call grub_refresh.
7930
7931 * normal/menu.c (DISP_LEFT): Renamed to ...
7932 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
7933 * normal/menu.c (DISP_UP): Renamed to ...
7934 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
7935 * normal/menu.c (DISP_RIGHT): Renamed to ...
7936 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
7937 * normal/menu.c (DISP_DOWN): Renamed to ...
7938 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
7939 * normal/menu.c (DISP_HLINE): Renamed to ...
7940 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
7941 * normal/menu.c (DISP_VLINE): Renamed to ...
7942 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
7943 * normal/menu.c (DISP_UL): Renamed to ...
7944 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
7945 * normal/menu.c (DISP_UR): Renamed to ...
7946 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
7947 * normal/menu.c (DISP_LL): Renamed to ...
7948 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
7949 * normal/menu.c (DISP_LR): Renamed to ...
7950 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
7951 * normal/menu.c (TERM_WIDTH): Renamed to ...
7952 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
7953 * normal/menu.c (TERM_HEIGHT): Renamed to ...
7954 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
7955 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
7956 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
7957 * normal/menu.c (TERM_MARGIN): Renamed to ...
7958 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
7959 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
7960 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
7961 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
7962 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
7963 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
7964 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
7965 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
7966 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
7967 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
7968 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
7969 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
7970 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
7971 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
7972 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
7973 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
7974 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
7975 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
7976 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
7977 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
7978 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
7979 All callers changed.
7980
7981 * include/grub/normal.h: New prototype.
7982
7983 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7984 normal/menu_entry.c.
7985 (normal_mod_SOURCES): Likewise.
7986 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7987 (normal_mod_SOURCES): Likewise.
7988
e6b92c8a 79892005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
7990
7991 * include/grub/normal.h (grub_halt_init): New prototype.
7992 (grub_halt_fini): Likewise.
7993 (grub_reboot_init): Likewise.
7994 (grub_reboot_fini): Likewise.
7995
7996 * util/grub-emu.c: Include signal.h.
7997 (main_env): New global variable.
7998 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
7999 catch C-c.
8000 (grub_machine_fini): New function.
8001 (main): Call grub_halt_init and grub_reboot_init before
8002 grub_main, and grub_reboot_fini and grub_halt_fini after it.
8003 Call setjmp with MAIN_ENV to go back afterwards.
8004 Call grub_machine_fini right before return.
8005
8006 * include/grub/util/misc.h: Include setjmp.h.
8007 (main_env): New prototype.
8008
8009 * include/grub/kernel.h (grub_machine_fini): New prototype.
8010 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
8011 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
8012
8013 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
8014 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
8015 * term/i386/pc/console.c (grub_console_fini): Likewise.
8016
8017 * util/i386/pc/misc.c: New file.
8018
8019 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8020 util/i386/pc/misc.c, commands/i386/pc/halt.c and
8021 commands/i386/pc/reboot.c.
8022
c642636f 80232005-02-14 Guillem Jover <guillem@hadrons.org>
8024
8025 * include/grub/dl.h (grub_dl_check_header): New prototype.
8026 (grub_arch_dl_check_header): Change return type to grub_err_t,
8027 remove size parameter and export function. Update all callers.
8028 * kern/dl.c (grub_dl_check_header): New function.
8029 (grub_dl_load_core): Use `grub_dl_check_header' instead of
8030 `grub_arch_dl_check_header'. Check ELF type. Check if sections
8031 are inside the core.
8032 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
8033 independent ELF header checks.
8034 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8035 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
8036 `grub_dl_check_header' instead of explicit checks. Check for the
8037 ELF type.
8038 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
8039 `grub_dl_check_header' instead of explicit checks. Remove arch
8040 specific ELF header checks.
8041
e6b92c8a 8042 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
8043 argument SIZE.
8044
5eabe94b 80452005-02-13 Hollis Blanchard <hollis@penguinppc.org>
8046
8047 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
8048 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8049
1b14a681 80502005-02-12 Hollis Blanchard <hollis@penguinppc.org>
8051
8052 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8053 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
8054 (part_map_iterate): Clear `grub_errno' and return 0 if
8055 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
8056 * partmap/amiga.c (amiga_partition_map_iterate): Return
8057 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8058 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8059
aca108aa 80602005-02-01 Guillem Jover <guillem@hadrons.org>
8061
8062 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8063 help info.
8064
c9f9c556 80652005-01-31 Marco Gerards <metgerards@student.han.nl>
8066
8067 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8068 Removed prototype.
8069 (grub_rescue_cmd_linux): New prototype.
8070 (grub_rescue_cmd_initrd): Likewise.
8071 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8072 `bi_rec'.
8073 (grub_linux_release_mem): Release the memory for the initrd.
8074 (grub_load_linux): Renamed from this...
8075 (grub_rescue_cmd_linux): ...To this. Changed all callers.
8076 Changed `entry' not to be static. Loop over memory regions to
8077 find another one when the default fails.
8078 (grub_rescue_cmd_initrd): New function.
8079 (grub_linux_init): Remove function.
8080 (grub_linux_fini): Likewise.
8081 (GRUB_MOD_INIT): Register `initrd'.
8082 (GRUB_MOD_FINI): Unregister `initrd'.
8083 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8084 Function removed.
8085 (grub_linux_normal_fini): Likewise.
8086 (GRUB_MOD_INIT): Register `initrd'.
8087 (GRUB_MOD_FINI): Unregister `initrd'.
8088
990cf3aa 80892005-01-31 Marco Gerards <metgerards@student.han.nl>
8090
8091 * commands/help.c: New file.
8092 * normal/arg.c (show_help): Renamed to...
8093 (grub_arg_show_help): ... this.
8094 * commands/i386/pc/halt.c: New file.
8095 * commands/i386/pc/reboot.c: Likewise.
8096 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8097 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8098 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8099 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8100 variables.
8101 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8102 `commands/help.c'.
8103 (pkgdata_MODULES): Add `help.mod'.
8104 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8105 * grub/i386/pc/init.h (grub_reboot): New prototype.
8106 (grub_halt): Likewise.
8107 * include/grub/normal.h (grub_arg_show_help): New prototype.
8108 (grub_help_init): Likewise.
8109 (grub_help_fini): Likewise.
8110 * util/grub-emu.c (main): Initialize and deinitialize the help
8111 command.
8112
8113 * normal/cmdline.c (grub_cmdline_get): Doc fix.
8114
8115 * normal/command.c (grub_command_init): Fixed the description of
8116 the `set' and `unset' commands.
8117
81182005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 8119
8120 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8121 function.
8122 * commands/ieee1275/halt.c: New file.
8123 * commands/ieee1275/reboot.c: Likewise.
8124 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8125 `__attribute__ ((unused))'. Some GCS related fixed.
8126 (grub_suspend_init) [GRUB_UTIL]: Function removed.
8127 (grub_suspend_fini): Likewise.
8128 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8129 and `halt.mod'.
8130 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8131 (halt_mod_CFLAGS): New variables.
8132 * include/grub/powerpc/ieee1275/ieee1275.h
8133 (grub_ieee1275_interpret): New prototype.
8134
1ab09cc7 81352005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8136
8137 * include/grub/misc.h (memmove): New prototype.
8138 (memcpy): Likewise.
8139
8b8cbdb2 81402005-01-22 Hollis Blanchard <hollis@penguinppc.org>
8141
8142 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8143 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
8144
e3741a27 81452005-01-22 Marco Gerards <metgerards@student.han.nl>
8146
8147 * kern/misc.c (grub_strndup): Function rewritten.
8148
776bd780 81492005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
8150
8151 * normal/menu.c (TERM_WIDTH): Macro redefined.
8152 (TERM_TOP_BORDER_Y): Likewise.
8153 (draw_border): Replaced while-loop by a for-loop. Make the number
8154 of lines consistent with the number of lines displayed in
8155 print_entries. Added a margin below the rectangle.
8156 (print_entry): Make the entry fit in the rectangle.
8157 (print_entries): Display the scroll arrows next to the right
8158 border.
8159
78026bce 81602005-01-21 Marco Gerards <metgerards@student.han.nl>
8161
8162 * fs/minix.c (grub_minix_find_file): Reserve more space for
8163 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
8164 `grub_strncpy' to copy `path' into it.
8165
67bbaf0f 81662005-01-21 Marco Gerards <metgerards@student.han.nl>
8167
8168 Add the loopback device, a device via which files can be accessed
8169 as devices.
8170
8171 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8172 (pkgdata_MODULES): Add loopback.mod.
8173 (loopback_mod_SOURCES): New variable.
8174 (loopback_mod_CFLAGS): Likewise.
8175 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8176 `disk/loopback.c'.
8177 (pkgdata_MODULES): Add loopback.mod.
8178 (loopback_mod_SOURCES): New variable.
8179 (loopback_mod_CFLAGS): Likewise.
8180 * disk/loopback.c: new file.
8181 * include/grub/normal.h (grub_loop_init): New prototype.
8182 (grub_loop_fini): New prototype.
8183 * util/grub-emu.c (main): Initialize and de-initialize loopback
8184 support.
8185 * include/grub/disk.h (grub_disk_dev_id): Add
8186 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
8187
6f1c18bd 81882005-01-20 Hollis Blanchard <hollis@penguinppc.org>
8189
8190 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
8191 function.
8192 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
8193 (suspend_mod_SOURCES): New variable.
8194 (suspend_mod_CFLAGS): Likewise.
8195 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
8196 New prototype.
8197 * commands/ieee1275/suspend.c: New file.
8198
b38551da 81992005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8200
8201 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
8202 ((unused))' to `__attribute__ ((used))'.
8203 (GRUB_MOD_FINI): Likewise.
8204 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
8205 * genmk.rb (PModule): Assign space to common symbols when linking
8206 modules.
8207
777aff39 82082005-01-20 Marco Gerards <metgerards@student.han.nl>
8209
8210 * include/grub/mm.h (grub_mm_init_region): Change the type of the
8211 `unsigned' arguments to `grub_size_t'.
8212 (grub_malloc): Likewise.
8213 (grub_realloc): Likewise.
8214 (grub_memalign): Likewise.
8215 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
8216 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8217 * util/misc.c (grub_malloc): Likewise.
8218 (grub_realloc): Likewise.
8219 * kern/mm.c (get_header_from_pointer): Change the casts to
8220 `unsigned' into a cast to `grub_size_t'.
8221
8222 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
8223 point to `currnode' when `currnode' is changed.
8224
8225 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
8226 Schottelius <nico-linux@schottelius.org>.
8227
d0ff18e1 82282005-01-09 Hollis Blanchard <hollis@penguinppc.org>
8229
8230 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
8231 (note_path): Remove variable.
8232 (GRUB_IEEE1275_NOTE_NAME): New macro.
8233 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
8234 (grub_ieee1275_note_hdr): New structure.
8235 (grub_ieee1275_note_desc): Likewise.
8236 (grub_ieee1275_note): Likewise.
8237 (load_note): Remove `dir' argument. All callers updated. Remove
8238 `note_img' and `path'. Do not load a file from `note_path'.
8239 Initialize a struct grub_ieee1275_note and write that to `out'.
8240 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
8241
4ca7004c 82422005-01-05 Marco Gerards <metgerards@student.han.nl>
8243
8244 * util/misc.c (grub_util_read_image): Revert last change. It
8245 called `grub_util_read_at', which seeks from the beginning of the
8246 file.
8247
0b412211 82482005-01-04 Hollis Blanchard <hollis@penguinppc.org>
8249
8250 * TODO: Add note about endianness in grub-mkimage.
8251 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
8252 section.
8253 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
8254 (grub_mkimage_SOURCES): New target.
8255 * include/grub/kernel.h (grub_start_addr): Remove variable.
8256 (grub_end_addr): Likewise.
8257 (grub_total_module_size): Likewise.
8258 (grub_kernel_image_size): Likewise.
8259 (GRUB_MODULE_MAGIC): New constant.
8260 (grub_module_info): New structure.
8261 (grub_arch_modules_addr): New prototype.
8262 (grub_get_end_addr): Remove prototype.
8263 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
8264 * include/grub/powerpc/ieee1275/kernel.h: New file.
8265 * include/grub/util/misc.h (grub_util_get_fp_size): New
8266 prototype.
8267 (grub_util_read_at): Likewise.
8268 (grub_util_write_image_at): Likewise.
8269 * kern/main.c (grub_get_end_addr): Remove function.
8270 (grub_load_modules): Call grub_arch_modules_addr instead of using
8271 grub_end_addr. Look for a grub_module_info struct in memory. Use
8272 the grub_module_info fields instead of calling grub_get_end_addr
8273 as loop conditions. Move grub_add_unused_region code here.
8274 (grub_add_unused_region): Remove function.
8275 * kern/i386/pc/init.c: Include grub/cache.h.
8276 (grub_machine_init): Remove call to grub_get_end_addr. Remove
8277 one call to add_mem_region.
8278 (grub_arch_modules_addr): New function.
8279 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
8280 (grub_total_module_size): Likewise.
8281 Include grub/machine/kernel.h.
8282 (grub_arch_modules_addr): New function.
8283 * util/grub-emu.c (grub_end_addr): Remove variable.
8284 (grub_total_module_size): Likewise.
8285 (grub_arch_modules_addr): New function.
8286 * util/misc.c: Include unistd.h.
8287 (grub_util_get_fp_size): New function.
8288 (grub_util_read_at): Likewise.
8289 (grub_util_write_image_at): Likewise.
8290 (grub_util_read_image): Call grub_util_read_at.
8291 (grub_util_write_image): Call grub_util_write_image_at.
8292 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
8293 additional memory in kernel_img for a struct grub_module_info.
8294 Fill in that grub_module_info.
8295 * util/powerpc/ieee1275/grub-mkimage.c: New file.
8296
458786f8 82972005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8298
8299 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
8300 New function.
8301 * include/grub/powerpc/ieee1275/ieee1275.h
8302 (grub_ieee1275_milliseconds): New prototype.
8303 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
8304 Change to 1000.
8305 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
8306 grub_ieee1275_milliseconds.
8307
ac507d1b 83082005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8309
8310 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
8311 variable.
8312 (find_options): New function.
8313 (cmain): Call find_options.
8314 * include/grub/powerpc/ieee1275/ieee1275.h
8315 (grub_ieee1275_realmode): New extern variable.
8316 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
8317 grub_map if grub_ieee1275_realmode is false.
8318
6b8fd1c4 83192004-12-29 Marco Gerards <metgerards@student.han.nl>
8320
8321 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
8322 lines are inserted and make it work like readline. Reported by
8323 Vincent Pelletier <subdino2004@yahoo.fr>.
8324
8514a1e0 83252004-12-28 Marco Gerards <metgerards@student.han.nl>
8326
8327 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
8328
8329 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
8330 `kern/powerpc/cache.S'.
8331
924b6140 83322004-12-27 Marco Gerards <metgerards@student.han.nl>
8333
8334 * genmk.rb: Handle the `Program' class in the main loop. Written
8335 by Johan Rydberg <jrydberg@gnu.org>.
8336 (Program): New class.
8337 (programs): New variable.
8338 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
8339 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
8340 instead of "grub/kernel.h". Include <grub/machine/init.h>.
8341 (help_arch): Function removed.
8342 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
8343 `powerpc/libgcc.h' and `loader.h'.
8344 (pkgdata_PROGRAMS): New variable.
8345 (sbin_UTILITIES): Variable removed.
8346 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
8347 (grubof_SOURCES): Variable re-defined so it only includes the
8348 core functionality.
8349 (grubof_CFLAGS): Remove `-DGRUBOF'.
8350 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
8351 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
8352 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
8353 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
8354 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
8355 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
8356 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
8357 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
8358 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
8359 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
8360 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8361 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
8362 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
8363 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
8364 (pc_mod_CFLAGS): New variables.
8365 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
8366 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
8367 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
8368 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
8369 Moved from here...
8370 * include/grub/i386/pc/init.h (grub_os_area_addr)
8371 (rub_os_area_size): ... to here.
8372 * include/grub/powerpc/ieee1275/ieee1275.h
8373 (grub_ieee1275_entry_fn): Export symbol.
8374 * include/grub/powerpc/ieee1275/init.h: New file.
8375 * include/grub/powerpc/libgcc.h: Likewise.
8376 * include/grub/cache.h: Likewise.
8377 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
8378 <hollis@penguinppc.org>.
8379 * kern/dl.c: Include <grub/cache.h>.
8380 (grub_dl_flush_cache): New function.
8381 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
8382 for this module.
8383 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
8384 (grub_console_init): Removed prototypes.
8385 (grub_machine_init): Don't initialize the modules anymore.
8386 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
8387 static.
8388 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
8389 Macro undef removed.
8390 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
8391 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
8392 relocation `R_PPC_REL32'. Return an error when the relocation is
8393 unknown.
8394 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
8395 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
8396 * util/misc.c (grub_arch_sync_caches): Likewise.
8397
e4b47e0c 83982004-12-19 Marco Gerards <metgerards@student.han.nl>
8399
8400 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
8401 `symlist.c', add `grubof_symlist.c'.
8402 (symlist.c): Variable removed.
8403 (grubof_HEADERS): Variable added.
8404 (grubof_symlist.c): New target.
8405 (kernel_syms.lst): Use `grubof_HEADERS' instead of
8406 `kernel_img_HEADERS'.
8407 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
8408 * kern/powerpc/dl.c: New file.
8409 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
8410 Function removed.
8411 (grub_arch_dl_relocate_symbols): Likewise.
8412 (grub_register_exported_symbols): Likewise.
8413
4ceb3636 84142004-12-13 Marco Gerards <metgerards@student.han.nl>
8415
8416 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
8417 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
8418 to fail instead. Reported by Vincent Pelletier
8419 <subdino2004@yahoo.fr>.
8420
8421 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
8422 it is not allocated. Reported by Vincent Pelletier
8423 <subdino2004@yahoo.fr>.
8424
8425 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
8426 output so the output looks better.
8427
3f1578fe 84282004-12-04 Marco Gerards <metgerards@student.han.nl>
8429
8430 Modulize the partition map support and add support for the amiga
8431 partition map.
8432
8433 * commands/ls.c: Include <grub/partition.h> instead of
8434 <grub/machine/partition.h>.
8435 * kern/disk.c: Likewise.
8436 * kern/rescue.c: Likewise.
8437 * loader/i386/pc/chainloader.c: Likewise.
8438 * normal/cmdline.c: Likewise.
8439 * kern/powerpc/ieee1275/init.c: Likewise.
8440 (grub_machine_init): Call `grub_pc_partition_map_init',
8441 `grub_amiga_partition_map_init' and
8442 `grub_apple_partition_map_init'.
8443 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
8444 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
8445 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
8446 `partition.h' and `pc_partition.h'.
8447 (grub_setup_SOURCES): Remove
8448 `disk/i386/pc/partition.c'. Add `kern/partition.c',
8449 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8450 (grub_emu_SOURCES): Likewise.
8451 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
8452 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
8453 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
8454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8455 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
8456 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8457 (grubof_SOURCES): Likewise.
8458 * disk/i386/pc/partition.c: File removed.
8459 * disk/powerpc/ieee1275/partition.c: Likewise.
8460 * include/grub/powerpc/ieee1275/partition.h: Likewise.
8461 * include/grub/i386/pc/partition.h: Likewise.
8462 * kern/partition.c: New file.
8463 * partmap/amiga.c: Likewise.
8464 * partmap/apple.c: Likewise.
8465 * partmap/pc.c: Likewise.
8466 * include/grub/partition.h: Likewise..
8467 * include/grub/pc_partition.h: Likewise.
8468 * util/grub-emu.c: Include <grub/partition.h> instead of
8469 <grub/machine/partition.h>.
8470 (main): Call `grub_pc_partition_map_init',
8471 `grub_amiga_partition_map_init' and
8472 `grub_apple_partition_map_init' and deinitialize afterwards.
8473 * util/i386/pc/biosdisk.c: Include `#include
8474 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8475 `<grub/machine/partition.h>'.
8476 * util/i386/pc/grub-setup.c: Likewise.
8477 * util/i386/pc/biosdisk.c: Likewise.
8478 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
8479 partition information in case of a PC partition.
8480 * util/i386/pc/grub-setup.c: Include `#include
8481 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8482 `<grub/machine/partition.h>'.
8483 (setup): Only access the PC specific partition information in case
8484 of a PC partition.
8485
0ef4ced9 84862004-11-17 Hollis Blanchard <hollis@penguinppc.org>
8487
8488 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
8489 (grub_longjmp): Likewise.
8490 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
8491 20.
8492 * normal/powerpc/setjmp.S: New file.
8493 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8494 `normal/powerpc/setjmp.S'.
8495 (grubof_CFLAGS): Add `-DGRUBOF'.
8496 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
8497 [GRUB_UTIL && !GRUBOF].
8498
19950e29 84992004-11-16 Marco Gerards <metgerards@student.han.nl>
8500
8501 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
8502 property named `name'. Correctly handle the error returned by
8503 `grub_ieee1275_finddevice' if a device can not be opened.
8504
a2fea427 85052004-11-02 Hollis Blanchard <hollis@penguinppc.org>
8506
8507 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
8508 `actual' for negativity.
8509 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8510 kern/fshelp.c.
8511
41ea0ea3 85122004-11-01 Marco Gerards <metgerards@student.han.nl>
8513
8514 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
8515 (PAGE_OFFSET): New macro.
8516 (CRTC_ADDR_PORT): Likewise.
8517 (CRTC_DATA_PORT): Likewise.
8518 (START_ADDR_HIGH_REGISTER): Likewise.
8519 (START_ADDR_LOW_REGISTER): Likewise.
8520 (GRAPHICS_ADDR_PORT): Likewise.
8521 (GRAPHICS_DATA_PORT): Likewise.
8522 (READ_MAP_REGISTER): Likewise.
8523 (INPUT_STATUS1_REGISTER): Likewise.
8524 (INPUT_STATUS1_VERTR_BIT): Likewise.
8525 (page): New variable.
8526 (wait_vretrace): New function.
8527 (set_read_map): Likewise.
8528 (set_start_address): Likewise.
8529 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
8530 the right page.
8531 (check_vga_mem): Take the page into account.
8532 (write_char): Likewise.
8533 (write_cursor): Likewise.
8534 (scroll_up): Likewise. Copy the page to the page that is not
8535 shown and switch between both pages.
8536 (grub_vga_putchar): Fix off by one error.
8537 (grub_vga_cls): Wait for the vertical retrace. Take the page into
8538 account.
8539
ad0bd20b 85402004-11-01 Marco Gerards <metgerards@student.han.nl>
8541
8542 Add support for iso9660 (including rockridge).
8543
8544 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8545 (iso9660_mod_SOURCES): New variable.
8546 (iso9660_mod_CFLAGS): Likewise.
8547 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8548 * include/grub/fs.h (grub_iso9660_init): New prototype.
8549 * util/grub-emu.c (main): Call `grub_iso9660_init'.
8550 * fs/iso9660.c: New file.
8551
8552 * include/grub/misc.h (grub_strncat): New prototype.
8553 * kern/misc.c (grub_strncat): New function.
8554
8555 * fs/hfs.c (grub_hfs_mount): Translate the error
8556 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
8557 * fs/jfs.c (grub_jfs_mount): Likewise.
8558 * fs/ufs.c (grub_ufs_mount): Likewise.
8559
a5477a59 85602004-10-28 Hollis Blanchard <hollis@penguinppc.org>
8561
8562 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
8563 which initialized BAT registers.
8564 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
8565 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8566 Move from here...
8567 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
8568 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8569 ... to here.
8570 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
8571 (grub_mapclaim): Likewise.
8572 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
8573 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
8574 hand.
8575
9304c1f8 85762004-10-19 Hollis Blanchard <hollis@penguinppc.org>
8577
8578 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
8579 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
8580 -ffreestanding and -msoft-float.
8581
86f4ae25 85822004-10-15 Hollis Blanchard <hollis@penguinppc.org>
8583
8584 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
8585 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
8586 set in grub_ieee1275_flags.
8587
38912228 85882004-10-14 Hollis Blanchard <hollis@penguinppc.org>
8589
8590 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
8591 prototype.
8592 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
8593 grub_console_init first.
8594 Change the memory range used for grub_ieee1275_claim and
8595 grub_mm_init_region.
8596 Print an error message if the claim fails.
8597 Include <grub/misc.h>.
8598
d1923dc8 85992004-10-13 Hollis Blanchard <hollis@penguinppc.org>
8600
8601 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
8602 Call grub_children_iterate for device nodes of type `scsi',
8603 `ide', or `ata'.
8604 (grub_ofdisk_open): Remove manual device alias resolution.
8605 Fix memory leak when device cannot be opened.
8606 * include/grub/powerpc/ieee1275/ieee1275.h
8607 (grub_children_iterate): New prototype.
8608 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
8609 New function.
8610 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8611 Return -1 if args.size was -1.
8612
4512e4f3 86132004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8614
8615 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
8616 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
8617 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
8618 Open Firmware's memory for it; claim memory from _start to _end.
8619 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
8620 (_end): New extern.
8621 (_start): Zero BSS from __bss_start to _end.
8622 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8623 New extern.
8624 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
8625
4d61feb0 86262004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8627
ad0bd20b 8628 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
8629 -1 if args.base was -1.
4d61feb0 8630
026fa2f9 86312004-10-08 Hollis Blanchard <hollis@penguinppc.org>
8632
8633 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
8634 escape sequence instead of a literal ^L. Also call
8635 grub_ofconsole_gotoxy.
8636
9f2220ef 86372004-10-03 Hollis Blanchard <hollis@penguinppc.org>
8638
8639 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
8640 void * arguments to grub_addr_t. All callers updated. Also make
8641 the `result' argument optional.
8642 (grub_ieee1275_release): change void * arguments to grub_addr_t.
8643 All callers updated.
8644
8a572cd7 86452004-09-22 Hollis Blanchard <hollis@penguinppc.org>
8646
8647 * commands/ls.c (grub_ls_list_files): Use the string following the
8648 initial ')', if present, as the filesystem path.
8649 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
8650
8651 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
8652
18aa81f2 86532004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
8654
8655 Make the source code of the menu interface more readable.
8656
8657 * normal/menu.c: Include grub/mm.h.
8658 (TERM_WIDTH): New macro.
8659 (TERM_HEIGHT): Likewise.
8660 (TERM_INFO_HEIGHT): Likewise.
8661 (TERM_MARGIN): Likewise.
8662 (TERM_SCROLL_WIDTH): Likewise.
8663 (TERM_TOP_BORDER_Y): Likewise.
8664 (TERM_LEFT_BORDER_X): Likewise.
8665 (TERM_BORDER_WIDTH): Likewise.
8666 (TERM_MESSAGE_HEIGHT): Likewise.
8667 (TERM_BORDER_HEIGHT): Likewise.
8668 (TERM_NUM_ENTRIES): Likewise.
8669 (TERM_FIRST_ENTRY_Y): Likewise.
8670 (TERM_ENTRY_WIDTH): Likewise.
8671 (TERM_CURSOR_X): Likewise.
8672 (draw_border): Use macros instead of magic numbers.
8673 (print_entry): Likewise.
8674 (print_entries): Likewise.
8675 (run_menu): Likewise. Also, handle the key 'e'.
8676 (run_menu_entry): Ignore empty command lines.
8677 (print_message): Added a new argument EDIT. If EDIT is true,
8678 print a different message.
8679 (init_page): Likewise.
8680 (edit_menu_entry): New function. Not implemented yet.
8681
b47efe30 86822004-09-17 Marco Gerards <metgerards@student.han.nl>
8683
8684 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
8685 can be loaded from normal mode.
8686
8687 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
8688 `multiboot.mod'.
8689 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
8690 (multiboot_mod_CFLAGS): New variables.
8691 * loader/i386/pc/linux_normal.c: New file.
8692 * loader/i386/pc/multiboot_normal.c: Likewise.
8693
8694 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
8695 attribute `unused'.
8696
8697 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
8698 `fdiro' to read the mode information from instead of `diro'.
8699
8700 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
8701 looking up a symlink.
8702
8703 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
8704 macro.
8705 * normal/command.c (grub_command_execute): Don't parse the
8706 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
8707 flags of the command.
8708
8709 * normal/menu.c (grub_menu_run): Fix typo.
8710
da75ac71 87112004-09-14 Hollis Blanchard <hollis@penguinppc.org>
8712
8713 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
8714
8715 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
8716 `y + 1' instead of `y - 1'.
8717
8718 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
8719
062b24c2 87202004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
8721
8722 From Hollis Blanchard <hollis@penguinppc.org>:
8723 * kern/misc.c (memmove): New alias for grub_memmove.
8724 (memcmp): New alias for grub_memcmp.
8725 (memset): New alias for grub_memset.
8726 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8727 Change "int handle" to "grub_ieee1275_phandle_t handle".
8728 * include/grub/powerpc/ieee1275/ieee1275.h
8729 (grub_ieee1275_get_property): Likewise.
8730
8ddad845 87312004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
8732
8733 Added normal mode command `chainloader' as module chain.mod, which
8734 depends on normal.mod and _chain.mod.
8735
8736 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
8737 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
8738 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
8739 Deleted prototype.
8740 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
8741 but arguments parsing moved to ...
8742 (grub_chainloader_cmd): ... here. New function.
8743 * include/grub/i386/pc/chainloader.h: New file.
8744 * loader/i386/pc/chainloader_normal.c: Likewise.
8745
2c1f4ce3 87462004-09-11 Marco Gerards <metgerards@student.han.nl>
8747
8748 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
8749 (grub_mkimage_LDFLAGS): Likewise.
8750 (grub_emu_SOURCES): Likewise.
8751 (kernel_img_HEADERS): Added fshelp.h.
8752 * fs/ext2.c: Include <grub/fshelp.h>.
8753 (FILETYPE_REG): New macro.
8754 (FILETYPE_INO_REG): Likewise.
8755 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
8756 Changed all users.
8757 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
8758 all users.
8759 (grub_fshelp_node): New struct.
8760 (grub_ext2_data): Added member `diropen'. Changed member `inode'
8761 to a pointer.
8762 (grub_ext2_get_file_block): Removed function.
8763 (grub_ext2_read_block): New function.
8764 (grub_ext2_read_file): Replaced parameter `data' by `node'.
8765 This function was written.
8766 (grub_ext2_mount): Read the root inode. Create a diropen struct.
8767 (grub_ext2_find_file): Removed function.
8768 (grub_ext2_read_symlink): New function.
8769 (grub_ext2_iterate_dir): Likewise.
8770 (grub_ext2_open): Rewritten.
8771 (grub_ext2_dir): Rewritten.
8772 * include/grub/fshelp.h: New file.
8773 * fs/fshelp.c: Likewise.
8774
3c52136a 87752004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
8776
8777 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
8778 (print_message): Add a missing newline.
8779 (run_menu): Added timeout support.
8780 (run_menu_entry): New local function.
8781 (grub_menu_run): Added support for booting.
8782
8783 * kern/loader.c (grub_loader_is_loaded): New function.
8784
8785 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
8786 (grub_get_rtc): Exported.
8787
8788 * include/grub/i386/pc/time.h: Include grub/symbol.h.
8789 (grub_get_rtc): Exported.
8790
8791 * include/grub/normal.h (struct grub_command_list): Remove
8792 constant from the member `command'.
8793
8794 * include/grub/loader.h (grub_loader_is_loaded): Declared.
8795
8796 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
8797
8798 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
8799
aa033560 88002004-08-28 Marco Gerards <metgerards@student.han.nl>
8801
8802 Add support for the JFS filesystem.
8803
8804 * fs/jfs.c: New file.
8805 * include/grub/fs.h (grub_jfs_init): New prototype.
8806 (grub_jfs_fini): New prototype.
8807 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
8808 (grub_emu_SOURCES): Likewise.
8809 (pkgdata_MODULES): Add jfs.mod.
8810 (jfs_mod_SOURCES): New variable.
8811 (jfs_mod_CFLAGS): Likewise.
8812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
8813 (grubof_SOURCES): Likewise.
8814 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
8815
8816 * fs/fat.c (grub_fat_find_dir): Convert the filename little
8817 endian to the host endian.
8818 (grub_fat_utf16_to_utf8): Move function from there...
8819 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
8820 the endianess of the source string anymore.
8821 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
8822
94bc45af 88232004-08-24 Marco Gerards <metgerards@student.han.nl>
8824
8825 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
8826 (grub_boot_fini) [GRUB_UTIL]: Likewise.
8827 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
8828 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
8829
8830 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
8831 (grub_hfs_iterate_dir): Make the function static. Add prototypes
8832 for `node_found' and `it_dir'.
8833 (grub_hfs_dir): Add prototype for `dir_hook'.
8834
8835 * fs/minix.c (grub_minix_get_file_block): Add prototype for
8836 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
8837 and `indir32' to silence a gcc warning.
8838
8839 * include/grub/fs.h (grub_hfs_init): New prototype.
8840 (grub_hfs_fini): Likewise.
8841
8842
97543f08 88432004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8844
8845 Each disk device has its own id now. This is useful to make use
8846 of multiple disk devices.
8847
8848 * include/grub/disk.h (grub_disk_dev_id): New enum.
8849 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
8850 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
8851
8852 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
8853 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8854
8855 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
8856 GRUB_DISK_DEVICE_OFDISK_ID as an id.
8857
8858 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
8859 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8860
8861 * include/grub/disk.h (struct grub_disk_dev): Added a new member
8862 "id" which is used by the cache manager.
8863
8864 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
8865 of just "GRUB".
8866
64372eb4 88672004-08-18 Marco Gerards <metgerards@student.han.nl>
8868
8869 * fs/hfs.c: New file.
8870 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
8871 (grub_emu_SOURCES): Likewise.
8872 (pkgdata_MODULES): Add hfs.mod.
8873 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
8874 (grubof_SOURCES): Likewise.
8875 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
8876
8877 * include/grub/misc.h (grub_strncasecmp): Add prototype.
8878 * kern/misc.c (grub_strncasecmp): Add function.
8879
cc61b58f 88802004-08-14 Marco Gerards <metgerards@student.han.nl>
8881
8882 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
8883 with parentheses.
8884
8885 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
8886 (grub_ext2_dir): In case the directory entry type is unknown, read
8887 it from the inode.
8888
0ef123f6 88892004-08-02 Peter Bruin <pjbruin@dds.nl>
8890
8891 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
8892 grub_load_linux instead of grub_rescue_cmd_linux as second
8893 argument of grub_rescue_register_command.
8894
8895 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
8896
a447c5df 88972004-07-27 Marco Gerards <metgerards@student.han.nl>
8898
8899 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
8900 function.
8901 * commands/boot.c: Remove the check for `GRUB_UTIL'.
8902 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8903 `loader/powerpc/ieee1275/linux.c',
8904 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
8905 * include/grub/powerpc/ieee1275/ieee1275.h
8906 (grub_ieee1275_release): New prototype.
8907 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
8908 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
8909 normal, boot, linux and linux_normal.
8910 * loader/powerpc/ieee1275/linux.c: New file.
8911 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8912
5a9e3546 89132004-07-12 Marco Gerards <metgerards@student.han.nl>
8914
8915 * normal/arg.c (grub_arg_parse): Correct error handling after
8916 reallocating the argumentlist (check if `argl' is not null instead
8917 of checking if `args' is not null).
8918 * kern/mm.c (grub_realloc): Return the same pointer when using the
8919 same region, instead of returning the header address.
8920
e15199cb 89212004-07-11 Marco Gerards <metgerards@student.han.nl>
8922
8923 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
8924 one block instead of two when looking for the initial partition.
8925 (grub_partition_probe): Initialize the local variable `p' with 0.
8926 Use base 10 for the grub_strtoul call.
8927 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
8928 need for one local variable.
8929 (grub_strtoul): Don't add the new value to `num', instead of that
8930 just assign it.
8931
020616c2 89322004-07-11 Marco Gerards <metgerards@student.han.nl>
8933
8934 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
8935 (pxeboot_img_SOURCES): New variable.
8936 (pxeboot_img_ASFLAGS): Likewise.
8937 (pxeboot_img_LDFLAGS): Likewise.
8938 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
8939 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
8940 <lode_leroy@hotmail.com>.
8941
6c51eb64 89422004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8943
8944 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
8945 there was no input.
8946
cfb12aff 89472004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8948
8949 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
8950 the history buffer logic.
8951
6eabba74 89522004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8953
8954 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
8955 (FILETYPE_INO_SYMLINK): New macros.
8956 (grub_ext2_find_file): Check if the node is a directory using the
8957 inode stat information instead of using the filetype in the
8958 dirent. Exclude the first character of an absolute symlink.
8959 (grub_ext2_dir): Mask out the filetype part of the mode member of
8960 the inode.
8961
66e19ef8 89622004-05-24 Marco Gerards <metgerards@student.han.nl>
8963
8964 Add support for UFS version 1 and 2. Add support for the minix
8965 filesystem version 1 and 2, both the variants with 14 and 30 long
8966 filenames.
8967
8968 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
8969 fs/minix.c.
8970 (grub_emu_SOURCES): Likewise.
8971 (pkgdata_MODULES): Add ufs.mod and minix.mod.
8972 (ufs_mod_SOURCES): New variable.
8973 (ufs_mod_CFLAGS): Likewise.
8974 (minix_mod_SOURCES): Likewise.
8975 (minix_mod_CFLAGS): Likewise.
8976 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
8977 fs/minix.c.
8978 (grubof_SOURCES): Likewise.
8979 * fs/ufs.c: New file.
8980 * fs/minix.c: New file.
8981 * include/grub/fs.h (grub_ufs_init): New prototype.
8982 (grub_ufs_fini): Likewise.
8983 (grub_minix_init): Likewise.
8984 (grub_minix_fini): Likewise.
8985 * util/grub-emu.c (main): Initialize and deinitialize UFS and
8986 minix fs.
8987
cc2e748a 89882004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
8989
8990 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
8991 commands/ls.c, commands/terminal.c, commands/boot.c,
8992 commands/cmp.c and commands/cat.c.
8993 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
8994
8995 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
8996 "env.h"
8997
4b13b216 89982004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
8999
9000 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
9001 and grub_, respectively. Because the conversion is trivial and
9002 mechanical, I omit the details here. Please refer to the CVS
9003 if you need more information.
9004
6a142551 90052004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9006
9007 * include/pupa: Renamed to ...
9008 * include/grub: ... this.
9009 * util/i386/pc/pupa-mkimage.c: Renamed to ...
9010 * util/i386/pc/grub-mkimage.c: ... this.
9011 * util/i386/pc/pupa-setup.c: Renamed to ...
9012 * util/i386/pc/grub-setup.c: ... this.
9013 * util/pupa-emu.c: Renamed to ...
9014 * util/grub-emu.c: ... this.
9015
e56cdf21 90162004-03-29 Marco Gerards <metgerards@student.han.nl>
9017
9018 Add support for the newworld apple macintosh (PPC). This has been
9019 tested on the powerbook 2000 only. It only adds support for
9020 generic ieee1275 functions, console and disk support. This should
9021 be easy to port to other architectures with support for Open
9022 Firmware.
9023
9024 * configure.ac: Accept the powerpc as host_cpu. In the case of
9025 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
9026 specific tests are only executed while building for the i386.
9027 Inverse test for crosscompile.
9028 * genmk.rb (Utility): Allow assembler files.
9029 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
9030 * conf/powerpc-ieee1275.rmk: New file.
9031 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
9032 * disk/powerpc/ieee1275/partition.c: Likewise.
9033 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
9034 * include/pupa/powerpc/ieee1275/console.h: Likewise.
9035 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
9036 * include/pupa/powerpc/ieee1275/time.h: Likewise.
9037 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
9038 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
9039 * include/pupa/powerpc/ieee1275/loader.h
9040 * include/pupa/powerpc/setjmp.h: Likewise.
9041 * include/pupa/powerpc/types.h: Likewise.
9042 * kern/powerpc/ieee1275/init.c: Likewise.
9043 * kern/powerpc/ieee1275/openfw.c: Likewise.
9044 * term/powerpc/ieee1275/ofconsole.c: Likewise.
9045
9046 These files were written by Johan Rydberg
9047 (jrydberg@night.trouble.net) and I only modified them slightly.
9048
9049 * boot/powerpc/ieee1275/cmain.c: New file.
9050 * boot/powerpc/ieee1275/crt0.S: Likewise.
9051 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9052 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9053
8c8cc205 90542004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
9055
9056 * Makefile.in: Update copyright.
9057 * genmodsrc.sh: Likewise.
9058 * gensymlist.sh: Likewise.
9059 * term/i386/pc/vga.c: Indent correctly.
9060
9061 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9062 bugreporting address.
9063 * util/i386/pc/pupa-setup.c (usage): Likewise,
9064 (main): Call pupa_ext2_init and pupa_ext2_fini.
9065
9066 * fs/fat.c (log2): Renamed to ...
9067 (fat_log2): ... this.
9068 All callers changed.
9069 * kern/misc.c (memcpy): Alias to pupa_memmove.
9070 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9071 lvalue cast.
9072 * util/console.c (pupa_ncurses_fini): Return 0.
9073
9074 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9075 Move fail label here.
9076 [__GNU__]: Don't warn when using stat.
9077 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9078 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9079 long int. Use strtol instead of strtoul.
9080
db1771cf 90812004-03-14 Marco Gerards <metgerards@student.han.nl>
9082
9083 * commands/boot.c: New file.
9084 * commands/cat.c: Likewise.
9085 * commands/cmp.c: Likewise.
9086 * commands/ls.c: Likewise.
9087 * commands/terminal.c: Likewise.
9088 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9089 (pupa_register_command): Changed interface to match the new
9090 argument parser.
9091 (pupa_command_execute): Changed (almost rewritten) so it uses
9092 pupa_split_command. Added support for setting variables using the
9093 syntax `foo=bar'.
9094 (rescue_command): Changed to work with the new argument parser.
9095 (terminal_command): Moved from here to commands/terminal.c.
9096 (set_command): New function.
9097 (unset_command): New function.
9098 (insmod_command): New function.
9099 (rmmod_command): New function.
9100 (lsmod_command): New function.
9101 (pupa_command_init): Don't initialize the command terminal
9102 anymore. Initialize the commands set, unset, insmod, rmmod and
9103 lsmod.
9104 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9105 (kernel_img_HEADERS): Add arg.h and env.h.
9106 (pupa_mkimage_LDFLAGS): Add kern/env.c.
9107 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9108 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9109 normal/arg.c.
9110 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9111 terminal.mod.
9112 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9113 (boot_mod_SOURCES): New variable.
9114 (terminal_mod_SOURCES): Likewise.
9115 (ls_mod_SOURCES): Likewise.
9116 (cmp_mod_SOURCES): Likewise.
9117 (cat_mod_SOURCES): Likewise.
9118
9119 * normal/arg.c: New file.
9120 * kern/env.c: Likewise.
9121 * include/pupa/arg.h: Likewise.
9122 * include/pupa/env.h: Likewise.
9123 * font/manager.c (font_command): Changed to match argument parsing
9124 interface changes.
9125 (PUPA_MOD_INIT): Likewise.
9126 * hello/hello.c (pupa_cmd_hello): Likewise.
9127 (PUPA_MOD_INIT): Likewise.
9128 * include/pupa/disk.h: Include <pupa/device.h>.
9129 (pupa_print_partinfo): New prototype.
9130 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9131 (pupa_dl_get_prefix): Likewise.
9132 * include/pupa/misc.h: Include <pupa/err.h>.
9133 (pupa_isgraph): New prototype.
9134 (pupa_isdigit): Likewise.
9135 (pupa_split_cmdline): Likewise.
9136 * include/pupa/normal.h: Include <pupa/arg.h>.
9137 (pupa_command): Changed the prototype of the member `func' to
9138 match the argument parsing interface. Added member `options'.
9139 (pupa_register_command): Updated to match function.
9140 (pupa_arg_parse): New prototype.
9141 (pupa_hello_init) [PUPA_UTIL]: New prototype.
9142 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9143 (pupa_ls_init) [PUPA_UTIL]: Likewise.
9144 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9145 (pupa_cat_init) [PUPA_UTIL]: Likewise.
9146 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9147 (pupa_boot_init) [PUPA_UTIL]: Likewise.
9148 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9149 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9150 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9151 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9152 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9153 * kern/disk.c: Include <pupa/file.h>.
9154 (pupa_print_partinfo): New function.
9155 * kern/dl.c: Include <pupa/env.h>.
9156 (pupa_dl_dir): Variable removed.
9157 (pupa_dl_load): Use the environment variable `prefix' instead of
9158 the variable pupa_dl_dir.
9159 (pupa_dl_set_prefix): Function removed.
9160 (pupa_dl_get_prefix): Likewise.
9161 * kern/i386/pc/init.c: Include <pupa/env.h>.
9162 (pupa_machine_init): Use the environment variable `prefix' instead of
9163 using pupa_dl_set_prefix to set the prefix.
9164 * kern/main.c: Include <pupa/env.h>.
9165 (pupa_set_root_dev): Use the environment variable `prefix' instead of
9166 using pupa_dl_get_prefix to get the prefix.
9167 * kern/misc.c: Include <pupa/env.h>.
9168 (pupa_isdigit): New function.
9169 (pupa_isgraph): Likewise.
9170 (pupa_ftoa): Likewise.
9171 (pupa_vsprintf): Added support for printing values of the type
9172 `double'. Make it possible to format variable output when using
9173 formatting like `%1.2%f'.
9174 (pupa_split_cmdline): New function.
9175 * kern/rescue.c: Include <pupa/env.h>.
9176 (next_word): Removed function.
9177 (pupa_rescue_cmd_prefix): Likewise.
9178 (pupa_rescue_cmd_set): New function.
9179 (pupa_rescue_cmd_unset): New function.
9180 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
9181 split the command line instead of splitting it here. Added
9182 support for setting variables using the syntax `foo=bar'. Don't
9183 initialize the prefix command anymore. Initialized the set and
9184 unset commands.
9185 * normal/cmdline.c: Include <pupa/env.h>.
9186 (pupa_tab_complete): Added prototypes for print_simple_completion,
9187 print_partition_completion, add_completion, iterate_commands,
9188 iterate_dev, iterate_part and iterate_dir. Moved code to print
9189 partition information from here to kern/disk.c.
9190 (pupa_cmdline_run): Don't check if the funtion exists anymore.
9191 * normal/main.c: Include <pupa/env.h>.
9192 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
9193 instead of using pupa_dl_get_prefix to get the prefix.
9194 * term/i386/pc/vga.c: Include <pupa/arg.h>.
9195 (check_vga_mem): Cast pointers to `void *' to silence a gcc
9196 warning.
9197 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
9198 (pupa_vga_setcolor): Declare unused variables with `__attribute__
9199 ((unused))' to silence a gcc warning.
9200 (pupa_vga_setcolor): Likewise.
9201 (debug_command): Changed to match argument parsing
9202 interface changes.
9203 * util/pupa-emu.c: Include <pupa/env.h>.
9204 (options): Added 0's for unused fields to silence a gcc warning.
9205 (argp): Likewise.
9206 (main): Use the environment variable `prefix' instead of using
9207 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
9208 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
9209 and terminal.
9210
9211 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
9212 * util/misc.c: Include <malloc.h>.
9213 (pupa_malloc): Rewritten so errors are correctly reported.
9214 (pupa_realloc): Likewise.
9215 (pupa_memalign): Likewise.
9216 (pupa_mm_init_region): Declare unused variables with
9217 `__attribute__ ((unused))' to silence a gcc warning.
9218 * normal/i386/setjmp.S: Remove tab at the end of the file to
9219 silence a gcc warning.
9220 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
9221 variables with `__attribute__ ((unused))' to silence a gcc
9222 warning.
9223 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
9224 local variable i unsigned to silence a gcc warning.
9225
9226 * kern/term.c: Include <pupa/misc.h>.
9227 (pupa_more_lines): New variable.
9228 (pupa_more): Likewise.
9229 (pupa_putcode): When the pager is active pause at the end of every
9230 screen.
9231 (pupa_set_more): New function.
9232 * include/pupa/term.h (pupa_set_more): New prototype.
9233
9234
3b1139cb 92352004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
9236
9237 Now this project is GRUB 2 rather than PUPA. The location of
9238 the CVS repository was moved to GRUB's.
9239
9240 * configure.ac: Use bug-grub as the reporting address.
9241 Use GRUB instead of PUPA.
9242 Change the version number to 1.90.
9243
8367695c 92442004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
9245
9246 * genkernsyms.sh: Updated copyright information.
9247 * genmk.rb: Likewise.
9248 * genmodsrc.sh: Likewise.
9249 * gensymlist.sh: Likewise.
9250 * boot/i386/pc/boot.S: Likewise.
9251 * boot/i386/pc/diskboot.S: Likewise.
9252 * disk/i386/pc/biosdisk.c: Likewise.
9253 * disk/i386/pc/partition.c: Likewise.
9254 * font/manager.c: Likewise.
9255 * fs/ext2.c: Likewise.
9256 * fs/fat.c: Likewise.
9257 * include/pupa/boot.h: Likewise.
9258 * include/pupa/device.h: Likewise.
9259 * include/pupa/disk.h: Likewise.
9260 * include/pupa/dl.h: Likewise.
9261 * include/pupa/elf.h: Likewise.
9262 * include/pupa/err.h: Likewise.
9263 * include/pupa/file.h: Likewise.
9264 * include/pupa/font.h: Likewise.
9265 * include/pupa/fs.h: Likewise.
9266 * include/pupa/kernel.h: Likewise.
9267 * include/pupa/loader.h: Likewise.
9268 * include/pupa/misc.h: Likewise.
9269 * include/pupa/mm.h: Likewise.
9270 * include/pupa/net.h: Likewise.
9271 * include/pupa/normal.h: Likewise.
9272 * include/pupa/rescue.h: Likewise.
9273 * include/pupa/setjmp.h: Likewise.
9274 * include/pupa/symbol.h: Likewise.
9275 * include/pupa/term.h: Likewise.
9276 * include/pupa/types.h: Likewise.
9277 * include/pupa/i386/setjmp.h: Likewise.
9278 * include/pupa/i386/types.h: Likewise.
9279 * include/pupa/i386/pc/biosdisk.h: Likewise.
9280 * include/pupa/i386/pc/boot.h: Likewise.
9281 * include/pupa/i386/pc/console.h: Likewise.
9282 * include/pupa/i386/pc/init.h: Likewise.
9283 * include/pupa/i386/pc/kernel.h: Likewise.
9284 * include/pupa/i386/pc/linux.h: Likewise.
9285 * include/pupa/i386/pc/loader.h: Likewise.
9286 * include/pupa/i386/pc/memory.h: Likewise.
9287 * include/pupa/i386/pc/multiboot.h: Likewise.
9288 * include/pupa/i386/pc/partition.h: Likewise.
9289 * include/pupa/i386/pc/time.h: Likewise.
9290 * include/pupa/i386/pc/vga.h: Likewise.
9291 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
9292 * include/pupa/util/getroot.h: Likewise.
9293 * include/pupa/util/misc.h: Likewise.
9294 * include/pupa/util/resolve.h: Likewise.
9295 * kern/device.c: Likewise.
9296 * kern/disk.c: Likewise.
9297 * kern/dl.c: Likewise.
9298 * kern/err.c: Likewise.
9299 * kern/file.c: Likewise.
9300 * kern/fs.c: Likewise.
9301 * kern/loader.c: Likewise.
9302 * kern/main.c: Likewise.
9303 * kern/misc.c: Likewise.
9304 * kern/mm.c: Likewise.
9305 * kern/rescue.c: Likewise.
9306 * kern/term.c: Likewise.
9307 * kern/i386/dl.c: Likewise.
9308 * kern/i386/pc/init.c: Likewise.
9309 * kern/i386/pc/lzo1x.S: Likewise.
9310 * kern/i386/pc/startup.S: Likewise.
9311 * loader/i386/pc/chainloader.c: Likewise.
9312 * loader/i386/pc/linux.c: Likewise.
9313 * loader/i386/pc/multiboot.c: Likewise.
9314 * normal/cmdline.c: Likewise.
9315 * normal/command.c: Likewise.
9316 * normal/main.c: Likewise.
9317 * normal/menu.c: Likewise.
9318 * normal/i386/setjmp.S: Likewise.
9319 * term/i386/pc/console.c: Likewise.
9320 * term/i386/pc/vga.c: Likewise.
9321 * util/console.c: Likewise.
9322 * util/genmoddep.c: Likewise.
9323 * util/misc.c: Likewise.
9324 * util/pupa-emu.c: Likewise.
9325 * util/resolve.c: Likewise.
9326 * util/unifont2pff.rb: Likewise.
9327 * util/i386/pc/biosdisk.c: Likewise.
9328 * util/i386/pc/getroot.c: Likewise.
9329 * util/i386/pc/pupa-mkimage.c: Likewise.
9330 * util/i386/pc/pupa-setup.c: Likewise.
9331
e6eced71 93322004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
9333
9334 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
9335 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
9336 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
9337 reading and reset it after reading.
9338 (pupa_ext2_close): Return PUPA_ERR_NONE.
9339
9340 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
9341 Correct value.
9342 (struct linux_kernel_header): Add kernel_version and
9343 initrd_addr_max.
9344 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
9345 pupa_file_read succeeds.
9346 (pupa_rescue_cmd_initrd): Implement.
9347
5aded270 93482003-12-03 Marco Gerards <metgerards@student.han.nl>
9349
9350 * fs/ext2.c (pupa_ext2_label): New function.
9351 (pupa_ext2_fs): Added label.
9352 * fs/fat.c (pupa_fat_label): New function.
9353 (pupa_fat_fs): Added label.
9354 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
9355
9356 * kern/misc.c (pupa_strndup): New function.
9357 * include/pupa/misc.h (pupa_strndup): New prototype.
9358
9359 * include/pupa/normal.h: Include <pupa/err.h>.
9360 (pupa_set_history): New prototype.
9361 (pupa_iterate_commands): New prototype.
9362 * normal/cmdline.c: Include <pupa/machine/partition.h>,
9363 <pupa/disk.h>, <pupa/file.h>.
9364 (hist_size): New variable.
9365 (hist_lines): Likewise.
9366 (hist_end): Likewise.
9367 (hist_used): Likewise.
9368 (pupa_set_history): New function.
9369 (pupa_history_get): Likewise.
9370 (pupa_history_add): Likewise.
9371 (pupa_history_replace): Likewise.
9372 (pupa_tab_complete): Likewise.
9373 (pupa_cmdline_run): Added tab completion and history buffer. Tab
9374 completion shows partitionnames while completing partitions, this
9375 feature was suggested by Jeff Bailey.
9376 * normal/command.c (pupa_iterate_commands): New function.
9377 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
9378 (pupa_normal_init): Initialize history buffer.
9379 (PUPA_MOD_INIT): Likewise.
9380 (pupa_normal_fini): Free the history buffer.
9381 (PUPA_MOD_FINI): Likewise.
9382
9383 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
9384 key.
9385
9386 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
9387 * configure.ac [i386]: Check for regparam bug.
9388 (NESTED_FUNC_ATTR) [! i386]: Defined.
9389
1f7315a3 93902003-11-17 Marco Gerards <metgerards@student.han.nl>
9391
9392 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
9393 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
9394 (pupa_emu_SOURCES): New variable.
9395 (pupa_emu_LDFLAGS): Likewise.
9396 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
9397 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
9398 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
9399 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9400 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
9401 (pupa_jmp_buf): New typedef.
9402 (pupa_setjmp) [PUPA_UTIL]: New macro.
9403 (pupa_longjmp) [PUPA_UTIL]: Likewise.
9404 * include/pupa/term.h (struct pupa_term): New member `refresh'.
9405 (pupa_refresh): New prototype.
9406 * include/pupa/util/getroot.h: New file.
9407 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
9408 it.
9409 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
9410 (pupa_rescue_cmd_cat): Likewise.
9411 (pupa_rescue_cmd_ls): Likewise.
9412 (pupa_rescue_cmd_testload): Likewise.
9413 (pupa_rescue_cmd_lsmod): Likewise.
9414 * normal/cmdline.c (pupa_cmdline_get): Likewise.
9415 * normal/menu.c (run_menu): Likewise.
9416 * kern/term.c (pupa_cls): Likewise.
9417 (pupa_refresh): New function.
9418 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
9419 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9420 * util/console.c: New file.
9421
9422 * util/i386/pc/getroot.c: New file.
9423 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
9424 (pupa_putchar): New function.
9425 (pupa_refresh): Likewise.
9426 (xgetcwd): Function moved to ...
9427 (strip_extra_slashes): Likewise.
9428 (get_prefix): Likewise.
9429 * util/i386/pc/getroot.c: ... here.
9430 (find_root_device): Function moved and renamed to...
9431 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
9432 Changed all callers.
9433 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
9434 and renamed to...
9435 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
9436 Changed all callers.
9437 * util/misc.c (pupa_memalign): New function.
9438 (pupa_mm_init_region): Likewise.
9439 (pupa_register_exported_symbols): Likewise.
9440 (pupa_putchar): Function removed.
9441 * util/pupa-emu.c: New file.
9442
9a5c1ade 94432003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
9444
9445 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
9446 (_multiboot_mod_SOURCES): New variable.
9447 (_multiboot_mod_CFLAGS): Likewise.
9448 * loader/i386/pc/multiboot.c: New file.
9449 * include/pupa/i386/pc/multiboot.h: Likewise.
9450 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
9451 (pupa_multiboot_real_boot): New function.
9452 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
9453 (pupa_multiboot_real_boot): New prototype.
9454 (pupa_rescue_cmd_multiboot): Likewise
9455 (pupa_rescue_cmd_module): Likewise.
9456
9457 * kern/loader.c (pupa_loader_set): Continue when
9458 pupa_loader_unload_func() fails.
9459 (pupa_loader_unset): New function.
9460 * include/pupa/loader.h (pupa_loader_unset): New prototype.
9461
9462 * kern/misc.c (pupa_stpcpy): New function.
9463 * include/pupa/misc.h (pupa_stpcpy): New prototype.
9464
8e72a9c0 94652003-11-12 Marco Gerards <metgerards@student.han.nl>
9466
9467 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
9468 for available extensions.
9469
9470 * include/pupa/i386/pc/time.h: New file.
9471 * kern/disk.c: Include <pupa/machine/time.h>.
9472 (PUPA_CACHE_TIMEOUT): New macro.
9473 (pupa_last_time): New variable.
9474 (pupa_disk_open): Flush the cache when there was a timeout.
9475 (pupa_disk_close): Reset the timer.
9476 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
9477 pupa_currticks.
9478 * util/misc.c: Include <sys/times.h>
9479 (pupa_get_rtc): New function.
9480
c4adbd32 94812003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9482
9483 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
9484 as blocks.
9485 (pupa_ext2_get_file_block): Use blocks member.
9486
9487 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
9488 first block. Return -1 instead of pupa_errno on error.
9489
bfd30f06 94902003-10-27 Marco Gerards <metgerards@student.han.nl>
9491
9492 * README: In the pupa-mkimage example use _chain instead of chain
9493 and ext2 instead of fat.
9494 * TODO: Replace ext2fs with jfs as an example. Add an item for
9495 adding journal playback for ext2fs.
9496 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
9497 (pkgdata_MODULES): Added ext2.mod.
9498 (ext2_mod_SOURCES): New variable.
9499 (ext2_mod_CFLAGS): Likewise.
9500 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
9501 * include/pupa/misc.h (pupa_strncpy): New prototype.
9502 (pupa_strcat): Likewise.
9503 (pupa_strncmp): Likewise.
9504 * kern/misc.c (pupa_strcat): Enable function.
9505 (pupa_strncpy): New function.
9506 (pupa_strncmp): Likewise.
9507 * fs/ext2.c: New file.
9508
9509 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
9510 when the read failed before retrying.
9511 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
9512 (_FILE_OFFSET_BITS): Likewise.
9513 * configure.ac: Added AC_SYS_LARGEFILE.
9514
98d15063 95152003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9516
9517 * genmk.rb (PModule#rule): Make sure to get only symbol names
9518 from the output of nm.
9519 Reported by Robert Millan <zeratul2@wanadoo.es>.
9520
18d9c7cd 95212003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9522
9523 I forgot to check in these changes for a long time. This adds
9524 incomplete support for VGA console, and this is still very
9525 buggy. Also, a lot of consideration is required for I18N,
9526 UNICODE, and VGA font issues. Therefore, assume that this is
9527 such that "better than nothing".
9528
9529 * font/manager.c: New file.
9530 * include/pupa/font.h: Likewise.
9531 * include/pupa/i386/pc/vga.h: Likewise.
9532 * term/i386/pc/vga.c: Likewise.
9533 * util/unifont2pff.rb: Likewise.
9534
9535 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
9536 (pkgdata_MODULES): Added vga.mod and font.mod.
9537 (vga_mod_SOURCES): New variables.
9538 (vga_mod_CFLAGS): Likewise.
9539 (font_mod_SOURCES): Likewise.
9540 (font_mod_CFLAGS): Likewise.
9541
9542 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
9543
9544 * include/pupa/term.h: Include pupa/err.h.
9545 (struct pupa_term): Added init and fini.
9546 Changed the argument of putchar to pupa_uint32_t.
9547
9548 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
9549 (pupa_console_real_putchar): New prototype.
9550 (pupa_console_putchar): Removed.
9551 (pupa_console_checkkey): Exported.
9552 (pupa_console_getkey): Likewise.
9553
9554 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
9555 characters.
9556
9557 * kern/term.c (pupa_term_set_current): Rewritten.
9558 (pupa_putchar): Likewise.
9559 (pupa_putcode): New function.
9560
9561 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
9562 (pupa_console_real_putchar): ... this.
9563 (pupa_vga_set_mode): New function.
9564 (pupa_vga_get_font): Likewise.
9565
9566 * normal/command.c: Include pupa/term.h.
9567 (terminal_command): New function.
9568 (pupa_command_init): Register the command "terminal".
9569
9570 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
9571 (DISP_UP): Likewise.
9572 (DISP_RIGHT): Likewise.
9573 (DISP_DOWN): Likewise.
9574 (DISP_HLINE): Likewise.
9575 (DISP_VLINE): Likewise.
9576 (DISP_UL): Likewise.
9577 (DISP_UR): Likewise.
9578 (DISP_LL): Likewise.
9579 (DISP_LR): Likewise.
9580
9581 * term/i386/pc/console.c (pupa_console_putchar): New function.
9582
977329f5 95832003-02-08 NIIBE Yutaka <gniibe@m17n.org>
9584
9585 * util/resolve.c (pupa_util_resolve_dependencies): BUG
9586 FIX. Reverse the path_list.
9587
9588 * include/pupa/normal.h: Export pupa_register_command and
9589 pupa_unregister_command.
9590
9591 * hello/hello.c (pupa_cmd_hello): New module.
9592 * conf/i386-pc.rmk: Added hello.mod.
9593
1f5ab428 95942003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
9595
9596 * kern/i386/pc/lzo1x.S: New file.
9597
9598 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
9599 (compress_kernel): New variable.
9600 (generate_image): Heavily modified to support compressing a
9601 large part of the core image.
9602
9603 * util/misc.c (pupa_util_read_image): Fix a file descriptor
9604 leak.
9605 (pupa_util_load_image): New function.
9606
9607 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
9608 (pupa_compressed_size): New variable.
9609 (codestart): Enable Gate A20 here.
9610 Decompress the compressed part of the core image.
9611 Rearrange the code to put functions and variables which are
9612 required for initialization in the non-compressed part.
9613 Include lzo1x.S.
9614
9615 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
9616 here.
9617
9618 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
9619
9620 * include/pupa/i386/pc/kernel.h
9621 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
9622 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
9623 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9624 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9625 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
9626
9627 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
9628
9629 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
9630 (Utility#rule): Likewise.
9631
9632 * configure.ac: Check if LZO is available.
9633
ce5bf700 96342003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
9635
9636 * include/pupa/normal.h: New file.
9637 * include/pupa/setjmp.h: Likewise.
9638 * include/pupa/i386/setjmp.h: Likewise.
9639 * normal/cmdline.c: Likewise.
9640 * normal/command.c: Likewise.
9641 * normal/main.c: Likewise.
9642 * normal/menu.c: Likewise.
9643 * normal/i386/setjmp.S: Likewise.
9644
9645 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
9646 (pupa_rescue_cmd_initrd): Likewise.
9647
9648 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
9649 Likewise.
9650
9651 * kern/i386/pc/startup.S (translation_table): New variable.
9652 (translate_keycode): New function.
9653 (pupa_console_getkey): Call translate_keycode.
9654
9655 * kern/rescue.c (attempt_normal_mode): New function.
9656 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
9657 it failed, print a message.
9658
9659 * kern/mm.c (pupa_real_malloc): Print more information when a
9660 free magic is broken.
9661 (pupa_free): If the first free header is not free actually, set
9662 it to P.
9663
9664 * kern/main.c (pupa_load_normal_mode): Just load the module
9665 "normal".
9666 (pupa_main): Don't print the message
9667 "Entering into rescue mode..." here.
9668
9669 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
9670 Declared.
9671 (pupa_rescue_cmd_initrd): Likewise.
9672 (pupa_rescue_cmd_initrd): Likewise.
9673
9674 * include/pupa/symbol.h (FUNCTION): Specify the type.
9675 (VARIABLE): Likewise.
9676
9677 * include/pupa/err.h (pupa_err_t): Added
9678 PUPA_ERR_UNKNOWN_COMMAND.
9679
9680 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
9681 (pupa_dl_get_prefix): Likewise.
9682
9683 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
9684 Added _chain.mod and _linux.mod instead of chain.mod and
9685 linux.mod.
9686 (chain_mod_SOURCES): Renamed to ...
9687 (_chain_mod_SOURCES): ... this.
9688 (chain_mod_CFLAGS): Renamed to ...
9689 (_chain_mod_CFLAGS): ... this.
9690 (linux_mod_SOURCES): Renamed to ...
9691 (_linux_mod_SOURCES): ... this.
9692 (linux_mod_CFLAGS): Renamed to ...
9693 (_linux_mod_CFLAGS): ... this.
9694 (normal_mod_SOURCES): New variable.
9695 (normal_mod_CFLAGS): Likewise.
9696 (normal_mod_ASFLAGS): Likewise.
9697
96982003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
9699
9700 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
9701 possible.
9702
9703 * kern/dl.c (pupa_dl_ref): Refer dependending modules
9704 recursively.
9705 (pupa_dl_unref): Unrefer depending modules recursively.
9706 Don't call pupa_dl_unload implicitly, because PUPA can crash if
9707 a module is unloaded before one depending on that module is
9708 unloaded.
9709 (pupa_dl_unload): Unload depending modules explicitly,
9710 if possible.
9711
c04da074 97122003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
9713
9714 * include/pupa/i386/pc/linux.h: New file.
9715 * loader/i386/pc/linux.c: Likewise.
9716
9717 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
9718 Removed.
9719 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
9720 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
9721 of PUPA_CHAINLOADER_BOOT_SECTOR.
9722
9723 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
9724 (pupa_linux_prot_size): New variable.
9725 (pupa_linux_tmp_addr): Likewise.
9726 (pupa_linux_real_addr): Likewise.
9727 (pupa_linux_boot_zimage): New function.
9728 (pupa_linux_boot_bzimage): Likewise.
9729
9730 * kern/i386/pc/init.c (struct mem_region): New structure.
9731 (MAX_REGIONS): New macro.
9732 (mem_regions): New variable.
9733 (num_regions): Likewise.
9734 (pupa_os_area_addr): Likewise.
9735 (pupa_os_area_size): Likewise.
9736 (pupa_lower_mem): Likewise.
9737 (pupa_upper_mem): Likewise.
9738 (add_mem_region): New function.
9739 (compact_mem_regions): Likewise.
9740 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
9741 the size of the conventional memory and that of so-called upper
9742 memory (before the first memory hole).
9743 Instead of adding each found region to free memory, use
9744 add_mem_region and add them after removing overlaps.
9745 Also, add only 1/4 of the upper memory to free memory. The rest
9746 is used for loading OS images. Maybe this is ad hoc, but this
9747 makes it much easier to relocate OS images when booting.
9748
9749 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
9750 (pupa_enter_rescue_mode): Don't register initrd and module.
9751
9752 * kern/mm.c: Include pupa/dl.h.
9753
9754 * kern/main.c: Include pupa/file.h and pupa/device.h.
9755
9756 * kern/loader.c (pupa_loader_load_module_func): Removed.
9757 (pupa_loader_load_module): Likewise.
9758
9759 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
9760 ``.o''.
9761
9762 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
9763 (pupa_linux_tmp_addr): Likewise.
9764 (pupa_linux_real_addr): Likewise.
9765 (pupa_linux_boot_zimage): Likewise.
9766 (pupa_linux_boot_bzimage): Likewise.
9767
9768 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
9769 (pupa_upper_mem): Likewise.
9770 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
9771 module is too dangerous.
9772
9773 * include/pupa/loader.h (pupa_os_area_addr): Declared.
9774 (pupa_os_area_size): Likewise.
9775 (pupa_loader_set): Remove the first argument. Loader doesn't
9776 manage modules or initrd any longer.
9777 (pupa_loader_load_module): Removed.
9778
9779 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
9780 (linux_mod_SOURCES): New variable.
9781 (linux_mod_CFLAGS): Likewise.
9782
a13f9237 97832003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
9784
9785 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
9786 the length of a blocklist correctly.
9787
9788 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
9789 Use ioctl only if the OS file is a block device.
9790 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
9791 not very useful for normal files.
9792
9793 * kern/main.c (pupa_set_root_dev): New function.
9794 (pupa_load_normal_mode): Likewise.
9795 (pupa_main): Call those above.
9796
9797 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
9798 pupa_uint16_t.
9799
9800 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
9801
a5ffe966 98022003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
9803
9804 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
9805 (setup): Configure the installed partition information and the
9806 dl prefix.
9807
9808 * loader/i386/pc/chainloader.c (my_mod): New variable.
9809 (pupa_chainloader_unload): New function.
9810 (pupa_rescue_cmd_chainloader): Refer itself.
9811 (PUPA_MOD_INIT): Save its own module in MY_MOD.
9812
9813 * kern/i386/pc/startup.S (install_partition): Removed.
9814 (version_string): Likewise.
9815 (config_file): Likewise.
9816 (pupa_install_dos_part): New variable.
9817 (pupa_install_bsd_part): Likewise.
9818 (pupa_prefix): Likewise.
9819 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
9820
9821 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
9822 and pupa/misc.h.
9823 (make_install_device): New function.
9824 (pupa_machine_init): Set the dl prefix.
9825
9826 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
9827 (buf): Renamed to ...
9828 (linebuf): ... this.
9829 (pupa_rescue_cmd_prefix): New function.
9830 (pupa_rescue_cmd_insmod): Likewise.
9831 (pupa_rescue_cmd_rmmod): Likewise.
9832 (pupa_rescue_cmd_lsmod): Likewise.
9833 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
9834 rmmod and lsmod.
9835
9836 * kern/mm.c (pupa_memalign): If failed even after invalidating
9837 disk caches, unload unneeded modules and retry.
9838
9839 * kern/misc.c (pupa_memmove): New function.
9840 (pupa_memcpy): Removed.
9841 (pupa_strcpy): New function.
9842 (pupa_itoa): Made static.
9843
9844 * kern/dl.c (pupa_dl_iterate): New function.
9845 (pupa_dl_ref): Likewise.
9846 (pupa_dl_unref): Likewise.
9847 (pupa_dl_unload): Return if succeeded or not.
9848 (pupa_dl_unload_unneeded): New function.
9849 (pupa_dl_unload_all): Likewise.
9850 (pupa_dl_init): Renamed to ...
9851 (pupa_dl_set_prefix): ... this.
9852 (pupa_dl_get_prefix): New function.
9853
9854 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
9855 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
9856 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9857 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9858 (pupa_install_dos_part): Declared.
9859 (pupa_install_bsd_part): Likewise.
9860 (pupa_prefix): Likewise.
9861 (pupa_boot_drive): Likewise.
9862
9863 * include/pupa/types.h: Fix a typo.
9864
9865 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
9866 pupa_memmove.
9867 (pupa_memmove): Declared.
9868 (pupa_strcpy): Likewise.
9869
9870 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
9871 pupa_mod_init takes one argument, its own module.
9872 (pupa_dl_unload_unneeded): Declared.
9873 (pupa_dl_unload_all): Likewise.
9874 (pupa_dl_ref): Likewise.
9875 (pupa_dl_unref): Likewise.
9876 (pupa_dl_iterate): Likewise.
9877 (pupa_dl_init): Renamed to ...
9878 (pupa_dl_set_prefix): ... this.
9879 (pupa_dl_get_prefix): Declared.
9880
9881 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
9882 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
9883 unloaded.
9884 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
9885 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
9886
9887 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
9888 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
9889
012d7999 98902003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
9891
9892 * util/i386/pc/pupa-setup.c (setup): Define the internal
9893 function find_first_partition_start at the top level, because GCC
9894 3.0.x cannot compile internal functions in deeper scopes
9895 correctly.
9896 (find_root_device): Use lstat instead of stat.
9897 Don't follow symbolic links.
9898 Fix the path-constructing code.
9899
9900 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
9901 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
9902 by a BLKGETSIZE ioctl first, because block devices don't fill
9903 the member st_mode of the structure stat on Linux.
9904 [__linux__] (linux_find_partition): Use a temporary buffer
9905 REAL_DEV for the working space. Copy it to DEV before returning.
9906 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
9907 buffer cache consistent.
9908 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
9909 strncmp. The previous value was merely wrong.
9910 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
9911
9912 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
9913 FAT size is 12. The previous value was merely wrong.
9914
9915 * kern/main.c (pupa_main): Don't split the starting message from
9916 newlines.
9917
9918 * kern/term.c (pupa_putchar): Put CR after LF instead of before
9919 LF, because BIOS goes crazy about character attributes in this
9920 case.
9921
1cc73a62 99222003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
9923
9924 * include/i386/pc/util/biosdisk.h: New file.
9925 * util/i386/pc/biosdisk.c: Likewise.
9926 * util/i386/pc/pupa-setup.c: Likewise.
9927
9928 * Makefile.in (INCLUDE_DISTFILES): Added
9929 include/pupa/i386/pc/util/biosdisk.h.
9930 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
9931 directory util/i386/pc.
9932 (install-local): Added a rule for sbin_UTILITIES.
9933 (uninstall): Likewise.
9934
9935 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
9936
9937 * util/misc.c (xrealloc): New function.
9938 (pupa_malloc): Likewise.
9939 (pupa_free): Likewise.
9940 (pupa_realloc): Likewise.
9941 (pupa_stop): Likewise.
9942 (pupa_putchar): Likewise.
9943
9944 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
9945
9946 * include/pupa/util/misc.h (xrealloc): Declared.
9947
9948 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
9949 macro.
9950 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
9951 (PUPA_BOOT_MACHINE_BPB_END): ... this.
9952
9953 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
9954 [PUPA_UTIL] (pupa_fat_fini): Likewise.
9955
9956 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
9957 way should be implemented.
9958 [PUPA_UTIL] (pupa_fat_fini): Likewise.
9959
9960 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
9961 the size of NAME for safety.
9962 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
9963 0x88.
9964
9965 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
9966 (pupa_setup_SOURCES): Likewise.
9967
9968 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
9969
08b70fe8 99702002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
9971
9972 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
9973 bunch of pushl's from pusha, because this destroys the return
9974 value.
9975
62ddcc8f 99762002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
9977
9978 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
9979 This means that any missing prototypes could be fatal. Also, you
9980 must take care when writing assembly code. See the comments at
9981 the beginning of startup.S, for more details.
9982
9983 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
9984 compilation mechanism.
9985 (pupa_chainloader_real_boot): Likewise.
9986 (pupa_biosdisk_rw_int13_extensions): Likewise.
9987 (pupa_biosdisk_rw_standard): Likewise.
9988 (pupa_biosdisk_check_int13_extensions): Likewise.
9989 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
9990 (pupa_biosdisk_get_diskinfo_standard): Likewise.
9991 (pupa_get_memsize): Likewise.
9992 (pupa_get_mmap_entry): Likewise.
9993 (pupa_console_putchar): Likewise.
9994 (pupa_console_setcursor): Likewise.
9995 (pupa_getrtsecs): Use pushl instead of push.
9996
9997 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
9998 memory instead of the stack for a mmap entry, because some
9999 BIOSes may ignore the maximum size and overflow.
10000
10001 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
10002
10003 * genmk.rb (PModule#rule): Compile automatically generated
10004 sources with module-specific CFLAGS as well as other sources.
10005
9962ed99 100062002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10007
10008 * configure.ac: Check ld.
10009 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
10010 respectively, before checking endianness and sizes.
10011
10012 * Makefile.in (LD): New variable.
10013
abdfc3c5 100142002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10015
10016 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
10017
6a161fa9 100182002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10019
10020 * Changelog: New file.
10021