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