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