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