]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-05-06 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
6cf12cbd 12008-05-06 Robert Millan <rmh@aybabtu.com>
2
3 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4 ensures that output lines aren't intermangled with those sent to
5 stderr (via grub_util_info()).
6 * util/grub-probe.c (grub_refresh): Likewise.
7 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8
0fbb3117 92008-05-05 Christian Franke <franke@computer.org>
10
11 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
12 Add Cygwin device names.
13 (get_ide_disk_name) [__CYGWIN__]: Likewise.
14 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
15 (check_device): Return error instead of success on empty name.
16 (make_device_map): Move label inside linux specific code to
17 prevent compiler warning.
18
8124cdb7 192008-04-30 Robert Millan <rmh@aybabtu.com>
20
21 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
22 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
23 first boot option.
24 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
25
094c01d0 262008-04-29 Robert Millan <rmh@aybabtu.com>
27
28 * docs/grub.cfg: New file (example GRUB configuration).
29
f4b1fc02 302008-04-26 Robert Millan <rmh@aybabtu.com>
31
329ce2a5 32 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
33 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
34 and `disk/ieee1275/nand.c'.
f4b1fc02 35
25f16ec1 362008-04-25 Bean <bean123ch@gmail.com>
37
38 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
39 i386-linuxbios.
40
41 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
42 change the buffer size to 4096 for cdrom device.
43
44 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
45 and nand.mod.
46 (_linux_mod_SOURCES): New variable.
47 (_linux_mod_CFLAGS): Likewise.
48 (_linux_mod_LDFLAGS): Likewise.
49 (linux_mod_SOURCES): Likewise.
50 (linux_mod_CFLAGS): Likewise.
51 (linux_mod_LDFLAGS): Likewise.
52 (nand_mod_SOURCES): Likewise.
53 (nand_mod_CFLAGS): Likewise.
54 (nand_mod_LDFLAGS): Likewise.
55
56 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
57 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
58 type property. (nand device in olpc don't have this property)
59
60 * include/grub/disk.h (grub_disk_dev_id): New macro
61 GRUB_DISK_DEVICE_NAND_ID.
62
63 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
64 function prototype.
65 (grub_rescue_cmd_initrd): Likewise.
66
67 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
68 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
69 ofw_cif_handler and ofw_idt, adjust padding number.
70
71 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
72 GRUB_MACHINE_IEEE1275 is defined.
73
74 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
75 Use NESTED_FUNC_ATTR attribute on the hook parameter.
76
77 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
78 on nested function heap_init.
79 (grub_upper_mem): New variable for i386-ieee1275.
80 (grub_get_extended_memory): New function for i386-ieee1275.
81 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
82
83 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
84 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
85 property.
86
87 * loader/i386/ieee1275/linux.c: New file.
88
89 * loader/i386/ieee1275/linux_normal.c: New file.
90
91 * disk/ieee1275/nand.c: New file.
92
e89d61e9 932008-04-18 Thomas Schwinge <tschwinge@gnu.org>
94
95 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
96 value.
97 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
98
602566f6 992008-04-18 Robert Millan <rmh@aybabtu.com>
100
101 Restructures early code path on ieee1275 to unify grub_main() as
102 the first C function that is executed in every platform.
103
104 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
105 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
106 cmain().
107 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
108 * kern/ieee1275/cmain.c (cmain): Rename to ...
109 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
110 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
111 at the beginning.
112
57490c2b 1132008-04-18 Robert Millan <rmh@aybabtu.com>
114
115 * util/update-grub.in: Fix syntax error when setting
116 `GRUB_PRELOAD_MODULES'.
117 Reported by Stephane Chazelas <stephane@artesyncp.com>
118
1977517d 1192008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
120
121 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
122 section into account, newer toolchains generate unique build ids
123 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 124 we want build ids to be preserved
1977517d 125 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
126 far from other sections don't cause the raw binary images grow
127 size
128
bfb1f1a2 1292008-04-15 Robert Millan <rmh@aybabtu.com>
130
131 * disk/lvm.c: Update copyright year.
132 * kern/misc.c: Likewise.
133
01979850 1342008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
135
136 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
137 there is no memory left for physical volume name.
138
0a1150e2 1392008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
140
141 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
142 volume name mapping to support bigger than 9 character names properly.
143
82ead3fe 1442008-04-13 Robert Millan <rmh@aybabtu.com>
145
146 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
147 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
148
e54a72f5 1492008-04-13 Christian Franke <franke@computer.org>
150
151 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
152 to create a floppy emulation boot CD when non emulation mode
153 does not work.
154 Enable Joliet CD filesystem extension.
155
9fe86034 1562008-04-13 Robert Millan <rmh@aybabtu.com>
157
158 * kern/misc.c (grub_strncat): Fix off-by-one error.
159 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
160
161 * kern/env.c (grub_env_context_close): Clear current context, not
162 previous one.
163 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
164
165 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
166
7ceeee39 1672008-04-13 Robert Millan <rmh@aybabtu.com>
168
169 Improve robustness when handling LVM.
170
171 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
172 (and leave `*p' unmodified).
173 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
174 through it.
175 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
176 iterating through it.
177 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
178 through it.
179 (grub_lvm_scan_device): Check the return value (and fail gracefuly
180 when due) on each grub_lvm_getvalue() or grub_strstr() call.
181 Don't assume `vg->pvs != NULL' when iterating through it.
182
58cd3d85 1832008-04-13 Robert Millan <rmh@aybabtu.com>
184
185 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
186 * genmk.rb (partmap): New variable.
187 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
188 (#{partmap}): New target rule.
189 * genpartmaplist.sh: New file.
190 * Makefile.in (pkglib_DATA): Add partmap.lst.
191 (partmap.lst): New target rule.
192 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
193 modules (including all partition maps), instead of preloading them.
194
78b51059 1952007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
196
197 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
198 `linux-boot-prober' (if installed) to detect other operating
199 systems which are installed on the computer and add them to
200 the boot menu.
201 * conf/common.rmk: Build and install 30_os-prober.
202
a91627b4 2032008-04-12 Robert Millan <rmh@aybabtu.com>
204
205 * kern/powerpc/ieee1275/init.c: Move from here ...
206 * kern/ieee1275/init.c: ... to here. Update all users.
207
208 * kern/powerpc/ieee1275/cmain.c: Move from here ...
209 * kern/ieee1275/cmain.c: ... to here. Update all users.
210
211 * kern/powerpc/ieee1275/openfw.c: Move from here ...
212 * kern/ieee1275/openfw.c: ... to here. Update all users.
213
214 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
215 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
216
322562ea 2172008-04-10 Pavel Roskin <proski@gnu.org>
218
219 * configure.ac: Always use "_cv_" in cache variables for
220 compatibility with Autoconf 2.62.
221
a02a73c5 2222008-04-07 Robert Millan <rmh@aybabtu.com>
223
224 Revert grub/machine/init.h addition by Pavel (since it breaks on
225 i386-ieee1275 and others):
226 * util/i386/pc/misc.c: Remove grub/machine/init.h.
227 * util/powerpc/ieee1275/misc.c: Likewise.
228
25c024b1 2292008-04-07 Robert Millan <rmh@aybabtu.com>
230
231 * util/grub-probe.c (probe): Improve error message.
232
3cbd2f98 2332008-04-07 Robert Millan <rmh@aybabtu.com>
234
235 * util/biosdisk.c (read_device_map): Skip devices that don't exist
236 (this prevents the presence of a bogus entry from ruining the whole
237 thing).
238
87a297bf 2392008-04-06 Pavel Roskin <proski@gnu.org>
240
36747a62 241 * util/biosdisk.c: Include grub/util/biosdisk.h.
242 * util/grub-fstest.c (execute_command): Make static.
243 * util/grub-mkdevicemap.c (check_device): Likewise.
244 * util/i386/pc/misc.c: Include grub/machine/init.h.
245 * util/powerpc/ieee1275/misc.c: Likewise.
246 * util/lvm.c: Include grub/util/lvm.h.
247 * util/misc.c: Include grub/kernel.h, grub/misc.h and
248 grub/cache.h.
249 * util/raid.c: Include grub/util/raid.h.
250 (grub_util_getdiskname): Make static.
251
87a297bf 252 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
253 grub_hostfs_fini(), as they are called from grub_init_all() and
254 grub_fini_all() respectively. This fixes an infinite loop in
255 grub-fstest due to double registration of hostfs.
256 Reported by Christian Franke <Christian.Franke@t-online.de>
257
f6ce7629 2582008-04-05 Pavel Roskin <proski@gnu.org>
259
260 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
261 all 8 functions. Otherwise, probe function 0 only.
262
070e49e4 2632008-04-04 Pavel Roskin <proski@gnu.org>
264
8b088a4c 265 * commands/lspci.c (grub_lspci_iter): Print the bus number
266 correctly.
267
4f657021 268 * commands/lspci.c (grub_pci_classes): Fix typos.
269 (grub_lspci_iter): Don't print func twice. Print vendor ID
270 before device ID, as it's normally done.
271
070e49e4 272 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
273 Fix signedness warnings.
274 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
275 Likewise.
276 * util/ieee1275/get_disk_name.c: Include config.h so that
277 _GNU_SOURCE is defined and getline() is declared. Mark an
278 unused argument as such. Fix a signedness warning.
279
ba7328dc 2802008-04-02 Pavel Roskin <proski@gnu.org>
281
26887f22 282 * genkernsyms.sh.in: Use more robust assignments for CC and
283 srcdir. Quote srcdir.
284 * gensymlist.sh.in: Likewise. Assert at the compile time that
285 the symbol table is not empty.
286
ba7328dc 287 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
288 * fs/cpio.c (grub_cpio_read): Likewise.
289
0f582c6b 2902008-04-01 Pavel Roskin <proski@gnu.org>
291
4b6e1995 292 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
293 * disk/host.c (grub_host_open): Likewise.
294 * disk/loopback.c (grub_loopback_open): Likewise.
295 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
296 disk->id as in disk/host.c, not a multi-character constant.
297
828a2768 298 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
299 later is obsolete, potentially dangerous and sets a bad example.
300 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
301 * util/misc.c (grub_util_get_image_size): Likewise.
302
2bb4fb47 303 * disk/loopback.c (options): Improve help for "--partitions".
304
0f582c6b 305 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
306 options to align them with the short options, e.g. "echo -e".
307
a33224e0 3082008-03-31 Bean <bean123ch@gmail.com>
309
310 * video/reader/png.c (grub_png_data): New member is_16bit and
311 image_data.
312 (grub_png_decode_image_header): Detect 16 bit png image.
313 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
314 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
315 (grub_video_reader_png): Release memory occupied by image_data.
316
317 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
318 4096 bytes.
319 (grub_nfs_mount): Skip the test for sector per cluster.
320
321 * include/grub/ntfs.h (MAX_SPC): Removed.
322
86cb4f54 3232008-03-31 Bean <bean123ch@gmail.com>
324
325 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
326 (grub_probe_SOURCES): Add fs/afs.c.
327 (grub_fstest_SOURCES): Likewise.
328 (afs_mod_SOURCES): New variable.
329 (afs_mod_CFLAGS): Likewise.
330 (afs_mod_LDFLAGS): Likewise.
331
332 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
333 (grub_emu_SOURCES): Likewise.
334
335 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
336
337 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
338
339 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
340
341 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
342
343 * fs/afs.c: New file.
344
17c74c21 3452008-03-30 Pavel Roskin <proski@gnu.org>
346
4cb68e89 347 * disk/host.c: Include grub/misc.h to fix a warning.
348 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
349 warnings about implicit declarations.
350
8790bb04 351 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
352 variable.
353 * include/grub/i386/loader.h: Change declaration of
354 grub_linux_boot() to match what grub_loader_set() expects.
355 * util/getroot.c (grub_guess_root_device): Return const char* to
356 fix a warning.
357 * util/grub-probe.c (probe): Fix a warning about uninitialized
358 abstraction_name variable.
359 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
360 second argument as unused to fix a warning.
361
9a3f3296 362 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
363 missing grub_error() call.
364
0ecef90d 365 * util/update-grub_lib.in: Define datarootdir, since Autoconf
366 2.60 and newer uses it to define datadir.
367
0bf6d401 368 * commands/sleep.c: Fix warning about implicit declaration.
369 * disk/memdisk.c: Likewise.
370 * loader/aout.c: Likewise.
371 * loader/i386/bsd_normal.c: Likewise.
372 * util/grub-probe.c: Likewise.
373
7cdacf97 374 * commands/i386/cpuid.c (has_longmode): Make static.
375 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
376 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
377
17c74c21 378 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
379 GDT. This is more robust, as %ds can change.
380 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
381 calling real_to_prot().
382 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
383
80a3e68b 3842008-03-28 Pavel Roskin <proski@gnu.org>
385
386 * kern/i386/pc/startup.S: Assert that uncompressed functions
387 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
388 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
389 code, as they push parts of the code (error handlers) beyond
390 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
391 code as correctness and size.
392
77bcd272 3932008-03-28 Pavel Roskin <proski@gnu.org>
394
395 * kern/i386/pc/startup.S
396 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
397 data block address to the real mode, keep offset minimal. This
398 works around a bug in AWARD BIOS on old Athlon systems, which
399 makes CD detection hang.
400
c5dfd43b 4012008-03-26 Pavel Roskin <proski@gnu.org>
402
403 * normal/color.c (grub_parse_color_name_pair): Make `name' a
404 const.
405 * include/grub/normal.h: Add grub_parse_color_name_pair()
406 declaration.
407
bf962df2 4082008-03-24 Bean <bean123ch@gmail.com>
409
410 * disk/i386/pc/biosdisk.c (cd_start): Removed.
411 (cd_count): Removed.
412 (cd_drive): New variable.
413 (grub_biosdisk_get_drive): Don't check for (cdN) device.
414 (grub_biosdisk_call_hook): Likewise.
415 (grub_biosdisk_iterate): Change cdrom detection method.
416 (grub_biosdisk_open): Replace cd_start with cd_drive.
417 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
418 detect cdrom device.
419
420 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
421 Removed.
422 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
423 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
424 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
425 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
426 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
427 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
428 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
429 (grub_biosdisk_cdrp): New structure.
430 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
431
432 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
433
434 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
435 device.
436
437 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
438 New function.
439
68e7fc7a 4402008-03-20 Robert Millan <rmh@aybabtu.com>
441
442 Remove 2 TiB limit in ata.mod.
443 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
444 (grub_ata_dumpinfo): Print sector count with 0x%llx.
445 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
446 grub_uint64_t instead of grub_uint32_t.
447
38ad2cf5 4482008-03-05 Bean <bean123ch@gmail.com>
449
450 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
451 (grub_multiboot): Set boot device.
452
453 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
454
2b89344e 4552008-03-02 Bean <bean123ch@gmail.com>
456
457 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
458 symlink_buffer.
459
87a95d1f 4602008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
461
462 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
463 texinfo.tex.
464
465 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
466 modified.
467
468 * docs/fdl.texi: New file.
469
470 * docs/mdate-sh: New file. Copied from gnulib.
471 * docs/texinfo.tex: Likewise.
472
473 * config.guess: Updated from gnulib.
474 * install-sh: Likewise.
475
7dc15d8e 4762008-02-28 Robert Millan <rmh@aybabtu.com>
477
478 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
479 (aout_mod_SOURCES): New variable.
480 (aout_mod_CFLAGS): Likewise.
481 (aout_mod_LDFLAGS): Likewise.
482
483 * conf/i386-ieee1275.rmk: Likewise.
484
b00ab696 4852008-02-28 Robert Millan <rmh@aybabtu.com>
486
487 * util/update-grub.in: Reorganise terminal validity check. Accept
488 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
489 Based on suggestion by Franklin PIAT.
490
79ca2d78 4912008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
492
493 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
494 function.
495 * util/getroot.c (grub_util_check_block_device): New function that
496 returns the given argument if it is a block device and returns NULL else.
497 * util/grub-probe.c (argument_is_device): New variable.
498 (probe): Promote device_name from a variable to an argument. Receive
499 device_name from grub_util_check_block_device() if path is NULL and from
500 grub_guess_root_device() else. Do not free() device_name anymore.
501 (options): Introduce new parameter '-d, --device'.
502 (main): Add description of the new parameter to the help screen.
503 Rename path variable to argument. Set argument_is_device if the '-d'
504 option is given. Pass argument to probe() depending on
505 argument_is_device.
506
0d16e571 5072008-02-24 Bean <bean123ch@gmail.com>
508
509 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
510 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
511 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
512 (GRUB_ISO9660_VOLDESC_PART): Likewise.
513 (GRUB_ISO9660_VOLDESC_END): Likewise.
514 (grub_iso9660_primary_voldesc): New member escape.
515 (grub_iso9660_data): New member joliet.
516 (grub_iso9660_convert_string): New function.
517 (grub_iso9660_mount): Detect joliet extension.
518 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
519 (grub_iso9660_iso9660_label): Likewise.
520
521 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
522 (grub_setup_SOURCES): Add fs/udf.c.
523 (grub_fstest_SOURCES): Likewise.
524 (udf_mod_SOURCES): New variable.
525 (udf_mod_CFLAGS): Likewise.
526 (udf_mod_LDFLAGS): Likewise.
527
528 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
529 (grub_emu_SOURCES): Likewise.
530
531 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
532
533 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
534
535 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
536
537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
538
539 * fs/udf.c: New file.
540
8a594a17 5412008-02-24 Robert Millan <rmh@aybabtu.com>
542
543 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
544 (normal/lexer.c_DEPENDENCIES): New variables.
545 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
546 (normal/lexer.c_DEPENDENCIES): Likewise.
547 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
548 (normal/lexer.c_DEPENDENCIES): Likewise.
549 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
550 (normal/lexer.c_DEPENDENCIES): Likewise.
551 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
552 (normal/lexer.c_DEPENDENCIES): Likewise.
553 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
554 (normal/lexer.c_DEPENDENCIES): Likewise.
555
2dc33c03 5562008-02-23 Robert Millan <rmh@aybabtu.com>
557
558 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
559 since they were intended to be in hex. This didn't break previously
560 because of a bug in gpt_partition_map_iterate() (see below).
561
562 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
563 when checking the validity of GPT header.
564 Remove `partno', since it always provides the same information as `i'.
565
f6f4cfb0 5662008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
567
568 * include/grub/efi/time.h: Fix a wrong comment.
569
79ff665f 5702008-02-19 Pavel Roskin <proski@gnu.org>
571
572 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
573 message.
574
d38e24c2 5752008-02-19 Bean <bean123ch@gmail.com>
576
577 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
578 (aout_mod_SOURCES): New variable.
579 (aout_mod_CFLAGS): Likewise.
580 (aout_mod_LDFLAGS): Likewise.
581 (_bsd_mod_SOURCES): New variable.
582 (_bsd_mod_CFLAGS): Likewise.
583 (_bsd_mod_LDFLAGS): Likewise.
584 (bsd_mod_SOURCES): New variable.
585 (bsd_mod_CFLAGS): Likewise.
586 (bsd_mod_LDFLAGS): Likewise.
587
588 * include/grub/aout.h: New file.
589
590 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
591
592 * include/grub/i386/bsd.h: New file.
593
594 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
595 to make it public.
596
597 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
598 function is called, so that it's possible to change it inside the hook.
599 (grub_elf64_load): Likewise.
600 (grub_elf_file): Don't close the file if elf header is not found.
601 (grub_elf_close): Close the file if grub_elf_file fails (The new
602 grub_elf_file won't close it).
603 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
604 (grub_elf64_size): Likewise.
605
606 * kern/i386/loader.S (grub_unix_real_boot): New function.
607
608 * loader/aout.c: New file.
609
610 * loader/i386/bsd.c: New file.
611
612 * loader/i386/bsd_normal.c: New file.
613
614 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
615
616 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
617 can test othe formats.
618
b93bdb0f 6192008-02-19 Robert Millan <rmh@aybabtu.com>
620
621 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
622 (grub_gpt_partition_type_empty): Redefine with macro from
623 `<grub/gpt_partition.h>'.
624 (gpt_partition_map_iterate): Adjust partition type comparison.
625
626 Export `entry' as partmap-specific `part.data' struct.
627 (grub_gpt_header, grub_gpt_partentry): Move from here ...
628
629 * include/grub/gpt_partition.h (grub_gpt_header)
630 (grub_gpt_partentry): ... to here (new file).
631
632 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
633
634 (grub_gpt_partition_type_bios_boot): New const variable, defined
635 with macro from `<grub/gpt_partition.h>'.
636
637 (setup): Replace `first_start' with `embed_region', which keeps
638 track of the embed region (and is partmap-agnostic).
639
640 Replace find_first_partition_start() with find_usable_region(),
641 which finds a usable region for embedding using partmap-specific
642 knowledge (supports PC/MSDOS and GPT).
643
644 Fix all assumptions that the embed region start at sector 1, using
645 `embed_region.start' from now on. Similarly, use `embed_region.end'
646 rather than `first_start' to calculate available size.
647
648 In grub_util_info() message, replace "into after the MBR" with an
649 indication of the specific sector our embed region starts at.
650
66cb40f6 6512008-02-19 Robert Millan <rmh@aybabtu.com>
652
653 * DISTLIST: Replace `commands/ieee1275/halt.c' and
654 `commands/ieee1275/reboot.c' with `commands/halt.c' and
655 `commands/reboot.c'.
656 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
657 (halt_mod_SOURCES): Likewise.
658 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
659 (halt_mod_SOURCES): Likewise.
660
b7202015 6612008-02-17 Christian Franke <franke@computer.org>
662
663 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
664
32b0fc49 6652008-02-17 Robert Millan <rmh@aybabtu.com>
666
667 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
668 set `first_start' to 0 for non-PC/MSDOS partition maps.
669
aca63502 6702008-02-16 Robert Millan <rmh@aybabtu.com>
671
672 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
673 do not assume partition map is PC/MSDOS before performing checks that
674 are specific to that layout.
675
0de8be86 6762008-02-13 Robert Millan <rmh@aybabtu.com>
677
678 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
679 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
680 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
681
c3db8364 6822008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
683
684 * configure.ac: Only a cosmetic change on the handling of
685 -fno-stack-protector.
686
f714229e 6872008-02-12 Alexandre Boeglin <alex@boeglin.org>
688
c3db8364 689 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
690 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
691 reboot.c.
f714229e 692 (grub_install_SOURCES): Add halt.mod and reboot.mod.
693 (halt_mod_SOURCES): New variable.
694 (halt_mod_CFLAGS): Likewise.
695 (halt_mod_LDFLAGS): Likewise.
696 (reboot_mod_SOURCES): Likewise.
697 (reboot_mod_CFLAGS): Likewise.
698 (reboot_mod_LDFLAGS): Likewise.
699
c3db8364 700 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
701 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
702 reboot.c.
f714229e 703 (halt_mod_SOURCES): Likewise.
704 (reboot_mod_SOURCES): Likewise.
705
c3db8364 706 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
707 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 708 (reboot_mod_SOURCES): Likewise.
709
710 * commands/i386/pc/reboot.c: merge this file ...
711
712 * commands/ieee1275/reboot.c: ... and this file ...
713
714 * commands/reboot.c: ... to this file.
c3db8364 715 Add some precompiler directive to include the correct header for
716 each machine.
f714229e 717
718 * commands/ieee1275/halt.c: move this file ...
719
720 * commands/halt.c: ... to here.
c3db8364 721 Add some precompiler directive to include the correct header for
722 each machine.
f714229e 723
724 * include/grub/efi/efi.h (grub_reboot): New function declaration.
725 (grub_halt): Likewise.
726
727 * kern/efi/efi.c (grub_reboot): New function.
728 (grub_halt): Likewise.
729
c74493e0 7302008-02-12 Robert Millan <rmh@aybabtu.com>
731
732 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
733 /dev (like it is done for /dev/mapper). This doesn't provide support
734 for EVMS, but at least it is now easy to identify the problem when it
735 arises.
736
d0db4b04 7372008-02-11 Robert Millan <rmh@aybabtu.com>
738
739 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
740 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
741 comparing it with -1, not 0.
742
bf748642 7432008-02-10 Robert Millan <rmh@aybabtu.com>
744
745 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
746 `disk/lvm.c'.
747 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
748 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
749
750 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
751 `disk/lvm.c' to the end of the list.
752 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
753 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
754
b5db202a 7552008-02-10 Robert Millan <rmh@aybabtu.com>
756
757 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
758 grub_print_error() instead. This will let user know why we're entering
759 rescue mode.
760 Based on suggestions from Sam Morris.
761
83abee31 7622008-02-10 Alexandre Boeglin <alex@boeglin.org>
763
764 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
765 on remaining N args, instead of "--" arg N times.
766
78d5a08b 7672008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
768
769 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
770 (fill_with_default_glyph): Changed to use unknown_glyph for fill
771 pattern for unknown glyphs.
772
68807e5f 7732008-02-09 Robert Millan <rmh@aybabtu.com>
774
775 * configure.ac: Probe for `help2man'.
776 * Makefile.in (builddir): New variable.
777 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
778 or otherwise add a few flags/options to it.
779 (install-local): For every executable utility or script that is
780 installed, invoke $(HELP2MAN) to install a manpage based on --help
781 output.
782
783 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
784 that it doesn't prevent --help from working in build tree.
785
786 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
787 with `bug-grub@gnu.org'.
788 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
789 * util/update-grub.in (usage): New function.
790 Implement proper argument check, with support for --help and --version
791 (as well as existing -y).
792
7932008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 794
795 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
796 avoid overwriting previous output.
797 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
798
c1962162 7992008-02-09 Robert Millan <rmh@aybabtu.com>
800
801 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
802 drawing the menu.
803
3dac2e3f 8042008-02-09 Robert Millan <rmh@aybabtu.com>
805
806 * commands/sleep.c: New file.
807 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
808 (sleep_mod_SOURCES): New variable.
809 (sleep_mod_CFLAGS): Likewise.
810 (sleep_mod_LDFLAGS): Likewise.
811
7a634e08 8122008-02-09 Robert Millan <rmh@aybabtu.com>
813
814 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
815 situations in which we can deduce the RAID size and the superblock
816 doesn't match it.
817
b92f0c18 8182008-02-09 Robert Millan <rmh@aybabtu.com>
819
820 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
821 and return a grub_diskmemberlist_t composed of LVM physical volumes.
822 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
823
824 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
825 and return a grub_diskmemberlist_t composed of physical array members.
826 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
827
828 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
829 prototype.
830 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
831 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
832 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
833
834 * util/grub-probe.c (probe): Move partmap probing code from here ...
835 (probe_partmap): ... to here.
836 (probe): Use probe_partmap() once for the disk we're probing, and
837 additionally, when such disk contains a memberlist() struct member,
838 once for each disk that is contained in the structure returned by
839 memberlist().
840
91a4bf68 8412008-02-09 Robert Millan <rmh@aybabtu.com>
842
843 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
844 environment variable to 'all' in order to obtain debug output from
845 non-util/ code.
846 * util/i386/pc/grub-setup.c (main): Likewise.
847
a96f9caa 8482008-02-08 Robert Millan <rmh@aybabtu.com>
849
850 * disk/raid.c (grub_raid_scan_device): Check for
851 `array->device[sb.this_disk.number]' rather than for
852 `array->device[sb.this_disk.number]->name', since the latter is not
853 garanteed to be accessible.
854
b37a9222 8552008-02-08 Robert Millan <rmh@aybabtu.com>
856
857 * disk/raid.c: Update copyright.
858 * fs/cpio.c: Likewise.
859 * include/grub/raid.h: Likewise.
860 * loader/i386/pc/multiboot.c: Likewise.
861 * util/hostfs.c: Likewise.
862
5626aee1 8632008-02-08 Robert Millan <rmh@aybabtu.com>
864
865 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
866 to a grub_disk_t array.
867 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
868 `device[x]'.
869 (grub_raid_scan_device): Replace `device[x].name' accesses with
870 `device[x]->name'. Simplify initialization of `array->device[x]'.
871
554f0187 8722008-02-08 Robert Millan <rmh@aybabtu.com>
873
874 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
875 grub_dprintf() calls.
876 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
877 error message.
878
1ec8425d 8792008-02-07 Christian Franke <franke@computer.org>
880
881 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
882 instead of fseek and ftell to support large files.
883 (grub_hostfs_read): Likewise.
884
f2156fda 8852008-02-07 Robert Millan <rmh@aybabtu.com>
886
887 Patch from Jeroen Dekkers.
888 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
889 failure, since succesfuly reading all array members might not be
890 required.
891
9216e0e7 8922008-02-06 Robert Millan <rmh@aybabtu.com>
893
894 * util/grub-probe.c (probe): Simplify partmap probing (with the
895 assumption that the first word up to the underscore equals to
896 the module name).
897
b0dfd29a 8982008-02-06 Christian Franke <franke@computer.org>
899
900 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
901 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
902 last block of a cpio or tar stream.
903 Check for "TRAILER!!!" instead of any empty data
904 block to detect last block of a cpio stream.
905 (grub_cpio_dir): Fix constness of variable np.
906 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
907 cpio or tar trailer is detected. This fixes a crash
908 on open of a non existing file.
909
c32865bf 9102008-02-05 Bean <bean123ch@gmail.com>
911
912 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
913 address of entry.
914 (grub_multiboot_load_elf64): Likewise.
915 (grub_multiboot): Initialize mbi structure.
916
917 * util/grub-fstest.c: Don't include unused header file script.h.
918
919 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the begginning
920 of file.
921 (grub_fstest_SOURCES): Likewise.
922
409480b7 9232008-02-05 Robert Millan <rmh@aybabtu.com>
924
925 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
926 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
927 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
928 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
929
930 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
931 (translation_table): Replace hardcoded values with macros
932 provided by `<grub/term.h>'.
933
934 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
935 (keyboard_map): Correct/add a few values, with macros provided
936 by `<grub/term.h>'.
937 (keyboard_map_shift): Zero values that don't differ from their
938 `keyboard_map' equivalents.
939 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
940 Discard the second scan code that is always sent by Caps lock.
941 Only use `keyboard_map_shift' when it provides a non-zero value,
942 otherwise fallback to `keyboard_map'.
943
99fadbaa 9442008-02-04 Bean <bean123ch@gmail.com>
945
946 * Makefile.in (enable_grub_fstest): New variable.
947
948 * conf/common.rmk (grub_fstest_init.lst): New rule.
949 (grub_fstest_init.h): Likewise.
950 (grub_fstest_init.c): Likewise.
951 (util/grub-fstest.c_DEPENDENCIES): New variable.
952 (grub_fstest_SOURCES): Likewise.
953
954 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
955
956 * util/grub-fstest.c: New file.
957
bf567c50 9582008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
959
960 Make grub-setup handle a separate root device.
961
962 * util/i386/pc/grub-setup.c (setup): Always open the root device,
963 so that the root device can be compared with the destination
964 device.
965 When embedding the core image, if the root and destination devices
966 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
967 0xFF.
968 When not embedding, set ROOT_DRIVE to 0xFF.
969
9be6b98b 9702008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
971
972 Add support for having a grub directory in a different drive. This
973 is still only the data handling part.
974
975 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
976 (codestart): Save %dh in GRUB_ROOT_DRIVE.
977 (grub_root_drive): New variable.
978
979 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
980 instead of GRUB_BOOT_DRIVE to construct a device name. Set
981 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
982 as it was.
983
984 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
985
986 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
987 macro.
988 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
989
990 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
991 is bogus, because PXE booting does not specify any drive
992 correctly.
993
994 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
995 am not sure if this is really correct.
996
997 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
998 is always identical to the boot drive when booting from a CD.
999
1000 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
1001 longer.
1002 (root_drive): New variable.
1003 (real_start): Unconditionally set %dh to ROOT_DRIVE.
1004 (setup_sectors): Push %dx right after popping it, because %dh will
1005 be modified later.
1006 (copy_buffer): Restore %dx.
1007
e0ca0677 10082008-02-03 Robert Millan <rmh@aybabtu.com>
1009
1010 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
1011 use `cdboot.img' for cdrom images.
1012
3b3f6629 10132008-02-03 Robert Millan <rmh@aybabtu.com>
1014
1015 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
1016 only setup gfxterm when `font' command has succeeded.
1017
d42b3672 10182008-02-03 Robert Millan <rmh@aybabtu.com>
1019
1020 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
1021 (grub_rescue_cmd_multiboot_loader)
1022 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
1023
fa370ea6 10242008-02-03 Pavel Roskin <proski@gnu.org>
1025
e0c5dacb 1026 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 1027 %edx and %esi from stack only after grub_gate_a20() is called.
1028 grub_gate_a20() clobbers %edx.
1029
f2a76e1d 10302008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
1031
1032 * configure.ac (AC_INIT): Bumped to 1.96.
1033
1034 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
1035 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
1036 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
1037 video/readers/png.c.
1038
90fd32d1 10392008-02-03 Bean <bean123ch@gmail.com>
9be665dd 1040
1041 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
1042 (cdboot_img_SOURCES): New variable.
1043 (cdboot_img_ASFLAGS): New variable.
1044 (cdboot_img_LDFLAGS): New variable.
1045
1046 * boot/i386/pc/cdboot.S: New file.
1047
1048 * disk/i386/pc/biosdisk.c (cd_start): New variable.
1049 (cd_count): Likewise.
1050 (grub_biosdisk_get_drive): Add support for cd device.
1051 (grub_biosdisk_call_hook): Likewise.
1052 (grub_biosdisk_iterate): Likewise.
1053 (grub_biosdisk_open): Likewise.
1054 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
1055 (grub_biosdisk_rw): Support reading from cd device.
1056 (GRUB_MOD_INIT): Iterate cd devices.
1057
1058 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
1059 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
1060 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
1061
1062 * kern/i386/pc/init.c (make_install_device): Check for cd device.
1063
4020aa53 10642008-02-02 Robert Millan <rmh@aybabtu.com>
1065
1066 * commands/read.c: New file.
1067 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
1068 (read_mod_SOURCES): New variable.
1069 (read_mod_CFLAGS): Likewise.
1070 (read_mod_LDFLAGS): Likewise.
1071
e03a1132 10722008-02-02 Robert Millan <rmh@aybabtu.com>
1073
1074 * normal/main.c (grub_normal_execute): Check for `menu->size' when
1075 determining whether menu has to be displayed.
1076
58c69220 10772008-02-02 Marco Gerards <marco@gnu.org>
1078
1079 * bus/pci.c: New file.
1080
1081 * include/grub/pci.h: Likewise.
1082
1083 * include/grub/i386/pc/pci.h: Likewise.
1084
1085 * commands/lspci.c: Likewise.
1086
1087 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
1088 `lspci.mod'.
1089 (pci_mod_SOURCES): New variable.
1090 (pci_mod_CFLAGS): Likewise.
1091 (pci_mod_LDFLAGS): Likewise.
1092 (lspci_mod_SOURCES): Likewise.
1093 (lspci_mod_CFLAGS): Likewise.
1094 (lspci_mod_LDFLAGS): Likewise.
1095
c004e1b4 10962008-02-02 Bean <bean123ch@gmail.com>
1097
1098 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
1099 (grub_ufs_get_file_block): Fix indirect block calculation problem.
1100
1101 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
1102 (grub_xfs_btree_node): New structure.
1103 (grub_xfs_btree_root): New structure.
1104 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
1105 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
1106 (GRUB_XFS_EXTENT_BLOCK): Likewise.
1107 (GRUB_XFS_EXTENT_SIZE): Likewise.
1108 (grub_xfs_read_block): Support btree format type.
1109 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
1110 Use directory block as basic unit.
1111
1112 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
1113
1114 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
1115 __attribute__ ((__regparm__ (1))).
1116
f95562bf 11172008-02-01 Robert Millan <rmh@aybabtu.com>
1118
1119 Correct a mistake in previous commit.
1120
1121 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
1122 top.
1123 (normal/command.c_DEPENDENCIES): New variable.
1124
7d31f41f 11252008-02-01 Robert Millan <rmh@aybabtu.com>
1126
1127 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
1128 top.
1129 (normal/command.c_DEPENDENCIES): New variable.
1130 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
1131 * conf/i386-ieee1275.rmk: Likewise.
1132 * conf/i386-linuxbios.rmk: Likewise.
1133 * conf/i386-pc.rmk: Likewise.
1134 * conf/sparc64-ieee1275.rmk: Likewise.
1135 * conf/powerpc-ieee1275.rmk: Likewise.
1136 (grub_emu_SOURCES): Add `fs/fshelp.c'.
1137
1138 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
1139
60b6be74 11402008-02-01 Robert Millan <rmh@aybabtu.com>
1141
1142 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
1143 call at beginning of function.
1144
078522ab 11452008-01-31 Pavel Roskin <proski@gnu.org>
1146
1147 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 1148 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
1149 (grub_mkrescue_SOURCES): Likewise.
078522ab 1150 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
1151
ccaa8a5f 11522008-01-30 Robert Millan <rmh@aybabtu.com>
1153
1154 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
1155 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
1156 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
1157 (grub_probe_SOURCES): ... to here.
1158
1159 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
1160 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
1161 * conf/i386-ieee1275.rmk: Likewise.
1162 * conf/i386-linuxbios.rmk: Likewise.
1163 * conf/powerpc-ieee1275.rmk: Likewise.
1164
ae5a9cd7 11652008-01-30 Tristan Gingold <gingold@free.fr>
1166
1167 * kern/rescue.c: Silently accept empty lines.
1168
70bc2ef2 11692008-01-29 Bean <bean123ch@gmail.com>
1170
1171 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
1172 (real_code_2): Code cleanup and change comment style.
1173 (move_memory): Avoid using 32-bit address mode.
1174
6a4d50ea 11752008-01-29 Bean <bean123ch@gmail.com>
1176
1177 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
1178 (png_mod_SOURCES): New variable.
1179 (png_mod_CFLAGS): Likewise.
1180 (png_mod_LDFLAGS): Likewise.
1181
1182 * video/readers/png.c: New file.
1183
11cc30ac 11842008-01-28 Robert Millan <rmh@aybabtu.com>
1185
1186 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
1187 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
1188 `ifndef GRUB_MOD_GAP' hack.
1189 * util/elf/grub-mkimage.c (add_segments): Likewise.
1190
3abc589f 11912008-01-27 Robert Millan <rmh@aybabtu.com>
1192
1193 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
1194 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 1195 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 1196
e1907778 11972008-01-27 Robert Millan <rmh@aybabtu.com>
1198
1199 Get grub-emu to build again (including parallel builds).
1200
1201 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
1202 Split into ...
1203 (util/grub-emu.c_DEPENDENCIES): ... this, ...
1204 (normal/execute.c_DEPENDENCIES): ... this, ...
1205 (grub-emu_DEPENDENCIES): ... and this.
1206
1207 * conf/i386-efi.rmk: Likewise.
1208 * conf/i386-linuxbios.rmk: Likewise.
1209 * conf/i386-ieee1275.rmk: Likewise.
1210 * conf/powerpc-ieee1275.rmk: Likewise.
1211 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
1212
2216b101 12132008-01-27 Robert Millan <rmh@aybabtu.com>
1214
1215 * NEWS: Add a few items.
1216
f75172d9 12172008-01-27 Robert Millan <rmh@aybabtu.com>
1218
1219 Fix parallel builds with grub-emu. Based on earlier commit for
1220 grub-probe and grub-setup.
1221
1222 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1223 (util/grub-emu.c_DEPENDENCIES): ... this.
1224 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1225 (util/grub-emu.c_DEPENDENCIES): ... this.
1226 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1227 (util/grub-emu.c_DEPENDENCIES): ... this.
1228 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1229 (util/grub-emu.c_DEPENDENCIES): ... this.
1230 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
1231 (util/grub-emu.c_DEPENDENCIES): ... this.
1232
3f51de77 12332008-01-27 Pavel Roskin <proski@gnu.org>
1234
1235 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
1236 to create a gap between _end and the modules added to the image
1237 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
1238 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
1239 * util/elf/grub-mkimage.c (add_segments): Likewise.
1240
2033f53e 12412008-01-26 Pavel Roskin <proski@gnu.org>
1242
1243 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
1244 just return an error.
1245
22da1f6f 12462008-01-26 Bean <bean123ch@gmail.com>
1247
1248 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
1249 (grub_reiserfs_get_item): Save offset of the next item.
1250 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
1251
2a9525e6 12522008-01-25 Robert Millan <rmh@aybabtu.com>
1253
1254 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
1255 make all filesystem sources appear together (possibly fixing omissions
1256 while at it).
1257 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1258 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1259 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
1260 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1261
1262 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
1263 add `kern/file.c'.
1264 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
1265 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1266 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
1267 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
1268
1269 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
1270 (probe): Add a sanity check to make sure of our ability to read
1271 requested files when probing for filesystem type.
1272
1273 * genmk.rb: Update copyright year (2007).
1274
1275 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
1276 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
1277 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
1278 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
1279 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
1280 : Remove function prototypes.
1281
b95f71b5 12822008-01-25 Robert Millan <rmh@aybabtu.com>
1283
1284 Revert my previous commits (based on wrong assumption of how grub_errno
1285 works).
1286
1287 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
1288 * kern/file.c (grub_file_open): Likewise.
1289
d08bbb49 12902008-01-24 Pavel Roskin <proski@gnu.org>
1291
1292 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
1293 that hang if GRUB tries to setup colors.
1294 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
1295 colors for firmwares that don't support it.
1296 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
1297 Recognize Open Hack'Ware, set flags to work around its
1298 limitations.
1299
605e36ed 13002008-01-24 Robert Millan <rmh@aybabtu.com>
1301
1302 * kern/file.c (grub_file_open): Do not account previous failures of
1303 unrelated functions when grub_errno is checked for.
1304 Reported by Oleg Strikov.
1305
bac332a1 13062008-01-24 Bean <bean123ch@gmail.com>
1307
1308 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
1309 (grub_ufs_sblock): New member volume name.
1310 (grub_ufs_find_file): Fix string copy bug.
1311 (grub_ufs_label): Implement this function properly.
1312
1313 * fs/hfs.c (grub_hfs_cnid_type): New enum.
1314 (grub_hfs_iterate_records): Use the correct file number for extents
1315 and catalog file. Fix problem in next index calculation.
1316 (grub_hfs_find_node): Replace recursive function call with loop.
1317 (grub_hfs_iterate_dir): Replace recursive function call with loop.
1318
15c80c09 13192008-01-23 Robert Millan <rmh@aybabtu.com>
1320
1321 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
1322 `<grub/symbol.h>' and `<grub/multiboot.h>'.
1323 (grub_multiboot2_real_boot): New function prototype.
1324
1325 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
1326 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
1327
1328 * kern/i386/ieee1275/init.c (grub_os_area_addr)
1329 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
1330
305338fd 13312008-01-23 Robert Millan <rmh@aybabtu.com>
1332
1333 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
1334 #ifdef'ed out grub_printf().
1335
3ea52685 13362008-01-23 Robert Millan <rmh@aybabtu.com>
1337
1338 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
1339 grub_dprintf calls, since they make "debug=all" mode unusable.
1340 (grub_console_checkkey): Likewise.
1341
5882ae4b 13422008-01-23 Robert Millan <rmh@aybabtu.com>
1343
1344 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1345 `term/i386/pc/at_keyboard.c'.
1346 (pkglib_MODULES): Add `serial.mod'.
1347 (serial_mod_SOURCES): New variable.
1348 (serial_mod_CFLAGS): Likewise.
1349 (serial_mod_LDFLAGS): Likewise.
1350
1351 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
1352 `<grub/powerpc/ieee1275/console.h>'.
1353 (grub_keyboard_controller_init): New function prototype.
1354 (grub_console_checkkey): Likewise.
1355 (grub_console_getkey): Likewise.
1356
1357 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
1358 keyboard on i386.
1359
1360 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
1361 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
1362
06ab5303 13632008-01-23 Robert Millan <rmh@aybabtu.com>
1364
1365 * kern/i386/pc/init.c (make_install_device): When memdisk image is
1366 present, "(memdisk)/boot/grub" becomes the default prefix.
1367
1368 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
1369 a memdisk tarball with all the modules. Add --overlay=DIR option that
1370 allows users to overlay additional files into the image.
1371
dbb475a4 13722008-01-23 Robert Millan <rmh@aybabtu.com>
1373
1374 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
1375 and `machine/memory.h'.
1376 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
1377 (_multiboot_mod_SOURCES): New variable.
1378 (_multiboot_mod_CFLAGS): Likewise.
1379 (_multiboot_mod_LDFLAGS): Likewise.
1380 (multiboot_mod_SOURCES): Likewise.
1381 (multiboot_mod_CFLAGS): Likewise.
1382 (multiboot_mod_LDFLAGS): Likewise.
1383
1384 * include/grub/i386/ieee1275/loader.h: New file.
1385
1386 * include/grub/i386/ieee1275/machine.h: Likewise.
1387
1388 * include/grub/i386/ieee1275/memory.h: Likewise.
1389
1390 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
1391 variable declaration.
1392 (grub_os_area_size): Likewise.
1393
1394 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
1395 (grub_lower_mem, grub_upper_mem): New variables.
1396 (grub_stop_floppy): New function (just to make
1397 grub_multiboot2_real_boot() happy).
1398
1399 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
1400 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
1401 (grub_stop): New function.
1402 Include `"../realmode.S"' and `"../loader.S"'.
1403
1404 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
1405 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
1406
1407 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
1408 rely on grub_multiboot2_real_boot() for final boot.
1409
25638629 14102008-01-22 Robert Millan <rmh@aybabtu.com>
1411
1412 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
1413 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
1414 device that doesn't look like an SD card.
1415 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1416 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
1417 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
1418 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
1419 found.
1420
9dad816d 14212008-01-22 Robert Millan <rmh@aybabtu.com>
1422
1423 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
1424 avoid claiming over our own code.
1425
34842f2d 14262008-01-22 Bean <bean123ch@gmail.com>
1427
1428 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
1429 (jpeg_mod_SOURCES): New variable.
1430 (jpeg_mod_CFLAGS): Likewise.
1431 (jpeg_mod_LDFLAGS): Likewise.
1432
1433 * video/readers/jpeg.c : New file.
1434
44023a28 14352008-01-22 Bean <bean123ch@gmail.com>
1436
1437 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
1438 there are no more items.
1439
bc2d8ac6 14402008-01-21 Robert Millan <rmh@aybabtu.com>
1441
1442 * kern/mm.c (grub_mm_init_region): Improve debug message.
1443
261bd4bc 14442008-01-21 Robert Millan <rmh@aybabtu.com>
1445
1446 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
1447 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
1448 address.
1449 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
1450 a C macro.
1451 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
1452 Indicates start of upper memory.
1453 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
1454 (generate_image): Abort when image size is big enough to corrupt
1455 upper memory.
1456
1457 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
1458 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
1459 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1460 instead of hardcoding 0xA0000.
1461 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
1462 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
1463 instead of hardcoding 0xA0000.
1464
f970b55e 14652008-01-21 Robert Millan <rmh@aybabtu.com>
1466
1467 * disk/memdisk.c (memdisk_size): New variable.
1468 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
1469 `memdisk_size'.
1470 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
1471 image to dynamic memory.
1472 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
1473 `memdisk_size'. Free memdisk block.
1474
1a8b0526 14752008-01-21 Robert Millan <rmh@aybabtu.com>
1476
1477 Fix detection of very small filesystems (like tar).
1478
1479 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
1480 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
1481 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
1482 a problem with this disk).
1483
6e9b4aab 14842008-01-21 Robert Millan <rmh@aybabtu.com>
1485
1486 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
1487 on grub_biosdisk_rw_standard() error.
1488
0d8837b2 14892008-01-21 Robert Millan <rmh@aybabtu.com>
1490
1491 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
1492 recent changes.
1493 * kern/elf.c: Likewise.
1494 * kern/ieee1275/ieee1275.c: Likewise.
1495 * kern/powerpc/ieee1275/openfw.c: Likewise.
1496 * term/ieee1275/ofconsole.c: Likewise.
1497
ffd36e34 14982008-01-21 Robert Millan <rmh@aybabtu.com>
1499
1500 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
1501
3f0093d0 1502 * include/grub/kernel.h (grub_arch_memdisk_addr)
1503 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 1504
3f0093d0 1505 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
1506 (grub_arch_memdisk_size): ... to here.
ffd36e34 1507
6c391b21 15082008-01-21 Robert Millan <rmh@aybabtu.com>
1509
1510 Mostly based on bugfix from Bean.
1511
1512 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
1513 attribute with hook() parameter.
1514 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
1515 declaration.
1516 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
1517 attribute with hook() parameter.
1518 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
1519 declaration.
1520
55a581dc 15212008-01-21 Robert Millan <rmh@aybabtu.com>
1522
1523 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
1524 (pkglib_MODULES): Add `memdisk.mod'.
1525 (memdisk_mod_SOURCES): New variable.
1526 (memdisk_mod_CFLAGS): Likewise.
1527 (memdisk_mod_LDFLAGS): Likewise.
1528
1529 * disk/memdisk.c: New file.
1530
1531 * include/grub/disk.h (grub_disk_dev_id): Add
1532 `GRUB_DISK_DEVICE_MEMDISK_ID'.
1533
1534 * include/grub/i386/pc/kernel.h
1535 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
1536 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
1537 (grub_kernel_image_size): New variable declaration.
1538 (grub_total_module_size): Likewise.
1539 (grub_memdisk_image_size): Likewise.
1540
1541 * include/grub/i386/pc/memory.h
1542 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
1543
1544 * include/grub/kernel.h: Include `<grub/symbol.h>'.
1545 (grub_arch_memdisk_addr): New variable declaration.
1546 (grub_arch_memdisk_size): Likewise.
1547
1548 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
1549 (grub_arch_memdisk_size): Likewise.
1550
1551 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
1552 (codestart): Replace hardcoded `0x100000' with
1553 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
1554
1555 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
1556 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
1557 not NULL, append the contents of the file it refers to, at the end of
1558 the compressed kernel image. Initialize `grub_memdisk_image_size'
1559 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
1560 (options): Add "memdisk"|'m' option.
1561 (main): Parse --memdisk|-m option, and pass user-provided path as
1562 parameter to generate_image().
1563
3d7f54c9 15642008-01-20 Robert Millan <rmh@aybabtu.com>
1565
1566 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
1567 grub_dprintf() calls from here ...
1568 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
1569
0bf74728 15702008-01-20 Robert Millan <rmh@aybabtu.com>
1571
1572 Fix detection of "real mode" when /options/real-mode? doesn't exist.
1573
1574 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
1575 declaration.
1576 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
1577 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
1578 `GRUB_IEEE1275_FLAG_REAL_MODE'.
1579 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
1580 property).
1581 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
1582 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
1583
33bf70a7 15842008-01-19 Robert Millan <rmh@aybabtu.com>
1585
1586 Get rid of confusing function (superceeded by
1587 `grub_ieee1275_get_integer_property')
1588 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
1589 prototype.
1590 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
1591 function.
1592 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
1593 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
1594 in native endianess from grub_ieee1275_get_integer_property().
1595
e2da7d26 15962008-01-19 Robert Millan <rmh@aybabtu.com>
1597
1598 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
1599 command after "shut-down", since implementations differ on which
1600 the command for halt is.
1601
59f1fd8d 16022008-01-19 Robert Millan <rmh@aybabtu.com>
1603
1604 * include/grub/i386/linuxbios/console.h: Add header protection.
1605 (grub_keyboard_controller_init): New function prototype.
1606 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
1607 (KEYBOARD_COMMAND_READ): Likewise.
1608 (KEYBOARD_COMMAND_WRITE): Likewise.
1609 (KEYBOARD_SCANCODE_SET1): Likewise.
1610 (grub_keyboard_controller_write): New function.
1611 (grub_keyboard_controller_read): Likewise.
1612 (grub_keyboard_controller_init): Likewise.
1613
1614 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
1615 (grub_console_init): On coreboot/LinuxBIOS, call
1616 grub_keyboard_controller_init().
1617
5f5a7c15 16182008-01-19 Robert Millan <rmh@aybabtu.com>
1619
1620 PowerPC changes provided by Pavel Roskin.
1621
1622 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
1623 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
1624 don't rely on cmain() doing it.
1625 * kern/i386/ieee1275/startup.S (_start): Store %eax in
1626 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
1627
1210e168 16282008-01-16 Robert Millan <rmh@aybabtu.com>
1629
1630 * include/grub/i386/linuxbios/memory.h
1631 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
1632 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
1633 receive `table_header' as argument. Instead, probe for it in the
1634 known memory ranges where it can be present.
1635 (grub_available_iterate): Do not pass a fixed `table_header' address
1636 to grub_linuxbios_table_iterate().
1637
3d04eab8 16382008-01-15 Robert Millan <rmh@aybabtu.com>
1639
1640 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
1641 * conf/i386-ieee1275.rmk: New file.
1642 * include/grub/i386/ieee1275/console.h: Likewise.
1643 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
1644 * include/grub/i386/ieee1275/kernel.h: Likewise.
1645 * include/grub/i386/ieee1275/time.h: Likewise.
1646 * kern/i386/ieee1275/init.c: Likewise.
1647 * kern/i386/ieee1275/startup.S: Likewise.
1648
d1bc1b73 16492008-01-15 Robert Millan <rmh@aybabtu.com>
1650
1651 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
1652 when pointers are 32-bit (but still do set it to one when they are
1653 64-bit).
1654
66a65807 16552008-01-15 Robert Millan <rmh@aybabtu.com>
1656
1657 * include/grub/ieee1275/ieee1275.h
1658 (grub_ieee1275_get_integer_property): New function prototype.
1659
1660 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
1661 (grub_ieee1275_get_integer_property): New function. Wraps around
1662 grub_ieee1275_get_property() to handle endianess.
1663
1664 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
1665 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
1666 where appropiate.
1667 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
1668 (grub_map): Likewise.
1669 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
1670
a83ccafd 16712008-01-15 Bean <bean123ch@gmail.com>
1672
1673 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
1674 (grub_script_execute_cmdline): Reset grub_errno.
1675
1676 * normal/main.c (read_config_file): Reset grub_errno.
1677
1678 * normal/parse.y (script_init): New.
1679 (script): Move function and menuentry here.
1680 (delimiter): New.
1681 (command): Add delimiter at the end of command.
1682 (commands): Adjust to match the new command.
1683 (commandblock): Remove grub_script_lexer_record_start.
1684 (menuentry): Add grub_script_lexer_record_start, use the new commands.
1685 (if): Use the new commands.
1686
1687 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
1688
df6ecfc6 16892008-01-15 Robert Millan <rmh@aybabtu.com>
1690
1691 * normal/menu.c (run_menu): Move timeout message from here ...
1692 (print_timeout): ... to here.
1693 (run_menu): Use print_timeout() once during initial draw to print
1694 the whole message, and again in every clock tick to update only
1695 the number of seconds.
1696
87ae25eb 16972008-01-15 Robert Millan <rmh@aybabtu.com>
1698
1699 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
1700 actual size of `available' from grub_ieee1275_get_property(), and
1701 restrict parsing to that bound.
1702
47bf09a4 17032008-01-15 Christian Franke <franke@computer.org>
1704
1705 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
1706 (argp_program_version): Remove variable.
1707 (argp_program_bug_address): Likewise.
1708 (options): Convert from struct argp_option to struct option.
1709 (struct arguments): Remove.
1710 (parse_opt): Remove.
1711 (usage): New function.
1712 (main): Replace struct args members by simple variables.
1713 Replace argp_parse() by getopt_long().
1714 Add switch to evaluate options.
1715 Add missing "(...)" around root_dev in prefix string.
1716
c86f1469 17172008-01-14 Robert Millan <rmh@aybabtu.com>
1718
1719 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
1720 for grub_ieee1275_exit(), in order to improve portability.
1721
e622c559 17222008-01-14 Robert Millan <rmh@aybabtu.com>
1723
1724 * util/grub.d/10_linux.in (prefix): Define.
1725 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
1726
44cb1ec8 17272008-01-13 Pavel Roskin <proski@gnu.org>
1728
1729 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
1730 grub_errno if no errors have been detected.
1731
1eb8c802 17322008-01-12 Robert Millan <rmh@aybabtu.com>
1733
1734 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
1735 (grub_util_get_dev_abstraction): New function prototype.
1736
1737 * util/getroot.c: Include `<grub/util/getroot.h>'
1738 (grub_util_get_grub_dev): Move detection of abstraction type to ...
1739 (grub_util_get_dev_abstraction): ... here (new function).
1740
1741 * util/grub-probe.c: Convert PRINT_* to an enum. Add
1742 `PRINT_ABSTRACTION'.
1743 (probe): Probe for abstraction type when requested.
1744 (main): Understand `--target=abstraction'.
1745
1746 * util/i386/efi/grub-install.in: Add abstraction module to core
1747 image when it is found to be necessary.
1748 * util/i386/pc/grub-install.in: Likewise.
1749 * util/powerpc/ieee1275/grub-install.in: Likewise.
1750
1751 * util/update-grub_lib.in (font_path): Return system path without
1752 converting to GRUB path.
1753 * util/update-grub.in: Convert system path returned by font_path()
1754 to a GRUB path. Use `grub-probe -t abstraction' to determine what
1755 abstraction module is needed for loading fonts (if any). Export
1756 that as `GRUB_PRELOAD_MODULES'.
1757 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
1758 insmod commands).
1759
52bd3de9 17602008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
1761
1762 Remove some unused code from reiserfs.
1763
1764 * fs/reiserfs.c (struct grub_reiserfs_key)
1765 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
1766 (struct grub_reiserfs_node_body): Removed.
1767 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1768 Likewise.
1769 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1770 Likewise.
1771 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1772 Likewise.
1773 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
1774 Likewise.
1775 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
1776 Likewise.
1777 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
1778 Likewise.
1779 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1780 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1781 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
1782
2f80039d 17832008-01-10 Robert Millan <rmh@aybabtu.com>
1784
1785 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
1786 Determines if a file is garbage left by packaging systems, etc.
1787 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
1788 for processing /etc/grub.d scripts.
1789 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
1790 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
1791 as a condition for processing Linux images.
1792
87888032 17932008-01-10 Pavel Roskin <proski@gnu.org>
1794
1795 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
1796 to compile reiserfs.c on PowerPC.
1797
7e54fced 17982008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 1799
1800 * kern/device.c (grub_device_iterate): Do not abort device iteration
1801 when one of the devices cannot be opened.
1802 * kern/disk.c (grub_disk_open): Do not account previous failures of
1803 unrelated functions when grub_errno is checked for.
1804
5aa541e6 18052008-01-08 Robert Millan <rmh@aybabtu.com>
1806
1807 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
1808 `! grub_linux_is_bzimage', change order of address comparison to make
1809 it more intuitive, and improve "too big zImage" error message.
1810
7076340d 18112008-01-08 Robert Millan <rmh@aybabtu.com>
1812
1813 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
1814 `$(update-grub_DATA)'.
1815 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
1816 targets.
1817
9ca70333 18182008-01-07 Robert Millan <rmh@aybabtu.com>
1819
1820 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
1821 which instruction is modified by grub-setup during installation
1822 (since it wasn't obvious by only looking at this file).
1823
38ccf575 18242008-01-07 Robert Millan <rmh@aybabtu.com>
1825
1826 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
1827 listing actual TODO items.
1828
f5db4291 18292008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1830
868967cf 1831 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
1832 correctly.
1833 (grub_reiserfs_get_key_offset): Likewise.
1834 (grub_reiserfs_set_key_offset): Likewise.
1835 (grub_reiserfs_set_key_type): Likewise.
1836 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
1837
1838 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
1839 better to remove the bitfield version completely.
1840
18412008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1842
f5db4291 1843 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
1844 allocated from the heap, due to the fshelp implementation.
1845 (grub_reiserfs_dir): Free NODE, due to the same reason.
1846
492e6d9d 18472008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
1848
1849 Mostly from Vincent Pelletier:
1850
1851 * fs/reiserfs.c: New file.
1852
1853 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
1854 (reiserfs_mod_SOURCES): New variable.
1855 (reiserfs_mod_CFLAGS): Likewise.
1856 (reiserfs_mod_LDFLAGS): Likewise.
1857
1858 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
1859 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
1860 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
1861 normal/color.c.
1862
9ce3e7c1 18632008-01-06 Robert Millan <rmh@aybabtu.com>
1864
1865 * normal/color.c: Remove `<grub/env.h>'.
1866
f3b58148 18672008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
1868
1869 * include/grub/normal.h: Include <grub/env.h>.
1870
7ac3bcfa 18712008-01-05 Robert Millan <rmh@aybabtu.com>
1872
1873 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
1874 usage example with `(hd0,1)'.
fb358190 1875 Reported by Samuel Thibault.
7ac3bcfa 1876
c8ee99d7 18772008-01-05 Robert Millan <rmh@aybabtu.com>
1878
1879 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
1880 (grub_linux_boot_zimage): Rename to ...
1881 (grub_linux_boot): ... this.
1882 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
1883 (grub_linux_boot_zimage): Conditionalize zImage copy.
1884
1885 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
1886 (grub_linux_boot_bzimage): Remove prototype.
1887 (grub_linux_boot_zimage): Rename to ...
1888 (grub_linux_boot): ... this.
1889
1890 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
1891 (grub_linux_boot): Remove function.
1892
0ece25b1 18932008-01-05 Robert Millan <rmh@aybabtu.com>
1894
1895 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
1896 (grub_env_write_color_highlight): Likewise.
1897 (grub_wait_after_message): Likewise.
1898
1899 * normal/color.c: New file.
1900
1901 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1902 (normal_mod_DEPENDENCIES): Likewise.
1903
1904 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1905 (normal_mod_DEPENDENCIES): Likewise.
1906
1907 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1908 (normal_mod_DEPENDENCIES): Likewise.
1909
1910 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
1911 (normal_mod_DEPENDENCIES): Likewise.
1912
1913 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
1914 for waiting after a message is printed.
1915 * normal/main.c (read_config_file): Likewise.
1916 (grub_normal_init): Register grub_env_write_color_normal() and
1917 grub_env_write_color_highlight() hooks. Mark `color_normal' and
1918 `color_highlight' variables as global.
1919
1920 * normal/menu.c (grub_wait_after_message): New function.
1921 (grub_color_menu_normal): New variable. Replaces ...
1922 (GRUB_COLOR_MENU_NORMAL): ... this macro.
1923 (grub_color_menu_highlight): New variable. Replaces ...
1924 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
1925 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
1926 `GRUB_TERM_COLOR_STANDARD'.
1927 (print_message): Use `grub_setcolorstate' to reload colors. Rename
1928 `normal_code' and `highlight_code' to `old_color_normal' and
1929 `old_color_highlight', respectively.
1930 (grub_menu_init_page): Update colors when drawing the menu, based on
1931 `menu_color_normal' and `menu_color_highlight' variables.
1932 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
1933 a message is printed.
1934
182dd4e5 19352008-01-05 Robert Millan <rmh@aybabtu.com>
1936
1937 * kern/env.c (grub_env_context_open): Propagate hooks for global
1938 variables to new context.
1939
1940 * kern/main.c (grub_set_root_dev): Export `root' variable.
1941
ddf8f6ad 19422008-01-05 Robert Millan <rmh@aybabtu.com>
1943
1944 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
1945 discs unconditionaly, since udev and others have options to provide
1946 them.
1947
d8b43d9b 19482008-01-05 Robert Millan <rmh@aybabtu.com>
1949
1950 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
1951
2bff2de3 19522008-01-04 Christian Franke <franke@computer.org>
1953
1954 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
1955 of eisa_mmap.
1956
97eab917 19572008-01-03 Pavel Roskin <proski@gnu.org>
1958
1959 * kern/i386/linuxbios/init.c: Put "void" to all function
1960 declarations with no arguments.
1961 * kern/powerpc/ieee1275/init.c: Likewise.
1962 * term/i386/pc/at_keyboard.c: Likewise.
1963 * term/i386/pc/vga_text.c: Likewise.
1964 * util/grub-mkdevicemap.c: Likewise.
1965
b9416d00 19662008-01-02 Robert Millan <rmh@aybabtu.com>
1967
1968 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
1969 message when loaded image is out of bounds.
1970 (grub_multiboot_load_elf64): Likewise.
1971
92695df9 19722008-01-02 Pavel Roskin <proski@gnu.org>
1973
1974 * util/grub.d/10_linux.in: Try version without ".old" when
1975 looking for initrd. It's better to use initrd from the newer
1976 kernel of the same version than no initrd at all.
1977
d98d9cad 19782008-01-01 Robert Millan <rmh@aybabtu.com>
1979
1980 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
1981
dbfdce36 19822008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
1983
1984 * include/grub/video.h: Added grub_video_unmap_color and
1985 grub_video_get_active_render_target.
1986 (grub_video_adapter): Added unmap_color and get_active_render_target.
1987
1988 * video/video.c: Added grub_video_unmap_color and
1989 grub_video_get_active_render_target.
1990 (grub_video_get_info): Changed method to accept NULL pointer as an
1991 argument to allow detection of active video adapter.
1992
1993 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
1994 grub_video_vbe_unmap_color_int.
1995 Added grub_video_vbe_unmap_color and
1996 grub_video_vbe_get_active_render_target.
1997 (grub_video_vbe_adapter): Added unmap_color and
1998 get_active_render_target.
1999
2000 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
2001 with grub_video_vbe_unmap_color_int.
2002
2003 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
2004 (DEFAULT_NORMAL_COLOR): Likewise.
2005 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
2006 (DEFAULT_FG_COLOR): Removed.
2007 (DEFAULT_BG_COLOR): Likewise.
2008 (DEFAULT_CURSOR_COLOR): Changed value.
2009 (grub_virtual_screen): Added standard_color_setting,
2010 normal_color_setting, highlight_color_setting and term_color.
2011 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
2012 (bitmap_width): Added.
2013 (bitmap_height): Likewise.
2014 (bitmap): Likewise.
2015 (set_term_color): Likewise.
2016 (grub_virtual_screen_setup): Changed to use new terminal coloring
2017 settings.
2018 (grub_gfxterm_init): Added init for bitmap.
2019 (grub_gfxterm_fini): Added destroy for bitmap.
2020 (redraw_screen_rect): Updated to use background bitmap and new
2021 terminal coloring.
2022 (scroll_up): Added optimization for case when there is no bitmap.
2023 (grub_gfxterm_cls): Fixed to use correct background color.
2024 (grub_virtual_screen_setcolorstate): Changed to use new terminal
2025 coloring.
2026 (grub_virtual_screen_setcolor): Likewise.
2027 (grub_virtual_screen_getcolor): Added.
2028 (grub_gfxterm_background_image_cmd): Likewise.
2029 (grub_video_term): Added setcolor and getcolor.
2030 (MOD_INIT): Added registration of background_image command.
2031 (MOD_TERM): Added unregistration for background_image command.
2032
c3c20931 20332007-12-30 Pavel Roskin <proski@gnu.org>
2034
2035 * loader/multiboot_loader.c: Fix multiboot command
2036 unregistration. Fix all typos in the word "multiboot".
2037
df266716 20382007-12-29 Pavel Roskin <proski@gnu.org>
94239199 2039
2040 * util/grub.d/10_linux.in: Refactor search for initrd. Add
2041 support for initrd names used in Fedora.
2042
fc6e896c 20432007-12-26 Bean <bean123ch@gmail.com>
2044
2045 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
2046 (cpio_mod_SOURCES): New variable.
2047 (cpio_mod_CFLAGS): Likewise.
2048 (cpio_mod_LDFLAGS): Likewise.
2049
2050 * fs/cpio.c: New file.
2051
2052 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
2053
2054 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2055
2056 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2057
2058 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2059
533110ad 20602007-12-25 Robert Millan <rmh@aybabtu.com>
2061
2062 * include/grub/term.h (struct grub_term): Add `getcolor' function.
2063 (grub_getcolor): New function.
2064
2065 * kern/term.c (grub_getcolor): New function.
2066 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
2067 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
2068 (print_entry): Set normal and highlight colors to
2069 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
2070 respectively, before printing and restore them to old
2071 values afterwards.
2072 (grub_menu_init_page): Likewise. Fill an additional colored space
2073 that would otherwise be left blank.
2074
2075 * term/efi/console.c (grub_console_getcolor): New function.
2076 (struct grub_console_term.getcolor): New variable.
2077 * term/i386/pc/console.c (grub_console_getcolor): New function.
2078 (struct grub_console_term.getcolor): New variable.
2079 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
2080 (struct grub_console_term.getcolor): New variable.
2081
2082 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
2083 (struct grub_console_term.setcolor): Remove variable.
2084 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
2085 (struct grub_console_term.setcolor): Remove variable.
2086 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
2087 (struct grub_console_term.setcolor): Remove variable.
2088 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
2089 (struct grub_console_term.setcolor): Remove variable.
2090
4931827f 20912007-12-25 Robert Millan <rmh@aybabtu.com>
2092
2093 * configure.ac: Search for possible unifont.hex locations, and
2094 define UNIFONT_HEX if found.
2095
2096 * Makefile.in (UNIFONT_HEX): Define variable.
2097 (DATA): Rename to ...
2098 (PKGLIB): ... this. Update all users.
2099 (PKGDATA): New variable.
2100 (pkgdata_IMAGES): Rename to ...
2101 (pkglib_IMAGES): ... this. Update all users.
2102 (pkgdata_MODULES): Rename to ...
2103 (pkglib_MODULES): ... this. Update all users.
2104 (pkgdata_PROGRAMS): Rename to ...
2105 (pkglib_PROGRAMS): ... this. Update all users.
2106 (pkgdata_DATA): Rename to ...
2107 (pkglib_DATA): ... this. Update all users.
2108 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
2109 (unicode.pff, ascii.pff): New rules.
2110 (all-local): Add `$(PKGDATA)' dependency.
2111 (install-local): Process `$(PKGDATA)'.
2112
2113 * util/update-grub_lib.in (font_path): Search for *.pff files in
2114 a few more locations, including `${pkgdata}'.
2115
57e57e31 21162007-12-23 Robert Millan <rmh@aybabtu.com>
2117
2118 Patch from Bean <bean123ch@gmail.com>:
2119 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
2120 `size'.
2121
4bc72aa9 21222007-12-21 Bean <bean123ch@gmail.com>
2123
2124 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
2125 (ntfscomp_mod_SOURCES): New variable.
2126 (ntfscomp_mod_CFLAGS): Likewise.
2127 (ntfscomp_mod_LDFLAGS): Likewise.
2128
2129 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
2130 (grub_probe_SOURCES): Likewise.
2131 (grub_emu_SOURCES): Likewise.
2132
2133 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2134 (grub_emu_SOURCES): Likewise.
2135
2136 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2137 (grub_emu_SOURCES): Likewise.
2138
2139 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
2140 (grub_emu_SOURCES): Likewise.
2141
2142 * fs/ntfs.c (grub_ntfscomp_func): New variable.
2143 (read_run_list): Renamed to grub_ntfs_read_run_list.
2144 (decomp_nextvcn): Moved to ntfscomp.c.
2145 (decomp_getch): Likewise.
2146 (decomp_get16): Likewise.
2147 (decomp_block): Likewise.
2148 (read_block): Likewise.
2149 (read_data): Partially moved to ntfscomp.c.
2150 (fixup): Change unsigned to grub_uint16_t.
2151 (read_mft): Change unsigned long to grub_uint32_t.
2152 (read_attr): Likewise.
2153 (read_data): Likewise.
2154 (read_run_data): Likewise.
2155 (read_run_list): Likewise.
2156 (read_mft): Likewise.
2157
2158 * fs/ntfscomp.c: New file.
2159
2160 * include/grub/ntfs.h: New file.
2161
af680a87 21622007-12-16 Robert Millan <rmh@aybabtu.com>
2163
2164 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
2165 IDE disk check, since Linux is known to support 20 IDE disks.
2166 Reported by Colin Watson.
2167
84be7599 21682007-12-15 Bean <bean123ch@gmail.com>
2169
2170 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
2171 (lnxboot_img_SOURCES): New variable.
2172 (lnxboot_img_ASFLAGS): Likewise.
2173 (lnxboot_img_LDFLAGS): Likewise.
2174
2175 * boot/i386/pc/lnxboot.S: New file.
2176
6af9db01 21772007-11-24 Pavel Roskin <proski@gnu.org>
2178
2179 * configure.ac: Test if '--build-id=none' is supported by the
2180 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
2181 objcopy to generate incorrect binary files (binutils
2182 2.17.50.0.18-1 as shipped by Fedora 8).
2183 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
2184 linking, so that build ID doesn't break the test.
2185
7361cfe6 21862007-11-24 Pavel Roskin <proski@gnu.org>
2187
2188 * include/grub/i386/time.h: use "void" in the argument list
2189 of grub_cpu_idle().
2190 * include/grub/powerpc/time.h: Likewise.
2191 * include/grub/sparc64/time.h: Likewise.
2192
1593e10c 21932007-11-18 Christian Franke <franke@computer.org>
2194
2195 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
2196 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
2197 This fixes the problem that function keys did not work in grub-emu.
2198
3b8db1a8 21992007-11-18 Christian Franke <franke@computer.org>
2200
2201 * disk/host.c (grub_host_open): Remove attribute unused from
2202 name parameter. Add check for "host". This fixes the problem
2203 that grub-emu does not find partitions.
2204
2e29408d 22052007-11-18 Christian Franke <franke@computer.org>
2206
2207 * util/hostfs.c (is_dir): New function.
2208 (grub_hostfs_dir): Handle missing dirent.d_type case.
2209 (grub_hostfs_read): Add missing fseek().
2210 (grub_hostfs_label): Clear label pointer. This fixes a crash
2211 of grub-emu on "ls (host)".
2212
398cd047 22132007-11-18 Christian Franke <franke@computer.org>
2214
2215 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
2216 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
2217 to 64 bit boundary by default.
2218
c405c391 22192007-11-18 Bean <bean123ch@gmail.com>
2220
2221 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
2222 (hexdump_mod_SOURCES): New variable.
2223 (hexdump_mod_CFLAGS): Likewise.
2224 (hexdump_mod_LDFLAGS): Likewise.
2225
2226 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2227
2228 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2229
2230 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2231
2232 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
2233
2234 * include/grub/hexdump.h: New file.
2235
2236 * commands/hexdump.c: New file.
2237
5cced7fd 22382007-11-10 Robert Millan <rmh@aybabtu.com>
2239
2240 * commands/i386/pc/play.c (beep_off): Switch order of arguments
2241 in grub_outb() calls.
2242 (beep_on): Likewise.
2243
8b714eb0 22442007-11-10 Christian Franke <franke@computer.org>
2245
2246 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
2247 (grub_menu_run): Likewise.
2248
ce0f1839 22492007-11-10 Robert Millan <rmh@aybabtu.com>
2250
2251 * include/grub/i386/efi/machine.h: New file.
2252 * include/grub/i386/linuxbios/machine.h: Likewise.
2253 * include/grub/i386/pc/machine.h: Likewise.
2254 * include/grub/powerpc/ieee1275/machine.h: Likewise.
2255 * include/grub/sparc64/ieee1275/machine.h: Likewise.
2256
2257 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
2258 (serial_hw_io_addr): New variable.
2259 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
2260 instead of `(unsigned short *) 0x400'.
2261
270c237d 22622007-11-10 Bean <bean123ch@gmail.com>
2263
2264 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
2265
a87783bf 22662007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2267
2268 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
2269 (vga_mod_SOURCES): Added.
2270 (vga_mod_CFLAGS): Likewise.
2271 (vga_mod_LDFLAGS): Likewise.
2272
2273 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
2274 grub_outb() calls.
2275 (set_map_mask): Likewise.
2276 (set_read_map): Likewise.
2277 (set_read_address): Likewise.
2278 (vga_font): Removed variable.
2279 (get_vga_glyph): Removed function.
2280 (invalidate_char): Likewise.
2281 (write_char): Changed to use grub_font_get_glyph() for font
2282 information.
2283 (grub_vga_putchar): Likewise.
2284 (grub_vga_getcharwidth): Likewise.
2285
6433b448 22862007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
2287
2288 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
2289 flags.
2290 (pxeboot_img_LDFLAGS): Likewise.
2291 (diskboot_img_LDFLAGS): Likewise.
2292 (kernel_img_LDFLAGS): Likewise.
2293
49178511 22942007-11-06 Robert Millan <rmh@aybabtu.com>
2295
2296 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
2297 in grub_outb() calls.
2298 (serial_hw_init): Likewise.
2299
53b052de 23002007-11-05 Robert Millan <rmh@aybabtu.com>
2301
2302 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
2303 spaces. Skip non-regular files.
2304
5ab33bba 23052007-11-05 Robert Millan <rmh@aybabtu.com>
2306
2307 * kern/disk.c (grub_disk_firmware_fini)
2308 (grub_disk_firmware_is_tainted): New variables.
2309
2310 * include/grub/disk.h (grub_disk_firmware_fini)
2311 (grub_disk_firmware_is_tainted): Likewise.
2312
2313 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
2314 (grub_disk_biosdisk_fini): ... to here.
2315 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
2316 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
2317 is set. Register grub_disk_biosdisk_fini() in
2318 `grub_disk_firmware_fini'.
2319
2320 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
2321 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
2322 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
2323 to finish existing firmware disk interface.
2324
2325 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
2326 (ata_mod_SOURCES): New variable.
2327 (ata_mod_CFLAGS): Likewise.
2328 (ata_mod_LDFLAGS): Likewise.
2329
0149ab7c 23302007-11-05 Robert Millan <rmh@aybabtu.com>
2331
2332 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
2333 (grub_ata_wait): Reimplement using grub_millisleep().
2334
2335 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
2336 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
2337
be7ac41e 23382007-11-03 Marco Gerards <marco@gnu.org>
2339
2340 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
2341 (CRTC_ADDR_PORT): New macro.
2342 (CRTC_DATA_PORT): Likewise.
2343 (CRTC_CURSOR): Likewise.
2344 (CRTC_CURSOR_ADDR_HIGH): Likewise.
2345 (CRTC_CURSOR_ADDR_LOW): Likewise.
2346 (update_cursor): New function.
2347 (grub_console_real_putchar): Call `update_cursor'.
2348 (grub_console_gotoxy): Likewise.
2349 (grub_console_cls): Set the default color when clearing the
2350 screen.
2351 (grub_console_setcursor): Implemented.
2352
bb06ab2e 23532007-11-03 Marco Gerards <marco@gnu.org>
2354
2355 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
2356 become activate.
2357 (grub_ata_pio_write): Likewise.
2358
2359 (grub_atapi_identify): Wait after issuing an ATA command.
2360 (grub_atapi_packet): Likewise.
2361 (grub_ata_identify): Likewise.
2362 (grub_ata_readwrite): Likewise.
2363
cf8f780b 23642007-11-03 Marco Gerards <marco@gnu.org>
2365
2366 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
2367 (grub_ata_pio_write): Likewise.
2368 (grub_ata_readwrite): Use `grub_error', instead of
2369 returning `grub_errno'.
2370
ed649e54 23712007-11-03 Marco Gerards <marco@gnu.org>
2372
2373 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
2374 grub_ata_pio_write once for every single sector, instead of for
2375 multiple sectors.
2376
ca25d8f0 23772007-10-31 Robert Millan <rmh@aybabtu.com>
2378
2379 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
2380
2381 * conf/i386-linuxbios.rmk: New file.
2382
2383 * kern/i386/pc/hardware.c: Likewise.
2384 * term/i386/pc/at_keyboard.c: Likewise.
2385 * term/i386/pc/vga_text.c: Likewise.
2386
2387 * include/grub/i386/linuxbios/boot.h: Likewise.
2388 * include/grub/i386/linuxbios/console.h: Likewise.
2389 * include/grub/i386/linuxbios/init.h: Likewise.
2390 * include/grub/i386/linuxbios/kernel.h: Likewise.
2391 * include/grub/i386/linuxbios/loader.h: Likewise.
2392 * include/grub/i386/linuxbios/memory.h: Likewise.
2393 * include/grub/i386/linuxbios/serial.h: Likewise.
2394 * include/grub/i386/linuxbios/time.h: Likewise.
2395
2396 * kern/i386/linuxbios/init.c: Likewise.
2397 * kern/i386/linuxbios/startup.S: Likewise.
2398 * kern/i386/linuxbios/table.c: Likewise.
2399
e911ecc1 24002007-10-31 Marco Gerards <marco@gnu.org>
2401
2402 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
2403 (ata_mod_SOURCES): New variable.
2404 (ata_mod_CFLAGS): Likewise.
2405 (ata_mod_LDFLAGS): Likewise.
2406
2407 * disk/ata.c: New file.
2408
2409 * include/grub/disk.h (grub_disk_dev_id): Add
2410 `GRUB_DISK_DEV_ATA_ID'.
2411
7f66d0e0 24122007-10-31 Robert Millan <rmh@aybabtu.com>
2413
2414 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
2415 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
2416
2417 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
2418 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
2419
2420 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
2421 `<grub/types.h>'.
2422
2423 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
2424
5cd7dd46 24252007-10-27 Robert Millan <rmh@aybabtu.com>
2426
3236ca65 2427 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 2428
2ebfc90f 24292007-10-22 Robert Millan <rmh@aybabtu.com>
2430
2431 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
2432 `"../realmode.S"'.
2433 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
2434
73fcb0f3 24352007-10-22 Robert Millan <rmh@aybabtu.com>
2436
2437 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
2438 (pkgdata_MODULES): Add `biosdisk.mod'.
2439 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
2440 variables.
2441
2442 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
2443 (grub_biosdisk_init): Replace with ...
2444 (GRUB_MOD_INIT(biosdisk)): ... this.
2445 (grub_biosdisk_fini): Replace with ...
2446 (GRUB_MOD_FINI(biosdisk)): ... this.
2447
2448 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
2449 (grub_machine_init): Remove call to grub_biosdisk_init().
2450 (grub_machine_fini): Remove call to grub_machine_fini().
2451
2452 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
2453
3381d274 24542007-10-22 Robert Millan <rmh@aybabtu.com>
2455
2456 * include/grub/time.h: New file.
2457 * include/grub/i386/time.h: Likewise.
2458 * include/grub/powerpc/time.h: Likewise.
2459 * include/grub/sparc64/time.h: Likewise.
2460
2461 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
2462 instances to ...
2463 (KERNEL_MACHINE_TIME_HEADER): ... this.
2464 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2465 instances to ...
2466 (KERNEL_MACHINE_TIME_HEADER): ... this.
2467 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
2468 instances to ...
2469 (KERNEL_MACHINE_TIME_HEADER): ... this.
2470
2471 * kern/i386/efi/init.c: Include `<grub/time.h>'.
2472 (grub_millisleep): New function.
2473 * kern/i386/pc/init.c: Include `<grub/time.h>'.
2474 (grub_millisleep): New function.
2475 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
2476 Remove `grub/machine/time.h' include.
2477 (grub_millisleep): New function.
2478 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
2479 Remove `grub/machine/time.h' include.
2480 (grub_millisleep): New function.
2481
2482 * include/grub/misc.h (grub_div_roundup): New function.
2483
2484 * kern/misc.c: Include `<grub/time.h>'.
2485 (grub_millisleep_generic): New function.
2486
2487 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
2488 Add `time.h'.
2489 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
2490 Add `time.h'.
2491 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
2492 `machine/time.h'. Add `time.h'.
2493 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2494
a39a0312 24952007-10-21 Robert Millan <rmh@aybabtu.com>
2496
2497 * include/grub/misc.h (grub_max): New function.
2498
2aad70e2 24992007-10-21 Robert Millan <rmh@aybabtu.com>
2500
2501 * util/misc.c (grub_util_info): Call fflush() before returning.
2502
54b71c4b 25032007-10-20 Robert Millan <rmh@aybabtu.com>
2504
2505 * genmk.rb (Image): Copy `extra_flags' from here ...
2506 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
2507
2508 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
2509 to `argc' and `args' arguments.
2510
a979f513 25112007-10-17 Robert Millan <rmh@aybabtu.com>
2512
2513 * kern/i386/loader.S: New file.
2514
2515 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
2516 * kern/i386/loader.S (grub_linux_prot_size)... to here.
2517 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
2518 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
2519 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
2520 * kern/i386/loader.S (grub_linux_real_addr)... to here.
2521 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
2522 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
2523 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
2524 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
2525 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
2526 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
2527 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
2528 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
2529
2530 * kern/i386/realmode.S: New file.
2531
2532 * kern/i386/pc/startup.S (protstack): Moved from here ...
2533 * kern/i386/realmode.S (protstack)... to here.
2534 * kern/i386/pc/startup.S (gdt): Moved from here ...
2535 * kern/i386/realmode.S (gdt)... to here.
2536 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
2537 * kern/i386/realmode.S (prot_to_real)... to here.
2538
2539 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
2540 `kern/i386/realmode.S'.
2541
825fc8fd 25422007-10-17 Robert Millan <rmh@aybabtu.com>
2543
2544 * include/grub/i386/loader.h: New file.
2545
2546 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
2547 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2548 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2549 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2550 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
2551 * include/grub/i386/loader.h (grub_linux_prot_size)
2552 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
2553 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
2554 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
2555 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
2556
2557 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
2558
e179b2f4 25592007-10-15 Robert Millan <rmh@aybabtu.com>
2560
2561 * normal/misc.c (grub_normal_print_device_info): Do not probe for
2562 filesystem when dev->disk is unset.
2563 Do probe for filesystem even when dev->disk->has_partitions is set.
2564 In case a filesystem is found, always report it.
2565 In case it isn't, if dev->disk->has_partitions is set, report that
2566 a partition table was found instead of reporting that no filesystem
2567 could be identified.
2568
5db82af6 25692007-10-12 Robert Millan <rmh@aybabtu.com>
2570
2571 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
2572 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
2573
68f6ac74 2574 * include/grub/types.h (grub_host_to_target16): New macro.
2575 (grub_host_to_target32): Likewise.
2576 (grub_host_to_target64): Likewise.
2577 (grub_target_to_host16): Likewise.
2578 (grub_target_to_host32): Likewise.
2579 (grub_target_to_host64): Likewise.
5db82af6 2580
2581 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2582 Renamed from to ...
2583 (GRUB_MOD_ALIGN): ...this. Update all users.
2584
68f6ac74 2585 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
2586 grub_host_to_target32.
2587 Replace grub_be_to_cpu32 with grub_target_to_host32.
2588 (load_modules): Likewise.
2589 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
2590 Replace grub_be_to_cpu32 with grub_target_to_host32.
2591 Replace grub_cpu_to_be16 with grub_host_to_target16.
2592 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 2593
3cf497cc 25942007-10-12 Robert Millan <rmh@aybabtu.com>
2595
2596 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
2597 * util/elf/grub-mkimage.c: ... here.
2598
2599 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
2600 `util/powerpc/ieee1275/grub-mkimage.c'.
2601
c8cc3692 26022007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 2603
c8cc3692 2604 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
2605 and make it easier to figure out.
2606 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
2607 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
2608 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
2609 leave us with less than HEAP_MIN_SIZE total heap.
2610 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 2611
5c58b791 26122007-10-03 Robert Millan <rmh@aybabtu.com>
2613
2614 * include/grub/i386/io.h: New file.
2615 * commands/i386/pc/play.c (inb): Removed.
2616 (outb): Removed.
2617 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2618 with grub_outb().
afcd2ef8 2619 * term/i386/pc/serial.c (inb): Removed.
2620 (outb): Removed.
2621 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2622 with grub_outb().
2623 * term/i386/pc/vga.c (inb): Removed.
2624 (outb): Removed.
2625 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
2626 with grub_outb().
5c58b791 2627
1a477ed6 26282007-10-02 Robert Millan <rmh@aybabtu.com>
2629
2630 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
2631 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2632 Reported by Marcin Kurek.
2633
6b5d80fa 26342007-09-07 Robert Millan <rmh@aybabtu.com>
2635
2636 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
2637 SmartFirmware version updates (as released by Sven Luther), and avoid
2638 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
2639 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
2640 known broken.
2641
5618afbf 26422007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2643
2644 From Hitoshi Ozeki:
2645 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
2646 when merging two regions.
2647
6139dcd9 26482007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2649
508e39ee 2650 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
2651 * normal/completion.c (grub_normal_do_completion): Likewise.
2652 Reported by Hitoshi Ozeki.
2653
26542007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2655
6139dcd9 2656 Do not use devices at boot in chainloading.
2657
2658 * loader/i386/pc/chainloader.c (boot_drive): New variable.
2659 (boot_part_addr): Likewise.
2660 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
2661 with BOOT_DRIVE and BOOT_PART_ADDR.
2662 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
2663 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
2664
38da6516 26652007-08-29 Robert Millan <rmh@aybabtu.com>
2666
2667 Patch from Simon Peter <dn.tlp@gmx.net>:
2668 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
2669 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
2670 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
2671 util/i386/pc/grub-setup.c_DEPENDENCIES.
2672 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
2673 util/grub-probe.c_DEPENDENCIES.
2674 * conf/powerpc-ieee1275.rmk: Likewise.
2675
29d0928c 26762007-08-28 Robert Millan <rmh@aybabtu.com>
2677
2678 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
2679 to tell grub-mkdevicemap how to name devices.
2680 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
2681 feature).
2682
2683 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
2684 util/i386/get_disk_name.c.
2685 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
2686 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
2687 util/ieee1275/get_disk_name.c.
2688
2689 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
2690
2691 * DISTLIST: Add util/i386/get_disk_name.c and
2692 util/ieee1275/get_disk_name.c.
2693
2694 * util/grub-mkdevicemap.c: Replace device naming logic with
2695 grub_util_get_disk_name() calls.
2696
5a0d3cca 26972007-08-20 Robert Millan <rmh@aybabtu.com>
2698
2699 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
2700 (so that it works for both plural and singular quantities).
2701
8b72db2f 27022007-08-05 Robert Millan <rmh@aybabtu.com>
2703
2704 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
2705 so that [xz] isn't taken into account when determining order.
2706
352466bf 27072007-08-02 Marco Gerards <marco@gnu.org>
2708
2709 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
2710 `include/multiboot2.h', `include/grub/elfload.h',
2711 `include/multiboot.h', `include/grub/multiboot.h',
2712 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
2713 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
2714 `kern/elf.c', `loader/multiboot_loader.c',
2715 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
2716 `loader/i386/pc/multiboot2.c',
2717 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
2718 `util/i386/pc/grub-mkrescue.in'. Remove
2719 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
2720 `include/grub/i386/pc/util/biosdisk.h' and
2721 `include/grub/powerpc/ieee1275/multiboot.h'.
2722
8f096014 27232007-08-02 Bean <bean123ch@gmail.com>
2724
2725 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
2726 (ntfs_mod_SOURCES): New variable.
2727 (ntfs_mod_CFLAGS): Likewise.
2728 (ntfs_mod_LDFLAGS): Likewise.
2729
2730 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
2731 (grub_probe_SOURCES): Likewise.
2732 (grub_emu_SOURCES): Likewise.
2733
2734 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2735 (grub_emu_SOURCES): Likewise.
2736
2737 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
2738 (grub_emu_SOURCES): Likewise.
2739
2740 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
2741
2742 * fs/ntfs.c: New file.
2743
9959f7db 27442007-08-02 Bean <bean123ch@gmail.com>
2745
2746 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
2747
2748 * file.h (grub_file): Likewise.
2749
2750 * fshelp.h (grub_fshelp_read_file): Likewise.
2751
2752 * util/i386/pc/grub-setup.c (setup): Likewise.
2753 (save_first_sector): Likewise.
2754 (save_blocklists): Likewise.
2755
2756 * fs/affs.c (grub_affs_read_file): Likewise.
2757
2758 * fs/ext2.c (grub_ext2_read_file): Likewise.
2759
2760 * fs/fat.c (grub_fat_read_data): Likewise.
2761
2762 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
2763
2764 * fs/hfs.c (grub_hfs_read_file): Likewise.
2765
2766 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2767
2768 * fs/jfs.c (grub_jfs_read_file): Likewise.
2769
2770 * fs/minix.c (grub_minix_read_file): Likewise.
2771
2772 * fs/sfs.c (grub_sfs_read_file): Likewise.
2773
2774 * fs/ufs.c (grub_ufs_read_file): Likewise.
2775
2776 * fs/xfs.c (grub_xfs_read_file): Likewise.
2777
2778 * command/blocklist.c (read_blocklist): Likewise.
2779 (print_blocklist): Likewise.
2780
0a203f83 27812007-08-02 Marco Gerards <marco@gnu.org>
2782
2783 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
2784 `util/hostfs.c'.
2785
2786 * disk/host.c: New file.
2787
2788 * util/hostfs.c: Likewise.
2789
2790 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
2791 return `GRUB_ERR_BAD_FS'.
2792 * fs/sfs.c (grub_sfs_mount): Likewise.
2793 * fs/xfs.c (grub_xfs_mount): Likewise.
2794
2795 * include/grub/disk.h (enum grub_disk_dev_id): Add
2796 `GRUB_DISK_DEVICE_HOST_ID'.
2797
2798 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
2799
e5dfe777 28002007-07-24 Jerone Young <jerone@gmail.com>
2801
2802 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
2803 modules for compilation.
2804 * conf/powerpc-ieee1275.rmk: Likewise.
2805
2806 * include/multiboot.h: Move multiboot definitions to one file. Rename
2807 many definitions to not get grub specific.
2808 * include/multiboot2.h: Create header with multiboot 2 definitions.
2809 * include/grub/multiboot.h: Header for grub specific function
2810 prototypes and definitions.
2811 * include/grub/multiboot2.h: Likewise.
2812 * include/grub/multiboot_loader.h: Likewise.
2813 * include/grub/i386/pc/multiboot.h: Removed.
2814 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
2815
2816 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
2817 and 2 to allow for one multiboot and module commands.
2818 * loader/multiboot2.c: Add multiboot2 functionality.
2819 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
2820 and definition names.
2821 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
2822 2 functions.
2823 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
2824 ieee1275 specific multiboot2 code.
2825
2826 * kern/i386/pc/startup.S: Change headers and definition names for
2827 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
2828
daf0f0ba 28292007-07-22 Robert Millan <rmh@aybabtu.com>
2830
2831 * geninitheader.sh: Process file specified in first parameter rather
2832 than hardcoding grub_modules_init.lst.
2833 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
2834 than hardcoding grub_modules_init.h.
2835
2836 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
2837 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
2838 grub_probe_init.[ch] and grub_setup_init.[ch].
2839
2840 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
2841 grub_modules_init.h with grub_emu_init.h.
2842 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
2843 grub_probe_init.[ch] files.
2844 * conf/i386-efi.rmk: Likewise.
2845 * conf/i386-pc.rmk: Likewise.
2846 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
2847 grub_setup_init.[ch] files.
2848
2849 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
2850 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
2851 to initialize modules rather than a list of hardcoded functions.
2852 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
2853 grub_init_all() to initialize modules rather than a list of hardcoded
2854 functions.
2855
54cdc1cc 28562007-07-22 Robert Millan <rmh@aybabtu.com>
2857
2858 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
2859 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
2860
ad0686cc 28612007-07-22 Robert Millan <rmh@aybabtu.com>
2862
2863 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
2864 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
2865 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
2866 flag when running on SmartFirmware.
2867 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
2868 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
2869 was set.
2870
2871 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2872 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
2873 rather than decreasing it.
2874
2875 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
2876 there's not enough space to do it, fail in the same way as when it
2877 can't be done because there are no partitions.
2878
2879 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
2880 when nvsetenv failed.
2881
969c02ec 28822007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2883
2884 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
2885 because this rule is automatically generated.
2886 (grub-mkrescue): Removed for the same reason as above.
2887
5a79f472 28882007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
2889
2890 Migrate to GNU General Public License Version 3.
2891
2892 * COPYING: Replaced with the plain text version of GPLv3.
2893
2894 * config.guess: Updated from gnulib.
2895 * config.sub: Likewise.
2896
2897 * geninit.sh: Output a GPLv3 copyright notice.
2898 * geninitheader.sh: Likewise.
2899 * genmodsrc.sh: Likewise.
2900 * gensymlist.sh.in: Likewise.
2901
2902 * boot/i386/pc/boot.S: Upgraded to GPLv3.
2903 * boot/i386/pc/diskboot.S: Likewise.
2904 * boot/i386/pc/pxeboot.S: Likewise.
2905 * commands/blocklist.c: Likewise.
2906 * commands/boot.c: Likewise.
2907 * commands/cat.c: Likewise.
2908 * commands/cmp.c: Likewise.
2909 * commands/configfile.c: Likewise.
2910 * commands/echo.c: Likewise.
2911 * commands/help.c: Likewise.
2912 * commands/ls.c: Likewise.
2913 * commands/search.c: Likewise.
2914 * commands/terminal.c: Likewise.
2915 * commands/test.c: Likewise.
2916 * commands/videotest.c: Likewise.
2917 * commands/i386/cpuid.c: Likewise.
2918 * commands/i386/pc/halt.c: Likewise.
2919 * commands/i386/pc/play.c: Likewise.
2920 * commands/i386/pc/reboot.c: Likewise.
2921 * commands/i386/pc/vbeinfo.c: Likewise.
2922 * commands/i386/pc/vbetest.c: Likewise.
2923 * commands/ieee1275/halt.c: Likewise.
2924 * commands/ieee1275/reboot.c: Likewise.
2925 * commands/ieee1275/suspend.c: Likewise.
2926 * disk/loopback.c: Likewise.
2927 * disk/lvm.c: Likewise.
2928 * disk/raid.c: Likewise.
2929 * disk/efi/efidisk.c: Likewise.
2930 * disk/i386/pc/biosdisk.c: Likewise.
2931 * disk/ieee1275/ofdisk.c: Likewise.
2932 * font/manager.c: Likewise.
2933 * fs/affs.c: Likewise.
2934 * fs/ext2.c: Likewise.
2935 * fs/fat.c: Likewise.
2936 * fs/fshelp.c: Likewise.
2937 * fs/hfs.c: Likewise.
2938 * fs/hfsplus.c: Likewise.
2939 * fs/iso9660.c: Likewise.
2940 * fs/jfs.c: Likewise.
2941 * fs/minix.c: Likewise.
2942 * fs/sfs.c: Likewise.
2943 * fs/ufs.c: Likewise.
2944 * fs/xfs.c: Likewise.
2945 * hello/hello.c: Likewise.
2946 * include/grub/acorn_filecore.h: Likewise.
2947 * include/grub/arg.h: Likewise.
2948 * include/grub/bitmap.h: Likewise.
2949 * include/grub/boot.h: Likewise.
2950 * include/grub/cache.h: Likewise.
2951 * include/grub/device.h: Likewise.
2952 * include/grub/disk.h: Likewise.
2953 * include/grub/dl.h: Likewise.
2954 * include/grub/elfload.h: Likewise.
2955 * include/grub/env.h: Likewise.
2956 * include/grub/err.h: Likewise.
2957 * include/grub/file.h: Likewise.
2958 * include/grub/font.h: Likewise.
2959 * include/grub/fs.h: Likewise.
2960 * include/grub/fshelp.h: Likewise.
2961 * include/grub/gzio.h: Likewise.
2962 * include/grub/hfs.h: Likewise.
2963 * include/grub/kernel.h: Likewise.
2964 * include/grub/loader.h: Likewise.
2965 * include/grub/lvm.h: Likewise.
2966 * include/grub/misc.h: Likewise.
2967 * include/grub/mm.h: Likewise.
2968 * include/grub/net.h: Likewise.
2969 * include/grub/normal.h: Likewise.
2970 * include/grub/parser.h: Likewise.
2971 * include/grub/partition.h: Likewise.
2972 * include/grub/pc_partition.h: Likewise.
2973 * include/grub/raid.h: Likewise.
2974 * include/grub/rescue.h: Likewise.
2975 * include/grub/script.h: Likewise.
2976 * include/grub/setjmp.h: Likewise.
2977 * include/grub/symbol.h: Likewise.
2978 * include/grub/term.h: Likewise.
2979 * include/grub/terminfo.h: Likewise.
2980 * include/grub/tparm.h: Likewise.
2981 * include/grub/types.h: Likewise.
2982 * include/grub/video.h: Likewise.
2983 * include/grub/efi/api.h: Likewise.
2984 * include/grub/efi/chainloader.h: Likewise.
2985 * include/grub/efi/console.h: Likewise.
2986 * include/grub/efi/console_control.h: Likewise.
2987 * include/grub/efi/disk.h: Likewise.
2988 * include/grub/efi/efi.h: Likewise.
2989 * include/grub/efi/pe32.h: Likewise.
2990 * include/grub/efi/time.h: Likewise.
2991 * include/grub/i386/linux.h: Likewise.
2992 * include/grub/i386/setjmp.h: Likewise.
2993 * include/grub/i386/types.h: Likewise.
2994 * include/grub/i386/efi/kernel.h: Likewise.
2995 * include/grub/i386/efi/loader.h: Likewise.
2996 * include/grub/i386/efi/time.h: Likewise.
2997 * include/grub/i386/pc/biosdisk.h: Likewise.
2998 * include/grub/i386/pc/boot.h: Likewise.
2999 * include/grub/i386/pc/chainloader.h: Likewise.
3000 * include/grub/i386/pc/console.h: Likewise.
3001 * include/grub/i386/pc/init.h: Likewise.
3002 * include/grub/i386/pc/kernel.h: Likewise.
3003 * include/grub/i386/pc/loader.h: Likewise.
3004 * include/grub/i386/pc/memory.h: Likewise.
3005 * include/grub/i386/pc/multiboot.h: Likewise.
3006 * include/grub/i386/pc/serial.h: Likewise.
3007 * include/grub/i386/pc/time.h: Likewise.
3008 * include/grub/i386/pc/vbe.h: Likewise.
3009 * include/grub/i386/pc/vbeblit.h: Likewise.
3010 * include/grub/i386/pc/vbefill.h: Likewise.
3011 * include/grub/i386/pc/vbeutil.h: Likewise.
3012 * include/grub/i386/pc/vga.h: Likewise.
3013 * include/grub/ieee1275/ieee1275.h: Likewise.
3014 * include/grub/ieee1275/ofdisk.h: Likewise.
3015 * include/grub/powerpc/libgcc.h: Likewise.
3016 * include/grub/powerpc/setjmp.h: Likewise.
3017 * include/grub/powerpc/types.h: Likewise.
3018 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
3019 * include/grub/powerpc/ieee1275/console.h: Likewise.
3020 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
3021 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
3022 * include/grub/powerpc/ieee1275/loader.h: Likewise.
3023 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
3024 * include/grub/powerpc/ieee1275/time.h: Likewise.
3025 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
3026 * include/grub/sparc64/libgcc.h: Likewise.
3027 * include/grub/sparc64/setjmp.h: Likewise.
3028 * include/grub/sparc64/types.h: Likewise.
3029 * include/grub/sparc64/ieee1275/console.h: Likewise.
3030 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
3031 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
3032 * include/grub/sparc64/ieee1275/time.h: Likewise.
3033 * include/grub/util/biosdisk.h: Likewise.
3034 * include/grub/util/getroot.h: Likewise.
3035 * include/grub/util/lvm.h: Likewise.
3036 * include/grub/util/misc.h: Likewise.
3037 * include/grub/util/raid.h: Likewise.
3038 * include/grub/util/resolve.h: Likewise.
3039 * io/gzio.c: Likewise.
3040 * kern/device.c: Likewise.
3041 * kern/disk.c: Likewise.
3042 * kern/dl.c: Likewise.
3043 * kern/elf.c: Likewise.
3044 * kern/env.c: Likewise.
3045 * kern/err.c: Likewise.
3046 * kern/file.c: Likewise.
3047 * kern/fs.c: Likewise.
3048 * kern/loader.c: Likewise.
3049 * kern/main.c: Likewise.
3050 * kern/misc.c: Likewise.
3051 * kern/mm.c: Likewise.
3052 * kern/parser.c: Likewise.
3053 * kern/partition.c: Likewise.
3054 * kern/rescue.c: Likewise.
3055 * kern/term.c: Likewise.
3056 * kern/efi/efi.c: Likewise.
3057 * kern/efi/init.c: Likewise.
3058 * kern/efi/mm.c: Likewise.
3059 * kern/i386/dl.c: Likewise.
3060 * kern/i386/efi/init.c: Likewise.
3061 * kern/i386/efi/startup.S: Likewise.
3062 * kern/i386/pc/init.c: Likewise.
3063 * kern/i386/pc/lzo1x.S: Likewise.
3064 * kern/i386/pc/startup.S: Likewise.
3065 * kern/ieee1275/ieee1275.c: Likewise.
3066 * kern/powerpc/cache.S: Likewise.
3067 * kern/powerpc/dl.c: Likewise.
3068 * kern/powerpc/ieee1275/cmain.c: Likewise.
3069 * kern/powerpc/ieee1275/crt0.S: Likewise.
3070 * kern/powerpc/ieee1275/init.c: Likewise.
3071 * kern/powerpc/ieee1275/openfw.c: Likewise.
3072 * kern/sparc64/cache.S: Likewise.
3073 * kern/sparc64/dl.c: Likewise.
3074 * kern/sparc64/ieee1275/init.c: Likewise.
3075 * kern/sparc64/ieee1275/openfw.c: Likewise.
3076 * loader/efi/chainloader.c: Likewise.
3077 * loader/efi/chainloader_normal.c: Likewise.
3078 * loader/i386/efi/linux.c: Likewise.
3079 * loader/i386/efi/linux_normal.c: Likewise.
3080 * loader/i386/pc/chainloader.c: Likewise.
3081 * loader/i386/pc/chainloader_normal.c: Likewise.
3082 * loader/i386/pc/linux.c: Likewise.
3083 * loader/i386/pc/linux_normal.c: Likewise.
3084 * loader/i386/pc/multiboot.c: Likewise.
3085 * loader/i386/pc/multiboot_normal.c: Likewise.
3086 * loader/powerpc/ieee1275/linux.c: Likewise.
3087 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3088 * normal/arg.c: Likewise.
3089 * normal/cmdline.c: Likewise.
3090 * normal/command.c: Likewise.
3091 * normal/completion.c: Likewise.
3092 * normal/execute.c: Likewise.
3093 * normal/function.c: Likewise.
3094 * normal/lexer.c: Likewise.
3095 * normal/main.c: Likewise.
3096 * normal/menu.c: Likewise.
3097 * normal/menu_entry.c: Likewise.
3098 * normal/misc.c: Likewise.
3099 * normal/parser.y: Likewise.
3100 * normal/script.c: Likewise.
3101 * normal/i386/setjmp.S: Likewise.
3102 * normal/powerpc/setjmp.S: Likewise.
3103 * normal/sparc64/setjmp.S: Likewise.
3104 * partmap/acorn.c: Likewise.
3105 * partmap/amiga.c: Likewise.
3106 * partmap/apple.c: Likewise.
3107 * partmap/gpt.c: Likewise.
3108 * partmap/pc.c: Likewise.
3109 * partmap/sun.c: Likewise.
3110 * term/gfxterm.c: Likewise.
3111 * term/terminfo.c: Likewise.
3112 * term/efi/console.c: Likewise.
3113 * term/i386/pc/console.c: Likewise.
3114 * term/i386/pc/serial.c: Likewise.
3115 * term/i386/pc/vesafb.c: Likewise.
3116 * term/i386/pc/vga.c: Likewise.
3117 * term/ieee1275/ofconsole.c: Likewise.
3118 * util/biosdisk.c: Likewise.
3119 * util/console.c: Likewise.
3120 * util/genmoddep.c: Likewise.
3121 * util/getroot.c: Likewise.
3122 * util/grub-emu.c: Likewise.
3123 * util/grub-mkdevicemap.c: Likewise.
3124 * util/grub-probe.c: Likewise.
3125 * util/lvm.c: Likewise.
3126 * util/misc.c: Likewise.
3127 * util/raid.c: Likewise.
3128 * util/resolve.c: Likewise.
3129 * util/update-grub.in: Likewise.
3130 * util/update-grub_lib.in: Likewise.
3131 * util/grub.d/00_header.in: Likewise.
3132 * util/grub.d/10_hurd.in: Likewise.
3133 * util/grub.d/10_linux.in: Likewise.
3134 * util/i386/efi/grub-install.in: Likewise.
3135 * util/i386/efi/grub-mkimage.c: Likewise.
3136 * util/i386/pc/grub-install.in: Likewise.
3137 * util/i386/pc/grub-mkimage.c: Likewise.
3138 * util/i386/pc/grub-mkrescue.in: Likewise.
3139 * util/i386/pc/grub-setup.c: Likewise.
3140 * util/i386/pc/misc.c: Likewise.
3141 * util/powerpc/ieee1275/grub-install.in: Likewise.
3142 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
3143 * util/powerpc/ieee1275/misc.c: Likewise.
3144 * video/bitmap.c: Likewise.
3145 * video/video.c: Likewise.
3146 * video/i386/pc/vbe.c: Likewise.
3147 * video/i386/pc/vbeblit.c: Likewise.
3148 * video/i386/pc/vbefill.c: Likewise.
3149 * video/i386/pc/vbeutil.c: Likewise.
3150 * video/readers/tga.c: Likewise.
3151
3572d015 31522007-07-02 Robert Millan <rmh@aybabtu.com>
3153
3154 * conf/i386-efi.rmk: Replace obsolete reference to
3155 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
3156 with util/getroot.c.
3157 * conf/powerpc-ieee1275.rmk: Likewise.
3158 * conf/sparc64-ieee1275.rmk: Likewise.
3159
3160 * util/grub-emu.c (main): Fix unchecked pointer handling.
3161
2c2a681b 31622007-07-02 Robert Millan <rmh@aybabtu.com>
3163
3164 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
3165 invocation to fail, in order to support partition-less media.
3166
3167 * util/i386/pc/grub-install.in: Likewise.
3168
3169 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
3170 which fs or partmap modules are needed (akin to its sister scripts).
3171
3172 Also use grub-probe to get rid of unportable /proc/mounts check.
3173
3174 Print the same informational message that the other scripts do, before
3175 exitting.
3176
6193defe 31772007-06-23 Robert Millan <rmh@aybabtu.com>
3178
3179 * util/update-grub_lib.in (font_path): New function. Determine wether
3180 a font file can be found and, if so, echo the GRUB path to it.
3181
3182 * util/update-grub.in: Handle multiple terminals depending on user
3183 input, platform availability and font file presence. Propagate
3184 variables of our findings to /etc/grub.d/ children.
3185
3186 * util/grub.d/00_header.in: Handle multiple terminals, based on
3187 environment setup by update-grub.
3188
eface1dc 31892007-06-23 Robert Millan <rmh@aybabtu.com>
3190
ba50d28f 3191 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 3192
bf697e28 31932007-06-21 Robert Millan <rmh@aybabtu.com>
3194
3195 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
3196 indicate end of data section in kernel image.
3197 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
3198 GRUB_KERNEL_MACHINE_DATA_END.
3199
3200 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
3201 space for it.
3202 * kern/i386/efi/startup.S: Likewise.
3203
3204 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
3205 during image generation. Implement --prefix option to override this
3206 patch.
3207 * util/i386/efi/grub-mkimage.c: Likewise.
3208
3209 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
3210 code to make path relative to its root into a separate function.
3211
3212 * util/i386/pc/grub-install.in: Use newly provided
3213 make_system_path_relative_to_its_root() to convert ${grubdir}, then
3214 pass the result to grub-install --prefix.
3215
baa574b4 32162007-06-13 Robert Millan <rmh@aybabtu.com>
3217
3218 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
3219 DEFAULT_DEVICE_MAP.
3220 * util/grub-emu.c: Use above definitions from misc.h instead of
3221 defining them.
3222 * util/grub-mkdevicemap.c: Likewise.
3223 * util/i386/pc/grub-setup.c: Likewise.
3224 * util/grub-probe.c: Likewise.
3225 (probe): Abort with grub_util_error() when either
3226 grub_guess_root_device or grub_util_get_grub_dev fails.
3227
0215dcbf 32282007-06-12 Robert Millan <rmh@aybabtu.com>
3229
3230 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
3231 "pager" assignment.
3232 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
3233 "pcdata".
3234 * util/grub-probe.c (probe): Likewise for "drive_name".
3235
8af2ab7b 32362007-06-11 Robert Millan <rmh@aybabtu.com>
3237
3238 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
3239 not just the cdrom one.
3240
59d31694 32412007-06-11 Robert Millan <rmh@aybabtu.com>
3242
3243 * util/i386/pc/grub-mkrescue.in: Add "set -e".
3244 Add --pkglibdir=DIR option to override pkglibdir.
3245 Mention --image-type=TYPE in help output.
3246 Fix --grub-mkimage (it was a no-op).
3247 Abort gracefuly when no parameter is given.
3248
7ee367e4 32492007-06-11 Robert Millan <rmh@aybabtu.com>
3250
3251 * util/i386/pc/grub-mkrescue.in: New file.
3252 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
3253 * Makefile.in: Handle bin_SCRIPTS.
3254
29b0ed46 32552007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
3256
3257 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
3258 list of video modes.
3259
c0f90770 32602007-06-06 Robert Millan <rmh@aybabtu.com>
3261
3262 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
3263 file doesn't exist, or if it is in a filesystem grub can't read.
3264
3265 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
3266 not abort if GRUB_DRIVE could not be defined. Rearrange generated
3267 header comment to fit in 80 columns when the variables are resolved.
3268
3269 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
3270 could be identified by update-grub. Remove redundant check for
3271 unifont.pff existance (since convert_system_path_to_grub_path now
3272 handles that).
3273
fb36dc26 32742007-06-04 Robert Millan <rmh@aybabtu.com>
3275
3276 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
3277
3278 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
3279
3280 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
3281
0c68c93e 32822007-06-04 Robert Millan <rmh@aybabtu.com>
3283
3284 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
3285
3286 * include/grub/partition.h: Declare grub_apple_partition_map_init and
3287 grub_apple_partition_map_fini.
3288
3289 * util/biosdisk.c
3290 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
3291 to access >2 TiB disks).
3292
3293 Print disk->total_sectors with %llu instead of %lu, since this
3294 variable is always 64-bit (prevents wrong disk size from being displayed
3295 on either >2 TiB disk or big-endian CPU).
3296
3297 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
3298 into a generic case that supports all (sane) partition maps.
3299
3300 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
3301 breaks big-endian.
3302
3303 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
3304 and grub_apple_partition_map_fini() after that.
3305
0f23eb74 33062007-06-01 Robert Millan <rmh@aybabtu.com>
3307
3308 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
3309
3310 * util/grub.d/00_header.in: Only enable gfxterm when
3311 convert_system_path_to_grub_path() succeeds.
3312
42c71976 33132007-05-20 Robert Millan <rmh@aybabtu.com>
3314
3315 * util/update-grub_lib.in: New file.
3316 * DISTLIST: Add update-grub_lib.in.
3317 * conf/common.rmk: Generate update-grub_lib and install it in
3318 $(lib_DATA).
3319 * Makefile.in: Add install routine for $(lib_DATA).
3320
3321 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
3322 function provided by update-grub_lib to support arbitrary paths of
3323 unifont.pff.
3324 * util/update-grub.in: Use convert_system_path_to_grub_path() to
3325 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
3326
5beb2291 33272007-05-19 Robert Millan <rmh@aybabtu.com>
3328
3329 * commands/i386/cpuid.c: New module.
3330 * DISTLIST: Add it.
3331 * conf/i386-efi.rmk: Enable cpuid.mod.
3332 * conf/i386-pc.rmk: Likewise.
3333
7262eca1 33342007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3335
3336 * kern/disk.c (grub_disk_read): Check return value of
3337 grub_realloc().
3338
260ba823 33392007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
3340
3341 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
3342 arrays.
3343 * disk/raid.c (grub_raid_open): Likewise.
3344
1ecb6cf2 33452007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3346
3347 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
3348 stack instead of on the heap.
3349
3350 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
3351 before doing a read on it.
3352
3353 * configure.ac: Only use -fno-stack-protector for the target
3354 environment.
3355
21c8cbb1 33562007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
3357
3358 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
3359 __attribute_ ((unused)) to mode_type argument.
3360
3361 * util/getroot.c (grub_guess_root_device): Fix #endif.
3362
3363 * kern/misc.c (memcmp): Fix prototype.
3364
3365 * include/grub/partition.h [GRUB_UTIL]
3366 (grub_gpt_partition_map_init): Add prototype.
3367 (grub_gpt_partition_map_fini): Likewise.
3368
3369 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
3370 at the right place.
3371
3372 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
3373 (grub_fat_read_data): Likewise.
3374 (grub_fat_find_dir): Likewise.
3375
3376 * font/manager.c (find_glyph): Make table a const.
3377 (grub_font_get_glyph): Remove bitmap from if statement.
3378
849d55d3 33792007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
3380
3381 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
3382 code, first search for device in /dev/mapper, then in /dev.
3383 (grub_util_get_grub_dev): New function.
3384 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
3385 prototype.
3386 * util/grub-probe.c (probe): Remove check for RAID, call
3387 grub_util_get_grub_dev() instead of
3388 grub_util_biosdisk_get_grub_dev().
3389 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
3390 grub_util_biosdisk_get_grub_dev().
3391 * util/i386/pc/grub-setup.c (main): Likewise.
3392
8fff7c2f 33932007-05-16 Robert Millan <rmh@aybabtu.com>
3394
3395 * DISTLIST: Update for the latest changes.
3396 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
3397 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
3398 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
3399 grub/util/biosdisk.h.
3400 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
3401 grub/util/biosdisk.h.
3402
48e12b52 34032007-05-16 Robert Millan <rmh@aybabtu.com>
3404
3405 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
3406
46b9d128 34072007-05-16 Robert Millan <rmh@aybabtu.com>
3408
3409 * util/i386/efi/grub-install.in: New.
3410 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
3411 newly added grub-install.
3412 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
3413 include.
3414 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
3415 grub/util/biosdisk.h.
3416 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
3417 grub/util/biosdisk.h.
3418
2d1a40a9 34192007-05-16 Robert Millan <rmh@aybabtu.com>
3420
3421 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
3422 * include/grub/util/biosdisk.h: ... here.
3423 * util/i386/pc/biosdisk.c: Moved to ...
3424 * util/biosdisk.c: ... here.
3425 * util/i386/pc/getroot.c: Moved to ...
3426 * util/getroot.c: ... here.
3427 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
3428 * util/grub-mkdevicemap.c: ... here.
3429 * util/i386/pc/grub-probe.c: Moved to ...
3430 * util/grub-probe.c: ... here.
3431
9e26e3bc 34322007-05-15 Robert Millan <rmh@aybabtu.com>
3433
3434 * util/update-grub.in: Remove duplicated line in grub.cfg header
3435 message.
3436
57f96397 34372007-05-13 Robert Millan <rmh@aybabtu.com>
3438
3439 * util/update-grub.in: Fix a few assumptions about the devices holding
3440 /, /boot and /boot/grub being the same.
3441 * util/grub.d/00_header.in: Likewise.
3442 * util/grub.d/10_hurd.in: Likewise.
3443 * util/grub.d/10_linux.in: Likewise.
3444
3445 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
3446 patterns. Use that to define the `.old' suffix as older than `'.
3447
3448 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
3449
3450 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
3451 the grub.cfg header message.
3452
2e610d62 34532007-05-11 Robert Millan <rmh@aybabtu.com>
3454
3455 * util/update-grub.in: Create device.map if it doesn't already exist,
3456 before attempting to run grub-probe.
3457 Check for grub-probe and grub-mkdevicemap with the same code
3458 grub-install is using.
3459 Remove test mode.
3460
3f6a10ef 34612007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
3462
3463 * Makefile.in: Add the datarootdir autoconf variable.
3464
02e7b75e 34652007-05-09 Robert Millan <rmh@aybabtu.com>
3466
3467 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
3468 fail gracefuly if dev->disk->partition == NULL.
3469
75f396cc 34702007-05-07 Robert Millan <rmh@aybabtu.com>
3471
3472 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
3473 determine partition map module.
3474 * util/i386/pc/grub-install.in: Use this feature to decide which
3475 partition module to load, instead of hardcoding pc and gpt.
3476
da65cb36 34772007-05-07 Robert Millan <rmh@aybabtu.com>
3478
3479 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
3480 source directory differs from build directory.
3481
b57d6a91 34822007-05-05 Robert Millan <rmh@aybabtu.com>
3483
3484 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
3485 initialisation.
3486
509d00f1 34872007-05-05 Robert Millan <rmh@aybabtu.com>
3488
3489 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
3490
c48f23ef 34912007-05-05 Robert Millan <rmh@aybabtu.com>
3492
3493 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
3494 command-line arguments via ${GRUB_CMDLINE_LINUX}.
3495
20b97658 34962007-05-05 Robert Millan <rmh@aybabtu.com>
3497
3498 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
3499 (grub_probe_SOURCES): Likewise.
3500 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
3501 GPT and initialize dos_part and bsd_part accordingly.
3502 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
3503 install_bsd_part.
3504 (main): Activate gpt module for use during partition identification,
3505 and deactivate it afterwards.
3506 * util/i386/pc/grub-install.in: Add gpt module to core.img.
3507 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
3508 partition identification, and deactivate it afterwards.
3509
99123174 35102007-05-05 Robert Millan <rmh@aybabtu.com>
3511
3512 * term/i386/pc/console.c (grub_console_fini): Call
3513 grub_term_set_current() before grub_term_unregister().
3514
ebd97f6e 35152007-05-04 Robert Millan <rmh@aybabtu.com>
3516
3517 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
3518 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
3519 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
3520 and update-grub_DATA.
3521 * conf/common.rmk: Build and install update-grub components.
3522 * conf/common.mk: Regenerate.
3523 * util/update-grub.in: New. Core of update-grub.
3524 * util/grub.d/00_header.in: New. Generates grub.cfg header.
3525 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
3526 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
3527 * util/grub.d/README: New. Document grub.d directory layout.
3528
b06a264d 35292007-05-01 Robert Millan <rmh@aybabtu.com>
3530
3531 * util/grub-emu.c: Move initialization functions
3532 grub_util_biosdisk_init() and grub_init_all() before
3533 grub_util_biosdisk_get_grub_dev(), which relies on them.
3534
41f0050e 35352007-04-19 Robert Millan <rmh@aybabtu.com>
3536
3537 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
3538 it is used later.
3539
04582bb3 35402007-04-18 Jerone Young <jerone@gmail.com>
3541
3542 * kernel/elf.c: Add missing parenthesis for conditional statement
3543 stanza.
3544
08db4632 35452007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 3546
08db4632 3547 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
3548 continue on and look for device node with real device name.
3549
801b76be 35502007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 3551
3552 * configure.ac: Add argument for autoconf to use tranformation
3553 ability.
3554 * Makefile.in: Add autoconf package transformation code.
3555 * util/i386/pc/grub-install.in: Likewise.
3556 * util/powerpc/ieee1275/grub-install.in: Likewise.
3557
6795c4e1 35582007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3559
3560 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
3561 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
3562 (EXT2_REVISION): Likewise.
3563 (EXT2_INODE_SIZE): Likewise.
3564 (struct grub_ext2_block_group): Added a missing member
3565 "used_dirs".
3566 (grub_ext2_read_inode): Divide by the inode size in a superblock
3567 instead of 128 to obtain INODES_PER_BLOCK.
3568 Use the macro EXT2_INODE_SIZE instead of directly using
3569 SBLOCK->INODE_SIZE.
3570
d70af616 35712007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
3572
3573 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
3574 superblock instead of the structure size to compute an
3575 offset. This fixes the problem that GRUB could not read a
3576 filesystem when inode size is different from 128-byte.
3577
3b801603 35782007-03-05 Marco Gerards <marco@gnu.org>
3579
3580 * normal/main.c (read_config_file): When "menu" is not set, create
3581 an initial context.
3582
4785bfe4 35832007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3584
3585 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
3586 (HEAP_LIMIT): New macro.
3587 (grub_claim_heap): Claim memory up to `heaplimit'.
3588
a0cbb023 35892007-02-21 Hollis Blanchard <hollis@penguinppc.org>
3590
3591 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
3592 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
3593 (_start): Likewise.
3594 (grub_arch_modules_addr): Return address after `_end'.
3595 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
3596 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
3597 (add_segments): Calculate `_end' from phdr size and location.
3598 (ALIGN_UP): Moved to ...
3599 * include/grub/misc.h: here.
3600 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
3601 New macro.
3602 (GRUB_IEEE1275_MODULE_BASE): Removed.
3603
fd7d8eba 36042007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3605
3606 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
3607 loop boundary.
3608
9b09e6fc 36092007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3610
3611 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
3612 All users updated.
3613 (grub_elf64_load_hook_t): Likewise.
3614 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
3615 debug output.
3616
3ce27299 36172007-02-20 Hollis Blanchard <hollis@penguinppc.org>
3618
3619 * kern/mm.c: Update copyright.
3620 (grub_mm_debug): Correct syntax error.
3621 (grub_mm_dump_free): New function.
3622 (grub_debug_free): Call `grub_free'.
3623 * include/grub/mm.h: Update copyright.
3624 (grub_mm_dump_free): Add declaration.
3625
077d5fee 36262007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3627
3628 * include/grub/ieee1275/ieee1275.h: Update copyright.
3629 * kern/powerpc/ieee1275/init.c: Likewise.
3630 * kern/powerpc/ieee1275/openfw.c: Likewise.
3631
3632 * loader/powerpc/ieee1275/linux.c: Likewise.
3633 * include/grub/elfload.h: Likewise.
3634 * kern/elf.c: Likewise.
3635 (grub_elf32_load): Pass `base' and `size' parameters. Update all
3636 callers.
3637 (grub_elf64_load): Likewise.
3638 (grub_elf32_load_segment): Move to a nested function.
3639 (grub_elf64_load_segment): Likewise.
3640
dc946850 36412007-02-12 Hollis Blanchard <hollis@penguinppc.org>
3642
3643 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
3644 prototype.
3645 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
3646 (grub_heap_len): Likewise.
3647 (HEAP_SIZE): New macro.
3648 (grub_claim_heap): New function.
3649 (grub_machine_init): Don't claim heap directly. Call
3650 `grub_claim_heap'.
3651 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
3652 (grub_available_iterate): New function.
3653
baa2a121 36542007-02-03 Thomas Schwinge <tschwinge@gnu.org>
3655
3656 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
3657 * configure.ac: Use it for testing the HOST and TARGET compilers.
3658
4fe9862e 36592006-12-13 Thomas Schwinge <tschwinge@gnu.org>
3660
3661 * Makefile.in (enable_grub_emu): New variable.
3662 * configure.ac (--enable-grub-emu): New option.
3663 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
3664 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
3665 * conf/i386-pc.rmk: Likewise.
3666 * conf/powerpc-ieee1275.rmk: Likewise.
3667 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
3668
a8aa5762 36692006-12-12 Marco Gerards <marco@gnu.org>
3670
3671 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
3672
3673 * kern/env.c (grub_env_unset): Don't free the member `value' when
3674 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
3675 pointer.
3676
3677 * normal/main.c (current_menu): Removed.
3678 (free_menu): Unset the `menu' environment variable.
3679 (grub_normal_menu_addentry): Make use of the environment variable
3680 `menu', instead of using the global `current_menu'. Allocate
3681 memory for the sourcecode of this entry.
3682 (read_config_file): New argument `nested', changed all callers.
3683 Only in the case of a new context, initialize a new menu. Set the
3684 `menu' environment variable.
3685 (grub_normal_execute): Don't set and unset the environment
3686 variable `menu' here anymore. Only free the menu when leaving the
3687 context.
3688
3689 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
3690 leak.
3691
957b3a3e 36922006-12-11 Marco Gerards <marco@gnu.org>
3693
3694 * normal/menu_entry.c (run): Fix off by one bug so the last line
3695 is executed. Move the loader check to outside the loop.
3696
ef875714 36972006-12-08 Hollis Blanchard <hollis@penguinppc.org>
3698
3699 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
3700
4e739985 37012006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
3702
3703 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
3704 the number of sectors. Reported by Andrey Shuvikov
3705 <mr_hyro@yahoo.com>.
3706
790707f2 37072006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
3708
3709 * kern/disk.c (grub_disk_read): When there is a read error, always
3710 try to read only the necessary data.
3711
3712 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
3713 disk/raid.c.
3714 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
3715 prototype.
3716 [GRUB_UTIL] (grub_raid_fini): Likewise.
3717 [GRUB_UTIL] (grub_lvm_init): Likewise.
3718 [GRUB_UTIL] (grub_lvm_fini): Likewise.
3719 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
3720 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
3721 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
3722 and grub_raid_fini().
3723
03e58196 37242006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3725
3726 * include/grub/types.h (__unused): Rename to UNUSED.
3727 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
3728 (grub_elf64_size): Likewise.
3729
ae4f23bf 37302006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3731
3732 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
3733 grub_error_push and grub_error_pop in the error-handling path.
3734 (grub_elf32_load_segment): Only call grub_file_read with non-zero
3735 length.
3736
2166cc83 37372006-11-03 Hollis Blanchard <hollis@penguinppc.org>
3738
3739 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
3740 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3741 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3742 (kernel_elf_SOURCES): Likewise.
3743 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
3744 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
3745 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3746 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
3747 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
3748 (elf_mod_SOURCES): New variable.
3749 (elf_mod_CFLAGS): Likewise.
3750 (elf_mod_LDFLAGS): Likewise.
3751 * include/grub/types.h (__unused): New macro.
3752 * include/grub/elfload.h: New file.
3753 * kern/elf.c: Likewise.
3754 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
3755 (ELF32_LOADMASK): New macro.
3756 (ELF64_LOADMASK): Likewise.
3757 (vmlinux): Removed.
3758 (grub_linux_load32): New function.
3759 (grub_linux_load64): Likewise.
3760 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
3761 Use grub_elf_t instead of grub_file_t.
3762
a09d5aa5 37632006-11-02 Hollis Blanchard <hollis@penguinppc.org>
3764
3765 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
3766 `catch_result' to struct set_color_args.
3767
d976fc51 37682006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
3769
3770 * normal/menu.c: Include grub/script.h.
3771 * normal/menu_entry.c: Likewise.
3772 * include/grub/normal.h: Do not include grub/script.h.
3773
67507549 37742006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3775
3776 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
3777
69203a99 37782006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3779
3780 * kern/disk.c (grub_disk_open): Print debug messages when opening a
3781 disk.
3782 (grub_disk_close): Print debug messages when closing a disk.
3783 (grub_disk_read): Print debug messages when disk read fails.
3784 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
3785 filesystem type.
3786 * kern/partition.c: Include misc.h.
3787 (grub_partition_iterate): Print debug messages when detecting
3788 partition type.
3789
e2b8278c 37902006-10-27 Hollis Blanchard <hollis@penguinppc.org>
3791
3792 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
3793 is negative.
3794 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
3795
97b2f2ff 37962006-10-26 Hollis Blanchard <hollis@penguinppc.org>
3797
3798 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
3799 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
3800
6555d655 38012006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
3802
3803 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
3804 instead of sizeof(lv). Patch by Michael Guntsche.
3805
4d42b77f 38062006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
3807
3808 * disk/lvm.c: Rename VGS to VG_LIST.
3809 (grub_lvm_iterate): Change VGS->LV to VG-LV.
3810 (grub_lvm_open): Likewise.
3811 Thanks to Michael Guntsche for finding this bug.
3812
5d74d927 38132006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
3814
3815 * configure.ac (AC_INIT): Bumped to 1.95.
3816
a1bb27e4 38172006-10-14 Robert Millan <rmh@aybabtu.com>
3818
3819 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
3820 with "/dev/.static/dev/md".
3821
e0994b8b 38222006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3823
3824 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
3825 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
3826 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
3827 DRIVE_NAME are always freed.
3828
3829 * util/i386/pc/biosdisk.c (make_device_name): Add one into
3830 DOS_PART, as a DOS partition is counted from one instead of zero
3831 now. Reported by Robert Millan.
3832
ddd5cee9 38332006-10-14 Robert Millan <rmh@aybabtu.com>
3834
3835 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
3836 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
3837 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
3838 string returned by grub_guess_root_device.
3839 * util/i386/pc/grub-setup.c: Likewise.
3840 * util/i386/pc/grub-probefs.c: Likewise.
3841
3842 * util/i386/pc/grub-probefs.c: Rename to ...
3843 * util/i386/pc/grub-probe.c: ... this.
3844 * DISTLIST: Remove grub-probefs, add grub-probe.
3845 * conf/i386-efi.rmk: Likewise.
3846 * conf/i386-pc.rmk: Likewise.
3847 * util/i386/pc/grub-install.in: Likewise.
3848
3849 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
3850 choose which information we want to print.
3851
2b002173 38522006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
3853
3854 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
3855 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
3856 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
3857 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
3858 video/readers/tga.c and video/i386/pc/vbeutil.c.
3859
38602006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
3861
3862 Added support for RAID and LVM.
3863
3864 * disk/lvm.c: New file.
3865 * disk/raid.c: Likewise.
3866 * include/grub/lvm.h: Likewise.
3867 * include/grub/raid.h: Likewise.
3868 * include/grub/util/lvm.h: Likewise.
3869 * include/grub/util/raid.h: Likewise.
3870 * util/lvm.c: Likewise.
3871 * util/raid.c: Likewise.
3872
3873 * include/grub/disk.h (grub_disk_dev_id): Add
3874 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
3875 (grub_disk_get_size): New prototype.
3876 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
3877 returns a partition.
3878 (grub_disk_get_size): New function.
3879
3880 * kern/i386/pc/init.c (make_install_device): Copy the prefix
3881 verbatim if grub_install_dos_part is -2.
3882
3883 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
3884 and LVM devices.
3885
3886 * util/i386/pc/grub-setup.c (setup): New argument
3887 MUST_EMBED. Force embedding of GRUB when the argument is
3888 true. Close FILE before returning.
3889 (main): Add support for RAID and LVM.
3890
3891 * conf/common.rmk: Add RAID and LVM modules.
3892 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
3893 util/lvm.c.
3894 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
3895
3896 * kern/misc.c (grub_strstr): New function.
3897 * include/grub/misc.h (grub_strstr): New prototype.
3898
050548d0 38992006-10-10 Tristan Gingold <tristan.gingold@bull.net>
3900
3901 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
3902
da849d2d 39032006-10-05 Tristan Gingold <tristan.gingold@bull.net>
3904
3905 * kern/misc.c (grub_strtoull): Guess the base only if not
3906 specified.
3907
97b2f2ff 39082006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 3909
3910 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
3911 PowerMac support.
3912
97b2f2ff 39132006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 3914
3915 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
3916
3917 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
3918 Remove `flags' argument. All callers changed.
3919 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
3920 (IEEE1275_IHANDLE_INVALID): New variable.
3921 (IEEE1275_CELL_INVALID): New variable.
3922 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3923 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
3924 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
3925 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
3926 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
3927 codes from Open Firmware. All callers updated.
3928 (grub_ieee1275_next_property): Directly return Open Firmware return
3929 code.
3930 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3931 Standardize error checking from `grub_ieee1275_get_property'.
3932 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
3933 `devalias' to `aliases'. Correct comments. Consolidate error paths.
3934
97b2f2ff 39352006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 3936
3937 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
3938 `instance_to_package_args' to `instance_to_path_args'.
3939
3940 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
3941 `grub_ieee1275_chosen'.
3942
3943 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
3944 `grub_ieee1275_interpret'.
3945
97b2f2ff 39462006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 3947
3948 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
3949
97b2f2ff 39502006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 3951
3952 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
3953 (__cmpdi): Likewise.
3954
3955 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
3956 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
3957 `grub_ssize_t'.
3958
02bb8acc 3959 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 3960
3961 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
3962 to type `grub_ssize_t'.
3963 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
3964
7f9a8531 39652006-09-22 Marco Gerards <marco@gnu.org>
3966
3967 * normal/script.c (grub_script_create_cmdmenu): Skip leading
3968 newlines.
3969
b5ef1102 39702006-09-22 Marco Gerards <marco@gnu.org>
3971
3972 * commands/echo.c: New file.
3973
3974 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
3975
3976 * conf/common.rmk (echo_mod_SOURCES): New variable.
3977 (echo_mod_CFLAGS): Likewise.
3978 (echo_mod_LDFLAGS): Likewise.
3979
2cff3677 39802006-09-22 Marco Gerards <marco@gnu.org>
3981
3982 * normal/main.c (get_line): Malloc memory instead of using
3983 preallocated memory. Removed the arguments `cmdline' and
3984 `max_len'. Updated all callers.
3985
6ba4688b 39862006-09-22 Marco Gerards <marco@gnu.org>
3987
3988 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
3989 (normal_mod_DEPENDENCIES): Likewise.
3990
3991 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
3992 (normal_mod_DEPENDENCIES): Likewise.
3993
3994 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
3995
e02ac02c 39962006-09-22 Johan Rydberg <jrydberg@gnu.org>
3997
3998 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
3999 programs.
4000 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
4001 (normal_mod_DEPENDENCIES): Likewise.
4002 * conf/i386-pc.mk: Regenerate.
4003 * conf/i386-efi.mk: Likewise
4004 * conf/common.mk: Likewise.
4005 * conf/powerpc-ieee1275.mk: Likewise.
4006 * conf/sparc64-ieee1275.mk: Likewise.
4007
8d252e44 40082006-09-22 Robert Millan <rmh@aybabtu.com>
4009
4010 Sync with i386 version.
4011 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
4012 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
4013
209bf7ac 40142006-09-21 Robert Millan <rmh@aybabtu.com>
4015
4016 Import from GRUB Legacy (lib/device.c):
4017 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
4018 (init_device_map) [__linux__]: Add support for I2O devices.
4019
6b146090 40202006-09-14 Marco Gerards <marco@gnu.org>
4021
4022 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
4023 `-melf_i386'.
4024
e38600a8 40252006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 4026
4027 * util/i386/pc/grub-install.in: Skip menu.lst when removing
4028 /boot/grub/*.lst.
78fa1790 4029
2952da5d 4030 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 4031
2952da5d 4032 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
4033 before adding it to device.map.
4034
01b82a64 40352006-08-15 Johan Rydberg <jrydberg@gnu.org>
4036
4037 * genmk.rb: Let GCC generate dependenceies the first time it
4038 compiles a file; using the -MD option.
4039 * conf/common.mk: Regenerate.
4040 * conf/i386-pc.mk: Likewise.
4041 * conf/i386-efi.mk: Likewise.
4042 * conf/powerpc-ieee1275.mk: Likewise.
4043 * conf/sparc64-ieee1275.mk: Likewise.
4044
1064790d 40452006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
4046
4047 Move the prototypes of grub_setjmp and grub_longjmp to
4048 cpu/setjmp.h, so that each architecture may specify different
4049 attributes.
4050
4051 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
4052 (grub_longjmp): Likewise.
4053 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
4054 (grub_longjmp): Likewise.
4055 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
4056 (grub_longjmp): Likewise.
4057
4058 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
4059 [!GRUB_UTIL] (grub_longjmp): Removed.
4060
29dda3ed 40612006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
4062
4063 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
4064 "color!" method does not return any value.
4065
ad2a06ed 40662006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4067
4068 * include/grub/bitmap.h: New file.
4069
4070 * include/grub/i386/pc/vbeutil.h: Likewise.
4071
4072 * video/bitmap.c: Likewise.
4073
4074 * video/readers/tga.c: Likewise.
4075
4076 * video/i386/pc/vbeutil.c: Likewise.
4077
4078 * commands/videotest.c: Code cleanup and updated to reflect to new
4079 video API.
4080
4081 * term/gfxterm.c: Likewise.
4082
4083 * video/video.c: Likewise.
4084
4085 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
4086 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
4087 (bitmap_mod_SOURCES): New entry.
4088 (bitmap_mod_CFLAGS): Likewise.
4089 (bitmap_mod_LDFLAGS): Likewise.
4090 (tga_mod_SOURCES): Likewise.
4091 (tga_mod_CFLAGS): Likewise.
4092 (tga_mod_LDFLAGS): Likewise.
4093
4094 * include/grub/video.h (grub_video_blit_operators): New enum type.
4095 (grub_video_render_target): Changed as forward declaration and moved
4096 actual definition to be video driver specific.
4097 (grub_video_adapter.blit_bitmap): Added blitting operator.
4098 (grub_video_adapter.blit_render_target): Likewise.
4099 (grub_video_blit_bitmap): Likewise.
4100 (grub_video_blit_render_target): Likewise.
4101
4102 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
4103 driver specific render target definition.
4104 (grub_video_vbe_map_rgba): Added driver internal helper.
4105 (grub_video_vbe_unmap_color): Updated to use
4106 grub_video_i386_vbeblit_info.
4107 (grub_video_vbe_get_video_ptr): Likewise.
4108
4109 * include/grub/i386/pc/vbeblit.h
4110 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
4111 grub_video_i386_vbeblit_info.
4112 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4113 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4114 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4115 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4116 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4117 (grub_video_i386_vbeblit_index_index): Likewise.
4118 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
4119 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4120 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4121 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
4122 operator.
4123 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
4124 operator.
4125
4126 * video/i386/pc/vbeblit.c: Updated to reflect changes on
4127 include/grub/i386/pc/vbeblit.h.
4128
4129 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
4130 Updated to use grub_video_i386_vbeblit_info.
4131 (grub_video_i386_vbefill_R8G8B8): Likewise.
4132 (grub_video_i386_vbefill_index): Likewise.
4133 (grub_video_i386_vbefill): Added generic filler.
4134
4135 * video/i386/pc/vbefill.c: Updated to reflect changes on
4136 include/grub/i386/pc/vbefill.h.
4137
4138 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
4139 grub_video_i386_vbeblit_info.
4140 (grub_video_vbe_unmap_color): Likewise.
4141 (grub_video_vbe_blit_glyph): Likewise.
4142 (grub_video_vbe_scroll): Likewise.
4143 (grub_video_vbe_draw_pixel): Removed function.
4144 (grub_video_vbe_get_pixel): Likewise.
4145 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
4146 updated code to use it.
4147 (common_blitter): Added common blitter for render target and bitmap.
4148 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
4149 (grub_video_vbe_blit_render_target): Likewise.
4150
bc8c036d 41512006-07-30 Johan Rydberg <jrydberg@gnu.org>
4152
4153 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
4154 is in text mode if there is no console control protocol instance
4155 available.
4156
684a8eff 41572006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4158
4159 * include/grub/video.h: Code cleanup.
4160
4161 * include/grub/i386/pc/vbe.h: Likewise.
4162
4163 * video/i386/pc/vbe.c: Likewise.
4164
4165 * video/i386/pc/vbeblit.c: Likewise.
4166
4167 * video/i386/pc/vbefill.c: Likewise.
4168
4169 * video/video.c: Likewise. Also added more comments.
4170
5915059b 41712006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
4172
4173 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
4174 (struct grub_biosdisk_dap): Likewise.
4175
4176 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
4177 linkage settings for all functions.
4178
90ce5d56 41792006-07-12 Marco Gerards <marco@gnu.org>
4180
4181 * configure.ac (--enable-mm-debug): Fix typo.
4182
4183 * genkernsyms.sh.in: Use proper quoting for `CC'.
4184
43e7f879 41852006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
4186
4187 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
4188 (normal_mod_ASFLAGS): Remove "-m32".
4189
4889bdec 41902006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
4191
4192 * util/misc.c: Include config.h.
4193 [!HAVE_MEMALIGN]: Do not include malloc.h.
4194 (grub_memalign): Use posix_memalign, if present. Then, use
4195 memalign, if present. Otherwise, emit an error.
4196
4197 * util/grub-emu.c: Do not include malloc.h.
4198
4199 * include/grub/util/misc.h: Include unistd.h. This is required for
4200 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
4201 D. Eades III <hde@foobar-qux.org>.
4202
4203 * configure.ac (AC_GNU_SOURCE): Added.
4204 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
4205 type.
4206
fd39d4da 42072006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
4208
4209 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
4210 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
4211
b786f3b5 42122006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
4213
4214 * include/grub/types.h (grub_host_addr_t): Rename to
4215 grub_target_addr_t.
4216 (grub_host_off_t): Rename to grub_target_off_t.
4217 (grub_host_size_t): Rename to grub_target_size_t.
4218 (grub_host_ssize_t): Rename to grub_target_ssize_t.
4219 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
4220
4221 * include/grub/kernel.h (struct grub_module_header): Change type
4222 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
4223 (grub_module_info): Likewise.
4224
051988bb 42252006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4226
4227 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
4228 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
4229 Velazquez <jesus.velazquez@gmail.com>.
4230
deae281b 42312006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
4232
4233 Count partitions from 1 instead of 0 in the string representation
4234 of partitions. Still use 0-based internally.
4235
4236 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
4237 (sun_partition_map_iterate): Use grub_partition_t instead of
4238 struct grub_partition *. Cast DESC->START_CYLINDER to
4239 grub_uint64_t after converting the endian.
4240 (sun_partition_map_probe): Subtract 1 for PARTNUM.
4241 (sun_partition_map_get_name): Add 1 to P->INDEX.
4242
4243 * partmap/pc.c (grub_partition_parse): Subtract 1 for
4244 PCDATA->DOS_PART.
4245 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
4246
4247 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
4248 zero instead of one.
4249 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
4250 (gpt_partition_map_get_name): Add 1 into P->INDEX.
4251
4252 * partmap/apple.c (apple_partition_map_iterate): Change the type
4253 of POS to unsigned.
4254 (apple_partition_map_probe): Subtract 1 for PARTNUM.
4255 (apple_partition_map_get_name): Add 1 into P->INDEX.
4256
4257 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
4258 of POS to unsigned.
4259 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
4260 calculate the offset of a partition.
4261 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
4262 (amiga_partition_map_get_name): Add 1 into P->INDEX.
4263
4264 * partmap/acorn.c (acorn_partition_map_find): Change the type of
4265 SECTOR to grub_disk_addr_t.
4266 (acorn_partition_map_iterate): Likewise.
4267 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
4268 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
4269 top.
4270 (acorn_partition_map_get_name): Add 1 into P->INDEX.
4271
4272 * kern/i386/pc/init.c (make_install_device): Add 1 into
4273 GRUB_INSTALL_DOS_PART.
4274
4275 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
4276 conditional.
4277
524a1e6a 42782006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4279
4280 Clean up the code to support 64-bit addressing in disks and
4281 files. This change is not enough for filesystems yet.
4282
4283 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
4284 type of "start" to grub_uint64_t.
4285 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
4286 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
4287 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
4288 convert addresses.
4289
4290 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
4291 to grub_disk_addr_t.
4292
4293 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
4294 string.
4295
4296 * partmap/pc.c (pc_partition_map_iterate): Likewise.
4297
4298 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
4299 to char *.
4300
4301 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
4302
4303 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
4304
4305 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
4306
4307 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
4308 to grub_off_t, to detect an error from grub_file_seek.
4309 (grub_multiboot_load_elf32): Likewise.
4310
4311 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
4312 maximum unsigned long value when an overflow is detected.
4313 (grub_strtoull): New function.
4314 (grub_divmod64): Likewise.
4315 (grub_lltoa): use grub_divmod64.
4316
4317 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
4318 grub_disk_addr_t.
4319 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
4320 the pointer to next character. Use grub_strtoull instead of
4321 grub_strtoul.
4322 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
4323 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
4324 respectively.
4325
4326 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
4327 return value is signed.
4328 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
4329 test if OFFSET is less than zero, as OFFSET is unsigned now.
4330
4331 * kern/disk.c (struct grub_disk_cache): Change the type of
4332 "sector" to grub_disk_addr_t.
4333 (grub_disk_cache_get_index): Change the type of SECTOR to
4334 grub_disk_addr_t. Calculate the hash with SECTOR casted to
4335 unsigned after shifting.
4336 (grub_disk_cache_invalidate): Change the type of SECTOR to
4337 grub_disk_addr_t.
4338 (grub_disk_cache_unlock): Likewise.
4339 (grub_disk_cache_store): Likewise.
4340 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
4341 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
4342 grub_disk_addr_t and grub_uint64_t, respectively.
4343 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
4344 body, as the value of OFFSET is tweaked by
4345 grub_disk_check_range. Change the types of START_SECTOR, LEN and
4346 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
4347 respectively.
4348 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
4349 body, as the value of OFFSET is tweaked by
4350 grub_disk_check_range. Change the types of LEN and N to
4351 grub_size_t.
4352
4353 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
4354 and "saved_offset" to grub_off_t.
4355 (test_header): Cast BUF to char *.
4356 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
4357 to char *.
4358 (grub_gzio_read): Change the types of OFFSET and SIZE to
4359 grub_off_t and grub_size_t, respectively.
4360
4361 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
4362 Removed.
4363 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
4364 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
4365 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
4366 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
4367 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
4368
4369 * include/grub/types.h (grub_off_t): Unconditionally set to
4370 grub_uint64_t.
4371 (grub_disk_addr_t): Changed to grub_uint64_t.
4372
4373 * include/grub/partition.h (struct grub_partition): Change the
4374 types of "start", "len" and "offset" to grub_disk_addr_t,
4375 grub_uint64_t and grub_disk_addr_t, respectively.
4376 (grub_partition_get_start): Return grub_disk_addr_t.
4377 (grub_partition_get_len): Return grub_uint64_t.
4378
4379 * include/grub/misc.h (grub_strtoull): New prototype.
4380 (grub_divmod64): Likewise.
4381
4382 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
4383 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
4384 grub_off_t, respectively.
4385 All callers and references changed.
4386
4387 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
4388 grub_size_t in "read".
4389 All callers and references changed.
4390
4391 * include/grub/file.h (struct grub_file): Change the types of
4392 "offset" and "size" to grub_off_t and grub_off_t,
4393 respectively. Change the type of SECTOR to grub_disk_addr_t in
4394 "read_hook".
4395 (grub_file_read): Change the type of LEN to grub_size_t.
4396 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
4397 grub_off_t.
4398 (grub_file_size): Return grub_off_t.
4399 (grub_file_tell): Likewise.
4400 All callers and references changed.
4401
4402 * include/grub/disk.h (struct grub_disk_dev): Change the types of
4403 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
4404 "write".
4405 (struct grub_disk): Change the type of "total_sectors" to
4406 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
4407 "read_hook".
4408 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
4409 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
4410 (grub_disk_write): Likewise.
4411 All callers and references changed.
4412
4413 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
4414 char * for grub_strncmp to silence gcc.
4415 (grub_iso9660_mount): Likewise.
4416 (grub_iso9660_mount): Likewise.
4417 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
4418 return statement.
4419 (grub_iso9660_iterate_dir): Likewise.
4420 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
4421
4422 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
4423 LEN to grub_disk_addr_t and grub_size_t, respectively.
4424
4425 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
4426
4427 * fs/jfs.c (grub_jfs_read_file): Likewise.
4428
4429 * fs/minix.c (grub_jfs_read_file): Likewise.
4430
4431 * fs/sfs.c (grub_jfs_read_file): Likewise.
4432
4433 * fs/ufs.c (grub_jfs_read_file): Likewise.
4434
4435 * fs/xfs.c (grub_jfs_read_file): Likewise.
4436
4437 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
4438 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
4439 respectively.
4440
4441 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
4442 BLKNR to -1 instead of returning GRUB_ERRNO.
4443 (grub_ext2_read_file): Change the types of SECTOR and
4444 LEN to grub_disk_addr_t and grub_size_t, respectively.
4445
4446 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
4447 LEN to grub_disk_addr_t and grub_size_t, respectively.
4448
4449 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
4450 grub_file_read.
4451
4452 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
4453 string. Do not cast SECTOR explicitly.
4454
4455 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
4456 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
4457 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
4458 grub_disk_addr_t and grub_size_t, respectively. If the sector is
4459 over 2TB and LBA mode is not supported, raise an error.
4460 (get_safe_sectors): New function.
4461 (grub_biosdisk_read): Use get_safe_sectors.
4462 (grub_biosdisk_write): Likewise.
4463
4464 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
4465 (grub_efidisk_write): Likewise.
4466
4467 * disk/loopback.c (delete_loopback): Cosmetic changes.
4468 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
4469 correctly.
4470 (grub_loopback_open): Likewise.
4471 (grub_loopback_read): Likewise. Also, change the type of POS to
4472 grub_off_t, and fix the usage of grub_memset.
4473
4474 * commands/i386/pc/play.c: Include grub/machine/time.h.
4475
4476 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
4477 print FILE->SIZE.
4478
4479 * commands/configfile.c: Include grub/env.h.
4480
4481 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
4482 GRUB_ERRNO directly instead. Change the type of POS to
4483 grub_off_t. Follow the coding standard.
4484
4485 * commands/blocklist.c: Include grub/partition.h.
4486 (grub_cmd_blocklist): Return an error if the underlying device is
4487 not a disk. Take the starting sector of a partition into account,
4488 if a partition is used.
4489
4490 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
4491 a length field.
4492 (lba_mode): Support 64-bit addresses.
4493 (chs_mode): Likewise.
4494 (copy_buffer): Adapted to the new offsets of a length field and a
4495 segment field.
4496 (blocklist_default_start): Allocate 64-bit space.
4497
4498 * boot/i386/pc/boot.S (force_lba): Removed.
4499 (boot_drive): Moved to under KERNEL_SECTOR.
4500 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
4501 space.
4502 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
4503 is useless.
4504 (lba_mode): Refactored to support a 64-bit address. More size
4505 optimization.
4506 (setup_sectors): Likewise.
4507
53af98ad 45082006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
4509
4510 * DISTLIST: Added include/grub/i386/linux.h. Removed
4511 include/grub/i386/pc/linux.h
4512
4513 * configure.ac (AC_INIT): Bumped to 1.94.
4514
4515 * config.guess: Updated from gnulib.
4516 * config.sub: Likewise.
4517 * install-sh: Likewise.
4518 * mkinstalldirs: Likewise.
4519
b4c1940a 45202006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4521
4522 * conf/common.rmk (grub_modules_init.lst): Depended on
4523 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
4524 MODSRCFILES.
4525
4526 * genmk.rb (PModule::rule): Reverted the previous change.
4527
cfca1cfd 45282006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
4529
4530 * conf/common.rmk (grub_modules_init.lst): Depends on
4531 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
4532 that the target does not exist before producing.
4533 (grub_modules_init.h): Remove the target before generating.
4534 (grub_emu_init.c): Likewise.
4535
4536 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
4537
aa6d7826 45382006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
4539
4540 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
4541 for the target-specific tests. Make sure that we also have the
4542 up-to-date target variables for those tests.
4543
26c607b9 45442006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4545
4546 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
4547 (PModule::rule): Likewise.
4548
0162321a 45492006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
4550
4551 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
4552 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
4553 target-specific flags should be prefixed.
4554 (PModule::rule): Likewise.
4555
6c826348 45562006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
4557
4558 * configure.ac (CMP): Check if cmp is available explicitly.
4559
b977bf01 45602006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
4561
4562 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
4563 (target_cpu): New variable.
4564 (pkglibdir): Use target_cpu instead of host_cpu.
4565
4566 * util/i386/pc/grub-install.in (host_cpu): Removed.
4567 (target_cpu): New variable.
4568 (pkglibdir): Use target_cpu instead of host_cpu.
4569
4570 * util/genmoddep.c: Removed.
4571
4572 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
4573 instead of GRUB_HOST_SIZEOF_VOID_P.
4574 * kern/dl.c: Likewise.
4575
4576 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
4577 ...
4578 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4579 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4580 (GRUB_TARGET_SIZEOF_LONG): ... this.
4581 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4582 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4583 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4584 to ...
4585 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4586 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4587 (GRUB_TARGET_SIZEOF_LONG): ... this.
4588 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4589 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4590 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
4591 to ...
4592 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
4593 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
4594 (GRUB_TARGET_SIZEOF_LONG): ... this.
4595 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
4596 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
4597
4598 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
4599 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
4600 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
4601 instead of GRUB_HOST_SIZEOF_LONG.
4602 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
4603 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
4604 GRUB_CPU_WORDS_BIGENDIAN.
4605 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
4606 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
4607 grub_host_ssize_t.
4608
4609 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
4610 (genmoddep_SOURCES): Likewise.
4611 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
4612 (genmoddep_SOURCES): Likewise.
4613 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
4614 (genmoddep_SOURCES): Likewise.
4615 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
4616 Likewise.
4617 (genmoddep_SOURCES): Likewise.
4618
4619 * genmoddep.awk: New file.
4620
4621 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
4622 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
4623 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
4624 (PModule::rule): Likewise.
4625 (Program::rule): Likewise.
4626 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
4627 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
4628 respectively.
4629
4630 * configure.ac: Rewritten intensively to use host and target
4631 instead of build and host, respectively.
4632
4633 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
4634 (host_cpu): Removed.
4635 (target_cpu): New variable.
4636 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
4637 (BUILD_CC): Removed.
4638 (BUILD_CFLAGS): Likewise.
4639 (BUILD_CPPFLAGS): Likewise.
4640 (TARGET_CC): New variable.
4641 (TARGET_CFLAGS): Likewise.
4642 (TARGET_CPPFLAGS): Likewise.
4643 (TARGET_LDFLAGS): Likewise.
4644 (AWK): Likewise.
4645 (include): Use target_cpu instead of host_cpu.
4646 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
4647
4648 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
4649
f09771a1 46502006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
4651
4652 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
4653 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
4654 field 'false' to 'exec_on_false'.
4655 (grub_script_create_cmdif): Renamed argument names to reflect above
4656 changes.
4657
4658 * normal/execute.c (grub_script_execute_cmdif): Likewise.
4659
4660 * normal/script.c (grub_script_create_cmdif): Likewise.
4661
118f4fb3 46622006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
4663
4664 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
4665 top.
4666 (grub_hfsplus_btree_recptr): Likewise.
4667 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
4668 FILEBLOCK both to pass a block number and store next block
4669 number.
4670 (grub_hfsplus_read_block): Rewritten heavily to support an extent
4671 overflow file correctly. Specify errors appropriately, because
4672 fshelp expects that GRUB_ERRNO is set when fails. Reuse
4673 grub_hfsplus_btree_recptr to get the pointer to a found key.
4674 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
4675 is found.
4676
4677 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
4678 linux.mod.
4679 (_linux_mod_SOURCES): New variable.
4680 (_linux_mod_CFLAGS): Likewise.
4681 (_linux_mod_LDFLAGS): Likewise.
4682 (linux_mod_SOURCES): Likewise.
4683 (linux_mod_CFLAGS): Likewise.
4684 (linux_mod_LDFLAGS): Likewise.
4685
4686 * DISTLIST: Added loader/i386/efi/linux.c,
4687 loader/i386/efi/linux_normal.c and
4688 include/grub/i386/efi/loader.h.
4689
4690 * loader/i386/efi/linux.c: New file.
4691 * loader/i386/efi/linux_normal.c: Likewise.
4692 * include/grub/i386/efi/loader.h: Likewise.
4693
89a7d726 46942006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
4695
4696 * commands/blocklist.c: New file.
4697
4698 * DISTLIST: Added commands/blocklist.c.
4699
4700 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 4701 color for the background, and a darker color for the foreground.
89a7d726 4702 (grub_console_checkkey): Return READ_KEY.
4703 (grub_console_cls): Set the background to
4704 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
4705
4706 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
4707
4708 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
4709 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
4710
4711 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
4712 prototype.
4713
4714 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
4715 BG. The spec is wrong again.
4716
4717 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
4718 prototype.
4719 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
4720
4721 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
4722 commands/blocklist.c.
4723 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4724
4725 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
4726 (blocklist_mod_SOURCES): New variable.
4727 (blocklist_mod_CFLAGS): Likewise.
4728 (blocklist_mod_LDFLAGS): Likewise.
4729
75c8f258 47302006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
4731
4732 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
4733 duplication.
4734 (lba_mode): Use %eax more intensively to reduce the code size.
4735
da2eb181 47362006-05-20 Marco Gerards <marco@gnu.org>
4737
4738 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
4739
4740 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
4741 for `menuentry'.
4742 (script): Accept leading newlines.
4743 (newlines): New rule to describe 0 or more newlines.
4744 (commands): Accept `command' with trailing newline. Fixed the
4745 order in which arguments were passed to `grub_script_add_cmd'.
4746 Accept commands separated by newlines.
4747 (function): Changed to accept newlines.
4748 (menuentry) Rewritten.
4749
4750 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
4751 front of the list, instead of to the end.
4752
577b4050 47532006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
4754
4755 * util/i386/pc/grub-install.in (bindir): New variable.
4756 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
4757 Shaver <lbgwjl@gmail.com>.
4758
0d6e1189 47592006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
4760
4761 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
4762 grub/machine/linux.h
4763 * loader/i386/pc/linux.c: Likewise.
4764
4765 * include/grub/i386/pc/linux.h: Moved to ...
4766 * include/grub/i386/linux.h: ... here.
4767
4768 * include/grub/i386/linux.h (struct linux_kernel_params): New
4769 struct.
4770
31b86e9f 47712006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
4772
4773 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
4774 checking.
4775 (grub_video_vbe_blit_glyph): Likewise.
4776 (grub_video_vbe_blit_bitmap): Likewise.
4777 (grub_video_vbe_blit_render_target): Likewise.
4778
83b984de 47792006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
4780
4781 * configure.ac (--with-platform): Properly quote the square
4782 brackets.
4783
5f0413bd 47842006-05-08 Marco Gerards <marco@gnu.org>
4785
4786 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
4787 this...
4788 (kernel_elf_HEADERS): ...to this. Updated all users.
4789 (grubof_symlist.c): Renamed from this...
4790 (kernel_elf_symlist.c): ...to this. Updated all users.
4791 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4792 (grubof_SOURCES): Renamed from this...
4793 (kernel_elf_SOURCES): ...to this.
4794 (grubof_HEADERS): Renamed from this...
4795 (kernel_elf_HEADERS): ...to this.
4796 (grubof_CFLAGS): Renamed from this...
4797 (kernel_elf_CFLAGS): ...to this.
4798 (grubof_ASFLAGS): Renamed from this...
4799 (kernel_elf_ASFLAGS): ...to this.
4800 (grubof_LDFLAGS): Renamed from this...
4801 (kernel_elf_LDFLAGS): ...to this.
4802
4803 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
4804 this...
4805 (kernel_elf_HEADERS): ...to this. Updated all users.
4806 (grubof_symlist.c): Renamed from this...
4807 (kernel_elf_symlist.c): ...to this. Updated all users.
4808 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
4809 (grubof_SOURCES): Renamed from this...
4810 (kernel_elf_SOURCES): ...to this.
4811 (grubof_HEADERS): Renamed from this...
4812 (kernel_elf_HEADERS): ...to this.
4813 (grubof_CFLAGS): Renamed from this...
4814 (kernel_elf_CFLAGS): ...to this.
4815 (grubof_ASFLAGS): Renamed from this...
4816 (kernel_elf_ASFLAGS): ...to this.
4817 (grubof_LDFLAGS): Renamed from this...
4818 (kernel_elf_LDFLAGS): ...to this.
4819
4820 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
4821 `kernel.elf' instead of `grubof'.
4822
05568c2e 48232006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
4824
4825 Add --with-platform to configure. Use pkglibdir instead of
4826 pkgdatadir. This is reported by Roger Leigh.
4827
4828 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
4829 (host_vendor): Likewise.
4830 (host_os): Likewise.
4831 (pkgdatadir): Likewise.
4832 (platform): New variable.
4833 (pkglibdir): Likewise.
4834 Use PKGLIBDIR instead of PKGDATADIR.
4835
4836 * util/i386/pc/grub-install.in (datadir): Removed.
4837 (host_vendor): Likewise.
4838 (host_os): Likewise.
4839 (pkgdatadir): Likewise.
4840 (platform): New variable.
4841 (pkglibdir): Likewise.
4842 Use PKGLIBDIR instead of PKGDATADIR.
4843
4844 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
4845 instead of GRUB_DATADIR.
4846 (main): Likewise.
4847 * util/i386/pc/grub-mkimage.c (usage): Likewise.
4848 (main): Likewise.
4849 * util/i386/efi/grub-mkimage.c (usage): Likewise.
4850 (main): Likewise.
4851
4852 * configure.ac (--with-platform): New option.
4853 Use PLATFORM instead of HOST_VENDOR to specify a platform.
4854
4855 * Makefile.in: Include a makefile based on PLATFORM instead of
4856 HOST_VENDOR.
4857 (pkgdatadir): Not appended by the machine type.
4858 (pkglibdir): Appended by the machine type.
4859 (host_vendor): Removed.
4860 (platform): New variable.
4861 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
4862 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
4863 (uninstall): Likewise.
4864
4e93851c 48652006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
4866
4867 Use the environment context in the menu. Remove the commands
4868 "default" and "timeout", and use variables instead.
4869
4870 * normal/menu.c: Include grub/env.h.
4871 (print_entry): Cast TITLE to silence gcc.
4872 (get_timeout): New function.
4873 (set_timeout): Likewise.
4874 (get_entry_number): Likewise.
4875 (run_menu): Use a default entry, a fallback entry and a timeout
4876 in the environment variables "default", "fallback" and
4877 "timeout". Also, tweak the default entry if it is not within the
4878 current menu entries.
4879 (grub_menu_run): Use a fallback entry in the environment variable
4880 "fallback".
4881
4882 * normal/main.c (read_config_file): Do not initialize
4883 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
4884 NEWMENU->TIMEOUT.
4885 (grub_normal_execute): Use a data slot to store the menu.
4886
4887 * include/grub/normal.h (struct grub_menu): Removed default_entry,
4888 fallback_entry and timeout.
4889 (struct grub_menu_list): Removed.
4890 (grub_menu_list_t): Likewise.
4891 (struct grub_context): Likewise.
4892 (grub_context_t): Likewise.
4893 (grub_context_get): Likewise.
4894 (grub_context_get_current_menu): Likewise.
4895 (grub_context_push_menu): Likewise.
4896 (grub_context_pop_menu): Likewise.
4897 (grub_default_init): Likewise.
4898 (grub_default_fini): Likewise.
4899 (grub_timeout_init): Likewise.
4900 (grub_timeout_fini): Likewise.
4901
4902 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
4903 and timeout.mod.
4904 (normal_mod_SOURCES): Removed normal/context.c.
4905
4906 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
4907 commands/default.c, commands/timeout.c and normal/context.c.
4908 (normal_mod_SOURCES): Removed normal/context.c.
4909
4910 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
4911 commands/timeout.c and normal/context.c.
4912 (normal_mod_SOURCES): Removed normal/context.c.
4913
4914 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
4915 commands/default.c, commands/timeout.c and normal/context.c.
4916 (normal_mod_SOURCES): Removed normal/context.c.
4917
4918 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
4919 timeout.mod.
4920 (default_mod_SOURCES): Removed.
4921 (default_mod_CFLAGS): Likewise.
4922 (default_mod_LDFLAGS): Likewise.
4923 (timeout_mod_SOURCES): Removed.
4924 (timeout_mod_CFLAGS): Likewise.
4925 (timeout_mod_LDFLAGS): Likewise.
4926
4927 * DISTLIST: Removed commands/default.c, commands/timeout.c and
4928 normal/context.c.
4929
4930 * commands/default.c: Removed.
4931 * commands/timeout.c: Likewise.
4932 * normal/context.c: Likewise.
4933
1eb9cc1d 49342006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
4935
4936 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
4937
385bd9c1 49382006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
4939
4940 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
4941 "next" to "prev" for readability.
4942 (struct grub_env_sorted_var): New struct.
4943 (grub_env_context): Renamed to ...
4944 (initial_context): ... this.
4945 (grub_env_var_context): Renamed to ...
4946 (current_context): ... this.
4947 (grub_env_find): Look only at CURRENT_CONTEXT.
4948 (grub_env_context_open): Rewritten to copy exported variables from
4949 previous context.
4950 (grub_env_context_close): Rewritten according to the new
4951 scheme. Also, add an assertion to prevent the initial context from
4952 removed.
4953 (grub_env_insert): Removed the code for the sorted list.
4954 (grub_env_remove): Likewise.
4955 (grub_env_export): Simply mark the variable with
4956 GRUB_ENV_VAR_GLOBAL.
4957 (grub_env_set): A cosmetic change for naming consistency.
4958 (grub_env_get): Likewise.
4959 (grub_env_unset): Likewise.
4960 (grub_env_iterate): Rewritten to sort variables within this
4961 function.
4962 (grub_register_variable_hook): Fixed for naming consistency. Call
4963 grub_env_find again, only if NAME is not found at the first time.
4964 (mangle_data_slot_name): New function.
4965 (grub_env_set_data_slot): Likewise.
4966 (grub_env_get_data_slot): Likewise.
4967 (grub_env_unset_data_slot): Likewise.
4968
4969 * include/grub/env.h (grub_env_var_type): New enum.
4970 (GRUB_ENV_VAR_LOCAL): New constant.
4971 (GRUB_ENV_VAR_GLOBAL): Likewise.
4972 (GRUB_ENV_VAR_DATA): Likewise.
4973 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
4974 "type".
4975 (grub_env_set): Replace VAR with NAME for consistency.
4976 (grub_register_variable_hook): Likewise.
4977 (grub_env_export): Specify the name of the argument.
4978 (grub_env_set_data_slot): New prototype.
4979 (grub_env_get_data_slot): Likewise.
4980 (grub_env_unset_data_slot): Likewise.
4981
7f362539 49822006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
4983
4984 Extend the loader so that GRUB can accept a loader which comes
4985 back to GRUB when a loaded image exits. Also, this change adds
4986 support for a chainloader on EFI.
4987
4988 * term/efi/console.c: Include grub/misc.h.
4989 (grub_console_checkkey): Display a scan code on the top for
4990 debugging. This will be removed once the EFI port gets stable.
4991 Correct the scan code mapping.
4992
4993 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
4994 allocate memory from larger regions, in order to reduce the number
4995 of allocated regions. Otherwise, the MacOSX loader panics.
4996 (filter_memory_map): Avoid less than 1MB for compatibility with
4997 other loaders.
4998 (add_memory_regions): Allocate from the tail of a region, if
4999 possible, to avoid allocating a region near to 1MB, for the MacOSX
5000 loader.
5001
5002 * kern/efi/init.c (grub_efi_set_prefix): Specify
5003 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
5004
5005 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
5006 argument IMAGE_HANDLE and specify it to get a loaded image.
5007 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
5008 grub_efi_get_loaded_image.
5009 (grub_efi_get_filename): Divide the legnth by the size of
5010 grub_efi_char16_t.
5011 (grub_efi_get_device_path): New function.
5012 (grub_efi_print_device_path): Print End Device Path nodes. Divide
5013 the length by the size of grub_efi_char16_t for a file path device
5014 path node.
5015
5016 * kern/loader.c (grub_loader_noreturn): New variable.
5017 (grub_loader_set): Accept a new argument NORETURN. Set
5018 GRUB_LOADER_NORETURN to NORETURN.
5019 All callers changed.
5020 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
5021 grub_machine_fini.
5022
5023 * include/grub/efi/efi.h (grub_efi_get_device_path): New
5024 prototype.
5025 (grub_efi_get_loaded_image): Take an argument to specify an image
5026 handle.
5027
5028 * include/grub/loader.h (grub_loader_set): Added one more argument
5029 NORETURN.
5030
5031 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
5032 instead of grub_efi_open_protocol.
5033 (grub_efidisk_get_device_name): Likewise.
5034 (grub_efidisk_close): Print a newline.
5035 (grub_efidisk_get_device_handle): Fixed to use
5036 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
5037 GRUB_EFI_DEVICE_PATH_TYPE.
5038
5039 * disk/efi/efidisk.c (device_path_guid): Moved to ...
5040 * kern/efi/efi.c (device_path_guid): ... here.
5041
5042 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
5043 chain.mod.
5044 (kernel_mod_HEADERS): Added efi/disk.h.
5045 (_chain_mod_SOURCES): New variable.
5046 (_chain_mod_CFLAGS): Likewise.
5047 (_chain_mod_LDFLAGS): Likewise.
5048 (chain_mod_SOURCES): Likewise.
5049 (chain_mod_CFLAGS): Likewise.
5050 (chain_mod_LDFLAGS): Likewise.
5051
5052 * DISTLIST: Added include/grub/efi/chainloader.h,
5053 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
5054
5055 * include/grub/efi/chainloader.h: New file.
5056 * loader/efi/chainloader.c: Likewise.
5057 * loader/efi/chainloader_normal.c: Likewise.
5058
c0111d6e 50592006-04-30 Marco Gerards <marco@gnu.org>
5060
5061 * commands/configfile.c (grub_cmd_source): New function.
5062 (GRUB_MOD_INIT): Register the commands `source' and `.'.
5063 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
5064
df5341da 50652006-04-30 Marco Gerards <marco@gnu.org>
5066
5067 * normal/execute.c (grub_script_execute_cmd): Change the return
5068 type to `grub_err_t'. Correctly return the error.
5069 (grub_script_execute_cmdline): In case a command line is not a
5070 command or a function, try to interpret it as an assignment.
5071
f85934bd 50722006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
5073
5074 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
5075 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
5076 skip a node whose name is obviously invalid as UTF-16,
5077 i.e. contains a NUL character. Stop the iteration when the last
5078 directory entry is found. Instead of using the return value of
5079 grub_hfsplus_btree_iterate_node, store the value in RET and use
5080 it, because the iterator can be stopped by the last directory
5081 entry.
5082
8f8a2cf8 50832006-04-30 Marco Gerards <marco@gnu.org>
5084
5085 * include/grub/env.h (grub_env_export): New prototype. Reported
5086 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
5087
a27e84ce 50882006-04-30 Marco Gerards <marco@gnu.org>
5089
5090 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
5091 size of the extents in a catalog file record.
5092
eaef0553 50932006-04-29 Marco Gerards <marco@gnu.org>
5094
5095 * commands/configfile.c (grub_cmd_configfile): Execute the
5096 configfile within its own context.
5097
5098 * include/grub/env.h (grub_env_context_open): New prototype.
5099 (grub_env_context_close): Likewise.
5100
5101 * kern/env.c (grub_env): Removed.
5102 (grub_env_sorted): Likewise.
5103 (grub_env_context): New variable.
5104 (grub_env_var_context): Likewise.
5105 (grub_env_find): Search both the active context and the global
5106 context.
5107 (grub_env_context_open): New function.
5108 (grub_env_context_close): Likewise.
5109 (grub_env_insert): Likewise.
5110 (grub_env_remove): Likewise.
5111 (grub_env_export): Likewise.
5112 (grub_env_set): Changed to use helper functions to avoid code
5113 duplication.
5114 (grub_env_iterate): Rewritten so both the current context and the
5115 global context are being used.
5116
5117 * normal/command.c (export_command): New function.
5118 (grub_command_init): Register the `export' function.
5119
7b455f4d 51202006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
5121
5122 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
5123 explicitly to suppress gcc's warnings.
5124 * fs/fat.c (grub_fat_find_dir): Likewise.
5125 (grub_fat_label): Likewise.
5126 * fs/xfs.c (grub_xfs_read_inode): Likewise.
5127 (grub_xfs_mount): Likewise.
5128 (grub_xfs_label): Likewise.
5129 * fs/affs.c (grub_affs_mount): Likewise.
5130 (grub_affs_label): Likewise.
5131 (grub_affs_iterate_dir): Likewise.
5132 * fs/sfs.c (grub_sfs_mount): Likewise.
5133 (grub_sfs_iterate_dir): Likewise.
5134 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
5135 * fs/hfs.c (grub_hfs_mount): Likewise.
5136 (grub_hfs_cmp_catkeys): Likewise.
5137 (grub_hfs_find_dir): Likewise.
5138 (grub_hfs_dir): Likewise.
5139 (grub_hfs_label): Likewise.
5140 * fs/jfs.c (grub_jfs_mount): Likewise.
5141 (grub_jfs_opendir): Likewise.
5142 (grub_jfs_getent): Likewise.
5143 (grub_jfs_lookup_symlink): Likewise.
5144 (grub_jfs_label): Likewise.
5145 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
5146 (grub_hfsplus_iterate_dir): Likewise.
5147 (grub_hfsplus_btree_iterate_node): Made static.
5148
5149 * util/grub-emu.c (prefix): New variable.
5150 (grub_machine_set_prefix): New function.
5151 (main): Do not set the environment variable "prefix" here. Only
5152 set PREFIX, which is used later by grub_machine_set_prefix.
5153
5154 * include/grub/video.h: Do not include grub/symbol.h.
5155 (grub_video_register): Not exported. This symbol is not defined in
5156 the kernel.
5157 (grub_video_unregister): Likewise.
5158 (grub_video_iterate): Likewise.
5159 (grub_video_setup): Likewise.
5160 (grub_video_restore): Likewise.
5161 (grub_video_get_info): Likewise.
5162 (grub_video_get_blit_format): Likewise.
5163 (grub_video_set_palette): Likewise.
5164 (grub_video_get_palette): Likewise.
5165 (grub_video_set_viewport): Likewise.
5166 (grub_video_get_viewport): Likewise.
5167 (grub_video_map_color): Likewise.
5168 (grub_video_map_rgb): Likewise.
5169 (grub_video_map_rgba): Likewise.
5170 (grub_video_fill_rect): Likewise.
5171 (grub_video_blit_glyph): Likewise.
5172 (grub_video_blit_bitmap): Likewise.
5173 (grub_video_blit_render_target): Likewise.
5174 (grub_video_scroll): Likewise.
5175 (grub_video_swap_buffers): Likewise.
5176 (grub_video_create_render_target): Likewise.
5177 (grub_video_delete_render_target): Likewise.
5178 (grub_video_set_active_render_target): Likewise.
5179
5180 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
5181 Undefined.
5182 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
5183
5184 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
5185 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5186 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5187 instead of $(srcdir)/genkernsyms.sh.
5188
5189 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
5190 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5191 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5192 instead of $(srcdir)/genkernsyms.sh.
5193
5194 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
5195 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5196 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5197 instead of $(srcdir)/genkernsyms.sh.
5198
5199 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
5200 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
5201 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
5202 instead of $(srcdir)/genkernsyms.sh.
5203
5204 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
5205 genkernsyms.sh.
5206
5207 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
5208 genkernsyms.sh.
5209 (gensymlist.sh): New target.
5210 (genkernsyms.sh): Likewise.
5211
5212 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
5213 genkernsyms.sh.in and gensymlist.sh.in.
5214
5215 * genkernsyms.sh: Removed.
5216 * gensymlist.sh: Likewise.
5217
5218 * genkernsyms.sh.in: New file.
5219 * gensymlist.sh.in: Likewise.
5220
1885bb27 52212006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5222
5223 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
5224 clobber "prefix", since we may have already set it manually.
5225
71538dff 52262006-04-25 Hollis Blanchard <hollis@penguinppc.org>
5227
5228 * kern/misc.c (abort): New alias for grub_abort.
5229
2965c7cc 52302006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
5231
5232 A new machine-specific function "grub_machine_set_prefix" is
5233 defined. This is called after loading modules, so that a prefix
5234 initialization can use modules. Also, this change adds an
5235 intensive debugging feature for the memory manager via the
5236 configure option "--enable-mm-debug".
5237
5238 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
5239 PART.LEN.
5240
5241 * kern/sparc64/ieee1275/init.c (abort): Removed.
5242 (grub_stop): Likewise.
5243 (grub_exit): New function.
5244 (grub_set_prefix): Renamed to ...
5245 (grub_machine_set_prefix): ... this.
5246 (grub_machine_init): Do not call grub_set_prefix.
5247
5248 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
5249 (grub_machine_set_prefix): ... this.
5250 (grub_machine_init): Do not call grub_set_prefix.
5251
5252 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
5253 (grub_machine_init): Do not set the prefix here.
5254
5255 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
5256
5257 * kern/efi/init.c: Include grub/mm.h.
5258 (grub_efi_set_prefix): New function.
5259
5260 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
5261 (grub_efi_get_filename): New function.
5262 (grub_print_device_path): Renamed to ...
5263 (grub_efi_print_device_path): ... this.
5264
5265 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
5266 [MM_DEBUG] (grub_realloc): Likewise.
5267 [MM_DEBUG] (grub_free): Likewise.
5268 [MM_DEBUG] (grub_memalign): Likewise.
5269 [MM_DEBUG] (grub_mm_debug): New variable.
5270 [MM_DEBUG] (grub_debug_malloc): New function.
5271 [MM_DEBUG] (grub_debug_free): New function.
5272 [MM_DEBUG] (grub_debug_realloc): New function.
5273 [MM_DEBUG] (grub_debug_memalign): New function.
5274
5275 * kern/misc.c (grub_abort): Print a newline to distinguish
5276 the message.
5277
5278 * kern/main.c (grub_main): Call grub_machine_set_prefix and
5279 grub_set_root_dev after loading modules. This is necessary when
5280 setting a prefix depends on modules.
5281
5282 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
5283 (grub_efi_print_device_path): ... this.
5284 (grub_efi_get_filename): New prototype.
5285 (grub_efi_set_prefix): Likewise.
5286
5287 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
5288 and grub/disk.h.
5289 (grub_efidisk_get_device_handle): New prototype.
5290 (grub_efidisk_get_device_name): Likewise.
5291
5292 * include/grub/mm.h: Include config.h.
5293 (MM_DEBUG): Removed.
5294 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
5295 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
5296 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
5297 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
5298 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
5299 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
5300 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
5301 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
5302 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
5303
5304 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
5305
5306 * disk/efi/efidisk.c: Include grub/partition.h.
5307 (iterate_child_devices): New function.
5308 (add_device): First, compare only last device path nodes, so that
5309 devices are sorted by the types.
5310 (grub_efidisk_get_device_handle): New function.
5311 (grub_efidisk_get_device_name): Likewise.
5312
5313 * configure.ac (--enable-mm-debug): New option to enable the
5314 memory manager debugging feature. This makes the binary much
5315 bigger, so is disabled by default.
5316
9cacaa17 53172006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
5318
5319 Use grub_abort instead of grub_stop, and grub_exit must be
5320 define in each architecture now. Also, this change adds support
5321 for EFI disks.
5322
5323 * util/i386/pc/grub-probefs.c: Include grub/term.h.
5324 (grub_getkey): New function.
5325 (grub_term_get_current): Likewise.
5326
5327 * util/i386/pc/grub-setup.c: Include grub/term.h.
5328 (grub_getkey): New function.
5329 (grub_term_get_current): Likewise.
5330
5331 * util/misc.c (grub_stop): Renamed to ...
5332 (grub_exit): ... this.
5333
5334 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
5335 (grub_exit): ... this.
5336 (grub_machine_init): Use grub_abort instead of abort.
5337 (grub_stop): Removed.
5338
5339 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
5340 abort.
5341
5342 * kern/i386/pc/startup.S (grub_exit): New function.
5343 (cold_reboot): New label.
5344
5345 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
5346 (grub_efi_init): Call grub_efidisk_init.
5347 (grub_efi_fini): Call grub_efidisk_fini.
5348
5349 * kern/efi/efi.c: Include grub/mm.h.
5350 (grub_efi_console_control_guid): Renamed to ...
5351 (console_control_guid): ... this.
5352 (grub_efi_loaded_image_guid): Renamed to ...
5353 (loaded_image_guid): ... this.
5354 (grub_efi_locate_handle): New function.
5355 (grub_efi_open_protocol): Likewise.
5356 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
5357 GRUB_EFI_CONSOLE_CONTROL_GUID.
5358 (grub_efi_exit): Removed.
5359 (grub_stop): Likewise.
5360 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
5361 (grub_exit): New function.
5362 (grub_print_device_path): Likewise.
5363
5364 * kern/rescue.c (grub_rescue_cmd_exit): New function.
5365 (grub_enter_rescue_mode): Register "exit".
5366
5367 * kern/misc.c (grub_real_dprintf): A cosmetic change.
5368 (grub_abort): New function.
5369
5370 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
5371
5372 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
5373
5374 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
5375
5376 * include/grub/efi/efi.h (grub_efi_exit): Removed.
5377 (grub_print_device_path): New prototype.
5378 (grub_efi_locate_handle): Likewise.
5379 (grub_efi_open_protocol): Likewise.
5380
5381 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
5382 * disk/efi/efidisk.c: Likewise.
5383
5384 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
5385
5386 * include/grub/efi/console_control.h
5387 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
5388
5389 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
5390 last 8 bytes as an array.
5391 (GRUB_EFI_DISK_IO_GUID): New macro.
5392 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
5393 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
5394 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
5395 grub_uint8_t.
5396 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
5397 (struct grub_efi_device_path): Rename the member "sub_type" to
5398 "subtype".
5399 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
5400 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
5401 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
5402 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
5403 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
5404 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
5405 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
5406 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
5407 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
5408 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
5409 (struct grub_efi_pci_device_path): New structure.
5410 (grub_efi_pci_device_path_t): New type.
5411 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
5412 (struct grub_efi_pccard_device_path): New structure.
5413 (grub_efi_pccard_device_path_t): New type.
5414 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
5415 (struct grub_efi_memory_mapped_device_path): New structure.
5416 (grub_efi_memory_mapped_device_path_t): New type.
5417 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
5418 (struct grub_efi_vendor_device_path): New structure.
5419 (grub_efi_vendor_device_path_t): New type.
5420 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
5421 (struct grub_efi_controller_device_path): New structure.
5422 (grub_efi_controller_device_path_t): New type.
5423 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
5424 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
5425 (struct grub_efi_acpi_device_path): New structure.
5426 (grub_efi_acpi_device_path_t): New type.
5427 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
5428 (struct grub_efi_expanded_acpi_device_path): New structure.
5429 (grub_efi_expanded_acpi_device_path_t): New type.
5430 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
5431 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
5432 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
5433 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
5434 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
5435 (struct grub_efi_atapi_device_path): New structure.
5436 (grub_efi_atapi_device_path_t): New type.
5437 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
5438 (struct grub_efi_fibre_channel_device_path): New structure.
5439 (grub_efi_fibre_channel_device_path_t): New type.
5440 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
5441 (struct grub_efi_1394_device_path): New structure.
5442 (grub_efi_1394_device_path_t): New type.
5443 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
5444 (struct grub_efi_usb_device_path): New structure.
5445 (grub_efi_usb_device_path_t): New type.
5446 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
5447 (struct grub_efi_usb_class_device_path): New structure.
5448 (grub_efi_usb_class_device_path_t): New type.
5449 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
5450 (struct grub_efi_i2o_device_path): New structure.
5451 (grub_efi_i2o_device_path_t): New type.
5452 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
5453 (struct grub_efi_mac_address_device_path): New structure.
5454 (grub_efi_mac_address_device_path_t): New type.
5455 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
5456 (struct grub_efi_ipv4_device_path): New structure.
5457 (grub_efi_ipv4_device_path_t): New type.
5458 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
5459 (struct grub_efi_ipv6_device_path): New structure.
5460 (grub_efi_ipv6_device_path_t): New type.
5461 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
5462 (struct grub_efi_infiniband_device_path): New structure.
5463 (grub_efi_infiniband_device_path_t): New type.
5464 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
5465 (struct grub_efi_uart_device_path): New structure.
5466 (grub_efi_uart_device_path_t): New type.
5467 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
5468 (struct grub_efi_vendor_messaging_device_path): New structure.
5469 (grub_efi_vendor_messaging_device_path_t): New type.
5470 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
5471 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
5472 (struct grub_efi_hard_drive_device_path): New structure.
5473 (grub_efi_hard_drive_device_path_t): New type.
5474 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
5475 (struct grub_efi_cdrom_device_path): New structure.
5476 (grub_efi_cdrom_device_path_t): New type.
5477 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
5478 (struct grub_efi_vendor_media_device_path): New structure.
5479 (grub_efi_vendor_media_device_path_t): New type.
5480 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
5481 (struct grub_efi_file_path_device_path): New structure.
5482 (grub_efi_file_path_device_path_t): New type.
5483 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
5484 (struct grub_efi_protocol_device_path): New structure.
5485 (grub_efi_protocol_device_path_t): New type.
5486 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
5487 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
5488 (struct grub_efi_bios_device_path): New structure.
5489 (grub_efi_bios_device_path_t): New type.
5490 (struct grub_efi_disk_io): New structure.
5491 (grub_efi_disk_io_t): New type.
5492 (struct grub_efi_block_io_media): New structure.
5493 (grub_efi_block_io_media_t): New type.
5494 (struct grub_efi_block_io): New structure.
5495 (grub_efi_block_io_t): New type.
5496
5497 * include/grub/misc.h (grub_stop): Removed.
5498 (grub_exit): New prototype.
5499 (grub_abort): Likewise.
5500
5501 * include/grub/disk.h (enum grub_disk_dev_id): Added
5502 GRUB_DISK_DEVICE_EFIDISK_ID.
5503
5504 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
5505 disk/efi/efidisk.c.
5506 (kernel_syms.lst): Remove the target if an error occurs.
5507
49986a9f 55082006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
5509
5510 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
5511 as it was simply too buggy.
5512
970d3b8a 55132006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
5514
5515 * kern/misc.c (grub_lltoa): New function.
5516 (grub_vsprintf): Added support for the long long suffix,
5517 i.e. "ll".
5518
ff04ec24 55192006-04-20 Hollis Blanchard <hollis@penguinppc.org>
5520
5521 * Makefile.in (LDFLAGS): Add variable.
5522 (LD): Remove variable.
5523 * configure.ac: Add -m32 to LDFLAGS.
5524 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
5525 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
5526 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
5527 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
5528 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
5529 variables.
5530 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
5531 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
5532 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
5533
37e5e1a4 55342006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
5535
5536 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
5537 length for unknown glyph.
5538
c352d8dd 55392006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5540
2eab1c0d 5541 Add support for pre-loaded modules into the EFI port.
5542
5543 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
5544 completely. Accept one more argument DIR. The caller has changed.
5545
5546 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
5547
5548 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
5549 (grub_efi_loaded_image_guid): New variable.
5550 (grub_efi_get_loaded_image): New function.
5551 (grub_arch_modules_addr): Likewise.
5552
5553 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
5554 prototype.
5555
5556 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
5557 (struct grub_efi_loaded_image): New structure.
5558 (grub_efi_loaded_image_t): New type.
5559
55602006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
5561
c352d8dd 5562 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
5563 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
5564 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
5565
6d01d6b4 55662006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
5567
5568 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
5569
976a4ea0 55702006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
5571
5572 * DISTLIST: Added include/grub/efi/console.h,
5573 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
5574 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5575
5576 * include/grub/efi/console.h: New file.
5577 * include/grub/efi/time.h: Likewise.
5578 * include/grub/i386/efi/kernel.h: Likewise.
5579 * kern/efi/init.c: Likewise.
5580 * kern/efi/mm.c: Likewise.
5581 * term/efi/console.c: Likewise.
5582
5583 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
5584 (grub_stop): Removed.
5585 (grub_get_rtc): Likewise.
5586 (grub_machine_init): Simply call grub_efi_init.
5587 (grub_machine_fini): Call grub_efi_fini.
5588
5589 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
5590 (grub_efi_output_string): Removed.
5591 (grub_efi_stall): New function.
5592 (grub_stop): Likewise.
5593 (grub_get_rtc): Likewise.
5594
5595 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
5596 (grub_efi_stall): New prototype.
5597 (grub_efi_allocate_pages): Likewise.
5598 (grub_efi_free_pages): Likewise.
5599 (grub_efi_get_memory_map): Likewise.
5600 (grub_efi_mm_init): Likewise.
5601 (grub_efi_mm_fini): Likewise.
5602 (grub_efi_init): Likewise.
5603 (grub_efi_fini): Likewise.
5604
5605 * include/grub/i386/efi/time.h: Do not include
5606 grub/symbol.h. Include grub/efi/time.h.
5607 (GRUB_TICKS_PER_SECOND): Removed.
5608 (grub_get_rtc): Likewise.
5609
5610 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
5611 Added padding. The EFI spec is buggy.
5612 (GRUB_EFI_BLACK): New macro.
5613 (GRUB_EFI_BLUE): Likewise.
5614 (GRUB_EFI_GREEN): Likewise.
5615 (GRUB_EFI_CYAN): Likewise.
5616 (GRUB_EFI_RED): Likewise.
5617 (GRUB_EFI_MAGENTA): Likewise.
5618 (GRUB_EFI_BROWN): Likewise.
5619 (GRUB_EFI_LIGHTGRAY): Likewise.
5620 (GRUB_EFI_BRIGHT): Likewise.
5621 (GRUB_EFI_DARKGRAY): Likewise.
5622 (GRUB_EFI_LIGHTBLUE): Likewise.
5623 (GRUB_EFI_LIGHTGREEN): Likewise.
5624 (GRUB_EFI_LIGHTCYAN): Likewise.
5625 (GRUB_EFI_LIGHTRED): Likewise.
5626 (GRUB_EFI_LIGHTMAGENTA): Likewise.
5627 (GRUB_EFI_YELLOW): Likewise.
5628 (GRUB_EFI_WHITE): Likewise.
5629 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
5630 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
5631 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
5632 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
5633 (GRUB_EFI_BACKGROUND_RED): Likewise.
5634 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
5635 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
5636 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
5637 (GRUB_EFI_TEXT_ATTR): Likewise.
5638
5639 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
5640 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
5641 (kernel_mod_HEADERS): Added efi/time.h.
5642
83709125 56432006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
5644
5645 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
5646 include/grub/efi/api.h, include/grub/efi/console_control.h,
5647 include/grub/efi/efi.h, include/grub/efi/pe32.h,
5648 include/grub/i386/efi/time.h, kern/efi/efi.c,
5649 kern/i386/efi/init.c, kern/i386/efi/startup.S,
5650 and util/i386/efi/grub-mkimage.c.
5651
5652 * Makefile.in (RMKFILES): Added i386-efi.rmk.
5653
5654 * genmk.rb (PModule#rule): Do not export symbols if
5655 #{prefix}_EXPORTS is set to "no".
5656
5657 * conf/i386-efi.mk: New file.
5658 * conf/i386-efi.rmk: Likewise.
5659 * include/grub/efi/api.h: Likewise.
5660 * include/grub/efi/console_control.h: Likewise.
5661 * include/grub/efi/efi.h: Likewise.
5662 * include/grub/efi/pe32.h: Likewise.
5663 * include/grub/i386/efi/time.h: Likewise.
5664 * kern/efi/efi.c: Likewise.
5665 * kern/i386/efi/init.c: Likewise.
5666 * kern/i386/efi/startup.S: Likewise.
5667 * util/i386/efi/grub-mkimage.c: Likewise.
5668
56692006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 5670
5671 * include/grub/script.h: Include <grub/parser.h> and
5672 "grub_script.tab.h".
5673 (struct grub_lexer_param): New struct.
5674 (struct grub_parser_param): Likewise.
5675 (grub_script_create_arglist): Pass the state in an argument.
5676 (grub_script_add_arglist): Likewise.
5677 (grub_script_create_cmdline): Likewise.
5678 (grub_script_create_cmdblock): Likewise.
5679 (grub_script_create_cmdif): Likewise.
5680 (grub_script_create_cmdmenu): Likewise.
5681 (grub_script_add_cmd): Likewise.
5682 (grub_script_arg_add): Likewise.
5683 (grub_script_lexer_ref): Likewise.
5684 (grub_script_lexer_deref): Likewise.
5685 (grub_script_lexer_record_start): Likewise.
5686 (grub_script_lexer_record_stop): Likewise.
5687 (grub_script_mem_record): Likewise.
5688 (grub_script_mem_record_stop): Likewise.
5689 (grub_script_malloc): Likewise.
5690 (grub_script_yylex): Likewise.
5691 (grub_script_yyparse): Likewise.
5692 (grub_script_yyerror): Likewise.
5693 (grub_script_yylex): Likewise.
5694 (grub_script_lexer_init): Return the state.
5695
5696 * normal/lexer.c (grub_script_lexer_state): Removed variable.
5697 (grub_script_lexer_done): Likewise.
5698 (grub_script_lexer_getline): Likewise.
5699 (grub_script_lexer_refs): Likewise.
5700 (script): Likewise.
5701 (newscript): Likewise.
5702 (record): Likewise.
5703 (recording): Likewise.
5704 (recordpos): Likewise.
5705 (recordlen): Likewise.
5706 (grub_script_lexer_init): Return the state instead of setting
5707 global variables.
5708 (grub_script_lexer_ref): Use the newly added argument for state
5709 instead of globals.
5710 (grub_script_lexer_deref): Likewise.
5711 (grub_script_lexer_record_start): Likewise.
5712 (grub_script_lexer_record_stop): Likewise.
5713 (recordchar): Likewise.
5714 (nextchar): Likewise.
5715 (grub_script_yylex2): Likewise.
5716 (grub_script_yylex): Likewise.
5717 (grub_script_yyerror): Likewise.
5718
5719 * normal/parser.y (func_mem): Removed variable.
5720 (menu_entry): Likewise.
5721 (err): Likewise.
5722 (%lex-param): New parser option.
5723 (%parse-param): Likewise.
5724 (script): Always return the AST.
5725 (argument): Pass the state around.
5726 (arguments): Likewise.
5727 (grubcmd): Likewise.
5728 (commands): Likewise.
5729 (function): Likewise.
5730 (menuentry): Likewise.
5731 (if_statement): Likewise.
5732 (if): Likewise.
5733
5734 * normal/script.c (grub_script_memused): Removed variable.
5735 (grub_script_parsed): Likewise.
5736 (grub_script_malloc): Added a state argument. Use that instead of
5737 global variables.
5738 (grub_script_mem_record): Likewise.
5739 (grub_script_mem_record_stop): Likewise.
5740 (grub_script_arg_add): Likewise.
5741 (grub_script_add_arglist): Likewise.
5742 (grub_script_create_cmdline): Likewise.
5743 (grub_script_create_cmdif): Likewise.
5744 (grub_script_create_cmdmenu): Likewise.
5745 (grub_script_add_cmd): Likewise.
5746 (grub_script_parse): Setup the state before calling the parser.
5747
e2a8c904 57482006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 5749
5750 * normal/command.c (grub_command_init): Remove the title command.
5751
5752 * normal/lexer.c (grub_script_yylex): Renamed from this...
5753 (grub_script_yylex2): ... to this.
5754 (grub_script_yylex): New function. Temporary
5755 introduced to filter some tokens.
5756 (grub_script_yyerror): Print a newline.
5757
5758 * normal/main.c (read_config_file): Output information about the
5759 lines that contain errors. Wait for a key after all lines have
5760 been processed. Don't return an empty menu.
5761
5762 * normal/parser.y (func_mem): Don't initialize.
5763 (menu_entry): Likewise.
5764 (err): New variable.
5765 (script): Don't return anything when an error was encountered.
5766 (ws, returns): Removed rules.
5767 (argument): Disabled concatenated variable support.
5768 (arguments): Remove explicit separators.
5769 (grubcmd): Likewise.
5770 (function): Likewise.
5771 (menuentry): Likewise.
5772 (if): Likewise.
5773 (commands): Likewise. Add error handling.
5774
5775 * normal/script.c (grub_script_create_cmdline): If
5776 `grub_script_parsed' is 0, assume the parser encountered an error.
5777
c9a86192 57782006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
5779
5780 * configure.ac: Add support for EFI. Fix the typo
5781 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
5782
70f3b243 57832006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5784
5785 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
5786 foreign multibyte characters should be shown correctly.
5787
65f201ad 57882006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
5789
5790 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
5791 calculation.
5792 (read_config_file): Made it to close file before returning.
5793
b4b93674 57942006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
5795
5796 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
5797 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
5798 video/i386/pc/vbefill.c.
5799
5800 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
5801 video/i386/pc/vbefill.c.
5802
5803 * include/grub/video.h (grub_video_blit_format): New enum.
5804 (grub_video_mode_info): Added new member blit_format.
5805 (grub_video_get_blit_format): New function prototype.
5806
5807 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
5808 function prototype.
5809 (grub_video_vbe_map_rgb): Likewise.
5810 (grub_video_vbe_unmap_color): Likewise.
5811
5812 * include/grub/i386/pc/vbeblit.h: New file.
5813
5814 * include/grub/i386/pc/vbefill.h: New file.
5815
5816 * video/video.c (grub_video_get_blit_format): New function.
5817 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
5818 (grub_video_vbe_map_rgb): Likewise.
5819 (grub_video_vbe_unmap_color): Likewise.
5820
5821 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
5822 optimized fills.
5823 (grub_video_vbe_blit_render_target): Changed to use more optimized
5824 blits.
5825 (grub_video_vbe_setup): Added detection for optimized settings.
5826 (grub_video_vbe_create_render_target): Likewise.
5827
5828 * video/i386/pc/vbeblit.c: New file.
5829
5830 * video/i386/pc/vbefill.c: New file.
5831
c2379b9c 58322006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
5833
5834 * font/manager.c (grub_font_get_glyph): Removed font fixup from
5835 here...
5836
5837 * util/unifont2pff.rb: ... and moved it to here. Improved argument
5838 parsing to support both hex and dec ranges. If filename was missing
5839 show usage information.
5840
bd0d7896 58412006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
5842
5843 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
5844 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
5845
5846 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
5847 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
5848 (video_mod_SOURCES): Added.
5849 (video_mod_CFLAGS): Likewise.
5850 (video_mod_LDFLAGS): Likewise.
5851 (gfxterm_mod_SOURCES): Likewise.
5852 (gfxterm_mod_CFLAGS): Likewise.
5853 (gfxterm_mod_LDFLAGS): Likewise.
5854 (videotest_mod_SOURCES): Likewise.
5855 (videotest_mod_CFLAGS): Likewise.
5856 (videotest_mod_LDFLAGS): Likewise.
5857 (vesafb_mod_SOURCES): Removed.
5858 (vesafb_mod_CFLAGS): Likewise.
5859 (vesafb_mod_LDFLAGS): Likewise.
5860 (vga_mod_SOURCES): Likewise.
5861 (vga_mod_CFLAGS): Likewise.
5862 (vga_mod_LDFLAGS): Likewise.
5863
5864 * commands/videotest.c: New file.
5865
5866 * font/manager.c (fill_with_default_glyph): Modified to use
5867 grub_font_glyph.
5868 (grub_font_get_glyph): Likewise.
5869 (fontmanager): Renamed from this...
5870 (font_manager): ... to this.
5871
5872 * include/grub/font.h (grub_font_glyph): Added new structure.
5873 (grub_font_get_glyph): Modified to use grub_font_glyph.
5874
5875 * include/grub/misc.h (grub_abs): Added as inline function.
5876
5877 * include/grub/video.h: New file.
5878
5879 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
5880 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
5881 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
5882 (grub_vbe_get_controller_info): Renamed from this...
5883 (grub_vbe_bios_get_controller_info): ... to this.
5884 (grub_vbe_get_mode_info): Renamed from this...
5885 (grub_vbe_bios_get_mode_info): ... to this.
5886 (grub_vbe_set_mode): Renamed from this...
5887 (grub_vbe_bios_set_mode): ... to this.
5888 (grub_vbe_get_mode): Renamed from this...
5889 (grub_vbe_bios_get_mode): ... to this.
5890 (grub_vbe_set_memory_window): Renamed from this...
5891 (grub_vbe_bios_set_memory_window): ... to this.
5892 (grub_vbe_get_memory_window): Renamed from this...
5893 (grub_vbe_bios_get_memory_window): ... to this.
5894 (grub_vbe_set_scanline_length): Renamed from this...
5895 (grub_vbe_set_scanline_length): ... to this.
5896 (grub_vbe_get_scanline_length): Renamed from this...
5897 (grub_vbe_bios_get_scanline_length): ... to this.
5898 (grub_vbe_set_display_start): Renamed from this...
5899 (grub_vbe_bios_set_display_start): ... to this.
5900 (grub_vbe_get_display_start): Renamed from this...
5901 (grub_vbe_bios_get_display_start): ... to this.
5902 (grub_vbe_set_palette_data): Renamed from this...
5903 (grub_vbe_bios_set_palette_data): ... to this.
5904 (grub_vbe_set_pixel_rgb): Removed.
5905 (grub_vbe_set_pixel_index): Likewise.
5906
5907 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
5908 from this...
5909 (grub_vbe_bios_get_controller_info): ... to this.
5910 (grub_vbe_get_mode_info): Renamed from this...
5911 (grub_vbe_bios_get_mode_info): ... to this.
5912 (grub_vbe_set_mode): Renamed from this...
5913 (grub_vbe_bios_set_mode): ... to this.
5914 (grub_vbe_get_mode): Renamed from this...
5915 (grub_vbe_bios_get_mode): ... to this.
5916 (grub_vbe_set_memory_window): Renamed from this...
5917 (grub_vbe_bios_set_memory_window): ... to this.
5918 (grub_vbe_get_memory_window): Renamed from this...
5919 (grub_vbe_bios_get_memory_window): ... to this.
5920 (grub_vbe_set_scanline_length): Renamed from this...
5921 (grub_vbe_set_scanline_length): ... to this.
5922 (grub_vbe_get_scanline_length): Renamed from this...
5923 (grub_vbe_bios_get_scanline_length): ... to this.
5924 (grub_vbe_set_display_start): Renamed from this...
5925 (grub_vbe_bios_set_display_start): ... to this.
5926 (grub_vbe_get_display_start): Renamed from this...
5927 (grub_vbe_bios_get_display_start): ... to this.
5928 (grub_vbe_set_palette_data): Renamed from this...
5929 (grub_vbe_bios_set_palette_data): ... to this.
5930 (grub_vbe_bios_get_controller_info): Fixed problem with registers
5931 getting corrupted after calling it. Added more pushes and pops.
5932 (grub_vbe_bios_set_mode): Likewise.
5933 (grub_vbe_bios_get_mode): Likewise.
5934 (grub_vbe_bios_get_memory_window): Likewise.
5935 (grub_vbe_bios_set_scanline_length): Likewise.
5936 (grub_vbe_bios_get_scanline_length): Likewise.
5937 (grub_vbe_bios_get_display_start): Likewise.
5938 (grub_vbe_bios_set_palette_data): Likewise.
5939
5940 * normal/cmdline.c (cl_set_pos): Refresh the screen.
5941 (cl_insert): Likewise.
5942 (cl_delete): Likewise.
5943
5944 * term/gfxterm.c: New file.
5945
5946 * term/i386/pc/vesafb.c: Removed file.
5947
5948 * video/video.c: New file.
5949
5950 * video/i386/pc/vbe.c (real2pm): Added new function.
5951 (grub_video_vbe_draw_pixel): Likewise.
5952 (grub_video_vbe_get_video_ptr): Likewise.
5953 (grub_video_vbe_get_pixel): Likewise
5954 (grub_video_vbe_init): Likewise.
5955 (grub_video_vbe_fini): Likewise.
5956 (grub_video_vbe_setup): Likewise.
5957 (grub_video_vbe_get_info): Likewise.
5958 (grub_video_vbe_set_palette): Likewise.
5959 (grub_video_vbe_get_palette): Likewise.
5960 (grub_video_vbe_set_viewport): Likewise.
5961 (grub_video_vbe_get_viewport): Likewise.
5962 (grub_video_vbe_map_color): Likewise.
5963 (grub_video_vbe_map_rgb): Likewise.
5964 (grub_video_vbe_map_rgba): Likewise.
5965 (grub_video_vbe_unmap_color): Likewise.
5966 (grub_video_vbe_fill_rect): Likewise.
5967 (grub_video_vbe_blit_glyph): Likewise.
5968 (grub_video_vbe_blit_bitmap): Likewise.
5969 (grub_video_vbe_blit_render_target): Likewise.
5970 (grub_video_vbe_scroll): Likewise.
5971 (grub_video_vbe_swap_buffers): Likewise.
5972 (grub_video_vbe_create_render_target): Likewise.
5973 (grub_video_vbe_delete_render_target): Likewise.
5974 (grub_video_vbe_set_active_render_target): Likewise.
5975 (grub_vbe_set_pixel_rgb): Remove function.
5976 (grub_vbe_set_pixel_index): Likewise.
5977 (index_color_mode): Remove static variable.
5978 (active_mode): Likewise.
5979 (framebuffer): Likewise.
5980 (bytes_per_scan_line): Likewise.
5981 (grub_video_vbe_adapter): Added new static variable.
5982 (framebuffer): Likewise.
5983 (render_target): Likewise.
5984 (initial_mode): Likewise.
5985 (mode_in_use): Likewise.
5986 (mode_list): Likewise.
5987
5f97350b 59882006-03-10 Marco Gerards <marco@gnu.org>
5989
5990 * configure.ac (AC_INIT): Bumped to 1.93.
5991
5992 * DISTLIST: Added `include/grub/hfs.h'.
5993
a3c5c6f8 59942006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
5995
5996 * boot/i386/pc/boot.S (general_error): Before looping, try INT
5997 18H, which might help the BIOS falling back to next boot media.
5998
6de53d26 59992006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
6000
6001 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
6002 Poe Chen <poe.poechen@gmail.com>.
6003
77c4a393 60042006-01-17 Marco Gerards <marco@gnu.org>
6005
6006 * include/grub/normal.h: Include <grub/script.h>.
6007 (grub_command_list): Removed struct.
6008 (grub_command_list_t): Removed type.
6009 (grub_menu_entry): Remove members `num' and `command_list'. Add
6010 members `commands' and `sourcecode'.
6011 * include/grub/script.h: Add inclusion guards.
6012 (grub_script_cmd_menuentry): New struct.
6013 (grub_script_execute_menuentry): New prototype.
6014 (grub_script_lexer_record_start): Likewise.
6015 (grub_script_lexer_record_stop): Likewise.
6016 * normal/execute.c (grub_script_execute_menuentry): New function.
6017 * normal/lexer.c (record, recording, recordpos, recordlen): New
6018 variables.
6019 (grub_script_lexer_record_start): New function.
6020 (grub_script_lexer_record_stop): Likewise.
6021 (recordchar): Likewise.
6022 (nextchar): Likewise.
6023 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
6024 2048 as the buffer size. Add the tokens `menuentry' and `@'.
6025 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
6026 (current_menu): New variable.
6027 (free_menu): Mainly rewritten.
6028 (grub_normal_menu_addentry): New function.
6029 (read_config_file): Rewritten.
6030 * normal/menu.c (run_menu_entry): Mainly rewritten.
6031 * normal/menu_entry.c (make_screen): Rewritten te code to insert
6032 the menu entry.
6033 (run): Mainly rewritten.
6034 * normal/parser.y (menu_entry): New variable.
6035 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
6036 (menuentry): New rule.
6037 (command): Add `menuentry'.
6038 (if_statement): Allow additional returns before `fi'.
6039 * normal/script.c (grub_script_create_cmdmenu): New function.
6040
144f1f98 60412006-01-03 Marco Gerards <marco@gnu.org>
6042
6043 * INSTALL: GNU Bison is required.
6044 * configure.ac: Rewritten the test to detect Bison.
6045 * Makefile.in (YACC): New variable. Reported by Xun Sun
6046 <xun.sun.cn@gmail.com>.
6047
af4b2d89 60482006-01-03 Marco Gerards <marco@gnu.org>
6049
6050 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
6051 the HFS+ filesystem to filesystem blocks.
6052 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
6053 GCC warning is silenced.
6054
15643b71 60552006-01-03 Marco Gerards <marco@gnu.org>
6056
6057 * partmap/apple.c (apple_partition_map_iterate): Convert the data
6058 read from disk from big endian to host byte order.
6059
00905879 60602006-01-03 Hollis Blanchard <hollis@penguinppc.org>
6061
6062 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
6063 documentation.
6064 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
6065 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
6066 embedded HFS+ filesystem.
6067 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
6068 (grub_hfs_sblock): Move from here...
6069 * include/grub/hfs.h: To here... New file.
6070 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
6071 documentation.
6072 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
6073 New macros.
6074 (grub_hfsplus_volheader): Change type of member `magic' to
6075 `grub_uint16_t'.
6076 (grub_hfsplus_data): Add new member `embedded_offset'.
6077 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
6078 returned block.
6079 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
6080 Calculate the offset.
6081
8899bc3e 60822005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6083
6084 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
6085 Removed.
6086 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
6087
ae8c0277 60882005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6089
6090 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
6091 ENV->NAME is NULL after allocating ENV->VALUE.
6092
07084456 60932005-12-25 Marco Gerards <marco@gnu.org>
6094
6095 * kern/env.c (grub_env_set): Rewritten the error handling code.
6096
4750f5f1 60972005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6098
6099 * geninit.sh: Made more robust, and more portable.
6100
50214199 61012005-12-25 Marco Gerards <marco@gnu.org>
6102
6103 Add support for Apple HFS+ filesystems.
6104
6105 * fs/hfsplus.c: New file.
6106
6107 * DISTLIST: Added `fs/hfsplus.c'.
6108
6109 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
6110 (hfsplus_mod_SOURCES): New variable.
6111 (hfsplus_mod_CFLAGS): Likewise.
6112 (hfsplus_mod_LDFLAGS): Likewise.
6113 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
6114 (grub_setup_SOURCES): Likewise.
6115 (grub_mkdevicemap_SOURCES): Likewise.
6116 (grub_emu_SOURCES): Likewise.
6117 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6118
6119 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
6120
6121 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
6122
befaed6c 61232005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
6124
6125 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
6126 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
6127 include/grub/parser.h, include/grub/script.h, kern/parser.c,
6128 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
6129 normal/lexer.c, normal/parser.y, normal/script.c, and
6130 partmap/gpt.c.
6131 Removed kern/sparc64/cache.c.
6132
6133 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
6134 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
6135 grub_emu_init.c.
6136
6137 * configure.ac (AC_INIT): Bumped to 1.92.
6138
6a124103 61392005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
6140
6141 * kern/err.c (grub_error_push): Added new function to support error
6142 stacks.
6143 (grub_error_pop): Likewise.
6144 (grub_error_stack_items): New local variable to support error stacks.
6145 (grub_error_stack_pos): Likewise.
6146 (grub_error_stack_assert): Likewise.
6147 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
6148 stack depth.
6149 (grub_print_error): Added support to print errors from error stack.
6150
6151 * include/grub/err.h (grub_error_push): Added function prototype.
6152 (grub_error_pop): Likewise.
6153
be973c1b 61542005-12-09 Hollis Blanchard <hollis@penguinppc.org>
6155
6156 * configure.ac: Accept `powerpc64' as host_cpu.
6157 (amd64): Rename to `biarch32'.
6158
6159 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
6160 non-cacheline-aligned addresses.
6161
6162 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
6163 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
6164 if `size' is non-zero.
6165
b04216ab 61662005-12-03 Marco Gerards <mgerards@xs4all.nl>
6167
6168 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
6169 and `cd' to make sure the filename is not prefixed with a
6170 directory name.
6171 (pkgdata_MODULES): Add `gpt.mod'.
6172 (gpt_mod_SOURCES): New variable.
6173 (gpt_mod_CFLAGS): Likewise.
6174 (gpt_mod_LDFLAGS): Likewise.
6175
6176 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
6177
6178 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
6179 New macro.
6180
6181 * partmap/gpt.c: New file.
6182
6183 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
6184 GPT partition map is detected.
6185
41730ed9 61862005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
6187
6188 * commands/i386/pc/play.c: New file.
6189 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
6190 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
6191 macros.
6192
95dc3643 61932005-11-27 Marco Gerards <mgerards@xs4all.nl>
6194
6195 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
6196 ((unused))' to silence gcc warning.
6197
1569ec51 61982005-11-26 Hollis Blanchard <hollis@penguinppc.org>
6199
6200 * configure.ac: Correct `AC_PROG_YACC' test.
6201
9abde152 62022005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6203
6204 * util/powerpc/ieee1275/grub-install.in: Run the mount point
6205 check before installing files.
6206
44b83271 62072005-11-22 Mike Small <smallm@panix.com>
6208
6209 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
6210 number regex so multidigit numbers are recognized correctly.
6211
62122005-11-22 Mike Small <smallm@panix.com>
6213
6214 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
6215 debugging message before attempting to claim memory.
6216 (grub_rescue_cmd_initrd): Add a claim debugging message and try
6217 multiple addresses in case of failure.
6218
9c12956b 62192005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6220
6221 * term/tparm.c (get_space): Remove empty `if' statement.
6222
6223 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
6224
6225 * kern/parser.c (check_varstate): Rename `state' to 's'.
6226
aeaf81d9 62272005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6228
6229 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
6230 variable definitions to the beginning of each function. Sort stack
6231 variables by size.
6232 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
6233 `buf' argument to `char *'.
6234
79bbb63f 62352005-11-22 Hollis Blanchard <hollis@penguinppc.org>
6236
6237 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
6238 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6239 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6240 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6241 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6242 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6243 configfile.mod, search.mod, gzio.mod and test.mod.
6244 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6245 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6246 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6247 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6248 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6249 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6250 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6251 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6252 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6253 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6254 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6255 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6256 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6257 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6258 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6259 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6260 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6261 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6262 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6263 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6264 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6265 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6266 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
6267
6268 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
6269 `grep --include'.
6270 (pkgdata_MODULES): Add test.mod.
6271
233b1628 62722005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6273
6274 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
6275 appending to variables with "+=".
6276 (PModule): Use full pathname to generate *.lst filenames.
6277
6278 * Makefile.in: Fixed list rules moved from genmk.rb.
6279 (.DELETE_ON_ERROR): New special target.
6280 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
6281
6282 * conf/i386-pc.rmk: Include conf/common.mk.
6283 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
6284 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
6285 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
6286 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
6287 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
6288 configfile.mod, search.mod, gzio.mod and test.mod.
6289 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
6290 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
6291 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
6292 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
6293 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
6294 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
6295 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
6296 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
6297 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
6298 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
6299 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6300 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6301 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
6302 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
6303 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
6304 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
6305 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6306 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
6307 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
6308 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
6309 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
6310 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
6311 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
6312 here...
6313 * conf/common.rmk: ... to here. New file.
6314
6315 * conf/common.mk: New file.
6316
16f820c8 63172005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
6318
6319 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
6320 (grub_script.tab.c): ... here.
6321
6322 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
6323 (grub_script.tab.c): ... here.
6324
6325 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
6326 (grub_script.tab.c): ... here.
6327
6328 * normal/command.c (grub_command_find): Fixed a memory leak of
6329 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
6330
63ba1554 63312005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6332
6333 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
6334 "@" which marks the start of a comment on ARM.
6335 (VARIABLE): Likewise.
6336
7f67dc13 63372005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6338
79bbb63f 6339 Add support for Linux/ADFS partition tables.
7f67dc13 6340
6341 * partmap/acorn.c: New file.
6342
6343 * include/grub/acorn_filecore.h: Likewise.
6344
6345 * DISTLIST: Added `partmap/acorn.c' and
6346 `include/grub/acorn_filecore.h'.
6347
6348 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6349 `partmap/acorn.c'.
6350 (pkgdata_MODULES): Add `acorn.mod'.
6351 (acorn_mod_SOURCES): New variable.
6352 (acorn_mod_CFLAGS): Likewise.
6353
6354 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6355 `partmap/acorn.c'.
6356 (pkgdata_MODULES): Add `acorn.mod'.
6357 (acorn_mod_SOURCES): New variable.
6358 (acorn_mod_CFLAGS): Likewise.
6359
6360 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
6361 (pkgdata_MODULES): Add `acorn.mod'.
6362 (acorn_mod_SOURCES): New variable.
6363 (acorn_mod_CFLAGS): Likewise.
6364 (acorn_mod_LDFLAGS): Likewise.
6365
6366 * include/types.h (grub_disk_addr_t): New typedef.
6367
6d099807 63682005-11-13 Marco Gerards <mgerards@xs4all.nl>
6369
6370 * geninit.sh: New file.
6371
6372 * geninitheader.sh: Likewise.
6373
6374 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
6375 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
6376 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
6377 * commands/configfile.c (grub_configfile_init)
6378 (grub_configfile_fini): Likewise.
6379 * commands/default.c (grub_default_init, grub_default_fini):
6380 Likewise.
6381 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
6382 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
6383 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
6384 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
6385 Likewise.
6386 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
6387 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
6388 Likewise.
6389 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
6390 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
6391 Likewise.
6392 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
6393 Likewise.
6394 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6395 Likewise.
6396 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
6397 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
6398 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
6399 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
6400 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
6401 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
6402 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
6403 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
6404 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
6405 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
6406 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
6407 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
6408 * partmap/amiga.c (grub_amiga_partition_map_init)
6409 (grub_amiga_partition_map_fini): Likewise.
6410 * partmap/apple.c (grub_apple_partition_map_init)
6411 (grub_apple_partition_map_fini): Likewise.
6412 * partmap/pc.c (grub_pc_partition_map_init)
6413 (grub_pc_partition_map_fini): Likewise.
6414 * partmap/sun.c (grub_sun_partition_map_init,
6415 grub_sun_partition_map_fini): Likewise.
6416 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
6417 Likewise.
6418
6419 * util/grub-emu.c: Include <grub_modules_init.h>.
6420 (main): Don't initialize and de-initialize any modules directly,
6421 use `grub_init_all' and `grub_fini_all' instead.
6422
6423 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
6424 `grub_vesafb_mod_init'.
6425 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
6426 all users.
6427 * term/i386/pc/vga.c (grub_vga_init): Renamed to
6428 `grub_vga_mod_init'. Updated all users.
6429 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
6430
6431 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
6432 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
6433 rules.
6434
6435 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
6436 Generate a function to initialize the module in utilities.
6437 Updated all callers.
6438 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
6439 initialize the module in utilities. Updated all callers.
6440
9046bcf0 64412005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6442
6443 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
6444 escape sequence and a literal ^L to clear the screen.
6445
6446 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
6447 when returning from Open Firmware.
6448
d13ea639 64492005-11-09 Hollis Blanchard <hollis@penguinppc.org>
6450
6451 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
6452 (grub_ofconsole_height): Likewise.
6453 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
6454 manually insert a '\n'.
6455 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
6456 `grub_ofconsole_height'. Return early if these are already set.
6457
a8fcf206 64582005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
6459
6460 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
6461 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
6462 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
6463 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
6464 and `normal/script.c'.
6465 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6466 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6467 (test_mod_SOURCES): New variable.
6468 (test_mod_CFLAGS): Likewise.
6469 (test_mod_LDFLAGS): Likewise.
6470 (pkgdata_MODULES): Add `test.mod'.
6471 (grub_script.tab.c): New rule.
6472 (grub_script.tab.h): Likewise.
6473
b6b32745 64742005-11-07 Marco Gerards <mgerards@xs4all.nl>
6475
6476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6477 `commands/test.c', `normal/execute.c', `normal/lexer.c',
6478 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6479 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6480 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
6481 (test_mod_SOURCES): New variable.
6482 (test_mod_CFLAGS): Likewise.
6483 (pkgdata_MODULES): Add `test.mod'.
6484 (grub_script.tab.c): New rule.
6485 (grub_script.tab.h): Likewise.
6486
daac212a 64872005-11-06 Marco Gerards <mgerards@xs4all.nl>
6488
6489 Add initial scripting support.
6490
6491 * commands/test.c: New file.
6492 * include/grub/script.h: Likewise.
6493 * normal/execute.c: Likewise.
6494 * normal/function.c: Likewise.
6495 * normal/lexer.c: Likewise.
6496 * normal/parser.y: Likewise.
6497 * normal/script.c: Likewise.
6498
6499 * configure.ac: Add `AC_PROG_YACC' test.
6500
6501 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
6502 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
6503 `normal/function.c' and `normal/script.c'.
6504 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
6505 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 6506 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
6507 variables.
daac212a 6508 (pkgdata_MODULES): Add `test.mod'.
6509 (grub_script.tab.c): New rule.
6510 (grub_script.tab.h): Likewise.
6511
6512 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
6513
6514 * include/grub/normal.h (grub_test_init): New prototype.
6515 (grub_test_fini): Likewise.
6516
6517 * normal/command.c: Include <grub/script.h>.
6518 (grub_command_execute): Rewritten.
6519
6520 * util/grub-emu.c (main): Call `grub_test_init' and
6521 `grub_test_fini'.
6522
77500b2b 65232005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6524
6525 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
6526 to 0.
6527 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
6528 there are no pending characters.
6529
e45deb9e 65302005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6531
6532 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
6533 `grub_strndup' to drop device arguments. Replace unnecessary
6534 `grub_strndup' with `grub_strdup'.
6535
4ce32619 65362005-11-03 Hollis Blanchard <hollis@penguinppc.org>
6537
6538 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
6539 `debug' environment variable has been set.
6540
65412005-11-02 Hollis Blanchard <hollis@penguinppc.org>
6542
6543 * Makefile.in (install-local): Use $(DATA).
6544 (uninstall): Likewise.
6545 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
6546 (sbin_UTILITIES): ... to here.
6547 (sbin_SCRIPTS): New variable.
6548 (grub_install_SOURCES): New variable.
6549 * util/powerpc/ieee1275/grub-install.in: New file.
6550 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
6551 variable.
6552 (add_segments): Call `grub_util_get_path'.
6553
25fe6f03 65542005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6555
6556 From Timothy Baldwin:
6557 * commands/ls.c (grub_ls_list_files): Close FILE with
6558 grub_file_close.
6559 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
6560
04ccf3ec 65612005-10-24 Marco Gerards <mgerards@xs4all.nl>
6562
6563 * include/grub/parser.h: New file.
6564
6565 * kern/parser.c: Likewise.
6566
6567 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
6568 (grub_setup_SOURCES): Likewise.
6569 (grub_probefs_SOURCES): Likewise.
6570 (grub_emu_SOURCES): Likewise.
6571 (kernel_img_HEADERS): Add `parser.h'.
6572
6573 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6574 (grub_emu_SOURCES): Add `kern/parser.c'.
6575 (grubof_SOURCES): Likewise.
6576
6577 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
6578 (grubof_SOURCES): Add `kern/parser.c'.
6579
6580 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
6581
6582 * kern/misc.c (grub_split_cmdline): Removed function.
6583
6584 * kern/rescue.c: Include <grub/parser.h>.
6585 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
6586 of `grub_split_cmdline'.
6587
6588 * normal/command.c: Include <grub/parser.h>.
6589 (grub_command_execute): Use `grub_parser_split_cmdline' instead
6590 of `grub_split_cmdline'.
6591
6592 * normal/completion.c: Include <grub/parser.h>.
6593 (cmdline_state): New variable.
6594 (iterate_dir): End the filename with a quote depending on the
6595 command line state.
6596 (get_state): new function.
6597 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
6598 split the arguments and determine the current argument. When the
6599 argument string is not quoted, escape all spaces.
6600
6d8f4b0e 66012005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6602
6603 * normal/sparc64/setjmp.S: New file.
6604
15cf03ed 66052005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6606
6607 * include/grub/sparc64/libgcc.h: New file.
6608 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
6609 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
6610 normal/sparc64/setjmp.c.
6611
03e8661a 66122005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
6613
6614 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
6615 * kern/sparc64/cache.S: New file.
6616 * kern/sparc64/cache.c: Removed.
6617 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
6618 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
6619 -mtune=ultrasparc.
6620 (COMMON_LDFLAGS): Add -melf64_sparc.
6621 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
6622 (grubof_SOURCES): Use cache.S instead of cache.c.
6623 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
6624 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
6625 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
6626 commented though.
6627 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
6628 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
6629 (linux_mod_CFLAGS): Commented out.
6630 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
6631 out because module isn't built.
6632 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
6633 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
6634 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
6635 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
6636 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
6637 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6638 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6639 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
6640 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
6641 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
6642 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
6643 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
6644 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
6645 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
6646
34eeec8a 66472005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
6648
6649 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
6650 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
6651 longer, because HFS should not be used on PC.
6652
708367a3 66532005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6654
6655 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
6656 consistently within the loop.
6657
6fa1251a 66582005-10-15 Marco Gerards <mgerards@xs4all.nl>
6659
6660 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
6661 directory can not be read.
6662
4801580b 66632005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6664
6665 * configure.ac (AC_INIT): Increase the version number to 1.91.
6666
6667 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
6668 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
6669 term/i386/pc/serial.c.
6670
219ad426 66712005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6672
6673 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
6674 file size must be permitted.
6675
6676 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
6677 between %ah and %al.
6678
688e5699 66792005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6680
6681 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
6682 grub_uint64_t.
6683 Call the hook with a NUL-terminated filename.
6684 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
6685 grub_cpu_to_be32.
6686
6687 * kern/term.c (cursor_state): New variable.
6688 (grub_term_set_current): Reset the cursor state on a new
6689 terminal.
6690 (grub_setcursor): Rewritten to use CURSOR_STATE.
6691 (grub_getcursor): New function.
6692
6693 * include/grub/term.h (grub_getcursor): New prototype.
6694
6695 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
6696 integers on ARM. Reported by Timothy Baldwin
6697 <T.E.Baldwin99@members.leeds.ac.uk>.
6698
bb34586c 66992005-10-11 Marco Gerards <mgerards@xs4all.nl>
6700
6701 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
6702 allocated.
6703 (grub_sfs_dir): Likewise.
6704
9a909877 67052005-10-09 Marco Gerards <mgerards@xs4all.nl>
6706
6707 Add support for the SFS filesystem.
6708
6709 * fs/sfs.c: New file.
6710
6711 * DISTLIST: Added `fs/sfs.c'.
6712
6713 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
6714 (grub_probefs_SOURCES): Likewise.
6715 (grub_emu_SOURCES): Likewise.
6716 (pkgdata_MODULES): Add `sfs.mod'.
6717 (sfs_mod_SOURCES): New variable.
6718 (sfs_mod_CFLAGS): Likewise.
6719 (sfs_mod_LDFLAGS): Likewise.
6720
6721 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
6722 (pkgdata_MODULES): Add `sfs.mod'.
6723 (sfs_mod_SOURCES): New variable.
6724 (sfs_mod_CFLAGS): Likewise.
6725
6726 * util/grub-emu.c (main): Call `grub_sfs_init' and
6727 `grub_sfs_fini'.
6728
6729 * include/grub/fs.h (grub_sfs_init): New prototype.
6730 (grub_sfs_fini): Likewise.
6731
57bdbde3 67322005-10-07 Marco Gerards <mgerards@xs4all.nl>
6733
6734 Add support for the AFFS filesystem.
6735
6736 * fs/affs.c: New file.
6737
6738 * DISTLIST: Added `fs/affs.c'.
6739
6740 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
6741 (grub_probefs_SOURCES): Likewise.
6742 (grub_emu_SOURCES): Likewise.
6743 (pkgdata_MODULES): Add `affs.mod'.
6744 (affs_mod_SOURCES): New variable.
6745 (affs_mod_CFLAGS): Likewise.
6746 (affs_mod_LDFLAGS): Likewise.
6747
6748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
6749 (pkgdata_MODULES): Add `affs.mod'.
6750 (affs_mod_SOURCES): New variable.
6751 (affs_mod_CFLAGS): Likewise.
6752
6753 * util/grub-emu.c (main): Call `grub_affs_init' and
6754 `grub_affs_fini'.
6755
6756 * include/grub/fs.h (grub_affs_init): New prototype.
6757 (grub_affs_fini): Likewise.
6758
047b67e0 67592005-10-01 Marco Gerards <mgerards@xs4all.nl>
6760
6761 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
6762
59b8208a 67632005-10-01 Marco Gerards <mgerards@xs4all.nl>
6764
6765 * configure.ac: Accept `x86_64' as host_cpu. In that case add
6766 `-m32' to CFLAGS.
6767
6768 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
6769 linking.
6770
6771 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
6772 (COMMON_LDFLAGS): New variable.
6773 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
6774 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
6775 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
6776 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
6777 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
6778 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
6779 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
6780 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
6781 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
6782 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
6783 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
6784 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
6785 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
6786 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
6787 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
6788 variables.
6789 (normal_mod_ASFLAGS): Add `-m32'.
6790
6791 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
6792 (grub_host_size_t, grub_host_ssize_t): New types.
6793 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
6794 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
6795 `GRUB_HOST_SIZEOF_VOID_P'.
6796
6797 * include/grub/kernel.h (struct grub_module_header): Type of
6798 member offset changed to `grub_host_off_t'. Type of member size
6799 changed to `grub_host_size_t'.
6800 (struct grub_module_info): Type of member offset changed to
6801 `grub_host_off_t'. Type of member size changed to
6802 `grub_host_size_t'.
6803
b4093103 68042005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
6805
6806 Make GRUB's kernel compliant to Multiboot Specification.
6807
6808 * kern/i386/pc/startup.S (multiboot_header): New label.
6809 (multiboot_entry): Likewise.
6810 (multiboot_trampoline): Likewise.
6811
6812 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6813 Increased to 0x4A0.
6814
6815 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
6816 put parentheses after a question mark.
6817 [!GRUB_UTIL] (my_mod): New variable.
6818
6819 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
6820
b2499b29 68212005-09-28 Marco Gerards <mgerards@xs4all.nl>
6822
6823 Adds support for the XFS filesystem. Btrees are not supported
6824 yet.
6825
6826 * fs/xfs.c: New file.
6827
6828 * DISTLIST: Added `fs/xfs.c'.
6829
6830 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
6831 (grub_probefs_SOURCES): Likewise.
6832 (grub_emu_SOURCES): Likewise.
6833 (pkgdata_MODULES): Add `xfs.mod'.
6834 (xfs_mod_SOURCES): New variable.
6835 (xfs_mod_CFLAGS): Likewise.
6836
6837 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
6838 (pkgdata_MODULES): Add `xfs.mod'.
6839 (xfs_mod_SOURCES): New variable.
6840 (xfs_mod_CFLAGS): Likewise.
6841
6842 * util/grub-emu.c (main): Call `grub_xfs_init' and
6843 `grub_xfs_fini'.
6844
6845 * include/grub/fs.h (grub_xfs_init): New prototype.
6846 (grub_xfs_fini): Likewise.
6847
6848
83d37a62 68492005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
6850
6851 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
6852 color modes, allow greater than 16 colors to be configured as
6853 a default palette.
6854
47d2d65e 68552005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6856
6857 * normal/completion.c (complete_arguments): Add the qualifier
6858 const into OPTIONS.
6859
6860 From Omniflux <omniflux+lists@omniflux.com>:
6861 * include/grub/terminfo.h: New file.
6862 * include/grub/tparm.h: Likewise.
6863 * include/grub/i386/pc/serial.h: Likewise.
6864 * term/terminfo.c: Likewise.
6865 * term/tparm.c: Likewise.
6866 * term/i386/pc/serial.c: Likewise.
6867 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
6868 serial.mod.
6869 (terminfo_mod_SOURCES): New variable.
6870 (terminfo_mod_CFLAGS): Likewise.
6871 (serial_mod_SOURCES): Likewise.
6872 (serial_mod_CFLAGS): Likewise.
6873
48b671ff 68742005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
6875
6876 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
6877 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
6878 and kern/powerpc/ieee1275/cmain.c, respectively.
6879
6880 * boot/powerpc/ieee1275/crt0.S: Moved to ...
6881 * kern/powerpc/ieee1275/crt0.S: ... here.
6882
6883 * boot/powerpc/ieee1275/cmain.c: Moved to ...
6884 * kern/powerpc/ieee1275/cmain.c: ... here.
6885
6886 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
6887 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
6888 instead of boot/powerpc/ieee1275/crt0.S and
6889 boot/powerpc/ieee1275/cmain.c, respectively.
6890
6891 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
6892 sectors. It was not used anyway.
6893
09fc77a7 68942005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6895
6896 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
6897 `unused parameter' warning.
6898
003789c7 68992005-08-30 Hollis Blanchard <hollis@penguinppc.org>
6900
6901 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
6902 function.
6903 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
6904 getcharwidth.
6905
67f44c86 69062005-08-28 Marco Gerards <metgerards@student.han.nl>
6907
6908 * include/grub/normal.h (enum grub_completion_type): Added
6909 `GRUB_COMPLETION_TYPE_ARGUMENT'.
6910
6911 * normal/cmdline.c (print_completion): Handle
6912 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
6913 * normal/menu_entry.c (store_completion): Likewise.
6914
6915 * normal/completion.c (complete_arguments): New function.
6916 (grub_normal_do_completion): Call `complete_arguments' when the
6917 current words start with a dash.
6918
0b5abe02 69192005-08-27 Marco Gerards <metgerards@student.han.nl>
6920
6921 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
6922 `gzio.mod' instead of `io.mod').
6923
d9864ee1 69242005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
6925
6926 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
6927 (DISTDIRS): Added io and video.
6928 Rewrite the search routine to make an output consistently.
6929
6930 * DISTLIST: Added conf/sparc64-ieee1275.mk,
6931 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
6932 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
6933 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
6934 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
6935 util/powerpc/ieee1275/misc.c.
6936
6937 * include/grub/gzio.h: New file.
6938 * io/gzio.c: Likewise.
6939
6940 * kern/file.c (grub_file_close): Call grub_device_close only if
6941 FILE->DEVICE is not NULL.
6942
6943 * include/grub/mm.h [!NULL] (NULL): New macro.
6944
6945 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
6946
6947 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
6948 (pkgdata_MODULES): Added gzio.mod.
6949 (gzio_mod_SOURCES): New variable.
6950 (gzio_mod_CFLAGS): Likewise.
6951
6952 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
6953 (pkgdata_MODULES): Added gzio.mod.
6954 (gzio_mod_SOURCES): New variable.
6955 (gzio_mod_CFLAGS): Likewise.
6956
6957 * commands/cat.c: Include grub/gzio.h.
6958 (grub_cmd_cat): Use grub_gzfile_open instead of
6959 grub_file_open.
6960
6961 * commands/cmp.c: Include grub/gzio.h.
6962 (grub_cmd_cmp): Use grub_gzfile_open instead of
6963 grub_file_open.
6964
6965 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
6966 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
6967 grub_file_open.
6968 (grub_rescue_cmd_module): Likewise.
6969
fa46f4b5 69702005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6971
6972 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
6973 kern/sparc64/ieee1275/init.c because it contains _start.
6974 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
6975
e9211b5d 69762005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
6977
6978 * configure.ac: Add support for sparc64 host with ieee1275
6979 firmware.
6980 * configure: Generated from configure.ac.
6981 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
6982 instead of int.
6983 (grub_ofdisk_read): Likewise.
6984 (grub_ofdisk_open): Use %p to print pointer values, and cast the
6985 pointers as (void *) to remove a warning.
6986 (grub_ofdisk_close): Likewise.
6987 (grub_ofdisk_read): Likewise.
6988 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
6989 returns, so make it return void to remove a warning.
6990 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
6991 Corresponding prototype change.
6992 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
6993 values, and cast the pointers as (void *) to remove a warning.
6994 (grub_mm_dump): Likewise.
6995 * conf/sparc64-ieee1275.mk: New file.
6996 * conf/sparc64-ieee1275.rmk: Likewise.
6997 * include/grub/sparc64/setjmp.h: Likewise.
6998 * include/grub/sparc64/types.h: Likewise.
6999 * include/grub/sparc64/ieee1275/console.h: Likewise.
7000 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7001 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7002 * include/grub/sparc64/ieee1275/time.h: Likewise.
7003 * kern/sparc64/cache.c: Likewise.
7004 * kern/sparc64/dl.c: Likewise.
7005 * kern/sparc64/ieee1275/init.c: Likewise.
7006 * kern/sparc64/ieee1275/openfw.c: Likewise.
7007
385c6a92 70082005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7009
7010 * util/console.c (grub_ncurses_putchar): If C is greater than
7011 0x7f, set C to a question mark.
7012 (grub_ncurses_getcharwidth): New function.
7013 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
7014 getcharwidth.
7015
7016 * normal/menu.c (print_entry): Made aware of Unicode. First,
7017 convert TITLE to UCS-4, and predict the cursor position by
7018 grub_getcharwidth.
7019
7020 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
7021 const to SRC.
7022 * kern/misc.c (grub_utf16_to_utf8): Likewise.
7023
16ccb8b1 70242005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7025
7026 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
7027 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7028 grub_strcat.
7029
7030 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
7031 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
7032 grub_strcpy and grub_strlen. Take it into account that a space
7033 character is inserted as a delimiter.
7034
6a85ce79 70352005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7036
7037 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
7038 invalid magic in thre error.
7039
7040 * commands/search.c: New file.
7041
7042 * util/grub-emu.c (main): Call grub_search_init and
7043 grub_search_fini.
7044
7045 * kern/rescue.c (grub_rescue_print_disks): Removed.
7046 (grub_rescue_print_devices): New function.
7047 (grub_rescue_cmd_ls): Use grub_device_iterate with
7048 grub_rescue_print_devices instead of grub_disk_dev_iterate with
7049 grub_rescue_print_disks.
7050
7051 * kern/partition.c (grub_partition_iterate): Return the result of
7052 PARTMAP->ITERATE instead of GRUB_ERRNO.
7053
7054 * kern/device.c: Include grub/partition.h.
7055 (grub_device_iterate): New function.
7056
7057 * include/grub/partition.h (grub_partition_iterate): Return int
7058 instead of grub_err_t.
7059
7060 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
7061 prototype.
7062 [GRUB_UTIL] (grub_search_fini): Likewise.
7063
7064 * include/grub/device.h (grub_device_iterate): New prototype.
7065
7066 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7067 commands/search.c.
7068 (pkgdata_MODULES): Added search.mod.
7069 (search_mod_SOURCES): New variable.
7070 (search_mod_CFLAGS): Likewise.
7071
7072 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
7073 (pkgdata_MODULES): Added search.mod.
7074 (search_mod_SOURCES): New variable.
7075 (search_mod_CFLAGS): Likewise.
7076
7077 * commands/ls.c (grub_ls_list_disks): Renamed to ...
7078 (grub_ls_list_devices): ... this, and use grub_device_iterate.
7079 All callers changed.
7080
7081 * DISTLIST: Added commands/search.c.
7082
ef095434 70832005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
7084
7085 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
7086 conversion.
7087 (grub_getcharwidth): New function.
7088
7089 * kern/misc.c (grub_utf8_to_ucs4): New function.
7090
7091 * include/grub/term.h (struct grub_term): Added a new member
7092 "getcharwidth".
7093 (grub_getcharwidth): New prototype.
7094
7095 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
7096
7097 * term/i386/pc/console.c (map_char): New function. Segregated from
7098 grub_console_putchar.
7099 (grub_console_putchar): Use map_char.
7100 (grub_console_getcharwidth): New function.
7101 (grub_console_term): Specified grub_console_getcharwidth as
7102 getcharwidth.
7103
7104 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
7105 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
7106
7107 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
7108 GRUB_ERRNO.
7109 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
7110 on grub_strtoul completely.
7111 (write_char): Declare local variables in the beginning of the
7112 function.
7113 (grub_vesafb_getcharwidth): New function.
7114 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
7115 getcharwidth.
7116
1f0a95e4 71172005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
7118
7119 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
7120 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
7121 commands/i386/pc/vbetest.c.
7122
7123 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
7124 call grub_vbe_get_controller_info again, because the returned
7125 information is volatile.
7126 (grub_vbe_set_video_mode): Mostly rewritten.
7127 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
7128 grub_vbe_status_t correctly.
7129 (grub_vbe_get_video_mode_info): Likewise.
7130 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
7131 several if statements.
7132
7133 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
7134 * commands/i386/pc/vbeinfo.c: ... this.
7135
7136 * commands/i386/pc/vbe_test.c: Renamed to ...
7137 * commands/i386/pc/vbetest.c: ... this.
7138
7139 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
7140 ...
7141 (grub_cmd_vbeinfo): ... this. Save video modes before
7142 iterating. Skip a video mode, if it is not available, not enough
7143 information is given or it is monochrome. Show the memory
7144 model. Leave the interpretation of MODEVAR to grub_strtoul
7145 completely.
7146 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
7147 (GRUB_MOD_FINI): Likewise.
7148
7149 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
7150 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
7151 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
7152 duplicated grub_env_get. Leave the interpretation of MODEVAR to
7153 grub_strtoul completely.
7154 (real2pm): Removed.
7155 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
7156 (GRUB_MOD_FINI): Likewise.
7157
7158 * normal/misc.c: Include grub/mm.h.
7159
7160 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
7161 vbe_list_modes with vbetest.mod and vbeinfo.mod.
7162 (vbe_list_modes_mod_SOURCES): Removed.
7163 (vbe_list_modes_mod_CFLAGS): Likewise.
7164 (vbe_test_mod_SOURCES): Likewise.
7165 (vbe_test_mod_CFLAGS): Likewise.
7166 (vbeinfo_mod_SOURCES): New variable.
7167 (vbeinfo_mod_CFLAGS): Likewise.
7168 (vbetest_mod_SOURCES): Likewise.
7169 (vbetest_mod_CFLAGS): Likewise.
7170
992ffbbe 71712005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
7172
7173 * normal/misc.c: New file.
7174
7175 * DISTLIST: Added normal/misc.c.
7176
7177 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
7178 DISK to HOOK. Call HOOK with DISK.
7179 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7180 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7181 * partmap/sun.c (sun_partition_map_iterate): Likewise.
7182
7183 * normal/menu_entry.c (struct screen): Added a new member
7184 "completion_shown".
7185 (completion_buffer): New global variable.
7186 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
7187 (store_completion): New function.
7188 (complete): Likewise.
7189 (clear_completions): Likewise.
7190 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
7191 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
7192 a tab, call complete.
7193
7194 * normal/completion.c (disk_dev): Removed.
7195 (print_simple_completion): Likewise.
7196 (print_partition_completion): Likewise.
7197 (print_func): New global variable.
7198 (add_completion): Do not take the arguments WHAT or PRINT any
7199 longer. Added a new argument TYPE. Instead of printing directly,
7200 call PRINT_FUNC if not NULL.
7201 All callers changed.
7202 (complete_device): Use a local variable DEV instead of
7203 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
7204 (grub_normal_do_completion): Take a new argument HOOK. Do not
7205 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
7206 empty string, return NULL instead.
7207 All callers changed.
7208
7209 * normal/cmdline.c (print_completion): New function.
7210
7211 * kern/partition.c (grub_partition_iterate): Add an argument DISK
7212 to HOOK.
7213 All callers changed.
7214
7215 * kern/disk.c (grub_print_partinfo): Removed.
7216
7217 * include/grub/partition.h (struct grub_partition_map): Add a new
7218 argument DISK into HOOK of ITERATE.
7219 (grub_partition_iterate): Add a new argument DISK to HOOK.
7220
7221 * include/grub/normal.h (enum grub_completion_type): New enum.
7222 (grub_completion_type_t): New type.
7223 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
7224 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
7225 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
7226 (GRUB_COMPLETION_TYPE_FILE): Likewise.
7227 (grub_normal_do_completion): Added a new argument HOOK.
7228 (grub_normal_print_device_info): New prototype.
7229
7230 * include/grub/disk.h (grub_print_partinfo): Removed.
7231
7232 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
7233 (normal_mod_SOURCES): Likewise.
7234 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7235 (normal_mod_SOURCES): Likewise.
7236
7237 * commands/ls.c (grub_ls_list_disks): Use
7238 grub_normal_print_device_info instead of grub_print_partinfo. Free
7239 PNAME.
7240 (grub_ls_list_files): Use grub_normal_print_device_info instead of
7241 duplicating the code.
7242
0bd41162 72432005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7244
7245 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
7246 follow GCS more precisely.
7247 * commands/i386/pc/vbe_test.c: Likewise.
7248 * include/grub/i386/pc/vbe.h: Likewise.
7249 * term/i386/pc/vesafb.c: Likewise.
7250 * video/i386/pc/vbe.c: Likewise.
7251
6323696a 72522005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
7253
7254 * DISTLIST: Added term/i386/pc/vesafb.c
7255 DISTLIST: Added video/i386/pc/vbe.c
7256 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
7257 DISTLIST: Added commands/i386/pc/vbe_test.c.
7258 * commands/i386/pc/vbe_list_modes.c: New file.
7259 * commands/i386/pc/vbe_test.c: Likewise.
7260 * term/i386/pc/vesafb.c: Likewise.
7261 * video/i386/pc/vbe.c: Likewise.
7262 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
7263 (grub_vbe_probe) Added prototype.
7264 (grub_vbe_set_video_mode) Likewise.
7265 (grub_vbe_get_video_mode) Likewise.
7266 (grub_vbe_get_video_mode_info) Likewise.
7267 (grub_vbe_set_pixel_rgb) Likewise.
7268 (grub_vbe_set_pixel_index) Likewise.
7269 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
7270 (pkgdata_MODULES): Added vesafb.mod.
7271 (pkgdata_MODULES): Added vbe_list_modes.mod.
7272 (pkgdata_MODULES): Added vbe_test.mod.
7273 (vbe_mod_SOURCES): Added.
7274 (vbe_mod_CFLAGS): Likewise.
7275 (vesafb_mod_SOURCES): Likewise.
7276 (vesafb_mod_CFLAGS): Likewise.
7277 (vbe_list_modes_mod_SOURCES): Likewise.
7278 (vbe_list_modes_mod_CFLAGS): Likewise.
7279 (vbe_test_mod_SOURCES): Likewise.
7280 (vbe_test_mod_CFLAGS): Likewise.
7281
0a74e62f 72822005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
7283
0a74e62f 7284 * normal/command.c (grub_command_execute): If INTERACTIVE is
7285 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
7286 CMDLINE. Disable the pager if INTERACTIVE is true.
7287 All callers are changed.
7288
7289 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
7290 before reading a config file.
7291 * normal/main.c (read_config_file): Even if a command is not
7292 found, register it if it is within an entry.
7293
7294 * util/grub-emu.c: Include sys/types.h and unistd.h.
7295 (options): Added --hold.
7296 (struct arguments): Added a new member "hold".
7297 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
7298 missing.
7299 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
7300 cleared by a debugger, if it is not zero.
7301
7302 * include/grub/normal.h (grub_command_execute): Add an argument
7303 INTERACTIVE.
7304
e51f85ae 73052005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
7306
7307 * DISTLIST: Added include/grub/i386/pc/vbe.h.
7308
e9c6f39b 73092005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
7310
7311 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
7312 program with another one, because the old one didn't detect a bug
7313 in gcc-3.4. Always use regparm 2, because the new test is still
7314 not enough for gcc-4.0. Someone must investigate a simple test
7315 case which detects a bug in gcc-4.0.
7316
8de3495c 73172005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
7318
7319 * DISTLIST: Added normal/completion.c.
7320
7321 * normal/completion.c: New file.
7322
7323 * term/i386/pc/console.c (grub_console_getwh): New function.
7324 (grub_console_term): Assign grub_console_getwh to getwh.
7325
7326 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
7327 function is defined in normal/completion.c as
7328 grub_normal_do_completion.
7329 (grub_cmdline_get): Use grub_normal_do_completion instead of
7330 grub_tab_complete.
7331
7332 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
7333 returns non-zero, otherwise return 0.
7334 (grub_partition_iterate): First, probe the partition map. Then,
7335 call ITERATE only for this partition map.
7336
7337 * kern/misc.c (grub_strncmp): Rewritten.
7338
7339 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
7340 returns non-zero. Otherwise return 0.
7341
7342 * include/grub/partition.h (grub_partition_map_iterate): Return
7343 int instead of void.
7344
7345 * include/grub/normal.h (grub_normal_do_completion): New prototype.
7346
7347 * include/grub/misc.h (grub_strncmp): Change the type of N to
7348 grub_size_t.
7349
7350 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
7351 of void.
7352
7353 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
7354 unsigned explictly before comparing it with I.
7355
7356 * kern/main.c (grub_env_write_root): Add the attribute unused into
7357 VAR.
7358
7359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
7360 normal/completion.c.
7361 (normal_mod_SOURCES): Likewise.
7362 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7363 (normal_mod_SOURCES): Likewise.
7364
7365 * normal/command.c (grub_iterate_commands): If ITERATE returns
7366 non-zero, return one immediately.
7367
e85e144b 73682005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
7369
7370 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
7371 * kern/i386/pc/startup.S: Updated Global Descriptor table's
7372 descriptions.
7373 (grub_vbe_get_controller_info): New function.
7374 (grub_vbe_get_mode_info): Likewise.
7375 (grub_vbe_set_mode): Likewise.
7376 (grub_vbe_get_mode): Likewise.
7377 (grub_vbe_set_memory_window): Likewise.
7378 (grub_vbe_get_memory_window): Likewise.
7379 (grub_vbe_set_scanline_length): Likewise.
7380 (grub_vbe_get_scanline_length): Likewise.
7381 (grub_vbe_set_display_start): Likewise.
7382 (grub_vbe_get_display_start): Likewise.
7383 (grub_vbe_set_palette_data): Likewise.
7384 * include/grub/i386/pc/vbe.h: New file.
7385
c46153d2 73862005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7387
7388 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7389 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
7390 * DISTLIST: Likewise.
7391 * kern/ieee1275/of.c: Moved to ...
7392 * kern/ieee1275/ieee1275.c: ... here.
7393
0cb90c45 73942005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7395
7396 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
7397 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
7398 Pass 0 as `end' parameter to grub_strtoul().
7399
a19fb360 74002005-08-08 Hollis Blanchard <hollis@penguinppc.org>
7401
7402 * include/grub/powerpc/ieee1275/console.h: Do not include
7403 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
7404 ifdef.
7405 (grub_console_cur_color): Remove i386-specific prototype.
7406 (grub_console_real_putchar): Likewise.
7407 (grub_console_checkkey): Likewise.
7408 (grub_console_getkey): Likewise.
7409 (grub_console_getxy): Likewise.
7410 (grub_console_gotoxy): Likewise.
7411 (grub_console_cls): Likewise.
7412 (grub_console_setcursor): Likewise.
7413 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
7414 Include <grub/machine/console.h>.
7415 * term/ieee1275/ofconsole.c: Likewise.
7416
4ac9bd04 74172005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
7418
7419 * Makefile.in (LIBLZO): New variable.
7420
7421 * configure.ac: Check for LZO version 2.
7422
7423 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
7424 lzo/lzo1x.h instead of lzo1x.h.
7425
7426 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
7427 of -llzo.
7428
7429 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
7430 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
7431
7432 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
7433 copying the data from PARTITION to P.
7434
f4917dfd 74352005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7436
7437 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
7438 negative, unload the module.
7439
7440 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7441 map is "pc_partition_map" but not "pc".
7442 (usage): Fix the description. The options are --boot-image and
7443 --core-image but not --boot-file or --core-file.
7444 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
7445 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
7446 DEFAULT_DIRECTORY.
7447
7448 * util/i386/pc/grub-install.in: Do not specify --boot-file or
7449 --core-file. Specify INSTALL_DEVICE as an argument.
7450
7451 * util/console.c: Include config.h.
7452 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
7453 [HAVE_NCURSES_H]: Include ncurses.h.
7454 [HAVE_CURSES_H]: Include curses.h.
7455 [!A_NORMAL] (A_NORMAL): Defined as zero.
7456 [!A_STANDOUT] (A_STANDOUT): Likewise.
7457
7458 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
7459 -lncurses.
7460 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
7461
7462 * configure.ac: Check for curses libraries and headers.
7463
7464 * Makefile.in (LIBCURSES): New variable.
7465
7466 * genmk.rb (Script::rule): Set the executable bits.
7467
7468 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
7469 name of the PC partition map is "pc_partition_map" but not "pc".
7470
0e143073 74712005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7472
7473 * util/i386/pc/grub-install.in (grub_probefs): New variable.
7474 (modules): Likewise.
7475 (usage): Added descriptions for --modules and --grub-probefs.
7476 Handle --modules and --grub-probefs. Save the arguments in MODULES
7477 and GRUB_PROBEFS, respectively.
7478 Auto-detect a filesystem module against GRUBDIR. If the result is
7479 empty and modules are not specified explicitly, abort the
7480 installation. Add the result to MODULES.
7481
7482 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
7483 disk/powerpc/ieee1275/ofdisk.c,
7484 include/grub/powerpc/ieee1275/init.h and
7485 term/powerpc/ieee1275/ofconsole.c.
7486 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
7487 term/ieee1275/ofconsole.c.
7488
7489 * include/grub/powerpc/ieee1275/console.h: Resurrected.
7490
7491 * COPYING: Upgraded to the latest version. Only the address of the
7492 FSF office has changed.
7493
efd6e6d5 74942005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
7495
7496 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
7497 kern/ieee1275.c with kern/ieee1275/of.c.
7498
7499 * kern/ieee1275.c: Moved to ...
7500 * kern/ieee1275/of.c: ... here.
7501
8ceafda2 75022005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
7503
7504 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
7505 readablity.
7506
7507 * config.guess: Updated to the latest version from gnulib.
7508 * config.sub: Likewise.
7509 * install.sh: Likewise.
7510 * mkinstalldirs: Likewise.
7511
7512 * include/grub/console.h: Removed. This file is arch-specific. Do
7513 not put this in include/grub.
7514
7515 * include/grub/i386/pc/console.h: Resurrected.
7516
7517 * util/console.c: Include grub/machine/console.h instead of
7518 grub/console.h.
7519 * util/grub-emu.c: Likewise.
7520
267f6cd9 75212005-08-04 Marco Gerards <metgerards@student.han.nl>
7522
7523 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
7524 hardcoded value.
7525
7526 From Vincent Pelletier <subdino2004@yahoo.fr>
7527 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
7528 Redefined to use grub_getwh.
7529 (grub_term): New member named getwh.
7530 (grub_getwh): New prototype.
7531 * kern/term.c (grub_getwh): New function.
7532 * term/i386/pc/console.c (grub_console_getwh): New function.
7533 (grub_console_term): New member `getwh'.
7534 * term/i386/pc/vga.c (grub_vga_getwh): New function.
7535 (grub_vga_term): New member `getwh'.
0b5abe02 7536 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 7537 grub_ssize_t.
7538 (grub_ofconsole_getw): New function.
7539 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
7540 (grub_ofconsole_term): New field named getwh and new initial
7541 value.
7542
3be7266d 75432005-08-03 Hollis Blanchard <hollis@penguinppc.org>
7544
7545 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
7546 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
7547 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
7548 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
7549 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
7550 of <grub/machine/ieee1275.h>.
7551 * commands/ieee1275/reboot.c: Likewise.
7552 * boot/powerpc/ieee1275/ieee1275.c: Move ...
7553 * kern/ieee1275.c: ... to here. All users updated. Change all
7554 parameter structs to use new type `grub_ieee1275_cell_t'.
7555 * term/powerpc/ieee1275/ofconsole.c: Move ...
7556 * term/ieee1275/ofconsole.c: ... to here. All users updated.
7557 * disk/powerpc/ieee1275/ofdisk.c: Move ...
7558 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
7559 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
7560 to return int.
7561 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
7562 Remove unused prototypes. All users updated.
7563 * include/grub/powerpc/ieee1275/console.h: Removed.
7564 * include/grub/powerpc/ieee1275/ieee1275.h: Define
7565 `grub_ieee1275_cell_t'.
7566 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
7567 Cast comparisons with -1 to the correct type.
7568 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
7569 type to match `grub_ieee1275_entry_fn'.
7570
8b5f3938 75712005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
7572
7573 * DISTLIST: Added util/i386/pc/grub-probefs.c.
7574
7575 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
7576 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
7577 partmap/sun.c.
7578 (grub_probefs_SOURCES): New variable.
7579
7580 * util/i386/pc/grub-probefs.c: New file.
7581
7582 * util/i386/pc/grub-setup.c (main): Call
7583 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
7584 grub_hfs_init and grub_jfs_init to initialize the system. Call
7585 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
7586 grub_pc_partition_map_fini to finish the system.
7587
ea409713 75882005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
7589
7590 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
7591 function.
7592 (grub_multiboot_load_elf32): Likewise.
7593 (grub_multiboot_is_elf64): Likewise.
7594 (grub_multiboot_load_elf64): Likewise.
7595 (grub_multiboot_load_elf): Likewise.
7596 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
7597 an ELF32 or ELF64 file.
7598 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
7599
7600 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
7601 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
7602 NULL before calling FS->LABEL.
7603 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
7604 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
7605 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
7606 before calling FS->LABEL.
7607
141a288b 76082005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
7609
7610 * util/i386/pc/grub-install.in (datadir): New variable.
7611 (libdir): Removed.
7612 (pkgdatadir): New variable.
7613 (pkglibdir): Removed.
7614
0d5f8a54 76152005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
7616
7617 * DISTLIST: Added util/i386/pc/grub-install.in.
7618
7619 * util/i386/pc/grub-install.in: New file.
7620
7621 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
7622 (grub_install_SOURCES): Likewise.
7623
7624 * genmk.rb: Added support for scripts.
7625 (Script): New class.
7626 (scripts): New variable.
7627
7628 * Makefile.in (install-local): Install sbin_SCRIPTS by
7629 INSTALL_SCRIPT.
7630 (uninstall): Remove sbin_SCRIPTS.
7631
7632 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
7633 device, try to get a GRUB device by
7634 grub_util_biosdisk_get_grub_dev.
7635 Free DEST_DEV.
7636
7637 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
7638 description for --device-map.
7639
5f968e1e 76402005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7641
7642 Change the semantics of variable hooks. They now return strings
7643 instead of error values.
7644
7645 * util/i386/pc/grub-setup.c: Include grub/env.h.
7646 (setup): Use grub_device_set_root instead of grub_env_set.
7647
7648 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
7649 grub_env_get instead of grub_device_set_root and
7650 grub_device_get_root, respectively.
7651
7652 * kern/main.c (grub_env_write_root): New function.
7653 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
7654 grub_env_set instead of grub_device_set_root.
7655
7656 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
7657 many variables.
7658 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
7659 rather than calling ENV->WRITE_HOOK afterwards.
7660 (grub_env_get): Return the result of ENV->READ_HOOK rather than
7661 passing a pointer of a pointer.
7662 (grub_register_variable_hook): Change the types of "read_hook" and
7663 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
7664 respectively.
7665 Allocate the default empty string on the heap, because this string
7666 may be freed later.
7667
7668 * kern/device.c: Include grub/env.h.
7669 (grub_device_set_root): Removed.
7670 (grub_device_get_root): Likewise.
7671 (grub_device_open): Use grub_env_get instead of
7672 grub_device_get_root.
7673
7674 * include/grub/env.h (grub_env_read_hook_t): New type.
7675 (grub_env_write_hook_t): Likewise.
7676 (grub_env_var): Change the types of "read_hook" and "write_hook"
7677 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
7678 (grub_register_variable_hook): Likewise.
7679
7680 * include/grub/device.h (grub_device_set_root): Removed.
7681 (grub_device_set_root): Likewise.
7682
7683 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
7684 make sure that DIRNAME terminates with '/', so that
7685 grub_fat_find_dir will fail if PATH is not a directory.
7686
7687 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
7688 from DIRNAME.
7689 Use the qualifier auto for print_files and print_files_long.
7690 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
7691 as a regular file.
7692 Put a newline only if there is no error.
7693 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
7694 used.
7695
896f0afd 76962005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
7697
7698 * kern/partition.c (grub_partition_probe): Initialize PART to
7699 NULL. Otherwise, when no partition map is registered, this returns
7700 a garbage.
7701
b28b81b2 77022005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
7703
7704 * partmap/apple.c (apple_partition_map_iterate): Check if POS
7705 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
7706 valid.
7707
5f3607e0 77082005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
7709
7710 * commands/ls.c (grub_ls_list_disks): Print the filesystem
7711 information on each device, if it does not have partitions. Print
7712 "Device" instead of "Disk", because this function is not specific
7713 to disk devices.
7714
7715 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
7716 static to ensure that it is put on the memory rather than a
7717 register.
7718
502c87e8 77192005-07-17 Yoshinori Okuji <okuji@enbug.org>
7720
7721 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
7722 (grub_cat_init): Likewise.
7723 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
7724 (options): Likewise.
7725 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
7726 (grub_configfile_init): Likewise.
7727 * font/manager.c (GRUB_MOD_INIT): Likewise.
7728 * commands/help.c (GRUB_MOD_INIT): Likewise.
7729 (grub_help_init): Likewise.
7730 * normal/command.c (grub_command_init): Likewise.
7731 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
7732 * disk/loopback.c (grub_loop_init): Likewise.
7733 (GRUB_MOD_INIT): Likewise.
7734 * commands/ls.c (grub_ls_init): Likewise.
7735 (GRUB_MOD_INIT): Likewise.
7736 (options): Likewise.
7737 * commands/boot.c (grub_boot_init): Likewise.
7738 (GRUB_MOD_INIT): Likewise.
7739 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
7740 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
7741 (GRUB_MOD_INIT): Likewise.
7742 * commands/cmp.c (grub_cmp_init): Likewise.
7743 (GRUB_MOD_INIT): Likewise.
7744
7745 * normal/arg.c: Use <> instead of "" to include header files.
7746 (SHORT_ARG_HELP): New macro.
7747 (SHORT_ARG_USAGE): Likewise.
7748 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
7749 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
7750 descriptions.
7751 (find_short): Check if C is 'h' or 'u' explicitly.
7752 (grub_arg_show_help): Use space characters instead of tabs. Treat
7753 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
7754 are shown with --help and --usage only if they are not used for
7755 the command itself.
7756 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
7757 'h' and 'u'.
7758
7759 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
7760 const into "longarg". Change the type of "shortarg" to int.
7761
f806d18e 77622005-07-17 Yoshinori Okuji <okuji@enbug.org>
7763
7764 * boot/i386/pc/boot.S (boot_drive_check): New label.
7765
7766 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
7767 macro.
7768
7769 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
7770 which do not pass a boot drive correctly. Copied from GRUB Legacy.
7771
e293232b 77722005-07-17 Yoshinori Okuji <okuji@enbug.org>
7773
7774 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
7775 When turning off Gate A20, skip the check and return immediately,
7776 because this is not fatal usually.
7777
ebedfd00 77782005-07-17 Yoshinori Okuji <okuji@enbug.org>
7779
7780 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
7781 be 0x7C00 instead of 0x8000.
7782
7783 * boot/i386/pc/pxeboot.S: Rewritten.
7784
7785 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
7786 EXT_C.
7787 (gate_a20_check_state): Read a byte from 0x108000. Invert the
7788 result.
7789
654fc59f 77902005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
7791
7792 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
7793 robustness. This routine now supports a BIOS call and System
7794 Control Port A to modify the gate A20.
7795
7796 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7797 Increased to 0x440.
7798
09f9923f 77992005-07-12 Hollis Blanchard <hollis@penguinppc.org>
7800
7801 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
7802 device path and resulting ihandle.
7803 (grub_ofdisk_close): dprintf the ihandle being closed.
7804 (grub_ofdisk_read): dprintf function parameters.
7805 * kern/mm.c (grub_mm_init_region): Likewise.
7806 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
7807 (grub_linux_boot): dprintf the Linux entry point, initrd address and
7808 size, and boot arguments.
7809 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
7810 before loading into memory.
7811 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
7812 before loading into memory.
7813
7ef504d8 78142005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
7815
7816 * kern/mm.c: Added much documentation.
7817 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
7818 8, set to 5 instead of 8.
7819
e0f050c2 78202005-07-10 Yoshinori Okuji <okuji@enbug.org>
7821
7822 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
7823
7824 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
7825 (grub_mkdevicemap_SOURCES): New variable.
7826
7827 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
7828 lib/device.c of GRUB Legacy.
7829
7224189a 78302005-07-10 Yoshinori Okuji <okuji@enbug.org>
7831
7832 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
7833 instead of PATH is NULL.
7834
68c864eb 78352005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
7836
7837 * commands/cmp.c (BUFFER_SIZE): New macro.
7838 (grub_cmd_cmp): Close the right file at the right time. Compare
7839 only data just read. Don't report files of different size as
7840 identical. Dynamically allocate buffers. Move variable
7841 declarations at the beginning of function.
7842
e6f3e614 78432005-07-09 Yoshinori Okuji <okuji@enbug.org>
7844
7845 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
7846 reverse.
7847
f8f1559a 78482004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
7849
7850 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
7851 when backspace is pressed at beginning of line.
7852
39c9d41d 78532005-07-03 Yoshinori Okuji <okuji@enbug.org>
7854
7855 * DISTLIST: Added genfslist.sh.
7856
7857 * normal/main.c (fs_module_list): New variable.
7858 (autoload_fs_module): New function.
7859 (read_fs_list): Likewise.
7860 (grub_normal_execute): Call read_fs_list.
7861
7862 * kern/fs.c (grub_fs_autoload_hook): New variable.
7863 (grub_fs_probe): Added support for auto-loading.
7864
7865 * include/grub/normal.h (struct grub_fs_module_list): New struct.
7866 (grub_fs_module_list_t): New type.
7867
7868 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
7869 (grub_fs_autoload_hook): New prototype.
7870
7871 * genfslist.sh: New file.
7872
7873 * genmk.rb: Added a rule to generate a filesystem list.
7874
121c1d83 78752005-06-30 Marco Gerards <metgerards@student.han.nl>
7876
7877 * configure.ac: Fix the test for cross-compiling.
7878
7879 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
7880 define GRUB_UTIL anymore.
7881
7882 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
7883 so this function works on other systems than just big endian.
7884 (load_modules): Likewise.
7885 (add_segments): Likewise.
7886
e75d76e1 78872005-06-23 Hollis Blanchard <hollis@penguinppc.org>
7888
7889 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
7890 contains `l' modifier, get a long from va_arg().
7891
50b5a0a7 78922005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
7893
7894 * kern/mm.c (grub_free): If the next free block which is being
7895 merged is the first free block, set the first block to the block
7896 being freed.
7897 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
7898
89371b20 78992005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7900
7901 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
7902 `grub_ieee1275_chosen'.
7903
168d6e58 79042005-05-08 Hollis Blanchard <hollis@penguinppc.org>
7905
7906 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
7907 (grub_ieee1275_chosen): New variable.
7908 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
7909 `chosen'.
7910 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
7911 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7912 Rename first argument to `phandle' for consistency.
7913 (grub_ieee1275_get_property_length): Likewise.
7914 (grub_ieee1275_next_property): Likewise. Change type of first argument
7915 to grub_ieee1275_phandle_t.
7916 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
7917 Move export next to declaration.
7918 (grub_ieee1275_chosen): New variable.
7919 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
7920 Correct cosmetic typo.
7921 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
7922 `grub_ieee1275_chosen'.
7923 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
7924 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
7925 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
7926 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
7927 `grub_ieee1275_chosen'.
7928
ca5baa3f 79292005-05-10 Hollis Blanchard <hollis@penguinppc.org>
7930
7931 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
7932 /chosen/bootargs.
7933 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
7934 /chosen/bootargs as "variable=value" pairs.
7935
708b345f 79362005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
7937
7938 * include/grub/misc.h (grub_dprintf): New macro.
7939 (grub_real_dprintf): New prototype.
7940 (grub_strword): Likewise.
7941 (grub_iswordseparator): Likewise.
7942 * kern/misc.c (grub_real_dprintf): New function.
7943 (grub_strword): Likewise.
7944 (grub_iswordseparator): Likewise.
7945
f4c5e67c 79462005-04-30 Hollis Blanchard <hollis@penguinppc.org>
7947
7948 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
7949 (roundup): Remove macro.
7950 (grub_ieee1275_flags): Make static.
7951 (grub_ieee1275_realmode): Remove.
7952 (grub_ieee1275_test_flag): New function.
7953 (grub_ieee1275_set_flag): Likewise.
7954 (find_options): Rename to `grub_ieee1275_find_options'; update
7955 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
7956 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
7957 (cmain): New prototype.
7958 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
7959 `grub_ieee1275_flags' directly.
7960 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
7961 machine/biosdisk.h.
7962 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
7963 Don't include grub/machine/init.h.
7964 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
7965 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7966 Remove prototype.
7967 (grub_ieee1275_realmode): Likewise.
7968 (grub_ieee1275_flag): New enum.
7969 (grub_ieee1275_test_flag): New prototype.
7970 (grub_ieee1275_set_flag): New prototype.
7971 * include/grub/powerpc/ieee1275/init.h: Remove file.
7972 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
7973 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
7974 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
7975 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
7976 comment.
7977 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
7978 `grub_ieee1275_test_flag'.
7979 (grub_ieee1275_encode_devname): Likewise.
7980
ed16607e 79812005-04-21 Hollis Blanchard <hollis@penguinppc.org>
7982
7983 * include/grub/powerpc/ieee1275/ieee1275.h
7984 (grub_ieee1275_encode_devname): New prototype.
7985 (grub_ieee1275_get_filename): Likewise.
7986 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
7987 function.
7988 (grub_set_prefix): Likewise.
7989 (grub_machine_init): Call grub_set_prefix.
7990 * kern/powerpc/ieee1275/openfw.c: Fix typos.
7991 (grub_parse_type): New enum.
7992 (grub_ieee1275_get_devargs): New function.
7993 (grub_ieee1275_get_devname): Likewise.
7994 (grub_ieee1275_parse_args): Likewise.
7995 (grub_ieee1275_get_filename): Likewise.
7996 (grub_ieee1275_encode_devname): Likewise.
7997
be369920 79982005-03-30 Marco Gerards <metgerards@student.han.nl>
7999
8000 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
8001 `grub_loader_unset'.
8002
a5ce3a4a 80032005-03-26 Hollis Blanchard <hollis@penguinppc.org>
8004
8005 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
8006 instead of grub_ieee1275_interpret.
8007 (grub_halt_init): New function.
8008 (grub_halt_fini): Likewise.
8009 (GRUB_MOD_INIT): Correct message grammar.
8010 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
8011 instead of grub_ieee1275_interpret.
8012 (grub_reboot_init): New function.
8013 (grub_reboot_fini): Likewise.
8014 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
8015 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
8016 util/i386/pc/misc.c with commands/ieee1275/halt.c,
8017 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
8018 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
8019 function.
8020 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
8021 Add prototype.
8022 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
8023 prototype.
8024 (grub_halt): Likewise.
8025 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
8026 (cmain): Remove __attribute__((unused)).
8027 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
8028 (grub_heap_len): Likewise.
8029 (grub_machine_fini): New function.
8030 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
8031 (grub_halt): Likewise.
8032 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
8033 function.
8034 * util/powerpc/ieee1275/misc.c: New file.
8035
0058f771 80362005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8037
8038 * DISTLIST: New file.
8039 * gendistlist.sh: Likewise.
8040
8041 * Makefile.in (COMMON_DISTFILES): Removed.
8042 (BOOT_DISTFILES): Likewise.
8043 (CONF_DISTFILES): Likewise.
8044 (DISK_DISTFILES): Likewise.
8045 (FS_DISTFILES): Likewise.
8046 (INCLUDE_DISTFILES): Likewise.
8047 (KERN_DISTFILES): Likewise.
8048 (LOADER_DISTFILES): Likewise.
8049 (TERM_DISTFILES): Likewise.
8050 (UTIL_DISTFILES): Likewise.
8051 (DISTFILES): Likewise.
8052 (uninstall): Uninstall files in $(pkgdata_DATA).
8053 (DISTLIST): New target.
8054 (distdir): Use the contents of the file DISTLIST to get a list of
8055 distributed files.
8056
46b3b8a5 80572005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8058
8059 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
8060 descriptor. This is ported from GRUB Legacy.
8061
8062 * gencmdlist.sh: Added an extra semicolon to make it work with
8063 old sed versions. Reported by Robert Bihlmeyer
8064 <robbe@orcus.priv.at>.
8065
5822ff87 80662005-03-08 Yoshinori Okuji <okuji@enbug.org>
8067
8068 Automatic loading of commands is supported.
8069
8070 * normal/main.c (read_command_list): New function.
8071 (grub_normal_execute): Call read_command_list.
8072
8073 * normal/command.c (grub_register_command): Return zero or CMD.
8074 Allocate CMD->NAME from the heap.
8075 Initialize CMD->MODULE_NAME to zero.
8076 Find the same name as well. If the same command is found and it is
8077 a dummy command, overwrite members. If it is not a dummy command,
8078 return zero.
8079 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
8080 (grub_command_find): If a dummy command is found, load a module
8081 and retry to find a command only once.
8082
8083 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
8084 make sure that each command is loaded.
8085
8086 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
8087 macro.
8088 (struct grub_command): Remove const from the member `name'.
8089 Add a new member `module_name'.
8090 (grub_register_command): Return grub_command_t.
8091
8092 * commands/help.c (grub_cmd_help): Call grub_command_find to make
8093 sure that each command is loaded.
8094
8095 * genmk.rb (PModule::rule): Specify a module name without the
8096 suffix ".mod" to gencmdlist.sh.
8097
7b1f4b57 80982005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8099
8100 * gencmdlist.sh: New file.
8101
8102 * genmk.rb (PModule::rule): Generate a rule for a command list.
8103 Clean command.lst.
8104 Generate command.lst from $(COMMANDFILES).
8105
8106 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
8107 (DATA): Added $(pkgdata_DATA).
8108 (install-local): Install files in $(pkgdata_DATA).
8109
062aaf39 81102005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
8111
8112 * term/i386/pc/vga.c (debug_command): Removed.
8113 (GRUB_MOD_INIT): Do not register the command "debug".
8114
8115 From Hollis Blanchard:
8116 * commands/configfile.c: New file.
8117 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8118 commands/configfile.c.
8119 (pkgdata_MODULES): Added configfile.mod.
8120 (configfile_mod_SOURCES): New variable.
8121 (configfile_mod_CFLAGS): Likewise.
8122 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
8123 commands/configfile.c.
8124 (pkgdata_MODULES): Added configfile.mod.
8125 (configfile_mod_SOURCES): New variable.
8126 (configfile_mod_CFLAGS): Likewise.
8127 * util/grub-emu.c (main): Call grub_configfile_init and
8128 grub_configfile_fini.
8129 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
8130 prototype.
8131 [GRUB_UTIL] (grub_configfile_fini): Likewise.
8132
cee01aa6 81332005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8134
8135 * normal/arg.c (grub_arg_show_help): Do not show the bug report
8136 address.
8137
8138 * commands/help.c (grub_cmd_help): Do not print newlines after
8139 the last command in print_command_help.
8140
93f3a1d8 81412005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
8142
8143 * commands/default.h: New file.
8144 * commands/timeout.h: Likewise.
8145 * normal/context.c: Likewise.
8146
8147 * util/misc.c: Do not include sys/times.h.
8148 Include sys/time.h and grub/machine/time.h.
8149 (grub_get_rtc): Rewritten with gettimeofday.
8150
8151 * util/grub-emu.c (main): Call grub_default_init and
8152 grub_timeout_init before grub_normal_init, and call
8153 grub_timeout_fini and grub_default_fini after grub_main.
8154
8155 * util/console.c (grub_ncurses_checkkey): Return the read
8156 character or -1.
8157
8158 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
8159 timeouts.
8160
8161 * normal/main.c (read_config_file): Push MENU. If this fails,
8162 print an error and wait for a user input.
8163 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
8164 If a menu is empty or an error occurs, pop MENU.
8165 (grub_normal_execute): Pop and free MENU after grub_menu_run
8166 returns.
8167
8168 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
8169
8170 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
8171 include time.h.
8172 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8173 without GRUB_UTIL.
8174 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
8175 time.h.
8176 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
8177 without GRUB_UTIL.
8178
8179 * include/grub/normal.h (struct grub_menu_list): New struct.
8180 (grub_menu_list_t): New type.
8181 (struct grub_context): New struct.
8182 (grub_context_t): New type.
8183 (grub_register_command): Got rid of EXPORT_FUNC.
8184 (grub_unregister_command): Likewise.
8185 (grub_context_get): New prototype.
8186 (grub_context_get_current_menu): Likewise.
8187 (grub_context_push_menu): Likewise.
8188 (grub_context_pop_menu): Likewise.
8189 [GRUB_UTIL] (grub_default_init): Likewise.
8190 [GRUB_UTIL] (grub_default_fini): Likewise.
8191 [GRUB_UTIL] (grub_timeout_init): Likewise.
8192 [GRUB_UTIL] (grub_timeout_fini): Likewise.
8193
8194 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
8195 commands/timeout.c and normal/context.c.
8196 (pkgdata_MODULES): Added default.mod and timeout.mod.
8197 (normal_mod_SOURCES): Added normal/context.c.
8198 (default_mod_SOURCES): New variable.
8199 (default_mod_CFLAGS): Likewise.
8200 (timeout_mod_SOURCES): Likewise.
8201 (timeout_mod_CFLAGS): Likewise.
8202 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
8203 conf/i386-pc.rmk.
8204 (pkgdata_MODULES): Added default.mod and timeout.mod.
8205 (normal_mod_SOURCES): Added normal/context.c.
8206 (default_mod_SOURCES): New variable.
8207 (default_mod_CFLAGS): Likewise.
8208 (timeout_mod_SOURCES): Likewise.
8209 (timeout_mod_CFLAGS): Likewise.
8210
8211 * Makefile.in (all-local): Added $(MKFILES).
8212
4ed2e1dd 82132005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
8214
8215 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
8216 (grub_emu_SOURCES): Likewise.
8217 (pkgdata_MODULES): Add `sun.mod'.
8218 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8219 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8220 `partmap/sun.c'.
8221 (pkgdata_MODULES): Add `sun.mod'.
8222 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
8223 * include/grub/partition.h (grub_sun_partition_map_init): New
8224 prototype.
8225 (grub_sun_partition_map_fini): Likewise.
8226 * partmap/sun.c: New file.
8227 * util/grub-emu.c (main): Initialize and de-initialize the sun
8228 partitionmap support.
8229
4d4e372e 82302005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
8231
8232 This implements an Emacs-like menu entry editor.
8233
8234 * normal/menu_entry.c: New file.
8235
8236 * util/console.c (grub_ncurses_putchar): Translate some Unicode
8237 characters to ASCII.
8238 (saved_char): New variable.
8239 (grub_ncurses_checkkey): Rewritten completely.
8240 (grub_ncurses_getkey): Likewise.
8241 (grub_ncurses_init): Call raw instead of cbreak.
8242
8243 * normal/menu.c (print_entry): Do not put a space.
8244 (init_page): Renamed to ...
8245 (grub_menu_init_page): ... this. All callers changed.
8246 (edit_menu_entry): Removed.
8247 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
8248
8249 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
8250
8251 * kern/misc.c (grub_vprintf): Call grub_refresh.
8252
8253 * normal/menu.c (DISP_LEFT): Renamed to ...
8254 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
8255 * normal/menu.c (DISP_UP): Renamed to ...
8256 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
8257 * normal/menu.c (DISP_RIGHT): Renamed to ...
8258 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
8259 * normal/menu.c (DISP_DOWN): Renamed to ...
8260 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
8261 * normal/menu.c (DISP_HLINE): Renamed to ...
8262 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
8263 * normal/menu.c (DISP_VLINE): Renamed to ...
8264 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
8265 * normal/menu.c (DISP_UL): Renamed to ...
8266 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
8267 * normal/menu.c (DISP_UR): Renamed to ...
8268 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
8269 * normal/menu.c (DISP_LL): Renamed to ...
8270 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
8271 * normal/menu.c (DISP_LR): Renamed to ...
8272 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
8273 * normal/menu.c (TERM_WIDTH): Renamed to ...
8274 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
8275 * normal/menu.c (TERM_HEIGHT): Renamed to ...
8276 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
8277 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
8278 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
8279 * normal/menu.c (TERM_MARGIN): Renamed to ...
8280 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
8281 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
8282 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
8283 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
8284 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
8285 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
8286 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
8287 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
8288 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
8289 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
8290 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
8291 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
8292 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
8293 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
8294 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
8295 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
8296 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
8297 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
8298 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
8299 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
8300 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
8301 All callers changed.
8302
8303 * include/grub/normal.h: New prototype.
8304
8305 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8306 normal/menu_entry.c.
8307 (normal_mod_SOURCES): Likewise.
8308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8309 (normal_mod_SOURCES): Likewise.
8310
e6b92c8a 83112005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
8312
8313 * include/grub/normal.h (grub_halt_init): New prototype.
8314 (grub_halt_fini): Likewise.
8315 (grub_reboot_init): Likewise.
8316 (grub_reboot_fini): Likewise.
8317
8318 * util/grub-emu.c: Include signal.h.
8319 (main_env): New global variable.
8320 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
8321 catch C-c.
8322 (grub_machine_fini): New function.
8323 (main): Call grub_halt_init and grub_reboot_init before
8324 grub_main, and grub_reboot_fini and grub_halt_fini after it.
8325 Call setjmp with MAIN_ENV to go back afterwards.
8326 Call grub_machine_fini right before return.
8327
8328 * include/grub/util/misc.h: Include setjmp.h.
8329 (main_env): New prototype.
8330
8331 * include/grub/kernel.h (grub_machine_fini): New prototype.
8332 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
8333 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
8334
8335 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
8336 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
8337 * term/i386/pc/console.c (grub_console_fini): Likewise.
8338
8339 * util/i386/pc/misc.c: New file.
8340
8341 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
8342 util/i386/pc/misc.c, commands/i386/pc/halt.c and
8343 commands/i386/pc/reboot.c.
8344
c642636f 83452005-02-14 Guillem Jover <guillem@hadrons.org>
8346
8347 * include/grub/dl.h (grub_dl_check_header): New prototype.
8348 (grub_arch_dl_check_header): Change return type to grub_err_t,
8349 remove size parameter and export function. Update all callers.
8350 * kern/dl.c (grub_dl_check_header): New function.
8351 (grub_dl_load_core): Use `grub_dl_check_header' instead of
8352 `grub_arch_dl_check_header'. Check ELF type. Check if sections
8353 are inside the core.
8354 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
8355 independent ELF header checks.
8356 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8357 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
8358 `grub_dl_check_header' instead of explicit checks. Check for the
8359 ELF type.
8360 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
8361 `grub_dl_check_header' instead of explicit checks. Remove arch
8362 specific ELF header checks.
8363
e6b92c8a 8364 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
8365 argument SIZE.
8366
5eabe94b 83672005-02-13 Hollis Blanchard <hollis@penguinppc.org>
8368
8369 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
8370 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
8371
1b14a681 83722005-02-12 Hollis Blanchard <hollis@penguinppc.org>
8373
8374 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
8375 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
8376 (part_map_iterate): Clear `grub_errno' and return 0 if
8377 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
8378 * partmap/amiga.c (amiga_partition_map_iterate): Return
8379 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
8380 * partmap/apple.c (apple_partition_map_iterate): Likewise.
8381
aca108aa 83822005-02-01 Guillem Jover <guillem@hadrons.org>
8383
8384 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
8385 help info.
8386
c9f9c556 83872005-01-31 Marco Gerards <metgerards@student.han.nl>
8388
8389 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
8390 Removed prototype.
8391 (grub_rescue_cmd_linux): New prototype.
8392 (grub_rescue_cmd_initrd): Likewise.
8393 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
8394 `bi_rec'.
8395 (grub_linux_release_mem): Release the memory for the initrd.
8396 (grub_load_linux): Renamed from this...
8397 (grub_rescue_cmd_linux): ...To this. Changed all callers.
8398 Changed `entry' not to be static. Loop over memory regions to
8399 find another one when the default fails.
8400 (grub_rescue_cmd_initrd): New function.
8401 (grub_linux_init): Remove function.
8402 (grub_linux_fini): Likewise.
8403 (GRUB_MOD_INIT): Register `initrd'.
8404 (GRUB_MOD_FINI): Unregister `initrd'.
8405 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
8406 Function removed.
8407 (grub_linux_normal_fini): Likewise.
8408 (GRUB_MOD_INIT): Register `initrd'.
8409 (GRUB_MOD_FINI): Unregister `initrd'.
8410
990cf3aa 84112005-01-31 Marco Gerards <metgerards@student.han.nl>
8412
8413 * commands/help.c: New file.
8414 * normal/arg.c (show_help): Renamed to...
8415 (grub_arg_show_help): ... this.
8416 * commands/i386/pc/halt.c: New file.
8417 * commands/i386/pc/reboot.c: Likewise.
8418 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
8419 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
8420 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
8421 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
8422 variables.
8423 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8424 `commands/help.c'.
8425 (pkgdata_MODULES): Add `help.mod'.
8426 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
8427 * grub/i386/pc/init.h (grub_reboot): New prototype.
8428 (grub_halt): Likewise.
8429 * include/grub/normal.h (grub_arg_show_help): New prototype.
8430 (grub_help_init): Likewise.
8431 (grub_help_fini): Likewise.
8432 * util/grub-emu.c (main): Initialize and deinitialize the help
8433 command.
8434
8435 * normal/cmdline.c (grub_cmdline_get): Doc fix.
8436
8437 * normal/command.c (grub_command_init): Fixed the description of
8438 the `set' and `unset' commands.
8439
84402005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 8441
8442 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
8443 function.
8444 * commands/ieee1275/halt.c: New file.
8445 * commands/ieee1275/reboot.c: Likewise.
8446 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
8447 `__attribute__ ((unused))'. Some GCS related fixed.
8448 (grub_suspend_init) [GRUB_UTIL]: Function removed.
8449 (grub_suspend_fini): Likewise.
8450 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
8451 and `halt.mod'.
8452 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
8453 (halt_mod_CFLAGS): New variables.
8454 * include/grub/powerpc/ieee1275/ieee1275.h
8455 (grub_ieee1275_interpret): New prototype.
8456
1ab09cc7 84572005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
8458
8459 * include/grub/misc.h (memmove): New prototype.
8460 (memcpy): Likewise.
8461
8b8cbdb2 84622005-01-22 Hollis Blanchard <hollis@penguinppc.org>
8463
8464 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
8465 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
8466
e3741a27 84672005-01-22 Marco Gerards <metgerards@student.han.nl>
8468
8469 * kern/misc.c (grub_strndup): Function rewritten.
8470
776bd780 84712005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
8472
8473 * normal/menu.c (TERM_WIDTH): Macro redefined.
8474 (TERM_TOP_BORDER_Y): Likewise.
8475 (draw_border): Replaced while-loop by a for-loop. Make the number
8476 of lines consistent with the number of lines displayed in
8477 print_entries. Added a margin below the rectangle.
8478 (print_entry): Make the entry fit in the rectangle.
8479 (print_entries): Display the scroll arrows next to the right
8480 border.
8481
78026bce 84822005-01-21 Marco Gerards <metgerards@student.han.nl>
8483
8484 * fs/minix.c (grub_minix_find_file): Reserve more space for
8485 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
8486 `grub_strncpy' to copy `path' into it.
8487
67bbaf0f 84882005-01-21 Marco Gerards <metgerards@student.han.nl>
8489
8490 Add the loopback device, a device via which files can be accessed
8491 as devices.
8492
8493 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
8494 (pkgdata_MODULES): Add loopback.mod.
8495 (loopback_mod_SOURCES): New variable.
8496 (loopback_mod_CFLAGS): Likewise.
8497 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8498 `disk/loopback.c'.
8499 (pkgdata_MODULES): Add loopback.mod.
8500 (loopback_mod_SOURCES): New variable.
8501 (loopback_mod_CFLAGS): Likewise.
8502 * disk/loopback.c: new file.
8503 * include/grub/normal.h (grub_loop_init): New prototype.
8504 (grub_loop_fini): New prototype.
8505 * util/grub-emu.c (main): Initialize and de-initialize loopback
8506 support.
8507 * include/grub/disk.h (grub_disk_dev_id): Add
8508 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
8509
6f1c18bd 85102005-01-20 Hollis Blanchard <hollis@penguinppc.org>
8511
8512 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
8513 function.
8514 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
8515 (suspend_mod_SOURCES): New variable.
8516 (suspend_mod_CFLAGS): Likewise.
8517 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
8518 New prototype.
8519 * commands/ieee1275/suspend.c: New file.
8520
b38551da 85212005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8522
8523 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
8524 ((unused))' to `__attribute__ ((used))'.
8525 (GRUB_MOD_FINI): Likewise.
8526 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
8527 * genmk.rb (PModule): Assign space to common symbols when linking
8528 modules.
8529
777aff39 85302005-01-20 Marco Gerards <metgerards@student.han.nl>
8531
8532 * include/grub/mm.h (grub_mm_init_region): Change the type of the
8533 `unsigned' arguments to `grub_size_t'.
8534 (grub_malloc): Likewise.
8535 (grub_realloc): Likewise.
8536 (grub_memalign): Likewise.
8537 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
8538 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
8539 * util/misc.c (grub_malloc): Likewise.
8540 (grub_realloc): Likewise.
8541 * kern/mm.c (get_header_from_pointer): Change the casts to
8542 `unsigned' into a cast to `grub_size_t'.
8543
8544 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
8545 point to `currnode' when `currnode' is changed.
8546
8547 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
8548 Schottelius <nico-linux@schottelius.org>.
8549
d0ff18e1 85502005-01-09 Hollis Blanchard <hollis@penguinppc.org>
8551
8552 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
8553 (note_path): Remove variable.
8554 (GRUB_IEEE1275_NOTE_NAME): New macro.
8555 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
8556 (grub_ieee1275_note_hdr): New structure.
8557 (grub_ieee1275_note_desc): Likewise.
8558 (grub_ieee1275_note): Likewise.
8559 (load_note): Remove `dir' argument. All callers updated. Remove
8560 `note_img' and `path'. Do not load a file from `note_path'.
8561 Initialize a struct grub_ieee1275_note and write that to `out'.
8562 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
8563
4ca7004c 85642005-01-05 Marco Gerards <metgerards@student.han.nl>
8565
8566 * util/misc.c (grub_util_read_image): Revert last change. It
8567 called `grub_util_read_at', which seeks from the beginning of the
8568 file.
8569
0b412211 85702005-01-04 Hollis Blanchard <hollis@penguinppc.org>
8571
8572 * TODO: Add note about endianness in grub-mkimage.
8573 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
8574 section.
8575 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
8576 (grub_mkimage_SOURCES): New target.
8577 * include/grub/kernel.h (grub_start_addr): Remove variable.
8578 (grub_end_addr): Likewise.
8579 (grub_total_module_size): Likewise.
8580 (grub_kernel_image_size): Likewise.
8581 (GRUB_MODULE_MAGIC): New constant.
8582 (grub_module_info): New structure.
8583 (grub_arch_modules_addr): New prototype.
8584 (grub_get_end_addr): Remove prototype.
8585 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
8586 * include/grub/powerpc/ieee1275/kernel.h: New file.
8587 * include/grub/util/misc.h (grub_util_get_fp_size): New
8588 prototype.
8589 (grub_util_read_at): Likewise.
8590 (grub_util_write_image_at): Likewise.
8591 * kern/main.c (grub_get_end_addr): Remove function.
8592 (grub_load_modules): Call grub_arch_modules_addr instead of using
8593 grub_end_addr. Look for a grub_module_info struct in memory. Use
8594 the grub_module_info fields instead of calling grub_get_end_addr
8595 as loop conditions. Move grub_add_unused_region code here.
8596 (grub_add_unused_region): Remove function.
8597 * kern/i386/pc/init.c: Include grub/cache.h.
8598 (grub_machine_init): Remove call to grub_get_end_addr. Remove
8599 one call to add_mem_region.
8600 (grub_arch_modules_addr): New function.
8601 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
8602 (grub_total_module_size): Likewise.
8603 Include grub/machine/kernel.h.
8604 (grub_arch_modules_addr): New function.
8605 * util/grub-emu.c (grub_end_addr): Remove variable.
8606 (grub_total_module_size): Likewise.
8607 (grub_arch_modules_addr): New function.
8608 * util/misc.c: Include unistd.h.
8609 (grub_util_get_fp_size): New function.
8610 (grub_util_read_at): Likewise.
8611 (grub_util_write_image_at): Likewise.
8612 (grub_util_read_image): Call grub_util_read_at.
8613 (grub_util_write_image): Call grub_util_write_image_at.
8614 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
8615 additional memory in kernel_img for a struct grub_module_info.
8616 Fill in that grub_module_info.
8617 * util/powerpc/ieee1275/grub-mkimage.c: New file.
8618
458786f8 86192005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8620
8621 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
8622 New function.
8623 * include/grub/powerpc/ieee1275/ieee1275.h
8624 (grub_ieee1275_milliseconds): New prototype.
8625 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
8626 Change to 1000.
8627 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
8628 grub_ieee1275_milliseconds.
8629
ac507d1b 86302005-01-03 Hollis Blanchard <hollis@penguinppc.org>
8631
8632 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
8633 variable.
8634 (find_options): New function.
8635 (cmain): Call find_options.
8636 * include/grub/powerpc/ieee1275/ieee1275.h
8637 (grub_ieee1275_realmode): New extern variable.
8638 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
8639 grub_map if grub_ieee1275_realmode is false.
8640
6b8fd1c4 86412004-12-29 Marco Gerards <metgerards@student.han.nl>
8642
8643 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
8644 lines are inserted and make it work like readline. Reported by
8645 Vincent Pelletier <subdino2004@yahoo.fr>.
8646
8514a1e0 86472004-12-28 Marco Gerards <metgerards@student.han.nl>
8648
8649 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
8650
8651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
8652 `kern/powerpc/cache.S'.
8653
924b6140 86542004-12-27 Marco Gerards <metgerards@student.han.nl>
8655
8656 * genmk.rb: Handle the `Program' class in the main loop. Written
8657 by Johan Rydberg <jrydberg@gnu.org>.
8658 (Program): New class.
8659 (programs): New variable.
8660 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
8661 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
8662 instead of "grub/kernel.h". Include <grub/machine/init.h>.
8663 (help_arch): Function removed.
8664 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
8665 `powerpc/libgcc.h' and `loader.h'.
8666 (pkgdata_PROGRAMS): New variable.
8667 (sbin_UTILITIES): Variable removed.
8668 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
8669 (grubof_SOURCES): Variable re-defined so it only includes the
8670 core functionality.
8671 (grubof_CFLAGS): Remove `-DGRUBOF'.
8672 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
8673 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
8674 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
8675 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
8676 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
8677 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
8678 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
8679 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
8680 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
8681 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
8682 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8683 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
8684 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
8685 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
8686 (pc_mod_CFLAGS): New variables.
8687 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
8688 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
8689 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
8690 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
8691 Moved from here...
8692 * include/grub/i386/pc/init.h (grub_os_area_addr)
8693 (rub_os_area_size): ... to here.
8694 * include/grub/powerpc/ieee1275/ieee1275.h
8695 (grub_ieee1275_entry_fn): Export symbol.
8696 * include/grub/powerpc/ieee1275/init.h: New file.
8697 * include/grub/powerpc/libgcc.h: Likewise.
8698 * include/grub/cache.h: Likewise.
8699 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
8700 <hollis@penguinppc.org>.
8701 * kern/dl.c: Include <grub/cache.h>.
8702 (grub_dl_flush_cache): New function.
8703 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
8704 for this module.
8705 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
8706 (grub_console_init): Removed prototypes.
8707 (grub_machine_init): Don't initialize the modules anymore.
8708 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
8709 static.
8710 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
8711 Macro undef removed.
8712 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
8713 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
8714 relocation `R_PPC_REL32'. Return an error when the relocation is
8715 unknown.
8716 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
8717 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
8718 * util/misc.c (grub_arch_sync_caches): Likewise.
8719
e4b47e0c 87202004-12-19 Marco Gerards <metgerards@student.han.nl>
8721
8722 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
8723 `symlist.c', add `grubof_symlist.c'.
8724 (symlist.c): Variable removed.
8725 (grubof_HEADERS): Variable added.
8726 (grubof_symlist.c): New target.
8727 (kernel_syms.lst): Use `grubof_HEADERS' instead of
8728 `kernel_img_HEADERS'.
8729 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
8730 * kern/powerpc/dl.c: New file.
8731 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
8732 Function removed.
8733 (grub_arch_dl_relocate_symbols): Likewise.
8734 (grub_register_exported_symbols): Likewise.
8735
4ceb3636 87362004-12-13 Marco Gerards <metgerards@student.han.nl>
8737
8738 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
8739 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
8740 to fail instead. Reported by Vincent Pelletier
8741 <subdino2004@yahoo.fr>.
8742
8743 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
8744 it is not allocated. Reported by Vincent Pelletier
8745 <subdino2004@yahoo.fr>.
8746
8747 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
8748 output so the output looks better.
8749
3f1578fe 87502004-12-04 Marco Gerards <metgerards@student.han.nl>
8751
8752 Modulize the partition map support and add support for the amiga
8753 partition map.
8754
8755 * commands/ls.c: Include <grub/partition.h> instead of
8756 <grub/machine/partition.h>.
8757 * kern/disk.c: Likewise.
8758 * kern/rescue.c: Likewise.
8759 * loader/i386/pc/chainloader.c: Likewise.
8760 * normal/cmdline.c: Likewise.
8761 * kern/powerpc/ieee1275/init.c: Likewise.
8762 (grub_machine_init): Call `grub_pc_partition_map_init',
8763 `grub_amiga_partition_map_init' and
8764 `grub_apple_partition_map_init'.
8765 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
8766 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
8767 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
8768 `partition.h' and `pc_partition.h'.
8769 (grub_setup_SOURCES): Remove
8770 `disk/i386/pc/partition.c'. Add `kern/partition.c',
8771 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8772 (grub_emu_SOURCES): Likewise.
8773 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
8774 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
8775 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
8776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8777 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
8778 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
8779 (grubof_SOURCES): Likewise.
8780 * disk/i386/pc/partition.c: File removed.
8781 * disk/powerpc/ieee1275/partition.c: Likewise.
8782 * include/grub/powerpc/ieee1275/partition.h: Likewise.
8783 * include/grub/i386/pc/partition.h: Likewise.
8784 * kern/partition.c: New file.
8785 * partmap/amiga.c: Likewise.
8786 * partmap/apple.c: Likewise.
8787 * partmap/pc.c: Likewise.
8788 * include/grub/partition.h: Likewise..
8789 * include/grub/pc_partition.h: Likewise.
8790 * util/grub-emu.c: Include <grub/partition.h> instead of
8791 <grub/machine/partition.h>.
8792 (main): Call `grub_pc_partition_map_init',
8793 `grub_amiga_partition_map_init' and
8794 `grub_apple_partition_map_init' and deinitialize afterwards.
8795 * util/i386/pc/biosdisk.c: Include `#include
8796 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8797 `<grub/machine/partition.h>'.
8798 * util/i386/pc/grub-setup.c: Likewise.
8799 * util/i386/pc/biosdisk.c: Likewise.
8800 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
8801 partition information in case of a PC partition.
8802 * util/i386/pc/grub-setup.c: Include `#include
8803 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
8804 `<grub/machine/partition.h>'.
8805 (setup): Only access the PC specific partition information in case
8806 of a PC partition.
8807
0ef4ced9 88082004-11-17 Hollis Blanchard <hollis@penguinppc.org>
8809
8810 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
8811 (grub_longjmp): Likewise.
8812 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
8813 20.
8814 * normal/powerpc/setjmp.S: New file.
8815 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8816 `normal/powerpc/setjmp.S'.
8817 (grubof_CFLAGS): Add `-DGRUBOF'.
8818 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
8819 [GRUB_UTIL && !GRUBOF].
8820
19950e29 88212004-11-16 Marco Gerards <metgerards@student.han.nl>
8822
8823 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
8824 property named `name'. Correctly handle the error returned by
8825 `grub_ieee1275_finddevice' if a device can not be opened.
8826
a2fea427 88272004-11-02 Hollis Blanchard <hollis@penguinppc.org>
8828
8829 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
8830 `actual' for negativity.
8831 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
8832 kern/fshelp.c.
8833
41ea0ea3 88342004-11-01 Marco Gerards <metgerards@student.han.nl>
8835
8836 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
8837 (PAGE_OFFSET): New macro.
8838 (CRTC_ADDR_PORT): Likewise.
8839 (CRTC_DATA_PORT): Likewise.
8840 (START_ADDR_HIGH_REGISTER): Likewise.
8841 (START_ADDR_LOW_REGISTER): Likewise.
8842 (GRAPHICS_ADDR_PORT): Likewise.
8843 (GRAPHICS_DATA_PORT): Likewise.
8844 (READ_MAP_REGISTER): Likewise.
8845 (INPUT_STATUS1_REGISTER): Likewise.
8846 (INPUT_STATUS1_VERTR_BIT): Likewise.
8847 (page): New variable.
8848 (wait_vretrace): New function.
8849 (set_read_map): Likewise.
8850 (set_start_address): Likewise.
8851 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
8852 the right page.
8853 (check_vga_mem): Take the page into account.
8854 (write_char): Likewise.
8855 (write_cursor): Likewise.
8856 (scroll_up): Likewise. Copy the page to the page that is not
8857 shown and switch between both pages.
8858 (grub_vga_putchar): Fix off by one error.
8859 (grub_vga_cls): Wait for the vertical retrace. Take the page into
8860 account.
8861
ad0bd20b 88622004-11-01 Marco Gerards <metgerards@student.han.nl>
8863
8864 Add support for iso9660 (including rockridge).
8865
8866 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8867 (iso9660_mod_SOURCES): New variable.
8868 (iso9660_mod_CFLAGS): Likewise.
8869 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
8870 * include/grub/fs.h (grub_iso9660_init): New prototype.
8871 * util/grub-emu.c (main): Call `grub_iso9660_init'.
8872 * fs/iso9660.c: New file.
8873
8874 * include/grub/misc.h (grub_strncat): New prototype.
8875 * kern/misc.c (grub_strncat): New function.
8876
8877 * fs/hfs.c (grub_hfs_mount): Translate the error
8878 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
8879 * fs/jfs.c (grub_jfs_mount): Likewise.
8880 * fs/ufs.c (grub_ufs_mount): Likewise.
8881
a5477a59 88822004-10-28 Hollis Blanchard <hollis@penguinppc.org>
8883
8884 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
8885 which initialized BAT registers.
8886 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
8887 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8888 Move from here...
8889 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
8890 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
8891 ... to here.
8892 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
8893 (grub_mapclaim): Likewise.
8894 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
8895 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
8896 hand.
8897
9304c1f8 88982004-10-19 Hollis Blanchard <hollis@penguinppc.org>
8899
8900 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
8901 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
8902 -ffreestanding and -msoft-float.
8903
86f4ae25 89042004-10-15 Hollis Blanchard <hollis@penguinppc.org>
8905
8906 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
8907 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
8908 set in grub_ieee1275_flags.
8909
38912228 89102004-10-14 Hollis Blanchard <hollis@penguinppc.org>
8911
8912 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
8913 prototype.
8914 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
8915 grub_console_init first.
8916 Change the memory range used for grub_ieee1275_claim and
8917 grub_mm_init_region.
8918 Print an error message if the claim fails.
8919 Include <grub/misc.h>.
8920
d1923dc8 89212004-10-13 Hollis Blanchard <hollis@penguinppc.org>
8922
8923 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
8924 Call grub_children_iterate for device nodes of type `scsi',
8925 `ide', or `ata'.
8926 (grub_ofdisk_open): Remove manual device alias resolution.
8927 Fix memory leak when device cannot be opened.
8928 * include/grub/powerpc/ieee1275/ieee1275.h
8929 (grub_children_iterate): New prototype.
8930 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
8931 New function.
8932 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
8933 Return -1 if args.size was -1.
8934
4512e4f3 89352004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8936
8937 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
8938 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
8939 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
8940 Open Firmware's memory for it; claim memory from _start to _end.
8941 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
8942 (_end): New extern.
8943 (_start): Zero BSS from __bss_start to _end.
8944 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
8945 New extern.
8946 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
8947
4d61feb0 89482004-10-11 Hollis Blanchard <hollis@penguinppc.org>
8949
ad0bd20b 8950 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
8951 -1 if args.base was -1.
4d61feb0 8952
026fa2f9 89532004-10-08 Hollis Blanchard <hollis@penguinppc.org>
8954
8955 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
8956 escape sequence instead of a literal ^L. Also call
8957 grub_ofconsole_gotoxy.
8958
9f2220ef 89592004-10-03 Hollis Blanchard <hollis@penguinppc.org>
8960
8961 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
8962 void * arguments to grub_addr_t. All callers updated. Also make
8963 the `result' argument optional.
8964 (grub_ieee1275_release): change void * arguments to grub_addr_t.
8965 All callers updated.
8966
8a572cd7 89672004-09-22 Hollis Blanchard <hollis@penguinppc.org>
8968
8969 * commands/ls.c (grub_ls_list_files): Use the string following the
8970 initial ')', if present, as the filesystem path.
8971 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
8972
8973 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
8974
18aa81f2 89752004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
8976
8977 Make the source code of the menu interface more readable.
8978
8979 * normal/menu.c: Include grub/mm.h.
8980 (TERM_WIDTH): New macro.
8981 (TERM_HEIGHT): Likewise.
8982 (TERM_INFO_HEIGHT): Likewise.
8983 (TERM_MARGIN): Likewise.
8984 (TERM_SCROLL_WIDTH): Likewise.
8985 (TERM_TOP_BORDER_Y): Likewise.
8986 (TERM_LEFT_BORDER_X): Likewise.
8987 (TERM_BORDER_WIDTH): Likewise.
8988 (TERM_MESSAGE_HEIGHT): Likewise.
8989 (TERM_BORDER_HEIGHT): Likewise.
8990 (TERM_NUM_ENTRIES): Likewise.
8991 (TERM_FIRST_ENTRY_Y): Likewise.
8992 (TERM_ENTRY_WIDTH): Likewise.
8993 (TERM_CURSOR_X): Likewise.
8994 (draw_border): Use macros instead of magic numbers.
8995 (print_entry): Likewise.
8996 (print_entries): Likewise.
8997 (run_menu): Likewise. Also, handle the key 'e'.
8998 (run_menu_entry): Ignore empty command lines.
8999 (print_message): Added a new argument EDIT. If EDIT is true,
9000 print a different message.
9001 (init_page): Likewise.
9002 (edit_menu_entry): New function. Not implemented yet.
9003
b47efe30 90042004-09-17 Marco Gerards <metgerards@student.han.nl>
9005
9006 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
9007 can be loaded from normal mode.
9008
9009 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
9010 `multiboot.mod'.
9011 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
9012 (multiboot_mod_CFLAGS): New variables.
9013 * loader/i386/pc/linux_normal.c: New file.
9014 * loader/i386/pc/multiboot_normal.c: Likewise.
9015
9016 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
9017 attribute `unused'.
9018
9019 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
9020 `fdiro' to read the mode information from instead of `diro'.
9021
9022 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
9023 looking up a symlink.
9024
9025 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
9026 macro.
9027 * normal/command.c (grub_command_execute): Don't parse the
9028 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
9029 flags of the command.
9030
9031 * normal/menu.c (grub_menu_run): Fix typo.
9032
da75ac71 90332004-09-14 Hollis Blanchard <hollis@penguinppc.org>
9034
9035 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
9036
9037 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
9038 `y + 1' instead of `y - 1'.
9039
9040 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
9041
062b24c2 90422004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
9043
9044 From Hollis Blanchard <hollis@penguinppc.org>:
9045 * kern/misc.c (memmove): New alias for grub_memmove.
9046 (memcmp): New alias for grub_memcmp.
9047 (memset): New alias for grub_memset.
9048 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
9049 Change "int handle" to "grub_ieee1275_phandle_t handle".
9050 * include/grub/powerpc/ieee1275/ieee1275.h
9051 (grub_ieee1275_get_property): Likewise.
9052
8ddad845 90532004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
9054
9055 Added normal mode command `chainloader' as module chain.mod, which
9056 depends on normal.mod and _chain.mod.
9057
9058 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
9059 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
9060 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
9061 Deleted prototype.
9062 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
9063 but arguments parsing moved to ...
9064 (grub_chainloader_cmd): ... here. New function.
9065 * include/grub/i386/pc/chainloader.h: New file.
9066 * loader/i386/pc/chainloader_normal.c: Likewise.
9067
2c1f4ce3 90682004-09-11 Marco Gerards <metgerards@student.han.nl>
9069
9070 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
9071 (grub_mkimage_LDFLAGS): Likewise.
9072 (grub_emu_SOURCES): Likewise.
9073 (kernel_img_HEADERS): Added fshelp.h.
9074 * fs/ext2.c: Include <grub/fshelp.h>.
9075 (FILETYPE_REG): New macro.
9076 (FILETYPE_INO_REG): Likewise.
9077 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
9078 Changed all users.
9079 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
9080 all users.
9081 (grub_fshelp_node): New struct.
9082 (grub_ext2_data): Added member `diropen'. Changed member `inode'
9083 to a pointer.
9084 (grub_ext2_get_file_block): Removed function.
9085 (grub_ext2_read_block): New function.
9086 (grub_ext2_read_file): Replaced parameter `data' by `node'.
9087 This function was written.
9088 (grub_ext2_mount): Read the root inode. Create a diropen struct.
9089 (grub_ext2_find_file): Removed function.
9090 (grub_ext2_read_symlink): New function.
9091 (grub_ext2_iterate_dir): Likewise.
9092 (grub_ext2_open): Rewritten.
9093 (grub_ext2_dir): Rewritten.
9094 * include/grub/fshelp.h: New file.
9095 * fs/fshelp.c: Likewise.
9096
3c52136a 90972004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
9098
9099 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
9100 (print_message): Add a missing newline.
9101 (run_menu): Added timeout support.
9102 (run_menu_entry): New local function.
9103 (grub_menu_run): Added support for booting.
9104
9105 * kern/loader.c (grub_loader_is_loaded): New function.
9106
9107 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
9108 (grub_get_rtc): Exported.
9109
9110 * include/grub/i386/pc/time.h: Include grub/symbol.h.
9111 (grub_get_rtc): Exported.
9112
9113 * include/grub/normal.h (struct grub_command_list): Remove
9114 constant from the member `command'.
9115
9116 * include/grub/loader.h (grub_loader_is_loaded): Declared.
9117
9118 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
9119
9120 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
9121
aa033560 91222004-08-28 Marco Gerards <metgerards@student.han.nl>
9123
9124 Add support for the JFS filesystem.
9125
9126 * fs/jfs.c: New file.
9127 * include/grub/fs.h (grub_jfs_init): New prototype.
9128 (grub_jfs_fini): New prototype.
9129 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
9130 (grub_emu_SOURCES): Likewise.
9131 (pkgdata_MODULES): Add jfs.mod.
9132 (jfs_mod_SOURCES): New variable.
9133 (jfs_mod_CFLAGS): Likewise.
9134 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
9135 (grubof_SOURCES): Likewise.
9136 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
9137
9138 * fs/fat.c (grub_fat_find_dir): Convert the filename little
9139 endian to the host endian.
9140 (grub_fat_utf16_to_utf8): Move function from there...
9141 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
9142 the endianess of the source string anymore.
9143 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
9144
94bc45af 91452004-08-24 Marco Gerards <metgerards@student.han.nl>
9146
9147 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
9148 (grub_boot_fini) [GRUB_UTIL]: Likewise.
9149 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
9150 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
9151
9152 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
9153 (grub_hfs_iterate_dir): Make the function static. Add prototypes
9154 for `node_found' and `it_dir'.
9155 (grub_hfs_dir): Add prototype for `dir_hook'.
9156
9157 * fs/minix.c (grub_minix_get_file_block): Add prototype for
9158 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
9159 and `indir32' to silence a gcc warning.
9160
9161 * include/grub/fs.h (grub_hfs_init): New prototype.
9162 (grub_hfs_fini): Likewise.
9163
9164
97543f08 91652004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9166
9167 Each disk device has its own id now. This is useful to make use
9168 of multiple disk devices.
9169
9170 * include/grub/disk.h (grub_disk_dev_id): New enum.
9171 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
9172 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
9173
9174 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
9175 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9176
9177 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
9178 GRUB_DISK_DEVICE_OFDISK_ID as an id.
9179
9180 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
9181 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
9182
9183 * include/grub/disk.h (struct grub_disk_dev): Added a new member
9184 "id" which is used by the cache manager.
9185
9186 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
9187 of just "GRUB".
9188
64372eb4 91892004-08-18 Marco Gerards <metgerards@student.han.nl>
9190
9191 * fs/hfs.c: New file.
9192 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
9193 (grub_emu_SOURCES): Likewise.
9194 (pkgdata_MODULES): Add hfs.mod.
9195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
9196 (grubof_SOURCES): Likewise.
9197 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
9198
9199 * include/grub/misc.h (grub_strncasecmp): Add prototype.
9200 * kern/misc.c (grub_strncasecmp): Add function.
9201
cc61b58f 92022004-08-14 Marco Gerards <metgerards@student.han.nl>
9203
9204 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
9205 with parentheses.
9206
9207 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
9208 (grub_ext2_dir): In case the directory entry type is unknown, read
9209 it from the inode.
9210
0ef123f6 92112004-08-02 Peter Bruin <pjbruin@dds.nl>
9212
9213 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
9214 grub_load_linux instead of grub_rescue_cmd_linux as second
9215 argument of grub_rescue_register_command.
9216
9217 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
9218
a447c5df 92192004-07-27 Marco Gerards <metgerards@student.han.nl>
9220
9221 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
9222 function.
9223 * commands/boot.c: Remove the check for `GRUB_UTIL'.
9224 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
9225 `loader/powerpc/ieee1275/linux.c',
9226 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
9227 * include/grub/powerpc/ieee1275/ieee1275.h
9228 (grub_ieee1275_release): New prototype.
9229 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
9230 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
9231 normal, boot, linux and linux_normal.
9232 * loader/powerpc/ieee1275/linux.c: New file.
9233 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9234
5a9e3546 92352004-07-12 Marco Gerards <metgerards@student.han.nl>
9236
9237 * normal/arg.c (grub_arg_parse): Correct error handling after
9238 reallocating the argumentlist (check if `argl' is not null instead
9239 of checking if `args' is not null).
9240 * kern/mm.c (grub_realloc): Return the same pointer when using the
9241 same region, instead of returning the header address.
9242
e15199cb 92432004-07-11 Marco Gerards <metgerards@student.han.nl>
9244
9245 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
9246 one block instead of two when looking for the initial partition.
9247 (grub_partition_probe): Initialize the local variable `p' with 0.
9248 Use base 10 for the grub_strtoul call.
9249 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
9250 need for one local variable.
9251 (grub_strtoul): Don't add the new value to `num', instead of that
9252 just assign it.
9253
020616c2 92542004-07-11 Marco Gerards <metgerards@student.han.nl>
9255
9256 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
9257 (pxeboot_img_SOURCES): New variable.
9258 (pxeboot_img_ASFLAGS): Likewise.
9259 (pxeboot_img_LDFLAGS): Likewise.
9260 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
9261 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
9262 <lode_leroy@hotmail.com>.
9263
6c51eb64 92642004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9265
9266 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
9267 there was no input.
9268
cfb12aff 92692004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9270
9271 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
9272 the history buffer logic.
9273
6eabba74 92742004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
9275
9276 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
9277 (FILETYPE_INO_SYMLINK): New macros.
9278 (grub_ext2_find_file): Check if the node is a directory using the
9279 inode stat information instead of using the filetype in the
9280 dirent. Exclude the first character of an absolute symlink.
9281 (grub_ext2_dir): Mask out the filetype part of the mode member of
9282 the inode.
9283
66e19ef8 92842004-05-24 Marco Gerards <metgerards@student.han.nl>
9285
9286 Add support for UFS version 1 and 2. Add support for the minix
9287 filesystem version 1 and 2, both the variants with 14 and 30 long
9288 filenames.
9289
9290 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
9291 fs/minix.c.
9292 (grub_emu_SOURCES): Likewise.
9293 (pkgdata_MODULES): Add ufs.mod and minix.mod.
9294 (ufs_mod_SOURCES): New variable.
9295 (ufs_mod_CFLAGS): Likewise.
9296 (minix_mod_SOURCES): Likewise.
9297 (minix_mod_CFLAGS): Likewise.
9298 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
9299 fs/minix.c.
9300 (grubof_SOURCES): Likewise.
9301 * fs/ufs.c: New file.
9302 * fs/minix.c: New file.
9303 * include/grub/fs.h (grub_ufs_init): New prototype.
9304 (grub_ufs_fini): Likewise.
9305 (grub_minix_init): Likewise.
9306 (grub_minix_fini): Likewise.
9307 * util/grub-emu.c (main): Initialize and deinitialize UFS and
9308 minix fs.
9309
cc2e748a 93102004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
9311
9312 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
9313 commands/ls.c, commands/terminal.c, commands/boot.c,
9314 commands/cmp.c and commands/cat.c.
9315 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
9316
9317 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
9318 "env.h"
9319
4b13b216 93202004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9321
9322 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
9323 and grub_, respectively. Because the conversion is trivial and
9324 mechanical, I omit the details here. Please refer to the CVS
9325 if you need more information.
9326
6a142551 93272004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
9328
9329 * include/pupa: Renamed to ...
9330 * include/grub: ... this.
9331 * util/i386/pc/pupa-mkimage.c: Renamed to ...
9332 * util/i386/pc/grub-mkimage.c: ... this.
9333 * util/i386/pc/pupa-setup.c: Renamed to ...
9334 * util/i386/pc/grub-setup.c: ... this.
9335 * util/pupa-emu.c: Renamed to ...
9336 * util/grub-emu.c: ... this.
9337
e56cdf21 93382004-03-29 Marco Gerards <metgerards@student.han.nl>
9339
9340 Add support for the newworld apple macintosh (PPC). This has been
9341 tested on the powerbook 2000 only. It only adds support for
9342 generic ieee1275 functions, console and disk support. This should
9343 be easy to port to other architectures with support for Open
9344 Firmware.
9345
9346 * configure.ac: Accept the powerpc as host_cpu. In the case of
9347 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
9348 specific tests are only executed while building for the i386.
9349 Inverse test for crosscompile.
9350 * genmk.rb (Utility): Allow assembler files.
9351 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
9352 * conf/powerpc-ieee1275.rmk: New file.
9353 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
9354 * disk/powerpc/ieee1275/partition.c: Likewise.
9355 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
9356 * include/pupa/powerpc/ieee1275/console.h: Likewise.
9357 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
9358 * include/pupa/powerpc/ieee1275/time.h: Likewise.
9359 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
9360 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
9361 * include/pupa/powerpc/ieee1275/loader.h
9362 * include/pupa/powerpc/setjmp.h: Likewise.
9363 * include/pupa/powerpc/types.h: Likewise.
9364 * kern/powerpc/ieee1275/init.c: Likewise.
9365 * kern/powerpc/ieee1275/openfw.c: Likewise.
9366 * term/powerpc/ieee1275/ofconsole.c: Likewise.
9367
9368 These files were written by Johan Rydberg
9369 (jrydberg@night.trouble.net) and I only modified them slightly.
9370
9371 * boot/powerpc/ieee1275/cmain.c: New file.
9372 * boot/powerpc/ieee1275/crt0.S: Likewise.
9373 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
9374 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
9375
8c8cc205 93762004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
9377
9378 * Makefile.in: Update copyright.
9379 * genmodsrc.sh: Likewise.
9380 * gensymlist.sh: Likewise.
9381 * term/i386/pc/vga.c: Indent correctly.
9382
9383 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
9384 bugreporting address.
9385 * util/i386/pc/pupa-setup.c (usage): Likewise,
9386 (main): Call pupa_ext2_init and pupa_ext2_fini.
9387
9388 * fs/fat.c (log2): Renamed to ...
9389 (fat_log2): ... this.
9390 All callers changed.
9391 * kern/misc.c (memcpy): Alias to pupa_memmove.
9392 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
9393 lvalue cast.
9394 * util/console.c (pupa_ncurses_fini): Return 0.
9395
9396 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
9397 Move fail label here.
9398 [__GNU__]: Don't warn when using stat.
9399 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
9400 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
9401 long int. Use strtol instead of strtoul.
9402
db1771cf 94032004-03-14 Marco Gerards <metgerards@student.han.nl>
9404
9405 * commands/boot.c: New file.
9406 * commands/cat.c: Likewise.
9407 * commands/cmp.c: Likewise.
9408 * commands/ls.c: Likewise.
9409 * commands/terminal.c: Likewise.
9410 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
9411 (pupa_register_command): Changed interface to match the new
9412 argument parser.
9413 (pupa_command_execute): Changed (almost rewritten) so it uses
9414 pupa_split_command. Added support for setting variables using the
9415 syntax `foo=bar'.
9416 (rescue_command): Changed to work with the new argument parser.
9417 (terminal_command): Moved from here to commands/terminal.c.
9418 (set_command): New function.
9419 (unset_command): New function.
9420 (insmod_command): New function.
9421 (rmmod_command): New function.
9422 (lsmod_command): New function.
9423 (pupa_command_init): Don't initialize the command terminal
9424 anymore. Initialize the commands set, unset, insmod, rmmod and
9425 lsmod.
9426 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
9427 (kernel_img_HEADERS): Add arg.h and env.h.
9428 (pupa_mkimage_LDFLAGS): Add kern/env.c.
9429 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
9430 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
9431 normal/arg.c.
9432 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
9433 terminal.mod.
9434 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
9435 (boot_mod_SOURCES): New variable.
9436 (terminal_mod_SOURCES): Likewise.
9437 (ls_mod_SOURCES): Likewise.
9438 (cmp_mod_SOURCES): Likewise.
9439 (cat_mod_SOURCES): Likewise.
9440
9441 * normal/arg.c: New file.
9442 * kern/env.c: Likewise.
9443 * include/pupa/arg.h: Likewise.
9444 * include/pupa/env.h: Likewise.
9445 * font/manager.c (font_command): Changed to match argument parsing
9446 interface changes.
9447 (PUPA_MOD_INIT): Likewise.
9448 * hello/hello.c (pupa_cmd_hello): Likewise.
9449 (PUPA_MOD_INIT): Likewise.
9450 * include/pupa/disk.h: Include <pupa/device.h>.
9451 (pupa_print_partinfo): New prototype.
9452 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
9453 (pupa_dl_get_prefix): Likewise.
9454 * include/pupa/misc.h: Include <pupa/err.h>.
9455 (pupa_isgraph): New prototype.
9456 (pupa_isdigit): Likewise.
9457 (pupa_split_cmdline): Likewise.
9458 * include/pupa/normal.h: Include <pupa/arg.h>.
9459 (pupa_command): Changed the prototype of the member `func' to
9460 match the argument parsing interface. Added member `options'.
9461 (pupa_register_command): Updated to match function.
9462 (pupa_arg_parse): New prototype.
9463 (pupa_hello_init) [PUPA_UTIL]: New prototype.
9464 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
9465 (pupa_ls_init) [PUPA_UTIL]: Likewise.
9466 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
9467 (pupa_cat_init) [PUPA_UTIL]: Likewise.
9468 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
9469 (pupa_boot_init) [PUPA_UTIL]: Likewise.
9470 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
9471 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
9472 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
9473 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
9474 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
9475 * kern/disk.c: Include <pupa/file.h>.
9476 (pupa_print_partinfo): New function.
9477 * kern/dl.c: Include <pupa/env.h>.
9478 (pupa_dl_dir): Variable removed.
9479 (pupa_dl_load): Use the environment variable `prefix' instead of
9480 the variable pupa_dl_dir.
9481 (pupa_dl_set_prefix): Function removed.
9482 (pupa_dl_get_prefix): Likewise.
9483 * kern/i386/pc/init.c: Include <pupa/env.h>.
9484 (pupa_machine_init): Use the environment variable `prefix' instead of
9485 using pupa_dl_set_prefix to set the prefix.
9486 * kern/main.c: Include <pupa/env.h>.
9487 (pupa_set_root_dev): Use the environment variable `prefix' instead of
9488 using pupa_dl_get_prefix to get the prefix.
9489 * kern/misc.c: Include <pupa/env.h>.
9490 (pupa_isdigit): New function.
9491 (pupa_isgraph): Likewise.
9492 (pupa_ftoa): Likewise.
9493 (pupa_vsprintf): Added support for printing values of the type
9494 `double'. Make it possible to format variable output when using
9495 formatting like `%1.2%f'.
9496 (pupa_split_cmdline): New function.
9497 * kern/rescue.c: Include <pupa/env.h>.
9498 (next_word): Removed function.
9499 (pupa_rescue_cmd_prefix): Likewise.
9500 (pupa_rescue_cmd_set): New function.
9501 (pupa_rescue_cmd_unset): New function.
9502 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
9503 split the command line instead of splitting it here. Added
9504 support for setting variables using the syntax `foo=bar'. Don't
9505 initialize the prefix command anymore. Initialized the set and
9506 unset commands.
9507 * normal/cmdline.c: Include <pupa/env.h>.
9508 (pupa_tab_complete): Added prototypes for print_simple_completion,
9509 print_partition_completion, add_completion, iterate_commands,
9510 iterate_dev, iterate_part and iterate_dir. Moved code to print
9511 partition information from here to kern/disk.c.
9512 (pupa_cmdline_run): Don't check if the funtion exists anymore.
9513 * normal/main.c: Include <pupa/env.h>.
9514 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
9515 instead of using pupa_dl_get_prefix to get the prefix.
9516 * term/i386/pc/vga.c: Include <pupa/arg.h>.
9517 (check_vga_mem): Cast pointers to `void *' to silence a gcc
9518 warning.
9519 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
9520 (pupa_vga_setcolor): Declare unused variables with `__attribute__
9521 ((unused))' to silence a gcc warning.
9522 (pupa_vga_setcolor): Likewise.
9523 (debug_command): Changed to match argument parsing
9524 interface changes.
9525 * util/pupa-emu.c: Include <pupa/env.h>.
9526 (options): Added 0's for unused fields to silence a gcc warning.
9527 (argp): Likewise.
9528 (main): Use the environment variable `prefix' instead of using
9529 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
9530 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
9531 and terminal.
9532
9533 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
9534 * util/misc.c: Include <malloc.h>.
9535 (pupa_malloc): Rewritten so errors are correctly reported.
9536 (pupa_realloc): Likewise.
9537 (pupa_memalign): Likewise.
9538 (pupa_mm_init_region): Declare unused variables with
9539 `__attribute__ ((unused))' to silence a gcc warning.
9540 * normal/i386/setjmp.S: Remove tab at the end of the file to
9541 silence a gcc warning.
9542 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
9543 variables with `__attribute__ ((unused))' to silence a gcc
9544 warning.
9545 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
9546 local variable i unsigned to silence a gcc warning.
9547
9548 * kern/term.c: Include <pupa/misc.h>.
9549 (pupa_more_lines): New variable.
9550 (pupa_more): Likewise.
9551 (pupa_putcode): When the pager is active pause at the end of every
9552 screen.
9553 (pupa_set_more): New function.
9554 * include/pupa/term.h (pupa_set_more): New prototype.
9555
9556
3b1139cb 95572004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
9558
9559 Now this project is GRUB 2 rather than PUPA. The location of
9560 the CVS repository was moved to GRUB's.
9561
9562 * configure.ac: Use bug-grub as the reporting address.
9563 Use GRUB instead of PUPA.
9564 Change the version number to 1.90.
9565
8367695c 95662004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
9567
9568 * genkernsyms.sh: Updated copyright information.
9569 * genmk.rb: Likewise.
9570 * genmodsrc.sh: Likewise.
9571 * gensymlist.sh: Likewise.
9572 * boot/i386/pc/boot.S: Likewise.
9573 * boot/i386/pc/diskboot.S: Likewise.
9574 * disk/i386/pc/biosdisk.c: Likewise.
9575 * disk/i386/pc/partition.c: Likewise.
9576 * font/manager.c: Likewise.
9577 * fs/ext2.c: Likewise.
9578 * fs/fat.c: Likewise.
9579 * include/pupa/boot.h: Likewise.
9580 * include/pupa/device.h: Likewise.
9581 * include/pupa/disk.h: Likewise.
9582 * include/pupa/dl.h: Likewise.
9583 * include/pupa/elf.h: Likewise.
9584 * include/pupa/err.h: Likewise.
9585 * include/pupa/file.h: Likewise.
9586 * include/pupa/font.h: Likewise.
9587 * include/pupa/fs.h: Likewise.
9588 * include/pupa/kernel.h: Likewise.
9589 * include/pupa/loader.h: Likewise.
9590 * include/pupa/misc.h: Likewise.
9591 * include/pupa/mm.h: Likewise.
9592 * include/pupa/net.h: Likewise.
9593 * include/pupa/normal.h: Likewise.
9594 * include/pupa/rescue.h: Likewise.
9595 * include/pupa/setjmp.h: Likewise.
9596 * include/pupa/symbol.h: Likewise.
9597 * include/pupa/term.h: Likewise.
9598 * include/pupa/types.h: Likewise.
9599 * include/pupa/i386/setjmp.h: Likewise.
9600 * include/pupa/i386/types.h: Likewise.
9601 * include/pupa/i386/pc/biosdisk.h: Likewise.
9602 * include/pupa/i386/pc/boot.h: Likewise.
9603 * include/pupa/i386/pc/console.h: Likewise.
9604 * include/pupa/i386/pc/init.h: Likewise.
9605 * include/pupa/i386/pc/kernel.h: Likewise.
9606 * include/pupa/i386/pc/linux.h: Likewise.
9607 * include/pupa/i386/pc/loader.h: Likewise.
9608 * include/pupa/i386/pc/memory.h: Likewise.
9609 * include/pupa/i386/pc/multiboot.h: Likewise.
9610 * include/pupa/i386/pc/partition.h: Likewise.
9611 * include/pupa/i386/pc/time.h: Likewise.
9612 * include/pupa/i386/pc/vga.h: Likewise.
9613 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
9614 * include/pupa/util/getroot.h: Likewise.
9615 * include/pupa/util/misc.h: Likewise.
9616 * include/pupa/util/resolve.h: Likewise.
9617 * kern/device.c: Likewise.
9618 * kern/disk.c: Likewise.
9619 * kern/dl.c: Likewise.
9620 * kern/err.c: Likewise.
9621 * kern/file.c: Likewise.
9622 * kern/fs.c: Likewise.
9623 * kern/loader.c: Likewise.
9624 * kern/main.c: Likewise.
9625 * kern/misc.c: Likewise.
9626 * kern/mm.c: Likewise.
9627 * kern/rescue.c: Likewise.
9628 * kern/term.c: Likewise.
9629 * kern/i386/dl.c: Likewise.
9630 * kern/i386/pc/init.c: Likewise.
9631 * kern/i386/pc/lzo1x.S: Likewise.
9632 * kern/i386/pc/startup.S: Likewise.
9633 * loader/i386/pc/chainloader.c: Likewise.
9634 * loader/i386/pc/linux.c: Likewise.
9635 * loader/i386/pc/multiboot.c: Likewise.
9636 * normal/cmdline.c: Likewise.
9637 * normal/command.c: Likewise.
9638 * normal/main.c: Likewise.
9639 * normal/menu.c: Likewise.
9640 * normal/i386/setjmp.S: Likewise.
9641 * term/i386/pc/console.c: Likewise.
9642 * term/i386/pc/vga.c: Likewise.
9643 * util/console.c: Likewise.
9644 * util/genmoddep.c: Likewise.
9645 * util/misc.c: Likewise.
9646 * util/pupa-emu.c: Likewise.
9647 * util/resolve.c: Likewise.
9648 * util/unifont2pff.rb: Likewise.
9649 * util/i386/pc/biosdisk.c: Likewise.
9650 * util/i386/pc/getroot.c: Likewise.
9651 * util/i386/pc/pupa-mkimage.c: Likewise.
9652 * util/i386/pc/pupa-setup.c: Likewise.
9653
e6eced71 96542004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
9655
9656 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
9657 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
9658 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
9659 reading and reset it after reading.
9660 (pupa_ext2_close): Return PUPA_ERR_NONE.
9661
9662 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
9663 Correct value.
9664 (struct linux_kernel_header): Add kernel_version and
9665 initrd_addr_max.
9666 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
9667 pupa_file_read succeeds.
9668 (pupa_rescue_cmd_initrd): Implement.
9669
5aded270 96702003-12-03 Marco Gerards <metgerards@student.han.nl>
9671
9672 * fs/ext2.c (pupa_ext2_label): New function.
9673 (pupa_ext2_fs): Added label.
9674 * fs/fat.c (pupa_fat_label): New function.
9675 (pupa_fat_fs): Added label.
9676 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
9677
9678 * kern/misc.c (pupa_strndup): New function.
9679 * include/pupa/misc.h (pupa_strndup): New prototype.
9680
9681 * include/pupa/normal.h: Include <pupa/err.h>.
9682 (pupa_set_history): New prototype.
9683 (pupa_iterate_commands): New prototype.
9684 * normal/cmdline.c: Include <pupa/machine/partition.h>,
9685 <pupa/disk.h>, <pupa/file.h>.
9686 (hist_size): New variable.
9687 (hist_lines): Likewise.
9688 (hist_end): Likewise.
9689 (hist_used): Likewise.
9690 (pupa_set_history): New function.
9691 (pupa_history_get): Likewise.
9692 (pupa_history_add): Likewise.
9693 (pupa_history_replace): Likewise.
9694 (pupa_tab_complete): Likewise.
9695 (pupa_cmdline_run): Added tab completion and history buffer. Tab
9696 completion shows partitionnames while completing partitions, this
9697 feature was suggested by Jeff Bailey.
9698 * normal/command.c (pupa_iterate_commands): New function.
9699 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
9700 (pupa_normal_init): Initialize history buffer.
9701 (PUPA_MOD_INIT): Likewise.
9702 (pupa_normal_fini): Free the history buffer.
9703 (PUPA_MOD_FINI): Likewise.
9704
9705 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
9706 key.
9707
9708 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
9709 * configure.ac [i386]: Check for regparam bug.
9710 (NESTED_FUNC_ATTR) [! i386]: Defined.
9711
1f7315a3 97122003-11-17 Marco Gerards <metgerards@student.han.nl>
9713
9714 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
9715 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
9716 (pupa_emu_SOURCES): New variable.
9717 (pupa_emu_LDFLAGS): Likewise.
9718 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
9719 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
9720 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
9721 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9722 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
9723 (pupa_jmp_buf): New typedef.
9724 (pupa_setjmp) [PUPA_UTIL]: New macro.
9725 (pupa_longjmp) [PUPA_UTIL]: Likewise.
9726 * include/pupa/term.h (struct pupa_term): New member `refresh'.
9727 (pupa_refresh): New prototype.
9728 * include/pupa/util/getroot.h: New file.
9729 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
9730 it.
9731 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
9732 (pupa_rescue_cmd_cat): Likewise.
9733 (pupa_rescue_cmd_ls): Likewise.
9734 (pupa_rescue_cmd_testload): Likewise.
9735 (pupa_rescue_cmd_lsmod): Likewise.
9736 * normal/cmdline.c (pupa_cmdline_get): Likewise.
9737 * normal/menu.c (run_menu): Likewise.
9738 * kern/term.c (pupa_cls): Likewise.
9739 (pupa_refresh): New function.
9740 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
9741 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
9742 * util/console.c: New file.
9743
9744 * util/i386/pc/getroot.c: New file.
9745 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
9746 (pupa_putchar): New function.
9747 (pupa_refresh): Likewise.
9748 (xgetcwd): Function moved to ...
9749 (strip_extra_slashes): Likewise.
9750 (get_prefix): Likewise.
9751 * util/i386/pc/getroot.c: ... here.
9752 (find_root_device): Function moved and renamed to...
9753 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
9754 Changed all callers.
9755 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
9756 and renamed to...
9757 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
9758 Changed all callers.
9759 * util/misc.c (pupa_memalign): New function.
9760 (pupa_mm_init_region): Likewise.
9761 (pupa_register_exported_symbols): Likewise.
9762 (pupa_putchar): Function removed.
9763 * util/pupa-emu.c: New file.
9764
9a5c1ade 97652003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
9766
9767 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
9768 (_multiboot_mod_SOURCES): New variable.
9769 (_multiboot_mod_CFLAGS): Likewise.
9770 * loader/i386/pc/multiboot.c: New file.
9771 * include/pupa/i386/pc/multiboot.h: Likewise.
9772 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
9773 (pupa_multiboot_real_boot): New function.
9774 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
9775 (pupa_multiboot_real_boot): New prototype.
9776 (pupa_rescue_cmd_multiboot): Likewise
9777 (pupa_rescue_cmd_module): Likewise.
9778
9779 * kern/loader.c (pupa_loader_set): Continue when
9780 pupa_loader_unload_func() fails.
9781 (pupa_loader_unset): New function.
9782 * include/pupa/loader.h (pupa_loader_unset): New prototype.
9783
9784 * kern/misc.c (pupa_stpcpy): New function.
9785 * include/pupa/misc.h (pupa_stpcpy): New prototype.
9786
8e72a9c0 97872003-11-12 Marco Gerards <metgerards@student.han.nl>
9788
9789 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
9790 for available extensions.
9791
9792 * include/pupa/i386/pc/time.h: New file.
9793 * kern/disk.c: Include <pupa/machine/time.h>.
9794 (PUPA_CACHE_TIMEOUT): New macro.
9795 (pupa_last_time): New variable.
9796 (pupa_disk_open): Flush the cache when there was a timeout.
9797 (pupa_disk_close): Reset the timer.
9798 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
9799 pupa_currticks.
9800 * util/misc.c: Include <sys/times.h>
9801 (pupa_get_rtc): New function.
9802
c4adbd32 98032003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9804
9805 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
9806 as blocks.
9807 (pupa_ext2_get_file_block): Use blocks member.
9808
9809 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
9810 first block. Return -1 instead of pupa_errno on error.
9811
bfd30f06 98122003-10-27 Marco Gerards <metgerards@student.han.nl>
9813
9814 * README: In the pupa-mkimage example use _chain instead of chain
9815 and ext2 instead of fat.
9816 * TODO: Replace ext2fs with jfs as an example. Add an item for
9817 adding journal playback for ext2fs.
9818 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
9819 (pkgdata_MODULES): Added ext2.mod.
9820 (ext2_mod_SOURCES): New variable.
9821 (ext2_mod_CFLAGS): Likewise.
9822 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
9823 * include/pupa/misc.h (pupa_strncpy): New prototype.
9824 (pupa_strcat): Likewise.
9825 (pupa_strncmp): Likewise.
9826 * kern/misc.c (pupa_strcat): Enable function.
9827 (pupa_strncpy): New function.
9828 (pupa_strncmp): Likewise.
9829 * fs/ext2.c: New file.
9830
9831 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
9832 when the read failed before retrying.
9833 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
9834 (_FILE_OFFSET_BITS): Likewise.
9835 * configure.ac: Added AC_SYS_LARGEFILE.
9836
98d15063 98372003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9838
9839 * genmk.rb (PModule#rule): Make sure to get only symbol names
9840 from the output of nm.
9841 Reported by Robert Millan <zeratul2@wanadoo.es>.
9842
18d9c7cd 98432003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
9844
9845 I forgot to check in these changes for a long time. This adds
9846 incomplete support for VGA console, and this is still very
9847 buggy. Also, a lot of consideration is required for I18N,
9848 UNICODE, and VGA font issues. Therefore, assume that this is
9849 such that "better than nothing".
9850
9851 * font/manager.c: New file.
9852 * include/pupa/font.h: Likewise.
9853 * include/pupa/i386/pc/vga.h: Likewise.
9854 * term/i386/pc/vga.c: Likewise.
9855 * util/unifont2pff.rb: Likewise.
9856
9857 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
9858 (pkgdata_MODULES): Added vga.mod and font.mod.
9859 (vga_mod_SOURCES): New variables.
9860 (vga_mod_CFLAGS): Likewise.
9861 (font_mod_SOURCES): Likewise.
9862 (font_mod_CFLAGS): Likewise.
9863
9864 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
9865
9866 * include/pupa/term.h: Include pupa/err.h.
9867 (struct pupa_term): Added init and fini.
9868 Changed the argument of putchar to pupa_uint32_t.
9869
9870 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
9871 (pupa_console_real_putchar): New prototype.
9872 (pupa_console_putchar): Removed.
9873 (pupa_console_checkkey): Exported.
9874 (pupa_console_getkey): Likewise.
9875
9876 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
9877 characters.
9878
9879 * kern/term.c (pupa_term_set_current): Rewritten.
9880 (pupa_putchar): Likewise.
9881 (pupa_putcode): New function.
9882
9883 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
9884 (pupa_console_real_putchar): ... this.
9885 (pupa_vga_set_mode): New function.
9886 (pupa_vga_get_font): Likewise.
9887
9888 * normal/command.c: Include pupa/term.h.
9889 (terminal_command): New function.
9890 (pupa_command_init): Register the command "terminal".
9891
9892 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
9893 (DISP_UP): Likewise.
9894 (DISP_RIGHT): Likewise.
9895 (DISP_DOWN): Likewise.
9896 (DISP_HLINE): Likewise.
9897 (DISP_VLINE): Likewise.
9898 (DISP_UL): Likewise.
9899 (DISP_UR): Likewise.
9900 (DISP_LL): Likewise.
9901 (DISP_LR): Likewise.
9902
9903 * term/i386/pc/console.c (pupa_console_putchar): New function.
9904
977329f5 99052003-02-08 NIIBE Yutaka <gniibe@m17n.org>
9906
9907 * util/resolve.c (pupa_util_resolve_dependencies): BUG
9908 FIX. Reverse the path_list.
9909
9910 * include/pupa/normal.h: Export pupa_register_command and
9911 pupa_unregister_command.
9912
9913 * hello/hello.c (pupa_cmd_hello): New module.
9914 * conf/i386-pc.rmk: Added hello.mod.
9915
1f5ab428 99162003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
9917
9918 * kern/i386/pc/lzo1x.S: New file.
9919
9920 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
9921 (compress_kernel): New variable.
9922 (generate_image): Heavily modified to support compressing a
9923 large part of the core image.
9924
9925 * util/misc.c (pupa_util_read_image): Fix a file descriptor
9926 leak.
9927 (pupa_util_load_image): New function.
9928
9929 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
9930 (pupa_compressed_size): New variable.
9931 (codestart): Enable Gate A20 here.
9932 Decompress the compressed part of the core image.
9933 Rearrange the code to put functions and variables which are
9934 required for initialization in the non-compressed part.
9935 Include lzo1x.S.
9936
9937 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
9938 here.
9939
9940 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
9941
9942 * include/pupa/i386/pc/kernel.h
9943 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
9944 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
9945 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9946 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9947 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
9948
9949 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
9950
9951 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
9952 (Utility#rule): Likewise.
9953
9954 * configure.ac: Check if LZO is available.
9955
ce5bf700 99562003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
9957
9958 * include/pupa/normal.h: New file.
9959 * include/pupa/setjmp.h: Likewise.
9960 * include/pupa/i386/setjmp.h: Likewise.
9961 * normal/cmdline.c: Likewise.
9962 * normal/command.c: Likewise.
9963 * normal/main.c: Likewise.
9964 * normal/menu.c: Likewise.
9965 * normal/i386/setjmp.S: Likewise.
9966
9967 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
9968 (pupa_rescue_cmd_initrd): Likewise.
9969
9970 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
9971 Likewise.
9972
9973 * kern/i386/pc/startup.S (translation_table): New variable.
9974 (translate_keycode): New function.
9975 (pupa_console_getkey): Call translate_keycode.
9976
9977 * kern/rescue.c (attempt_normal_mode): New function.
9978 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
9979 it failed, print a message.
9980
9981 * kern/mm.c (pupa_real_malloc): Print more information when a
9982 free magic is broken.
9983 (pupa_free): If the first free header is not free actually, set
9984 it to P.
9985
9986 * kern/main.c (pupa_load_normal_mode): Just load the module
9987 "normal".
9988 (pupa_main): Don't print the message
9989 "Entering into rescue mode..." here.
9990
9991 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
9992 Declared.
9993 (pupa_rescue_cmd_initrd): Likewise.
9994 (pupa_rescue_cmd_initrd): Likewise.
9995
9996 * include/pupa/symbol.h (FUNCTION): Specify the type.
9997 (VARIABLE): Likewise.
9998
9999 * include/pupa/err.h (pupa_err_t): Added
10000 PUPA_ERR_UNKNOWN_COMMAND.
10001
10002 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
10003 (pupa_dl_get_prefix): Likewise.
10004
10005 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
10006 Added _chain.mod and _linux.mod instead of chain.mod and
10007 linux.mod.
10008 (chain_mod_SOURCES): Renamed to ...
10009 (_chain_mod_SOURCES): ... this.
10010 (chain_mod_CFLAGS): Renamed to ...
10011 (_chain_mod_CFLAGS): ... this.
10012 (linux_mod_SOURCES): Renamed to ...
10013 (_linux_mod_SOURCES): ... this.
10014 (linux_mod_CFLAGS): Renamed to ...
10015 (_linux_mod_CFLAGS): ... this.
10016 (normal_mod_SOURCES): New variable.
10017 (normal_mod_CFLAGS): Likewise.
10018 (normal_mod_ASFLAGS): Likewise.
10019
100202003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
10021
10022 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
10023 possible.
10024
10025 * kern/dl.c (pupa_dl_ref): Refer dependending modules
10026 recursively.
10027 (pupa_dl_unref): Unrefer depending modules recursively.
10028 Don't call pupa_dl_unload implicitly, because PUPA can crash if
10029 a module is unloaded before one depending on that module is
10030 unloaded.
10031 (pupa_dl_unload): Unload depending modules explicitly,
10032 if possible.
10033
c04da074 100342003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
10035
10036 * include/pupa/i386/pc/linux.h: New file.
10037 * loader/i386/pc/linux.c: Likewise.
10038
10039 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
10040 Removed.
10041 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
10042 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
10043 of PUPA_CHAINLOADER_BOOT_SECTOR.
10044
10045 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
10046 (pupa_linux_prot_size): New variable.
10047 (pupa_linux_tmp_addr): Likewise.
10048 (pupa_linux_real_addr): Likewise.
10049 (pupa_linux_boot_zimage): New function.
10050 (pupa_linux_boot_bzimage): Likewise.
10051
10052 * kern/i386/pc/init.c (struct mem_region): New structure.
10053 (MAX_REGIONS): New macro.
10054 (mem_regions): New variable.
10055 (num_regions): Likewise.
10056 (pupa_os_area_addr): Likewise.
10057 (pupa_os_area_size): Likewise.
10058 (pupa_lower_mem): Likewise.
10059 (pupa_upper_mem): Likewise.
10060 (add_mem_region): New function.
10061 (compact_mem_regions): Likewise.
10062 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
10063 the size of the conventional memory and that of so-called upper
10064 memory (before the first memory hole).
10065 Instead of adding each found region to free memory, use
10066 add_mem_region and add them after removing overlaps.
10067 Also, add only 1/4 of the upper memory to free memory. The rest
10068 is used for loading OS images. Maybe this is ad hoc, but this
10069 makes it much easier to relocate OS images when booting.
10070
10071 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
10072 (pupa_enter_rescue_mode): Don't register initrd and module.
10073
10074 * kern/mm.c: Include pupa/dl.h.
10075
10076 * kern/main.c: Include pupa/file.h and pupa/device.h.
10077
10078 * kern/loader.c (pupa_loader_load_module_func): Removed.
10079 (pupa_loader_load_module): Likewise.
10080
10081 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
10082 ``.o''.
10083
10084 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
10085 (pupa_linux_tmp_addr): Likewise.
10086 (pupa_linux_real_addr): Likewise.
10087 (pupa_linux_boot_zimage): Likewise.
10088 (pupa_linux_boot_bzimage): Likewise.
10089
10090 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
10091 (pupa_upper_mem): Likewise.
10092 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
10093 module is too dangerous.
10094
10095 * include/pupa/loader.h (pupa_os_area_addr): Declared.
10096 (pupa_os_area_size): Likewise.
10097 (pupa_loader_set): Remove the first argument. Loader doesn't
10098 manage modules or initrd any longer.
10099 (pupa_loader_load_module): Removed.
10100
10101 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
10102 (linux_mod_SOURCES): New variable.
10103 (linux_mod_CFLAGS): Likewise.
10104
a13f9237 101052003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
10106
10107 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
10108 the length of a blocklist correctly.
10109
10110 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
10111 Use ioctl only if the OS file is a block device.
10112 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
10113 not very useful for normal files.
10114
10115 * kern/main.c (pupa_set_root_dev): New function.
10116 (pupa_load_normal_mode): Likewise.
10117 (pupa_main): Call those above.
10118
10119 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
10120 pupa_uint16_t.
10121
10122 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
10123
a5ffe966 101242003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10125
10126 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
10127 (setup): Configure the installed partition information and the
10128 dl prefix.
10129
10130 * loader/i386/pc/chainloader.c (my_mod): New variable.
10131 (pupa_chainloader_unload): New function.
10132 (pupa_rescue_cmd_chainloader): Refer itself.
10133 (PUPA_MOD_INIT): Save its own module in MY_MOD.
10134
10135 * kern/i386/pc/startup.S (install_partition): Removed.
10136 (version_string): Likewise.
10137 (config_file): Likewise.
10138 (pupa_install_dos_part): New variable.
10139 (pupa_install_bsd_part): Likewise.
10140 (pupa_prefix): Likewise.
10141 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
10142
10143 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
10144 and pupa/misc.h.
10145 (make_install_device): New function.
10146 (pupa_machine_init): Set the dl prefix.
10147
10148 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
10149 (buf): Renamed to ...
10150 (linebuf): ... this.
10151 (pupa_rescue_cmd_prefix): New function.
10152 (pupa_rescue_cmd_insmod): Likewise.
10153 (pupa_rescue_cmd_rmmod): Likewise.
10154 (pupa_rescue_cmd_lsmod): Likewise.
10155 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
10156 rmmod and lsmod.
10157
10158 * kern/mm.c (pupa_memalign): If failed even after invalidating
10159 disk caches, unload unneeded modules and retry.
10160
10161 * kern/misc.c (pupa_memmove): New function.
10162 (pupa_memcpy): Removed.
10163 (pupa_strcpy): New function.
10164 (pupa_itoa): Made static.
10165
10166 * kern/dl.c (pupa_dl_iterate): New function.
10167 (pupa_dl_ref): Likewise.
10168 (pupa_dl_unref): Likewise.
10169 (pupa_dl_unload): Return if succeeded or not.
10170 (pupa_dl_unload_unneeded): New function.
10171 (pupa_dl_unload_all): Likewise.
10172 (pupa_dl_init): Renamed to ...
10173 (pupa_dl_set_prefix): ... this.
10174 (pupa_dl_get_prefix): New function.
10175
10176 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
10177 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
10178 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
10179 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
10180 (pupa_install_dos_part): Declared.
10181 (pupa_install_bsd_part): Likewise.
10182 (pupa_prefix): Likewise.
10183 (pupa_boot_drive): Likewise.
10184
10185 * include/pupa/types.h: Fix a typo.
10186
10187 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
10188 pupa_memmove.
10189 (pupa_memmove): Declared.
10190 (pupa_strcpy): Likewise.
10191
10192 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
10193 pupa_mod_init takes one argument, its own module.
10194 (pupa_dl_unload_unneeded): Declared.
10195 (pupa_dl_unload_all): Likewise.
10196 (pupa_dl_ref): Likewise.
10197 (pupa_dl_unref): Likewise.
10198 (pupa_dl_iterate): Likewise.
10199 (pupa_dl_init): Renamed to ...
10200 (pupa_dl_set_prefix): ... this.
10201 (pupa_dl_get_prefix): Declared.
10202
10203 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
10204 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
10205 unloaded.
10206 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
10207 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
10208
10209 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
10210 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
10211
012d7999 102122003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10213
10214 * util/i386/pc/pupa-setup.c (setup): Define the internal
10215 function find_first_partition_start at the top level, because GCC
10216 3.0.x cannot compile internal functions in deeper scopes
10217 correctly.
10218 (find_root_device): Use lstat instead of stat.
10219 Don't follow symbolic links.
10220 Fix the path-constructing code.
10221
10222 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
10223 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
10224 by a BLKGETSIZE ioctl first, because block devices don't fill
10225 the member st_mode of the structure stat on Linux.
10226 [__linux__] (linux_find_partition): Use a temporary buffer
10227 REAL_DEV for the working space. Copy it to DEV before returning.
10228 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
10229 buffer cache consistent.
10230 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
10231 strncmp. The previous value was merely wrong.
10232 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
10233
10234 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
10235 FAT size is 12. The previous value was merely wrong.
10236
10237 * kern/main.c (pupa_main): Don't split the starting message from
10238 newlines.
10239
10240 * kern/term.c (pupa_putchar): Put CR after LF instead of before
10241 LF, because BIOS goes crazy about character attributes in this
10242 case.
10243
1cc73a62 102442003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
10245
10246 * include/i386/pc/util/biosdisk.h: New file.
10247 * util/i386/pc/biosdisk.c: Likewise.
10248 * util/i386/pc/pupa-setup.c: Likewise.
10249
10250 * Makefile.in (INCLUDE_DISTFILES): Added
10251 include/pupa/i386/pc/util/biosdisk.h.
10252 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
10253 directory util/i386/pc.
10254 (install-local): Added a rule for sbin_UTILITIES.
10255 (uninstall): Likewise.
10256
10257 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
10258
10259 * util/misc.c (xrealloc): New function.
10260 (pupa_malloc): Likewise.
10261 (pupa_free): Likewise.
10262 (pupa_realloc): Likewise.
10263 (pupa_stop): Likewise.
10264 (pupa_putchar): Likewise.
10265
10266 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
10267
10268 * include/pupa/util/misc.h (xrealloc): Declared.
10269
10270 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
10271 macro.
10272 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
10273 (PUPA_BOOT_MACHINE_BPB_END): ... this.
10274
10275 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
10276 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10277
10278 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
10279 way should be implemented.
10280 [PUPA_UTIL] (pupa_fat_fini): Likewise.
10281
10282 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
10283 the size of NAME for safety.
10284 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
10285 0x88.
10286
10287 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
10288 (pupa_setup_SOURCES): Likewise.
10289
10290 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
10291
08b70fe8 102922002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10293
10294 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
10295 bunch of pushl's from pusha, because this destroys the return
10296 value.
10297
62ddcc8f 102982002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
10299
10300 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
10301 This means that any missing prototypes could be fatal. Also, you
10302 must take care when writing assembly code. See the comments at
10303 the beginning of startup.S, for more details.
10304
10305 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
10306 compilation mechanism.
10307 (pupa_chainloader_real_boot): Likewise.
10308 (pupa_biosdisk_rw_int13_extensions): Likewise.
10309 (pupa_biosdisk_rw_standard): Likewise.
10310 (pupa_biosdisk_check_int13_extensions): Likewise.
10311 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
10312 (pupa_biosdisk_get_diskinfo_standard): Likewise.
10313 (pupa_get_memsize): Likewise.
10314 (pupa_get_mmap_entry): Likewise.
10315 (pupa_console_putchar): Likewise.
10316 (pupa_console_setcursor): Likewise.
10317 (pupa_getrtsecs): Use pushl instead of push.
10318
10319 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
10320 memory instead of the stack for a mmap entry, because some
10321 BIOSes may ignore the maximum size and overflow.
10322
10323 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
10324
10325 * genmk.rb (PModule#rule): Compile automatically generated
10326 sources with module-specific CFLAGS as well as other sources.
10327
9962ed99 103282002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10329
10330 * configure.ac: Check ld.
10331 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
10332 respectively, before checking endianness and sizes.
10333
10334 * Makefile.in (LD): New variable.
10335
abdfc3c5 103362002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10337
10338 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
10339
6a161fa9 103402002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
10341
10342 * Changelog: New file.
10343